diff --git a/1103.bundle.js b/1103.bundle.js index 00a71c8f..fb7f6f10 100644 --- a/1103.bundle.js +++ b/1103.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[1103],{1103:(e,t,r)=>{r.r(t),r.d(t,{default:()=>m});var l=r(6540),n=r(3407),a=r(1365),c=(r(5045),r(7240));const o=JSON.parse('{"type":"FeatureCollection","crs":{"properties":{"name":"EPSG:4326"},"type":"name"},"features":[{"type":"Feature","properties":{"d":1,"en":"Momtchil Momtchev
IT Consulting: GIS, Node, TCP/IP, Linux","i":"https://momtchil.momtchev.pro/wp-content/uploads/2018/08/ID_ever_small_icon32x32.jpg","u":"https://momtchil.momtchev.pro/"},"geometry":{"type":"Point","coordinates":[2.36401,48.820224]}}]}');function m(){const[e,t]=l.useState([]);return l.createElement("div",{className:"d-flex flex-row"},l.createElement(c.f9,{className:"example-map",initial:{center:(0,n.Rb)([2.364,48.82]),zoom:11}},l.createElement(c.ej,null),l.createElement(c.j9,{zIndex:10,features:new a.A({featureProjection:"EPSG:3857"}).readFeatures(o),onClick:(0,l.useCallback)((r=>{t([...e,r.target.get("en")].slice(-16))}),[e])},l.createElement(c.cq.RStyle,null,l.createElement(c.cq.RCircle,{radius:5},l.createElement(c.cq.RFill,{color:"blue"})))),l.createElement(c.j9,{zIndex:5,format:new a.A({featureProjection:"EPSG:3857"}),url:"https://raw.githubusercontent.com/gregoiredavid/france-geojson/master/departements.geojson",onPointerEnter:(0,l.useCallback)((r=>{t([...e,"Entering "+r.target.get("nom")].slice(-16))}),[e])},l.createElement(c.cq.RStyle,null,l.createElement(c.cq.RStroke,{color:"#007bff",width:3}),l.createElement(c.cq.RFill,{color:"transparent"})))),l.createElement("div",{className:"mx-0 mt-0 mb-3 p-1 w-100 jumbotron shadow example-list"},l.createElement("p",null,"Your actions"),l.createElement("ul",{dangerouslySetInnerHTML:{__html:e.map((e=>`
  • ${e}
  • `)).join("")}})))}}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[1103],{1103:(e,t,r)=>{r.r(t),r.d(t,{default:()=>m});var l=r(6540),a=r(6717),n=r(3407),c=r(1365),o=(r(5045),r(7240));const s=JSON.parse('{"type":"FeatureCollection","crs":{"properties":{"name":"EPSG:4326"},"type":"name"},"features":[{"type":"Feature","properties":{"d":1,"en":"Momtchil Momtchev
    IT Consulting: GIS, Node, TCP/IP, Linux","i":"https://momtchil.momtchev.pro/wp-content/uploads/2018/08/ID_ever_small_icon32x32.jpg","u":"https://momtchil.momtchev.pro/"},"geometry":{"type":"Point","coordinates":[2.36401,48.820224]}}]}');function m(){const[e,t]=l.useState([]);return l.createElement("div",{className:"d-flex flex-row"},l.createElement(o.f9,{className:"example-map",initial:{center:(0,n.Rb)([2.364,48.82]),zoom:11}},l.createElement(o.ej,null),l.createElement(o.j9,{zIndex:10,features:new c.A({featureProjection:"EPSG:3857",featureClass:a.A}).readFeatures(s),onClick:(0,l.useCallback)((r=>{t([...e,r.target.get("en")].slice(-16))}),[e])},l.createElement(o.cq.RStyle,null,l.createElement(o.cq.RCircle,{radius:5},l.createElement(o.cq.RFill,{color:"blue"})))),l.createElement(o.j9,{zIndex:5,format:new c.A({featureProjection:"EPSG:3857",featureClass:a.A}),url:"https://raw.githubusercontent.com/gregoiredavid/france-geojson/master/departements.geojson",onPointerEnter:(0,l.useCallback)((r=>{t([...e,"Entering "+r.target.get("nom")].slice(-16))}),[e])},l.createElement(o.cq.RStyle,null,l.createElement(o.cq.RStroke,{color:"#007bff",width:3}),l.createElement(o.cq.RFill,{color:"transparent"})))),l.createElement("div",{className:"mx-0 mt-0 mb-3 p-1 w-100 jumbotron shadow example-list"},l.createElement("p",null,"Your actions"),l.createElement("ul",{dangerouslySetInnerHTML:{__html:e.map((e=>`
  • ${e}
  • `)).join("")}})))}}}]); \ No newline at end of file diff --git a/1346.bundle.js b/1346.bundle.js index 2fb938e1..d480f77a 100644 --- a/1346.bundle.js +++ b/1346.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[1346],{1346:(e,t,n)=>{n.r(t),n.d(t,{default:()=>a});const a="import React, {useCallback, useMemo} from 'react';\nimport {fromLonLat} from 'ol/proj';\nimport Feature from 'ol/Feature';\nimport GeoJSON from 'ol/format/GeoJSON';\nimport {Geometry} from 'ol/geom';\nimport 'ol/ol.css';\n\nimport {RMap, RLayerVector, RStyle, RFeature, ROverlay} from 'rlayers';\nimport RLayerStadia from 'rlayers/layer/RLayerStadia';\n\n// These are the French internal administrative borders in GeoJSON format\nconst departements =\n 'https://raw.githubusercontent.com/gregoiredavid/france-geojson/master/departements.geojson';\nconst parser = new GeoJSON({featureProjection: 'EPSG:3857'});\n// Population by French administrative division\n// https://public.opendatasoft.com/explore/dataset/population-francaise-par-departement-2018/\n// Published under Etalab Open License https://www.etalab.gouv.fr/wp-content/uploads/2018/11/open-licence.pdf\nconst inputData =\n 'https://public.opendatasoft.com/api/records/1.0/search/?dataset=population-francaise-par-departement-2018&q=&rows=200';\ntype inputDataType = {records: {fields: {code_departement: string; population: number}}[]};\nconst fetchData = fetch(inputData).then((raw) => raw.json() as Promise);\nconst getData = (data: inputDataType, dep: string) =>\n data.records.find((el) => el.fields.code_departement === dep)?.fields.population ?? 0;\n// The default hitbox around the features is 3px wide making narrow gaps between the borders difficult to select\nRFeature.hitTolerance = 0;\n\nexport default function GeoData(): JSX.Element {\n const [data, setData] = React.useState({records: []} as inputDataType);\n const [current, setCurrent] = React.useState(null as Feature | null);\n React.useEffect(() => {\n fetchData.then((r) => setData(r));\n }, []);\n return (\n
    \n ({center: fromLonLat([2, 46.5]), zoom: 5.75}), [])}\n noDefaultControls={true}\n noDefaultInteractions={true}\n >\n \n\n {/* This the internal borders layer, initialized with the GeoJSON\n * useCallback is a performance optimization, it allows to always have\n * the same function object unless 'current' changes\n * without it you will create a new function at every frame rendered */}\n setCurrent(e.target), [])}\n onPointerLeave={useCallback(\n (e) => current === e.target && setCurrent(null),\n [current]\n )}\n >\n {/* When styling each feature, compute the color from the population data\n * The function is memoized and it is replaced only once - when the population data\n * becomes available. Without memoization (useCallback) all the features will need to\n * be re-evaluated at every frame */}\n (\n \n ),\n [data]\n )}\n />\n \n {/* This is a layer with a single feature - current - that holds the highlighted borders\n * It is styled with the default OpenLayers style */}\n \n {current ? (\n
    \n \n \n Population in {current.get('nom')} in 2018 is{' '}\n {getData(data, current.get('code'))}\n \n \n
    \n ) : null}\n
    \n \n
    \n );\n}\n"}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[1346],{1346:(e,t,n)=>{n.r(t),n.d(t,{default:()=>a});const a="import React, {useCallback, useMemo} from 'react';\nimport {fromLonLat} from 'ol/proj';\nimport Feature from 'ol/Feature';\nimport GeoJSON from 'ol/format/GeoJSON';\nimport {Geometry} from 'ol/geom';\nimport 'ol/ol.css';\n\nimport {RMap, RLayerVector, RStyle, RFeature, ROverlay} from 'rlayers';\nimport RLayerStadia from 'rlayers/layer/RLayerStadia';\n\n// These are the French internal administrative borders in GeoJSON format\nconst departements =\n 'https://raw.githubusercontent.com/gregoiredavid/france-geojson/master/departements.geojson';\nconst parser = new GeoJSON({featureProjection: 'EPSG:3857', featureClass: Feature});\n// Population by French administrative division\n// https://public.opendatasoft.com/explore/dataset/population-francaise-par-departement-2018/\n// Published under Etalab Open License https://www.etalab.gouv.fr/wp-content/uploads/2018/11/open-licence.pdf\nconst inputData =\n 'https://public.opendatasoft.com/api/records/1.0/search/?dataset=population-francaise-par-departement-2018&q=&rows=200';\ntype inputDataType = {records: {fields: {code_departement: string; population: number}}[]};\nconst fetchData = fetch(inputData).then((raw) => raw.json() as Promise);\nconst getData = (data: inputDataType, dep: string) =>\n data.records.find((el) => el.fields.code_departement === dep)?.fields.population ?? 0;\n// The default hitbox around the features is 3px wide making narrow gaps between the borders difficult to select\nRFeature.hitTolerance = 0;\n\nexport default function GeoData(): JSX.Element {\n const [data, setData] = React.useState({records: []} as inputDataType);\n const [current, setCurrent] = React.useState(null as Feature | null);\n React.useEffect(() => {\n fetchData.then((r) => setData(r));\n }, []);\n return (\n
    \n ({center: fromLonLat([2, 46.5]), zoom: 5.75}), [])}\n noDefaultControls={true}\n noDefaultInteractions={true}\n >\n \n\n {/* This the internal borders layer, initialized with the GeoJSON\n * useCallback is a performance optimization, it allows to always have\n * the same function object unless 'current' changes\n * without it you will create a new function at every frame rendered */}\n setCurrent(e.target), [])}\n onPointerLeave={useCallback(\n (e) => current === e.target && setCurrent(null),\n [current]\n )}\n >\n {/* When styling each feature, compute the color from the population data\n * The function is memoized and it is replaced only once - when the population data\n * becomes available. Without memoization (useCallback) all the features will need to\n * be re-evaluated at every frame */}\n (\n \n ),\n [data]\n )}\n />\n \n {/* This is a layer with a single feature - current - that holds the highlighted borders\n * It is styled with the default OpenLayers style */}\n \n {current ? (\n
    \n \n \n Population in {current.get('nom')} in 2018 is{' '}\n {getData(data, current.get('code'))}\n \n \n
    \n ) : null}\n
    \n \n
    \n );\n}\n"}}]); \ No newline at end of file diff --git a/1699.bundle.js b/1699.bundle.js index 5c642f25..e4f686af 100644 --- a/1699.bundle.js +++ b/1699.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[1699],{1699:(e,t,n)=>{n.r(t),n.d(t,{default:()=>a});const a="import React, {useCallback} from 'react';\nimport {fromLonLat} from 'ol/proj';\nimport GeoJSON from 'ol/format/GeoJSON';\nimport {createEmpty, extend, getHeight, getWidth} from 'ol/extent';\nimport 'ol/ol.css';\n\n// This example illustrates the versatility of a dynamic RStyle\n// It also makes use of its caching abilities\nimport {RMap, RLayerCluster} from 'rlayers';\nimport {RStyle, RFill, RStroke, RRegularShape, RCircle, RText} from 'rlayers/style';\nimport RLayerStadia from 'rlayers/layer/RLayerStadia';\n\n// Earthquakes of magnitude of at least 3.0 in 2020 (courtesy of USGS)\n// (this won't work in CodePen)\nimport earthquakes from '!!file-loader!./data/earthquakes.geojson';\ntype InputFormEventType = React.FormEvent;\nconst reader = new GeoJSON({featureProjection: 'EPSG:3857'});\n\nconst colorBlob = (size) =>\n 'rgba(' + [255, 153, 0, Math.min(0.8, 0.4 + Math.log(size / 10) / 20)].join() + ')';\nconst radiusStar = (feature) => Math.round(5 * (parseFloat(feature.get('mag')) - 2.5));\n\n// This returns the north/south east/west extent of a group of features\n// divided by the resolution\nconst extentFeatures = (features, resolution) => {\n const extent = createEmpty();\n for (const f of features) extend(extent, f.getGeometry().getExtent());\n return Math.round(0.25 * (getWidth(extent) + getHeight(extent))) / resolution;\n};\n\nexport default function Cluster(): JSX.Element {\n const [distance, setDistance] = React.useState(20);\n const [selected, setSelected] = React.useState('Click a cluster for details');\n const earthquakeLayer = React.useRef();\n return (\n \n \n \n {\n const features = e.target.get('features') ?? [];\n setSelected(\n `${features.length} earthquakes in this location, ` +\n `magnitudes are ${features.map((eq) => eq.get('mag')).join(', ')}`\n );\n }, [])}\n >\n \n // This is the hashing function, it takes a feature as its input\n // and returns a string\n // It must be dependant of the same inputs as the rendering function\n feature.get('features').length > 1\n ? '#' + extentFeatures(feature.get('features'), resolution)\n : '$' + radiusStar(feature.get('features')[0]),\n []\n )}\n render={useCallback((feature, resolution) => {\n // This is the rendering function\n // It has access to the cluster which appears as a single feature\n // and has a property with an array of all the features that make it\n const size = feature.get('features').length;\n // This is the size (number of features) of the cluster\n if (size > 1) {\n // Render a blob with a number\n const radius = extentFeatures(feature.get('features'), resolution);\n return (\n // A dynamic style should return a fragment instead of a\n // full-blown RStyle - returning a full RStyle here\n // will simply replace the style used by the vector layer\n // with a fixed one\n \n \n \n \n \n \n \n \n \n );\n }\n // We have a single feature cluster\n const unclusteredFeature = feature.get('features')[0];\n // Render a star\n return (\n \n \n \n \n );\n }, [])}\n />\n \n \n
    \n \n
    \n setDistance(parseInt(e.currentTarget.value)),\n []\n )}\n />\n
    \n
    \n
    {selected}
    \n
    \n );\n}\n"}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[1699],{1699:(e,t,n)=>{n.r(t),n.d(t,{default:()=>a});const a="import React, {useCallback} from 'react';\nimport {fromLonLat} from 'ol/proj';\nimport GeoJSON from 'ol/format/GeoJSON';\nimport {createEmpty, extend, getHeight, getWidth} from 'ol/extent';\nimport 'ol/ol.css';\n\n// This example illustrates the versatility of a dynamic RStyle\n// It also makes use of its caching abilities\nimport {RMap, RLayerCluster} from 'rlayers';\nimport {RStyle, RFill, RStroke, RRegularShape, RCircle, RText} from 'rlayers/style';\nimport RLayerStadia from 'rlayers/layer/RLayerStadia';\n\n// Earthquakes of magnitude of at least 3.0 in 2020 (courtesy of USGS)\n// (this won't work in CodePen)\nimport earthquakes from '!!file-loader!./data/earthquakes.geojson';\nimport {Feature} from 'ol';\ntype InputFormEventType = React.FormEvent;\nconst reader = new GeoJSON({featureProjection: 'EPSG:3857', featureClass: Feature});\n\nconst colorBlob = (size) =>\n 'rgba(' + [255, 153, 0, Math.min(0.8, 0.4 + Math.log(size / 10) / 20)].join() + ')';\nconst radiusStar = (feature) => Math.round(5 * (parseFloat(feature.get('mag')) - 2.5));\n\n// This returns the north/south east/west extent of a group of features\n// divided by the resolution\nconst extentFeatures = (features, resolution) => {\n const extent = createEmpty();\n for (const f of features) extend(extent, f.getGeometry().getExtent());\n return Math.round(0.25 * (getWidth(extent) + getHeight(extent))) / resolution;\n};\n\nexport default function Cluster(): JSX.Element {\n const [distance, setDistance] = React.useState(20);\n const [selected, setSelected] = React.useState('Click a cluster for details');\n const earthquakeLayer = React.useRef();\n return (\n \n \n \n {\n const features = e.target.get('features') ?? [];\n setSelected(\n `${features.length} earthquakes in this location, ` +\n `magnitudes are ${features.map((eq) => eq.get('mag')).join(', ')}`\n );\n }, [])}\n >\n \n // This is the hashing function, it takes a feature as its input\n // and returns a string\n // It must be dependant of the same inputs as the rendering function\n feature.get('features').length > 1\n ? '#' + extentFeatures(feature.get('features'), resolution)\n : '$' + radiusStar(feature.get('features')[0]),\n []\n )}\n render={useCallback((feature, resolution) => {\n // This is the rendering function\n // It has access to the cluster which appears as a single feature\n // and has a property with an array of all the features that make it\n const size = feature.get('features').length;\n // This is the size (number of features) of the cluster\n if (size > 1) {\n // Render a blob with a number\n const radius = extentFeatures(feature.get('features'), resolution);\n return (\n // A dynamic style should return a fragment instead of a\n // full-blown RStyle - returning a full RStyle here\n // will simply replace the style used by the vector layer\n // with a fixed one\n \n \n \n \n \n \n \n \n \n );\n }\n // We have a single feature cluster\n const unclusteredFeature = feature.get('features')[0];\n // Render a star\n return (\n \n \n \n \n );\n }, [])}\n />\n \n \n
    \n \n
    \n setDistance(parseInt(e.currentTarget.value)),\n []\n )}\n />\n
    \n
    \n
    {selected}
    \n
    \n );\n}\n"}}]); \ No newline at end of file diff --git a/1873.bundle.js b/1873.bundle.js index daffdb26..d555289c 100644 --- a/1873.bundle.js +++ b/1873.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[1873],{1873:(n,s,a)=>{a.r(s),a.d(s,{default:()=>t});const t='import React, { useCallback } from "react";\nimport { Feature } from "ol";\nimport { fromLonLat } from "ol/proj";\nimport GeoJSON from "ol/format/GeoJSON";\nimport { Point } from "ol/geom";\nimport "ol/ol.css";\n\nimport { RMap, ROSM, RLayerVector, RStyle } from "rlayers";\n\n/**\n * Including data from a static file included at bundling time\n * webpack will do everything necessary\n * (this won\'t work in CodePen)\n */\nimport geojsonFeatures from "./data/geo.json";\n\nexport default function Features(): JSX.Element {\n const [flow, setFlow] = React.useState([]);\n return (\n <div className="d-flex flex-row">\n <RMap\n className="example-map"\n initial={{ center: fromLonLat([2.364, 48.82]), zoom: 11 }}\n >\n <ROSM />\n {/* When using TypeScript you can (optionally) specify the type of the features */}\n <RLayerVector<Feature<Point>>\n zIndex={10}\n /* Input data will have to be typed too */\n features={\n new GeoJSON({ featureProjection: "EPSG:3857" }).readFeatures(\n geojsonFeatures\n ) as Feature<Point>[]\n }\n /* The type will be propagated to all callbacks */\n onClick={useCallback(\n (e) => {\n setFlow([...flow, e.target.get("en")].slice(-16));\n },\n [flow]\n )}\n >\n <RStyle.RStyle>\n <RStyle.RCircle radius={5}>\n <RStyle.RFill color="blue" />\n </RStyle.RCircle>\n </RStyle.RStyle>\n </RLayerVector>\n {/* Without any type, the features will be assumed to be a of a generic Geometry type */}\n <RLayerVector\n zIndex={5}\n /* This layer will be getting its data from an URL */\n format={new GeoJSON({ featureProjection: "EPSG:3857" })}\n url="https://raw.githubusercontent.com/gregoiredavid/france-geojson/master/departements.geojson"\n onPointerEnter={useCallback(\n (e) => {\n setFlow([...flow, "Entering " + e.target.get("nom")].slice(-16));\n },\n [flow]\n )}\n >\n <RStyle.RStyle>\n <RStyle.RStroke color="#007bff" width={3} />\n <RStyle.RFill color="transparent" />\n </RStyle.RStyle>\n </RLayerVector>\n </RMap>\n <div className="mx-0 mt-0 mb-3 p-1 w-100 jumbotron shadow example-list">\n <p>Your actions</p>\n <ul\n dangerouslySetInnerHTML={{\n __html: flow.map((p) => `<li className="m-0">${p}</li>`).join(""),\n }}\n />\n </div>\n </div>\n );\n}\n'}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[1873],{1873:(n,s,a)=>{a.r(s),a.d(s,{default:()=>t});const t='import React, { useCallback } from "react";\nimport { Feature } from "ol";\nimport { fromLonLat } from "ol/proj";\nimport GeoJSON from "ol/format/GeoJSON";\nimport { Point } from "ol/geom";\nimport "ol/ol.css";\n\nimport { RMap, ROSM, RLayerVector, RStyle } from "rlayers";\n\n/**\n * Including data from a static file included at bundling time\n * webpack will do everything necessary\n * (this won\'t work in CodePen)\n */\nimport geojsonFeatures from "./data/geo.json";\n\nexport default function Features(): JSX.Element {\n const [flow, setFlow] = React.useState([]);\n return (\n <div className="d-flex flex-row">\n <RMap\n className="example-map"\n initial={{ center: fromLonLat([2.364, 48.82]), zoom: 11 }}\n >\n <ROSM />\n {/* When using TypeScript you can (optionally) specify the type of the features */}\n <RLayerVector<Feature<Point>>\n zIndex={10}\n /* Input data will have to be typed too */\n features={\n new GeoJSON({\n featureProjection: "EPSG:3857",\n featureClass: Feature,\n }).readFeatures(geojsonFeatures) as Feature<Point>[]\n }\n /* The type will be propagated to all callbacks */\n onClick={useCallback(\n (e) => {\n setFlow([...flow, e.target.get("en")].slice(-16));\n },\n [flow]\n )}\n >\n <RStyle.RStyle>\n <RStyle.RCircle radius={5}>\n <RStyle.RFill color="blue" />\n </RStyle.RCircle>\n </RStyle.RStyle>\n </RLayerVector>\n {/* Without any type, the features will be assumed to be a of a generic Geometry type */}\n <RLayerVector\n zIndex={5}\n /**\n * This layer will be getting its data from an URL, do not forget that in\n * OpenLayers 9.2 the format parsers now return RenderFeature by default unless\n * featureClass is explicitly specified\n */\n format={\n new GeoJSON({\n featureProjection: "EPSG:3857",\n featureClass: Feature,\n })\n }\n url="https://raw.githubusercontent.com/gregoiredavid/france-geojson/master/departements.geojson"\n onPointerEnter={useCallback(\n (e) => {\n setFlow([...flow, "Entering " + e.target.get("nom")].slice(-16));\n },\n [flow]\n )}\n >\n <RStyle.RStyle>\n <RStyle.RStroke color="#007bff" width={3} />\n <RStyle.RFill color="transparent" />\n </RStyle.RStyle>\n </RLayerVector>\n </RMap>\n <div className="mx-0 mt-0 mb-3 p-1 w-100 jumbotron shadow example-list">\n <p>Your actions</p>\n <ul\n dangerouslySetInnerHTML={{\n __html: flow.map((p) => `<li className="m-0">${p}</li>`).join(""),\n }}\n />\n </div>\n </div>\n );\n}\n'}}]); \ No newline at end of file diff --git a/1991.bundle.js b/1991.bundle.js index 66b5b77a..a5e1efab 100644 --- a/1991.bundle.js +++ b/1991.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[1991],{1991:(e,t,r)=>{r.r(t),r.d(t,{default:()=>y});var a=r(6540),n=r(3407),l=r(6717),s=r(1217),c=r(6888),o=r(8217);const i=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,u=/^H.([A-Z]{3}).*?:(.*)/,d=/^HFDTE(\d{2})(\d{2})(\d{2})/,m=/\r\n|\r|\n/;class p extends c.A{constructor(e){super(),e=e||{},this.dataProjection=(0,n.Jt)("EPSG:4326"),this.altitudeMode_=e.altitudeMode?e.altitudeMode:"none"}readFeatureFromText(e,t){const r=this.altitudeMode_,a=e.split(m),n={},c=[];let p,g,f=2e3,h=0,S=1,b=-1;for(p=0,g=a.length;p(Promise.all(C.map((e=>fetch(e.i).then((e=>e.text()))))).then((e=>w(e))),[]))),x={redCircle:(0,b.useRStyle)(),blueCircle:(0,b.useRStyle)(),flightPath:a.useRef([])},M=a.useRef(),R=a.useRef();return a.createElement(a.Fragment,null,a.useMemo((()=>C.map(((e,t)=>a.createElement(b.RStyle,{key:t,ref:e=>x.flightPath.current[t]=e},a.createElement(b.RStroke,{color:e.c,width:3}))))),[x.flightPath]),a.createElement(b.RStyle,{ref:x.redCircle},a.createElement(b.RStroke,{color:"red",width:1}),a.createElement(b.RCircle,{radius:6},a.createElement(b.RFill,{color:"red"}))),a.createElement(b.RStyle,{ref:x.blueCircle},a.createElement(b.RCircle,{radius:6},a.createElement(b.RFill,{color:"blue"}))),a.createElement(S.f9,{className:"example-map",initial:{center:E,zoom:9},onPointerMove:(0,a.useCallback)((e=>{const r=M.current.source.getClosestFeatureToCoordinate(e.coordinate);if(null===r)return;const a=r.getGeometry().getClosestPoint(e.coordinate),l=new Date(1e3*a[2]);n(new h.A(a)),c(new s.A([e.coordinate,[a[0],a[1]]])),t(""+r.get("PLT")+"
    "+l.toUTCString()+""),e.map.render()}),[M])},a.createElement(S.HS,{zIndex:5,url:"https://{a-c}.tile.opentopomap.org/{z}/{x}/{y}.png",attributions:"Kartendaten: © OpenStreetMap-Mitwirkende, SRTM | Kartendarstellung: © OpenTopoMap (CC-BY-SA)"}),a.createElement(S.j9,{zIndex:10,ref:M,onAddFeature:(0,a.useCallback)((e=>{const t=e.feature.getGeometry();m.start=Math.min(m.start,t.getFirstCoordinate()[2]),m.stop=Math.max(m.stop,t.getLastCoordinate()[2]),m.duration=m.stop-m.start,p({...m})}),[m]),onPostRender:(0,a.useCallback)((e=>{const t=(0,f.r2)(e);t.setStyle(b.RStyle.getStyleStatic(x.redCircle)),r&&l&&(t.drawGeometry(r),t.drawGeometry(l))}),[r,l,x.redCircle])},a.useMemo((()=>a.createElement(a.Fragment,null,y.map(((e,t)=>a.createElement(S.Dp,{key:t,feature:(new g).readFeatures(e,{featureProjection:"EPSG:3857"})[0],style:x.flightPath.current[t]}))))),[y,x.flightPath,x.flightPath.current[0]])),a.createElement(S.j9,{zIndex:10,ref:R,style:x.blueCircle},a.useMemo((()=>a.createElement(a.Fragment,null,u.map(((e,t)=>a.createElement(S.Dp,{key:t,geometry:new h.A(e)}))))),[u]))),a.createElement("div",{className:"d-flex flex-row mb-3 align-items-center"},a.createElement("div",{className:"jumbotron py-1 px-3 m-0 me-3 w-50",dangerouslySetInnerHTML:{__html:e}}),a.createElement("div",{className:"w-50"},a.createElement("input",{type:"range",className:"range-slider range-slider--primary w-100",min:"0",max:"100",value:o,onChange:(0,a.useCallback)((e=>{const t=parseInt(e.currentTarget.value);i(t);const r=M.current.source,a=m.start+m.duration*t/100,n=[];r.forEachFeature((e=>{if(!e.get("PLT"))return;const t=e.getGeometry().getCoordinateAtM(a,!0);n.push(t)})),d(n)}),[M,m])}))))}}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[1991],{1991:(e,t,r)=>{r.r(t),r.d(t,{default:()=>I});var a=r(6540),n=r(3407),s=r(6717),l=r(1217),o=r(6888),c=r(8217);const i=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,d=/^H.([A-Z]{3}).*?:(.*)/,u=/^HFDTE(\d{2})(\d{2})(\d{2})/,p=/^HFDTEDATE:(\d{2})(\d{2})(\d{2}),(\d{2})/,m=/\r\n|\r|\n/;class h extends o.A{constructor(e){super(),e=e||{},this.dataProjection=(0,n.Jt)("EPSG:4326"),this.altitudeMode_=e.altitudeMode?e.altitudeMode:"none",this.lad_=!1,this.lod_=!1,this.ladStart_=0,this.ladStop_=0,this.lodStart_=0,this.lodStop_=0}readFeatureFromText(e,t){const r=this.altitudeMode_,a=e.split(m),n={},o=[];let h,f,g=2e3,S=0,E=1,b=-1;for(h=0,f=a.length;h(Promise.all(C.map((e=>fetch(e.i).then((e=>e.text()))))).then((e=>I(e))),[]))),_={redCircle:(0,b.useRStyle)(),blueCircle:(0,b.useRStyle)(),flightPath:a.useRef([])},x=a.useRef(),w=a.useRef();return a.createElement(a.Fragment,null,a.useMemo((()=>C.map(((e,t)=>a.createElement(b.RStyle,{key:t,ref:e=>_.flightPath.current[t]=e},a.createElement(b.RStroke,{color:e.c,width:3}))))),[_.flightPath]),a.createElement(b.RStyle,{ref:_.redCircle},a.createElement(b.RStroke,{color:"red",width:1}),a.createElement(b.RCircle,{radius:6},a.createElement(b.RFill,{color:"red"}))),a.createElement(b.RStyle,{ref:_.blueCircle},a.createElement(b.RCircle,{radius:6},a.createElement(b.RFill,{color:"blue"}))),a.createElement(E.f9,{className:"example-map",initial:{center:y,zoom:9},onPointerMove:(0,a.useCallback)((e=>{const r=x.current.source.getClosestFeatureToCoordinate(e.coordinate);if(null===r)return;const a=r.getGeometry().getClosestPoint(e.coordinate),s=new Date(1e3*a[2]);n(new S.A(a)),o(new l.A([e.coordinate,[a[0],a[1]]])),t(""+r.get("PLT")+"
    "+s.toUTCString()+""),e.map.render()}),[x])},a.createElement(E.HS,{zIndex:5,url:"https://{a-c}.tile.opentopomap.org/{z}/{x}/{y}.png",attributions:"Kartendaten: © OpenStreetMap-Mitwirkende, SRTM | Kartendarstellung: © OpenTopoMap (CC-BY-SA)"}),a.createElement(E.j9,{zIndex:10,ref:x,onAddFeature:(0,a.useCallback)((e=>{const t=e.feature.getGeometry();p.start=Math.min(p.start,t.getFirstCoordinate()[2]),p.stop=Math.max(p.stop,t.getLastCoordinate()[2]),p.duration=p.stop-p.start,m({...p})}),[p]),onPostRender:(0,a.useCallback)((e=>{const t=(0,g.r2)(e);t.setStyle(b.RStyle.getStyleStatic(_.redCircle)),r&&s&&(t.drawGeometry(r),t.drawGeometry(s))}),[r,s,_.redCircle])},a.useMemo((()=>a.createElement(a.Fragment,null,h.map(((e,t)=>a.createElement(E.Dp,{key:t,feature:(new f).readFeatures(e,{featureProjection:"EPSG:3857"})[0],style:_.flightPath.current[t]}))))),[h,_.flightPath,_.flightPath.current[0]])),a.createElement(E.j9,{zIndex:10,ref:w,style:_.blueCircle},a.useMemo((()=>a.createElement(a.Fragment,null,d.map(((e,t)=>a.createElement(E.Dp,{key:t,geometry:new S.A(e)}))))),[d]))),a.createElement("div",{className:"d-flex flex-row mb-3 align-items-center"},a.createElement("div",{className:"jumbotron py-1 px-3 m-0 me-3 w-50",dangerouslySetInnerHTML:{__html:e}}),a.createElement("div",{className:"w-50"},a.createElement("input",{type:"range",className:"range-slider range-slider--primary w-100",min:"0",max:"100",value:c,onChange:(0,a.useCallback)((e=>{const t=parseInt(e.currentTarget.value);i(t);const r=x.current.source,a=p.start+p.duration*t/100,n=[];r.forEachFeature((e=>{if(!e.get("PLT"))return;const t=e.getGeometry().getCoordinateAtM(a,!0);n.push(t)})),u(n)}),[x,p])}))))}}}]); \ No newline at end of file diff --git a/2042.bundle.js b/2042.bundle.js index 159b002f..a11a5054 100644 --- a/2042.bundle.js +++ b/2042.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2042],{2042:(n,a,s)=>{s.r(a),s.d(a,{default:()=>t});const t='import React from "react";\nimport { fromLonLat } from "ol/proj";\nimport GeoJSON from "ol/format/GeoJSON";\nimport {\n RMap,\n ROSM,\n RLayerTile,\n RLayerVector,\n RControl,\n RStyle,\n RLayerTileJSON,\n RLayerWMS,\n RLayerTileWMS,\n} from "rlayers";\nimport RLayerStadia from "rlayers/layer/RLayerStadia";\nimport "ol/ol.css";\nimport "rlayers/control/layers.css";\n\nconst layersButton = <button>&#9776;</button>;\n\nexport default function Layers(): JSX.Element {\n return (\n <div>\n <p>\n Use the layers controls in the upper right corner to switch the active\n layer\n </p>\n <RMap\n className="example-map"\n initial={{ center: fromLonLat([2.364, 48.82]), zoom: 7 }}\n >\n <RControl.RLayers element={layersButton}>\n <ROSM properties={{ label: "OpenStreetMap" }} />\n <RLayerTile\n properties={{ label: "OpenTopo" }}\n url="https://{a-c}.tile.opentopomap.org/{z}/{x}/{y}.png"\n attributions="Kartendaten: © OpenStreetMap-Mitwirkende, SRTM | Kartendarstellung: © OpenTopoMap (CC-BY-SA)"\n />\n <RLayerTile\n properties={{ label: "Transport" }}\n url="http://tile.thunderforest.com/transport/{z}/{x}/{y}.png"\n />\n <RLayerStadia\n properties={{ label: "Stadia Terrain Background" }}\n layer="stamen_terrain_background"\n />\n <RLayerTileJSON\n properties={{ label: "Mapbox TileJSON" }}\n url="https://a.tiles.mapbox.com/v3/aj.1x1-degrees.json?secure=1"\n />\n <RLayerWMS\n properties={{ label: "Magellium OSM France Schools WMS" }}\n url="https://magosm.magellium.com/geoserver/ows"\n params={{\n LAYERS: "magosm:france_schools_point",\n FORMAT: "image/jpeg",\n }}\n />\n <RLayerTileWMS\n properties={{ label: "Switzerland ArcGIS TileWMS" }}\n url="https://wms.geo.admin.ch/"\n params={{\n LAYERS: "ch.swisstopo.pixelkarte-farbe-pk1000.noscale",\n FORMAT: "image/jpeg",\n serverType: "mapserver",\n }}\n />\n </RControl.RLayers>\n {/* This one is always visible */}\n <RLayerVector\n zIndex={5}\n format={new GeoJSON({ featureProjection: "EPSG:3857" })}\n url="https://raw.githubusercontent.com/gregoiredavid/france-geojson/master/departements.geojson"\n >\n <RStyle.RStyle>\n <RStyle.RStroke color="#007bff" width={3} />\n <RStyle.RFill color="transparent" />\n </RStyle.RStyle>\n </RLayerVector>\n </RMap>\n </div>\n );\n}\n'}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2042],{2042:(n,a,s)=>{s.r(a),s.d(a,{default:()=>t});const t='import React from "react";\nimport { fromLonLat } from "ol/proj";\nimport GeoJSON from "ol/format/GeoJSON";\nimport {\n RMap,\n ROSM,\n RLayerTile,\n RLayerVector,\n RControl,\n RStyle,\n RLayerTileJSON,\n RLayerWMS,\n RLayerTileWMS,\n} from "rlayers";\nimport RLayerStadia from "rlayers/layer/RLayerStadia";\nimport "ol/ol.css";\nimport "rlayers/control/layers.css";\nimport { Feature } from "ol";\n\nconst layersButton = <button>&#9776;</button>;\n\nexport default function Layers(): JSX.Element {\n return (\n <div>\n <p>\n Use the layers controls in the upper right corner to switch the active\n layer\n </p>\n <RMap\n className="example-map"\n initial={{ center: fromLonLat([2.364, 48.82]), zoom: 7 }}\n >\n <RControl.RLayers element={layersButton}>\n <ROSM properties={{ label: "OpenStreetMap" }} />\n <RLayerTile\n properties={{ label: "OpenTopo" }}\n url="https://{a-c}.tile.opentopomap.org/{z}/{x}/{y}.png"\n attributions="Kartendaten: © OpenStreetMap-Mitwirkende, SRTM | Kartendarstellung: © OpenTopoMap (CC-BY-SA)"\n />\n <RLayerTile\n properties={{ label: "Transport" }}\n url="http://tile.thunderforest.com/transport/{z}/{x}/{y}.png"\n />\n <RLayerStadia\n properties={{ label: "Stadia Terrain Background" }}\n layer="stamen_terrain_background"\n />\n <RLayerTileJSON\n properties={{ label: "Mapbox TileJSON" }}\n url="https://a.tiles.mapbox.com/v3/aj.1x1-degrees.json?secure=1"\n />\n <RLayerWMS\n properties={{ label: "Magellium OSM France Schools WMS" }}\n url="https://magosm.magellium.com/geoserver/ows"\n params={{\n LAYERS: "magosm:france_schools_point",\n FORMAT: "image/jpeg",\n }}\n />\n <RLayerTileWMS\n properties={{ label: "Switzerland ArcGIS TileWMS" }}\n url="https://wms.geo.admin.ch/"\n params={{\n LAYERS: "ch.swisstopo.pixelkarte-farbe-pk1000.noscale",\n FORMAT: "image/jpeg",\n serverType: "mapserver",\n }}\n />\n </RControl.RLayers>\n {/* This one is always visible */}\n <RLayerVector\n zIndex={5}\n format={\n new GeoJSON({\n featureProjection: "EPSG:3857",\n featureClass: Feature,\n })\n }\n url="https://raw.githubusercontent.com/gregoiredavid/france-geojson/master/departements.geojson"\n >\n <RStyle.RStyle>\n <RStyle.RStroke color="#007bff" width={3} />\n <RStyle.RFill color="transparent" />\n </RStyle.RStyle>\n </RLayerVector>\n </RMap>\n </div>\n );\n}\n'}}]); \ No newline at end of file diff --git a/2285.bundle.js b/2285.bundle.js index 64b52381..5ae158c5 100644 --- a/2285.bundle.js +++ b/2285.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2285],{2285:(e,t,o)=>{o.r(t),o.d(t,{default:()=>s});var a=o(6540);const s=a.memo((function(){return a.createElement("div",{dangerouslySetInnerHTML:{__html:'

    rlayers - React Components for OpenLayers 6+

    logo

    License: ISC npm version Node.js CI codecov downloads

    © OpenStreetMap contributors Kartendaten: © OpenStreetMap-Mitwirkende, SRTM | Kartendarstellung: © OpenTopoMap (CC-BY-SA)

    rlayers is an opinionated set of React components for OpenLayers.

    It's design policy is:

    • Fully Typescript-typed
    • Do everything that faces the user the React way and not the OpenLayers way - onClick and onPointerEnter/onPoinerLeave handlers are typical examples
    • If it does not face the user, it does not need to be React way - internally it uses inheritance, following the OpenLayers classes, over composition
    • Simple things should be simple to do, performance optimizations should not get in the way unless needed
    • If taking shortcuts when updating the components, always err on the safe side but do provide an override method that allows to come close to the raw OpenLayers performance
    • Expose all the advanced OpenLayers features
    • Try to be as much SSR-friendly as possible (this feature is currently in POC stage, see below)
    • The current target is OpenLayers 6+
    • Avoid dependencies when built except for React and OpenLayers (the examples have some dependencies) - currently the single one is lru-cache at 8Kbytes

    Long term support of this project

    The birth of this project is related to a huge extortion in the geography community linked to a sexual harassment affair covered up by the French Judiciary. It is maintained as a free service to the geography community so that it can remain as a remainder to a number of companies - including Camptocamp, ESRI, Mapbox and Makina Corpus - that the most noble way to claim size bragging rights is to produce good software. You can safely use this framework in your projects, be assured that it will be maintained very well and for many years to come. It's companion project on the server-side is gdal-async.

    Alternatives

    <- Light-Weight --- Feature-Rich ->

    pigeon-maps - react-leaflet - rlayers

    Among the completely free and open source alternatives for creating maps with React, on a scale going from the most light-weight to the most feature-rich solution, rlayers is the right-most one.

    It offers the full power OpenLayers - dynamic reprojections, comprehensive event handlers, a very rich set of supported formats, interfaces and layer types and a very good performance for very complex maps. This comes at the price of a quite significant total bundle size.

    Installation

    npm --save install rlayers ol react react-dom\n

    Compatibility Matrix

    OpenLayers and React are peer dependencies and should be installed separately.

    React is supported from version 16.8.0.


    rlayers Unit-tested OpenLayers versions Unit-tested React versions
    1.0 (obsolete) 6.0 16.8, 16.14, 17.0.2
    1.1 (obsolete) 6.6, 6.7, 6.8, 6.9 16.8, 16.14, 17.0.2
    1.2 (obsolete) 6.6, 6.7, 6.8, 6.9 16.8, 16.14, 17.0.2
    1.3 (obsolete) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1 16.8, 16.14, 17.0.2, 18.0.0
    1.4 (obsolete) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0
    1.5 (obsolete) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0, 7.4.0 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0
    2.0 (obsolete) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0, 7.4.0, 7.5.1 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0
    2.1 (obsolete) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0, 7.4.0, 7.5.1, 8.0.0, 8.1.0 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0
    2.2 (obsolete) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0, 7.4.0, 7.5.1, 8.0.0, 8.1.0, 8.2.0 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0
    2.3 (@latest) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0, 7.4.0, 7.5.1, 8.0.0, 8.1.0, 8.2.0, 9.0.0, 9.1.0 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0, 18.3.1

    When using dynamic styles with React 18, you may get a warning in the console in debug mode: https://github.com/mmomtchev/rlayers/issues/40. You can safely ignore it as has no functional consequences - React 18, including the concurrent renderer, is fully supported.

    Usage

    rlayers is a set of reusable React components that can be nested in various ways to create map applications for the web through React composition in the true spirit of React. The components are based on a simplified model of the OpenLayers classes: for example the layers and the sources abstraction levels have been fused into one single level and the map and the view are also represented by a single component.

    In order to avoid confusion between the OpenLayers classes and the rlayers classes which sometimes have the same names - all rlayers classes are prefixed with R. If a class begins with R, it is from rlayers, otherwise it is an OpenLayers class.

    The most important element is the <RMap>. Every other element, except <RStyle>, requires a parent to function - an <RLayer> must be part of a map, an <RFeature> must be part of an <RLayerVector>, an <RControl> must also be part of a map.

    Simple step-by-step example

    This is the simple overlay example - https://mmomtchev.github.io/rlayers/#/overlays

    import React from 'react';\nimport {fromLonLat} from 'ol/proj';\nimport {Point} from 'ol/geom';\nimport 'ol/ol.css';\n\nimport {RMap, ROSM, RLayerVector, RFeature, ROverlay, RStyle} from 'rlayers';\nimport locationIcon from './svg/location.svg';\n\n// Create a map, its size is set in the CSS class example-map\n<RMap className='example-map' initial={{center: fromLonLat([2.364, 48.82]), zoom: 11}}>\n    {/* Use an OpenStreetMap background */}\n    <ROSM />\n    {/* Create a single layer for holding vector features */}\n    <RLayerVector zIndex={10}>\n        {/* Create a style for rendering the features */}\n        <RStyle.RStyle>\n            {/* Consisting of a single icon, that is slightly offset\n             * so that its center falls over the center of the feature */}\n            <RStyle.RIcon src={locationIcon} anchor={[0.5, 0.8]} />\n        </RStyle.RStyle>\n        {/* Create a single feature in the vector layer */}\n        <RFeature\n            {/* Its geometry is a point geometry over the monument */}\n            geometry={new Point(fromLonLat([2.295, 48.8737]))}\n            {/* Bind an onClick handler */}\n            onClick={(e) =>\n                {/* e.map is the underlying OpenLayers map - we call getView().fit()\n                to pan/zoom the map over the monument with a small animation */}\n                e.map.getView().fit(e.target.getGeometry().getExtent(), {\n                    duration: 250,\n                    maxZoom: 15\n                })\n            }\n        >\n            {/* The icon is an SVG image that represents the feature on the map\n            while an overlay allows us to add a normal HTML element over the feature */}\n            <ROverlay className='example-overlay'>\n                Arc de Triomphe\n                <br />\n                <em>&#11017; click to zoom</em>\n            </ROverlay>\n        </RFeature>\n    </RLayerVector>\n</RMap>\n

    Check examples/static_pages.html for a fully self-contained static HTML page using rlayers.

    You can also check the GPLed XC-DB for a larger and more complex project entirely implemented using React, Redux and rlayers.

    Contexts

    Composition works by using React Contexts. Every nested element uses the context of its nearest parent.

    The underlying OpenLayers objects can be accessed using the useOL() hook - check the Geolocation example to see how.

    Currently useOL() has an RContextType and can contain the following elements:

    • map provided by a map, every other element, except an RStyle must have a map parent
    • layer and source provided by all layers - not required for anything at the moment, but can be used to access the underlying OpenLayers objects
    • vectorlayer and vectorsource provided by vector layers only - required for <RFeature>
    • vectortilelayer provided by vector tile layers only
    • location and feature provided by a map feature - required for <ROverlay> and <RPopup>
    • style provided by a style definition - the only one which can be outside of a map

    Additionally, useRLayersComponent() allows retrieving the containing rlayers component.

    Accessing the underlying OpenLayers objects and API

    The underlying OpenLayers objects can be accessed in a number of different ways:

    • Through the context objects by using React.Context.Consumer
    • In an event handler that is a normal function and not an arrow lambda, this will contain the rlayers component and this.context will contain the context - this is an alternative to using useOL()
    • In all event handlers, OpenLayers will pass the target object in event.target and the map in event.map - the popups example uses this method
    • And finally, accessing arbitrary elements, even outside their contexts, is possible by using React references - React.RefObjects. The high performance example contains an example of this. The underlying OpenLayers objects can be accessed through the ol property of every component. Additionaly, for layer objects, the underlying OpenLayers source can be accessed through source:
      const layerRef = React.createRef() as React.RefObject<RLayerVector>;\n
      Then after rendering:
      <RLayerVector ref={layerRef} />\n
      layerRef.current.ol will contain the OpenLayers layer and layerRef.current.source will contain the source. This is the only way of accessing the object outside its context.

    Styles

    Style definitions can be placed anywhere inside the DOM and can be referenced with a React reference. rlayers includes two special types for dealing with styles:

    • RStyleRef which is an alias to React.RefObject<RStyle> is a React reference to an <RStyle> element. It can be transparently used everywhere where a classical OpenLayers StyleLike is required
    • RStyleLike is the new union type that allows for StyleLike or a RStyleRef

    A style placed inside a vector layer will be automatically applied to that vector layer.

    A style can either be static or dynamic. A static style depends only on its properties. A dynamic style is a function that takes an OpenLayers Feature object as its input and returns a Style. A dynamic style creates a new object for every rendered feature, so this must be taken into account. A simple caching mechanism is also provided, based on a user-supplied hash function. It can greatly improve performance when the majority of the features use relatively few different styles.

    You can refer to

    Classical OpenLayers StyleLike objects are supported too, but this is not the React way. Still, if you need every last bit of performance, writing an optimized OpenLayers style function is the best solution.

    Performance

    React is a wonderful framework that makes it very easy to write complex web applications without having to manually handle all the interdependencies between the various components. This is the reason why it is called React - components automatically React to changes in other components. In the true spirit of React, rlayers prefers to err on the safe side - always updating when there is a chance that the component needs updating - making it easy on the beginner who wants simple interface while still allowing the experienced engineer to achieve the performance he needs.

    When high performance is required, particular care must be taken that the component properties do not change without a reason. This is especially true when the pointermove event is used. In these cases one should avoid using anonymous objects, arrays or functions as properties.

    Take for example this:

    <RFeature\n    geometry={new Point(fromLonLat([2.295, 48.858])}\n    onClick={(e: MapBrowserEvent) => process(e.target)}\n/>\n

    This is a feature that will be re-evaluated at every frame. Its geometry appears to be a constant, but it is in fact an anonymous object that is created at every frame - even if it always holds the same value. Passing a constant is one way around this, but the true React way is using the two tools React provides: React.useMemo and React.useCallback. They memoize the value and take care to always return a reference to the same object unless one of the listed dependencies is modified.

    This is a much better performing code that won't rerender the feature component:

    <RFeature\n    geometry={React.useMemo(new Point(fromLonLat([2.295, 48.858]), [/* no deps */])}\n    onClick={React.useCallback((e: MapBrowserEvent) => process(e.target), [/* no deps */])}\n/>\n

    Anonymous objects, arrays and especially lambdas in the properties of a component are prime candidates for memoization. Sometimes, you can also memoize whole components or groups of components - for a very significant performance boost.

    Generally, if you are binding code to the pointermove event and your performance is not good enough, this is the first thing you should be looking at - which components update at every pointermove and why.

    These 3 examples run code on various high-frequency events, take a look at them:

    • Clustering runs the styling function every time the map is panned or zoomed
    • Drop a pin runs code on every pointermove that carefully avoids rerendering
    • Geo data updates components at every pointerenter/pointerleave
    • The high performance example is a complex example that runs lots of code and updates components at every pointermove

    Also, when searching for features listening on pointermove/pointerenter/pointerleave events, rlayers 2.0.0 and later, is able to eliminate very early feature layers that do not contain features listenening for those events. If your map contains a large number of features, and only a handful of these use pointermove events - try to group them in a separate layer.

    Examples

    The examples can be found here: https://mmomtchev.github.io/rlayers/

    Next.js

    When using with Next.js, you have to install next-transpile-modules:

    npm install --save next-transpile-modules\n

    And then create the following next.config.js:

    const withTranspile = require('next-transpile-modules')(['ol', 'rlayers']);\nmodule.exports = withTranspile({experimental: {esmExternals: 'loose'}});\n

    It is known to work with Next.js 10 to Next.js 13. You can check rlayers-npm-tests repository for examples for working configurations.

    Server-Side Rendering

    Server-side rendering of map components is difficult - there is still no comprehensive solution. Besides the obvious complexities of rendering on canvas outside the browser, one of the major issues is that server-side rendering runs before the browser layout flowing - and thus must work independent of layout and resolution.

    The best solution is to use a WMS-compatible server (such as Geoserver) and to serve prerendered maps over WMS - eventually replacing the initial image by a canvas.

    An intermediate solution, which does not require extensive server-side investment (such as Geoserver), but is limited to static layout(s), is to prerender one (or one per screen size) image to be used as a temporary place-holder until the map is loading. In this case, at least some devices, will get an ugly looking map for the first few seconds.

    Pushing the initial tiles is also an option:

    • when combined with a WMS-server it could deliver pixel-perfect maps with on the first HTTP request
    • without a WMS-server it could still avoid doing a large number of HTTP requests on the first load

    Currently, server-side rendering of raster layers on fixed map sizes has reached POC status and an online demo is accessible at https://rlayers-ssr.meteo.guru/. The code can be found in the ssr branch of this project. The next.js project can be found at https://github.com/mmomtchev/rlayers-ssr-demo.git. This is still not a user-friendly, install-and-run project. Take a look at pages/index.js if you want see how it is meant to be used.

    As of March 2022, SSR support is stale and I am not working on it anymore.

    Google Maps API Support

    The Google Maps API is not open and although it is now supported out-of-the-box by OpenLayers starting from version 9.0, it requires a paid subscription (with an eventual trial period). Adding Google Maps support is not possible unless someone is willing to sponsor it.

    API

    You can browse the full documentation at https://mmomtchev.github.io/rlayers/api.

    License

    ISC

    '}})}))}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2285],{2285:(e,t,o)=>{o.r(t),o.d(t,{default:()=>s});var a=o(6540);const s=a.memo((function(){return a.createElement("div",{dangerouslySetInnerHTML:{__html:'

    rlayers - React Components for OpenLayers 6+

    logo

    License: ISC npm version Node.js CI codecov downloads

    © OpenStreetMap contributors Kartendaten: © OpenStreetMap-Mitwirkende, SRTM | Kartendarstellung: © OpenTopoMap (CC-BY-SA)

    rlayers is an opinionated set of React components for OpenLayers.

    It's design policy is:

    • Fully Typescript-typed
    • Do everything that faces the user the React way and not the OpenLayers way - onClick and onPointerEnter/onPoinerLeave handlers are typical examples
    • If it does not face the user, it does not need to be React way - internally it uses inheritance, following the OpenLayers classes, over composition
    • Simple things should be simple to do, performance optimizations should not get in the way unless needed
    • If taking shortcuts when updating the components, always err on the safe side but do provide an override method that allows to come close to the raw OpenLayers performance
    • Expose all the advanced OpenLayers features
    • Try to be as much SSR-friendly as possible (this feature is currently in POC stage, see below)
    • The current target is OpenLayers 6+
    • Avoid dependencies when built except for React and OpenLayers (the examples have some dependencies) - currently the single one is lru-cache at 8Kbytes

    Long term support of this project

    The birth of this project is related to a huge extortion in the geography community linked to a sexual harassment affair covered up by the French Judiciary. It is maintained as a free service to the geography community so that it can remain as a remainder to a number of companies - including Camptocamp, ESRI, Mapbox and Makina Corpus - that the most noble way to claim size bragging rights is to produce good software. You can safely use this framework in your projects, be assured that it will be maintained very well and for many years to come. It's companion project on the server-side is gdal-async.

    Alternatives

    <- Light-Weight --- Feature-Rich ->

    pigeon-maps - react-leaflet - rlayers

    Among the completely free and open source alternatives for creating maps with React, on a scale going from the most light-weight to the most feature-rich solution, rlayers is the right-most one.

    It offers the full power OpenLayers - dynamic reprojections, comprehensive event handlers, a very rich set of supported formats, interfaces and layer types and a very good performance for very complex maps. This comes at the price of a quite significant total bundle size.

    Installation

    npm --save install rlayers ol react react-dom\n

    Compatibility Matrix

    OpenLayers and React are peer dependencies and should be installed separately.

    React is supported from version 16.8.0.


    rlayers Unit-tested OpenLayers versions Unit-tested React versions
    1.0 (obsolete) 6.0 16.8, 16.14, 17.0.2
    1.1 (obsolete) 6.6, 6.7, 6.8, 6.9 16.8, 16.14, 17.0.2
    1.2 (obsolete) 6.6, 6.7, 6.8, 6.9 16.8, 16.14, 17.0.2
    1.3 (obsolete) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1 16.8, 16.14, 17.0.2, 18.0.0
    1.4 (obsolete) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0
    1.5 (obsolete) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0, 7.4.0 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0
    2.0 (obsolete) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0, 7.4.0, 7.5.1 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0
    2.1 (obsolete) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0, 7.4.0, 7.5.1, 8.0.0, 8.1.0 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0
    2.2 (obsolete) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0, 7.4.0, 7.5.1, 8.0.0, 8.1.0, 8.2.0 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0
    2.3 (@latest) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0, 7.4.0, 7.5.1, 8.0.0, 8.1.0, 8.2.0, 9.0.0, 9.1.0 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0, 18.3.1
    3.0 (@next) 9.2.2 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0, 18.3.1

    When using dynamic styles with React 18, you may get a warning in the console in debug mode: https://github.com/mmomtchev/rlayers/issues/40. You can safely ignore it as has no functional consequences - React 18, including the concurrent renderer, is fully supported.

    Usage

    rlayers is a set of reusable React components that can be nested in various ways to create map applications for the web through React composition in the true spirit of React. The components are based on a simplified model of the OpenLayers classes: for example the layers and the sources abstraction levels have been fused into one single level and the map and the view are also represented by a single component.

    In order to avoid confusion between the OpenLayers classes and the rlayers classes which sometimes have the same names - all rlayers classes are prefixed with R. If a class begins with R, it is from rlayers, otherwise it is an OpenLayers class.

    The most important element is the <RMap>. Every other element, except <RStyle>, requires a parent to function - an <RLayer> must be part of a map, an <RFeature> must be part of an <RLayerVector>, an <RControl> must also be part of a map.

    Simple step-by-step example

    This is the simple overlay example - https://mmomtchev.github.io/rlayers/#/overlays

    import React from 'react';\nimport {fromLonLat} from 'ol/proj';\nimport {Point} from 'ol/geom';\nimport 'ol/ol.css';\n\nimport {RMap, ROSM, RLayerVector, RFeature, ROverlay, RStyle} from 'rlayers';\nimport locationIcon from './svg/location.svg';\n\n// Create a map, its size is set in the CSS class example-map\n<RMap className='example-map' initial={{center: fromLonLat([2.364, 48.82]), zoom: 11}}>\n    {/* Use an OpenStreetMap background */}\n    <ROSM />\n    {/* Create a single layer for holding vector features */}\n    <RLayerVector zIndex={10}>\n        {/* Create a style for rendering the features */}\n        <RStyle.RStyle>\n            {/* Consisting of a single icon, that is slightly offset\n             * so that its center falls over the center of the feature */}\n            <RStyle.RIcon src={locationIcon} anchor={[0.5, 0.8]} />\n        </RStyle.RStyle>\n        {/* Create a single feature in the vector layer */}\n        <RFeature\n            {/* Its geometry is a point geometry over the monument */}\n            geometry={new Point(fromLonLat([2.295, 48.8737]))}\n            {/* Bind an onClick handler */}\n            onClick={(e) =>\n                {/* e.map is the underlying OpenLayers map - we call getView().fit()\n                to pan/zoom the map over the monument with a small animation */}\n                e.map.getView().fit(e.target.getGeometry().getExtent(), {\n                    duration: 250,\n                    maxZoom: 15\n                })\n            }\n        >\n            {/* The icon is an SVG image that represents the feature on the map\n            while an overlay allows us to add a normal HTML element over the feature */}\n            <ROverlay className='example-overlay'>\n                Arc de Triomphe\n                <br />\n                <em>&#11017; click to zoom</em>\n            </ROverlay>\n        </RFeature>\n    </RLayerVector>\n</RMap>\n

    Check examples/static_pages.html for a fully self-contained static HTML page using rlayers.

    You can also check the GPLed XC-DB for a larger and more complex project entirely implemented using React, Redux and rlayers.

    Contexts

    Composition works by using React Contexts. Every nested element uses the context of its nearest parent.

    The underlying OpenLayers objects can be accessed using the useOL() hook - check the Geolocation example to see how.

    Currently useOL() has an RContextType and can contain the following elements:

    • map provided by a map, every other element, except an RStyle must have a map parent
    • layer and source provided by all layers - not required for anything at the moment, but can be used to access the underlying OpenLayers objects
    • vectorlayer and vectorsource provided by vector layers only - required for <RFeature>
    • vectortilelayer provided by vector tile layers only
    • location and feature provided by a map feature - required for <ROverlay> and <RPopup>
    • style provided by a style definition - the only one which can be outside of a map

    Additionally, useRLayersComponent() allows retrieving the containing rlayers component.

    Accessing the underlying OpenLayers objects and API

    The underlying OpenLayers objects can be accessed in a number of different ways:

    • Through the context objects by using React.Context.Consumer
    • In an event handler that is a normal function and not an arrow lambda, this will contain the rlayers component and this.context will contain the context - this is an alternative to using useOL()
    • In all event handlers, OpenLayers will pass the target object in event.target and the map in event.map - the popups example uses this method
    • And finally, accessing arbitrary elements, even outside their contexts, is possible by using React references - React.RefObjects. The high performance example contains an example of this. The underlying OpenLayers objects can be accessed through the ol property of every component. Additionaly, for layer objects, the underlying OpenLayers source can be accessed through source:
      const layerRef = React.createRef() as React.RefObject<RLayerVector>;\n
      Then after rendering:
      <RLayerVector ref={layerRef} />\n
      layerRef.current.ol will contain the OpenLayers layer and layerRef.current.source will contain the source. This is the only way of accessing the object outside its context.

    Styles

    Style definitions can be placed anywhere inside the DOM and can be referenced with a React reference. rlayers includes two special types for dealing with styles:

    • RStyleRef which is an alias to React.RefObject<RStyle> is a React reference to an <RStyle> element. It can be transparently used everywhere where a classical OpenLayers StyleLike is required
    • RStyleLike is the new union type that allows for StyleLike or a RStyleRef

    A style placed inside a vector layer will be automatically applied to that vector layer.

    A style can either be static or dynamic. A static style depends only on its properties. A dynamic style is a function that takes an OpenLayers Feature object as its input and returns a Style. A dynamic style creates a new object for every rendered feature, so this must be taken into account. A simple caching mechanism is also provided, based on a user-supplied hash function. It can greatly improve performance when the majority of the features use relatively few different styles.

    You can refer to

    Classical OpenLayers StyleLike objects are supported too, but this is not the React way. Still, if you need every last bit of performance, writing an optimized OpenLayers style function is the best solution.

    Performance

    React is a wonderful framework that makes it very easy to write complex web applications without having to manually handle all the interdependencies between the various components. This is the reason why it is called React - components automatically React to changes in other components. In the true spirit of React, rlayers prefers to err on the safe side - always updating when there is a chance that the component needs updating - making it easy on the beginner who wants simple interface while still allowing the experienced engineer to achieve the performance he needs.

    When high performance is required, particular care must be taken that the component properties do not change without a reason. This is especially true when the pointermove event is used. In these cases one should avoid using anonymous objects, arrays or functions as properties.

    Take for example this:

    <RFeature\n    geometry={new Point(fromLonLat([2.295, 48.858])}\n    onClick={(e: MapBrowserEvent) => process(e.target)}\n/>\n

    This is a feature that will be re-evaluated at every frame. Its geometry appears to be a constant, but it is in fact an anonymous object that is created at every frame - even if it always holds the same value. Passing a constant is one way around this, but the true React way is using the two tools React provides: React.useMemo and React.useCallback. They memoize the value and take care to always return a reference to the same object unless one of the listed dependencies is modified.

    This is a much better performing code that won't rerender the feature component:

    <RFeature\n    geometry={React.useMemo(new Point(fromLonLat([2.295, 48.858]), [/* no deps */])}\n    onClick={React.useCallback((e: MapBrowserEvent) => process(e.target), [/* no deps */])}\n/>\n

    Anonymous objects, arrays and especially lambdas in the properties of a component are prime candidates for memoization. Sometimes, you can also memoize whole components or groups of components - for a very significant performance boost.

    Generally, if you are binding code to the pointermove event and your performance is not good enough, this is the first thing you should be looking at - which components update at every pointermove and why.

    These 3 examples run code on various high-frequency events, take a look at them:

    • Clustering runs the styling function every time the map is panned or zoomed
    • Drop a pin runs code on every pointermove that carefully avoids rerendering
    • Geo data updates components at every pointerenter/pointerleave
    • The high performance example is a complex example that runs lots of code and updates components at every pointermove

    Also, when searching for features listening on pointermove/pointerenter/pointerleave events, rlayers 2.0.0 and later, is able to eliminate very early feature layers that do not contain features listenening for those events. If your map contains a large number of features, and only a handful of these use pointermove events - try to group them in a separate layer.

    Examples

    The examples can be found here: https://mmomtchev.github.io/rlayers/

    Next.js

    When using with Next.js, you have to install next-transpile-modules:

    npm install --save next-transpile-modules\n

    And then create the following next.config.js:

    const withTranspile = require('next-transpile-modules')(['ol', 'rlayers']);\nmodule.exports = withTranspile({experimental: {esmExternals: 'loose'}});\n

    It is known to work with Next.js 10 to Next.js 13. You can check rlayers-npm-tests repository for examples for working configurations.

    Server-Side Rendering

    Server-side rendering of map components is difficult - there is still no comprehensive solution. Besides the obvious complexities of rendering on canvas outside the browser, one of the major issues is that server-side rendering runs before the browser layout flowing - and thus must work independent of layout and resolution.

    The best solution is to use a WMS-compatible server (such as Geoserver) and to serve prerendered maps over WMS - eventually replacing the initial image by a canvas.

    An intermediate solution, which does not require extensive server-side investment (such as Geoserver), but is limited to static layout(s), is to prerender one (or one per screen size) image to be used as a temporary place-holder until the map is loading. In this case, at least some devices, will get an ugly looking map for the first few seconds.

    Pushing the initial tiles is also an option:

    • when combined with a WMS-server it could deliver pixel-perfect maps with on the first HTTP request
    • without a WMS-server it could still avoid doing a large number of HTTP requests on the first load

    Currently, server-side rendering of raster layers on fixed map sizes has reached POC status and an online demo is accessible at https://rlayers-ssr.meteo.guru/. The code can be found in the ssr branch of this project. The next.js project can be found at https://github.com/mmomtchev/rlayers-ssr-demo.git. This is still not a user-friendly, install-and-run project. Take a look at pages/index.js if you want see how it is meant to be used.

    As of March 2022, SSR support is stale and I am not working on it anymore.

    Google Maps API Support

    The Google Maps API is not open and although it is now supported out-of-the-box by OpenLayers starting from version 9.0, it requires a paid subscription (with an eventual trial period). Adding Google Maps support is not possible unless someone is willing to sponsor it.

    API

    You can browse the full documentation at https://mmomtchev.github.io/rlayers/api.

    License

    ISC

    '}})}))}}]); \ No newline at end of file diff --git a/2299.bundle.js b/2299.bundle.js index 5406df14..03fda829 100644 --- a/2299.bundle.js +++ b/2299.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2299],{2299:(e,r,n)=>{n.r(r),n.d(r,{default:()=>t});const t="import React from 'react';\nimport {fromLonLat} from 'ol/proj';\nimport GeoJSON from 'ol/format/GeoJSON';\nimport {\n RMap,\n ROSM,\n RLayerTile,\n RLayerVector,\n RControl,\n RStyle,\n RLayerTileJSON,\n RLayerWMS,\n RLayerTileWMS\n} from 'rlayers';\nimport RLayerStadia from 'rlayers/layer/RLayerStadia';\nimport 'ol/ol.css';\nimport 'rlayers/control/layers.css';\n\nconst layersButton = ;\n\nexport default function Layers(): JSX.Element {\n return (\n
    \n

    Use the layers controls in the upper right corner to switch the active layer

    \n \n \n \n \n \n \n \n \n \n \n {/* This one is always visible */}\n \n \n \n \n \n \n \n
    \n );\n}\n"}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2299],{2299:(e,r,n)=>{n.r(r),n.d(r,{default:()=>t});const t="import React from 'react';\nimport {fromLonLat} from 'ol/proj';\nimport GeoJSON from 'ol/format/GeoJSON';\nimport {\n RMap,\n ROSM,\n RLayerTile,\n RLayerVector,\n RControl,\n RStyle,\n RLayerTileJSON,\n RLayerWMS,\n RLayerTileWMS\n} from 'rlayers';\nimport RLayerStadia from 'rlayers/layer/RLayerStadia';\nimport 'ol/ol.css';\nimport 'rlayers/control/layers.css';\nimport {Feature} from 'ol';\n\nconst layersButton = ;\n\nexport default function Layers(): JSX.Element {\n return (\n
    \n

    Use the layers controls in the upper right corner to switch the active layer

    \n \n \n \n \n \n \n \n \n \n \n {/* This one is always visible */}\n \n \n \n \n \n \n \n
    \n );\n}\n"}}]); \ No newline at end of file diff --git a/2345.bundle.js b/2345.bundle.js index abed8e1a..3841ce94 100644 --- a/2345.bundle.js +++ b/2345.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2345],{2345:(n,a,s)=>{s.r(a),s.d(a,{default:()=>t});const t='import React, { useCallback, useMemo } from "react";\nimport { fromLonLat } from "ol/proj";\nimport Feature from "ol/Feature";\nimport GeoJSON from "ol/format/GeoJSON";\nimport { Geometry } from "ol/geom";\nimport "ol/ol.css";\n\nimport { RMap, RLayerVector, RStyle, RFeature, ROverlay } from "rlayers";\nimport RLayerStadia from "rlayers/layer/RLayerStadia";\n\n// These are the French internal administrative borders in GeoJSON format\nconst departements =\n "https://raw.githubusercontent.com/gregoiredavid/france-geojson/master/departements.geojson";\nconst parser = new GeoJSON({ featureProjection: "EPSG:3857" });\n// Population by French administrative division\n// https://public.opendatasoft.com/explore/dataset/population-francaise-par-departement-2018/\n// Published under Etalab Open License https://www.etalab.gouv.fr/wp-content/uploads/2018/11/open-licence.pdf\nconst inputData =\n "https://public.opendatasoft.com/api/records/1.0/search/?dataset=population-francaise-par-departement-2018&q=&rows=200";\ntype inputDataType = {\n records: { fields: { code_departement: string; population: number } }[];\n};\nconst fetchData = fetch(inputData).then(\n (raw) => raw.json() as Promise<inputDataType>\n);\nconst getData = (data: inputDataType, dep: string) =>\n data.records.find((el) => el.fields.code_departement === dep)?.fields\n .population ?? 0;\n// The default hitbox around the features is 3px wide making narrow gaps between the borders difficult to select\nRFeature.hitTolerance = 0;\n\nexport default function GeoData(): JSX.Element {\n const [data, setData] = React.useState({ records: [] } as inputDataType);\n const [current, setCurrent] = React.useState(\n null as Feature<Geometry> | null\n );\n React.useEffect(() => {\n fetchData.then((r) => setData(r));\n }, []);\n return (\n <div className="d-flex flex-row">\n <RMap\n className="example-map"\n initial={useMemo(\n () => ({ center: fromLonLat([2, 46.5]), zoom: 5.75 }),\n []\n )}\n noDefaultControls={true}\n noDefaultInteractions={true}\n >\n <RLayerStadia layer="stamen_toner" />\n\n {/* This the internal borders layer, initialized with the GeoJSON\n * useCallback is a performance optimization, it allows to always have\n * the same function object unless \'current\' changes\n * without it you will create a new function at every frame rendered */}\n <RLayerVector\n zIndex={5}\n format={parser}\n url={departements}\n onPointerEnter={useCallback((e) => setCurrent(e.target), [])}\n onPointerLeave={useCallback(\n (e) => current === e.target && setCurrent(null),\n [current]\n )}\n >\n {/* When styling each feature, compute the color from the population data\n * The function is memoized and it is replaced only once - when the population data\n * becomes available. Without memoization (useCallback) all the features will need to\n * be re-evaluated at every frame */}\n <RStyle.RStyle\n render={useCallback(\n (f) => (\n <RStyle.RFill\n color={`rgba(0, 0, ${\n getData(data, f.get("code")) / 5000\n }, 0.75)`}\n />\n ),\n [data]\n )}\n />\n </RLayerVector>\n {/* This is a layer with a single feature - current - that holds the highlighted borders\n * It is styled with the default OpenLayers style */}\n <RLayerVector zIndex={10}>\n {current ? (\n <div>\n <RFeature geometry={current.getGeometry()}>\n <ROverlay className="example-overlay" autoPosition={true}>\n Population in <strong>{current.get("nom")}</strong> in 2018 is{" "}\n <strong>{getData(data, current.get("code"))}</strong>\n </ROverlay>\n </RFeature>\n </div>\n ) : null}\n </RLayerVector>\n </RMap>\n </div>\n );\n}\n'}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2345],{2345:(n,a,s)=>{s.r(a),s.d(a,{default:()=>t});const t='import React, { useCallback, useMemo } from "react";\nimport { fromLonLat } from "ol/proj";\nimport Feature from "ol/Feature";\nimport GeoJSON from "ol/format/GeoJSON";\nimport { Geometry } from "ol/geom";\nimport "ol/ol.css";\n\nimport { RMap, RLayerVector, RStyle, RFeature, ROverlay } from "rlayers";\nimport RLayerStadia from "rlayers/layer/RLayerStadia";\n\n// These are the French internal administrative borders in GeoJSON format\nconst departements =\n "https://raw.githubusercontent.com/gregoiredavid/france-geojson/master/departements.geojson";\nconst parser = new GeoJSON({\n featureProjection: "EPSG:3857",\n featureClass: Feature,\n});\n// Population by French administrative division\n// https://public.opendatasoft.com/explore/dataset/population-francaise-par-departement-2018/\n// Published under Etalab Open License https://www.etalab.gouv.fr/wp-content/uploads/2018/11/open-licence.pdf\nconst inputData =\n "https://public.opendatasoft.com/api/records/1.0/search/?dataset=population-francaise-par-departement-2018&q=&rows=200";\ntype inputDataType = {\n records: { fields: { code_departement: string; population: number } }[];\n};\nconst fetchData = fetch(inputData).then(\n (raw) => raw.json() as Promise<inputDataType>\n);\nconst getData = (data: inputDataType, dep: string) =>\n data.records.find((el) => el.fields.code_departement === dep)?.fields\n .population ?? 0;\n// The default hitbox around the features is 3px wide making narrow gaps between the borders difficult to select\nRFeature.hitTolerance = 0;\n\nexport default function GeoData(): JSX.Element {\n const [data, setData] = React.useState({ records: [] } as inputDataType);\n const [current, setCurrent] = React.useState(\n null as Feature<Geometry> | null\n );\n React.useEffect(() => {\n fetchData.then((r) => setData(r));\n }, []);\n return (\n <div className="d-flex flex-row">\n <RMap\n className="example-map"\n initial={useMemo(\n () => ({ center: fromLonLat([2, 46.5]), zoom: 5.75 }),\n []\n )}\n noDefaultControls={true}\n noDefaultInteractions={true}\n >\n <RLayerStadia layer="stamen_toner" />\n\n {/* This the internal borders layer, initialized with the GeoJSON\n * useCallback is a performance optimization, it allows to always have\n * the same function object unless \'current\' changes\n * without it you will create a new function at every frame rendered */}\n <RLayerVector\n zIndex={5}\n format={parser}\n url={departements}\n onPointerEnter={useCallback((e) => setCurrent(e.target), [])}\n onPointerLeave={useCallback(\n (e) => current === e.target && setCurrent(null),\n [current]\n )}\n >\n {/* When styling each feature, compute the color from the population data\n * The function is memoized and it is replaced only once - when the population data\n * becomes available. Without memoization (useCallback) all the features will need to\n * be re-evaluated at every frame */}\n <RStyle.RStyle\n render={useCallback(\n (f) => (\n <RStyle.RFill\n color={`rgba(0, 0, ${\n getData(data, f.get("code")) / 5000\n }, 0.75)`}\n />\n ),\n [data]\n )}\n />\n </RLayerVector>\n {/* This is a layer with a single feature - current - that holds the highlighted borders\n * It is styled with the default OpenLayers style */}\n <RLayerVector zIndex={10}>\n {current ? (\n <div>\n <RFeature geometry={current.getGeometry()}>\n <ROverlay className="example-overlay" autoPosition={true}>\n Population in <strong>{current.get("nom")}</strong> in 2018 is{" "}\n <strong>{getData(data, current.get("code"))}</strong>\n </ROverlay>\n </RFeature>\n </div>\n ) : null}\n </RLayerVector>\n </RMap>\n </div>\n );\n}\n'}}]); \ No newline at end of file diff --git a/2445.bundle.js b/2445.bundle.js index b78c6849..9675312d 100644 --- a/2445.bundle.js +++ b/2445.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2445],{2445:(n,s,a)=>{a.r(s),a.d(s,{default:()=>t});const t='/* This example reimplements the excellent OpenLayers example by @twpayne\n * from https://openlayers.org/en/latest/examples/igc.html\n * It illustrates various techniques that can be used to greatly improve performance\n *\n * React makes creating complex web applications very easy\n * It also makes very easy writing terribly inefficient code\n * You can get away with it when your DOM is not too complex\n * But when dealing with a canvas-drawn map, every care must be\n * taken to avoid unnecessary re-rendering\n */\n\nimport React, { useCallback } from "react";\nimport { fromLonLat } from "ol/proj";\nimport IGC from "ol/format/IGC";\nimport { getVectorContext } from "ol/render";\nimport { Geometry, LineString, Point } from "ol/geom";\nimport { Coordinate } from "ol/coordinate";\n\nimport {\n RMap,\n RLayerTile,\n RLayerVector,\n RFeature,\n RenderEvent,\n MapBrowserEvent,\n VectorSourceEvent,\n} from "rlayers";\nimport { RStyle, RStroke, RFill, RCircle, useRStyle } from "rlayers/style";\nimport "ol/ol.css";\n\n// This won\'t work in CodePen\nimport ClementLatour from "!!file-loader!./data/igc/Clement-Latour.igc";\nimport DamienDeBaenst from "!!file-loader!./data/igc/Damien-de-Baenst.igc";\nimport SylvainDhonneur from "!!file-loader!./data/igc/Sylvain-Dhonneur.igc";\nimport TomPayne from "!!file-loader!./data/igc/Tom-Payne.igc";\nimport UlrichPrinz from "!!file-loader!./data/igc/Ulrich-Prinz.igc";\nimport { OLFeatureClass } from "rlayers/context";\n\ntype InputFormEventType = React.FormEvent<HTMLInputElement>;\n\nconst igcsDesc = [\n { c: "rgba(0, 0, 250, 0.7)", i: ClementLatour },\n { c: "rgba(0, 50, 200, 0.7)", i: DamienDeBaenst },\n { c: "rgba(0, 100, 150, 0.7)", i: SylvainDhonneur },\n { c: "rgba(0, 150, 200, 0.7)", i: TomPayne },\n { c: "rgba(0, 200, 50, 0.7)", i: UlrichPrinz },\n];\n\n// A constant avoids re-rendering of the component\n// a property initialized with an anonymous object is not constant\n// it will recreate a new instance at every evaluation\nconst origin = fromLonLat([6, 45.7]);\n\n// This part is re-rendered on every pointermove\nexport default function IGCComp(): JSX.Element {\n const [time, setTime] = React.useState("");\n const [point, setPoint] = React.useState<Point>(null);\n const [line, setLine] = React.useState<LineString>(null);\n const [slider, setSlider] = React.useState(0);\n const [highlights, setHighlights] = React.useState<Coordinate[]>([]);\n const [flight, setFlight] = React.useState({\n start: Infinity,\n stop: -Infinity,\n duration: 0,\n });\n const [igcs, setIgcs] = React.useState(() => {\n Promise.all(igcsDesc.map((i) => fetch(i.i).then((r) => r.text()))).then(\n (r) => setIgcs(r)\n );\n return [];\n });\n\n const styles = {\n redCircle: useRStyle(),\n blueCircle: useRStyle(),\n // This is a technique for an array of React.RefObjects\n // It is ugly but it works\n flightPath: React.useRef<RStyle[]>([]),\n };\n\n // createRef instead of useRef here will severely impact performance\n const igcVectorLayer = React.useRef<RLayerVector>();\n const highlightVectorLayer = React.useRef<RLayerVector>();\n\n return (\n <React.Fragment>\n {React.useMemo(\n // This is not a dynamic RStyle, these are 5 static RStyle\'s\n // Thus the useMemo\n () =>\n igcsDesc.map((igc, idx) => (\n <RStyle\n key={idx}\n ref={(el) => (styles.flightPath.current[idx] = el)}\n >\n <RStroke color={igc.c} width={3} />\n </RStyle>\n )),\n [styles.flightPath]\n )}\n <RStyle ref={styles.redCircle}>\n <RStroke color="red" width={1} />\n <RCircle radius={6}>\n <RFill color="red" />\n </RCircle>\n </RStyle>\n <RStyle ref={styles.blueCircle}>\n <RCircle radius={6}>\n <RFill color="blue" />\n </RCircle>\n </RStyle>\n <RMap\n className="example-map"\n initial={{ center: origin, zoom: 9 }}\n onPointerMove={useCallback(\n (e: MapBrowserEvent<UIEvent>) => {\n // This useCallback is very important -> without it\n // onPointerMove will be a new anonymous function on every render\n const source = igcVectorLayer.current.source;\n const feature = source.getClosestFeatureToCoordinate(e.coordinate);\n // Did the user move the mouse before the flight paths were loaded?\n if (feature === null) return;\n const point = feature.getGeometry().getClosestPoint(e.coordinate);\n const date = new Date(point[2] * 1000);\n setPoint(new Point(point));\n setLine(new LineString([e.coordinate, [point[0], point[1]]]));\n setTime(\n "<strong>" +\n feature.get("PLT") +\n "</strong><br><em>" +\n date.toUTCString() +\n "</em>"\n );\n e.map.render();\n },\n [igcVectorLayer]\n )}\n >\n <RLayerTile\n zIndex={5}\n url="https://{a-c}.tile.opentopomap.org/{z}/{x}/{y}.png"\n attributions="Kartendaten: © OpenStreetMap-Mitwirkende, SRTM | Kartendarstellung: © OpenTopoMap (CC-BY-SA)"\n />\n {\n // This layer contains the flight paths, we install an `onAddFeature` handler\n // to receive all features as their loaded to do additional processing\n }\n <RLayerVector\n zIndex={10}\n ref={igcVectorLayer}\n onAddFeature={useCallback(\n // This useCallback transforms this function to a constant value\n // None of its dependencies change after initialization\n (e: VectorSourceEvent<OLFeatureClass>) => {\n const geometry = e.feature.getGeometry() as LineString;\n flight.start = Math.min(\n flight.start,\n geometry.getFirstCoordinate()[2]\n );\n flight.stop = Math.max(\n flight.stop,\n geometry.getLastCoordinate()[2]\n );\n flight.duration = flight.stop - flight.start;\n setFlight({ ...flight });\n },\n [flight]\n )}\n onPostRender={useCallback(\n // This useCallback is less efficient than the previous one\n // as it depends on the state\n // LayerVector is re-rendered every time point/line change\n (e: RenderEvent) => {\n const vectorContext = getVectorContext(e);\n vectorContext.setStyle(RStyle.getStyleStatic(styles.redCircle));\n if (point && line) {\n vectorContext.drawGeometry(point);\n vectorContext.drawGeometry(line);\n }\n },\n [point, line, styles.redCircle]\n )}\n >\n {React.useMemo(\n () => (\n // This component appears dynamic to React because of the map but it is in fact constant\n // useMemo will render it truly constant\n <React.Fragment>\n {igcs.map((igc, idx) => (\n <RFeature\n key={idx}\n feature={\n new IGC().readFeatures(igc, {\n featureProjection: "EPSG:3857",\n })[0]\n }\n style={styles.flightPath.current[idx]}\n />\n ))}\n </React.Fragment>\n ),\n // The array trick renders it impossible for React to track the useMemo dependencies\n // -> we do it manually\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [igcs, styles.flightPath, styles.flightPath.current[0]]\n )}\n </RLayerVector>\n {\n // This layer contains the blue circle (the highlighted section)\n }\n <RLayerVector\n zIndex={10}\n ref={highlightVectorLayer}\n style={styles.blueCircle}\n >\n {React.useMemo(\n () => (\n // This component appears dynamic to React because of the map but it is in fact constant\n // useMemo will render it truly constant\n <React.Fragment>\n {highlights.map((coords, i) => (\n <RFeature key={i} geometry={new Point(coords)} />\n ))}\n </React.Fragment>\n ),\n [highlights]\n )}\n </RLayerVector>\n </RMap>\n <div className="d-flex flex-row mb-3 align-items-center">\n <div\n className="jumbotron py-1 px-3 m-0 me-3 w-50"\n dangerouslySetInnerHTML={{ __html: time }}\n />\n <div className="w-50">\n <input\n type="range"\n className="range-slider range-slider--primary w-100"\n min="0"\n max="100"\n value={slider}\n onChange={useCallback(\n // This useCallback transforms this function to a constant value\n // None of its dependencies change after initialization\n (e: InputFormEventType) => {\n const value = parseInt(e.currentTarget.value);\n setSlider(value);\n const source = igcVectorLayer.current.source;\n const m = flight.start + (flight.duration * value) / 100;\n const newHighlights = [];\n source.forEachFeature((feature) => {\n if (!feature.get("PLT")) return;\n const geometry = feature.getGeometry() as LineString;\n const coords = geometry.getCoordinateAtM(m, true);\n newHighlights.push(coords);\n });\n setHighlights(newHighlights);\n },\n [igcVectorLayer, flight]\n )}\n />\n </div>\n </div>\n </React.Fragment>\n );\n}\n'}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2445],{2445:(n,s,a)=>{a.r(s),a.d(s,{default:()=>t});const t='/* This example reimplements the excellent OpenLayers example by @twpayne\n * from https://openlayers.org/en/latest/examples/igc.html\n * It illustrates various techniques that can be used to greatly improve performance\n *\n * React makes creating complex web applications very easy\n * It also makes very easy writing terribly inefficient code\n * You can get away with it when your DOM is not too complex\n * But when dealing with a canvas-drawn map, every care must be\n * taken to avoid unnecessary re-rendering\n */\n\nimport React, { useCallback } from "react";\nimport { fromLonLat } from "ol/proj";\nimport IGC from "ol/format/IGC";\nimport { getVectorContext } from "ol/render";\nimport { Geometry, LineString, Point } from "ol/geom";\nimport { Coordinate } from "ol/coordinate";\n\nimport {\n RMap,\n RLayerTile,\n RLayerVector,\n RFeature,\n RenderEvent,\n MapBrowserEvent,\n VectorSourceEvent,\n} from "rlayers";\nimport { RStyle, RStroke, RFill, RCircle, useRStyle } from "rlayers/style";\nimport "ol/ol.css";\n\n// This won\'t work in CodePen\nimport ClementLatour from "!!file-loader!./data/igc/Clement-Latour.igc";\nimport DamienDeBaenst from "!!file-loader!./data/igc/Damien-de-Baenst.igc";\nimport SylvainDhonneur from "!!file-loader!./data/igc/Sylvain-Dhonneur.igc";\nimport TomPayne from "!!file-loader!./data/igc/Tom-Payne.igc";\nimport UlrichPrinz from "!!file-loader!./data/igc/Ulrich-Prinz.igc";\n\ntype InputFormEventType = React.FormEvent<HTMLInputElement>;\n\nconst igcsDesc = [\n { c: "rgba(0, 0, 250, 0.7)", i: ClementLatour },\n { c: "rgba(0, 50, 200, 0.7)", i: DamienDeBaenst },\n { c: "rgba(0, 100, 150, 0.7)", i: SylvainDhonneur },\n { c: "rgba(0, 150, 200, 0.7)", i: TomPayne },\n { c: "rgba(0, 200, 50, 0.7)", i: UlrichPrinz },\n];\n\n// A constant avoids re-rendering of the component\n// a property initialized with an anonymous object is not constant\n// it will recreate a new instance at every evaluation\nconst origin = fromLonLat([6, 45.7]);\n\n// This part is re-rendered on every pointermove\nexport default function IGCComp(): JSX.Element {\n const [time, setTime] = React.useState("");\n const [point, setPoint] = React.useState<Point>(null);\n const [line, setLine] = React.useState<LineString>(null);\n const [slider, setSlider] = React.useState(0);\n const [highlights, setHighlights] = React.useState<Coordinate[]>([]);\n const [flight, setFlight] = React.useState({\n start: Infinity,\n stop: -Infinity,\n duration: 0,\n });\n const [igcs, setIgcs] = React.useState(() => {\n Promise.all(igcsDesc.map((i) => fetch(i.i).then((r) => r.text()))).then(\n (r) => setIgcs(r)\n );\n return [];\n });\n\n const styles = {\n redCircle: useRStyle(),\n blueCircle: useRStyle(),\n // This is a technique for an array of React.RefObjects\n // It is ugly but it works\n flightPath: React.useRef<RStyle[]>([]),\n };\n\n // createRef instead of useRef here will severely impact performance\n const igcVectorLayer = React.useRef<RLayerVector>();\n const highlightVectorLayer = React.useRef<RLayerVector>();\n\n return (\n <React.Fragment>\n {React.useMemo(\n // This is not a dynamic RStyle, these are 5 static RStyle\'s\n // Thus the useMemo\n () =>\n igcsDesc.map((igc, idx) => (\n <RStyle\n key={idx}\n ref={(el) => (styles.flightPath.current[idx] = el)}\n >\n <RStroke color={igc.c} width={3} />\n </RStyle>\n )),\n [styles.flightPath]\n )}\n <RStyle ref={styles.redCircle}>\n <RStroke color="red" width={1} />\n <RCircle radius={6}>\n <RFill color="red" />\n </RCircle>\n </RStyle>\n <RStyle ref={styles.blueCircle}>\n <RCircle radius={6}>\n <RFill color="blue" />\n </RCircle>\n </RStyle>\n <RMap\n className="example-map"\n initial={{ center: origin, zoom: 9 }}\n onPointerMove={useCallback(\n (e: MapBrowserEvent<UIEvent>) => {\n // This useCallback is very important -> without it\n // onPointerMove will be a new anonymous function on every render\n const source = igcVectorLayer.current.source;\n const feature = source.getClosestFeatureToCoordinate(e.coordinate);\n // Did the user move the mouse before the flight paths were loaded?\n if (feature === null) return;\n const point = feature.getGeometry().getClosestPoint(e.coordinate);\n const date = new Date(point[2] * 1000);\n setPoint(new Point(point));\n setLine(new LineString([e.coordinate, [point[0], point[1]]]));\n setTime(\n "<strong>" +\n feature.get("PLT") +\n "</strong><br><em>" +\n date.toUTCString() +\n "</em>"\n );\n e.map.render();\n },\n [igcVectorLayer]\n )}\n >\n <RLayerTile\n zIndex={5}\n url="https://{a-c}.tile.opentopomap.org/{z}/{x}/{y}.png"\n attributions="Kartendaten: © OpenStreetMap-Mitwirkende, SRTM | Kartendarstellung: © OpenTopoMap (CC-BY-SA)"\n />\n {\n // This layer contains the flight paths, we install an `onAddFeature` handler\n // to receive all features as their loaded to do additional processing\n }\n <RLayerVector\n zIndex={10}\n ref={igcVectorLayer}\n onAddFeature={useCallback(\n // This useCallback transforms this function to a constant value\n // None of its dependencies change after initialization\n (e) => {\n const geometry = e.feature.getGeometry() as LineString;\n flight.start = Math.min(\n flight.start,\n geometry.getFirstCoordinate()[2]\n );\n flight.stop = Math.max(\n flight.stop,\n geometry.getLastCoordinate()[2]\n );\n flight.duration = flight.stop - flight.start;\n setFlight({ ...flight });\n },\n [flight]\n )}\n onPostRender={useCallback(\n // This useCallback is less efficient than the previous one\n // as it depends on the state\n // LayerVector is re-rendered every time point/line change\n (e: RenderEvent) => {\n const vectorContext = getVectorContext(e);\n vectorContext.setStyle(RStyle.getStyleStatic(styles.redCircle));\n if (point && line) {\n vectorContext.drawGeometry(point);\n vectorContext.drawGeometry(line);\n }\n },\n [point, line, styles.redCircle]\n )}\n >\n {React.useMemo(\n () => (\n // This component appears dynamic to React because of the map but it is in fact constant\n // useMemo will render it truly constant\n <React.Fragment>\n {igcs.map((igc, idx) => (\n <RFeature\n key={idx}\n feature={\n new IGC().readFeatures(igc, {\n featureProjection: "EPSG:3857",\n })[0]\n }\n style={styles.flightPath.current[idx]}\n />\n ))}\n </React.Fragment>\n ),\n // The array trick renders it impossible for React to track the useMemo dependencies\n // -> we do it manually\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [igcs, styles.flightPath, styles.flightPath.current[0]]\n )}\n </RLayerVector>\n {\n // This layer contains the blue circle (the highlighted section)\n }\n <RLayerVector\n zIndex={10}\n ref={highlightVectorLayer}\n style={styles.blueCircle}\n >\n {React.useMemo(\n () => (\n // This component appears dynamic to React because of the map but it is in fact constant\n // useMemo will render it truly constant\n <React.Fragment>\n {highlights.map((coords, i) => (\n <RFeature key={i} geometry={new Point(coords)} />\n ))}\n </React.Fragment>\n ),\n [highlights]\n )}\n </RLayerVector>\n </RMap>\n <div className="d-flex flex-row mb-3 align-items-center">\n <div\n className="jumbotron py-1 px-3 m-0 me-3 w-50"\n dangerouslySetInnerHTML={{ __html: time }}\n />\n <div className="w-50">\n <input\n type="range"\n className="range-slider range-slider--primary w-100"\n min="0"\n max="100"\n value={slider}\n onChange={useCallback(\n // This useCallback transforms this function to a constant value\n // None of its dependencies change after initialization\n (e: InputFormEventType) => {\n const value = parseInt(e.currentTarget.value);\n setSlider(value);\n const source = igcVectorLayer.current.source;\n const m = flight.start + (flight.duration * value) / 100;\n const newHighlights = [];\n source.forEachFeature((feature) => {\n if (!feature.get("PLT")) return;\n const geometry = feature.getGeometry() as LineString;\n const coords = geometry.getCoordinateAtM(m, true);\n newHighlights.push(coords);\n });\n setHighlights(newHighlights);\n },\n [igcVectorLayer, flight]\n )}\n />\n </div>\n </div>\n </React.Fragment>\n );\n}\n'}}]); \ No newline at end of file diff --git a/2729.bundle.js b/2729.bundle.js index a9e05084..58569967 100644 --- a/2729.bundle.js +++ b/2729.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2729],{6308:(e,t,a)=>{a.d(t,{A:()=>n});const n=a.p+"32ba7744565a0c818ef0e2e35126abbb.geojson"},2729:(e,t,a)=>{a.r(t),a.d(t,{default:()=>h});var n=a(6540),o=a(3407),r=a(1365),s=a(915),i=(a(5045),a(7240)),l=a(5111),c=a(2381),m=a(6308);const u=new r.A({featureProjection:"EPSG:3857"}),p=e=>"rgba("+[255,153,0,Math.min(.8,.4+Math.log(e/10)/20)].join()+")",g=e=>Math.round(5*(parseFloat(e.get("mag"))-2.5)),d=(e,t)=>{const a=(0,s.S5)();for(const t of e)(0,s.X$)(a,t.getGeometry().getExtent());return Math.round(.25*((0,s.RG)(a)+(0,s.Oq)(a)))/t};function h(){const[e,t]=n.useState(20),[a,r]=n.useState("Click a cluster for details"),s=n.useRef();return n.createElement(n.Fragment,null,n.createElement(i.f9,{className:"example-map",initial:{center:(0,o.Rb)([0,0]),zoom:1}},n.createElement(c.A,{layer:"stamen_toner"}),n.createElement(i.od,{ref:s,distance:e,format:u,url:m.A,onClick:n.useCallback((e=>{var t;const a=null!==(t=e.target.get("features"))&&void 0!==t?t:[];r(`${a.length} earthquakes in this location, magnitudes are ${a.map((e=>e.get("mag"))).join(", ")}`)}),[])},n.createElement(l.RStyle,{cacheSize:1024,cacheId:(0,n.useCallback)(((e,t)=>e.get("features").length>1?"#"+d(e.get("features"),t):"$"+g(e.get("features")[0])),[]),render:(0,n.useCallback)(((e,t)=>{const a=e.get("features").length;if(a>1){const o=d(e.get("features"),t);return n.createElement(n.Fragment,null,n.createElement(l.RCircle,{radius:o},n.createElement(l.RFill,{color:p(a)})),n.createElement(l.RText,{text:a.toString()},n.createElement(l.RFill,{color:"#fff"}),n.createElement(l.RStroke,{color:"rgba(0, 0, 0, 0.6)",width:3})))}const o=e.get("features")[0];return n.createElement(l.RRegularShape,{radius1:g(o),radius2:3,points:5,angle:Math.PI},n.createElement(l.RFill,{color:"rgba(255, 153, 0, 0.8)"}),n.createElement(l.RStroke,{color:"rgba(255, 204, 0, 0.2)",width:1}))}),[])}))),n.createElement("div",{className:"my-3 w-100"},n.createElement("label",{htmlFor:"distance"},"Clustering distance"),n.createElement("div",{className:"w-100"},n.createElement("input",{type:"range",className:"range-slider range-slider--primary w-100",min:"5",max:"50",id:"distance",value:e,onChange:(0,n.useCallback)((e=>t(parseInt(e.currentTarget.value))),[])}))),n.createElement("div",null,a))}},2381:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(945),o=a(5042),r=a(2662);class s extends r.A{constructor(e,t){var a;super(e,t),this.source=new o.A({layer:this.props.layer,apiKey:this.props.apiKey,retina:null!==(a=this.props.retina)&&void 0!==a&&a}),this.ol=new n.A({source:this.source}),this.eventSources=[this.ol,this.source]}}},5042:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(702),o=a(7896);const r={stamen_terrain:{extension:"png",opaque:!0},stamen_terrain_background:{extension:"png",opaque:!0},stamen_terrain_labels:{extension:"png",opaque:!1},stamen_terrain_lines:{extension:"png",opaque:!1},stamen_toner_background:{extension:"png",opaque:!0},stamen_toner:{extension:"png",opaque:!0},stamen_toner_labels:{extension:"png",opaque:!1},stamen_toner_lines:{extension:"png",opaque:!1},stamen_toner_lite:{extension:"png",opaque:!0},stamen_watercolor:{extension:"jpg",opaque:!0},alidade_smooth:{extension:"png",opaque:!0},alidade_smooth_dark:{extension:"png",opaque:!0},alidade_satellite:{extension:"png",opaque:!0},outdoors:{extension:"png",opaque:!0},osm_bright:{extension:"png",opaque:!0}},s={stamen_terrain:{minZoom:0,maxZoom:18,retina:!0},stamen_toner:{minZoom:0,maxZoom:20,retina:!0},stamen_watercolor:{minZoom:1,maxZoom:18,retina:!1}};class i extends n.A{constructor(e){const t=e.layer.indexOf("-"),a=-1==t?e.layer:e.layer.slice(0,t),n=s[a]||{minZoom:0,maxZoom:20,retina:!0},i=r[e.layer],l=e.apiKey?"?api_key="+e.apiKey:"",c=n.retina&&e.retina?"@2x":"",m=void 0!==e.url?e.url:"https://tiles.stadiamaps.com/tiles/"+e.layer+"/{z}/{x}/{y}"+c+"."+i.extension+l,u=['© Stadia Maps','© OpenMapTiles',o.o];e.layer.startsWith("stamen_")&&u.splice(1,0,'© Stamen Design'),super({attributions:u,cacheSize:e.cacheSize,crossOrigin:"anonymous",interpolate:e.interpolate,maxZoom:void 0!==e.maxZoom?e.maxZoom:n.maxZoom,minZoom:void 0!==e.minZoom?e.minZoom:n.minZoom,opaque:i.opaque,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:m,tilePixelRatio:c?2:1,wrapX:e.wrapX,zDirection:e.zDirection})}}const l=i}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2729],{6308:(e,t,a)=>{a.d(t,{A:()=>n});const n=a.p+"32ba7744565a0c818ef0e2e35126abbb.geojson"},2729:(e,t,a)=>{a.r(t),a.d(t,{default:()=>x});var n=a(6540),o=a(3407),r=a(1365),s=a(915),i=(a(5045),a(7240)),l=a(5111),c=a(2381),m=a(6308),u=a(6717);const p=new r.A({featureProjection:"EPSG:3857",featureClass:u.A}),g=e=>"rgba("+[255,153,0,Math.min(.8,.4+Math.log(e/10)/20)].join()+")",d=e=>Math.round(5*(parseFloat(e.get("mag"))-2.5)),h=(e,t)=>{const a=(0,s.S5)();for(const t of e)(0,s.X$)(a,t.getGeometry().getExtent());return Math.round(.25*((0,s.RG)(a)+(0,s.Oq)(a)))/t};function x(){const[e,t]=n.useState(20),[a,r]=n.useState("Click a cluster for details"),s=n.useRef();return n.createElement(n.Fragment,null,n.createElement(i.f9,{className:"example-map",initial:{center:(0,o.Rb)([0,0]),zoom:1}},n.createElement(c.A,{layer:"stamen_toner"}),n.createElement(i.od,{ref:s,distance:e,format:p,url:m.A,onClick:n.useCallback((e=>{var t;const a=null!==(t=e.target.get("features"))&&void 0!==t?t:[];r(`${a.length} earthquakes in this location, magnitudes are ${a.map((e=>e.get("mag"))).join(", ")}`)}),[])},n.createElement(l.RStyle,{cacheSize:1024,cacheId:(0,n.useCallback)(((e,t)=>e.get("features").length>1?"#"+h(e.get("features"),t):"$"+d(e.get("features")[0])),[]),render:(0,n.useCallback)(((e,t)=>{const a=e.get("features").length;if(a>1){const o=h(e.get("features"),t);return n.createElement(n.Fragment,null,n.createElement(l.RCircle,{radius:o},n.createElement(l.RFill,{color:g(a)})),n.createElement(l.RText,{text:a.toString()},n.createElement(l.RFill,{color:"#fff"}),n.createElement(l.RStroke,{color:"rgba(0, 0, 0, 0.6)",width:3})))}const o=e.get("features")[0];return n.createElement(l.RRegularShape,{radius:d(o),radius2:3,points:5,angle:Math.PI},n.createElement(l.RFill,{color:"rgba(255, 153, 0, 0.8)"}),n.createElement(l.RStroke,{color:"rgba(255, 204, 0, 0.2)",width:1}))}),[])}))),n.createElement("div",{className:"my-3 w-100"},n.createElement("label",{htmlFor:"distance"},"Clustering distance"),n.createElement("div",{className:"w-100"},n.createElement("input",{type:"range",className:"range-slider range-slider--primary w-100",min:"5",max:"50",id:"distance",value:e,onChange:(0,n.useCallback)((e=>t(parseInt(e.currentTarget.value))),[])}))),n.createElement("div",null,a))}},2381:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(945),o=a(5042),r=a(2662);class s extends r.A{constructor(e,t){var a;super(e,t),this.source=new o.A({layer:this.props.layer,apiKey:this.props.apiKey,retina:null!==(a=this.props.retina)&&void 0!==a&&a}),this.ol=new n.A({source:this.source}),this.eventSources=[this.ol,this.source]}}},5042:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(702),o=a(7896);const r={stamen_terrain:{extension:"png",opaque:!0},stamen_terrain_background:{extension:"png",opaque:!0},stamen_terrain_labels:{extension:"png",opaque:!1},stamen_terrain_lines:{extension:"png",opaque:!1},stamen_toner_background:{extension:"png",opaque:!0},stamen_toner:{extension:"png",opaque:!0},stamen_toner_labels:{extension:"png",opaque:!1},stamen_toner_lines:{extension:"png",opaque:!1},stamen_toner_lite:{extension:"png",opaque:!0},stamen_watercolor:{extension:"jpg",opaque:!0},alidade_smooth:{extension:"png",opaque:!0},alidade_smooth_dark:{extension:"png",opaque:!0},alidade_satellite:{extension:"png",opaque:!0},outdoors:{extension:"png",opaque:!0},osm_bright:{extension:"png",opaque:!0}},s={stamen_terrain:{minZoom:0,maxZoom:18,retina:!0},stamen_toner:{minZoom:0,maxZoom:20,retina:!0},stamen_watercolor:{minZoom:1,maxZoom:18,retina:!1}};class i extends n.A{constructor(e){const t=e.layer.indexOf("-"),a=-1==t?e.layer:e.layer.slice(0,t),n=s[a]||{minZoom:0,maxZoom:20,retina:!0},i=r[e.layer],l=e.apiKey?"?api_key="+e.apiKey:"",c=n.retina&&e.retina?"@2x":"",m=void 0!==e.url?e.url:"https://tiles.stadiamaps.com/tiles/"+e.layer+"/{z}/{x}/{y}"+c+"."+i.extension+l,u=['© Stadia Maps','© OpenMapTiles',o.o];e.layer.startsWith("stamen_")&&u.splice(1,0,'© Stamen Design'),super({attributions:u,cacheSize:e.cacheSize,crossOrigin:"anonymous",interpolate:e.interpolate,maxZoom:void 0!==e.maxZoom?e.maxZoom:n.maxZoom,minZoom:void 0!==e.minZoom?e.minZoom:n.minZoom,opaque:i.opaque,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:m,tilePixelRatio:c?2:1,wrapX:e.wrapX,zDirection:e.zDirection})}}const l=i}}]); \ No newline at end of file diff --git a/2836.bundle.js b/2836.bundle.js index cd3aeebd..61826544 100644 --- a/2836.bundle.js +++ b/2836.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2836],{2836:(e,t,n)=>{n.r(t),n.d(t,{default:()=>u});var o=n(6540),a=n(3407),r=n(1365),s=(n(5045),n(7240)),i=n(2381);const l="https://raw.githubusercontent.com/gregoiredavid/france-geojson/master/departements.geojson",m=new r.A({featureProjection:"EPSG:3857"}),p=fetch("https://public.opendatasoft.com/api/records/1.0/search/?dataset=population-francaise-par-departement-2018&q=&rows=200").then((e=>e.json())),c=(e,t)=>{var n,o;return null!==(o=null===(n=e.records.find((e=>e.fields.code_departement===t)))||void 0===n?void 0:n.fields.population)&&void 0!==o?o:0};function u(){const[e,t]=o.useState({records:[]}),[n,r]=o.useState(null);return o.useEffect((()=>{p.then((e=>t(e)))}),[]),o.createElement("div",{className:"d-flex flex-row"},o.createElement(s.f9,{className:"example-map",initial:(0,o.useMemo)((()=>({center:(0,a.Rb)([2,46.5]),zoom:5.75})),[]),noDefaultControls:!0,noDefaultInteractions:!0},o.createElement(i.A,{layer:"stamen_toner"}),o.createElement(s.j9,{zIndex:5,format:m,url:l,onPointerEnter:(0,o.useCallback)((e=>r(e.target)),[]),onPointerLeave:(0,o.useCallback)((e=>n===e.target&&r(null)),[n])},o.createElement(s.cq.RStyle,{render:(0,o.useCallback)((t=>o.createElement(s.cq.RFill,{color:`rgba(0, 0, ${c(e,t.get("code"))/5e3}, 0.75)`})),[e])})),o.createElement(s.j9,{zIndex:10},n?o.createElement("div",null,o.createElement(s.Dp,{geometry:n.getGeometry()},o.createElement(s.Rv,{className:"example-overlay",autoPosition:!0},"Population in ",o.createElement("strong",null,n.get("nom"))," in 2018 is"," ",o.createElement("strong",null,c(e,n.get("code")))))):null)))}s.Dp.hitTolerance=0},2381:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(945),a=n(5042),r=n(2662);class s extends r.A{constructor(e,t){var n;super(e,t),this.source=new a.A({layer:this.props.layer,apiKey:this.props.apiKey,retina:null!==(n=this.props.retina)&&void 0!==n&&n}),this.ol=new o.A({source:this.source}),this.eventSources=[this.ol,this.source]}}},5042:(e,t,n)=>{n.d(t,{A:()=>l});var o=n(702),a=n(7896);const r={stamen_terrain:{extension:"png",opaque:!0},stamen_terrain_background:{extension:"png",opaque:!0},stamen_terrain_labels:{extension:"png",opaque:!1},stamen_terrain_lines:{extension:"png",opaque:!1},stamen_toner_background:{extension:"png",opaque:!0},stamen_toner:{extension:"png",opaque:!0},stamen_toner_labels:{extension:"png",opaque:!1},stamen_toner_lines:{extension:"png",opaque:!1},stamen_toner_lite:{extension:"png",opaque:!0},stamen_watercolor:{extension:"jpg",opaque:!0},alidade_smooth:{extension:"png",opaque:!0},alidade_smooth_dark:{extension:"png",opaque:!0},alidade_satellite:{extension:"png",opaque:!0},outdoors:{extension:"png",opaque:!0},osm_bright:{extension:"png",opaque:!0}},s={stamen_terrain:{minZoom:0,maxZoom:18,retina:!0},stamen_toner:{minZoom:0,maxZoom:20,retina:!0},stamen_watercolor:{minZoom:1,maxZoom:18,retina:!1}};class i extends o.A{constructor(e){const t=e.layer.indexOf("-"),n=-1==t?e.layer:e.layer.slice(0,t),o=s[n]||{minZoom:0,maxZoom:20,retina:!0},i=r[e.layer],l=e.apiKey?"?api_key="+e.apiKey:"",m=o.retina&&e.retina?"@2x":"",p=void 0!==e.url?e.url:"https://tiles.stadiamaps.com/tiles/"+e.layer+"/{z}/{x}/{y}"+m+"."+i.extension+l,c=['© Stadia Maps','© OpenMapTiles',a.o];e.layer.startsWith("stamen_")&&c.splice(1,0,'© Stamen Design'),super({attributions:c,cacheSize:e.cacheSize,crossOrigin:"anonymous",interpolate:e.interpolate,maxZoom:void 0!==e.maxZoom?e.maxZoom:o.maxZoom,minZoom:void 0!==e.minZoom?e.minZoom:o.minZoom,opaque:i.opaque,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:p,tilePixelRatio:m?2:1,wrapX:e.wrapX,zDirection:e.zDirection})}}const l=i}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2836],{2836:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var o=n(6540),a=n(3407),r=n(6717),s=n(1365),i=(n(5045),n(7240)),l=n(2381);const m="https://raw.githubusercontent.com/gregoiredavid/france-geojson/master/departements.geojson",p=new s.A({featureProjection:"EPSG:3857",featureClass:r.A}),c=fetch("https://public.opendatasoft.com/api/records/1.0/search/?dataset=population-francaise-par-departement-2018&q=&rows=200").then((e=>e.json())),u=(e,t)=>{var n,o;return null!==(o=null===(n=e.records.find((e=>e.fields.code_departement===t)))||void 0===n?void 0:n.fields.population)&&void 0!==o?o:0};function d(){const[e,t]=o.useState({records:[]}),[n,r]=o.useState(null);return o.useEffect((()=>{c.then((e=>t(e)))}),[]),o.createElement("div",{className:"d-flex flex-row"},o.createElement(i.f9,{className:"example-map",initial:(0,o.useMemo)((()=>({center:(0,a.Rb)([2,46.5]),zoom:5.75})),[]),noDefaultControls:!0,noDefaultInteractions:!0},o.createElement(l.A,{layer:"stamen_toner"}),o.createElement(i.j9,{zIndex:5,format:p,url:m,onPointerEnter:(0,o.useCallback)((e=>r(e.target)),[]),onPointerLeave:(0,o.useCallback)((e=>n===e.target&&r(null)),[n])},o.createElement(i.cq.RStyle,{render:(0,o.useCallback)((t=>o.createElement(i.cq.RFill,{color:`rgba(0, 0, ${u(e,t.get("code"))/5e3}, 0.75)`})),[e])})),o.createElement(i.j9,{zIndex:10},n?o.createElement("div",null,o.createElement(i.Dp,{geometry:n.getGeometry()},o.createElement(i.Rv,{className:"example-overlay",autoPosition:!0},"Population in ",o.createElement("strong",null,n.get("nom"))," in 2018 is"," ",o.createElement("strong",null,u(e,n.get("code")))))):null)))}i.Dp.hitTolerance=0},2381:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(945),a=n(5042),r=n(2662);class s extends r.A{constructor(e,t){var n;super(e,t),this.source=new a.A({layer:this.props.layer,apiKey:this.props.apiKey,retina:null!==(n=this.props.retina)&&void 0!==n&&n}),this.ol=new o.A({source:this.source}),this.eventSources=[this.ol,this.source]}}},5042:(e,t,n)=>{n.d(t,{A:()=>l});var o=n(702),a=n(7896);const r={stamen_terrain:{extension:"png",opaque:!0},stamen_terrain_background:{extension:"png",opaque:!0},stamen_terrain_labels:{extension:"png",opaque:!1},stamen_terrain_lines:{extension:"png",opaque:!1},stamen_toner_background:{extension:"png",opaque:!0},stamen_toner:{extension:"png",opaque:!0},stamen_toner_labels:{extension:"png",opaque:!1},stamen_toner_lines:{extension:"png",opaque:!1},stamen_toner_lite:{extension:"png",opaque:!0},stamen_watercolor:{extension:"jpg",opaque:!0},alidade_smooth:{extension:"png",opaque:!0},alidade_smooth_dark:{extension:"png",opaque:!0},alidade_satellite:{extension:"png",opaque:!0},outdoors:{extension:"png",opaque:!0},osm_bright:{extension:"png",opaque:!0}},s={stamen_terrain:{minZoom:0,maxZoom:18,retina:!0},stamen_toner:{minZoom:0,maxZoom:20,retina:!0},stamen_watercolor:{minZoom:1,maxZoom:18,retina:!1}};class i extends o.A{constructor(e){const t=e.layer.indexOf("-"),n=-1==t?e.layer:e.layer.slice(0,t),o=s[n]||{minZoom:0,maxZoom:20,retina:!0},i=r[e.layer],l=e.apiKey?"?api_key="+e.apiKey:"",m=o.retina&&e.retina?"@2x":"",p=void 0!==e.url?e.url:"https://tiles.stadiamaps.com/tiles/"+e.layer+"/{z}/{x}/{y}"+m+"."+i.extension+l,c=['© Stadia Maps','© OpenMapTiles',a.o];e.layer.startsWith("stamen_")&&c.splice(1,0,'© Stamen Design'),super({attributions:c,cacheSize:e.cacheSize,crossOrigin:"anonymous",interpolate:e.interpolate,maxZoom:void 0!==e.maxZoom?e.maxZoom:o.maxZoom,minZoom:void 0!==e.minZoom?e.minZoom:o.minZoom,opaque:i.opaque,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:p,tilePixelRatio:m?2:1,wrapX:e.wrapX,zDirection:e.zDirection})}}const l=i}}]); \ No newline at end of file diff --git a/2883.bundle.js b/2883.bundle.js index 1359b282..a6111d0b 100644 --- a/2883.bundle.js +++ b/2883.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2883],{2883:(e,t,r)=>{r.r(t),r.d(t,{default:()=>m});var l=r(6540),n=r(3407),a=r(4662),o=(r(5045),r(7240)),c=r(5111),s=r(2381);const i={0:{width:6,font:"1.2rem helvetica,sans-serif"},1:{width:5,font:"0.6rem helvetica,sans-serif"},2:{width:3,font:"0.5rem helvetica,sans-serif"},def:{width:1,font:"0.4rem helvetica,sans-serif"}};function m(){const[e,t]=l.useState(""),r=(0,c.useRStyle)();return l.createElement(l.Fragment,null,l.createElement(c.RStyleArray,{ref:r,render:(0,l.useCallback)((e=>{var t;const{width:r,font:n}=null!==(t=i[e.get("p")])&&void 0!==t?t:i.def,a="#ffff"+e.get("c").charAt(0).toString("hex").substring(0,2).padStart(2,"0");return l.createElement(l.Fragment,null,l.createElement(c.RStyle,{zIndex:10},l.createElement(c.RCircle,{radius:r},l.createElement(c.RStroke,{color:"#007bff",width:r}),l.createElement(c.RFill,{color:"#007bff"})),l.createElement(c.RText,{font:n,text:e.get("n")},l.createElement(c.RStroke,{color:"#007bff",width:2}),l.createElement(c.RFill,{color:a}))),l.createElement(c.RStyle,{zIndex:0},l.createElement(c.RCircle,{radius:1.5*r},l.createElement(c.RStroke,{color:"#000000",width:1.5*r}),l.createElement(c.RFill,{color:"#000000"}))))}),[])}),l.createElement(o.f9,{className:"example-map",initial:{center:(0,n.Rb)([2.364,48.82],"EPSG:4326"),zoom:8},projection:"EPSG:4326"},l.createElement(s.A,{layer:"stamen_watercolor"}),l.createElement(o.Ji,{onPointerEnter:l.useCallback((e=>{var r;return(null===(r=e.target)||void 0===r?void 0:r.get)&&t(e.target.get("n")+", "+e.target.get("c"))}),[t]),url:"https://velivole.b-cdn.net/tiles/admin/{z}/{x}/{y}.pbf",projection:"EPSG:4326",format:new a.A},l.createElement(c.RStyle,null,l.createElement(c.RStroke,{color:"#007bff",width:2}),l.createElement(c.RFill,{color:"transparent"}))),l.createElement(o.Ji,{url:"https://velivole.b-cdn.net/tiles/place/0/{z}/{x}/{y}.pbf",projection:"EPSG:4326",maxResolution:.01,style:r,format:new a.A}),l.createElement(o.Ji,{url:"https://velivole.b-cdn.net/tiles/place/1/{z}/{x}/{y}.pbf",projection:"EPSG:4326",maxResolution:.0025,style:r,format:new a.A}),l.createElement(o.Ji,{url:"https://velivole.b-cdn.net/tiles/place/2/{z}/{x}/{y}.pbf",projection:"EPSG:4326",maxResolution:5e-4,style:r,format:new a.A})),l.createElement("div",{className:"mx-0 mt-0 mb-3 p-1 w-100 jumbotron shadow shadow"},l.createElement("p",null,"You are now in ",l.createElement("strong",null,e))))}},2381:(e,t,r)=>{r.d(t,{A:()=>o});var l=r(945),n=r(5042),a=r(2662);class o extends a.A{constructor(e,t){var r;super(e,t),this.source=new n.A({layer:this.props.layer,apiKey:this.props.apiKey,retina:null!==(r=this.props.retina)&&void 0!==r&&r}),this.ol=new l.A({source:this.source}),this.eventSources=[this.ol,this.source]}}}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2883],{2883:(e,t,r)=>{r.r(t),r.d(t,{default:()=>m});var l=r(6540),n=r(3407),a=r(4662),o=(r(5045),r(7240)),c=r(5111),s=r(2381);const i={0:{width:6,font:"1.2rem helvetica,sans-serif"},1:{width:5,font:"0.6rem helvetica,sans-serif"},2:{width:3,font:"0.5rem helvetica,sans-serif"},def:{width:1,font:"0.4rem helvetica,sans-serif"}};function m(){const[e,t]=l.useState(""),r=(0,c.useRStyle)(),m=(0,l.useMemo)((()=>new a.A),[]);return l.createElement(l.Fragment,null,l.createElement(c.RStyleArray,{ref:r,render:(0,l.useCallback)((e=>{var t;const{width:r,font:n}=null!==(t=i[e.get("p")])&&void 0!==t?t:i.def,a="#ffff"+e.get("c").charAt(0).toString("hex").substring(0,2).padStart(2,"0");return l.createElement(l.Fragment,null,l.createElement(c.RStyle,{zIndex:10},l.createElement(c.RCircle,{radius:r},l.createElement(c.RStroke,{color:"#007bff",width:r}),l.createElement(c.RFill,{color:"#007bff"})),l.createElement(c.RText,{font:n,text:e.get("n")},l.createElement(c.RStroke,{color:"#007bff",width:2}),l.createElement(c.RFill,{color:a}))),l.createElement(c.RStyle,{zIndex:0},l.createElement(c.RCircle,{radius:1.5*r},l.createElement(c.RStroke,{color:"#000000",width:1.5*r}),l.createElement(c.RFill,{color:"#000000"}))))}),[])}),l.createElement(o.f9,{className:"example-map",initial:{center:(0,n.Rb)([2.364,48.82],"EPSG:4326"),zoom:8},projection:"EPSG:4326"},l.createElement(s.A,{layer:"stamen_watercolor"}),l.createElement(o.Ji,{onPointerEnter:l.useCallback((e=>{var r;return(null===(r=e.target)||void 0===r?void 0:r.get)&&t(e.target.get("n")+", "+e.target.get("c"))}),[t]),url:"https://velivole.b-cdn.net/tiles/admin/{z}/{x}/{y}.pbf",projection:"EPSG:4326",format:m},l.createElement(c.RStyle,null,l.createElement(c.RStroke,{color:"#007bff",width:2}),l.createElement(c.RFill,{color:"transparent"}))),l.createElement(o.Ji,{url:"https://velivole.b-cdn.net/tiles/place/0/{z}/{x}/{y}.pbf",projection:"EPSG:4326",maxResolution:.01,style:r,format:m}),l.createElement(o.Ji,{url:"https://velivole.b-cdn.net/tiles/place/1/{z}/{x}/{y}.pbf",projection:"EPSG:4326",maxResolution:.0025,style:r,format:m}),l.createElement(o.Ji,{url:"https://velivole.b-cdn.net/tiles/place/2/{z}/{x}/{y}.pbf",projection:"EPSG:4326",maxResolution:5e-4,style:r,format:m})),l.createElement("div",{className:"mx-0 mt-0 mb-3 p-1 w-100 jumbotron shadow shadow"},l.createElement("p",null,"You are now in ",l.createElement("strong",null,e))))}},2381:(e,t,r)=>{r.d(t,{A:()=>o});var l=r(945),n=r(5042),a=r(2662);class o extends a.A{constructor(e,t){var r;super(e,t),this.source=new n.A({layer:this.props.layer,apiKey:this.props.apiKey,retina:null!==(r=this.props.retina)&&void 0!==r&&r}),this.ol=new l.A({source:this.source}),this.eventSources=[this.ol,this.source]}}}}]); \ No newline at end of file diff --git a/3197.bundle.js b/3197.bundle.js index 44df182d..1f896641 100644 --- a/3197.bundle.js +++ b/3197.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[3197],{3197:(e,n,t)=>{t.r(n),t.d(n,{default:()=>r});const r="/*\n * This example illustrates using vector tiles\n * and\n * layers that appear only when zoomed in\n */\n\nimport React, {useCallback} from 'react';\nimport {Feature} from 'ol';\nimport {fromLonLat} from 'ol/proj';\nimport {MVT} from 'ol/format';\nimport 'ol/ol.css';\n\nimport {RMap, RLayerVectorTile} from 'rlayers';\nimport {useRStyle, RStyle, RStyleArray, RStroke, RFill, RCircle, RText} from 'rlayers/style';\nimport {Geometry} from 'ol/geom';\nimport RLayerStadia from 'rlayers/layer/RLayerStadia';\n\nconst degree = 111319.49079327358;\nconst fonts = {\n 0: {width: 6, font: '1.2rem helvetica,sans-serif'},\n 1: {width: 5, font: '0.6rem helvetica,sans-serif'},\n 2: {width: 3, font: '0.5rem helvetica,sans-serif'},\n def: {width: 1, font: '0.4rem helvetica,sans-serif'}\n};\n\n/*\n * If you know about any open and free to use vector tile services, please let me know\n * This example uses the velivole.fr administrative boundary server which serves EPSG:4326\n *\n * You can also find a primitive pbf tile server based on geojson-vt\n * at https://github.com/mmomtchev/geojson-vt-server.git\n */\nexport default function VectorTiles(): JSX.Element {\n const [country, setCountry] = React.useState('');\n const towns = useRStyle();\n return (\n \n ) => {\n /* This is a the towns style\n *\n * This examples illustrates superposing two image elements (two circles)\n *\n * This is a dynamic style that creates a new object\n * every time it is access\n * Use with care\n */\n\n const {width, font} = fonts[feature.get('p')] ?? fonts.def;\n const color =\n '#ffff' +\n feature.get('c').charAt(0).toString('hex').substring(0, 2).padStart(2, '0');\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n }, [])}\n />\n \n {/* This is the background raster map */}\n \n {/* These are the administrative borders */}\n \n e.target?.get &&\n setCountry(e.target.get('n') + ', ' + e.target.get('c')),\n [setCountry]\n )}\n url='https://velivole.b-cdn.net/tiles/admin/{z}/{x}/{y}.pbf'\n projection='EPSG:4326'\n format={new MVT()}\n >\n \n {/* This is the borders style */}\n \n \n \n \n {/* These are the cities */}\n \n {/* The towns visible only when zoomed in */}\n \n {/* The small villages at maximum resolution */}\n \n \n
    \n

    \n You are now in {country}\n

    \n
    \n
    \n );\n}\n"}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[3197],{3197:(e,n,t)=>{t.r(n),t.d(n,{default:()=>r});const r="/*\n * This example illustrates using vector tiles\n * and\n * layers that appear only when zoomed in\n */\n\nimport React, {useCallback, useMemo} from 'react';\nimport {Feature} from 'ol';\nimport {fromLonLat} from 'ol/proj';\nimport {MVT} from 'ol/format';\nimport 'ol/ol.css';\n\nimport {RMap, RLayerVectorTile} from 'rlayers';\nimport {useRStyle, RStyle, RStyleArray, RStroke, RFill, RCircle, RText} from 'rlayers/style';\nimport {Geometry} from 'ol/geom';\nimport RLayerStadia from 'rlayers/layer/RLayerStadia';\nimport RenderFeature from 'ol/render/Feature';\n\nconst degree = 111319.49079327358;\nconst fonts = {\n 0: {width: 6, font: '1.2rem helvetica,sans-serif'},\n 1: {width: 5, font: '0.6rem helvetica,sans-serif'},\n 2: {width: 3, font: '0.5rem helvetica,sans-serif'},\n def: {width: 1, font: '0.4rem helvetica,sans-serif'}\n};\n\n/*\n * If you know about any open and free to use vector tile services, please let me know\n * This example uses the velivole.fr administrative boundary server which serves EPSG:4326\n *\n * You can also find a primitive pbf tile server based on geojson-vt\n * at https://github.com/mmomtchev/geojson-vt-server.git\n */\nexport default function VectorTiles(): JSX.Element {\n const [country, setCountry] = React.useState('');\n const towns = useRStyle();\n const parser = useMemo(() => new MVT(), []);\n return (\n \n ) => {\n /* This is a the towns style\n *\n * This examples illustrates superposing two image elements (two circles)\n *\n * This is a dynamic style that creates a new object\n * every time it is access\n * Use with care\n */\n\n const {width, font} = fonts[feature.get('p')] ?? fonts.def;\n const color =\n '#ffff' +\n feature.get('c').charAt(0).toString('hex').substring(0, 2).padStart(2, '0');\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n }, [])}\n />\n \n {/* This is the background raster map */}\n \n {/* These are the administrative borders */}\n \n e.target?.get &&\n setCountry(e.target.get('n') + ', ' + e.target.get('c')),\n [setCountry]\n )}\n url='https://velivole.b-cdn.net/tiles/admin/{z}/{x}/{y}.pbf'\n projection='EPSG:4326'\n format={parser}\n >\n \n {/* This is the borders style */}\n \n \n \n \n {/* These are the cities */}\n \n {/* The towns visible only when zoomed in */}\n \n {/* The small villages at maximum resolution */}\n \n \n
    \n

    \n You are now in {country}\n

    \n
    \n
    \n );\n}\n"}}]); \ No newline at end of file diff --git a/3416.bundle.js b/3416.bundle.js index 2a470e28..f1388105 100644 --- a/3416.bundle.js +++ b/3416.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[3416],{3416:(e,n,t)=>{t.r(n),t.d(n,{default:()=>o});const o="import React, {useCallback} from 'react';\nimport {Feature} from 'ol';\nimport {fromLonLat} from 'ol/proj';\nimport GeoJSON from 'ol/format/GeoJSON';\nimport {Point} from 'ol/geom';\nimport 'ol/ol.css';\n\nimport {RMap, ROSM, RLayerVector, RStyle} from 'rlayers';\n\n/**\n * Including data from a static file included at bundling time\n * webpack will do everything necessary\n * (this won't work in CodePen)\n */\nimport geojsonFeatures from './data/geo.json';\n\nexport default function Features(): JSX.Element {\n const [flow, setFlow] = React.useState([]);\n return (\n
    \n \n \n {/* When using TypeScript you can (optionally) specify the type of the features */}\n >\n zIndex={10}\n /* Input data will have to be typed too */\n features={\n new GeoJSON({featureProjection: 'EPSG:3857'}).readFeatures(\n geojsonFeatures\n ) as Feature[]\n }\n /* The type will be propagated to all callbacks */\n onClick={useCallback(\n (e) => {\n setFlow([...flow, e.target.get('en')].slice(-16));\n },\n [flow]\n )}\n >\n \n \n \n \n \n \n {/* Without any type, the features will be assumed to be a of a generic Geometry type */}\n {\n setFlow([...flow, 'Entering ' + e.target.get('nom')].slice(-16));\n },\n [flow]\n )}\n >\n \n \n \n \n \n \n
    \n

    Your actions

    \n `
  • ${p}
  • `).join('')\n }}\n />\n
    \n
    \n );\n}\n"}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[3416],{3416:(e,n,t)=>{t.r(n),t.d(n,{default:()=>o});const o="import React, {useCallback} from 'react';\nimport {Feature} from 'ol';\nimport {fromLonLat} from 'ol/proj';\nimport GeoJSON from 'ol/format/GeoJSON';\nimport {Point} from 'ol/geom';\nimport 'ol/ol.css';\n\nimport {RMap, ROSM, RLayerVector, RStyle} from 'rlayers';\n\n/**\n * Including data from a static file included at bundling time\n * webpack will do everything necessary\n * (this won't work in CodePen)\n */\nimport geojsonFeatures from './data/geo.json';\n\nexport default function Features(): JSX.Element {\n const [flow, setFlow] = React.useState([]);\n return (\n
    \n \n \n {/* When using TypeScript you can (optionally) specify the type of the features */}\n >\n zIndex={10}\n /* Input data will have to be typed too */\n features={\n new GeoJSON({\n featureProjection: 'EPSG:3857',\n featureClass: Feature\n }).readFeatures(geojsonFeatures) as Feature[]\n }\n /* The type will be propagated to all callbacks */\n onClick={useCallback(\n (e) => {\n setFlow([...flow, e.target.get('en')].slice(-16));\n },\n [flow]\n )}\n >\n \n \n \n \n \n \n {/* Without any type, the features will be assumed to be a of a generic Geometry type */}\n {\n setFlow([...flow, 'Entering ' + e.target.get('nom')].slice(-16));\n },\n [flow]\n )}\n >\n \n \n \n \n \n \n
    \n

    Your actions

    \n `
  • ${p}
  • `).join('')\n }}\n />\n
    \n
    \n );\n}\n"}}]); \ No newline at end of file diff --git a/374.bundle.js b/374.bundle.js index 649507e7..7320ed02 100644 --- a/374.bundle.js +++ b/374.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[374],{374:(n,a,s)=>{s.r(a),s.d(a,{default:()=>t});const t='import React, { useCallback } from "react";\nimport { fromLonLat } from "ol/proj";\nimport GeoJSON from "ol/format/GeoJSON";\nimport { Feature } from "ol";\nimport { Geometry } from "ol/geom";\nimport "ol/ol.css";\n\nimport { RMap, RLayerHeatmap } from "rlayers";\nimport RLayerStadia from "rlayers/layer/RLayerStadia";\n\n// Earthquakes of magnitude of at least 3.0 in 2020 (courtesy of USGS)\n// (this won\'t work in CodePen)\nimport earthquakes from "!!file-loader!./data/earthquakes.geojson";\ntype InputFormEventType = React.FormEvent<HTMLInputElement>;\nconst reader = new GeoJSON({ featureProjection: "EPSG:3857" });\n\nexport default function Heatmap(): JSX.Element {\n const [blur, setBlur] = React.useState(15);\n const [radius, setRadius] = React.useState(8);\n return (\n <React.Fragment>\n <RMap\n className="example-map"\n initial={{ center: fromLonLat([0, 0]), zoom: 1 }}\n >\n <RLayerStadia layer="stamen_toner" />\n <RLayerHeatmap\n blur={blur}\n radius={radius}\n format={reader}\n url={earthquakes}\n weight={useCallback((f) => parseFloat(f.get("mag")) - 5, [])}\n />\n </RMap>\n <div className="d-flex flex-row w-100">\n <div className="w-50 me-2">\n <label htmlFor="blur">Blur</label>\n <div className="w-100">\n <input\n type="range"\n className="range-slider range-slider--primary w-100"\n min="0"\n max="50"\n id="blur"\n value={blur}\n onChange={useCallback(\n (e: InputFormEventType) =>\n setBlur(parseInt(e.currentTarget.value)),\n []\n )}\n />\n </div>\n </div>\n <div className="w-50">\n <label htmlFor="radius">Radius</label>\n <div className="w-100">\n <input\n type="range"\n className="range-slider range-slider--primary w-100"\n min="0"\n max="20"\n id="radius"\n value={radius}\n onChange={useCallback(\n (e: InputFormEventType) =>\n setRadius(parseInt(e.currentTarget.value)),\n []\n )}\n />\n </div>\n </div>\n </div>\n </React.Fragment>\n );\n}\n'}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[374],{374:(n,a,s)=>{s.r(a),s.d(a,{default:()=>t});const t='import React, { useCallback } from "react";\nimport { fromLonLat } from "ol/proj";\nimport GeoJSON from "ol/format/GeoJSON";\nimport { Feature } from "ol";\nimport { Geometry } from "ol/geom";\nimport "ol/ol.css";\n\nimport { RMap, RLayerHeatmap } from "rlayers";\nimport RLayerStadia from "rlayers/layer/RLayerStadia";\n\n// Earthquakes of magnitude of at least 3.0 in 2020 (courtesy of USGS)\n// (this won\'t work in CodePen)\nimport earthquakes from "!!file-loader!./data/earthquakes.geojson";\ntype InputFormEventType = React.FormEvent<HTMLInputElement>;\nconst reader = new GeoJSON({\n featureProjection: "EPSG:3857",\n featureClass: Feature,\n});\n\nexport default function Heatmap(): JSX.Element {\n const [blur, setBlur] = React.useState(15);\n const [radius, setRadius] = React.useState(8);\n return (\n <React.Fragment>\n <RMap\n className="example-map"\n initial={{ center: fromLonLat([0, 0]), zoom: 1 }}\n >\n <RLayerStadia layer="stamen_toner" />\n <RLayerHeatmap\n blur={blur}\n radius={radius}\n format={reader}\n url={earthquakes}\n weight={useCallback((f) => parseFloat(f.get("mag")) - 5, [])}\n />\n </RMap>\n <div className="d-flex flex-row w-100">\n <div className="w-50 me-2">\n <label htmlFor="blur">Blur</label>\n <div className="w-100">\n <input\n type="range"\n className="range-slider range-slider--primary w-100"\n min="0"\n max="50"\n id="blur"\n value={blur}\n onChange={useCallback(\n (e: InputFormEventType) =>\n setBlur(parseInt(e.currentTarget.value)),\n []\n )}\n />\n </div>\n </div>\n <div className="w-50">\n <label htmlFor="radius">Radius</label>\n <div className="w-100">\n <input\n type="range"\n className="range-slider range-slider--primary w-100"\n min="0"\n max="20"\n id="radius"\n value={radius}\n onChange={useCallback(\n (e: InputFormEventType) =>\n setRadius(parseInt(e.currentTarget.value)),\n []\n )}\n />\n </div>\n </div>\n </div>\n </React.Fragment>\n );\n}\n'}}]); \ No newline at end of file diff --git a/4023.bundle.js b/4023.bundle.js index e0eadc2f..222e2a67 100644 --- a/4023.bundle.js +++ b/4023.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[4023],{4023:(n,s,a)=>{a.r(s),a.d(s,{default:()=>t});const t='import React from "react";\nimport { fromLonLat } from "ol/proj";\nimport { Coordinate } from "ol/coordinate";\nimport { Point } from "ol/geom";\nimport "ol/ol.css";\n\nimport { RMap, ROSM, RLayerVector, RFeature, ROverlay } from "rlayers";\nimport pacman from "./svg/pacman.svg";\n\nconst coords: Record<string, Coordinate> = {\n origin: [2.364, 48.82],\n ArcDeTriomphe: [2.295, 48.8737],\n};\n\nexport default function AnimatedOverlay(): JSX.Element {\n return (\n <RMap\n className="example-map"\n initial={{ center: fromLonLat(coords.origin), zoom: 11 }}\n >\n <ROSM />\n <RLayerVector zIndex={10}>\n <RFeature geometry={new Point(fromLonLat(coords.ArcDeTriomphe))}>\n <ROverlay className="no-interaction">\n <img\n src={pacman}\n style={{\n position: "relative",\n top: -24,\n left: -24,\n userSelect: "none",\n pointerEvents: "none",\n }}\n width={48}\n height={48}\n alt="animated icon"\n />\n </ROverlay>\n </RFeature>\n </RLayerVector>\n </RMap>\n );\n}\n'}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[4023],{4023:(n,s,a)=>{a.r(s),a.d(s,{default:()=>t});const t='import React from "react";\nimport { fromLonLat } from "ol/proj";\nimport { Coordinate } from "ol/coordinate";\nimport { Point } from "ol/geom";\nimport "ol/ol.css";\n\nimport { RMap, ROSM, RLayerVector, RFeature, ROverlay } from "rlayers";\nimport pacman from "./svg/pacman.svg";\n\nconst coords: Record<string, Coordinate> = {\n origin: [2.364, 48.82],\n ArcDeTriomphe: [2.295, 48.8737],\n};\n\nexport default function AnimatedOverlay(): JSX.Element {\n return (\n <RMap\n className="example-map"\n initial={{ center: fromLonLat(coords.origin), zoom: 11 }}\n >\n <ROSM />\n <RLayerVector zIndex={10}>\n <RFeature<Point> geometry={new Point(fromLonLat(coords.ArcDeTriomphe))}>\n <ROverlay className="no-interaction">\n <img\n src={pacman}\n style={{\n position: "relative",\n top: -24,\n left: -24,\n userSelect: "none",\n pointerEvents: "none",\n }}\n width={48}\n height={48}\n alt="animated icon"\n />\n </ROverlay>\n </RFeature>\n </RLayerVector>\n </RMap>\n );\n}\n'}}]); \ No newline at end of file diff --git a/4029.bundle.js b/4029.bundle.js index c13df8d2..cd2527e5 100644 --- a/4029.bundle.js +++ b/4029.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[4029],{6410:(e,a,n)=>{n.r(a),n.d(a,{default:()=>r});const r="import React, {useCallback} from 'react';\nimport {fromLonLat} from 'ol/proj';\nimport GeoJSON from 'ol/format/GeoJSON';\nimport {Feature} from 'ol';\nimport {Geometry} from 'ol/geom';\nimport 'ol/ol.css';\n\nimport {RMap, RLayerHeatmap} from 'rlayers';\nimport RLayerStadia from 'rlayers/layer/RLayerStadia';\n\n// Earthquakes of magnitude of at least 3.0 in 2020 (courtesy of USGS)\n// (this won't work in CodePen)\nimport earthquakes from '!!file-loader!./data/earthquakes.geojson';\ntype InputFormEventType = React.FormEvent;\nconst reader = new GeoJSON({featureProjection: 'EPSG:3857'});\n\nexport default function Heatmap(): JSX.Element {\n const [blur, setBlur] = React.useState(15);\n const [radius, setRadius] = React.useState(8);\n return (\n \n \n \n parseFloat(f.get('mag')) - 5, [])}\n />\n \n
    \n
    \n \n
    \n setBlur(parseInt(e.currentTarget.value)),\n []\n )}\n />\n
    \n
    \n
    \n \n
    \n \n setRadius(parseInt(e.currentTarget.value)),\n []\n )}\n />\n
    \n
    \n
    \n
    \n );\n}\n"}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[4029],{6410:(e,a,n)=>{n.r(a),n.d(a,{default:()=>r});const r="import React, {useCallback} from 'react';\nimport {fromLonLat} from 'ol/proj';\nimport GeoJSON from 'ol/format/GeoJSON';\nimport {Feature} from 'ol';\nimport {Geometry} from 'ol/geom';\nimport 'ol/ol.css';\n\nimport {RMap, RLayerHeatmap} from 'rlayers';\nimport RLayerStadia from 'rlayers/layer/RLayerStadia';\n\n// Earthquakes of magnitude of at least 3.0 in 2020 (courtesy of USGS)\n// (this won't work in CodePen)\nimport earthquakes from '!!file-loader!./data/earthquakes.geojson';\ntype InputFormEventType = React.FormEvent;\nconst reader = new GeoJSON({featureProjection: 'EPSG:3857', featureClass: Feature});\n\nexport default function Heatmap(): JSX.Element {\n const [blur, setBlur] = React.useState(15);\n const [radius, setRadius] = React.useState(8);\n return (\n \n \n \n parseFloat(f.get('mag')) - 5, [])}\n />\n \n
    \n
    \n \n
    \n setBlur(parseInt(e.currentTarget.value)),\n []\n )}\n />\n
    \n
    \n
    \n \n
    \n \n setRadius(parseInt(e.currentTarget.value)),\n []\n )}\n />\n
    \n
    \n
    \n
    \n );\n}\n"}}]); \ No newline at end of file diff --git a/4629.bundle.js b/4629.bundle.js index 6f8453c5..25e8e5ea 100644 --- a/4629.bundle.js +++ b/4629.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[4629],{4096:(n,o,e)=>{e.d(o,{A:()=>i});var t=e(1601),r=e.n(t),a=e(6314),l=e.n(a)()(r());l.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]);const i=l},5045:(n,o,e)=>{var t=e(5072),r=e.n(t),a=e(7825),l=e.n(a),i=e(7659),s=e.n(i),p=e(5056),c=e.n(p),u=e(540),d=e.n(u),m=e(1113),b=e.n(m),g=e(4096),x={};x.styleTagTransform=b(),x.setAttributes=c(),x.insert=s().bind(null,"head"),x.domAPI=l(),x.insertStyleElement=d(),r()(g.A,x),g.A&&g.A.locals&&g.A.locals},4662:(n,o,e)=>{e.d(o,{A:()=>y});var t=e(8217),r=e(1217),a=e(6702),l=e(503),i=e(2871),s=e(5335),p=e(4294),c=e(1064),u=e(5286),d=e(4778),m=e(3407),b=e(3402);class g extends t.Ay{constructor(n){super(),n=n||{},this.dataProjection=new u.A({code:"",units:"tile-pixels"}),this.featureClass_=n.featureClass?n.featureClass:d.Ay,this.geometryName_=n.geometryName,this.layerName_=n.layerName?n.layerName:"layer",this.layers_=n.layers?n.layers:null,this.idProperty_=n.idProperty,this.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"]}readRawGeometry_(n,o,e,t){n.pos=o.geometry;const r=n.readVarint()+n.pos;let a=1,l=0,i=0,s=0,p=0,c=0;for(;n.pos>3}if(l--,1===a||2===a)i+=n.readSVarint(),s+=n.readSVarint(),1===a&&p>c&&(t.push(p),c=p),e.push(i,s),p+=2;else{if(7!==a)throw new Error("Invalid command found in the PBF");p>c&&(e.push(e[c],e[c+1]),p+=2)}}p>c&&(t.push(p),c=p)}createFeature_(n,o,e){const s=o.type;if(0===s)return null;let u;const m=o.properties;let g;this.idProperty_?(g=m[this.idProperty_],delete m[this.idProperty_]):g=o.id,m[this.layerName_]=o.layer.name;const x=[],h=[];this.readRawGeometry_(n,o,x,h);const f=function(n,o){let e;return 1===n?e=1===o?"Point":"MultiPoint":2===n?e=1===o?"LineString":"MultiLineString":3===n&&(e="Polygon"),e}(s,h.length);if(this.featureClass_===d.Ay)u=new this.featureClass_(f,x,h,2,m,g),u.transform(e.dataProjection);else{let n;if("Polygon"==f){const o=(0,b.yJ)(x,h);n=o.length>1?new i.A(x,"XY",o):new c.Ay(x,"XY",h)}else n="Point"===f?new p.A(x,"XY"):"LineString"===f?new r.A(x,"XY"):"MultiPoint"===f?new l.A(x,"XY"):"MultiLineString"===f?new a.A(x,"XY",h):null;u=new(0,this.featureClass_),this.geometryName_&&u.setGeometryName(this.geometryName_);const o=(0,t.hX)(n,!1,e);u.setGeometry(o),void 0!==g&&u.setId(g),u.setProperties(m,!0)}return u}getType(){return"arraybuffer"}readFeatures(n,o){const e=this.layers_;o=this.adaptOptions(o);const t=(0,m.Jt)(o.dataProjection);t.setWorldExtent(o.extent),o.dataProjection=t;const r=new s(n),a=r.readFields(x,{}),l=[];for(const n in a){if(e&&!e.includes(n))continue;const i=a[n],s=i?[0,0,i.extent,i.extent]:null;t.setExtent(s);for(let n=0,e=i.length;n>3)?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null;o.values.push(t)}}function f(n,o,e){if(1==n)o.id=e.readVarint();else if(2==n){const n=e.readVarint()+e.pos;for(;e.pos{e.d(o,{A:()=>s});var t=e(702),r=e(7896);const a={stamen_terrain:{extension:"png",opaque:!0},stamen_terrain_background:{extension:"png",opaque:!0},stamen_terrain_labels:{extension:"png",opaque:!1},stamen_terrain_lines:{extension:"png",opaque:!1},stamen_toner_background:{extension:"png",opaque:!0},stamen_toner:{extension:"png",opaque:!0},stamen_toner_labels:{extension:"png",opaque:!1},stamen_toner_lines:{extension:"png",opaque:!1},stamen_toner_lite:{extension:"png",opaque:!0},stamen_watercolor:{extension:"jpg",opaque:!0},alidade_smooth:{extension:"png",opaque:!0},alidade_smooth_dark:{extension:"png",opaque:!0},alidade_satellite:{extension:"png",opaque:!0},outdoors:{extension:"png",opaque:!0},osm_bright:{extension:"png",opaque:!0}},l={stamen_terrain:{minZoom:0,maxZoom:18,retina:!0},stamen_toner:{minZoom:0,maxZoom:20,retina:!0},stamen_watercolor:{minZoom:1,maxZoom:18,retina:!1}};class i extends t.A{constructor(n){const o=n.layer.indexOf("-"),e=-1==o?n.layer:n.layer.slice(0,o),t=l[e]||{minZoom:0,maxZoom:20,retina:!0},i=a[n.layer],s=n.apiKey?"?api_key="+n.apiKey:"",p=t.retina&&n.retina?"@2x":"",c=void 0!==n.url?n.url:"https://tiles.stadiamaps.com/tiles/"+n.layer+"/{z}/{x}/{y}"+p+"."+i.extension+s,u=['© Stadia Maps','© OpenMapTiles',r.o];n.layer.startsWith("stamen_")&&u.splice(1,0,'© Stamen Design'),super({attributions:u,cacheSize:n.cacheSize,crossOrigin:"anonymous",interpolate:n.interpolate,maxZoom:void 0!==n.maxZoom?n.maxZoom:t.maxZoom,minZoom:void 0!==n.minZoom?n.minZoom:t.minZoom,opaque:i.opaque,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileLoadFunction:n.tileLoadFunction,transition:n.transition,url:c,tilePixelRatio:p?2:1,wrapX:n.wrapX,zDirection:n.zDirection})}}const s=i}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[4629],{4096:(n,o,e)=>{e.d(o,{A:()=>i});var t=e(1601),r=e.n(t),a=e(6314),l=e.n(a)()(r());l.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]);const i=l},5045:(n,o,e)=>{var t=e(5072),r=e.n(t),a=e(7825),l=e.n(a),i=e(7659),s=e.n(i),p=e(5056),c=e.n(p),u=e(540),d=e.n(u),m=e(1113),b=e.n(m),g=e(4096),x={};x.styleTagTransform=b(),x.setAttributes=c(),x.insert=s().bind(null,"head"),x.domAPI=l(),x.insertStyleElement=d(),r()(g.A,x),g.A&&g.A.locals&&g.A.locals},4662:(n,o,e)=>{e.d(o,{A:()=>y});var t=e(8217),r=e(1217),a=e(6702),l=e(503),i=e(2871),s=e(5335),p=e(4294),c=e(1064),u=e(5286),d=e(4778),m=e(3407),b=e(3402);class g extends t.Ay{constructor(n){super(),n=n||{},this.dataProjection=new u.A({code:"",units:"tile-pixels"}),this.featureClass=n.featureClass?n.featureClass:d.Ay,this.geometryName_=n.geometryName,this.layerName_=n.layerName?n.layerName:"layer",this.layers_=n.layers?n.layers:null,this.idProperty_=n.idProperty,this.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"]}readRawGeometry_(n,o,e,t){n.pos=o.geometry;const r=n.readVarint()+n.pos;let a=1,l=0,i=0,s=0,p=0,c=0;for(;n.pos>3}if(l--,1===a||2===a)i+=n.readSVarint(),s+=n.readSVarint(),1===a&&p>c&&(t.push(p),c=p),e.push(i,s),p+=2;else{if(7!==a)throw new Error("Invalid command found in the PBF");p>c&&(e.push(e[c],e[c+1]),p+=2)}}p>c&&(t.push(p),c=p)}createFeature_(n,o,e){const s=o.type;if(0===s)return null;let u;const m=o.properties;let g;this.idProperty_?(g=m[this.idProperty_],delete m[this.idProperty_]):g=o.id,m[this.layerName_]=o.layer.name;const x=[],h=[];this.readRawGeometry_(n,o,x,h);const f=function(n,o){let e;return 1===n?e=1===o?"Point":"MultiPoint":2===n?e=1===o?"LineString":"MultiLineString":3===n&&(e="Polygon"),e}(s,h.length);if(this.featureClass===d.Ay)u=new this.featureClass(f,x,h,2,m,g),u.transform(e.dataProjection);else{let n;if("Polygon"==f){const o=(0,b.yJ)(x,h);n=o.length>1?new i.A(x,"XY",o):new c.Ay(x,"XY",h)}else n="Point"===f?new p.A(x,"XY"):"LineString"===f?new r.A(x,"XY"):"MultiPoint"===f?new l.A(x,"XY"):"MultiLineString"===f?new a.A(x,"XY",h):null;u=new(0,this.featureClass),this.geometryName_&&u.setGeometryName(this.geometryName_);const o=(0,t.hX)(n,!1,e);u.setGeometry(o),void 0!==g&&u.setId(g),u.setProperties(m,!0)}return u}getType(){return"arraybuffer"}readFeatures(n,o){const e=this.layers_;o=this.adaptOptions(o);const t=(0,m.Jt)(o.dataProjection);t.setWorldExtent(o.extent),o.dataProjection=t;const r=new s(n),a=r.readFields(x,{}),l=[];for(const n in a){if(e&&!e.includes(n))continue;const i=a[n],s=i?[0,0,i.extent,i.extent]:null;t.setExtent(s);for(let n=0,e=i.length;n>3)?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null;o.values.push(t)}}function f(n,o,e){if(1==n)o.id=e.readVarint();else if(2==n){const n=e.readVarint()+e.pos;for(;e.pos{e.d(o,{A:()=>s});var t=e(702),r=e(7896);const a={stamen_terrain:{extension:"png",opaque:!0},stamen_terrain_background:{extension:"png",opaque:!0},stamen_terrain_labels:{extension:"png",opaque:!1},stamen_terrain_lines:{extension:"png",opaque:!1},stamen_toner_background:{extension:"png",opaque:!0},stamen_toner:{extension:"png",opaque:!0},stamen_toner_labels:{extension:"png",opaque:!1},stamen_toner_lines:{extension:"png",opaque:!1},stamen_toner_lite:{extension:"png",opaque:!0},stamen_watercolor:{extension:"jpg",opaque:!0},alidade_smooth:{extension:"png",opaque:!0},alidade_smooth_dark:{extension:"png",opaque:!0},alidade_satellite:{extension:"png",opaque:!0},outdoors:{extension:"png",opaque:!0},osm_bright:{extension:"png",opaque:!0}},l={stamen_terrain:{minZoom:0,maxZoom:18,retina:!0},stamen_toner:{minZoom:0,maxZoom:20,retina:!0},stamen_watercolor:{minZoom:1,maxZoom:18,retina:!1}};class i extends t.A{constructor(n){const o=n.layer.indexOf("-"),e=-1==o?n.layer:n.layer.slice(0,o),t=l[e]||{minZoom:0,maxZoom:20,retina:!0},i=a[n.layer],s=n.apiKey?"?api_key="+n.apiKey:"",p=t.retina&&n.retina?"@2x":"",c=void 0!==n.url?n.url:"https://tiles.stadiamaps.com/tiles/"+n.layer+"/{z}/{x}/{y}"+p+"."+i.extension+s,u=['© Stadia Maps','© OpenMapTiles',r.o];n.layer.startsWith("stamen_")&&u.splice(1,0,'© Stamen Design'),super({attributions:u,cacheSize:n.cacheSize,crossOrigin:"anonymous",interpolate:n.interpolate,maxZoom:void 0!==n.maxZoom?n.maxZoom:t.maxZoom,minZoom:void 0!==n.minZoom?n.minZoom:t.minZoom,opaque:i.opaque,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileLoadFunction:n.tileLoadFunction,transition:n.transition,url:c,tilePixelRatio:p?2:1,wrapX:n.wrapX,zDirection:n.zDirection})}}const s=i}}]); \ No newline at end of file diff --git a/4783.bundle.js b/4783.bundle.js index f18779b6..5f8a5cd4 100644 --- a/4783.bundle.js +++ b/4783.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[4783],{6308:(e,a,t)=>{t.d(a,{A:()=>n});const n=t.p+"32ba7744565a0c818ef0e2e35126abbb.geojson"},4783:(e,a,t)=>{t.r(a),t.d(a,{default:()=>p});var n=t(6540),o=t(3407),r=t(1365),s=(t(5045),t(7240)),i=t(2381),l=t(6308);const m=new r.A({featureProjection:"EPSG:3857"});function p(){const[e,a]=n.useState(15),[t,r]=n.useState(8);return n.createElement(n.Fragment,null,n.createElement(s.f9,{className:"example-map",initial:{center:(0,o.Rb)([0,0]),zoom:1}},n.createElement(i.A,{layer:"stamen_toner"}),n.createElement(s.KL,{blur:e,radius:t,format:m,url:l.A,weight:(0,n.useCallback)((e=>parseFloat(e.get("mag"))-5),[])})),n.createElement("div",{className:"d-flex flex-row w-100"},n.createElement("div",{className:"w-50 me-2"},n.createElement("label",{htmlFor:"blur"},"Blur"),n.createElement("div",{className:"w-100"},n.createElement("input",{type:"range",className:"range-slider range-slider--primary w-100",min:"0",max:"50",id:"blur",value:e,onChange:(0,n.useCallback)((e=>a(parseInt(e.currentTarget.value))),[])}))),n.createElement("div",{className:"w-50"},n.createElement("label",{htmlFor:"radius"},"Radius"),n.createElement("div",{className:"w-100"},n.createElement("input",{type:"range",className:"range-slider range-slider--primary w-100",min:"0",max:"20",id:"radius",value:t,onChange:(0,n.useCallback)((e=>r(parseInt(e.currentTarget.value))),[])})))))}},2381:(e,a,t)=>{t.d(a,{A:()=>s});var n=t(945),o=t(5042),r=t(2662);class s extends r.A{constructor(e,a){var t;super(e,a),this.source=new o.A({layer:this.props.layer,apiKey:this.props.apiKey,retina:null!==(t=this.props.retina)&&void 0!==t&&t}),this.ol=new n.A({source:this.source}),this.eventSources=[this.ol,this.source]}}},5042:(e,a,t)=>{t.d(a,{A:()=>l});var n=t(702),o=t(7896);const r={stamen_terrain:{extension:"png",opaque:!0},stamen_terrain_background:{extension:"png",opaque:!0},stamen_terrain_labels:{extension:"png",opaque:!1},stamen_terrain_lines:{extension:"png",opaque:!1},stamen_toner_background:{extension:"png",opaque:!0},stamen_toner:{extension:"png",opaque:!0},stamen_toner_labels:{extension:"png",opaque:!1},stamen_toner_lines:{extension:"png",opaque:!1},stamen_toner_lite:{extension:"png",opaque:!0},stamen_watercolor:{extension:"jpg",opaque:!0},alidade_smooth:{extension:"png",opaque:!0},alidade_smooth_dark:{extension:"png",opaque:!0},alidade_satellite:{extension:"png",opaque:!0},outdoors:{extension:"png",opaque:!0},osm_bright:{extension:"png",opaque:!0}},s={stamen_terrain:{minZoom:0,maxZoom:18,retina:!0},stamen_toner:{minZoom:0,maxZoom:20,retina:!0},stamen_watercolor:{minZoom:1,maxZoom:18,retina:!1}};class i extends n.A{constructor(e){const a=e.layer.indexOf("-"),t=-1==a?e.layer:e.layer.slice(0,a),n=s[t]||{minZoom:0,maxZoom:20,retina:!0},i=r[e.layer],l=e.apiKey?"?api_key="+e.apiKey:"",m=n.retina&&e.retina?"@2x":"",p=void 0!==e.url?e.url:"https://tiles.stadiamaps.com/tiles/"+e.layer+"/{z}/{x}/{y}"+m+"."+i.extension+l,c=['© Stadia Maps','© OpenMapTiles',o.o];e.layer.startsWith("stamen_")&&c.splice(1,0,'© Stamen Design'),super({attributions:c,cacheSize:e.cacheSize,crossOrigin:"anonymous",interpolate:e.interpolate,maxZoom:void 0!==e.maxZoom?e.maxZoom:n.maxZoom,minZoom:void 0!==e.minZoom?e.minZoom:n.minZoom,opaque:i.opaque,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:p,tilePixelRatio:m?2:1,wrapX:e.wrapX,zDirection:e.zDirection})}}const l=i}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[4783],{6308:(e,a,t)=>{t.d(a,{A:()=>n});const n=t.p+"32ba7744565a0c818ef0e2e35126abbb.geojson"},4783:(e,a,t)=>{t.r(a),t.d(a,{default:()=>c});var n=t(6540),o=t(3407),r=t(1365),s=t(6717),i=(t(5045),t(7240)),l=t(2381),m=t(6308);const p=new r.A({featureProjection:"EPSG:3857",featureClass:s.A});function c(){const[e,a]=n.useState(15),[t,r]=n.useState(8);return n.createElement(n.Fragment,null,n.createElement(i.f9,{className:"example-map",initial:{center:(0,o.Rb)([0,0]),zoom:1}},n.createElement(l.A,{layer:"stamen_toner"}),n.createElement(i.KL,{blur:e,radius:t,format:p,url:m.A,weight:(0,n.useCallback)((e=>parseFloat(e.get("mag"))-5),[])})),n.createElement("div",{className:"d-flex flex-row w-100"},n.createElement("div",{className:"w-50 me-2"},n.createElement("label",{htmlFor:"blur"},"Blur"),n.createElement("div",{className:"w-100"},n.createElement("input",{type:"range",className:"range-slider range-slider--primary w-100",min:"0",max:"50",id:"blur",value:e,onChange:(0,n.useCallback)((e=>a(parseInt(e.currentTarget.value))),[])}))),n.createElement("div",{className:"w-50"},n.createElement("label",{htmlFor:"radius"},"Radius"),n.createElement("div",{className:"w-100"},n.createElement("input",{type:"range",className:"range-slider range-slider--primary w-100",min:"0",max:"20",id:"radius",value:t,onChange:(0,n.useCallback)((e=>r(parseInt(e.currentTarget.value))),[])})))))}},2381:(e,a,t)=>{t.d(a,{A:()=>s});var n=t(945),o=t(5042),r=t(2662);class s extends r.A{constructor(e,a){var t;super(e,a),this.source=new o.A({layer:this.props.layer,apiKey:this.props.apiKey,retina:null!==(t=this.props.retina)&&void 0!==t&&t}),this.ol=new n.A({source:this.source}),this.eventSources=[this.ol,this.source]}}},5042:(e,a,t)=>{t.d(a,{A:()=>l});var n=t(702),o=t(7896);const r={stamen_terrain:{extension:"png",opaque:!0},stamen_terrain_background:{extension:"png",opaque:!0},stamen_terrain_labels:{extension:"png",opaque:!1},stamen_terrain_lines:{extension:"png",opaque:!1},stamen_toner_background:{extension:"png",opaque:!0},stamen_toner:{extension:"png",opaque:!0},stamen_toner_labels:{extension:"png",opaque:!1},stamen_toner_lines:{extension:"png",opaque:!1},stamen_toner_lite:{extension:"png",opaque:!0},stamen_watercolor:{extension:"jpg",opaque:!0},alidade_smooth:{extension:"png",opaque:!0},alidade_smooth_dark:{extension:"png",opaque:!0},alidade_satellite:{extension:"png",opaque:!0},outdoors:{extension:"png",opaque:!0},osm_bright:{extension:"png",opaque:!0}},s={stamen_terrain:{minZoom:0,maxZoom:18,retina:!0},stamen_toner:{minZoom:0,maxZoom:20,retina:!0},stamen_watercolor:{minZoom:1,maxZoom:18,retina:!1}};class i extends n.A{constructor(e){const a=e.layer.indexOf("-"),t=-1==a?e.layer:e.layer.slice(0,a),n=s[t]||{minZoom:0,maxZoom:20,retina:!0},i=r[e.layer],l=e.apiKey?"?api_key="+e.apiKey:"",m=n.retina&&e.retina?"@2x":"",p=void 0!==e.url?e.url:"https://tiles.stadiamaps.com/tiles/"+e.layer+"/{z}/{x}/{y}"+m+"."+i.extension+l,c=['© Stadia Maps','© OpenMapTiles',o.o];e.layer.startsWith("stamen_")&&c.splice(1,0,'© Stamen Design'),super({attributions:c,cacheSize:e.cacheSize,crossOrigin:"anonymous",interpolate:e.interpolate,maxZoom:void 0!==e.maxZoom?e.maxZoom:n.maxZoom,minZoom:void 0!==e.minZoom?e.minZoom:n.minZoom,opaque:i.opaque,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:p,tilePixelRatio:m?2:1,wrapX:e.wrapX,zDirection:e.zDirection})}}const l=i}}]); \ No newline at end of file diff --git a/490.bundle.js b/490.bundle.js index 770acf3a..0f2ab23b 100644 --- a/490.bundle.js +++ b/490.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[490],{490:(e,n,t)=>{t.r(n),t.d(n,{default:()=>r});const r="/* This example reimplements the excellent OpenLayers example by @twpayne\n * from https://openlayers.org/en/latest/examples/igc.html\n * It illustrates various techniques that can be used to greatly improve performance\n *\n * React makes creating complex web applications very easy\n * It also makes very easy writing terribly inefficient code\n * You can get away with it when your DOM is not too complex\n * But when dealing with a canvas-drawn map, every care must be\n * taken to avoid unnecessary re-rendering\n */\n\nimport React, {useCallback} from 'react';\nimport {fromLonLat} from 'ol/proj';\nimport IGC from 'ol/format/IGC';\nimport {getVectorContext} from 'ol/render';\nimport {Geometry, LineString, Point} from 'ol/geom';\nimport {Coordinate} from 'ol/coordinate';\n\nimport {\n RMap,\n RLayerTile,\n RLayerVector,\n RFeature,\n RenderEvent,\n MapBrowserEvent,\n VectorSourceEvent\n} from 'rlayers';\nimport {RStyle, RStroke, RFill, RCircle, useRStyle} from 'rlayers/style';\nimport 'ol/ol.css';\n\n// This won't work in CodePen\nimport ClementLatour from '!!file-loader!./data/igc/Clement-Latour.igc';\nimport DamienDeBaenst from '!!file-loader!./data/igc/Damien-de-Baenst.igc';\nimport SylvainDhonneur from '!!file-loader!./data/igc/Sylvain-Dhonneur.igc';\nimport TomPayne from '!!file-loader!./data/igc/Tom-Payne.igc';\nimport UlrichPrinz from '!!file-loader!./data/igc/Ulrich-Prinz.igc';\nimport {OLFeatureClass} from 'rlayers/context';\n\ntype InputFormEventType = React.FormEvent;\n\nconst igcsDesc = [\n {c: 'rgba(0, 0, 250, 0.7)', i: ClementLatour},\n {c: 'rgba(0, 50, 200, 0.7)', i: DamienDeBaenst},\n {c: 'rgba(0, 100, 150, 0.7)', i: SylvainDhonneur},\n {c: 'rgba(0, 150, 200, 0.7)', i: TomPayne},\n {c: 'rgba(0, 200, 50, 0.7)', i: UlrichPrinz}\n];\n\n// A constant avoids re-rendering of the component\n// a property initialized with an anonymous object is not constant\n// it will recreate a new instance at every evaluation\nconst origin = fromLonLat([6, 45.7]);\n\n// This part is re-rendered on every pointermove\nexport default function IGCComp(): JSX.Element {\n const [time, setTime] = React.useState('');\n const [point, setPoint] = React.useState(null);\n const [line, setLine] = React.useState(null);\n const [slider, setSlider] = React.useState(0);\n const [highlights, setHighlights] = React.useState([]);\n const [flight, setFlight] = React.useState({\n start: Infinity,\n stop: -Infinity,\n duration: 0\n });\n const [igcs, setIgcs] = React.useState(() => {\n Promise.all(igcsDesc.map((i) => fetch(i.i).then((r) => r.text()))).then((r) => setIgcs(r));\n return [];\n });\n\n const styles = {\n redCircle: useRStyle(),\n blueCircle: useRStyle(),\n // This is a technique for an array of React.RefObjects\n // It is ugly but it works\n flightPath: React.useRef([])\n };\n\n // createRef instead of useRef here will severely impact performance\n const igcVectorLayer = React.useRef();\n const highlightVectorLayer = React.useRef();\n\n return (\n \n {React.useMemo(\n // This is not a dynamic RStyle, these are 5 static RStyle's\n // Thus the useMemo\n () =>\n igcsDesc.map((igc, idx) => (\n (styles.flightPath.current[idx] = el)}>\n \n \n )),\n [styles.flightPath]\n )}\n \n \n \n \n \n \n \n \n \n \n \n ) => {\n // This useCallback is very important -> without it\n // onPointerMove will be a new anonymous function on every render\n const source = igcVectorLayer.current.source;\n const feature = source.getClosestFeatureToCoordinate(e.coordinate);\n // Did the user move the mouse before the flight paths were loaded?\n if (feature === null) return;\n const point = feature.getGeometry().getClosestPoint(e.coordinate);\n const date = new Date(point[2] * 1000);\n setPoint(new Point(point));\n setLine(new LineString([e.coordinate, [point[0], point[1]]]));\n setTime(\n '' +\n feature.get('PLT') +\n '
    ' +\n date.toUTCString() +\n ''\n );\n e.map.render();\n },\n [igcVectorLayer]\n )}\n >\n \n {\n // This layer contains the flight paths, we install an `onAddFeature` handler\n // to receive all features as their loaded to do additional processing\n }\n ) => {\n const geometry = e.feature.getGeometry() as LineString;\n flight.start = Math.min(flight.start, geometry.getFirstCoordinate()[2]);\n flight.stop = Math.max(flight.stop, geometry.getLastCoordinate()[2]);\n flight.duration = flight.stop - flight.start;\n setFlight({...flight});\n },\n [flight]\n )}\n onPostRender={useCallback(\n // This useCallback is less efficient than the previous one\n // as it depends on the state\n // LayerVector is re-rendered every time point/line change\n (e: RenderEvent) => {\n const vectorContext = getVectorContext(e);\n vectorContext.setStyle(RStyle.getStyleStatic(styles.redCircle));\n if (point && line) {\n vectorContext.drawGeometry(point);\n vectorContext.drawGeometry(line);\n }\n },\n [point, line, styles.redCircle]\n )}\n >\n {React.useMemo(\n () => (\n // This component appears dynamic to React because of the map but it is in fact constant\n // useMemo will render it truly constant\n \n {igcs.map((igc, idx) => (\n \n ))}\n \n ),\n // The array trick renders it impossible for React to track the useMemo dependencies\n // -> we do it manually\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [igcs, styles.flightPath, styles.flightPath.current[0]]\n )}\n
    \n {\n // This layer contains the blue circle (the highlighted section)\n }\n \n {React.useMemo(\n () => (\n // This component appears dynamic to React because of the map but it is in fact constant\n // useMemo will render it truly constant\n \n {highlights.map((coords, i) => (\n \n ))}\n \n ),\n [highlights]\n )}\n \n \n
    \n \n
    \n {\n const value = parseInt(e.currentTarget.value);\n setSlider(value);\n const source = igcVectorLayer.current.source;\n const m = flight.start + (flight.duration * value) / 100;\n const newHighlights = [];\n source.forEachFeature((feature) => {\n if (!feature.get('PLT')) return;\n const geometry = feature.getGeometry() as LineString;\n const coords = geometry.getCoordinateAtM(m, true);\n newHighlights.push(coords);\n });\n setHighlights(newHighlights);\n },\n [igcVectorLayer, flight]\n )}\n />\n
    \n
    \n \n );\n}\n"}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[490],{490:(e,n,t)=>{t.r(n),t.d(n,{default:()=>r});const r="/* This example reimplements the excellent OpenLayers example by @twpayne\n * from https://openlayers.org/en/latest/examples/igc.html\n * It illustrates various techniques that can be used to greatly improve performance\n *\n * React makes creating complex web applications very easy\n * It also makes very easy writing terribly inefficient code\n * You can get away with it when your DOM is not too complex\n * But when dealing with a canvas-drawn map, every care must be\n * taken to avoid unnecessary re-rendering\n */\n\nimport React, {useCallback} from 'react';\nimport {fromLonLat} from 'ol/proj';\nimport IGC from 'ol/format/IGC';\nimport {getVectorContext} from 'ol/render';\nimport {Geometry, LineString, Point} from 'ol/geom';\nimport {Coordinate} from 'ol/coordinate';\n\nimport {\n RMap,\n RLayerTile,\n RLayerVector,\n RFeature,\n RenderEvent,\n MapBrowserEvent,\n VectorSourceEvent\n} from 'rlayers';\nimport {RStyle, RStroke, RFill, RCircle, useRStyle} from 'rlayers/style';\nimport 'ol/ol.css';\n\n// This won't work in CodePen\nimport ClementLatour from '!!file-loader!./data/igc/Clement-Latour.igc';\nimport DamienDeBaenst from '!!file-loader!./data/igc/Damien-de-Baenst.igc';\nimport SylvainDhonneur from '!!file-loader!./data/igc/Sylvain-Dhonneur.igc';\nimport TomPayne from '!!file-loader!./data/igc/Tom-Payne.igc';\nimport UlrichPrinz from '!!file-loader!./data/igc/Ulrich-Prinz.igc';\n\ntype InputFormEventType = React.FormEvent;\n\nconst igcsDesc = [\n {c: 'rgba(0, 0, 250, 0.7)', i: ClementLatour},\n {c: 'rgba(0, 50, 200, 0.7)', i: DamienDeBaenst},\n {c: 'rgba(0, 100, 150, 0.7)', i: SylvainDhonneur},\n {c: 'rgba(0, 150, 200, 0.7)', i: TomPayne},\n {c: 'rgba(0, 200, 50, 0.7)', i: UlrichPrinz}\n];\n\n// A constant avoids re-rendering of the component\n// a property initialized with an anonymous object is not constant\n// it will recreate a new instance at every evaluation\nconst origin = fromLonLat([6, 45.7]);\n\n// This part is re-rendered on every pointermove\nexport default function IGCComp(): JSX.Element {\n const [time, setTime] = React.useState('');\n const [point, setPoint] = React.useState(null);\n const [line, setLine] = React.useState(null);\n const [slider, setSlider] = React.useState(0);\n const [highlights, setHighlights] = React.useState([]);\n const [flight, setFlight] = React.useState({\n start: Infinity,\n stop: -Infinity,\n duration: 0\n });\n const [igcs, setIgcs] = React.useState(() => {\n Promise.all(igcsDesc.map((i) => fetch(i.i).then((r) => r.text()))).then((r) => setIgcs(r));\n return [];\n });\n\n const styles = {\n redCircle: useRStyle(),\n blueCircle: useRStyle(),\n // This is a technique for an array of React.RefObjects\n // It is ugly but it works\n flightPath: React.useRef([])\n };\n\n // createRef instead of useRef here will severely impact performance\n const igcVectorLayer = React.useRef();\n const highlightVectorLayer = React.useRef();\n\n return (\n \n {React.useMemo(\n // This is not a dynamic RStyle, these are 5 static RStyle's\n // Thus the useMemo\n () =>\n igcsDesc.map((igc, idx) => (\n (styles.flightPath.current[idx] = el)}>\n \n \n )),\n [styles.flightPath]\n )}\n \n \n \n \n \n \n \n \n \n \n \n ) => {\n // This useCallback is very important -> without it\n // onPointerMove will be a new anonymous function on every render\n const source = igcVectorLayer.current.source;\n const feature = source.getClosestFeatureToCoordinate(e.coordinate);\n // Did the user move the mouse before the flight paths were loaded?\n if (feature === null) return;\n const point = feature.getGeometry().getClosestPoint(e.coordinate);\n const date = new Date(point[2] * 1000);\n setPoint(new Point(point));\n setLine(new LineString([e.coordinate, [point[0], point[1]]]));\n setTime(\n '' +\n feature.get('PLT') +\n '
    ' +\n date.toUTCString() +\n ''\n );\n e.map.render();\n },\n [igcVectorLayer]\n )}\n >\n \n {\n // This layer contains the flight paths, we install an `onAddFeature` handler\n // to receive all features as their loaded to do additional processing\n }\n {\n const geometry = e.feature.getGeometry() as LineString;\n flight.start = Math.min(flight.start, geometry.getFirstCoordinate()[2]);\n flight.stop = Math.max(flight.stop, geometry.getLastCoordinate()[2]);\n flight.duration = flight.stop - flight.start;\n setFlight({...flight});\n },\n [flight]\n )}\n onPostRender={useCallback(\n // This useCallback is less efficient than the previous one\n // as it depends on the state\n // LayerVector is re-rendered every time point/line change\n (e: RenderEvent) => {\n const vectorContext = getVectorContext(e);\n vectorContext.setStyle(RStyle.getStyleStatic(styles.redCircle));\n if (point && line) {\n vectorContext.drawGeometry(point);\n vectorContext.drawGeometry(line);\n }\n },\n [point, line, styles.redCircle]\n )}\n >\n {React.useMemo(\n () => (\n // This component appears dynamic to React because of the map but it is in fact constant\n // useMemo will render it truly constant\n \n {igcs.map((igc, idx) => (\n \n ))}\n \n ),\n // The array trick renders it impossible for React to track the useMemo dependencies\n // -> we do it manually\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [igcs, styles.flightPath, styles.flightPath.current[0]]\n )}\n
    \n {\n // This layer contains the blue circle (the highlighted section)\n }\n \n {React.useMemo(\n () => (\n // This component appears dynamic to React because of the map but it is in fact constant\n // useMemo will render it truly constant\n \n {highlights.map((coords, i) => (\n \n ))}\n \n ),\n [highlights]\n )}\n \n \n
    \n \n
    \n {\n const value = parseInt(e.currentTarget.value);\n setSlider(value);\n const source = igcVectorLayer.current.source;\n const m = flight.start + (flight.duration * value) / 100;\n const newHighlights = [];\n source.forEachFeature((feature) => {\n if (!feature.get('PLT')) return;\n const geometry = feature.getGeometry() as LineString;\n const coords = geometry.getCoordinateAtM(m, true);\n newHighlights.push(coords);\n });\n setHighlights(newHighlights);\n },\n [igcVectorLayer, flight]\n )}\n />\n
    \n
    \n \n );\n}\n"}}]); \ No newline at end of file diff --git a/5408.bundle.js b/5408.bundle.js index b303b1dd..25748f9f 100644 --- a/5408.bundle.js +++ b/5408.bundle.js @@ -1 +1 @@ -(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[5408],{6570:t=>{"use strict";function e(t,e,n){n=n||2;var r,o,a,l,u,d,_,f=e&&e.length,p=f?e[0]*n:t.length,m=i(t,0,p,n,!0),x=[];if(!m||m.next===m.prev)return x;if(f&&(m=function(t,e,n,s){var r,o,a,l=[];for(r=0,o=e.length;r80*n){r=a=t[0],o=l=t[1];for(var v=n;va&&(a=u),d>l&&(l=d);_=0!==(_=Math.max(a-r,l-o))?32767/_:0}return s(m,x,n,r,o,_,0),x}function i(t,e,i,n,s){var r,o;if(s===R(t,e,i,n)>0)for(r=e;r=e;r-=n)o=A(r,t[r],t[r+1],o);return o&&m(o,o.next)&&(C(o),o=o.next),o}function n(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!m(n,n.next)&&0!==p(n.prev,n,n.next))n=n.next;else{if(C(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function s(t,e,i,h,c,u,g){if(t){!g&&u&&function(t,e,i,n){var s=t;do{0===s.z&&(s.z=d(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,l,h=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||l>0&&n;)0!==a&&(0===l||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,l--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,h*=2}while(o>1)}(s)}(t,h,c,u);for(var _,f,p=t;t.prev!==t.next;)if(_=t.prev,f=t.next,u?o(t,h,c,u):r(t))e.push(_.i/i|0),e.push(t.i/i|0),e.push(f.i/i|0),C(t),t=f.next,p=f.next;else if((t=f)===p){g?1===g?s(t=a(n(t),e,i),e,i,h,c,u,2):2===g&&l(t,e,i,h,c,u):s(n(t),e,i,h,c,u,1);break}}}function r(t){var e=t.prev,i=t,n=t.next;if(p(e,i,n)>=0)return!1;for(var s=e.x,r=i.x,o=n.x,a=e.y,l=i.y,h=n.y,c=sr?s>o?s:o:r>o?r:o,g=a>l?a>h?a:h:l>h?l:h,f=n.next;f!==e;){if(f.x>=c&&f.x<=d&&f.y>=u&&f.y<=g&&_(s,a,r,l,o,h,f.x,f.y)&&p(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function o(t,e,i,n){var s=t.prev,r=t,o=t.next;if(p(s,r,o)>=0)return!1;for(var a=s.x,l=r.x,h=o.x,c=s.y,u=r.y,g=o.y,f=al?a>h?a:h:l>h?l:h,v=c>u?c>g?c:g:u>g?u:g,y=d(f,m,e,i,n),E=d(x,v,e,i,n),T=t.prevZ,A=t.nextZ;T&&T.z>=y&&A&&A.z<=E;){if(T.x>=f&&T.x<=x&&T.y>=m&&T.y<=v&&T!==s&&T!==o&&_(a,c,l,u,h,g,T.x,T.y)&&p(T.prev,T,T.next)>=0)return!1;if(T=T.prevZ,A.x>=f&&A.x<=x&&A.y>=m&&A.y<=v&&A!==s&&A!==o&&_(a,c,l,u,h,g,A.x,A.y)&&p(A.prev,A,A.next)>=0)return!1;A=A.nextZ}for(;T&&T.z>=y;){if(T.x>=f&&T.x<=x&&T.y>=m&&T.y<=v&&T!==s&&T!==o&&_(a,c,l,u,h,g,T.x,T.y)&&p(T.prev,T,T.next)>=0)return!1;T=T.prevZ}for(;A&&A.z<=E;){if(A.x>=f&&A.x<=x&&A.y>=m&&A.y<=v&&A!==s&&A!==o&&_(a,c,l,u,h,g,A.x,A.y)&&p(A.prev,A,A.next)>=0)return!1;A=A.nextZ}return!0}function a(t,e,i){var s=t;do{var r=s.prev,o=s.next.next;!m(r,o)&&x(r,s,s.next,o)&&E(r,o)&&E(o,r)&&(e.push(r.i/i|0),e.push(s.i/i|0),e.push(o.i/i|0),C(s),C(s.next),s=t=o),s=s.next}while(s!==t);return n(s)}function l(t,e,i,r,o,a){var l=t;do{for(var h=l.next.next;h!==l.prev;){if(l.i!==h.i&&f(l,h)){var c=T(l,h);return l=n(l,l.next),c=n(c,c.next),s(l,e,i,r,o,a,0),void s(c,e,i,r,o,a,0)}h=h.next}l=l.next}while(l!==t)}function h(t,e){return t.x-e.x}function c(t,e){var i=function(t,e){var i,n=e,s=t.x,r=t.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o&&(o=a,i=n.x=n.x&&n.x>=c&&s!==n.x&&_(ri.x||n.x===i.x&&u(i,n)))&&(i=n,g=l)),n=n.next}while(n!==h);return i}(t,e);if(!i)return e;var s=T(i,t);return n(s,s.next),n(i,i.next)}function u(t,e){return p(t.prev,t,e.prev)<0&&p(e.next,t,t.next)<0}function d(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-i)*s|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*s|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function g(t){var e=t,i=t;do{(e.x=(t-o)*(r-a)&&(t-o)*(n-a)>=(i-o)*(e-a)&&(i-o)*(r-a)>=(s-o)*(n-a)}function f(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&x(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(E(t,e)&&E(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)&&(p(t.prev,t,e.prev)||p(t,e.prev,e))||m(t,e)&&p(t.prev,t,t.next)>0&&p(e.prev,e,e.next)>0)}function p(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function m(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,i,n){var s=y(p(t,e,i)),r=y(p(t,e,n)),o=y(p(i,n,t)),a=y(p(i,n,e));return s!==r&&o!==a||!(0!==s||!v(t,i,e))||!(0!==r||!v(t,n,e))||!(0!==o||!v(i,t,n))||!(0!==a||!v(i,e,n))}function v(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function y(t){return t>0?1:t<0?-1:0}function E(t,e){return p(t.prev,t,t.next)<0?p(t,e,t.next)>=0&&p(t,t.prev,e)>=0:p(t,e,t.prev)<0||p(t,t.next,e)<0}function T(t,e){var i=new S(t.i,t.x,t.y),n=new S(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function A(t,e,i,n){var s=new S(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function C(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function R(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},5341:function(t){t.exports=function(){"use strict";function t(t,n,s,r,o){!function t(i,n,s,r,o){for(;r>s;){if(r-s>600){var a=r-s+1,l=n-s+1,h=Math.log(a),c=.5*Math.exp(2*h/3),u=.5*Math.sqrt(h*c*(a-c)/a)*(l-a/2<0?-1:1);t(i,n,Math.max(s,Math.floor(n-l*c/a+u)),Math.min(r,Math.floor(n+(a-l)*c/a+u)),o)}var d=i[n],g=s,_=r;for(e(i,s,n),o(i[r],d)>0&&e(i,s,r);g<_;){for(e(i,g,_),g++,_--;o(i[g],d)<0;)g++;for(;o(i[_],d)>0;)_--}0===o(i[s],d)?e(i,s,_):e(i,++_,r),_<=n&&(s=_+1),n<=_&&(r=_-1)}}(t,n,s||0,r||t.length-1,o||i)}function e(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function i(t,e){return te?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function s(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n=t.minX&&e.maxY>=t.minY}function _(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function f(e,i,n,s,r){for(var o=[i,n];o.length;)if(!((n=o.pop())-(i=o.pop())<=s)){var a=i+Math.ceil((n-i)/s/2)*s;t(e,a,i,n,r),o.push(i,a,a,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,i=[];if(!g(t,e))return i;for(var n=this.toBBox,s=[];e;){for(var r=0;r=0&&s[e].children.length>this._maxEntries;)this._split(s,e),e--;this._adjustParentBBoxes(n,s,e)},n.prototype._split=function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var o=this._chooseSplitIndex(i,s,n),a=_(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,r(i,this.toBBox),r(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},n.prototype._splitRoot=function(t,e){this.data=_([t,e]),this.data.height=t.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,i){for(var n,s,r,a,l,h,u,d=1/0,g=1/0,_=e;_<=i-e;_++){var f=o(t,0,_,this.toBBox),p=o(t,_,i,this.toBBox),m=(s=f,r=p,void 0,void 0,void 0,void 0,a=Math.max(s.minX,r.minX),l=Math.max(s.minY,r.minY),h=Math.min(s.maxX,r.maxX),u=Math.min(s.maxY,r.maxY),Math.max(0,h-a)*Math.max(0,u-l)),x=c(f)+c(p);m=e;g--){var _=t.children[g];a(l,t.leaf?s(_):_),h+=u(l)}return h},n.prototype._adjustParentBBoxes=function(t,e,i){for(var n=i;n>=0;n--)a(e[n],t)},n.prototype._condense=function(t){for(var e=t.length-1,i=void 0;e>=0;e--)0===t[e].children.length?e>0?(i=t[e-1].children).splice(i.indexOf(t[e]),1):this.clear():r(t[e],this.toBBox)},n}()},9303:(t,e,i)=>{"use strict";i.d(e,{q:()=>g});const n="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,s=new Set,r={env:{RLAYERS_DEBUG:void 0}},o=(t,e,i,n)=>{"function"==typeof r.emitWarning?r.emitWarning(t,e,i,n):console.error(`[${i}] ${e}: ${t}`)};let a=globalThis.AbortController,l=globalThis.AbortSignal;if(void 0===a){l=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(t,e){this._onabort.push(e)}},a=class{constructor(){e()}signal=new l;abort(t){if(!this.signal.aborted){this.signal.reason=t,this.signal.aborted=!0;for(const e of this.signal._onabort)e(t);this.signal.onabort?.(t)}}};let t="1"!==r.env?.LRU_CACHE_IGNORE_AC_WARNING;const e=()=>{t&&(t=!1,o("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}Symbol("type");const h=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),c=t=>h(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?u:null:null;class u extends Array{constructor(t){super(t),this.fill(0)}}class d{heap;length;static#t=!1;static create(t){const e=c(t);if(!e)return[];d.#t=!0;const i=new d(t,e);return d.#t=!1,i}constructor(t,e){if(!d.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class g{#e;#i;#n;#s;#r;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#a;#l;#h;#c;#u;#d;#g;#_;#f;#p;#m;#x;#v;#y;#E;#T;static unsafeExposeInternals(t){return{starts:t.#x,ttls:t.#v,sizes:t.#m,keyMap:t.#l,keyList:t.#h,valList:t.#c,next:t.#u,prev:t.#d,get head(){return t.#g},get tail(){return t.#_},free:t.#f,isBackgroundFetch:e=>t.#A(e),backgroundFetch:(e,i,n,s)=>t.#C(e,i,n,s),moveToTail:e=>t.#S(e),indexes:e=>t.#R(e),rindexes:e=>t.#w(e),isStale:e=>t.#b(e)}}get max(){return this.#e}get maxSize(){return this.#i}get calculatedSize(){return this.#a}get size(){return this.#o}get fetchMethod(){return this.#r}get dispose(){return this.#n}get disposeAfter(){return this.#s}constructor(t){const{max:e=0,ttl:i,ttlResolution:n=1,ttlAutopurge:r,updateAgeOnGet:a,updateAgeOnHas:l,allowStale:u,dispose:_,disposeAfter:f,noDisposeOnSet:p,noUpdateTTL:m,maxSize:x=0,maxEntrySize:v=0,sizeCalculation:y,fetchMethod:E,noDeleteOnFetchRejection:T,noDeleteOnStaleGet:A,allowStaleOnFetchRejection:C,allowStaleOnFetchAbort:S,ignoreFetchAbort:R}=t;if(0!==e&&!h(e))throw new TypeError("max option must be a nonnegative integer");const w=e?c(e):Array;if(!w)throw new Error("invalid max value: "+e);if(this.#e=e,this.#i=x,this.maxEntrySize=v||this.#i,this.sizeCalculation=y,this.sizeCalculation){if(!this.#i&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==E&&"function"!=typeof E)throw new TypeError("fetchMethod must be a function if specified");if(this.#r=E,this.#E=!!E,this.#l=new Map,this.#h=new Array(e).fill(void 0),this.#c=new Array(e).fill(void 0),this.#u=new w(e),this.#d=new w(e),this.#g=0,this.#_=0,this.#f=d.create(e),this.#o=0,this.#a=0,"function"==typeof _&&(this.#n=_),"function"==typeof f?(this.#s=f,this.#p=[]):(this.#s=void 0,this.#p=void 0),this.#y=!!this.#n,this.#T=!!this.#s,this.noDisposeOnSet=!!p,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!T,this.allowStaleOnFetchRejection=!!C,this.allowStaleOnFetchAbort=!!S,this.ignoreFetchAbort=!!R,0!==this.maxEntrySize){if(0!==this.#i&&!h(this.#i))throw new TypeError("maxSize must be a positive integer if specified");if(!h(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#I()}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!A,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!l,this.ttlResolution=h(n)||0===n?n:1,this.ttlAutopurge=!!r,this.ttl=i||0,this.ttl){if(!h(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#L()}if(0===this.#e&&0===this.ttl&&0===this.#i)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#i){const t="LRU_CACHE_UNBOUNDED";(t=>!s.has(t))(t)&&(s.add(t),o("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",t,g))}}getRemainingTTL(t){return this.#l.has(t)?1/0:0}#L(){const t=new u(this.#e),e=new u(this.#e);this.#v=t,this.#x=e,this.#P=(i,s,r=n.now())=>{if(e[i]=0!==s?r:0,t[i]=s,0!==s&&this.ttlAutopurge){const t=setTimeout((()=>{this.#b(i)&&this.delete(this.#h[i])}),s+1);t.unref&&t.unref()}},this.#M=i=>{e[i]=0!==t[i]?n.now():0},this.#D=(n,r)=>{if(t[r]){const o=t[r],a=e[r];if(!o||!a)return;n.ttl=o,n.start=a,n.now=i||s();const l=n.now-a;n.remainingTTL=o-l}};let i=0;const s=()=>{const t=n.now();if(this.ttlResolution>0){i=t;const e=setTimeout((()=>i=0),this.ttlResolution);e.unref&&e.unref()}return t};this.getRemainingTTL=n=>{const r=this.#l.get(n);if(void 0===r)return 0;const o=t[r],a=e[r];return o&&a?o-((i||s())-a):1/0},this.#b=n=>{const r=e[n],o=t[n];return!!o&&!!r&&(i||s())-r>o}}#M=()=>{};#D=()=>{};#P=()=>{};#b=()=>!1;#I(){const t=new u(this.#e);this.#a=0,this.#m=t,this.#F=e=>{this.#a-=t[e],t[e]=0},this.#O=(t,e,i,n)=>{if(this.#A(e))return 0;if(!h(i)){if(!n)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof n)throw new TypeError("sizeCalculation must be a function");if(i=n(e,t),!h(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return i},this.#k=(e,i,n)=>{if(t[e]=i,this.#i){const i=this.#i-t[e];for(;this.#a>i;)this.#N(!0)}this.#a+=t[e],n&&(n.entrySize=i,n.totalCalculatedSize=this.#a)}}#F=t=>{};#k=(t,e,i)=>{};#O=(t,e,i,n)=>{if(i||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#R({allowStale:t=this.allowStale}={}){if(this.#o)for(let e=this.#_;this.#G(e)&&(!t&&this.#b(e)||(yield e),e!==this.#g);)e=this.#d[e]}*#w({allowStale:t=this.allowStale}={}){if(this.#o)for(let e=this.#g;this.#G(e)&&(!t&&this.#b(e)||(yield e),e!==this.#_);)e=this.#u[e]}#G(t){return void 0!==t&&this.#l.get(this.#h[t])===t}*entries(){for(const t of this.#R())void 0===this.#c[t]||void 0===this.#h[t]||this.#A(this.#c[t])||(yield[this.#h[t],this.#c[t]])}*rentries(){for(const t of this.#w())void 0===this.#c[t]||void 0===this.#h[t]||this.#A(this.#c[t])||(yield[this.#h[t],this.#c[t]])}*keys(){for(const t of this.#R()){const e=this.#h[t];void 0===e||this.#A(this.#c[t])||(yield e)}}*rkeys(){for(const t of this.#w()){const e=this.#h[t];void 0===e||this.#A(this.#c[t])||(yield e)}}*values(){for(const t of this.#R())void 0===this.#c[t]||this.#A(this.#c[t])||(yield this.#c[t])}*rvalues(){for(const t of this.#w())void 0===this.#c[t]||this.#A(this.#c[t])||(yield this.#c[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(const i of this.#R()){const n=this.#c[i],s=this.#A(n)?n.__staleWhileFetching:n;if(void 0!==s&&t(s,this.#h[i],this))return this.get(this.#h[i],e)}}forEach(t,e=this){for(const i of this.#R()){const n=this.#c[i],s=this.#A(n)?n.__staleWhileFetching:n;void 0!==s&&t.call(e,s,this.#h[i],this)}}rforEach(t,e=this){for(const i of this.#w()){const n=this.#c[i],s=this.#A(n)?n.__staleWhileFetching:n;void 0!==s&&t.call(e,s,this.#h[i],this)}}purgeStale(){let t=!1;for(const e of this.#w({allowStale:!0}))this.#b(e)&&(this.delete(this.#h[e]),t=!0);return t}info(t){const e=this.#l.get(t);if(void 0===e)return;const i=this.#c[e],s=this.#A(i)?i.__staleWhileFetching:i;if(void 0===s)return;const r={value:s};if(this.#v&&this.#x){const t=this.#v[e],i=this.#x[e];if(t&&i){const e=t-(n.now()-i);r.ttl=e,r.start=Date.now()}}return this.#m&&(r.size=this.#m[e]),r}dump(){const t=[];for(const e of this.#R({allowStale:!0})){const i=this.#h[e],s=this.#c[e],r=this.#A(s)?s.__staleWhileFetching:s;if(void 0===r||void 0===i)continue;const o={value:r};if(this.#v&&this.#x){o.ttl=this.#v[e];const t=n.now()-this.#x[e];o.start=Math.floor(Date.now()-t)}this.#m&&(o.size=this.#m[e]),t.unshift([i,o])}return t}load(t){this.clear();for(const[e,i]of t){if(i.start){const t=Date.now()-i.start;i.start=n.now()-t}this.set(e,i.value,i)}}set(t,e,i={}){if(void 0===e)return this.delete(t),this;const{ttl:n=this.ttl,start:s,noDisposeOnSet:r=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:a}=i;let{noUpdateTTL:l=this.noUpdateTTL}=i;const h=this.#O(t,e,i.size||0,o);if(this.maxEntrySize&&h>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.delete(t),this;let c=0===this.#o?void 0:this.#l.get(t);if(void 0===c)c=0===this.#o?this.#_:0!==this.#f.length?this.#f.pop():this.#o===this.#e?this.#N(!1):this.#o,this.#h[c]=t,this.#c[c]=e,this.#l.set(t,c),this.#u[this.#_]=c,this.#d[c]=this.#_,this.#_=c,this.#o++,this.#k(c,h,a),a&&(a.set="add"),l=!1;else{this.#S(c);const i=this.#c[c];if(e!==i){if(this.#E&&this.#A(i)){i.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:e}=i;void 0===e||r||(this.#y&&this.#n?.(e,t,"set"),this.#T&&this.#p?.push([e,t,"set"]))}else r||(this.#y&&this.#n?.(i,t,"set"),this.#T&&this.#p?.push([i,t,"set"]));if(this.#F(c),this.#k(c,h,a),this.#c[c]=e,a){a.set="replace";const t=i&&this.#A(i)?i.__staleWhileFetching:i;void 0!==t&&(a.oldValue=t)}}else a&&(a.set="update")}if(0===n||this.#v||this.#L(),this.#v&&(l||this.#P(c,n,s),a&&this.#D(a,c)),!r&&this.#T&&this.#p){const t=this.#p;let e;for(;e=t?.shift();)this.#s?.(...e)}return this}pop(){try{for(;this.#o;){const t=this.#c[this.#g];if(this.#N(!0),this.#A(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(void 0!==t)return t}}finally{if(this.#T&&this.#p){const t=this.#p;let e;for(;e=t?.shift();)this.#s?.(...e)}}}#N(t){const e=this.#g,i=this.#h[e],n=this.#c[e];return this.#E&&this.#A(n)?n.__abortController.abort(new Error("evicted")):(this.#y||this.#T)&&(this.#y&&this.#n?.(n,i,"evict"),this.#T&&this.#p?.push([n,i,"evict"])),this.#F(e),t&&(this.#h[e]=void 0,this.#c[e]=void 0,this.#f.push(e)),1===this.#o?(this.#g=this.#_=0,this.#f.length=0):this.#g=this.#u[e],this.#l.delete(i),this.#o--,e}has(t,e={}){const{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=e,s=this.#l.get(t);if(void 0!==s){const t=this.#c[s];if(this.#A(t)&&void 0===t.__staleWhileFetching)return!1;if(!this.#b(s))return i&&this.#M(s),n&&(n.has="hit",this.#D(n,s)),!0;n&&(n.has="stale",this.#D(n,s))}else n&&(n.has="miss");return!1}peek(t,e={}){const{allowStale:i=this.allowStale}=e,n=this.#l.get(t);if(void 0===n||!i&&this.#b(n))return;const s=this.#c[n];return this.#A(s)?s.__staleWhileFetching:s}#C(t,e,i,n){const s=void 0===e?void 0:this.#c[e];if(this.#A(s))return s;const r=new a,{signal:o}=i;o?.addEventListener("abort",(()=>r.abort(o.reason)),{signal:r.signal});const l={signal:r.signal,options:i,context:n},h=(n,s=!1)=>{const{aborted:o}=r.signal,a=i.ignoreFetchAbort&&void 0!==n;if(i.status&&(o&&!s?(i.status.fetchAborted=!0,i.status.fetchError=r.signal.reason,a&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),o&&!a&&!s)return c(r.signal.reason);const h=u;return this.#c[e]===u&&(void 0===n?h.__staleWhileFetching?this.#c[e]=h.__staleWhileFetching:this.delete(t):(i.status&&(i.status.fetchUpdated=!0),this.set(t,n,l.options))),n},c=n=>{const{aborted:s}=r.signal,o=s&&i.allowStaleOnFetchAbort,a=o||i.allowStaleOnFetchRejection,l=a||i.noDeleteOnFetchRejection,h=u;if(this.#c[e]===u&&(l&&void 0!==h.__staleWhileFetching?o||(this.#c[e]=h.__staleWhileFetching):this.delete(t)),a)return i.status&&void 0!==h.__staleWhileFetching&&(i.status.returnedStale=!0),h.__staleWhileFetching;if(h.__returned===h)throw n};i.status&&(i.status.fetchDispatched=!0);const u=new Promise(((e,n)=>{const o=this.#r?.(t,s,l);o&&o instanceof Promise&&o.then((t=>e(void 0===t?void 0:t)),n),r.signal.addEventListener("abort",(()=>{i.ignoreFetchAbort&&!i.allowStaleOnFetchAbort||(e(void 0),i.allowStaleOnFetchAbort&&(e=t=>h(t,!0)))}))})).then(h,(t=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=t),c(t)))),d=Object.assign(u,{__abortController:r,__staleWhileFetching:s,__returned:void 0});return void 0===e?(this.set(t,d,{...l.options,status:void 0}),e=this.#l.get(t)):this.#c[e]=d,d}#A(t){if(!this.#E)return!1;const e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof a}async fetch(t,e={}){const{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:r=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:_,forceRefresh:f=!1,status:p,signal:m}=e;if(!this.#E)return p&&(p.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,status:p});const x={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,ttl:r,noDisposeOnSet:o,size:a,sizeCalculation:l,noUpdateTTL:h,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:g,ignoreFetchAbort:d,status:p,signal:m};let v=this.#l.get(t);if(void 0===v){p&&(p.fetch="miss");const e=this.#C(t,v,x,_);return e.__returned=e}{const e=this.#c[v];if(this.#A(e)){const t=i&&void 0!==e.__staleWhileFetching;return p&&(p.fetch="inflight",t&&(p.returnedStale=!0)),t?e.__staleWhileFetching:e.__returned=e}const s=this.#b(v);if(!f&&!s)return p&&(p.fetch="hit"),this.#S(v),n&&this.#M(v),p&&this.#D(p,v),e;const r=this.#C(t,v,x,_),o=void 0!==r.__staleWhileFetching&&i;return p&&(p.fetch=s?"stale":"refresh",o&&s&&(p.returnedStale=!0)),o?r.__staleWhileFetching:r.__returned=r}}get(t,e={}){const{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:r}=e,o=this.#l.get(t);if(void 0!==o){const e=this.#c[o],a=this.#A(e);return r&&this.#D(r,o),this.#b(o)?(r&&(r.get="stale"),a?(r&&i&&void 0!==e.__staleWhileFetching&&(r.returnedStale=!0),i?e.__staleWhileFetching:void 0):(s||this.delete(t),r&&i&&(r.returnedStale=!0),i?e:void 0)):(r&&(r.get="hit"),a?e.__staleWhileFetching:(this.#S(o),n&&this.#M(o),e))}r&&(r.get="miss")}#z(t,e){this.#d[e]=t,this.#u[t]=e}#S(t){t!==this.#_&&(t===this.#g?this.#g=this.#u[t]:this.#z(this.#d[t],this.#u[t]),this.#z(this.#_,t),this.#_=t)}delete(t){let e=!1;if(0!==this.#o){const i=this.#l.get(t);if(void 0!==i)if(e=!0,1===this.#o)this.clear();else{this.#F(i);const e=this.#c[i];if(this.#A(e)?e.__abortController.abort(new Error("deleted")):(this.#y||this.#T)&&(this.#y&&this.#n?.(e,t,"delete"),this.#T&&this.#p?.push([e,t,"delete"])),this.#l.delete(t),this.#h[i]=void 0,this.#c[i]=void 0,i===this.#_)this.#_=this.#d[i];else if(i===this.#g)this.#g=this.#u[i];else{const t=this.#d[i];this.#u[t]=this.#u[i];const e=this.#u[i];this.#d[e]=this.#d[i]}this.#o--,this.#f.push(i)}}if(this.#T&&this.#p?.length){const t=this.#p;let e;for(;e=t?.shift();)this.#s?.(...e)}return e}clear(){for(const t of this.#w({allowStale:!0})){const e=this.#c[t];if(this.#A(e))e.__abortController.abort(new Error("deleted"));else{const i=this.#h[t];this.#y&&this.#n?.(e,i,"delete"),this.#T&&this.#p?.push([e,i,"delete"])}}if(this.#l.clear(),this.#c.fill(void 0),this.#h.fill(void 0),this.#v&&this.#x&&(this.#v.fill(0),this.#x.fill(0)),this.#m&&this.#m.fill(0),this.#g=0,this.#_=0,this.#f.length=0,this.#a=0,this.#o=0,this.#T&&this.#p){const t=this.#p;let e;for(;e=t?.shift();)this.#s?.(...e)}}}},71:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(4120),s=i(2135),r=i(1685);const o="length";class a extends r.Ay{constructor(t,e,i){super(t),this.element=e,this.index=i}}class l extends n.A{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],this.unique_)for(let t=0,e=this.array_.length;t0;)this.pop()}extend(t){for(let e=0,i=t.length;ethis.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new a(s.A.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let i=0,n=e.length;i=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new a(s.A.REMOVE,e,t)),e}setAt(t,e){if(t>=this.getLength())return void this.insertAt(t,e);if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const i=this.array_[t];this.array_[t]=e,this.dispatchEvent(new a(s.A.REMOVE,i,t)),this.dispatchEvent(new a(s.A.ADD,e,t))}updateLength_(){this.set(o,this.array_.length)}assertUnique_(t,e){for(let i=0,n=this.array_.length;i{"use strict";i.d(e,{A:()=>n});const n={ADD:"add",REMOVE:"remove"}},7607:(t,e,i)=>{"use strict";i.d(e,{$r:()=>h,Ay:()=>d,bL:()=>a,xo:()=>o});var n=i(8143),s=i(1078),r=i(8711);function o(t){return t instanceof Image||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageBitmap?t:null}function a(t){return t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Float32Array||t instanceof DataView?t:null}let l=null;function h(t){l||(l=(0,r.Y)(t.width,t.height,void 0,{willReadFrequently:!0}));const e=l.canvas,i=t.width;e.width!==i&&(e.width=i);const n=t.height;return e.height!==n&&(e.height=n),l.clearRect(0,0,i,n),l.drawImage(t,0,0),l.getImageData(0,0,i,n).data}const c=[256,256];class u extends n.A{constructor(t){const e=s.A.IDLE;super(t.tileCoord,e,{transition:t.transition,interpolate:t.interpolate}),this.loader_=t.loader,this.data_=null,this.error_=null,this.size_=t.size||null}getSize(){if(this.size_)return this.size_;const t=o(this.data_);return t?[t.width,t.height]:c}getData(){return this.data_}getError(){return this.error_}load(){if(this.state!==s.A.IDLE&&this.state!==s.A.ERROR)return;this.state=s.A.LOADING,this.changed();const t=this;this.loader_().then((function(e){t.data_=e,t.state=s.A.LOADED,t.changed()})).catch((function(e){t.error_=e,t.state=s.A.ERROR,t.changed()}))}}const d=u},25:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n=class{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}},6717:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var n=i(4120),s=i(6837),r=i(588),o=i(9438);class a extends n.A{constructor(t){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),t)if("function"==typeof t.getSimplifiedGeometry){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new a(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const i=this.getStyle();return i&&t.setStyle(i),t}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&((0,o.JH)(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=(0,o.KT)(t,s.A.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?function(t){if("function"==typeof t)return t;let e;return Array.isArray(t)?e=t:((0,r.v)("function"==typeof t.getZIndex,"Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),e=[t]),function(){return e}}(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}const l=a},5213:(t,e,i)=>{"use strict";i.d(e,{A:()=>y});var n=i(1685),s=i(4120),r=i(1064),o=i(3407),a=i(1597);const l="accuracy",h="accuracyGeometry",c="altitude",u="altitudeAccuracy",d="heading",g="position",_="projection",f="speed",p="tracking",m="trackingOptions";class x extends n.Ay{constructor(t){super("error"),this.code=t.code,this.message=t.message}}class v extends s.A{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.position_=null,this.transform_=o.R6,this.watchId_=void 0,this.addChangeListener(_,this.handleProjectionChanged_),this.addChangeListener(p,this.handleTrackingChanged_),void 0!==t.projection&&this.setProjection(t.projection),void 0!==t.trackingOptions&&this.setTrackingOptions(t.trackingOptions),this.setTracking(void 0!==t.tracking&&t.tracking)}disposeInternal(){this.setTracking(!1),super.disposeInternal()}handleProjectionChanged_(){const t=this.getProjection();t&&(this.transform_=(0,o.FO)((0,o.Jt)("EPSG:4326"),t),this.position_&&this.set(g,this.transform_(this.position_)))}handleTrackingChanged_(){if("geolocation"in navigator){const t=this.getTracking();t&&void 0===this.watchId_?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):t||void 0===this.watchId_||(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}}positionChange_(t){const e=t.coords;this.set(l,e.accuracy),this.set(c,null===e.altitude?void 0:e.altitude),this.set(u,null===e.altitudeAccuracy?void 0:e.altitudeAccuracy),this.set(d,null===e.heading?void 0:(0,a.eh)(e.heading)),this.position_?(this.position_[0]=e.longitude,this.position_[1]=e.latitude):this.position_=[e.longitude,e.latitude];const i=this.transform_(this.position_);this.set(g,i.slice()),this.set(f,null===e.speed?void 0:e.speed);const n=(0,r.kj)(this.position_,e.accuracy);n.applyTransform(this.transform_),this.set(h,n),this.changed()}positionError_(t){this.dispatchEvent(new x(t))}getAccuracy(){return this.get(l)}getAccuracyGeometry(){return this.get(h)||null}getAltitude(){return this.get(c)}getAltitudeAccuracy(){return this.get(u)}getHeading(){return this.get(d)}getPosition(){return this.get(g)}getProjection(){return this.get(_)}getSpeed(){return this.get(f)}getTracking(){return this.get(p)}getTrackingOptions(){return this.get(m)}setProjection(t){this.set(_,(0,o.Jt)(t))}setTracking(t){this.set(p,t)}setTrackingOptions(t){this.set(m,t)}}const y=v},3938:(t,e,i)=>{"use strict";i.d(e,{Ay:()=>g,D4:()=>d,RA:()=>u,f6:()=>c});var n=i(9332),s=i(6837),r=i(6141),o=i(7771),a=i(9438),l=i(4238);class h extends n.A{constructor(t,e,i,n){super(),this.extent=t,this.pixelRatio_=i,this.resolution=e,this.state="function"==typeof n?r.A.IDLE:n,this.image_=null,this.loader="function"==typeof n?n:null}changed(){this.dispatchEvent(s.A.CHANGE)}getExtent(){return this.extent}getImage(){return this.image_}getPixelRatio(){return this.pixelRatio_}getResolution(){return this.resolution}getState(){return this.state}load(){if(this.state==r.A.IDLE&&this.loader){this.state=r.A.LOADING,this.changed();const t=this.getResolution(),e=Array.isArray(t)?t[0]:t;(0,l.hq)((()=>this.loader(this.getExtent(),e,this.getPixelRatio()))).then((t=>{"image"in t&&(this.image_=t.image),"extent"in t&&(this.extent=t.extent),"resolution"in t&&(this.resolution=t.resolution),"pixelRatio"in t&&(this.pixelRatio_=t.pixelRatio),(t instanceof HTMLImageElement||t instanceof ImageBitmap||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement)&&(this.image_=t),this.state=r.A.LOADED})).catch((t=>{this.state=r.A.ERROR,console.error(t)})).finally((()=>this.changed()))}}setImage(t){this.image_=t}setResolution(t){this.resolution=t}}function c(t,e,i){const n=t;let r=!0,l=!1,h=!1;const c=[(0,a.Jz)(n,s.A.LOAD,(function(){h=!0,l||e()}))];return n.src&&o.DT?(l=!0,n.decode().then((function(){r&&e()})).catch((function(t){r&&(h?e():i())}))):c.push((0,a.Jz)(n,s.A.ERROR,i)),function(){r=!1,c.forEach(a.JH)}}function u(t,e){return e&&(t.src=e),t.src&&o.DT?new Promise(((e,i)=>t.decode().then((()=>e(t))).catch((n=>t.complete&&t.width?e(t):i(n))))):function(t,e){return new Promise(((e,i)=>{function n(){r(),e(t)}function s(){r(),i(new Error("Image load error"))}function r(){t.removeEventListener("load",n),t.removeEventListener("error",s)}t.addEventListener("load",n),t.addEventListener("error",s)}))}(t)}function d(t,e){return e&&(t.src=e),t.src&&o.DT&&o.XM?t.decode().then((()=>createImageBitmap(t))).catch((e=>{if(t.complete&&t.width)return t;throw e})):u(t)}const g=h},6141:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4}},190:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var n=i(8143),s=i(1078),r=i(8711),o=i(3938);class a extends n.A{constructor(t,e,i,n,s,r){super(t,e,r),this.crossOrigin_=n,this.src_=i,this.key=i,this.image_=new Image,null!==n&&(this.image_.crossOrigin=n),this.unlisten_=null,this.tileLoadFunction_=s}getImage(){return this.image_}setImage(t){this.image_=t,this.state=s.A.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=s.A.ERROR,this.unlistenImage_(),this.image_=function(){const t=(0,r.Y)(1,1);return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas}(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=s.A.LOADED:this.state=s.A.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==s.A.ERROR&&(this.state=s.A.IDLE,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==s.A.IDLE&&(this.state=s.A.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=(0,o.f6)(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}const l=a},2961:(t,e,i)=>{"use strict";i.d(e,{A:()=>mt});var n=i(4120),s=i(71),r=i(2135),o=i(2284),a=i(25),l=i(4238),h=i(4087),c=i(9703),u=i(915),d=i(2241),g=i(764),_=i(6933);class f extends a.A{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){(0,h.b0)()}calculateMatrices2D(t){const e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;(0,c.Zz)(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),(0,c.T9)(n,i)}forEachFeatureAtCoordinate(t,e,i,n,s,r,o,a){let l;const h=e.viewState;function c(t,e,i,n){return s.call(r,e,t?i:null,n)}const d=h.projection,f=(0,_.Li)(t.slice(),d),p=[[0,0]];if(d.canWrapX()&&n){const t=d.getExtent(),e=(0,u.RG)(t);p.push([-e,0],[e,0])}const m=e.layerStatesArray,x=m.length,v=[],y=[];for(let n=0;n=0;--s){const r=m[s],u=r.layer;if(u.hasRenderer()&&(0,g.l)(r,h)&&o.call(a,u)){const s=u.getRenderer(),o=u.getSource();if(s&&o){const a=o.getWrapX()?f:t,h=c.bind(null,r.managed);y[0]=a[0]+p[n][0],y[1]=a[1]+p[n][1],l=s.forEachFeatureAtCoordinate(y,e,i,h,v)}if(l)return l}}if(0===v.length)return;const E=1/v.length;return v.forEach(((t,e)=>t.distanceSq+=e*E)),v.sort(((t,e)=>t.distanceSq-e.distanceSq)),v.some((t=>l=t.callback(t.feature,t.layer,t.geometry))),l}hasFeatureAtCoordinate(t,e,i,n,s,r){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,n,l.rT,this,s,r)}getMap(){return this.map_}renderFrame(t){(0,h.b0)()}scheduleExpireIconCache(t){d.ue.canExpireCache()&&t.postRenderFunctions.push(p)}}function p(t,e){d.ue.expire()}const m=f;var x=i(8450),v=i(9960),y=i(3984),E=i(5176),T=i(8774),A=i(9438),C=i(8711);const S=class extends m{constructor(t){super(t),this.fontChangeListenerKey_=(0,A.KT)(T.yY,x.A.PROPERTYCHANGE,t.redrawText.bind(t)),this.element_=document.createElement("div");const e=this.element_.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.element_.className=E.XI+" ol-layers";const i=t.getViewport();i.insertBefore(this.element_,i.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(t,e){const i=this.getMap();if(i.hasListener(t)){const n=new v.A(t,void 0,e);i.dispatchEvent(n)}}disposeInternal(){(0,A.JH)(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),super.disposeInternal()}renderFrame(t){if(!t)return void(this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1));this.calculateMatrices2D(t),this.dispatchRenderEvent(y.A.PRECOMPOSE,t);const e=t.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex}));e.some((t=>t.layer instanceof o.A&&t.layer.getDeclutter()))&&(t.declutter={});const i=t.viewState;this.children_.length=0;const n=[];let s=null;for(let r=0,o=e.length;r=0;--i){const n=e[i],s=n.layer;s.getDeclutter()&&s.renderDeclutter(t,n)}e.forEach((e=>e.layer.renderDeferred(t)))}};var R=i(6837),w=i(8620),b=i(1685),I=i(588),L=i(3530);class P extends b.Ay{constructor(t,e){super(t),this.layer=e}}const M="layers";class D extends w.A{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let i=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(M,this.handleLayersChanged_),i?Array.isArray(i)?i=new s.A(i.slice(),{unique:!0}):(0,I.v)("function"==typeof i.getArray,"Expected `layers` to be an array or a `Collection`"):i=new s.A(void 0,{unique:!0}),this.setLayers(i)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(A.JH),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push((0,A.KT)(t,r.A.ADD,this.handleLayersAdd_,this),(0,A.KT)(t,r.A.REMOVE,this.handleLayersRemove_,this));for(const t in this.listenerKeys_)this.listenerKeys_[t].forEach(A.JH);(0,L.I)(this.listenerKeys_);const e=t.getArray();for(let t=0,i=e.length;t{this.clickTimeoutId_=void 0;const e=new O.A(k.A.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}),250)}updateActivePointers_(t){const e=t,i=e.pointerId;if(e.type==k.A.POINTERUP||e.type==k.A.POINTERCANCEL){delete this.trackedTouches_[i];for(const t in this.trackedTouches_)if(this.trackedTouches_[t].target!==e.target){delete this.trackedTouches_[t];break}}else e.type!=k.A.POINTERDOWN&&e.type!=k.A.POINTERMOVE||(this.trackedTouches_[i]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new O.A(k.A.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_.length&&(this.dragListenerKeys_.forEach(A.JH),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return 0===t.button}handlePointerDown_(t){this.emulateClicks_=0===this.activePointers_.length,this.updateActivePointers_(t);const e=new O.A(k.A.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);if(this.dispatchEvent(e),this.down_=new PointerEvent(t.type,t),Object.defineProperty(this.down_,"target",{writable:!1,value:t.target}),0===this.dragListenerKeys_.length){const t=this.map_.getOwnerDocument();this.dragListenerKeys_.push((0,A.KT)(t,k.A.POINTERMOVE,this.handlePointerMove_,this),(0,A.KT)(t,k.A.POINTERUP,this.handlePointerUp_,this),(0,A.KT)(this.element_,k.A.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==t&&this.dragListenerKeys_.push((0,A.KT)(this.element_.getRootNode(),k.A.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new O.A(k.A.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;const e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new O.A(k.A.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;e&&!e.defaultPrevented||"boolean"==typeof t.cancelable&&!0!==t.cancelable||t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&((0,A.JH)(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(R.A.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&((0,A.JH)(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(A.JH),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const B=j;var U=i(5801),X=i(2585),Z=i(3116);const W=1/0,Y=class{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,(0,L.I)(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const n=this.keyFunction_(i);return delete this.queuedElements_[n],i}enqueue(t){(0,I.v)(!(this.keyFunction_(t)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const e=this.priorityFunction_(t);return e!=W&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)}getCount(){return this.elements_.length}getLeftChildIndex_(t){return 2*t+1}getRightChildIndex_(t){return 2*t+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return 0===this.elements_.length}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,i=this.priorities_,n=e.length,s=e[t],r=i[t],o=t;for(;t>1;){const s=this.getLeftChildIndex_(t),r=this.getRightChildIndex_(t),o=rt;){const t=this.getParentIndex_(e);if(!(n[t]>r))break;i[e]=i[t],n[e]=n[t],e=t}i[e]=s,n[e]=r}reprioritize(){const t=this.priorityFunction_,e=this.elements_,i=this.priorities_;let n=0;const s=e.length;let r,o,a;for(o=0;o0;)n=this.dequeue()[0],s=n.getKey(),i=n.getState(),i!==V.A.IDLE||s in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[s]=!0,++this.tilesLoading_,++r,n.load())}};var q=i(3568),K=i(2703),$=i(7456),J=i(2898),Q=i(9186),tt=i(6068),et=i(4473),it=i(4051),nt=i(4423),st=i(9888),rt=i(6856);const ot=class{constructor(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(t,e){this.points_.push(t,e,Date.now())}end(){if(this.points_.length<6)return!1;const t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]0&&this.points_[i+2]>t;)i-=3;const n=this.points_[e+2]-this.points_[i+2];if(n<1e3/60)return!1;const s=this.points_[e]-this.points_[i],r=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(r,s),this.initialVelocity_=Math.sqrt(s*s+r*r)/n,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}};var at=i(8751),lt=i(3711),ht=i(5243),ct=i(6514),ut=i(3407),dt=i(4401),gt=i(4422);function _t(t){t instanceof g.A?t.setMapInternal(null):t instanceof F&&t.getLayers().forEach(_t)}function ft(t,e){if(t instanceof g.A)t.setMapInternal(e);else if(t instanceof F){const i=t.getLayers().getArray();for(let t=0,n=i.length;tthis.updateSize())),this.controls=e.controls||function(t){t=t||{};const e=new s.A;return(void 0===t.zoom||t.zoom)&&e.push(new Q.A(t.zoomOptions)),(void 0===t.rotate||t.rotate)&&e.push(new J.A(t.rotateOptions)),(void 0===t.attribution||t.attribution)&&e.push(new $.A(t.attributionOptions)),e}(),this.interactions=e.interactions||function(t){t=t||{};const e=new s.A,i=new ot(-.005,.05,100);return(void 0===t.altShiftDragRotate||t.altShiftDragRotate)&&e.push(new it.A),(void 0===t.doubleClickZoom||t.doubleClickZoom)&&e.push(new tt.A({delta:t.zoomDelta,duration:t.zoomDuration})),(void 0===t.dragPan||t.dragPan)&&e.push(new et.A({onFocusOnly:t.onFocusOnly,kinetic:i})),(void 0===t.pinchRotate||t.pinchRotate)&&e.push(new lt.A),(void 0===t.pinchZoom||t.pinchZoom)&&e.push(new ht.A({duration:t.zoomDuration})),(void 0===t.keyboard||t.keyboard)&&(e.push(new st.A),e.push(new rt.A({delta:t.zoomDelta,duration:t.zoomDuration}))),(void 0===t.mouseWheelZoom||t.mouseWheelZoom)&&e.push(new at.A({onFocusOnly:t.onFocusOnly,duration:t.zoomDuration})),(void 0===t.shiftDragZoom||t.shiftDragZoom)&&e.push(new nt.A({duration:t.zoomDuration})),e}({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new H(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(Z.A.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(Z.A.VIEW,this.handleViewChanged_),this.addChangeListener(Z.A.SIZE,this.handleSizeChanged_),this.addChangeListener(Z.A.TARGET,this.handleTargetChanged_),this.setProperties(e.values);const i=this;!t.view||t.view instanceof q.Ay||t.view.then((function(t){i.setView(new q.Ay(t))})),this.controls.addEventListener(r.A.ADD,(t=>{t.element.setMap(this)})),this.controls.addEventListener(r.A.REMOVE,(t=>{t.element.setMap(null)})),this.interactions.addEventListener(r.A.ADD,(t=>{t.element.setMap(this)})),this.interactions.addEventListener(r.A.REMOVE,(t=>{t.element.setMap(null)})),this.overlays_.addEventListener(r.A.ADD,(t=>{this.addOverlayInternal_(t.element)})),this.overlays_.addEventListener(r.A.REMOVE,(t=>{const e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)})),this.controls.forEach((t=>{t.setMap(this)})),this.interactions.forEach((t=>{t.setMap(this)})),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){this.getLayerGroup().getLayers().push(t)}handleLayerAdd_(t){ft(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,i){if(!this.frameState_||!this.renderer_)return;const n=this.getCoordinateFromPixelInternal(t),s=void 0!==(i=void 0!==i?i:{}).hitTolerance?i.hitTolerance:0,r=void 0!==i.layerFilter?i.layerFilter:l.rT,o=!1!==i.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,s,o,e,null,r,null)}getFeaturesAtPixel(t,e){const i=[];return this.forEachFeatureAtPixel(t,(function(t){i.push(t)}),e),i}getAllLayers(){const t=[];return function e(i){i.forEach((function(i){i instanceof F?e(i.getLayers()):t.push(i)}))}(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const i=this.getCoordinateFromPixelInternal(t),n=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:l.rT,s=void 0!==e.hitTolerance?e.hitTolerance:0,r=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,s,r,n,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const e=this.viewport_.getBoundingClientRect(),i=this.getSize(),n=e.width/i[0],s=e.height/i[1],r="changedTouches"in t?t.changedTouches[0]:t;return[(r.clientX-e.left)/n,(r.clientY-e.top)/s]}getTarget(){return this.get(Z.A.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(t){return(0,ut.te)(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?(0,c.Bb)(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(Z.A.LAYERGROUP)}setLayers(t){const e=this.getLayerGroup();if(t instanceof s.A)return void e.setLayers(t);const i=e.getLayers();i.clear(),i.extend(t)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,i=t.length;e=0;i--){const n=e[i];if(n.getMap()===this&&n.getActive()&&this.getTargetElement()&&(!n.handleEvent(t)||t.propagationStopped))break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let i=this.maxTilesLoading_,n=i;if(t){const e=t.viewHints;if(e[K.A.ANIMATING]||e[K.A.INTERACTING]){const e=Date.now()-t.time>8;i=e?0:8,n=e?0:2}}e.getTilesLoading(){this.postRenderTimeoutHandle_=void 0,this.handlePostRender()}),0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new P("removelayer",e)),this.set(Z.A.LAYERGROUP,t)}setSize(t){this.set(Z.A.SIZE,t)}setTarget(t){this.set(Z.A.TARGET,t)}setView(t){if(!t||t instanceof q.Ay)return void this.set(Z.A.VIEW,t);this.set(Z.A.VIEW,new q.Ay);const e=this;t.then((function(t){e.setView(new q.Ay(t))}))}updateSize(){const t=this.getTargetElement();let e;if(t){const i=getComputedStyle(t),n=t.offsetWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderRightWidth),s=t.offsetHeight-parseFloat(i.borderTopWidth)-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderBottomWidth);isNaN(n)||isNaN(s)||(e=[n,s],!(0,dt.Ie)(e)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&(0,gt.R8)("No map visible because the map container's width or height are 0."))}const i=this.getSize();!e||i&&(0,ct.aI)(e,i)||(this.setSize(e),this.updateViewportSize_(e))}updateViewportSize_(t){const e=this.getView();e&&e.setViewportSize(t)}}const mt=pt},277:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});var n=i(5801);class s extends n.A{constructor(t,e,i,n,s,r){super(t,e,s),this.originalEvent=i,this.pixel_=null,this.coordinate_=null,this.dragging=void 0!==n&&n,this.activePointers=r}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(t){this.pixel_=t}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(t){this.coordinate_=t}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}}const r=s},3445:(t,e,i)=>{"use strict";i.d(e,{A:()=>s});var n=i(6837);const s={SINGLECLICK:"singleclick",CLICK:n.A.CLICK,DBLCLICK:n.A.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"}},5801:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});var n=i(1685);class s extends n.Ay{constructor(t,e,i){super(t),this.map=e,this.frameState=void 0!==i?i:null}}const r=s},2585:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"}},3116:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"}},4120:(t,e,i)=>{"use strict";i.d(e,{A:()=>c});var n=i(1685),s=i(8450),r=i(1854),o=i(4087),a=i(3530);class l extends n.Ay{constructor(t,e,i){super(t),this.key=e,this.oldValue=i}}class h extends r.A{constructor(t){super(),this.on,this.once,this.un,(0,o.v6)(this),this.values_=null,void 0!==t&&this.setProperties(t)}get(t){let e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}getPropertiesInternal(){return this.values_}hasProperties(){return!!this.values_}notify(t,e){let i;i=`change:${t}`,this.hasListener(i)&&this.dispatchEvent(new l(i,t,e)),i=s.A.PROPERTYCHANGE,this.hasListener(i)&&this.dispatchEvent(new l(i,t,e))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,i){const n=this.values_||(this.values_={});if(i)n[t]=e;else{const i=n[t];n[t]=e,i!==e&&this.notify(t,i)}}setProperties(t,e){for(const i in t)this.set(i,t[i],e)}applyProperties(t){t.values_&&Object.assign(this.values_||(this.values_={}),t.values_)}unset(t,e){if(this.values_&&t in this.values_){const i=this.values_[t];delete this.values_[t],(0,a.p)(this.values_)&&(this.values_=null),e||this.notify(t,i)}}}const c=h},8450:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={PROPERTYCHANGE:"propertychange"}},1854:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(9332),s=i(6837),r=i(9438);class o extends n.A{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(s.A.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const i=t.length,n=new Array(i);for(let s=0;s{"use strict";i.d(e,{A:()=>f});var n=i(4120),s=i(2585),r=i(5176),o=i(915),a=i(9438),l=i(8711);const h="element",c="map",u="offset",d="position",g="positioning";class _ extends n.A{constructor(t){super(),this.on,this.once,this.un,this.options=t,this.id=t.id,this.insertFirst=void 0===t.insertFirst||t.insertFirst,this.stopEvent=void 0===t.stopEvent||t.stopEvent,this.element=document.createElement("div"),this.element.className=void 0!==t.className?t.className:"ol-overlay-container "+r.Q5,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=!0===t.autoPan?{}:t.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(h,this.handleElementChanged),this.addChangeListener(c,this.handleMapChanged),this.addChangeListener(u,this.handleOffsetChanged),this.addChangeListener(d,this.handlePositionChanged),this.addChangeListener(g,this.handlePositioningChanged),void 0!==t.element&&this.setElement(t.element),this.setOffset(void 0!==t.offset?t.offset:[0,0]),this.setPositioning(t.positioning||"top-left"),void 0!==t.position&&this.setPosition(t.position)}getElement(){return this.get(h)}getId(){return this.id}getMap(){return this.get(c)||null}getOffset(){return this.get(u)}getPosition(){return this.get(d)}getPositioning(){return this.get(g)}handleElementChanged(){(0,l.gS)(this.element);const t=this.getElement();t&&this.element.appendChild(t)}handleMapChanged(){this.mapPostrenderListenerKey&&((0,l.bf)(this.element),(0,a.JH)(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const t=this.getMap();if(t){this.mapPostrenderListenerKey=(0,a.KT)(t,s.A.POSTRENDER,this.render,this),this.updatePixelPosition();const e=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?e.insertBefore(this.element,e.childNodes[0]||null):e.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(t){this.set(h,t)}setMap(t){this.set(c,t)}setOffset(t){this.set(u,t)}setPosition(t){this.set(d,t)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(t){const e=this.getMap();if(!e||!e.getTargetElement()||!this.get(d))return;const i=this.getRect(e.getTargetElement(),e.getSize()),n=this.getElement(),s=this.getRect(n,[(0,l.Gq)(n),(0,l.DK)(n)]),r=void 0===(t=t||{}).margin?20:t.margin;if(!(0,o.ms)(i,s)){const n=s[0]-i[0],o=i[2]-s[2],a=s[1]-i[1],l=i[3]-s[3],h=[0,0];if(n<0?h[0]=n-r:o<0&&(h[0]=Math.abs(o)+r),a<0?h[1]=a-r:l<0&&(h[1]=Math.abs(l)+r),0!==h[0]||0!==h[1]){const i=e.getView().getCenterInternal(),n=e.getPixelFromCoordinateInternal(i);if(!n)return;const s=[n[0]+h[0],n[1]+h[1]],r=t.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(s),duration:r.duration,easing:r.easing})}}}getRect(t,e){const i=t.getBoundingClientRect(),n=i.left+window.pageXOffset,s=i.top+window.pageYOffset;return[n,s,n+e[0],s+e[1]]}setPositioning(t){this.set(g,t)}setVisible(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)}updatePixelPosition(){const t=this.getMap(),e=this.getPosition();if(!t||!t.isRendered()||!e)return void this.setVisible(!1);const i=t.getPixelFromCoordinate(e),n=t.getSize();this.updateRenderedPosition(i,n)}updateRenderedPosition(t,e){const i=this.element.style,n=this.getOffset(),s=this.getPositioning();this.setVisible(!0);let r="0%",o="0%";"bottom-right"==s||"center-right"==s||"top-right"==s?r="-100%":"bottom-center"!=s&&"center-center"!=s&&"top-center"!=s||(r="-50%"),"bottom-left"==s||"bottom-center"==s||"bottom-right"==s?o="-100%":"center-left"!=s&&"center-center"!=s&&"center-right"!=s||(o="-50%");const a=`translate(${r}, ${o}) translate(${Math.round(t[0]+n[0])+"px"}, ${Math.round(t[1]+n[1])+"px"})`;this.rendered.transform_!=a&&(this.rendered.transform_=a,i.transform=a)}getOptions(){return this.options}}const f=_},8143:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(9332),s=i(6837),r=i(1078),o=i(4087),a=i(3474);class l extends n.A{constructor(t,e,i){super(),i=i||{},this.tileCoord=t,this.state=e,this.interimTile=null,this.key="",this.transition_=void 0===i.transition?250:i.transition,this.transitionStarts_={},this.interpolate=!!i.interpolate}changed(){this.dispatchEvent(s.A.CHANGE)}release(){this.state===r.A.ERROR&&this.setState(r.A.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getInterimTile(){let t=this.interimTile;if(!t)return this;do{if(t.getState()==r.A.LOADED)return this.transition_=0,t;t=t.interimTile}while(t);return this}refreshInterimChain(){let t=this.interimTile;if(!t)return;let e=this;do{if(t.getState()==r.A.LOADED){t.interimTile=null;break}t.getState()==r.A.LOADING?e=t:t.getState()==r.A.IDLE?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(t){if(this.state!==r.A.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){(0,o.b0)()}getAlpha(t,e){if(!this.transition_)return 1;let i=this.transitionStarts_[t];if(i){if(-1===i)return 1}else i=e,this.transitionStarts_[t]=i;const n=e-i+1e3/60;return n>=this.transition_?1:(0,a.a6)(n/this.transition_)}inTransition(t){return!!this.transition_&&-1!==this.transitionStarts_[t]}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}}const h=l},61:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(4969),s=i(186);class r extends n.A{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()}pruneExceptNewestZ(){if(0===this.getCount())return;const t=this.peekFirstKey(),e=(0,s.K)(t)[0];this.forEach((t=>{t.tileCoord[0]!==e&&(this.remove((0,s.i7)(t.tileCoord)),t.release())}))}}const o=r},1110:(t,e,i)=>{"use strict";i.d(e,{A:()=>r,N:()=>s});class n{constructor(t,e,i,n){this.minX=t,this.maxX=e,this.minY=i,this.maxY=n}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minXthis.maxX&&(this.maxX=t.maxX),t.minYthis.maxY&&(this.maxY=t.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}function s(t,e,i,s,r){return void 0!==r?(r.minX=t,r.maxX=e,r.minY=i,r.maxY=s,r):new n(t,e,i,s)}const r=n},1078:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4}},3568:(t,e,i)=>{"use strict";i.d(e,{Ay:()=>R});var n=i(4120),s=i(2703),r=i(9015),o=i(9496),a=i(3407),l=i(4238),h=i(6933),c=i(588),u=i(1597);function d(t,e,i){return function(n,s,r,o,a){if(!n)return;if(!s&&!e)return n;const l=e?0:r[0]*s,h=e?0:r[1]*s,c=a?a[0]:0,d=a?a[1]:0;let g=t[0]+l/2+c,_=t[2]-l/2+c,f=t[1]+h/2+d,p=t[3]-h/2+d;g>_&&(g=(_+g)/2,_=g),f>p&&(f=(p+f)/2,p=f);let m=(0,u.qE)(n[0],g,_),x=(0,u.qE)(n[1],f,p);if(o&&i&&s){const t=30*s;m+=-t*Math.log(1+Math.max(0,g-n[0])/t)+t*Math.log(1+Math.max(0,n[0]-_)/t),x+=-t*Math.log(1+Math.max(0,f-n[1])/t)+t*Math.log(1+Math.max(0,n[1]-p)/t)}return[m,x]}}function g(t){return t}var _=i(915),f=i(6514);function p(t,e,i,n){const s=(0,_.RG)(e)/i[0],r=(0,_.Oq)(e)/i[1];return n?Math.min(t,Math.max(s,r)):Math.min(t,Math.min(s,r))}function m(t,e,i){let n=Math.min(t,e);return n*=Math.log(1+50*Math.max(0,t/e-1))/50+1,i&&(n=Math.max(n,i),n/=Math.log(1+50*Math.max(0,i/t-1))/50+1),(0,u.qE)(n,i/2,2*e)}function x(t,e,i,n,s){return i=void 0===i||i,function(r,o,a,l){if(void 0!==r){const o=n?p(t,n,a,s):t;return i&&l?m(r,o,e):(0,u.qE)(r,e,o)}}}var v=i(4498),y=i(3474),E=i(1064);class T extends n.A{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=(0,a.Av)(t.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,t.projection&&(0,a.RJ)(),t.center&&(t.center=(0,a.Ad)(t.center,this.projection_)),t.extent&&(t.extent=(0,a.SD)(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const t in r.A)delete e[t];this.setProperties(e,!0);const i=function(t){let e,i,n;let s=void 0!==t.minZoom?t.minZoom:0,r=void 0!==t.maxZoom?t.maxZoom:28;const l=void 0!==t.zoomFactor?t.zoomFactor:2,h=void 0!==t.multiWorld&&t.multiWorld,c=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,d=void 0!==t.showFullExtent&&t.showFullExtent,g=(0,a.Av)(t.projection,"EPSG:3857"),v=g.getExtent();let y=t.constrainOnlyCenter,E=t.extent;if(h||E||!g.isGlobal()||(y=!1,E=v),void 0!==t.resolutions){const o=t.resolutions;i=o[s],n=void 0!==o[r]?o[r]:o[o.length-1],e=t.constrainResolution?function(t,e,i,n){return e=void 0===e||e,function(s,r,o,a){if(void 0!==s){const l=t[0],h=t[t.length-1],c=i?p(l,i,o,n):l;if(a)return e?m(s,c,h):(0,u.qE)(s,h,c);const d=Math.min(c,s),g=Math.floor((0,f.FT)(t,d,r));return t[g]>c&&g1&&"function"==typeof arguments[i-1]&&(e=arguments[i-1],--i);let n=0;for(;n0}getInteracting(){return this.hints_[s.A.INTERACTING]>0}cancelAnimations(){let t;this.setHint(s.A.ANIMATING,-this.hints_[s.A.ANIMATING]);for(let e=0,i=this.animations_.length;e=0;--i){const n=this.animations_[i];let r=!0;for(let i=0,s=n.length;i0?o/s.duration:1;a>=1?(s.complete=!0,a=1):r=!1;const l=s.easing(a);if(s.sourceCenter){const t=s.sourceCenter[0],e=s.sourceCenter[1],i=s.targetCenter[0],n=s.targetCenter[1];this.nextCenter_=s.targetCenter;const r=t+l*(i-t),o=e+l*(n-e);this.targetCenter_=[r,o]}if(s.sourceResolution&&s.targetResolution){const t=1===l?s.targetResolution:s.sourceResolution+l*(s.targetResolution-s.sourceResolution);if(s.anchor){const e=this.getViewportSize_(this.getRotation()),i=this.constraints_.resolution(t,0,e,!0);this.targetCenter_=this.calculateCenterZoom(i,s.anchor)}this.nextResolution_=s.targetResolution,this.targetResolution_=t,this.applyTargetState_(!0)}if(void 0!==s.sourceRotation&&void 0!==s.targetRotation){const t=1===l?(0,u.xP)(s.targetRotation+Math.PI,2*Math.PI)-Math.PI:s.sourceRotation+l*(s.targetRotation-s.sourceRotation);if(s.anchor){const e=this.constraints_.rotation(t,!0);this.targetCenter_=this.calculateCenterRotate(e,s.anchor)}this.nextRotation_=s.targetRotation,this.targetRotation_=t}if(this.applyTargetState_(!0),e=!0,!s.complete)break}if(r){this.animations_[i]=null,this.setHint(s.A.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const t=n[0].callback;t&&A(t,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let i;const n=this.getCenterInternal();return void 0!==n&&(i=[n[0]-e[0],n[1]-e[1]],(0,h.e$)(i,t-this.getRotation()),(0,h.WQ)(i,e)),i}calculateCenterZoom(t,e){let i;const n=this.getCenterInternal(),s=this.getResolution();return void 0!==n&&void 0!==s&&(i=[e[0]-t*(e[0]-n[0])/s,e[1]-t*(e[1]-n[1])/s]),i}getViewportSize_(t){const e=this.viewportSize_;if(t){const i=e[0],n=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t?(0,a.te)(t,this.getProjection()):t}getCenterInternal(){return this.get(r.A.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){const e=this.calculateExtentInternal(t);return(0,a.JR)(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();(0,c.v)(e,"The view center is not defined");const i=this.getResolution();(0,c.v)(void 0!==i,"The view resolution is not defined");const n=this.getRotation();return(0,c.v)(void 0!==n,"The view rotation is not defined"),(0,_.Bg)(e,i,n,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(r.A.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal((0,a.SD)(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const i=(0,_.RG)(t)/e[0],n=(0,_.Oq)(t)/e[1];return Math.max(i,n)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,n=Math.log(e/i)/Math.log(t);return function(i){return e/Math.pow(t,i*n)}}getRotation(){return this.get(r.A.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,s=Math.log(i/n)/e;return function(t){return Math.log(i/t)/e/s}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),i=this.getRotation();let n=this.getCenterInternal();const s=this.padding_;if(s){const t=this.getViewportSizeMinusPadding_();n=S(n,this.getViewportSize_(),[t[0]/2+s[3],t[1]/2+s[0]],e,i)}return{center:n.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t;const e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e,i,n=this.minZoom_||0;if(this.resolutions_){const s=(0,f.FT)(this.resolutions_,t,1);n=s,e=this.resolutions_[s],i=s==this.resolutions_.length-1?2:e/this.resolutions_[s+1]}else e=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(e/t)/Math.log(i)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=(0,u.qE)(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,(0,u.qE)(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if((0,c.v)(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,"Invalid extent or geometry provided as `geometry`"),Array.isArray(t)){(0,c.v)(!(0,_.Im)(t),"Cannot fit empty extent provided as `geometry`");const e=(0,a.SD)(t,this.getProjection());i=(0,E.VY)(e)}else if("Circle"===t.getType()){const e=(0,a.SD)(t.getExtent(),this.getProjection());i=(0,E.VY)(e),i.rotate(this.getRotation(),(0,_.q1)(e))}else{const e=(0,a.Tf)();i=e?t.clone().transform(e,this.getProjection()):t}this.fitInternal(i,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),i=Math.cos(e),n=Math.sin(-e),s=t.getFlatCoordinates(),r=t.getStride();let o=1/0,a=1/0,l=-1/0,h=-1/0;for(let t=0,e=s.length;t{"use strict";i.d(e,{A:()=>n});const n={ANIMATING:0,INTERACTING:1}},9015:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"}},6514:(t,e,i)=>{"use strict";function n(t,e,i){let n,r;i=i||s;let o=0,a=t.length,l=!1;for(;o>1),r=+i(t[n],e),r<0?o=n+1:(a=n,l=!r);return l?o:~o}function s(t,e){return t>e?1:te?-1:0}function o(t,e,i){if(t[0]<=e)return 0;const n=t.length;if(e<=t[n-1])return n-1;if("function"==typeof i){for(let s=1;s0?s-1:s}return n-1}if(i>0){for(let i=1;i0||i&&0===r)}))}i.d(e,{El:()=>n,FT:()=>o,V_:()=>s,WC:()=>c,X$:()=>l,aI:()=>h,gI:()=>a,rG:()=>r})},588:(t,e,i)=>{"use strict";function n(t,e){if(!t)throw new Error(e)}i.d(e,{v:()=>n})},3730:(t,e,i)=>{"use strict";i.d(e,{_j:()=>T,oJ:()=>_,sH:()=>E,$C:()=>S,cD:()=>y,S8:()=>A,eE:()=>v,dI:()=>C,fu:()=>x});const n={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]};var s={name:"xyz",min:[0,0,0],channel:["X","Y","Z"],alias:["XYZ","ciexyz","cie1931"],whitepoint:{2:{A:[109.85,100,35.585],C:[98.074,100,118.232],D50:[96.422,100,82.521],D55:[95.682,100,92.149],D65:[95.045592705167,100,108.9057750759878],D75:[94.972,100,122.638],F2:[99.187,100,67.395],F7:[95.044,100,108.755],F11:[100.966,100,64.37],E:[100,100,100]},10:{A:[111.144,100,35.2],C:[97.285,100,116.145],D50:[96.72,100,81.427],D55:[95.799,100,90.926],D65:[94.811,100,107.304],D75:[94.416,100,120.641],F2:[103.28,100,69.026],F7:[95.792,100,107.687],F11:[103.866,100,65.627],E:[100,100,100]}}};s.max=s.whitepoint[2].D65,s.rgb=function(t,e){e=e||s.whitepoint[2].E;var i,n,r,o=t[0]/e[0],a=t[1]/e[1],l=t[2]/e[2];return n=-.96924363628087*o+1.87596750150772*a+.041555057407175*l,r=.055630079696993*o+-.20397695888897*a+1.056971514242878*l,i=(i=3.240969941904521*o+-1.537383177570093*a+-.498610760293*l)>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r*=12.92,[255*(i=Math.min(Math.max(0,i),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},n.xyz=function(t,e){var i=t[0]/255,n=t[1]/255,r=t[2]/255,o=.21263900587151*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)+.71516867876775*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.072192315360733*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92),a=.019330818715591*i+.11919477979462*n+.95053215224966*r;return[(.41239079926595*i+.35758433938387*n+.18048078840183*r)*(e=e||s.whitepoint[2].E)[0],o*e[1],a*e[2]]};const r=s,o={name:"luv",min:[0,-134,-140],max:[100,224,122],channel:["lightness","u","v"],alias:["LUV","cieluv","cie1976"],xyz:function(t,e,i){var n,s,o,a,l,h,c,u,d;return o=t[0],a=t[1],l=t[2],0===o?[0,0,0]:(e=e||"D65",i=i||2,n=a/(13*o)+4*(c=r.whitepoint[i][e][0])/(c+15*(u=r.whitepoint[i][e][1])+3*(d=r.whitepoint[i][e][2]))||0,s=l/(13*o)+9*u/(c+15*u+3*d)||0,[9*(h=o>8?u*Math.pow((o+16)/116,3):u*o*.0011070564598794539)*n/(4*s)||0,h,h*(12-3*n-20*s)/(4*s)||0])}};r.luv=function(t,e,i){var n,s,o,a,l,h,c,u,d,g,_;e=e||"D65",i=i||2,g=4*(c=r.whitepoint[i][e][0])/(c+15*(u=r.whitepoint[i][e][1])+3*(d=r.whitepoint[i][e][2])),_=9*u/(c+15*u+3*d),n=4*(a=t[0])/(a+15*(l=t[1])+3*(h=t[2]))||0,s=9*l/(a+15*l+3*h)||0;var f=l/u;return[o=f<=.008856451679035631?903.2962962962961*f:116*Math.pow(f,1/3)-16,13*o*(n-g),13*o*(s-_)]};var a={name:"lchuv",channel:["lightness","chroma","hue"],alias:["LCHuv","cielchuv"],min:[0,0,0],max:[100,100,360],luv:function(t){var e,i=t[0],n=t[1];return e=t[2]/360*2*Math.PI,[i,n*Math.cos(e),n*Math.sin(e)]},xyz:function(t){return o.xyz(a.luv(t))}};const l=a;o.lchuv=function(t){var e=t[0],i=t[1],n=t[2],s=Math.sqrt(i*i+n*n),r=360*Math.atan2(n,i)/2/Math.PI;return r<0&&(r+=360),[e,s,r]},r.lchuv=function(t){return o.lchuv(r.luv(t))};const h={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},c=function(t){var e,i,n=[],s=1;if("number"==typeof t)return{space:"rgb",values:[t>>>16,(65280&t)>>>8,255&t],alpha:1};if("number"==typeof t)return{space:"rgb",values:[t>>>16,(65280&t)>>>8,255&t],alpha:1};if(t=String(t).toLowerCase(),h[t])n=h[t].slice(),i="rgb";else if("transparent"===t)s=0,i="rgb",n=[0,0,0];else if("#"===t[0]){var r=t.slice(1),o=r.length;s=1,o<=4?(n=[parseInt(r[0]+r[0],16),parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16)],4===o&&(s=parseInt(r[3]+r[3],16)/255)):(n=[parseInt(r[0]+r[1],16),parseInt(r[2]+r[3],16),parseInt(r[4]+r[5],16)],8===o&&(s=parseInt(r[6]+r[7],16)/255)),n[0]||(n[0]=0),n[1]||(n[1]=0),n[2]||(n[2]=0),i="rgb"}else if(e=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(t)){var a=e[1],l="cmyk"===(i=a.replace(/a$/,""))?4:"gray"===i?1:3;n=e[2].trim().split(/\s*[,\/]\s*|\s+/),"color"===i&&(i=n.shift()),s=(n=n.map((function(t,e){if("%"===t[t.length-1])return t=parseFloat(t)/100,3===e?t:"rgb"===i?255*t:"h"===i[0]?100*t:"l"!==i[0]||e?"lab"===i?125*t:"lch"===i?e<2?150*t:360*t:"o"!==i[0]||e?"oklab"===i?.4*t:"oklch"===i?e<2?.4*t:360*t:t:t:100*t;if("h"===i[e]||2===e&&"h"===i[i.length-1]){if(void 0!==u[t])return u[t];if(t.endsWith("deg"))return parseFloat(t);if(t.endsWith("turn"))return 360*parseFloat(t);if(t.endsWith("grad"))return 360*parseFloat(t)/400;if(t.endsWith("rad"))return 180*parseFloat(t)/Math.PI}return"none"===t?0:parseFloat(t)}))).length>l?n.pop():1}else/[0-9](?:\s|\/|,)/.test(t)&&(n=t.match(/([0-9]+)/g).map((function(t){return parseFloat(t)})),i=t.match(/([a-z])/gi)?.join("")?.toLowerCase()||"rgb");return{space:i,values:n,alpha:s}};var u={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};const d={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e,i,n,s,r,o=t[0]/360,a=t[1]/100,l=t[2]/100,h=0;if(0===a)return[r=255*l,r,r];for(e=2*l-(i=l<.5?l*(1+a):l+a-l*a),s=[0,0,0];h<3;)(n=o+1/3*-(h-1))<0?n++:n>1&&n--,r=6*n<1?e+6*(i-e)*n:2*n<1?i:3*n<2?e+(i-e)*(2/3-n)*6:e,s[h++]=255*r;return s}};n.hsl=function(t){var e,i,n=t[0]/255,s=t[1]/255,r=t[2]/255,o=Math.min(n,s,r),a=Math.max(n,s,r),l=a-o;return a===o?e=0:n===a?e=(s-r)/l:s===a?e=2+(r-n)/l:r===a&&(e=4+(n-s)/l),(e=Math.min(60*e,360))<0&&(e+=360),i=(o+a)/2,[e,100*(a===o?0:i<=.5?l/(a+o):l/(2-a-o)),100*i]};var g=i(1597);function _(t){return"string"==typeof t?t:C(t)}const f=1024,p={};let m=0;function x(t){if(4===t.length)return t;const e=t.slice();return e[3]=1,e}function v(t){const e=r.lchuv(n.xyz(t));return e[3]=t[3],e}function y(t){const e=r.rgb(l.xyz(t));return e[3]=t[3],e}function E(t){if(p.hasOwnProperty(t))return p[t];if(m>=f){let t=0;for(const e in p)3&t++||(delete p[e],--m)}const e=function(t){var e;Array.isArray(t)&&t.raw&&(t=String.raw(...arguments)),t instanceof Number&&(t=+t);var i=c(t);if(!i.space)return[];const s="h"===i.space[0]?d.min:n.min,r="h"===i.space[0]?d.max:n.max;return(e=Array(3))[0]=Math.min(Math.max(i.values[0],s[0]),r[0]),e[1]=Math.min(Math.max(i.values[1],s[1]),r[1]),e[2]=Math.min(Math.max(i.values[2],s[2]),r[2]),"h"===i.space[0]&&(e=d.rgb(e)),e.push(Math.min(Math.max(i.alpha,0),1)),e}(t);if(4!==e.length)throw new Error('Failed to parse "'+t+'" as color');for(const i of e)if(isNaN(i))throw new Error('Failed to parse "'+t+'" as color');return A(e),p[t]=e,++m,e}function T(t){return Array.isArray(t)?t:E(t)}function A(t){return t[0]=(0,g.qE)(t[0]+.5|0,0,255),t[1]=(0,g.qE)(t[1]+.5|0,0,255),t[2]=(0,g.qE)(t[2]+.5|0,0,255),t[3]=(0,g.qE)(t[3],0,1),t}function C(t){let e=t[0];e!=(0|e)&&(e=e+.5|0);let i=t[1];i!=(0|i)&&(i=i+.5|0);let n=t[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+e+","+i+","+n+","+(void 0===t[3]?1:Math.round(1e3*t[3])/1e3)+")"}function S(t){try{return E(t),!0}catch(t){return!1}}},7295:(t,e,i)=>{"use strict";i.d(e,{F:()=>l});var n=i(6141),s=i(8711),r=i(7907),o=i(2241),a=i(3730);function l(t){return t?Array.isArray(t)?(0,a.dI)(t):"object"==typeof t&&"src"in t?function(t){if(!t.offset||!t.size)return o.ue.getPattern(t.src,"anonymous",t.color);const e=t.src+":"+t.offset,i=o.ue.getPattern(e,void 0,t.color);if(i)return i;const a=o.ue.get(t.src,"anonymous",null);if(a.getImageState()!==n.A.LOADED)return null;const l=(0,s.Y)(t.size[0],t.size[1]);return l.drawImage(a.getImage(1),t.offset[0],t.offset[1],t.size[0],t.size[1],0,0,t.size[0],t.size[1]),(0,r.J)(l.canvas,e,void 0,n.A.LOADED,t.color,!0),o.ue.getPattern(e,void 0,t.color)}(t):t:null}},4422:(t,e,i)=>{"use strict";i.d(e,{R8:()=>r,z3:()=>o});const n={info:1,warn:2,error:3,none:4};let s=n.info;function r(...t){s>n.warn||console.warn(...t)}function o(...t){s>n.error||console.error(...t)}},7456:(t,e,i)=>{"use strict";i.d(e,{A:()=>c});var n=i(972),s=i(6837),r=i(5176),o=i(6514),a=i(8711),l=i(4238);class h extends n.A{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=void 0===t.collapsed||t.collapsed,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=void 0!==t.collapsible,this.collapsible_=void 0===t.collapsible||t.collapsible,this.collapsible_||(this.collapsed_=!1);const e=void 0!==t.className?t.className:"ol-attribution",i=void 0!==t.tipLabel?t.tipLabel:"Attributions",n=void 0!==t.expandClassName?t.expandClassName:e+"-expand",o=void 0!==t.collapseLabel?t.collapseLabel:"›",a=void 0!==t.collapseClassName?t.collapseClassName:e+"-collapse";"string"==typeof o?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=o,this.collapseLabel_.className=a):this.collapseLabel_=o;const l=void 0!==t.label?t.label:"i";"string"==typeof l?(this.label_=document.createElement("span"),this.label_.textContent=l,this.label_.className=n):this.label_=l;const h=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=i,this.toggleButton_.appendChild(h),this.toggleButton_.addEventListener(s.A.CLICK,this.handleClick_.bind(this),!1);const c=e+" "+r.XI+" "+r.$N+(this.collapsed_&&this.collapsible_?" "+r.nT:"")+(this.collapsible_?"":" ol-uncollapsible"),u=this.element;u.className=c,u.appendChild(this.toggleButton_),u.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(t){const e=Array.from(new Set(this.getMap().getAllLayers().flatMap((e=>e.getAttributions(t))))),i=!this.getMap().getAllLayers().some((t=>t.getSource()&&!1===t.getSource().getAttributionsCollapsible()));return this.overrideCollapsible_||this.setCollapsible(i),e}async updateElement_(t){if(!t)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const e=await Promise.all(this.collectSourceAttributions_(t).map((t=>(0,l.hq)((()=>t))))),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!(0,o.aI)(e,this.renderedAttributions_)){(0,a.gS)(this.ulElement_);for(let t=0,i=e.length;t{"use strict";i.d(e,{A:()=>h});var n=i(4120),s=i(2585),r=i(4238),o=i(9438),a=i(8711);class l extends n.A{constructor(t){super();const e=t.element;!e||t.target||e.style.pointerEvents||(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){(0,a.bf)(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&(0,a.bf)(this.element);for(let t=0,e=this.listenerKeys.length;t{"use strict";i.d(e,{A:()=>_});var n=i(972),s=i(6837),r=i(3116),o=i(5176),a=i(9438),l=i(8711);const h=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"];class c extends n.A{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target}),this.on,this.once,this.un,this.keys_=void 0!==t.keys&&t.keys,this.source_=t.source,this.isInFullscreen_=!1,this.boundHandleMapTargetChange_=this.handleMapTargetChange_.bind(this),this.cssClassName_=void 0!==t.className?t.className:"ol-full-screen",this.documentListeners_=[],this.activeClassName_=void 0!==t.activeClassName?t.activeClassName.split(" "):[this.cssClassName_+"-true"],this.inactiveClassName_=void 0!==t.inactiveClassName?t.inactiveClassName.split(" "):[this.cssClassName_+"-false"];const e=void 0!==t.label?t.label:"⤢";this.labelNode_="string"==typeof e?document.createTextNode(e):e;const i=void 0!==t.labelActive?t.labelActive:"×";this.labelActiveNode_="string"==typeof i?document.createTextNode(i):i;const n=t.tipLabel?t.tipLabel:"Toggle full-screen";this.button_=document.createElement("button"),this.button_.title=n,this.button_.setAttribute("type","button"),this.button_.appendChild(this.labelNode_),this.button_.addEventListener(s.A.CLICK,this.handleClick_.bind(this),!1),this.setClassName_(this.button_,this.isInFullscreen_),this.element.className=`${this.cssClassName_} ${o.XI} ${o.$N}`,this.element.appendChild(this.button_)}handleClick_(t){t.preventDefault(),this.handleFullScreen_()}handleFullScreen_(){const t=this.getMap();if(!t)return;const e=t.getOwnerDocument();if(u(e))if(d(e))!function(t){t.exitFullscreen?t.exitFullscreen():t.webkitExitFullscreen&&t.webkitExitFullscreen()}(e);else{let i;i=this.source_?"string"==typeof this.source_?e.getElementById(this.source_):this.source_:t.getTargetElement(),this.keys_?function(t){t.webkitRequestFullscreen?t.webkitRequestFullscreen():g(t)}(i):g(i)}}handleFullScreenChange_(){const t=this.getMap();if(!t)return;const e=this.isInFullscreen_;this.isInFullscreen_=d(t.getOwnerDocument()),e!==this.isInFullscreen_&&(this.setClassName_(this.button_,this.isInFullscreen_),this.isInFullscreen_?((0,l.fo)(this.labelActiveNode_,this.labelNode_),this.dispatchEvent("enterfullscreen")):((0,l.fo)(this.labelNode_,this.labelActiveNode_),this.dispatchEvent("leavefullscreen")),t.updateSize())}setClassName_(t,e){e?(t.classList.remove(...this.inactiveClassName_),t.classList.add(...this.activeClassName_)):(t.classList.remove(...this.activeClassName_),t.classList.add(...this.inactiveClassName_))}setMap(t){const e=this.getMap();e&&e.removeChangeListener(r.A.TARGET,this.boundHandleMapTargetChange_),super.setMap(t),this.handleMapTargetChange_(),t&&t.addChangeListener(r.A.TARGET,this.boundHandleMapTargetChange_)}handleMapTargetChange_(){const t=this.documentListeners_;for(let e=0,i=t.length;e{"use strict";i.d(e,{A:()=>u});var n=i(972),s=i(613),r=i(3407),o=i(9438),a=i(6933);const l="projection",h="coordinateFormat";class c extends n.A{constructor(t){t=t||{};const e=document.createElement("div");e.className=void 0!==t.className?t.className:"ol-mouse-position",super({element:e,render:t.render,target:t.target}),this.on,this.once,this.un,this.addChangeListener(l,this.handleProjectionChanged_),t.coordinateFormat&&this.setCoordinateFormat(t.coordinateFormat),t.projection&&this.setProjection(t.projection),this.renderOnMouseOut_=void 0!==t.placeholder,this.placeholder_=this.renderOnMouseOut_?t.placeholder:" ",this.renderedHTML_=e.innerHTML,this.mapProjection_=null,this.transform_=null,this.wrapX_=!1!==t.wrapX}handleProjectionChanged_(){this.transform_=null}getCoordinateFormat(){return this.get(h)}getProjection(){return this.get(l)}handleMouseMove(t){const e=this.getMap();this.updateHTML_(e.getEventPixel(t))}handleMouseOut(t){this.updateHTML_(null)}setMap(t){if(super.setMap(t),t){const e=t.getViewport();this.listenerKeys.push((0,o.KT)(e,s.A.POINTERMOVE,this.handleMouseMove,this)),this.renderOnMouseOut_&&this.listenerKeys.push((0,o.KT)(e,s.A.POINTEROUT,this.handleMouseOut,this)),this.updateHTML_(null)}}setCoordinateFormat(t){this.set(h,t)}setProjection(t){this.set(l,(0,r.Jt)(t))}updateHTML_(t){let e=this.placeholder_;if(t&&this.mapProjection_){if(!this.transform_){const t=this.getProjection();this.transform_=t?(0,r.FO)(this.mapProjection_,t):r.R6}const i=this.getMap().getCoordinateFromPixelInternal(t);if(i){const t=(0,r.Tf)();if(t&&(this.transform_=(0,r.FO)(this.mapProjection_,t)),this.transform_(i,i),this.wrapX_){const e=t||this.getProjection()||this.mapProjection_;(0,a.Li)(i,e)}const n=this.getCoordinateFormat();e=n?n(i):i.toString()}}this.renderedHTML_&&e===this.renderedHTML_||(this.element.innerHTML=e,this.renderedHTML_=e)}render(t){const e=t.frameState;e?this.mapProjection_!=e.viewState.projection&&(this.mapProjection_=e.viewState.projection,this.transform_=null):this.mapProjection_=null}}const u=c},6950:(t,e,i)=>{"use strict";i.d(e,{A:()=>v});var n=i(71),s=i(972),r=i(6837),o=i(2961),a=i(2585),l=i(3116),h=i(8450),c=i(1795),u=i(3568),d=i(9015),g=i(5176),_=i(915),f=i(9438),p=i(1064),m=i(8711);class x extends s.A{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.boundHandleRotationChanged_=this.handleRotationChanged_.bind(this),this.collapsed_=void 0===t.collapsed||t.collapsed,this.collapsible_=void 0===t.collapsible||t.collapsible,this.collapsible_||(this.collapsed_=!1),this.rotateWithView_=void 0!==t.rotateWithView&&t.rotateWithView,this.viewExtent_=void 0;const e=void 0!==t.className?t.className:"ol-overviewmap",i=void 0!==t.tipLabel?t.tipLabel:"Overview map",s=void 0!==t.collapseLabel?t.collapseLabel:"‹";"string"==typeof s?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=s):this.collapseLabel_=s;const a=void 0!==t.label?t.label:"›";"string"==typeof a?(this.label_=document.createElement("span"),this.label_.textContent=a):this.label_=a;const l=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_,h=document.createElement("button");h.setAttribute("type","button"),h.title=i,h.appendChild(l),h.addEventListener(r.A.CLICK,this.handleClick_.bind(this),!1),this.ovmapDiv_=document.createElement("div"),this.ovmapDiv_.className="ol-overviewmap-map",this.view_=t.view;const u=new o.A({view:t.view,controls:new n.A,interactions:new n.A});this.ovmap_=u,t.layers&&t.layers.forEach((function(t){u.addLayer(t)}));const d=document.createElement("div");d.className="ol-overviewmap-box",d.style.boxSizing="border-box",this.boxOverlay_=new c.A({position:[0,0],positioning:"center-center",element:d}),this.ovmap_.addOverlay(this.boxOverlay_);const _=e+" "+g.XI+" "+g.$N+(this.collapsed_&&this.collapsible_?" "+g.nT:"")+(this.collapsible_?"":" ol-uncollapsible"),f=this.element;f.className=_,f.appendChild(this.ovmapDiv_),f.appendChild(h);const p=this,m=this.boxOverlay_,x=this.boxOverlay_.getElement(),v=function(t){const e={clientX:(i=t).clientX,clientY:i.clientY};var i;const n=u.getEventCoordinateInternal(e);m.setPosition(n)},y=function(t){const e=u.getEventCoordinateInternal(t);p.getMap().getView().setCenterInternal(e),window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",y)};x.addEventListener("mousedown",(function(){window.addEventListener("mousemove",v),window.addEventListener("mouseup",y)}))}setMap(t){const e=this.getMap();if(t!==e){if(e){const t=e.getView();t&&this.unbindView_(t),this.ovmap_.setTarget(null)}if(super.setMap(t),t){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push((0,f.KT)(t,h.A.PROPERTYCHANGE,this.handleMapPropertyChange_,this));const e=t.getView();e&&(this.bindView_(e),e.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_())),this.ovmap_.isRendered()||this.updateBoxAfterOvmapIsRendered_()}}}handleMapPropertyChange_(t){if(t.key===l.A.VIEW){const e=t.oldValue;e&&this.unbindView_(e);const i=this.getMap().getView();this.bindView_(i)}else this.ovmap_.isRendered()||t.key!==l.A.TARGET&&t.key!==l.A.SIZE||this.ovmap_.updateSize()}bindView_(t){if(!this.view_){const e=new u.Ay({projection:t.getProjection()});this.ovmap_.setView(e)}t.addChangeListener(d.A.ROTATION,this.boundHandleRotationChanged_),this.handleRotationChanged_()}unbindView_(t){t.removeChangeListener(d.A.ROTATION,this.boundHandleRotationChanged_)}handleRotationChanged_(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())}validateExtent_(){const t=this.getMap(),e=this.ovmap_;if(!t.isRendered()||!e.isRendered())return;const i=t.getSize(),n=t.getView().calculateExtentInternal(i);if(this.viewExtent_&&(0,_.aI)(n,this.viewExtent_))return;this.viewExtent_=n;const s=e.getSize(),r=e.getView().calculateExtentInternal(s),o=e.getPixelFromCoordinateInternal((0,_.Py)(n)),a=e.getPixelFromCoordinateInternal((0,_.k_)(n)),l=Math.abs(o[0]-a[0]),h=Math.abs(o[1]-a[1]),c=s[0],u=s[1];l<.1*c||h<.1*u||l>.75*c||h>.75*u?this.resetExtent_():(0,_.ms)(r,n)||this.recenter_()}resetExtent_(){const t=this.getMap(),e=this.ovmap_,i=t.getSize(),n=t.getView().calculateExtentInternal(i),s=e.getView(),r=Math.log(7.5)/Math.LN2,o=1/(.1*Math.pow(2,r/2));(0,_.Af)(n,o),s.fitInternal((0,p.VY)(n))}recenter_(){const t=this.getMap(),e=this.ovmap_,i=t.getView();e.getView().setCenterInternal(i.getCenterInternal())}updateBox_(){const t=this.getMap(),e=this.ovmap_;if(!t.isRendered()||!e.isRendered())return;const i=t.getSize(),n=t.getView(),s=e.getView(),r=this.rotateWithView_?0:-n.getRotation(),o=this.boxOverlay_,a=this.boxOverlay_.getElement(),l=n.getCenterInternal(),h=n.getResolution(),c=s.getResolution(),u=i[0]*h/c,d=i[1]*h/c;if(o.setPosition(l),a){a.style.width=u+"px",a.style.height=d+"px";const t="rotate("+r+"rad)";a.style.transform=t}}updateBoxAfterOvmapIsRendered_(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=(0,f.Jz)(this.ovmap_,a.A.POSTRENDER,(function(t){delete this.ovmapPostrenderKey_,this.updateBox_()}),this))}handleClick_(t){t.preventDefault(),this.handleToggle_()}handleToggle_(){this.element.classList.toggle(g.nT),this.collapsed_?(0,m.fo)(this.collapseLabel_,this.label_):(0,m.fo)(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;const t=this.ovmap_;if(!this.collapsed_){if(t.isRendered())return this.viewExtent_=void 0,void t.render();t.updateSize(),this.resetExtent_(),this.updateBoxAfterOvmapIsRendered_()}}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())}setCollapsed(t){this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()}getCollapsed(){return this.collapsed_}getRotateWithView(){return this.rotateWithView_}setRotateWithView(t){this.rotateWithView_!==t&&(this.rotateWithView_=t,0!==this.getMap().getView().getRotation()&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))}getOverviewMap(){return this.ovmap_}render(t){this.validateExtent_(),this.updateBox_()}}const v=x},2898:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var n=i(972),s=i(6837),r=i(5176),o=i(3474);class a extends n.A{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target});const e=void 0!==t.className?t.className:"ol-rotate",i=void 0!==t.label?t.label:"⇧",n=void 0!==t.compassClassName?t.compassClassName:"ol-compass";this.label_=null,"string"==typeof i?(this.label_=document.createElement("span"),this.label_.className=n,this.label_.textContent=i):(this.label_=i,this.label_.classList.add(n));const o=t.tipLabel?t.tipLabel:"Reset rotation",a=document.createElement("button");a.className=e+"-reset",a.setAttribute("type","button"),a.title=o,a.appendChild(this.label_),a.addEventListener(s.A.CLICK,this.handleClick_.bind(this),!1);const l=e+" "+r.XI+" "+r.$N,h=this.element;h.className=l,h.appendChild(a),this.callResetNorth_=t.resetNorth?t.resetNorth:void 0,this.duration_=void 0!==t.duration?t.duration:250,this.autoHide_=void 0===t.autoHide||t.autoHide,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(r.Si)}handleClick_(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const t=this.getMap().getView();if(!t)return;const e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:o.vT}):t.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const i=e.viewState.rotation;if(i!=this.rotation_){const t="rotate("+i+"rad)";if(this.autoHide_){const t=this.element.classList.contains(r.Si);t||0!==i?t&&0!==i&&this.element.classList.remove(r.Si):this.element.classList.add(r.Si)}this.label_.style.transform=t}this.rotation_=i}}const l=a},3965:(t,e,i)=>{"use strict";i.d(e,{A:()=>c});var n=i(972),s=i(5176),r=i(3407);const o="units",a=[1,2,5],l=25.4/.28;class h extends n.A{constructor(t){t=t||{};const e=document.createElement("div");e.style.pointerEvents="none",super({element:e,render:t.render,target:t.target}),this.on,this.once,this.un;const i=void 0!==t.className?t.className:t.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=i+"-inner",this.element.className=i+" "+s.XI,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=void 0!==t.minWidth?t.minWidth:64,this.maxWidth_=t.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(o,this.handleUnitsChanged_),this.setUnits(t.units||"metric"),this.scaleBar_=t.bar||!1,this.scaleBarSteps_=t.steps||4,this.scaleBarText_=t.text||!1,this.dpi_=t.dpi||void 0}getUnits(){return this.get(o)}handleUnitsChanged_(){this.updateElement_()}setUnits(t){this.set(o,t)}setDpi(t){this.dpi_=t}updateElement_(){const t=this.viewState_;if(!t)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const e=t.center,i=t.projection,n=this.getUnits(),s="degrees"==n?"degrees":"m";let o=(0,r.hO)(i,t.resolution,e,s);const h=this.minWidth_*(this.dpi_||l)/l,c=void 0!==this.maxWidth_?this.maxWidth_*(this.dpi_||l)/l:void 0;let u=h*o,d="";if("degrees"==n){const t=r.Ig.degrees;u*=t,u=c){g=p,_=m,f=x;break}if(_>=h)break;p=g,m=_,x=f,++v}const y=this.scaleBar_?this.createScaleBar(_,g,d):g.toFixed(f<0?-f:0)+" "+d;this.renderedHTML_!=y&&(this.innerElement_.innerHTML=y,this.renderedHTML_=y),this.renderedWidth_!=_&&(this.innerElement_.style.width=_+"px",this.renderedWidth_=_),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(t,e,i){const n=this.getScaleForResolution(),s=n<1?Math.round(1/n).toLocaleString()+" : 1":"1 : "+Math.round(n).toLocaleString(),r=this.scaleBarSteps_,o=t/r,a=[this.createMarker("absolute")];for(let n=0;n
    `+this.createMarker("relative")+(n%2==0||2===r?this.createStepText(n,t,!1,e,i):"")+"")}return a.push(this.createStepText(r,t,!0,e,i)),(this.scaleBarText_?`
    `+s+"
    ":"")+a.join("")}createMarker(t){return`
    `}createStepText(t,e,i,n,s){const r=(0===t?0:Math.round(n/this.scaleBarSteps_*t*100)/100)+(0===t?"":" "+s);return`
    `+r+"
    "}getScaleForResolution(){return(0,r.hO)(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m")*(1e3/25.4)*(this.dpi_||l)}render(t){const e=t.frameState;this.viewState_=e?e.viewState:null,this.updateElement_()}}const c=h},9186:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var n=i(972),s=i(6837),r=i(5176),o=i(3474);class a extends n.A{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=void 0!==t.className?t.className:"ol-zoom",i=void 0!==t.delta?t.delta:1,n=void 0!==t.zoomInClassName?t.zoomInClassName:e+"-in",o=void 0!==t.zoomOutClassName?t.zoomOutClassName:e+"-out",a=void 0!==t.zoomInLabel?t.zoomInLabel:"+",l=void 0!==t.zoomOutLabel?t.zoomOutLabel:"–",h=void 0!==t.zoomInTipLabel?t.zoomInTipLabel:"Zoom in",c=void 0!==t.zoomOutTipLabel?t.zoomOutTipLabel:"Zoom out",u=document.createElement("button");u.className=n,u.setAttribute("type","button"),u.title=h,u.appendChild("string"==typeof a?document.createTextNode(a):a),u.addEventListener(s.A.CLICK,this.handleClick_.bind(this,i),!1);const d=document.createElement("button");d.className=o,d.setAttribute("type","button"),d.title=c,d.appendChild("string"==typeof l?document.createTextNode(l):l),d.addEventListener(s.A.CLICK,this.handleClick_.bind(this,-i),!1);const g=e+" "+r.XI+" "+r.$N,_=this.element;_.className=g,_.appendChild(u),_.appendChild(d),this.duration_=void 0!==t.duration?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const e=this.getMap().getView();if(!e)return;const i=e.getZoom();if(void 0!==i){const n=e.getConstrainedZoom(i+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:n,duration:this.duration_,easing:o.vT})):e.setZoom(n)}}}const l=a},9439:(t,e,i)=>{"use strict";i.d(e,{A:()=>d});var n=i(972),s=i(6837),r=i(613),o=i(5176),a=i(1597),l=i(3474),h=i(9438),c=i(1685);class u extends n.A{constructor(t){super({target:(t=t||{}).target,element:document.createElement("div"),render:t.render}),this.dragListenerKeys_=[],this.currentResolution_=void 0,this.direction_=0,this.dragging_,this.heightLimit_=0,this.widthLimit_=0,this.startX_,this.startY_,this.thumbSize_=null,this.sliderInitialized_=!1,this.duration_=void 0!==t.duration?t.duration:200;const e=void 0!==t.className?t.className:"ol-zoomslider",i=document.createElement("button");i.setAttribute("type","button"),i.className=e+"-thumb "+o.XI;const n=this.element;n.className=e+" "+o.XI+" "+o.$N,n.appendChild(i),n.addEventListener(r.A.POINTERDOWN,this.handleDraggerStart_.bind(this),!1),n.addEventListener(r.A.POINTERMOVE,this.handleDraggerDrag_.bind(this),!1),n.addEventListener(r.A.POINTERUP,this.handleDraggerEnd_.bind(this),!1),n.addEventListener(s.A.CLICK,this.handleContainerClick_.bind(this),!1),i.addEventListener(s.A.CLICK,c.dG,!1)}setMap(t){super.setMap(t),t&&t.render()}initSlider_(){const t=this.element;let e=t.offsetWidth,i=t.offsetHeight;if(0===e&&0===i)return this.sliderInitialized_=!1;const n=getComputedStyle(t);e-=parseFloat(n.paddingRight)+parseFloat(n.paddingLeft),i-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom);const s=t.firstElementChild,r=getComputedStyle(s),o=s.offsetWidth+parseFloat(r.marginRight)+parseFloat(r.marginLeft),a=s.offsetHeight+parseFloat(r.marginTop)+parseFloat(r.marginBottom);return this.thumbSize_=[o,a],e>i?(this.direction_=1,this.widthLimit_=e-o):(this.direction_=0,this.heightLimit_=i-a),this.sliderInitialized_=!0}handleContainerClick_(t){const e=this.getMap().getView(),i=this.getRelativePosition_(t.offsetX-this.thumbSize_[0]/2,t.offsetY-this.thumbSize_[1]/2),n=this.getResolutionForPosition_(i),s=e.getConstrainedZoom(e.getZoomForResolution(n));e.animateInternal({zoom:s,duration:this.duration_,easing:l.vT})}handleDraggerStart_(t){if(!this.dragging_&&t.target===this.element.firstElementChild){const e=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.startX_=t.clientX-parseFloat(e.style.left),this.startY_=t.clientY-parseFloat(e.style.top),this.dragging_=!0,0===this.dragListenerKeys_.length){const t=this.handleDraggerDrag_,e=this.handleDraggerEnd_,i=this.getMap().getOwnerDocument();this.dragListenerKeys_.push((0,h.KT)(i,r.A.POINTERMOVE,t,this),(0,h.KT)(i,r.A.POINTERUP,e,this))}}}handleDraggerDrag_(t){if(this.dragging_){const e=t.clientX-this.startX_,i=t.clientY-this.startY_,n=this.getRelativePosition_(e,i);this.currentResolution_=this.getResolutionForPosition_(n),this.getMap().getView().setResolution(this.currentResolution_)}}handleDraggerEnd_(t){this.dragging_&&(this.getMap().getView().endInteraction(),this.dragging_=!1,this.startX_=void 0,this.startY_=void 0,this.dragListenerKeys_.forEach(h.JH),this.dragListenerKeys_.length=0)}setThumbPosition_(t){const e=this.getPositionForResolution_(t),i=this.element.firstElementChild;1==this.direction_?i.style.left=this.widthLimit_*e+"px":i.style.top=this.heightLimit_*e+"px"}getRelativePosition_(t,e){let i;return i=1===this.direction_?t/this.widthLimit_:e/this.heightLimit_,(0,a.qE)(i,0,1)}getResolutionForPosition_(t){return this.getMap().getView().getResolutionForValueFunction()(1-t)}getPositionForResolution_(t){const e=this.getMap().getView().getValueForResolutionFunction();return(0,a.qE)(1-e(t),0,1)}render(t){if(!t.frameState)return;if(!this.sliderInitialized_&&!this.initSlider_())return;const e=t.frameState.viewState.resolution;this.currentResolution_=e,this.setThumbPosition_(e)}}const d=u},1727:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(972),s=i(6837),r=i(5176),o=i(3407),a=i(1064);class l extends n.A{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target}),this.extent=t.extent?t.extent:null;const e=void 0!==t.className?t.className:"ol-zoom-extent",i=void 0!==t.label?t.label:"E",n=void 0!==t.tipLabel?t.tipLabel:"Fit to extent",o=document.createElement("button");o.setAttribute("type","button"),o.title=n,o.appendChild("string"==typeof i?document.createTextNode(i):i),o.addEventListener(s.A.CLICK,this.handleClick_.bind(this),!1);const a=e+" "+r.XI+" "+r.$N,l=this.element;l.className=a,l.appendChild(o)}handleClick_(t){t.preventDefault(),this.handleZoomToExtent()}handleZoomToExtent(){const t=this.getMap().getView(),e=this.extent?(0,o.SD)(this.extent,t.getProjection()):t.getProjection().getExtent();t.fitInternal((0,a.VY)(e))}}const h=l},6933:(t,e,i)=>{"use strict";i.d(e,{$x:()=>_,Io:()=>g,Li:()=>f,U$:()=>p,WQ:()=>o,aI:()=>h,aP:()=>l,e$:()=>c,hG:()=>d,hs:()=>u,sG:()=>a});var n=i(915),s=i(1597),r=i(2806);function o(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function a(t,e){const i=t[0],n=t[1],s=e[0],r=e[1],o=s[0],a=s[1],l=r[0],h=r[1],c=l-o,u=h-a,d=0===c&&0===u?0:(c*(i-o)+u*(n-a))/(c*c+u*u||0);let g,_;return d<=0?(g=o,_=a):d>=1?(g=l,_=h):(g=o+d*c,_=a+d*u),[g,_]}function l(t,e,i){const n=(0,s.xP)(e+180,360)-180,o=Math.abs(3600*n),a=i||0;let l=Math.floor(o/3600),h=Math.floor((o-3600*l)/60),c=(0,s.Mg)(o-3600*l-60*h,a);c>=60&&(c=0,h+=1),h>=60&&(h=0,l+=1);let u=l+"°";return 0===h&&0===c||(u+=" "+(0,r.H)(h,2)+"′"),0!==c&&(u+=" "+(0,r.H)(c,2,a)+"″"),0!==n&&(u+=" "+t.charAt(n<0?1:0)),u}function h(t,e){let i=!0;for(let n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i}function c(t,e){const i=Math.cos(e),n=Math.sin(e),s=t[0]*i-t[1]*n,r=t[1]*i+t[0]*n;return t[0]=s,t[1]=r,t}function u(t,e){return t[0]*=e,t[1]*=e,t}function d(t,e){const i=t[0]-e[0],n=t[1]-e[1];return i*i+n*n}function g(t,e){return Math.sqrt(d(t,e))}function _(t,e){return d(t,a(t,e))}function f(t,e){if(e.canWrapX()){const i=(0,n.RG)(e.getExtent()),s=p(t,e,i);s&&(t[0]-=s*i)}return t}function p(t,e,i){const s=e.getExtent();let r=0;return e.canWrapX()&&(t[0]s[2])&&(i=i||(0,n.RG)(s),r=Math.floor((t[0]-s[0])/i)),r}},5176:(t,e,i)=>{"use strict";i.d(e,{$N:()=>a,K5:()=>u,Q5:()=>s,Si:()=>n,Vv:()=>o,XI:()=>r,nT:()=>l});const n="ol-hidden",s="ol-selectable",r="ol-unselectable",o="ol-unsupported",a="ol-control",l="ol-collapsed",h=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),c=["style","variant","weight","size","lineHeight","family"],u=function(t){const e=t.match(h);if(!e)return null;const i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let t=0,n=c.length;t{"use strict";i.d(e,{DK:()=>h,Gq:()=>l,WM:()=>g,Y:()=>s,Yg:()=>a,bf:()=>u,fo:()=>c,gS:()=>d,lr:()=>o});var n=i(7771);function s(t,e,i,s){let r;return r=i&&i.length?i.shift():n.Wl?new OffscreenCanvas(t||300,e||300):document.createElement("canvas"),t&&(r.width=t),e&&(r.height=e),r.getContext("2d",s)}let r;function o(){return r||(r=s(1,1)),r}function a(t){const e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function l(t){let e=t.offsetWidth;const i=getComputedStyle(t);return e+=parseInt(i.marginLeft,10)+parseInt(i.marginRight,10),e}function h(t){let e=t.offsetHeight;const i=getComputedStyle(t);return e+=parseInt(i.marginTop,10)+parseInt(i.marginBottom,10),e}function c(t,e){const i=e.parentNode;i&&i.replaceChild(t,e)}function u(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function d(t){for(;t.lastChild;)t.removeChild(t.lastChild)}function g(t,e){const i=t.childNodes;for(let n=0;;++n){const s=i[n],r=e[n];if(!s&&!r)break;s!==r&&(s?r?t.insertBefore(r,s):(t.removeChild(s),--n):t.appendChild(r))}}},3474:(t,e,i)=>{"use strict";function n(t){return Math.pow(t,3)}function s(t){return 1-n(1-t)}function r(t){return 3*t*t-2*t*t*t}function o(t){return t}i.d(e,{T9:()=>r,a6:()=>n,sn:()=>o,vT:()=>s})},9438:(t,e,i)=>{"use strict";i.d(e,{JH:()=>o,Jz:()=>r,KT:()=>s});var n=i(3530);function s(t,e,i,n,s){if(n&&n!==t&&(i=i.bind(n)),s){const n=i;i=function(){t.removeEventListener(e,i),n.apply(this,arguments)}}const r={target:t,type:e,listener:i};return t.addEventListener(e,i),r}function r(t,e,i,n){return s(t,e,i,n,!0)}function o(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),(0,n.I)(t))}},1685:(t,e,i)=>{"use strict";function n(t){t.stopPropagation()}i.d(e,{Ay:()=>s,dG:()=>n});const s=class{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}},6837:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"}},9332:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var n=i(25),s=i(1685),r=i(4238),o=i(3530);class a extends n.A{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const i=this.listeners_||(this.listeners_={}),n=i[t]||(i[t]=[]);n.includes(e)||n.push(e)}dispatchEvent(t){const e="string"==typeof t,i=e?t:t.type,n=this.listeners_&&this.listeners_[i];if(!n)return;const o=e?new s.Ay(t):t;o.target||(o.target=this.eventTarget_||this);const a=this.dispatching_||(this.dispatching_={}),l=this.pendingRemovals_||(this.pendingRemovals_={});let h;i in a||(a[i]=0,l[i]=0),++a[i];for(let t=0,e=n.length;t0)}removeEventListener(t,e){if(!this.listeners_)return;const i=this.listeners_[t];if(!i)return;const n=i.indexOf(e);-1!==n&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[n]=r.tV,++this.pendingRemovals_[t]):(i.splice(n,1),0===i.length&&delete this.listeners_[t]))}}const l=a},8704:(t,e,i)=>{"use strict";i.d(e,{A4:()=>E,GB:()=>x,Gk:()=>u,IO:()=>h,Js:()=>l,Kg:()=>v,Q7:()=>a,TS:()=>p,Zm:()=>g,at:()=>d,eL:()=>c,fs:()=>T,k5:()=>m,qG:()=>f,t5:()=>_,tE:()=>y});var n=i(3445),s=i(4238),r=i(7771),o=i(588);function a(t){const e=arguments;return function(t){let i=!0;for(let n=0,s=e.length;n{"use strict";i.d(e,{DG:()=>v,Fq:()=>u,SR:()=>y,T8:()=>a,Xj:()=>m,Ye:()=>L,ZD:()=>T,_D:()=>x,cT:()=>h,go:()=>f,ho:()=>p,j:()=>o,mE:()=>c,qg:()=>E,wl:()=>l});var n=i(6514),s=i(3730);let r=0;const o=0,a=1<",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Coalesce:"coalesce",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette",ToString:"to-string"},A={[T.Get]:I((([t,e])=>void 0!==e?function(t){switch(t){case"string":return h;case"color":return c;case"number":return l;case"boolean":return a;case"number[]":return u;default:throw new Error(`Unrecognized type hint: ${t}`)}}(e.value):d),S(1,2),(function(t,e){const i=E(t[1],e);if(!(i instanceof x))throw new Error("Expected a literal argument for get operation");if("string"!=typeof i.value)throw new Error("Expected a string argument for get operation");return e.properties.add(i.value),3===t.length?[i,E(t[2],e)]:[i]})),[T.Var]:I((([t])=>t.type),S(1,1),(function(t,e,i,n){const s=t[1];if("string"!=typeof s)throw new Error("Expected a string argument for var operation");if(e.variables.add(s),!("variables"in e.style)||void 0===e.style.variables[s])return[new x(d,s)];const r=E(e.style.variables[s],e);if(r.value=s,n&&!p(n,r.type))throw new Error(`The variable ${s} has type ${f(r.type)} but the following type was expected: ${f(n)}`);return[r]})),[T.Id]:I(l|h,C,(function(t,e){e.featureId=!0})),[T.Concat]:I(h,S(2,1/0),R(d)),[T.GeometryType]:I(h,C,(function(t,e){e.geometryType=!0})),[T.Resolution]:I(l,C),[T.Zoom]:I(l,C),[T.Time]:I(l,C),[T.Any]:I(a,S(2,1/0),R(a)),[T.All]:I(a,S(2,1/0),R(a)),[T.Not]:I(a,S(1,1),R(a)),[T.Equal]:I(a,S(2,2),R(d),w),[T.NotEqual]:I(a,S(2,2),R(d),w),[T.GreaterThan]:I(a,S(2,2),R(d),w),[T.GreaterThanOrEqualTo]:I(a,S(2,2),R(d),w),[T.LessThan]:I(a,S(2,2),R(d),w),[T.LessThanOrEqualTo]:I(a,S(2,2),R(d),w),[T.Multiply]:I((t=>{let e=l|c;for(let i=0;i{let e=d;for(let i=1;i{let e=d;for(let i=2;i{let e=c|l;for(let i=3;i{let e=d;for(let i=1;i3===t.length||4===t.length?u|c:u),S(1,1/0),R(l)),[T.Color]:I(c,S(1,4),R(l)),[T.Band]:I(l,S(1,3),R(l)),[T.Palette]:I(c,S(2,2),(function(t,e){const i=E(t[1],e,l);if(i.type!==l)throw new Error(`The first argument of palette must be an number, got ${f(i.type)} instead`);const n=t[2];if(!Array.isArray(n))throw new Error("The second argument of palette must be an array");const s=new Array(n.length);for(let t=0;te)throw new Error(`Expected ${e===1/0?`${t} or more`:`${t} to ${e}`} arguments for ${s}, got ${r}`)}}function R(t){return function(e,i){const n=e[0],s=e.length-1,r=new Array(s);for(let o=0;o{"use strict";i.d(e,{uZ:()=>m,nR:()=>x,VO:()=>h,Lm:()=>d,z0:()=>f,$R:()=>a,Tl:()=>g,Sl:()=>_});const n=class{constructor(t,e){this.name=t,this.data=e,this.texture_=null}getTexture(t){if(!this.texture_){const e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.data.length/4,1,0,t.RGBA,t.UNSIGNED_BYTE,this.data),this.texture_=e}return this.texture_}};var s=i(9825),r=i(2323),o=i(3730);function a(t){const e=t.toString();return e.includes(".")?e:e+".0"}function l(t){if(t.length<2||t.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return`vec${t.length}(${t.map(a).join(", ")})`}function h(t){const e=(0,o._j)(t),i=e.length>3?e[3]:1;return l([e[0]/255*i,e[1]/255*i,e[2]/255*i,i])}const c={};let u=0;function d(t){return t in c||(c[t]=u++),c[t]}function g(t){return a(d(t))}function _(t){return"u_var_"+t}function f(){return{inFragmentShader:!1,variables:{},properties:{},functions:{},bandCount:0,style:{}}}const p="getBandValue",m="u_paletteTextures";function x(t,e,i,n){const r=(0,s.qg)(t,i,e);if((0,s.Xj)(r.type,s.j))throw new Error("No matching type was found");if(!(0,s.ho)(e,r.type)){const t=(0,s.go)(e),i=(0,s.go)(r.type);throw new Error(`Expected expression to be of type ${t}, got ${i}`)}return E(r,e,n)}function v(t){return(e,i,n)=>{const s=i.args.length,r=new Array(s);for(let t=0;t{const i=e.args[0].value;return i in t.properties||(t.properties[i]={name:i,type:e.type}),(t.inFragmentShader?"v_prop_":"a_prop_")+i},[s.ZD.GeometryType]:(t,e,i)=>{const n="geometryType";return n in t.properties||(t.properties[n]={name:n,type:s.cT,evaluator:t=>(0,s.Ye)(t.getGeometry())}),(t.inFragmentShader?"v_prop_":"a_prop_")+n},[s.ZD.Var]:(t,e)=>{const i=e.args[0].value;return i in t.variables||(t.variables[i]={name:i,type:e.type}),_(i)},[s.ZD.Resolution]:()=>"u_resolution",[s.ZD.Zoom]:()=>"u_zoom",[s.ZD.Time]:()=>"u_time",[s.ZD.Any]:v((t=>`(${t.join(" || ")})`)),[s.ZD.All]:v((t=>`(${t.join(" && ")})`)),[s.ZD.Not]:v((([t])=>`(!${t})`)),[s.ZD.Equal]:v((([t,e])=>`(${t} == ${e})`)),[s.ZD.NotEqual]:v((([t,e])=>`(${t} != ${e})`)),[s.ZD.GreaterThan]:v((([t,e])=>`(${t} > ${e})`)),[s.ZD.GreaterThanOrEqualTo]:v((([t,e])=>`(${t} >= ${e})`)),[s.ZD.LessThan]:v((([t,e])=>`(${t} < ${e})`)),[s.ZD.LessThanOrEqualTo]:v((([t,e])=>`(${t} <= ${e})`)),[s.ZD.Multiply]:v((t=>`(${t.join(" * ")})`)),[s.ZD.Divide]:v((([t,e])=>`(${t} / ${e})`)),[s.ZD.Add]:v((t=>`(${t.join(" + ")})`)),[s.ZD.Subtract]:v((([t,e])=>`(${t} - ${e})`)),[s.ZD.Clamp]:v((([t,e,i])=>`clamp(${t}, ${e}, ${i})`)),[s.ZD.Mod]:v((([t,e])=>`mod(${t}, ${e})`)),[s.ZD.Pow]:v((([t,e])=>`pow(${t}, ${e})`)),[s.ZD.Abs]:v((([t])=>`abs(${t})`)),[s.ZD.Floor]:v((([t])=>`floor(${t})`)),[s.ZD.Ceil]:v((([t])=>`ceil(${t})`)),[s.ZD.Round]:v((([t])=>`floor(${t} + 0.5)`)),[s.ZD.Sin]:v((([t])=>`sin(${t})`)),[s.ZD.Cos]:v((([t])=>`cos(${t})`)),[s.ZD.Atan]:v((([t,e])=>void 0!==e?`atan(${t}, ${e})`:`atan(${t})`)),[s.ZD.Sqrt]:v((([t])=>`sqrt(${t})`)),[s.ZD.Match]:v((t=>{const e=t[0],i=t[t.length-1];let n=null;for(let s=t.length-3;s>=1;s-=2)n=`(${e} == ${t[s]} ? ${t[s+1]} : ${n||i})`;return n})),[s.ZD.Between]:v((([t,e,i])=>`(${t} >= ${e} && ${t} <= ${i})`)),[s.ZD.Interpolate]:v((([t,e,...i])=>{let n="";for(let s=0;s{const e=t[t.length-1];let i=null;for(let n=t.length-3;n>=0;n-=2)i=`(${t[n]} ? ${t[n+1]} : ${i||e})`;return i})),[s.ZD.In]:v((([t,...e],i)=>{const n=function(t,e){return`operator_in_${Object.keys(e.functions).length}`}(0,i),s=[];for(let t=0;t`vec${t.length}(${t.join(", ")})`)),[s.ZD.Color]:v((t=>{if(1===t.length)return`vec4(vec3(${t[0]} / 255.0), 1.0)`;if(2===t.length)return`(${t[1]} * vec4(vec3(${t[0]} / 255.0), 1.0))`;const e=t.slice(0,3).map((t=>`${t} / 255.0`));return 3===t.length?`vec4(${e.join(", ")}, 1.0)`:`(${t[3]} * vec4(${e.join(", ")}, 1.0))`})),[s.ZD.Band]:v((([t,e,i],n)=>{if(!(p in n.functions)){let t="";const e=n.bandCount||1;for(let i=0;i{const[i,...r]=e.args,a=r.length,l=new Uint8Array(4*a);for(let t=0;t0)return a(t.value);if((t.type&s.T8)>0)return t.value.toString();if((t.type&s.cT)>0)return g(t.value.toString());if((t.type&s.mE)>0)return h(t.value);if((t.type&s.Fq)>0)return l(t.value);throw new Error(`Unexpected expression ${t.value} (expected type ${(0,s.go)(e)})`)}},915:(t,e,i)=>{"use strict";i.d(e,{$C:()=>y,$u:()=>G,Af:()=>z,Bg:()=>I,HY:()=>k,Im:()=>N,Ld:()=>a,Li:()=>U,Mx:()=>j,N:()=>g,NW:()=>B,Oq:()=>P,Py:()=>D,QJ:()=>X,R:()=>S,R8:()=>E,RG:()=>O,Rj:()=>c,S5:()=>d,Tr:()=>s,UG:()=>C,Vy:()=>p,WU:()=>F,X$:()=>v,Ym:()=>l,Yw:()=>L,_N:()=>M,aI:()=>m,aZ:()=>_,bE:()=>x,dP:()=>f,k_:()=>R,ms:()=>h,o8:()=>o,q1:()=>w,qF:()=>b,r:()=>r,sB:()=>A,vz:()=>u});var n=i(1580);function s(t){const e=[1/0,1/0,-1/0,-1/0];for(let i=0,n=t.length;ir&&(h|=n.A.RIGHT),lo&&(h|=n.A.ABOVE),h===n.A.UNKNOWN&&(h=n.A.INTERSECTING),h}function d(){return[1/0,1/0,-1/0,-1/0]}function g(t,e,i,n,s){return s?(s[0]=t,s[1]=e,s[2]=i,s[3]=n,s):[t,e,i,n]}function _(t){return g(1/0,1/0,-1/0,-1/0,t)}function f(t,e){const i=t[0],n=t[1];return g(i,n,i,n,e)}function p(t,e,i,n,s){return E(_(s),t,e,i,n)}function m(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function x(t,e,i){return Math.abs(t[0]-e[0])t[2]&&(t[2]=e[2]),e[1]t[3]&&(t[3]=e[3]),t}function y(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function E(t,e,i,n,s){for(;ie[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function N(t){return t[2]=a&&p<=h),s||!(o&n.A.RIGHT)||r&n.A.RIGHT||(m=_-(g-h)*f,s=m>=l&&m<=c),s||!(o&n.A.BELOW)||r&n.A.BELOW||(p=g-(_-l)/f,s=p>=a&&p<=h),s||!(o&n.A.LEFT)||r&n.A.LEFT||(m=_-(g-a)*f,s=m>=l&&m<=c)}return s}function B(t,e,i,n){if(N(t))return _(i);let s=[];if(n>1){const e=t[2]-t[0],i=t[3]-t[1];for(let r=0;r=i[2])){const e=O(i),s=Math.floor((n[0]-i[0])/e)*e;t[0]-=s,t[2]-=s}return t}function X(t,e){if(e.canWrapX()){const i=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[i[0],t[1],i[2],t[3]]];U(t,e);const n=O(i);if(O(t)>n)return[[i[0],t[1],i[2],t[3]]];if(t[0]i[2])return[[t[0],t[1],i[2],t[3]],[i[0],t[1],t[2]-n,t[3]]]}return[t]}},1580:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16}},1142:(t,e,i)=>{"use strict";i.d(e,{m8:()=>r,nF:()=>o});var n=i(4238);let s=!1;function r(t,e,i,n,r,o,a){const l=new XMLHttpRequest;l.open("GET","function"==typeof t?t(i,n,r):t,!0),"arraybuffer"==e.getType()&&(l.responseType="arraybuffer"),l.withCredentials=s,l.onload=function(t){if(!l.status||l.status>=200&&l.status<300){const t=e.getType();let n;"json"==t?n=JSON.parse(l.responseText):"text"==t?n=l.responseText:"xml"==t?(n=l.responseXML,n||(n=(new DOMParser).parseFromString(l.responseText,"application/xml"))):"arraybuffer"==t&&(n=l.response),n?o(e.readFeatures(n,{extent:i,featureProjection:r}),e.readProjection(n)):a()}else a()},l.onerror=a,l.send()}function o(t,e){return function(i,s,o,a,l){const h=this;r(t,e,i,s,o,(function(t,e){h.addFeatures(t),void 0!==a&&a(t)}),l||n.tV)}}},6067:(t,e,i)=>{"use strict";i.d(e,{A:()=>V});var n=i(4087);function s(t,e){return r(t,e,[]).join("")}function r(t,e,i){if(t.nodeType==Node.CDATA_SECTION_NODE||t.nodeType==Node.TEXT_NODE)e?i.push(String(t.nodeValue).replace(/(\r\n|\r|\n)/g,"")):i.push(t.nodeValue);else{let n;for(n=t.firstChild;n;n=n.nextSibling)r(n,e,i)}return i}function o(t,e){return function(i,n){const s=t.call(void 0!==e?e:this,i,n);void 0!==s&&n[n.length-1].push(s)}}function a(t,e,i){return function(n,s){const r=t.call(void 0!==i?i:this,n,s);if(void 0!==r){const t=s[s.length-1],i=void 0!==e?e:n.localName;let o;i in t?o=t[i]:(o=[],t[i]=o),o.push(r)}}}function l(t,e,i){return function(n,s){const r=t.call(void 0!==i?i:this,n,s);void 0!==r&&(s[s.length-1][void 0!==e?e:n.localName]=r)}}function h(t,e,i){let n,s;for(i=void 0!==i?i:{},n=0,s=t.length;n{"use strict";i.d(e,{B4:()=>a,W8:()=>r,hq:()=>l,rT:()=>s,tV:()=>o});var n=i(6514);function s(){return!0}function r(){return!1}function o(){}function a(t){let e,i,s,r=!1;return function(){const o=Array.prototype.slice.call(arguments);return r&&this===s&&(0,n.aI)(o,i)||(r=!0,s=this,i=o,e=t.apply(this,arguments)),e}}function l(t){return function(){let e;try{e=t()}catch(t){return Promise.reject(t)}return e instanceof Promise?e:Promise.resolve(e)}()}},7430:(t,e,i)=>{"use strict";i.d(e,{A:()=>d});var n=i(4120),s=i(4087),r=i(9703),o=i(915),a=i(3407),l=i(4238),h=i(7622);const c=(0,r.vt)();class u extends n.A{constructor(){super(),this.extent_=(0,o.S5)(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=(0,l.B4)(((t,e,i)=>{if(!i)return this.getSimplifiedGeometry(e);const n=this.clone();return n.applyTransform(i),n.getSimplifiedGeometry(e)}))}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return(0,s.b0)()}closestPointXY(t,e,i,n){return(0,s.b0)()}containsXY(t,e){const i=this.getClosestPoint([t,e]);return i[0]===t&&i[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return(0,s.b0)()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const t=this.computeExtent(this.extent_);(isNaN(t[0])||isNaN(t[1]))&&(0,o.aZ)(t),this.extentRevision_=this.getRevision()}return(0,o.$u)(this.extent_,t)}rotate(t,e){(0,s.b0)()}scale(t,e,i){(0,s.b0)()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return(0,s.b0)()}getType(){return(0,s.b0)()}applyTransform(t){(0,s.b0)()}intersectsExtent(t){return(0,s.b0)()}translate(t,e){(0,s.b0)()}transform(t,e){const i=(0,a.Jt)(t),n="tile-pixels"==i.getUnits()?function(t,n,s){const l=i.getExtent(),u=i.getWorldExtent(),d=(0,o.Oq)(u)/(0,o.Oq)(l);return(0,r.Zz)(c,u[0],u[3],d,-d,0,0,0),(0,h.Rc)(t,0,t.length,s,c,n),(0,a.RG)(i,e)(t,n,s)}:(0,a.RG)(i,e);return this.applyTransform(n),this}}const d=u},4338:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(6837),s=i(7430),r=i(915),o=i(9438);class a extends s.A{constructor(t){super(),this.geometries_=t,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(o.JH),this.changeEventsKeys_.length=0}listenGeometriesChange_(){const t=this.geometries_;for(let e=0,i=t.length;et.clone()))}const h=a},1217:(t,e,i)=>{"use strict";i.d(e,{A:()=>f});var n=i(2096),s=i(3953),r=i(915),o=i(2497),a=i(3671),l=i(6514),h=i(1374),c=i(6361),u=i(9969),d=i(4350),g=i(904);class _ extends n.Ay{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}appendCoordinate(t){(0,l.X$)(this.flatCoordinates,t),this.changed()}clone(){const t=new _(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<(0,r.Ld)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,s.MD)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,s.n)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,i,n))}forEachSegment(t){return(0,h.j)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinateAtM(t,e){return"XYM"!=this.layout&&"XYZM"!=this.layout?null:(e=void 0!==e&&e,(0,u.gr)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))}getCoordinates(){return(0,c.n2)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(t,e){return(0,u.SH)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return(0,g.k)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_??void 0),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(t){const e=[];return e.length=(0,a.P4)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new _(e,"XY")}getType(){return"LineString"}intersectsExtent(t){return(0,d.gp)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,o.z2)(this.flatCoordinates,0,t,this.stride),this.changed()}}const f=_},6702:(t,e,i)=>{"use strict";i.d(e,{A:()=>_});var n=i(1217),s=i(2096),r=i(3953),o=i(915),a=i(2497),l=i(3671),h=i(6514),c=i(6361),u=i(9969),d=i(4350);class g extends s.Ay{constructor(t,e,i){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,e);else if(void 0!==e&&i)this.setFlatCoordinates(e,t),this.ends_=i;else{const e=t,i=[],n=[];for(let t=0,s=e.length;t{"use strict";i.d(e,{A:()=>u});var n=i(4294),s=i(2096),r=i(915),o=i(2497),a=i(6514),l=i(6361),h=i(1597);class c extends s.Ay{constructor(t,e){super(),e&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendPoint(t){(0,a.X$)(this.flatCoordinates,t.getFlatCoordinates()),this.changed()}clone(){const t=new c(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){if(n<(0,r.Ld)(this.getExtent(),t,e))return n;const s=this.flatCoordinates,o=this.stride;for(let r=0,a=s.length;r{"use strict";i.d(e,{A:()=>v});var n=i(503),s=i(1064),r=i(2096),o=i(3953),a=i(915),l=i(2497),h=i(6514),c=i(2616),u=i(6361),d=i(4350),g=i(3402),_=i(8609),f=i(4049),p=i(2845),m=i(3671);class x extends r.Ay{constructor(t,e,i){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!i&&!Array.isArray(t[0])){const n=t,s=[],r=[];for(let t=0,e=n.length;t{"use strict";i.d(e,{A:()=>l});var n=i(2096),s=i(915),r=i(2497),o=i(1597);class a extends n.Ay{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new a(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){const s=this.flatCoordinates,r=(0,o.hG)(t,e,s[0],s[1]);if(r{"use strict";i.d(e,{kj:()=>T,Ay:()=>E,nD:()=>C,VY:()=>A});var n=i(2096),s=i(3953),r=i(915),o=i(2497),a=i(3671),l=i(6361),h=i(8609);class c extends n.Ay{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}clone(){return new c(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,i,n){return n<(0,r.Ld)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,s.MD)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,s.n)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,n))}getArea(){return(0,h.eN)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return(0,l.n2)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=(0,a.P4)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new c(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,o.z2)(this.flatCoordinates,0,t,this.stride),this.changed()}}const u=c;var d=i(4294),g=i(6514),_=i(2616),f=i(4350),p=i(3402),m=i(2845),x=i(1597),v=i(2490);class y extends n.Ay{constructor(t,e,i){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,void 0!==e&&i?(this.setFlatCoordinates(e,t),this.ends_=i):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?(0,g.X$)(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new y(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<(0,r.Ld)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,s.HX)(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,s.oW)(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,n))}containsXY(t,e){return(0,m.zb)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return(0,h.PK)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),(0,p.ug)(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,(0,l.cD)(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=(0,r.q1)(this.getExtent());this.flatInteriorPoint_=(0,_.J)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new d.A(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new u(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,i=this.ends_,n=[];let s=0;for(let r=0,o=i.length;r{"use strict";i.d(e,{Ay:()=>u,dn:()=>h,p0:()=>l,v7:()=>c});var n=i(7430),s=i(4087),r=i(915),o=i(7622);class a extends n.A{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(t){return(0,r.Vy)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return(0,s.b0)()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length{"use strict";function n(t,e,i,n){let s=0,r=t[i-n],o=t[i-n+1];for(;er,PK:()=>s,eN:()=>n})},4049:(t,e,i)=>{"use strict";i.d(e,{C:()=>s});var n=i(915);function s(t,e,i,s){const r=[];let o=(0,n.S5)();for(let a=0,l=i.length;a{"use strict";i.d(e,{HX:()=>o,MD:()=>r,c:()=>a,n:()=>l,oW:()=>h,te:()=>c});var n=i(1597);function s(t,e,i,s,r,o,a){const l=t[e],h=t[e+1],c=t[i]-l,u=t[i+1]-h;let d;if(0===c&&0===u)d=e;else{const g=((r-l)*c+(o-h)*u)/(c*c+u*u);if(g>1)d=i;else{if(g>0){for(let r=0;rr&&(r=l),o=i,a=s}return r}function o(t,e,i,n,s){for(let o=0,a=i.length;o{"use strict";i.d(e,{Gd:()=>a,a_:()=>r,t7:()=>s,zb:()=>o});var n=i(915);function s(t,e,i,s,o){return!(0,n.sB)(o,(function(n){return!r(t,e,i,s,n[0],n[1])}))}function r(t,e,i,n,s,r){let o=0,a=t[i-n],l=t[i-n+1];for(;er&&(i-a)*(r-l)-(s-a)*(n-l)>0&&o++:n<=r&&(i-a)*(r-l)-(s-a)*(n-l)<0&&o--,a=i,l=n}return 0!==o}function o(t,e,i,n,s,o){if(0===i.length)return!1;if(!r(t,e,i[0],n,s,o))return!1;for(let e=1,a=i.length;e{"use strict";function n(t,e,i,n){for(let n=0,s=i.length;nr,_n:()=>n,d6:()=>o,z2:()=>s})},6361:(t,e,i)=>{"use strict";function n(t,e,i,n,s){s=void 0!==s?s:[];let r=0;for(let o=e;or,cD:()=>s,n2:()=>n})},2616:(t,e,i)=>{"use strict";i.d(e,{J:()=>r,p:()=>o});var n=i(6514),s=i(2845);function r(t,e,i,r,o,a,l){let h,c,u,d,g,_,f;const p=o[a+1],m=[];for(let n=0,s=i.length;nv&&(u=(d+g)/2,(0,s.zb)(t,e,i,r,u,p)&&(x=u,v=n)),d=g}return isNaN(x)&&(x=o[a]),l?(l.push(x,p,v),l):[x,p,v]}function o(t,e,i,n,s){let o=[];for(let a=0,l=i.length;a{"use strict";i.d(e,{L8:()=>a,SH:()=>r,gr:()=>o});var n=i(6514),s=i(1597);function r(t,e,i,r,o,a,l){let h,c;const u=(i-e)/r;if(1===u)h=e;else if(2===u)h=e,c=o;else if(0!==u){let s=t[e],a=t[e+1],l=0;const u=[0];for(let n=e+r;n1?l:2,a=a||new Array(l);for(let e=0;e>1;r{"use strict";i.d(e,{HT:()=>h,Wp:()=>c,fB:()=>a,gp:()=>o,sj:()=>l});var n=i(915),s=i(1374),r=i(2845);function o(t,e,i,r,o){const a=(0,n.R8)((0,n.S5)(),t,e,i,r);return!!(0,n.HY)(o,a)&&(!!(0,n.ms)(o,a)||a[0]>=o[0]&&a[2]<=o[2]||a[1]>=o[1]&&a[3]<=o[3]||(0,s.j)(t,e,i,r,(function(t,e){return(0,n.Mx)(o,t,e)})))}function a(t,e,i,n,s){for(let r=0,a=i.length;r{"use strict";function n(t,e,i,n){let s=t[e],r=t[e+1],o=0;for(let a=e+n;an})},3402:(t,e,i)=>{"use strict";function n(t,e,i,n){for(;e0}function r(t,e,i,n,r){r=void 0!==r&&r;for(let o=0,a=i.length;oh,PA:()=>r,mb:()=>o,ug:()=>a,NK:()=>l})},1374:(t,e,i)=>{"use strict";function n(t,e,i,n,s){let r;for(e+=n;en})},3671:(t,e,i)=>{"use strict";i.d(e,{AL:()=>r,Hg:()=>l,P4:()=>s,n$:()=>o,sx:()=>h});var n=i(1597);function s(t,e,i,s,r,o,a){const l=(i-e)/s;if(l<3){for(;e0;){const i=c.pop(),o=c.pop();let a=0;const l=t[o],d=t[o+1],g=t[i],_=t[i+1];for(let e=o+s;ea&&(u=e,a=r)}a>r&&(h[(u-e)/s]=1,o+s0&&f>g)&&(_<0&&p<_||_==p||_>0&&p>_)?(l=i,h=d):(r[a++]=l,r[a++]=h,c=l,u=h,l=i,h=d)}return r[a++]=l,r[a++]=h,a}function l(t,e,i,n,s,r,o,l){for(let h=0,c=i.length;h{"use strict";function n(t,e,i,n,s,r){r=r||[];let o=0;for(let a=e;an,Tl:()=>o,e$:()=>s,hs:()=>r})},7771:(t,e,i)=>{"use strict";i.d(e,{DT:()=>c,FT:()=>d,Wl:()=>h,XM:()=>u,_p:()=>s,cr:()=>l,ew:()=>a,j:()=>o,oF:()=>r});const n="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",s=n.includes("firefox"),r=n.includes("safari")&&!n.includes("chrom")&&(n.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(n)),o=n.includes("webkit")&&!n.includes("edge"),a=n.includes("macintosh"),l="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,h="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,c="undefined"!=typeof Image&&Image.prototype.decode,u="function"==typeof createImageBitmap,d=function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(t){}return t}()},6068:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(6292),s=i(3445);class r extends n.Ay{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:250}handleEvent(t){let e=!1;if(t.type==s.A.DBLCLICK){const i=t.originalEvent,s=t.map,r=t.coordinate,o=i.shiftKey?-this.delta_:this.delta_,a=s.getView();(0,n.D2)(a,o,r,this.duration_),i.preventDefault(),e=!0}return!e}}const o=r},422:(t,e,i)=>{"use strict";i.d(e,{A:()=>d});var n=i(1685),s=i(1409),r=i(25),o=i(1064);class a extends r.A{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,i="px",n=this.element_.style;n.left=Math.min(t[0],e[0])+i,n.top=Math.min(t[1],e[1])+i,n.width=Math.abs(e[0]-t[0])+i,n.height=Math.abs(e[1]-t[1])+i}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const t=this.element_.style;t.left="inherit",t.top="inherit",t.width="inherit",t.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){const t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new o.Ay([i])}getGeometry(){return this.geometry_}}const l=a;var h=i(8704);class c extends n.Ay{constructor(t,e,i){super(t),this.coordinate=e,this.mapBrowserEvent=i}}class u extends s.A{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new l(t.className||"ol-dragbox"),this.minArea_=void 0!==t.minArea?t.minArea:64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition?t.condition:h.at,this.boxEndCondition_=t.boxEndCondition?t.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,i){const n=i[0]-e[0],s=i[1]-e[1];return n*n+s*s>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new c("boxdrag",t.coordinate,t))}handleUpEvent(t){this.box_.setMap(null);const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new c(e?"boxend":"boxcancel",t.coordinate,t)),!1}handleDownEvent(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new c("boxstart",t.coordinate,t)),!0)}onBoxEnd(t){}}const d=u},4473:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(1409),s=i(4238),r=i(8704),o=i(3474),a=i(6933);class l extends n.A{constructor(t){super({stopDown:s.W8}),t=t||{},this.kinetic_=t.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const e=t.condition?t.condition:(0,r.Q7)(r.TS,r.fs);this.condition_=t.onFocusOnly?(0,r.Q7)(r.eL,e):e,this.noKinetic_=!1}handleDragEvent(t){const e=t.map;this.panning_||(this.panning_=!0,e.getView().beginInteraction());const i=this.targetPointers,s=e.getEventPixel((0,n.v)(i));if(i.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(s[0],s[1]),this.lastCentroid){const e=[this.lastCentroid[0]-s[0],s[1]-this.lastCentroid[1]],i=t.map.getView();(0,a.hs)(e,i.getResolution()),(0,a.e$)(e,i.getRotation()),i.adjustCenterInternal(e)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=s,this.lastPointersCount_=i.length,t.originalEvent.preventDefault()}handleUpEvent(t){const e=t.map,i=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const t=this.kinetic_.getDistance(),n=this.kinetic_.getAngle(),s=i.getCenterInternal(),r=e.getPixelFromCoordinateInternal(s),a=e.getCoordinateFromPixelInternal([r[0]-t*Math.cos(n),r[1]-t*Math.sin(n)]);i.animateInternal({center:i.getConstrainedCenter(a),duration:500,easing:o.vT})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(t){if(this.targetPointers.length>0&&this.condition_(t)){const e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}const h=l},4051:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var n=i(1409),s=i(4238),r=i(8704),o=i(4498);class a extends n.A{constructor(t){t=t||{},super({stopDown:s.W8}),this.condition_=t.condition?t.condition:r.IO,this.lastAngle_=void 0,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){if(!(0,r.A4)(t))return;const e=t.map,i=e.getView();if(i.getConstraints().rotation===o.b8)return;const n=e.getSize(),s=t.pixel,a=Math.atan2(n[1]/2-s[1],s[0]-n[0]/2);if(void 0!==this.lastAngle_){const t=a-this.lastAngle_;i.adjustRotationInternal(-t)}this.lastAngle_=a}handleUpEvent(t){return!(0,r.A4)(t)||(t.map.getView().endInteraction(this.duration_),!1)}handleDownEvent(t){return!!(0,r.A4)(t)&&(!(!(0,r.at)(t)||!this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))}}const l=a},4423:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(422),s=i(3474),r=i(8704);class o extends n.A{constructor(t){super({condition:(t=t||{}).condition?t.condition:r.Kg,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=void 0!==t.duration?t.duration:200,this.out_=void 0!==t.out&&t.out}onBoxEnd(t){const e=this.getMap().getView();let i=this.getGeometry();if(this.out_){const t=e.rotatedExtentForGeometry(i),n=e.getResolutionForExtentInternal(t),s=e.getResolution()/n;i=i.clone(),i.scale(s*s)}e.fitInternal(i,{duration:this.duration_,easing:s.vT})}}const a=o},9964:(t,e,i)=>{"use strict";i.d(e,{Ay:()=>Z});var n=i(2096),s=i(915),r=i(2497),o=i(7622);class a extends n.Ay{constructor(t,e,i){super(),void 0!==i&&void 0===e?this.setFlatCoordinates(i,t):(e=e||0,this.setCenterAndRadius(t,e,i))}clone(){const t=new a(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){const s=this.flatCoordinates,r=t-s[0],o=e-s[1],a=r*r+o*o;if(a=e[0]||t[1]<=e[1]&&t[3]>=e[1]||(0,s.sB)(t,this.intersectsCoordinate.bind(this))}return!1}setCenter(t){const e=this.stride,i=this.flatCoordinates[e]-this.flatCoordinates[0],n=t.slice();n[e]=n[0]+i;for(let i=1;i=i?t[e-i]:t[e]}function O(t,e,i){let n,s;eo)return D(B(t,n),B(t,s));let a=0;n=i?n-=i:n<0&&(n+=i);let r=n+1;r>=i&&(r-=i);const o=t[n],a=o[0],l=o[1],h=t[r];return[a+(h[0]-a)*s,l+(h[1]-l)*s]}class U extends E.A{constructor(t){const e=t;e.stopDown||(e.stopDown=S.W8),super(e),this.on,this.once,this.un,this.shouldHandle_=!1,this.downPx_=null,this.downTimeout_,this.lastDragTime_,this.pointerType_,this.freehand_=!1,this.source_=t.source?t.source:null,this.features_=t.features?t.features:null,this.snapTolerance_=t.snapTolerance?t.snapTolerance:12,this.type_=t.type,this.mode_=function(t){switch(t){case"Point":case"MultiPoint":return"Point";case"LineString":case"MultiLineString":return"LineString";case"Polygon":case"MultiPolygon":return"Polygon";case"Circle":return"Circle";default:throw new Error("Invalid type: "+t)}}(this.type_),this.stopClick_=!!t.stopClick,this.minPoints_=t.minPoints?t.minPoints:"Polygon"===this.mode_?3:2,this.maxPoints_="Circle"===this.mode_?2:t.maxPoints?t.maxPoints:1/0,this.finishCondition_=t.finishCondition?t.finishCondition:S.rT,this.geometryLayout_=t.geometryLayout?t.geometryLayout:"XY";let i=t.geometryFunction;if(!i){const t=this.mode_;if("Circle"===t)i=function(t,e,i){const n=e||new l([NaN,NaN]),s=(0,L.Ad)(t[0],i),r=(0,I.hG)(s,(0,L.Ad)(t[t.length-1],i));n.setCenterAndRadius(s,Math.sqrt(r),this.geometryLayout_);const o=(0,L.Tf)();return o&&n.transform(i,o),n};else{let e;"Point"===t?e=y.A:"LineString"===t?e=_.A:"Polygon"===t&&(e=T.Ay),i=function(i,n,s){return n?"Polygon"===t?i[0].length?n.setCoordinates([i[0].concat([i[0][0]])],this.geometryLayout_):n.setCoordinates([],this.geometryLayout_):n.setCoordinates(i,this.geometryLayout_):n=new e(i,this.geometryLayout_),n}}}this.geometryFunction_=i,this.dragVertexDelay_=void 0!==t.dragVertexDelay?t.dragVertexDelay:500,this.finishCoordinate_=null,this.sketchFeature_=null,this.sketchPoint_=null,this.sketchCoords_=null,this.sketchLine_=null,this.sketchLineCoords_=null,this.squaredClickTolerance_=t.clickTolerance?t.clickTolerance*t.clickTolerance:36,this.overlay_=new A.A({source:new C.A({useSpatialIndex:!1,wrapX:!!t.wrapX&&t.wrapX}),style:t.style?t.style:X(),updateWhileInteracting:!0}),this.geometryName_=t.geometryName,this.condition_=t.condition?t.condition:R.TS,this.freehandCondition_,t.freehand?this.freehandCondition_=R.Gk:this.freehandCondition_=t.freehandCondition?t.freehandCondition:R.Kg,this.traceCondition_,this.setTrace(t.trace||!1),this.traceState_={active:!1},this.traceSource_=t.traceSource||t.source||null,this.addChangeListener(g.A.ACTIVE,this.updateState_)}setTrace(t){let e;e=t?!0===t?R.Gk:t:R.Zm,this.traceCondition_=e}setMap(t){super.setMap(t),this.updateState_()}getOverlay(){return this.overlay_}handleEvent(t){t.originalEvent.type===c.A.CONTEXTMENU&&t.originalEvent.preventDefault(),this.freehand_="Point"!==this.mode_&&this.freehandCondition_(t);let e=t.type===p.A.POINTERMOVE,i=!0;return!this.freehand_&&this.lastDragTime_&&t.type===p.A.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=t.pixel,this.shouldHandle_=!this.freehand_,e=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&t.type===p.A.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(t.coordinate),i=!1):this.freehand_&&t.type===p.A.POINTERDOWN?i=!1:e&&this.getPointerCount()<2?(i=t.type===p.A.POINTERMOVE,i&&this.freehand_?(this.handlePointerMove_(t),this.shouldHandle_&&t.originalEvent.preventDefault()):("mouse"===t.originalEvent.pointerType||t.type===p.A.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(t)):t.type===p.A.DBLCLICK&&(i=!1),super.handleEvent(t)&&i}handleDownEvent(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout((()=>{this.handlePointerMove_(new f.A(p.A.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)}deactivateTrace_(){this.traceState_={active:!1}}toggleTraceState_(t){if(!this.traceSource_||!this.traceCondition_(t))return;if(this.traceState_.active)return void this.deactivateTrace_();const e=this.getMap(),i=e.getCoordinateFromPixel([t.pixel[0]-this.snapTolerance_,t.pixel[1]+this.snapTolerance_]),n=e.getCoordinateFromPixel([t.pixel[0]+this.snapTolerance_,t.pixel[1]-this.snapTolerance_]),r=(0,s.Tr)([i,n]),o=this.traceSource_.getFeaturesInExtent(r);if(0===o.length)return;const a=function(t,e){const i=[];for(let n=0;nt.endIndex||!i&&et.endIndex)&&this.removeTracedCoordinates_(e,t.endIndex):(this.removeTracedCoordinates_(t.startIndex,t.endIndex),this.addTracedCoordinates_(t,t.startIndex,e))}removeTracedCoordinates_(t,e){if(t===e)return;let i=0;if(t0&&this.removeLastPoints_(i)}addTracedCoordinates_(t,e,i){if(e===i)return;const n=[];if(e=r;--e)n.push(F(t.coordinates,e))}n.length&&this.appendCoordinates(n)}updateTrace_(t){const e=this.traceState_;if(!e.active)return;if(-1===e.targetIndex&&(0,I.Io)(e.startPx,t.pixel)i.startIndex?hi.startIndex&&(h-=n.length)),l=h,a=t)}const h=e.targets[a];let c=h.ring;if(e.targetIndex===a&&c){const t=B(h.coordinates,l),s=i.getPixelFromCoordinate(t);(0,I.Io)(s,e.startPx)>n&&(c=!1)}if(c){const t=h.coordinates,e=t.length,i=h.startIndex,n=l;if(ithis.squaredClickTolerance_:r<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?(this.updateTrace_(t),this.modifyDrawing_(t.coordinate)):this.createOrUpdateSketchPoint_(t.coordinate.slice())}atFinish_(t,e){let i=!1;if(this.sketchFeature_){let n=!1,s=[this.finishCoordinate_];const r=this.mode_;if("Point"===r)i=!0;else if("Circle"===r)i=2===this.sketchCoords_.length;else if("LineString"===r)n=!e&&this.sketchCoords_.length>this.minPoints_;else if("Polygon"===r){const t=this.sketchCoords_;n=t[0].length>this.minPoints_,s=[t[0][0],t[0][t[0].length-2]],s=e?[t[0][0]]:[t[0][0],t[0][t[0].length-2]]}if(n){const e=this.getMap();for(let n=0,r=s.length;n=this.maxPoints_&&(this.freehand_?s.pop():n=!0),s.push(t.slice()),this.geometryFunction_(s,e,i)):"Polygon"===r&&(s=this.sketchCoords_[0],s.length>=this.maxPoints_&&(this.freehand_?s.pop():n=!0),s.push(t.slice()),n&&(this.finishCoordinate_=s[0]),this.geometryFunction_(this.sketchCoords_,e,i)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),n?this.finishDrawing():this.sketchFeature_}removeLastPoints_(t){if(!this.sketchFeature_)return;const e=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection(),n=this.mode_;for(let s=0;s=2){this.finishCoordinate_=t[t.length-2].slice();const e=this.finishCoordinate_.slice();t[t.length-1]=e,this.createOrUpdateSketchPoint_(e)}this.geometryFunction_(t,e,i),"Polygon"===e.getType()&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(e)}else if("Polygon"===n){t=this.sketchCoords_[0],t.splice(-2,1);const n=this.sketchLine_.getGeometry();if(t.length>=2){const e=t[t.length-2].slice();t[t.length-1]=e,this.createOrUpdateSketchPoint_(e)}n.setCoordinates(t),this.geometryFunction_(this.sketchCoords_,e,i)}if(1===t.length){this.abortDrawing();break}}this.updateSketchFeatures_()}removeLastPoint(){this.removeLastPoints_(1)}finishDrawing(){const t=this.abortDrawing_();if(!t)return null;let e=this.sketchCoords_;const i=t.getGeometry(),n=this.getMap().getView().getProjection();return"LineString"===this.mode_?(e.pop(),this.geometryFunction_(e,i,n)):"Polygon"===this.mode_&&(e[0].pop(),this.geometryFunction_(e,i,n),e=i.getCoordinates()),"MultiPoint"===this.type_?t.setGeometry(new x.A([e])):"MultiLineString"===this.type_?t.setGeometry(new m.A([e])):"MultiPolygon"===this.type_&&t.setGeometry(new v.A([e])),this.dispatchEvent(new M("drawend",t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t),t}abortDrawing_(){this.finishCoordinate_=null;const t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),this.deactivateTrace_(),t}abortDrawing(){const t=this.abortDrawing_();t&&this.dispatchEvent(new M("drawabort",t))}appendCoordinates(t){const e=this.mode_,i=!this.sketchFeature_;let n;if(i&&this.startDrawing_(t[0]),"LineString"===e||"Circle"===e)n=this.sketchCoords_;else{if("Polygon"!==e)return;n=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[]}i&&n.shift(),n.pop();for(let e=0;e{"use strict";i.d(e,{Ay:()=>h,D2:()=>l,e4:()=>a});var n=i(4120),s=i(2187),r=i(3474);class o extends n.A{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(s.A.ACTIVE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(s.A.ACTIVE,t)}setMap(t){this.map_=t}}function a(t,e,i){const n=t.getCenterInternal();if(n){const s=[n[0]+e[0],n[1]+e[1]];t.animateInternal({duration:void 0!==i?i:250,easing:r.sn,center:t.getConstrainedCenter(s)})}}function l(t,e,i,n){const s=t.getZoom();if(void 0===s)return;const o=t.getConstrainedZoom(s+e),a=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:a,anchor:i,duration:void 0!==n?n:250,easing:r.vT})}const h=o},9888:(t,e,i)=>{"use strict";i.d(e,{A:()=>u});var n=i(6837),s=i(6292);const r="ArrowLeft",o="ArrowRight",a="ArrowDown";var l=i(8704),h=i(6933);class c extends s.Ay{constructor(t){super(),t=t||{},this.defaultCondition_=function(t){return(0,l.TS)(t)&&(0,l.tE)(t)},this.condition_=void 0!==t.condition?t.condition:this.defaultCondition_,this.duration_=void 0!==t.duration?t.duration:100,this.pixelDelta_=void 0!==t.pixelDelta?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==n.A.KEYDOWN){const i=t.originalEvent,n=i.key;if(this.condition_(t)&&(n==a||n==r||n==o||"ArrowUp"==n)){const l=t.map.getView(),c=l.getResolution()*this.pixelDelta_;let u=0,d=0;n==a?d=-c:n==r?u=-c:n==o?u=c:d=c;const g=[u,d];(0,h.e$)(g,l.getRotation()),(0,s.e4)(l,g,this.duration_),i.preventDefault(),e=!0}}return!e}}const u=c},6856:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(6837),s=i(6292),r=i(8704);class o extends s.Ay{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:function(t){return!(0,r.GB)(t)&&(0,r.tE)(t)},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:100}handleEvent(t){let e=!1;if(t.type==n.A.KEYDOWN||t.type==n.A.KEYPRESS){const i=t.originalEvent,n=i.key;if(this.condition_(t)&&("+"===n||"-"===n)){const r=t.map,o="+"===n?this.delta_:-this.delta_,a=r.getView();(0,s.D2)(a,o,void 0,this.duration_),i.preventDefault(),e=!0}}return!e}}const a=o},9132:(t,e,i)=>{"use strict";i.d(e,{A:()=>M});var n=i(71),s=i(2135),r=i(1685),o=i(6837),a=i(6717),l=i(3445),h=i(4294),c=i(1409),u=i(5902),d=i(8280),g=i(2757),_=i(731),f=i(8704),p=i(915),m=i(6933),x=i(9276),v=i(6514),y=i(1064),E=i(3407),T=i(4087);const A=[0,0,0,0],C=[],S="modifyend";class R extends r.Ay{constructor(t,e,i){super(t),this.features=e,this.mapBrowserEvent=i}}class w extends c.A{constructor(t){let e;if(super(t),this.on,this.once,this.un,this.boundHandleFeatureChange_=this.handleFeatureChange_.bind(this),this.condition_=t.condition?t.condition:f.fs,this.defaultDeleteCondition_=function(t){return(0,f.Js)(t)&&(0,f.t5)(t)},this.deleteCondition_=t.deleteCondition?t.deleteCondition:this.defaultDeleteCondition_,this.insertVertexCondition_=t.insertVertexCondition?t.insertVertexCondition:f.Gk,this.vertexFeature_=null,this.vertexSegments_=null,this.lastPixel_=[0,0],this.ignoreNextSingleClick_=!1,this.featuresBeingModified_=null,this.rBush_=new u.A,this.pixelTolerance_=void 0!==t.pixelTolerance?t.pixelTolerance:10,this.snappedToVertex_=!1,this.changingFeature_=!1,this.dragSegments_=[],this.overlay_=new g.A({source:new _.A({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.style?t.style:P(),updateWhileAnimating:!0,updateWhileInteracting:!0}),this.SEGMENT_WRITERS_={Point:this.writePointGeometry_.bind(this),LineString:this.writeLineStringGeometry_.bind(this),LinearRing:this.writeLineStringGeometry_.bind(this),Polygon:this.writePolygonGeometry_.bind(this),MultiPoint:this.writeMultiPointGeometry_.bind(this),MultiLineString:this.writeMultiLineStringGeometry_.bind(this),MultiPolygon:this.writeMultiPolygonGeometry_.bind(this),Circle:this.writeCircleGeometry_.bind(this),GeometryCollection:this.writeGeometryCollectionGeometry_.bind(this)},this.source_=null,this.hitDetection_=null,t.features?e=t.features:t.source&&(this.source_=t.source,e=new n.A(this.source_.getFeatures()),this.source_.addEventListener(d.A.ADDFEATURE,this.handleSourceAdd_.bind(this)),this.source_.addEventListener(d.A.REMOVEFEATURE,this.handleSourceRemove_.bind(this))),!e)throw new Error("The modify interaction requires features, a source or a layer");t.hitDetection&&(this.hitDetection_=t.hitDetection),this.features_=e,this.features_.forEach(this.addFeature_.bind(this)),this.features_.addEventListener(s.A.ADD,this.handleFeatureAdd_.bind(this)),this.features_.addEventListener(s.A.REMOVE,this.handleFeatureRemove_.bind(this)),this.lastPointerEvent_=null,this.delta_=[0,0],this.snapToPointer_=void 0===t.snapToPointer?!this.hitDetection_:t.snapToPointer}addFeature_(t){const e=t.getGeometry();if(e){const i=this.SEGMENT_WRITERS_[e.getType()];i&&i(t,e)}const i=this.getMap();i&&i.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,i),t.addEventListener(o.A.CHANGE,this.boundHandleFeatureChange_)}willModifyFeatures_(t,e){if(!this.featuresBeingModified_){this.featuresBeingModified_=new n.A;const i=this.featuresBeingModified_.getArray();for(let t=0,n=e.length;t=0;--t){const n=i[t];for(let t=this.dragSegments_.length-1;t>=0;--t)this.dragSegments_[t][0]===n&&this.dragSegments_.splice(t,1);e.remove(n)}}setActive(t){this.vertexFeature_&&!t&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),super.setActive(t)}setMap(t){this.overlay_.setMap(t),super.setMap(t)}getOverlay(){return this.overlay_}handleSourceAdd_(t){t.feature&&this.features_.push(t.feature)}handleSourceRemove_(t){t.feature&&this.features_.remove(t.feature)}handleFeatureAdd_(t){this.addFeature_(t.element)}handleFeatureChange_(t){if(!this.changingFeature_){const e=t.target;this.removeFeature_(e),this.addFeature_(e)}}handleFeatureRemove_(t){this.removeFeature_(t.element)}writePointGeometry_(t,e){const i=e.getCoordinates(),n={feature:t,geometry:e,segment:[i,i]};this.rBush_.insert(e.getExtent(),n)}writeMultiPointGeometry_(t,e){const i=e.getCoordinates();for(let n=0,s=i.length;n=0;--t)this.insertVertex_(s[t],r)}return!!this.vertexFeature_}handleUpEvent(t){for(let e=this.dragSegments_.length-1;e>=0;--e){const i=this.dragSegments_[e][0],n=i.geometry;if("Circle"===n.getType()){const e=n.getCenter(),s=i.featureSegments[0],r=i.featureSegments[1];s.segment[0]=e,s.segment[1]=e,r.segment[0]=e,r.segment[1]=e,this.rBush_.update((0,p.dP)(e),s);let o=n;const a=(0,E.Tf)();if(a){const e=t.map.getView().getProjection();o=o.clone().transform(a,e),o=(0,y.nD)(o).transform(e,a)}this.rBush_.update(o.getExtent(),r)}else this.rBush_.update((0,p.Tr)(i.segment),i)}return this.featuresBeingModified_&&(this.dispatchEvent(new R(S,this.featuresBeingModified_,t)),this.featuresBeingModified_=null),!1}handlePointerMove_(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)}handlePointerAtPixel_(t,e,i){const n=i||e.getCoordinateFromPixel(t),s=e.getView().getProjection(),r=function(t,e){return I(n,t,s)-I(n,e,s)};let o,l;if(this.hitDetection_){const i="object"==typeof this.hitDetection_?t=>t===this.hitDetection_:void 0;e.forEachFeatureAtPixel(t,((t,e,i)=>{i&&"Point"===i.getType()&&(i=new h.A((0,E.te)(i.getCoordinates(),s)));const n=i||t.getGeometry();if(t instanceof a.A&&this.features_.getArray().includes(t)){l=n;const e=t.getGeometry().getFlatCoordinates().slice(0,2);o=[{feature:t,geometry:l,segment:[e,e]}]}return!0}),{layerFilter:i})}if(!o){const t=(0,E.SD)((0,p.dP)(n,A),s),i=e.getView().getResolution()*this.pixelTolerance_,r=(0,E.JR)((0,p.r)(t,i,A),s);o=this.rBush_.getInExtent(r)}if(o&&o.length>0){const i=o.sort(r)[0],a=i.segment;let h=L(n,i,s);const c=e.getPixelFromCoordinate(h);let u=(0,m.Io)(t,c);if(l||u<=this.pixelTolerance_){const t={};if(t[(0,T.v6)(a)]=!0,this.snapToPointer_||(this.delta_[0]=h[0]-n[0],this.delta_[1]=h[1]-n[1]),"Circle"===i.geometry.getType()&&1===i.index)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(h,[i.feature],[i.geometry]);else{const n=e.getPixelFromCoordinate(a[0]),s=e.getPixelFromCoordinate(a[1]),r=(0,m.hG)(c,n),l=(0,m.hG)(c,s);u=Math.sqrt(Math.min(r,l)),this.snappedToVertex_=u<=this.pixelTolerance_,this.snappedToVertex_&&(h=r>l?a[1]:a[0]),this.createOrUpdateVertexFeature_(h,[i.feature],[i.geometry]);const d={};d[(0,T.v6)(i.geometry)]=!0;for(let e=1,i=o.length;e=0;--o)s=t[o],u=s[0],d=(0,T.v6)(u.feature),u.depth&&(d+="-"+u.depth.join("-")),d in e||(e[d]={}),0===s[1]?(e[d].right=u,e[d].index=u.index):1==s[1]&&(e[d].left=u,e[d].index=u.index+1);for(d in e){switch(c=e[d].right,l=e[d].left,a=e[d].index,h=a-1,u=void 0!==l?l:c,h<0&&(h=0),r=u.geometry,n=r.getCoordinates(),i=n,g=!1,r.getType()){case"MultiLineString":n[u.depth[0]].length>2&&(n[u.depth[0]].splice(a,1),g=!0);break;case"LineString":n.length>2&&(n.splice(a,1),g=!0);break;case"MultiPolygon":i=i[u.depth[1]];case"Polygon":i=i[u.depth[0]],i.length>4&&(a==i.length-1&&(a=0),i.splice(a,1),g=!0,0===a&&(i.pop(),i.push(i[0]),h=i.length-1))}if(g){this.setGeometryCoordinates_(r,n);const e=[];if(void 0!==l&&(this.rBush_.remove(l),e.push(l.segment[0])),void 0!==c&&(this.rBush_.remove(c),e.push(c.segment[1])),void 0!==l&&void 0!==c){const t={depth:u.depth,feature:u.feature,geometry:u.geometry,index:h,segment:e};this.rBush_.insert((0,p.Tr)(t.segment),t)}this.updateSegmentIndices_(r,a,u.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.length=0}}return g}setGeometryCoordinates_(t,e){this.changingFeature_=!0,t.setCoordinates(e),this.changingFeature_=!1}updateSegmentIndices_(t,e,i,n){this.rBush_.forEachInExtent(t.getExtent(),(function(s){s.geometry===t&&(void 0===i||void 0===s.depth||(0,v.aI)(s.depth,i))&&s.index>e&&(s.index+=n)}))}}function b(t,e){return t.index-e.index}function I(t,e,i){const n=e.geometry;if("Circle"===n.getType()){let s=n;if(1===e.index){const e=(0,E.Tf)();e&&(s=s.clone().transform(e,i));const n=(0,m.hG)(s.getCenter(),(0,E.Ad)(t,i)),r=Math.sqrt(n)-s.getRadius();return r*r}}const s=(0,E.Ad)(t,i);return C[0]=(0,E.Ad)(e.segment[0],i),C[1]=(0,E.Ad)(e.segment[1],i),(0,m.$x)(s,C)}function L(t,e,i){const n=e.geometry;if("Circle"===n.getType()&&1===e.index){let e=n;const s=(0,E.Tf)();return s&&(e=e.clone().transform(s,i)),(0,E.te)(e.getClosestPoint((0,E.Ad)(t,i)),i)}const s=(0,E.Ad)(t,i);return C[0]=(0,E.Ad)(e.segment[0],i),C[1]=(0,E.Ad)(e.segment[1],i),(0,E.te)((0,m.sG)(s,C),i)}function P(){const t=(0,x.mY)();return function(e,i){return t.Point}}const M=w},8751:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(6837),s=i(6292),r=i(7771),o=i(8704),a=i(1597);class l extends s.Ay{constructor(t){super(t=t||{}),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=void 0!==t.maxDelta?t.maxDelta:1,this.duration_=void 0!==t.duration?t.duration:250,this.timeout_=void 0!==t.timeout?t.timeout:80,this.useAnchor_=void 0===t.useAnchor||t.useAnchor,this.constrainResolution_=void 0!==t.constrainResolution&&t.constrainResolution;const e=t.condition?t.condition:o.Gk;this.condition_=t.onFocusOnly?(0,o.Q7)(o.eL,e):e,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const t=this.getMap();t&&t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(t){if(!this.condition_(t))return!0;if(t.type!==n.A.WHEEL)return!0;const e=t.map,i=t.originalEvent;let s;if(i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==n.A.WHEEL&&(s=i.deltaY,r._p&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(s/=r.cr),i.deltaMode===WheelEvent.DOM_DELTA_LINE&&(s*=40)),0===s)return!1;this.lastDelta_=s;const o=Date.now();void 0===this.startTime_&&(this.startTime_=o),(!this.mode_||o-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(s)<4?"trackpad":"wheel");const a=e.getView();if("trackpad"===this.mode_&&!a.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(a.getAnimating()&&a.cancelAnimations(),a.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),a.adjustZoom(-s/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=o,!1;this.totalDelta_+=s;const l=Math.max(this.timeout_-(o-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,e),l),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let i=-(0,a.qE)(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),(0,s.D2)(e,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}}const h=l},3711:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(1409),s=i(4238),r=i(4498);class o extends n.A{constructor(t){const e=t=t||{};e.stopDown||(e.stopDown=s.W8),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=void 0!==t.threshold?t.threshold:.3,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){let e=0;const i=this.targetPointers[0],s=this.targetPointers[1],o=Math.atan2(s.clientY-i.clientY,s.clientX-i.clientX);if(void 0!==this.lastAngle_){const t=o-this.lastAngle_;this.rotationDelta_+=t,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=t}this.lastAngle_=o;const a=t.map,l=a.getView();l.getConstraints().rotation!==r.b8&&(this.anchor_=a.getCoordinateFromPixelInternal(a.getEventPixel((0,n.v)(this.targetPointers))),this.rotating_&&(a.render(),l.adjustRotationInternal(e,this.anchor_)))}handleUpEvent(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.duration_),!1)}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}const a=o},5243:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(1409),s=i(4238);class r extends n.A{constructor(t){const e=t=t||{};e.stopDown||(e.stopDown=s.W8),super(e),this.anchor_=null,this.duration_=void 0!==t.duration?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const i=this.targetPointers[0],s=this.targetPointers[1],r=i.clientX-s.clientX,o=i.clientY-s.clientY,a=Math.sqrt(r*r+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/a),this.lastDistance_=a;const l=t.map,h=l.getView();1!=e&&(this.lastScaleDelta_=e),this.anchor_=l.getCoordinateFromPixelInternal(l.getEventPixel((0,n.v)(this.targetPointers))),l.render(),h.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const e=t.map.getView(),i=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,i),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}const o=r},1409:(t,e,i)=>{"use strict";i.d(e,{A:()=>a,v:()=>o});var n=i(6292),s=i(3445);class r extends n.Ay{constructor(t){super(t=t||{}),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==s.A.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==s.A.POINTERUP){const e=this.handleUpEvent(t);this.handlingDownUpSequence=e&&this.targetPointers.length>0}}else if(t.type==s.A.POINTERDOWN){const i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==s.A.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}}function o(t){const e=t.length;let i=0,n=0;for(let s=0;s{"use strict";i.d(e,{A:()=>n});const n={ACTIVE:"active"}},4458:(t,e,i)=>{"use strict";i.d(e,{A:()=>g});var n=i(71),s=i(1685),r=i(6717),o=i(2187),a=i(1409),l=i(4238),h=i(8704),c=i(3407);class u extends s.Ay{constructor(t,e,i,n,s){super(t),this.features=e,this.coordinate=i,this.startCoordinate=n,this.mapBrowserEvent=s}}class d extends a.A{constructor(t){let e;if(super(t=t||{}),this.on,this.once,this.un,this.lastCoordinate_=null,this.startCoordinate_=null,this.features_=void 0!==t.features?t.features:null,t.layers&&!this.features_)if("function"==typeof t.layers)e=t.layers;else{const i=t.layers;e=function(t){return i.includes(t)}}else e=l.rT;this.layerFilter_=e,this.filter_=t.filter&&!this.features_?t.filter:l.rT,this.hitTolerance_=t.hitTolerance?t.hitTolerance:0,this.condition_=t.condition?t.condition:h.Gk,this.lastFeature_=null,this.addChangeListener(o.A.ACTIVE,this.handleActiveChanged_)}handleDownEvent(t){if(!t.originalEvent||!this.condition_(t))return!1;if(this.lastFeature_=this.featuresAtPixel_(t.pixel,t.map),!this.lastCoordinate_&&this.lastFeature_){this.startCoordinate_=t.coordinate,this.lastCoordinate_=t.coordinate,this.handleMoveEvent(t);const e=this.features_||new n.A([this.lastFeature_]);return this.dispatchEvent(new u("translatestart",e,t.coordinate,this.startCoordinate_,t)),!0}return!1}handleUpEvent(t){if(this.lastCoordinate_){this.lastCoordinate_=null,this.handleMoveEvent(t);const e=this.features_||new n.A([this.lastFeature_]);return this.dispatchEvent(new u("translateend",e,t.coordinate,this.startCoordinate_,t)),this.startCoordinate_=null,!0}return!1}handleDragEvent(t){if(this.lastCoordinate_){const e=t.coordinate,i=t.map.getView().getProjection(),s=(0,c.Ad)(e,i),r=(0,c.Ad)(this.lastCoordinate_,i),o=s[0]-r[0],a=s[1]-r[1],l=this.features_||new n.A([this.lastFeature_]),h=(0,c.Tf)();l.forEach((function(t){const e=t.getGeometry();h?(e.transform(h,i),e.translate(o,a),e.transform(i,h)):e.translate(o,a),t.setGeometry(e)})),this.lastCoordinate_=e,this.dispatchEvent(new u("translating",l,e,this.startCoordinate_,t))}}handleMoveEvent(t){const e=t.map.getViewport();this.featuresAtPixel_(t.pixel,t.map)?(e.classList.remove(this.lastCoordinate_?"ol-grab":"ol-grabbing"),e.classList.add(this.lastCoordinate_?"ol-grabbing":"ol-grab")):e.classList.remove("ol-grab","ol-grabbing")}featuresAtPixel_(t,e){return e.forEachFeatureAtPixel(t,((t,e)=>{if(t instanceof r.A&&this.filter_(t,e)&&(!this.features_||this.features_.getArray().includes(t)))return t}),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_})}getHitTolerance(){return this.hitTolerance_}setHitTolerance(t){this.hitTolerance_=t}setMap(t){const e=this.getMap();super.setMap(t),this.updateState_(e)}handleActiveChanged_(){this.updateState_(null)}updateState_(t){let e=this.getMap();const i=this.getActive();e&&i||(e=e||t,!e)||e.getViewport().classList.remove("ol-grab","ol-grabbing")}}const g=d},8620:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(4120),s=i(5332),r=i(4087),o=i(588),a=i(1597);class l extends n.A{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);"object"==typeof t.properties&&(delete e.properties,Object.assign(e,t.properties)),e[s.A.OPACITY]=void 0!==t.opacity?t.opacity:1,(0,o.v)("number"==typeof e[s.A.OPACITY],"Layer opacity must be a number"),e[s.A.VISIBLE]=void 0===t.visible||t.visible,e[s.A.Z_INDEX]=t.zIndex,e[s.A.MAX_RESOLUTION]=void 0!==t.maxResolution?t.maxResolution:1/0,e[s.A.MIN_RESOLUTION]=void 0!==t.minResolution?t.minResolution:0,e[s.A.MIN_ZOOM]=void 0!==t.minZoom?t.minZoom:-1/0,e[s.A.MAX_ZOOM]=void 0!==t.maxZoom?t.maxZoom:1/0,this.className_=void 0!==e.className?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:void 0===t||t},i=this.getZIndex();return e.opacity=(0,a.qE)(Math.round(100*this.getOpacity())/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==i||e.managed?i:1/0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return(0,r.b0)()}getLayerStatesArray(t){return(0,r.b0)()}getExtent(){return this.get(s.A.EXTENT)}getMaxResolution(){return this.get(s.A.MAX_RESOLUTION)}getMinResolution(){return this.get(s.A.MIN_RESOLUTION)}getMinZoom(){return this.get(s.A.MIN_ZOOM)}getMaxZoom(){return this.get(s.A.MAX_ZOOM)}getOpacity(){return this.get(s.A.OPACITY)}getSourceState(){return(0,r.b0)()}getVisible(){return this.get(s.A.VISIBLE)}getZIndex(){return this.get(s.A.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(s.A.EXTENT,t)}setMaxResolution(t){this.set(s.A.MAX_RESOLUTION,t)}setMinResolution(t){this.set(s.A.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(s.A.MAX_ZOOM,t)}setMinZoom(t){this.set(s.A.MIN_ZOOM,t)}setOpacity(t){(0,o.v)("number"==typeof t,"Layer opacity must be a number"),this.set(s.A.OPACITY,t)}setVisible(t){this.set(s.A.VISIBLE,t)}setZIndex(t){this.set(s.A.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const h=l},2808:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(764),s=i(5360);class r extends n.A{constructor(t){t=t||{};const e=Object.assign({},t);delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.setPreload(void 0!==t.preload?t.preload:0),this.setUseInterimTilesOnError(void 0===t.useInterimTilesOnError||t.useInterimTilesOnError)}getPreload(){return this.get(s.A.PRELOAD)}setPreload(t){this.set(s.A.PRELOAD,t)}getUseInterimTilesOnError(){return this.get(s.A.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set(s.A.USE_INTERIM_TILES_ON_ERROR,t)}getData(t){return super.getData(t)}}const o=r},2284:(t,e,i)=>{"use strict";i.d(e,{A:()=>W});var n=i(764),s=i(5341),r=i(9276),o=i(7733),a=i(3628),l=i(9700),h=i(6936),c=i(953),u=i(1426),d=i(9825),g=i(3730);function _(t,e,i){const n=(0,d.qg)(t,i);if(!(0,d.ho)(e,n.type)){const t=(0,d.go)(e),i=(0,d.go)(n.type);throw new Error(`Expected expression to be of type ${t}, got ${i}`)}return f(n,i)}function f(t,e){if(t instanceof d._D){if(t.type===d.mE&&"string"==typeof t.value){const e=(0,g.sH)(t.value);return function(){return e}}return function(){return t.value}}const i=t.operator;switch(i){case d.ZD.Number:case d.ZD.String:case d.ZD.Coalesce:return function(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let i=0;i{for(let e=0;e{for(let e=0;et.properties[i];case d.ZD.Var:return t=>t.variables[i];default:throw new Error(`Unsupported accessor operator ${t.operator}`)}}(t);case d.ZD.Id:return t=>t.featureId;case d.ZD.GeometryType:return t=>t.geometryType;case d.ZD.Concat:{const i=t.args.map((t=>f(t,e)));return t=>"".concat(...i.map((e=>e(t).toString())))}case d.ZD.Resolution:return t=>t.resolution;case d.ZD.Any:case d.ZD.All:case d.ZD.Between:case d.ZD.In:case d.ZD.Not:return function(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let i=0;i{for(let e=0;e{for(let e=0;e{const e=s[0](t),i=s[1](t),n=s[2](t);return e>=i&&e<=n};case d.ZD.In:return t=>{const e=s[0](t);for(let i=1;i!s[0](t);default:throw new Error(`Unsupported logical operator ${i}`)}}(t,e);case d.ZD.Equal:case d.ZD.NotEqual:case d.ZD.LessThan:case d.ZD.LessThanOrEqualTo:case d.ZD.GreaterThan:case d.ZD.GreaterThanOrEqualTo:return function(t,e){const i=t.operator,n=f(t.args[0],e),s=f(t.args[1],e);switch(i){case d.ZD.Equal:return t=>n(t)===s(t);case d.ZD.NotEqual:return t=>n(t)!==s(t);case d.ZD.LessThan:return t=>n(t)n(t)<=s(t);case d.ZD.GreaterThan:return t=>n(t)>s(t);case d.ZD.GreaterThanOrEqualTo:return t=>n(t)>=s(t);default:throw new Error(`Unsupported comparison operator ${i}`)}}(t,e);case d.ZD.Multiply:case d.ZD.Divide:case d.ZD.Add:case d.ZD.Subtract:case d.ZD.Clamp:case d.ZD.Mod:case d.ZD.Pow:case d.ZD.Abs:case d.ZD.Floor:case d.ZD.Ceil:case d.ZD.Round:case d.ZD.Sin:case d.ZD.Cos:case d.ZD.Atan:case d.ZD.Sqrt:return function(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let i=0;i{let e=1;for(let i=0;is[0](t)/s[1](t);case d.ZD.Add:return t=>{let e=0;for(let i=0;is[0](t)-s[1](t);case d.ZD.Clamp:return t=>{const e=s[0](t),i=s[1](t);if(en?n:e};case d.ZD.Mod:return t=>s[0](t)%s[1](t);case d.ZD.Pow:return t=>Math.pow(s[0](t),s[1](t));case d.ZD.Abs:return t=>Math.abs(s[0](t));case d.ZD.Floor:return t=>Math.floor(s[0](t));case d.ZD.Ceil:return t=>Math.ceil(s[0](t));case d.ZD.Round:return t=>Math.round(s[0](t));case d.ZD.Sin:return t=>Math.sin(s[0](t));case d.ZD.Cos:return t=>Math.cos(s[0](t));case d.ZD.Atan:return 2===n?t=>Math.atan2(s[0](t),s[1](t)):t=>Math.atan(s[0](t));case d.ZD.Sqrt:return t=>Math.sqrt(s[0](t));default:throw new Error(`Unsupported numeric operator ${i}`)}}(t,e);case d.ZD.Case:return function(t,e){const i=t.args.length,n=new Array(i);for(let s=0;s{for(let e=0;e{const e=n[0](t);for(let s=1;s{const e=n[0](t),s=n[1](t);let r,o;for(let a=2;a=s)return 2===a?l:h?m(e,s,r,o,i,l):p(e,s,r,o,i,l);r=i,o=l}return o}}(t,e);case d.ZD.ToString:return function(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let i=0;i{const i=s[0](e);return t.args[0].type===d.mE?(0,g.dI)(i):i.toString()};throw new Error(`Unsupported convert operator ${i}`)}(t,e);default:throw new Error(`Unsupported operator ${i}`)}}function p(t,e,i,n,s,r){const o=s-i;if(0===o)return n;const a=e-i;return n+(1===t?a/o:(Math.pow(t,a)-1)/(Math.pow(t,o)-1))*(r-n)}function m(t,e,i,n,s,r){if(0==s-i)return n;const o=(0,g.eE)(n),a=(0,g.eE)(r);let l=a[2]-o[2];l>180?l-=360:l<-180&&(l+=360);const h=[p(t,e,i,o[0],s,a[0]),p(t,e,i,o[1],s,a[1]),o[2]+p(t,e,i,0,s,l),p(t,e,i,n[3],s,r[3])];return(0,g.S8)((0,g.cD)(h))}var x=i(3530),v=i(4401);function y(t){return!0}function E(t){const e=(0,d.SR)(),i=t.length,n=new Array(i);for(let s=0;s4)throw new Error(`Expected a color with 3 or 4 values for ${e}`);return i}function U(t,e){const i=G(t,e);if(2!==i.length)throw new Error(`Expected an array of two numbers for ${e}`);return i}const X="renderOrder";class Z extends n.A{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter?String(t.declutter):void 0,this.renderBuffer_=void 0!==t.renderBuffer?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=void 0!==t.updateWhileAnimating&&t.updateWhileAnimating,this.updateWhileInteracting_=void 0!==t.updateWhileInteracting&&t.updateWhileInteracting}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(X)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t,e){const i=this.getDeclutter();i in t.declutter==0&&(t.declutter[i]=new s(9)),this.getRenderer().renderDeclutter(t,e)}setRenderOrder(t){this.set(X,t)}setStyle(t){this.style_=function(t){if(void 0===t)return r.d1;if(!t)return null;if("function"==typeof t)return t;if(t instanceof r.Ay)return t;if(!Array.isArray(t))return E([t]);if(0===t.length)return[];const e=t.length,i=t[0];if(i instanceof r.Ay){const i=new Array(e);for(let n=0;n{"use strict";i.d(e,{A:()=>A});var n=i(71),s=i(3984),r=i(6717),o=i(3628),a=i(1217),l=i(4294),h=i(953),c=i(9276),u=i(1426),d=i(2757),g=i(731),_=i(915),f=i(1597),p=i(6933),m=i(3407),x=i(7331);function v(t,e,i){const n=[];let s=t(0),r=t(1),o=e(s),a=e(r);const l=[r,s],h=[a,o],c=[1,0],u={};let d,g,_,p,m,x,v=1e5;for(;--v>0&&c.length>0;)_=c.pop(),s=l.pop(),o=h.pop(),x=_.toString(),x in u||(n.push(o[0],o[1]),u[x]=!0),p=c.pop(),r=l.pop(),a=h.pop(),m=(_+p)/2,d=t(m),g=e(d),(0,f.Q1)(g[0],g[1],o[0],o[1],a[0],a[1]){const e=t.get("graticule_label");return this.lonLabelStyleBase_.getText().setText(e),this.lonLabelStyleBase_},this.latLabelStyleBase_=new c.Ay({text:void 0!==t.latLabelStyle?t.latLabelStyle.clone():new u.A({font:"12px Calibri,sans-serif",textAlign:"right",fill:new o.A({color:"rgba(0,0,0,1)"}),stroke:new h.A({color:"rgba(255,255,255,1)",width:3})})}),this.latLabelStyle_=t=>{const e=t.get("graticule_label");return this.latLabelStyleBase_.getText().setText(e),this.latLabelStyleBase_},this.meridiansLabels_=[],this.parallelsLabels_=[],this.addEventListener(s.A.POSTRENDER,this.drawLabels_.bind(this))),this.intervals_=void 0!==t.intervals?t.intervals:E,this.setSource(new g.A({loader:this.loaderFunction.bind(this),strategy:this.strategyFunction.bind(this),features:new n.A,overlaps:!1,useSpatialIndex:!1,wrapX:t.wrapX})),this.featurePool_=[],this.lineStyle_=new c.Ay({stroke:this.strokeStyle_}),this.loadedExtent_=null,this.renderedExtent_=null,this.renderedResolution_=null,this.setRenderOrder(null)}strategyFunction(t,e){let i=t.slice();return this.projection_&&this.getSource().getWrapX()&&(0,_.Li)(i,this.projection_),this.loadedExtent_&&((0,_.bE)(this.loadedExtent_,i,e)?i=this.loadedExtent_.slice():this.getSource().removeLoadedExtent(this.loadedExtent_)),[i]}loaderFunction(t,e,i){this.loadedExtent_=t;const n=this.getSource(),s=this.getExtent()||[-1/0,-1/0,1/0,1/0],o=(0,_._N)(s,t);if(this.renderedExtent_&&(0,_.aI)(this.renderedExtent_,o)&&this.renderedResolution_===e)return;if(this.renderedExtent_=o,this.renderedResolution_=e,(0,_.Im)(o))return;const a=(0,_.q1)(o),l=e*e/4;(!this.projection_||!(0,m.tI)(this.projection_,i))&&this.updateProjectionInfo_(i),this.createGraticule_(o,a,e,l);let h,c=this.meridians_.length+this.parallels_.length;for(this.meridiansLabels_&&(c+=this.meridians_.length),this.parallelsLabels_&&(c+=this.parallels_.length);c>this.featurePool_.length;)h=new r.A,this.featurePool_.push(h);const u=n.getFeaturesCollection();u.clear();let d,g,f=0;for(d=0,g=this.meridians_.length;dMath.PI/2);const d=(0,x.r2)(t);for(let t=a;t<=l;++t){let i,n,c,g,_=this.meridians_.length+this.parallels_.length;if(this.meridiansLabels_)for(n=0,c=this.meridiansLabels_.length;n=a?(t[0]=o[0],t[2]=o[2]):r=!0);const l=[(0,f.qE)(e[0],this.minX_,this.maxX_),(0,f.qE)(e[1],this.minY_,this.maxY_)],h=this.toLonLatTransform_(l);isNaN(h[1])&&(h[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_);let c=(0,f.qE)(h[0],this.minLon_,this.maxLon_),u=(0,f.qE)(h[1],this.minLat_,this.maxLat_);const d=this.maxLines_;let g,p,m,x,v=t;r||(v=[(0,f.qE)(t[0],this.minX_,this.maxX_),(0,f.qE)(t[1],this.minY_,this.maxY_),(0,f.qE)(t[2],this.minX_,this.maxX_),(0,f.qE)(t[3],this.minY_,this.maxY_)]);const y=(0,_.NW)(v,this.toLonLatTransform_,void 0,8);let E=y[3],T=y[2],A=y[1],C=y[0];if(r||((0,_.Ym)(v,this.bottomLeft_)&&(C=this.minLon_,A=this.minLat_),(0,_.Ym)(v,this.bottomRight_)&&(T=this.maxLon_,A=this.minLat_),(0,_.Ym)(v,this.topLeft_)&&(C=this.minLon_,E=this.maxLat_),(0,_.Ym)(v,this.topRight_)&&(T=this.maxLon_,E=this.maxLat_),E=(0,f.qE)(E,u,this.maxLat_),T=(0,f.qE)(T,c,this.maxLon_),A=(0,f.qE)(A,this.minLat_,u),C=(0,f.qE)(C,this.minLon_,c)),c=Math.floor(c/s)*s,x=(0,f.qE)(c,this.minLon_,this.maxLon_),p=this.addMeridian_(x,A,E,n,t,0),g=0,r)for(;(x-=s)>=C&&g++n[r]&&(s=r,r=1);const o=Math.max(e[1],n[s]),a=Math.min(e[3],n[r]),l=(0,f.qE)(e[1]+Math.abs(e[1]-e[3])*this.lonLabelPosition_,o,a),h=[n[s-1]+(n[r-1]-n[s-1])*(l-n[s])/(n[r]-n[s]),l],c=this.meridiansLabels_[i].geom;return c.setCoordinates(h),c}getMeridians(){return this.meridians_}getParallel_(t,e,i,n,s){const r=function(t,e,i,n,s){const r=(0,m.Jt)("EPSG:4326");return v((function(n){return[e+(i-e)*n,t]}),(0,m.RG)(r,n),s)}(t,e,i,this.projection_,n);let o=this.parallels_[s];return o?(o.setFlatCoordinates("XY",r),o.changed()):o=new a.A(r,"XY"),o}getParallelPoint_(t,e,i){const n=t.getFlatCoordinates();let s=0,r=n.length-2;n[s]>n[r]&&(s=r,r=0);const o=Math.max(e[0],n[s]),a=Math.min(e[2],n[r]),l=(0,f.qE)(e[0]+Math.abs(e[0]-e[2])*this.latLabelPosition_,o,a),h=[l,n[s+1]+(n[r+1]-n[s+1])*(l-n[s])/(n[r]-n[s])],c=this.parallelsLabels_[i].geom;return c.setCoordinates(h),c}getParallels(){return this.parallels_}updateProjectionInfo_(t){const e=(0,m.Jt)("EPSG:4326"),i=t.getWorldExtent();this.maxLat_=i[3],this.maxLon_=i[2],this.minLat_=i[1],this.minLon_=i[0];const n=(0,m.RG)(t,e);if(this.minLon_=Math.abs(this.minLat_)?this.maxLat_:this.minLat_),this.projection_=t}}const A=T},1905:(t,e,i)=>{"use strict";i.d(e,{A:()=>z});var n=i(2284),s=i(8280),r=i(2703),o=i(259),a=i(492),l=i(6514);const h=new Uint8Array(4),c=class{constructor(t,e){this.helper_=t;const i=t.getGL();this.texture_=i.createTexture(),this.framebuffer_=i.createFramebuffer(),this.depthbuffer_=i.createRenderbuffer(),this.size_=e||[1,1],this.data_=new Uint8Array(0),this.dataCacheDirty_=!0,this.updateSize_()}setSize(t){(0,l.aI)(t,this.size_)||(this.size_[0]=t[0],this.size_[1]=t[1],this.updateSize_())}getSize(){return this.size_}clearCachedData(){this.dataCacheDirty_=!0}readAll(){if(this.dataCacheDirty_){const t=this.size_,e=this.helper_.getGL();e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.readPixels(0,0,t[0],t[1],e.RGBA,e.UNSIGNED_BYTE,this.data_),this.dataCacheDirty_=!1}return this.data_}readPixel(t,e){if(t<0||e<0||t>this.size_[0]||e>=this.size_[1])return h[0]=0,h[1]=0,h[2]=0,h[3]=0,h;this.readAll();const i=Math.floor(t)+(this.size_[1]-Math.floor(e)-1)*this.size_[0];return h[0]=this.data_[4*i],h[1]=this.data_[4*i+1],h[2]=this.data_[4*i+2],h[3]=this.data_[4*i+3],h}getTexture(){return this.texture_}getFramebuffer(){return this.framebuffer_}getDepthbuffer(){return this.depthbuffer_}updateSize_(){const t=this.size_,e=this.helper_.getGL();this.texture_=this.helper_.createTexture(t,null,this.texture_),e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.viewport(0,0,t[0],t[1]),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture_,0),e.bindRenderbuffer(e.RENDERBUFFER,this.depthbuffer_),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,t[0],t[1]),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,this.depthbuffer_),this.data_=new Uint8Array(t[0]*t[1]*4)}};var u=i(130),d=i(9777);const g="GENERATE_POINT_BUFFERS";var _=i(9703),f=i(588),p=i(915);function m(t,e){const i=256,n=255;return(e=e||[])[0]=Math.floor(t/i/i/i)/n,e[1]=Math.floor(t/i/i)%i/n,e[2]=Math.floor(t/i)%i/n,e[3]=t%i/n,e}i(6570);var x=i(3407),v=i(4087),y=i(9438);class E extends a.A{constructor(t,e){const i=e.uniforms||{},n=(0,_.vt)();i[d.M8.PROJECTION_MATRIX]=n,super(t,{uniforms:i,postProcesses:e.postProcesses}),this.sourceRevision_=-1,this.verticesBuffer_=new o.Ay(u.H7,u.Be),this.indicesBuffer_=new o.Ay(u.IP,u.Be),this.vertexShader_=e.vertexShader,this.fragmentShader_=e.fragmentShader,this.program_,this.hitDetectionEnabled_=e.hitDetectionEnabled??!0;const r=e.attributes?e.attributes.map((function(t){return{name:"a_prop_"+t.name,size:1,type:d.jQ.FLOAT}})):[];this.attributes=[{name:"a_position",size:2,type:d.jQ.FLOAT},{name:"a_index",size:1,type:d.jQ.FLOAT}],this.hitDetectionEnabled_&&(this.attributes.push({name:"a_prop_hitColor",size:4,type:d.jQ.FLOAT}),this.attributes.push({name:"a_featureUid",size:1,type:d.jQ.FLOAT})),this.attributes.push(...r),this.customAttributes=e.attributes?e.attributes:[],this.previousExtent_=(0,p.S5)(),this.currentTransform_=n,this.renderTransform_=(0,_.vt)(),this.invertRenderTransform_=(0,_.vt)(),this.renderInstructions_=new Float32Array(0),this.hitRenderTarget_,this.lastSentId=0,this.worker_=function(){const t='const e="GENERATE_POLYGON_BUFFERS",t="GENERATE_POINT_BUFFERS",n="GENERATE_LINE_STRING_BUFFERS";function r(e,t){const n=t[0],r=t[1];return t[0]=e[0]*n+e[2]*r+e[4],t[1]=e[1]*n+e[3]*r+e[5],t}function x(e,t){const n=(r=t)[0]*r[3]-r[1]*r[2];var r;!function(e,t){if(!e)throw new Error(t)}(0!==n,"Transformation matrix cannot be inverted");const x=t[0],i=t[1],u=t[2],o=t[3],f=t[4],s=t[5];return e[0]=o/n,e[1]=-i/n,e[2]=-u/n,e[3]=x/n,e[4]=(u*s-o*f)/n,e[5]=-(x*s-i*f)/n,e}function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}new Array(6);var u={exports:{}};function o(e,t,n){n=n||2;var r,x,i,u,o,s,l,v=t&&t.length,h=v?t[0]*n:e.length,c=f(e,0,h,n,!0),g=[];if(!c||c.next===c.prev)return g;if(v&&(c=function(e,t,n,r){var x,i,u,o=[];for(x=0,i=t.length;x80*n){r=i=e[0],x=u=e[1];for(var b=n;bi&&(i=o),s>u&&(u=s);l=0!==(l=Math.max(i-r,u-x))?32767/l:0}return a(c,g,n,r,x,l,0),g}function f(e,t,n,r,x){var i,u;if(x===O(e,t,n,r)>0)for(i=t;i=t;i-=r)u=P(i,e[i],e[i+1],u);return u&&m(u,u.next)&&(B(u),u=u.next),u}function s(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!m(r,r.next)&&0!==w(r.prev,r,r.next))r=r.next;else{if(B(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function a(e,t,n,r,x,i,u){if(e){!u&&i&&function(e,t,n,r){var x=e;do{0===x.z&&(x.z=b(x.x,x.y,t,n,r)),x.prevZ=x.prev,x.nextZ=x.next,x=x.next}while(x!==e);x.prevZ.nextZ=null,x.prevZ=null,function(e){var t,n,r,x,i,u,o,f,s=1;do{for(n=e,e=null,i=null,u=0;n;){for(u++,r=n,o=0,t=0;t0||f>0&&r;)0!==o&&(0===f||!r||n.z<=r.z)?(x=n,n=n.nextZ,o--):(x=r,r=r.nextZ,f--),i?i.nextZ=x:e=x,x.prevZ=i,i=x;n=r}i.nextZ=null,s*=2}while(u>1)}(x)}(e,r,x,i);for(var o,f,p=e;e.prev!==e.next;)if(o=e.prev,f=e.next,i?v(e,r,x,i):l(e))t.push(o.i/n|0),t.push(e.i/n|0),t.push(f.i/n|0),B(e),e=f.next,p=f.next;else if((e=f)===p){u?1===u?a(e=h(s(e),t,n),t,n,r,x,i,2):2===u&&c(e,t,n,r,x,i):a(s(e),t,n,r,x,i,1);break}}}function l(e){var t=e.prev,n=e,r=e.next;if(w(t,n,r)>=0)return!1;for(var x=t.x,i=n.x,u=r.x,o=t.y,f=n.y,s=r.y,a=xi?x>u?x:u:i>u?i:u,h=o>f?o>s?o:s:f>s?f:s,c=r.next;c!==t;){if(c.x>=a&&c.x<=v&&c.y>=l&&c.y<=h&&M(x,o,i,f,u,s,c.x,c.y)&&w(c.prev,c,c.next)>=0)return!1;c=c.next}return!0}function v(e,t,n,r){var x=e.prev,i=e,u=e.next;if(w(x,i,u)>=0)return!1;for(var o=x.x,f=i.x,s=u.x,a=x.y,l=i.y,v=u.y,h=of?o>s?o:s:f>s?f:s,y=a>l?a>v?a:v:l>v?l:v,g=b(h,c,t,n,r),d=b(p,y,t,n,r),Z=e.prevZ,m=e.nextZ;Z&&Z.z>=g&&m&&m.z<=d;){if(Z.x>=h&&Z.x<=p&&Z.y>=c&&Z.y<=y&&Z!==x&&Z!==u&&M(o,a,f,l,s,v,Z.x,Z.y)&&w(Z.prev,Z,Z.next)>=0)return!1;if(Z=Z.prevZ,m.x>=h&&m.x<=p&&m.y>=c&&m.y<=y&&m!==x&&m!==u&&M(o,a,f,l,s,v,m.x,m.y)&&w(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;Z&&Z.z>=g;){if(Z.x>=h&&Z.x<=p&&Z.y>=c&&Z.y<=y&&Z!==x&&Z!==u&&M(o,a,f,l,s,v,Z.x,Z.y)&&w(Z.prev,Z,Z.next)>=0)return!1;Z=Z.prevZ}for(;m&&m.z<=d;){if(m.x>=h&&m.x<=p&&m.y>=c&&m.y<=y&&m!==x&&m!==u&&M(o,a,f,l,s,v,m.x,m.y)&&w(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function h(e,t,n){var r=e;do{var x=r.prev,i=r.next.next;!m(x,i)&&A(x,r,r.next,i)&&z(x,i)&&z(i,x)&&(t.push(x.i/n|0),t.push(r.i/n|0),t.push(i.i/n|0),B(r),B(r.next),r=e=i),r=r.next}while(r!==e);return s(r)}function c(e,t,n,r,x,i){var u=e;do{for(var o=u.next.next;o!==u.prev;){if(u.i!==o.i&&Z(u,o)){var f=F(u,o);return u=s(u,u.next),f=s(f,f.next),a(u,t,n,r,x,i,0),void a(f,t,n,r,x,i,0)}o=o.next}u=u.next}while(u!==e)}function p(e,t){return e.x-t.x}function y(e,t){var n=function(e,t){var n,r=t,x=e.x,i=e.y,u=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var o=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(o<=x&&o>u&&(u=o,n=r.x=r.x&&r.x>=a&&x!==r.x&&M(in.x||r.x===n.x&&g(n,r)))&&(n=r,v=f)),r=r.next}while(r!==s);return n}(e,t);if(!n)return t;var r=F(n,e);return s(r,r.next),s(n,n.next)}function g(e,t){return w(e.prev,e,t.prev)<0&&w(t.next,e,e.next)<0}function b(e,t,n,r,x){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*x|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*x|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function d(e){var t=e,n=e;do{(t.x=(e-u)*(i-o)&&(e-u)*(r-o)>=(n-u)*(t-o)&&(n-u)*(i-o)>=(x-u)*(r-o)}function Z(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&A(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(z(e,t)&&z(t,e)&&function(e,t){var n=e,r=!1,x=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&x<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(w(e.prev,e,t.prev)||w(e,t.prev,t))||m(e,t)&&w(e.prev,e,e.next)>0&&w(t.prev,t,t.next)>0)}function w(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function m(e,t){return e.x===t.x&&e.y===t.y}function A(e,t,n,r){var x=I(w(e,t,n)),i=I(w(e,t,r)),u=I(w(n,r,e)),o=I(w(n,r,t));return x!==i&&u!==o||(!(0!==x||!E(e,n,t))||(!(0!==i||!E(e,r,t))||(!(0!==u||!E(n,e,r))||!(0!==o||!E(n,t,r)))))}function E(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function I(e){return e>0?1:e<0?-1:0}function z(e,t){return w(e.prev,e,e.next)<0?w(e,t,e.next)>=0&&w(e,e.prev,t)>=0:w(e,t,e.prev)<0||w(e,e.next,t)<0}function F(e,t){var n=new _(e.i,e.x,e.y),r=new _(t.i,t.x,t.y),x=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=x,x.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function P(e,t,n,r){var x=new _(e,t,n);return r?(x.next=r.next,x.prev=r,r.next.prev=x,r.next=x):(x.prev=x,x.next=x),x}function B(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function _(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function O(e,t,n,r){for(var x=0,i=t,u=n-r;i0&&(r+=e[x-1].length,n.holes.push(r))}return n};var N=i(u.exports);const R=[],S={vertexPosition:0,indexPosition:0};function T(e,t,n,r,x){e[t+0]=n,e[t+1]=r,e[t+2]=x}function U(e,t,n,r,x,i){const u=3+x,o=e[t+0],f=e[t+1],s=R;s.length=x;for(let n=0;n0?f:2*Math.PI-f}let d=-1,M=-1,Z=l;const w=null!==i;if(null!==x){d=b(y,g,r(s,[...[e[x],e[x+1]]])),Math.cos(d)<=.985&&(Z+=Math.tan((d-Math.PI)/2))}if(w){M=b(g,y,r(s,[...[e[i],e[i+1]]])),Math.cos(M)<=.985&&(Z+=Math.tan((Math.PI-M)/2))}function m(e,t){return 0===t?1e4*e:Math.sign(t)*(1e4*e+Math.abs(t))}return u.push(c[0],c[1],p[0],p[1],d,M,a,m(0,l)),u.push(...f),u.push(c[0],c[1],p[0],p[1],d,M,a,m(1,l)),u.push(...f),u.push(c[0],c[1],p[0],p[1],d,M,a,m(2,l)),u.push(...f),u.push(c[0],c[1],p[0],p[1],d,M,a,m(3,l)),u.push(...f),o.push(h,h+1,h+2,h+1,h+3,h+2),{length:a+Math.sqrt((g[0]-y[0])*(g[0]-y[0])+(g[1]-y[1])*(g[1]-y[1])),angle:Z}}function G(e,t,n,r,x){const i=2+x;let u=t;const o=e.slice(u,u+x);u+=x;const f=e[u++];let s=0;const a=new Array(f-1);for(let t=0;t{const i=r.data;switch(i.type){case t:{const e=3,t=2,n=i.customAttributesSize,r=t+n,x=new Float32Array(i.renderInstructions),u=x.length/r,o=4*u*(n+e),f=new Uint32Array(6*u),s=new Float32Array(o);let a;for(let e=0;e0?c=o+(n-1)*r:l&&(c=i-r);let p=null;n{const e=t.data;if(e.type===g){const i=e.projectionTransform;this.verticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_),this.indicesBuffer_.fromArrayBuffer(e.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=i,(0,_.T9)(this.invertRenderTransform_,this.renderTransform_),this.renderInstructions_=new Float32Array(t.data.renderInstructions),e.id===this.lastSentId&&(this.ready=!0),this.getLayer().changed()}})),this.featureCache_={},this.featureCount_=0;const a=this.getLayer().getSource();this.sourceListenKeys_=[(0,y.KT)(a,s.A.ADDFEATURE,this.handleSourceFeatureAdded_,this),(0,y.KT)(a,s.A.CHANGEFEATURE,this.handleSourceFeatureChanged_,this),(0,y.KT)(a,s.A.REMOVEFEATURE,this.handleSourceFeatureDelete_,this),(0,y.KT)(a,s.A.CLEAR,this.handleSourceFeatureClear_,this)],a.forEachFeature((t=>{this.featureCache_[(0,v.v6)(t)]={feature:t,properties:t.getProperties(),geometry:t.getGeometry()},this.featureCount_++}))}afterHelperCreated(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.hitDetectionEnabled_&&(this.hitRenderTarget_=new c(this.helper))}handleSourceFeatureAdded_(t){const e=t.feature;this.featureCache_[(0,v.v6)(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()},this.featureCount_++}handleSourceFeatureChanged_(t){const e=t.feature;this.featureCache_[(0,v.v6)(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()}}handleSourceFeatureDelete_(t){const e=t.feature;delete this.featureCache_[(0,v.v6)(e)],this.featureCount_--}handleSourceFeatureClear_(){this.featureCache_={},this.featureCount_=0}renderFrame(t){const e=this.helper.getGL();this.preRender(e,t);const[i,n,s]=function(t,e){const i=t.viewState.projection,n=e.getSource().getWrapX()&&i.canWrapX(),s=i.getExtent(),r=t.extent,o=n?(0,p.RG)(s):null,a=n?Math.ceil((r[2]-s[2])/o)+1:1;return[n?Math.floor((r[0]-s[0])/o):0,a,o]}(t,this.getLayer());return this.renderWorlds(t,!1,i,n,s),this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent),this.hitDetectionEnabled_&&(this.renderWorlds(t,!0,i,n,s),this.hitRenderTarget_.clearCachedData()),this.postRender(e,t),this.helper.getCanvas()}prepareFrameInternal(t){const e=this.getLayer(),i=e.getSource(),s=t.viewState,o=!t.viewHints[r.A.ANIMATING]&&!t.viewHints[r.A.INTERACTING],a=!(0,p.aI)(this.previousExtent_,t.extent),l=this.sourceRevision_ 0) {\n if (gl_FragColor.a < 0.05) { discard; };\n gl_FragColor = v_prop_hitColor;\n }\n}`:null}getStrokeVertexShader(){return this.hasStroke_?`${C}\n${this.uniforms_.map((function(t){return"uniform "+t+";"})).join("\n")}\nattribute vec2 a_position;\nattribute float a_index;\nattribute vec2 a_segmentStart;\nattribute vec2 a_segmentEnd;\nattribute float a_parameters;\nattribute float a_distance;\nattribute vec2 a_joinAngles;\nattribute vec4 a_prop_hitColor;\n${this.attributes_.map((function(t){return"attribute "+t+";"})).join("\n")}\nvarying vec2 v_segmentStart;\nvarying vec2 v_segmentEnd;\nvarying float v_angleStart;\nvarying float v_angleEnd;\nvarying float v_width;\nvarying vec4 v_prop_hitColor;\nvarying float v_distanceOffsetPx;\n${this.varyings_.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")}\n${this.vertexShaderFunctions_.join("\n")}\nvec2 worldToPx(vec2 worldPos) {\n vec4 screenPos = u_projectionMatrix * vec4(worldPos, 0.0, 1.0);\n return (0.5 * screenPos.xy + 0.5) * u_viewportSizePx;\n}\n\nvec4 pxToScreen(vec2 pxPos) {\n vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;\n return vec4(screenPos, u_depth, 1.0);\n}\n\nbool isCap(float joinAngle) {\n return joinAngle < -0.1;\n}\n\nvec2 getJoinOffsetDirection(vec2 normalPx, float joinAngle) {\n float halfAngle = joinAngle / 2.0;\n float c = cos(halfAngle);\n float s = sin(halfAngle);\n vec2 angleBisectorNormal = vec2(s * normalPx.x + c * normalPx.y, -c * normalPx.x + s * normalPx.y);\n float length = 1.0 / s;\n return angleBisectorNormal * length;\n}\n\nvec2 getOffsetPoint(vec2 point, vec2 normal, float joinAngle, float offsetPx) {\n // if on a cap or the join angle is too high, offset the line along the segment normal\n if (cos(joinAngle) > 0.998 || isCap(joinAngle)) {\n return point - normal * offsetPx;\n }\n // offset is applied along the inverted normal (positive offset goes "right" relative to line direction)\n return point - getJoinOffsetDirection(normal, joinAngle) * offsetPx;\n}\n\nvoid main(void) {\n v_angleStart = a_joinAngles.x;\n v_angleEnd = a_joinAngles.y;\n float vertexNumber = floor(abs(a_parameters) / 10000. + 0.5);\n // we're reading the fractional part while keeping the sign (so -4.12 gives -0.12, 3.45 gives 0.45)\n float angleTangentSum = fract(abs(a_parameters) / 10000.) * 10000. * sign(a_parameters);\n\n float lineWidth = ${this.strokeWidthExpression_};\n float lineOffsetPx = ${this.strokeOffsetExpression_};\n\n // compute segment start/end in px with offset\n vec2 segmentStartPx = worldToPx(a_segmentStart);\n vec2 segmentEndPx = worldToPx(a_segmentEnd);\n vec2 tangentPx = normalize(segmentEndPx - segmentStartPx);\n vec2 normalPx = vec2(-tangentPx.y, tangentPx.x);\n segmentStartPx = getOffsetPoint(segmentStartPx, normalPx, v_angleStart, lineOffsetPx),\n segmentEndPx = getOffsetPoint(segmentEndPx, normalPx, v_angleEnd, lineOffsetPx);\n \n // compute current vertex position\n float normalDir = vertexNumber < 0.5 || (vertexNumber > 1.5 && vertexNumber < 2.5) ? 1.0 : -1.0;\n float tangentDir = vertexNumber < 1.5 ? 1.0 : -1.0;\n float angle = vertexNumber < 1.5 ? v_angleStart : v_angleEnd;\n vec2 joinDirection;\n vec2 positionPx = vertexNumber < 1.5 ? segmentStartPx : segmentEndPx;\n // if angle is too high, do not make a proper join\n if (cos(angle) > 0.985 || isCap(angle)) {\n joinDirection = normalPx * normalDir - tangentPx * tangentDir;\n } else {\n joinDirection = getJoinOffsetDirection(normalPx * normalDir, angle);\n }\n positionPx = positionPx + joinDirection * (lineWidth * 0.5 + 1.); // adding 1 pixel for antialiasing\n gl_Position = pxToScreen(positionPx);\n\n v_segmentStart = segmentStartPx;\n v_segmentEnd = segmentEndPx;\n v_width = lineWidth;\n v_prop_hitColor = a_prop_hitColor;\n v_distanceOffsetPx = a_distance / u_resolution - (lineOffsetPx * angleTangentSum);\n${this.varyings_.map((function(t){return" "+t.name+" = "+t.expression+";"})).join("\n")}\n}`:null}getStrokeFragmentShader(){return this.hasStroke_?`${C}\n${this.uniforms_.map((function(t){return"uniform "+t+";"})).join("\n")}\nvarying vec2 v_segmentStart;\nvarying vec2 v_segmentEnd;\nvarying float v_angleStart;\nvarying float v_angleEnd;\nvarying float v_width;\nvarying vec4 v_prop_hitColor;\nvarying float v_distanceOffsetPx;\n${this.varyings_.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")}\n${this.fragmentShaderFunctions_.join("\n")}\n\nvec2 pxToWorld(vec2 pxPos) {\n vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;\n return (u_screenToWorldMatrix * vec4(screenPos, 0.0, 1.0)).xy;\n}\n\nbool isCap(float joinAngle) {\n return joinAngle < -0.1;\n}\n\nfloat segmentDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n vec2 tangent = normalize(end - start);\n vec2 normal = vec2(-tangent.y, tangent.x);\n vec2 startToPoint = point - start;\n return abs(dot(startToPoint, normal)) - width * 0.5;\n}\n\nfloat buttCapDistanceField(vec2 point, vec2 start, vec2 end) {\n vec2 startToPoint = point - start;\n vec2 tangent = normalize(end - start);\n return dot(startToPoint, -tangent);\n}\n\nfloat squareCapDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n return buttCapDistanceField(point, start, end) - width * 0.5;\n}\n\nfloat roundCapDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n float onSegment = max(0., 1000. * dot(point - start, end - start)); // this is very high when inside the segment\n return length(point - start) - width * 0.5 - onSegment;\n}\n\nfloat roundJoinDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n return roundCapDistanceField(point, start, end, width);\n}\n\nfloat bevelJoinField(vec2 point, vec2 start, vec2 end, float width, float joinAngle) {\n vec2 startToPoint = point - start;\n vec2 tangent = normalize(end - start);\n float c = cos(joinAngle * 0.5);\n float s = sin(joinAngle * 0.5);\n float direction = -sign(sin(joinAngle));\n vec2 bisector = vec2(c * tangent.x - s * tangent.y, s * tangent.x + c * tangent.y);\n float radius = width * 0.5 * s;\n return dot(startToPoint, bisector * direction) - radius;\n}\n\nfloat miterJoinDistanceField(vec2 point, vec2 start, vec2 end, float width, float joinAngle) {\n if (cos(joinAngle) > 0.985) { // avoid risking a division by zero\n return bevelJoinField(point, start, end, width, joinAngle);\n }\n float miterLength = 1. / sin(joinAngle * 0.5);\n float miterLimit = ${this.strokeMiterLimitExpression_};\n if (miterLength > miterLimit) {\n return bevelJoinField(point, start, end, width, joinAngle);\n }\n return -1000.;\n}\n\nfloat capDistanceField(vec2 point, vec2 start, vec2 end, float width, float capType) {\n if (capType == ${(0,A.Tl)("butt")}) {\n return buttCapDistanceField(point, start, end);\n } else if (capType == ${(0,A.Tl)("square")}) {\n return squareCapDistanceField(point, start, end, width);\n }\n return roundCapDistanceField(point, start, end, width);\n}\n\nfloat joinDistanceField(vec2 point, vec2 start, vec2 end, float width, float joinAngle, float joinType) {\n if (joinType == ${(0,A.Tl)("bevel")}) {\n return bevelJoinField(point, start, end, width, joinAngle);\n } else if (joinType == ${(0,A.Tl)("miter")}) {\n return miterJoinDistanceField(point, start, end, width, joinAngle);\n }\n return roundJoinDistanceField(point, start, end, width);\n}\n\nfloat computeSegmentPointDistance(vec2 point, vec2 start, vec2 end, float width, float joinAngle, float capType, float joinType) {\n if (isCap(joinAngle)) {\n return capDistanceField(point, start, end, width, capType);\n }\n return joinDistanceField(point, start, end, width, joinAngle, joinType);\n}\n\nvoid main(void) {\n vec2 currentPoint = gl_FragCoord.xy / u_pixelRatio;\n #ifdef GL_FRAGMENT_PRECISION_HIGH\n vec2 worldPos = pxToWorld(currentPoint);\n if (\n abs(u_renderExtent[0] - u_renderExtent[2]) > 0.0 && (\n worldPos[0] < u_renderExtent[0] ||\n worldPos[1] < u_renderExtent[1] ||\n worldPos[0] > u_renderExtent[2] ||\n worldPos[1] > u_renderExtent[3]\n )\n ) {\n discard;\n }\n #endif\n if (${this.discardExpression_}) { discard; }\n\n float segmentLength = length(v_segmentEnd - v_segmentStart);\n vec2 segmentTangent = (v_segmentEnd - v_segmentStart) / segmentLength;\n vec2 segmentNormal = vec2(-segmentTangent.y, segmentTangent.x);\n vec2 startToPoint = currentPoint - v_segmentStart;\n float currentLengthPx = max(0., min(dot(segmentTangent, startToPoint), segmentLength)) + v_distanceOffsetPx; \n float currentRadiusPx = abs(dot(segmentNormal, startToPoint));\n float currentRadiusRatio = dot(segmentNormal, startToPoint) * 2. / v_width;\n vec4 color = ${this.strokeColorExpression_} * u_globalAlpha;\n float capType = ${this.strokeCapExpression_};\n float joinType = ${this.strokeJoinExpression_};\n float segmentStartDistance = computeSegmentPointDistance(currentPoint, v_segmentStart, v_segmentEnd, v_width, v_angleStart, capType, joinType);\n float segmentEndDistance = computeSegmentPointDistance(currentPoint, v_segmentEnd, v_segmentStart, v_width, v_angleEnd, capType, joinType);\n float distance = max(\n segmentDistanceField(currentPoint, v_segmentStart, v_segmentEnd, v_width),\n max(segmentStartDistance, segmentEndDistance)\n );\n distance = max(distance, ${this.strokeDistanceFieldExpression_});\n gl_FragColor = color * smoothstep(0.5, -0.5, distance);\n if (u_hitDetection > 0) {\n if (gl_FragColor.a < 0.1) { discard; };\n gl_FragColor = v_prop_hitColor;\n }\n}`:null}getFillVertexShader(){return this.hasFill_?`${C}\n${this.uniforms_.map((function(t){return"uniform "+t+";"})).join("\n")}\nattribute vec2 a_position;\nattribute vec4 a_prop_hitColor;\n${this.attributes_.map((function(t){return"attribute "+t+";"})).join("\n")}\nvarying vec4 v_prop_hitColor;\n${this.varyings_.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")}\n${this.vertexShaderFunctions_.join("\n")}\nvoid main(void) {\n gl_Position = u_projectionMatrix * vec4(a_position, u_depth, 1.0);\n v_prop_hitColor = a_prop_hitColor;\n${this.varyings_.map((function(t){return" "+t.name+" = "+t.expression+";"})).join("\n")}\n}`:null}getFillFragmentShader(){return this.hasFill_?`${C}\n${this.uniforms_.map((function(t){return"uniform "+t+";"})).join("\n")}\nvarying vec4 v_prop_hitColor;\n${this.varyings_.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")}\n${this.fragmentShaderFunctions_.join("\n")}\nvec2 pxToWorld(vec2 pxPos) {\n vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;\n return (u_screenToWorldMatrix * vec4(screenPos, 0.0, 1.0)).xy;\n}\n\nvec2 worldToPx(vec2 worldPos) {\n vec4 screenPos = u_projectionMatrix * vec4(worldPos, 0.0, 1.0);\n return (0.5 * screenPos.xy + 0.5) * u_viewportSizePx;\n}\n\nvoid main(void) {\n vec2 pxPos = gl_FragCoord.xy / u_pixelRatio;\n vec2 pxOrigin = worldToPx(u_patternOrigin);\n #ifdef GL_FRAGMENT_PRECISION_HIGH\n vec2 worldPos = pxToWorld(pxPos);\n if (\n abs(u_renderExtent[0] - u_renderExtent[2]) > 0.0 && (\n worldPos[0] < u_renderExtent[0] ||\n worldPos[1] < u_renderExtent[1] ||\n worldPos[0] > u_renderExtent[2] ||\n worldPos[1] > u_renderExtent[3]\n )\n ) {\n discard;\n }\n #endif\n if (${this.discardExpression_}) { discard; }\n gl_FragColor = ${this.fillColorExpression_} * u_globalAlpha;\n if (u_hitDetection > 0) {\n if (gl_FragColor.a < 0.1) { discard; };\n gl_FragColor = v_prop_hitColor;\n }\n}`:null}}var M=i(1597),D=i(8711);const F="blur",O="gradient",k="radius",N=["#00f","#0ff","#0f0","#ff0","#f00"];class G extends n.A{constructor(t){t=t||{};const e=Object.assign({},t);delete e.gradient,delete e.radius,delete e.blur,delete e.weight,super(e),this.gradient_=null,this.addChangeListener(O,this.handleGradientChanged_),this.setGradient(t.gradient?t.gradient:N),this.setBlur(void 0!==t.blur?t.blur:15),this.setRadius(void 0!==t.radius?t.radius:8);const i=t.weight?t.weight:"weight";this.weightFunction_="string"==typeof i?function(t){return t.get(i)}:i,this.setRenderOrder(null)}getBlur(){return this.get(F)}getGradient(){return this.get(O)}getRadius(){return this.get(k)}handleGradientChanged_(){this.gradient_=function(t){const e=(0,D.Y)(1,256),i=e.createLinearGradient(0,0,1,256),n=1/(t.length-1);for(let e=0,s=t.length;e{const e=this.weightFunction_(t);return void 0!==e?(0,M.qE)(e,0,1):1}}],uniforms:{u_size:()=>2*(this.get(k)+this.get(F)),u_blurSlope:()=>this.get(k)/Math.max(1,this.get(F))},hitDetectionEnabled:!0,vertexShader:t.getSymbolVertexShader(),fragmentShader:t.getSymbolFragmentShader(),postProcesses:[{fragmentShader:"\n precision mediump float;\n\n uniform sampler2D u_image;\n uniform sampler2D u_gradientTexture;\n uniform float u_opacity;\n\n varying vec2 v_texCoord;\n\n void main() {\n vec4 color = texture2D(u_image, v_texCoord);\n gl_FragColor.a = color.a * u_opacity;\n gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;\n gl_FragColor.rgb *= gl_FragColor.a;\n }",uniforms:{u_gradientTexture:()=>this.gradient_,u_opacity:()=>this.getOpacity()}}]})}renderDeclutter(){}}const z=G},8044:(t,e,i)=>{"use strict";i.d(e,{A:()=>_});var n=i(764);class s extends n.A{constructor(t){super(t=t||{})}}const r=s;var o=i(6769),a=i(6141),l=i(2703),h=i(9703),c=i(915),u=i(3407);class d extends o.A{constructor(t){super(t),this.image_=null}getImage(){return this.image_?this.image_.getImage():null}prepareFrame(t){const e=t.layerStatesArray[t.layerIndex],i=t.pixelRatio,n=t.viewState,s=n.resolution,r=this.getLayer().getSource(),o=t.viewHints;let h=t.extent;if(void 0!==e.extent&&(h=(0,c._N)(h,(0,u.SD)(e.extent,n.projection))),!o[l.A.ANIMATING]&&!o[l.A.INTERACTING]&&!(0,c.Im)(h))if(r){const t=n.projection,e=r.getImage(h,s,i,t);e&&(this.loadImage(e)?this.image_=e:e.getState()===a.A.EMPTY&&(this.image_=null))}else this.image_=null;return!!this.image_}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),n=(0,h.Bb)(e.pixelToCoordinateTransform,t.slice()),s=i.getExtent();if(s&&!(0,c.Ym)(s,n))return null;const r=this.image_.getExtent(),o=this.image_.getImage(),a=(0,c.RG)(r),l=Math.floor(o.width*((n[0]-r[0])/a));if(l<0||l>=o.width)return null;const u=(0,c.Oq)(r),d=Math.floor(o.height*((r[3]-n[1])/u));return d<0||d>=o.height?null:this.getImageData(o,l,d)}renderFrame(t,e){const i=this.image_,n=i.getExtent(),s=i.getResolution(),[r,o]=Array.isArray(s)?s:[s,s],a=i.getPixelRatio(),l=t.layerStatesArray[t.layerIndex],d=t.pixelRatio,g=t.viewState,_=g.center,f=g.resolution,p=d*r/(f*a),m=d*o/(f*a),x=t.extent,v=g.resolution,y=g.rotation,E=Math.round((0,c.RG)(x)/v*d),T=Math.round((0,c.Oq)(x)/v*d);(0,h.Zz)(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/d,1/d,y,-E/2,-T/2),(0,h.T9)(this.inversePixelTransform,this.pixelTransform);const A=(0,h.dI)(this.pixelTransform);this.useContainer(e,A,this.getBackground(t));const C=this.getRenderContext(t),S=this.context.canvas;S.width!=E||S.height!=T?(S.width=E,S.height=T):this.containerReused||C.clearRect(0,0,E,T);let R=!1,w=!0;if(l.extent){const e=(0,u.SD)(l.extent,g.projection);w=(0,c.HY)(e,t.extent),R=w&&!(0,c.ms)(e,t.extent),R&&this.clipUnrotated(C,t,e)}const b=i.getImage(),I=(0,h.Zz)(this.tempTransform,E/2,T/2,p,m,0,a*(n[0]-_[0])/r,a*(_[1]-n[3])/o);this.renderedResolution=o*d/a;const L=b.width*I[0],P=b.height*I[3];if(this.getLayer().getSource().getInterpolate()||(C.imageSmoothingEnabled=!1),this.preRender(C,t),w&&L>=.5&&P>=.5){const t=I[4],e=I[5],i=l.opacity;1!==i&&(C.save(),C.globalAlpha=i),C.drawImage(b,0,0,+b.width,+b.height,t,e,L,P),1!==i&&C.restore()}return this.postRender(this.context,t),R&&C.restore(),C.imageSmoothingEnabled=!0,A!==S.style.transform&&(S.style.transform=A),this.container}}const g=d,_=class extends r{constructor(t){super(t)}createRenderer(){return new g(this)}getData(t){return super.getData(t)}}},764:(t,e,i)=>{"use strict";i.d(e,{A:()=>g,l:()=>d});var n=i(8620),s=i(6837),r=i(5332),o=i(3984),a=i(3568),l=i(588),h=i(915),c=i(9438);class u extends n.A{constructor(t){const e=Object.assign({},t);delete e.source,super(e),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(r.A.SOURCE,this.handleSourcePropertyChange_);const i=t.source?t.source:null;this.setSource(i)}getLayersArray(t){return(t=t||[]).push(this),t}getLayerStatesArray(t){return(t=t||[]).push(this.getLayerState()),t}getSource(){return this.get(r.A.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed(),this.sourceReady_||"ready"!==this.getSource().getState()||(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&((0,c.JH)(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const t=this.getSource();t&&(this.sourceChangeKey_=(0,c.KT)(t,s.A.CHANGE,this.handleSourceChange_,this),"ready"===t.getState()&&(this.sourceReady_=!0,setTimeout((()=>{this.dispatchEvent("sourceready")}),0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null}isVisible(t){let e;const i=this.getMapInternal();let n;!t&&i&&(t=i.getView()),e=t instanceof a.Ay?{viewState:t.getState(),extent:t.calculateExtent()}:t,!e.layerStatesArray&&i&&(e.layerStatesArray=i.getLayerGroup().getLayerStatesArray()),n=e.layerStatesArray?e.layerStatesArray.find((t=>t.layer===this)):this.getLayerState();const s=this.getExtent();return d(n,e.viewState)&&(!s||(0,h.HY)(s,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];let e;const i=this.getSource();if(i&&(e=i.getAttributions()),!e)return[];let n=e(t instanceof a.Ay?t.getViewStateAndExtent():t);return Array.isArray(n)||(n=[n]),n}render(t,e){const i=this.getRenderer();return i.prepareFrame(t)?(this.rendered=!0,i.renderFrame(t,e)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(t,e){}renderDeferred(t){const e=this.getRenderer();e&&e.renderDeferred(t)}setMapInternal(t){t||this.unrender(),this.set(r.A.MAP,t)}getMapInternal(){return this.get(r.A.MAP)}setMap(t){this.mapPrecomposeKey_&&((0,c.JH)(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&((0,c.JH)(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=(0,c.KT)(t,o.A.PRECOMPOSE,(function(t){const e=t.frameState.layerStatesArray,i=this.getLayerState(!1);(0,l.v)(!e.some((function(t){return t.layer===i.layer})),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),e.push(i)}),this),this.mapRenderKey_=(0,c.KT)(this,s.A.CHANGE,t.render,t),this.changed())}setSource(t){this.set(r.A.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function d(t,e){if(!t.visible)return!1;const i=e.resolution;if(i=t.maxResolution)return!1;const n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}const g=u},5332:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"}},945:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(2808),s=i(4029);class r extends n.A{constructor(t){super(t)}createRenderer(){return new s.A(this)}}const o=r},5360:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"}},2757:(t,e,i)=>{"use strict";i.d(e,{A:()=>E});var n=i(2284),s=i(136),r=i(6769),o=i(7343),a=i(3984),l=i(2703),h=i(3663),c=i(9703),u=i(915),d=i(8711),g=i(3608),_=i(6514),f=i(3407),p=i(4087),m=i(6933);class x extends r.A{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=(0,u.S5)(),this.wrappedRenderedExtent_=(0,u.S5)(),this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedPixelRatio_=1,this.renderedRenderOrder_=null,this.replayGroup_=null,this.replayGroupChanged=!0,this.clipping=!0,this.targetContext_=null,this.opacity_=1}renderWorlds(t,e,i){const n=e.extent,s=e.viewState,r=s.center,a=s.resolution,h=s.projection,c=s.rotation,d=h.getExtent(),g=this.getLayer().getSource(),_=this.getLayer().getDeclutter(),f=e.pixelRatio,p=e.viewHints,m=!(p[l.A.ANIMATING]||p[l.A.INTERACTING]),x=this.context,v=Math.round((0,u.RG)(n)/a*f),y=Math.round((0,u.Oq)(n)/a*f),E=g.getWrapX()&&h.canWrapX(),T=E?(0,u.RG)(d):null,A=E?Math.ceil((n[2]-d[2])/T)+1:1;let C=E?Math.floor((n[0]-d[0])/T):0;do{const n=this.getRenderTransform(r,a,c,f,v,y,C*T);t.execute(x,[x.canvas.width,x.canvas.height],n,c,m,void 0===i?o.y2:i?o.$i:o.x$,i?_&&e.declutter[_]:void 0)}while(++C{if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const t=[this.context.canvas.width,this.context.canvas.height];(0,c.Bb)(this.pixelTransform,t);const e=this.renderedCenter_,i=this.renderedResolution_,n=this.renderedRotation_,s=this.renderedProjection_,r=this.wrappedRenderedExtent_,o=this.getLayer(),a=[],l=t[0]*h.tF,d=t[1]*h.tF;a.push(this.getRenderTransform(e,i,n,h.tF,l,d,0).slice());const _=o.getSource(),p=s.getExtent();if(_.getWrapX()&&s.canWrapX()&&!(0,u.ms)(p,r)){let t=r[0];const s=(0,u.RG)(p);let o,c=0;for(;tp[2];)++c,o=s*c,a.push(this.getRenderTransform(e,i,n,h.tF,l,d,o).slice()),t-=s}const m=(0,f.Tf)();this.hitDetectionImageData_=(0,h._7)(t,a,this.renderedFeatures_,o.getStyleFunction(),r,i,n,(0,g.j)(i,this.renderedPixelRatio_),m?s:null)}e((0,h.F8)(t,this.renderedFeatures_,this.hitDetectionImageData_))}))}forEachFeatureAtCoordinate(t,e,i,n,s){if(!this.replayGroup_)return;const r=e.viewState.resolution,o=e.viewState.rotation,a=this.getLayer(),l={},h=function(t,e,i){const r=(0,p.v6)(t),o=l[r];if(o){if(!0!==o&&ic=n.forEachFeatureAtCoordinate(t,r,o,i,h,d&&e.declutter[d]?e.declutter[d].all().map((t=>t.value)):null))),c}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),i=e.getSource();if(!i)return!1;const n=t.viewHints[l.A.ANIMATING],r=t.viewHints[l.A.INTERACTING],a=e.getUpdateWhileAnimating(),h=e.getUpdateWhileInteracting();if(this.ready&&!a&&n||!h&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const c=t.extent,d=t.viewState,p=d.projection,x=d.resolution,v=t.pixelRatio,y=e.getRevision(),E=e.getRenderBuffer();let T=e.getRenderOrder();void 0===T&&(T=g.Eo);const A=d.center.slice(),C=(0,u.r)(c,E*x),S=C.slice(),R=[C.slice()],w=p.getExtent();if(i.getWrapX()&&p.canWrapX()&&!(0,u.ms)(w,t.extent)){const t=(0,u.RG)(w),e=Math.max((0,u.RG)(C)/2,t);C[0]=w[0]-e,C[2]=w[2]+e,(0,m.Li)(A,p);const i=(0,u.Li)(R[0],p);i[0]w[0]&&i[2]>w[2]&&R.push([i[0]-t,i[1],i[2]-t,i[3]])}if(this.ready&&this.renderedResolution_==x&&this.renderedRevision_==y&&this.renderedRenderOrder_==T&&(0,u.ms)(this.wrappedRenderedExtent_,C))return(0,_.aI)(this.renderedExtent_,S)||(this.hitDetectionImageData_=null,this.renderedExtent_=S),this.renderedCenter_=A,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const b=new s.A((0,g.gY)(x,v),C,x,v),I=(0,f.Tf)();let L;if(I){for(let t=0,e=R.length;t{let n;const s=t.getStyleFunction()||e.getStyleFunction();if(s&&(n=s(t,x)),n){const e=this.renderFeature(t,P,n,b,L,this.getLayer().getDeclutter(),i);M=M&&!e}},F=(0,f.JR)(C,p),O=i.getFeaturesInExtent(F);T&&O.sort(T);for(let t=0,e=O.length;t{"use strict";i.d(e,{A:()=>S});var n=i(2284),s=i(136),r=i(7343),o=i(4029),a=i(1078),l=i(2703),h=i(808),c=i(3663),u=i(9703),d=i(6514),g=i(915),_=i(3608),f=i(4087),p=i(4401),m=i(6933);const x={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},v={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]};class y extends o.A{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.renderedOpacity_=1,this.tmpTransform_=(0,u.vt)(),this.tileClipContexts_=null}prepareTile(t,e,i){let n;const s=t.getState();return s!==a.A.LOADED&&s!==a.A.ERROR||(this.updateExecutorGroup_(t,e,i),this.tileImageNeedsRender_(t)&&(n=!0)),n}getTile(t,e,i,n){const s=n.pixelRatio,r=n.viewState,o=r.resolution,a=r.projection,h=this.getLayer(),c=h.getSource().getTile(t,e,i,s,a),u=n.viewHints,d=!(u[l.A.ANIMATING]||u[l.A.INTERACTING]);return!d&&c.wantedResolution||(c.wantedResolution=o),this.prepareTile(c,s,a)&&(d||Date.now()-n.time<8)&&"vector"!==h.getRenderMode()&&this.renderTileImage_(c,n),super.getTile(t,e,i,n)}isDrawableTile(t){const e=this.getLayer();return super.isDrawableTile(t)&&("vector"===e.getRenderMode()?(0,f.v6)(e)in t.executorGroups:t.hasContext(e))}getTileImage(t){return t.getImage(this.getLayer())}prepareFrame(t){const e=this.getLayer().getRevision();return this.renderedLayerRevision_!==e&&(this.renderedLayerRevision_=e,this.renderedTiles.length=0),super.prepareFrame(t)}updateExecutorGroup_(t,e,i){const n=this.getLayer(),o=n.getRevision(),l=n.getRenderOrder()||null,h=t.wantedResolution,c=t.getReplayState(n);if(!c.dirty&&c.renderedResolution===h&&c.renderedRevision==o&&c.renderedRenderOrder==l)return;const u=n.getSource(),d=!!n.getDeclutter(),p=u.getTileGrid(),m=u.getTileGridForProjection(i).getTileCoordExtent(t.wrappedTileCoord),x=u.getSourceTiles(e,i,t),v=(0,f.v6)(n);delete t.hitDetectionImageData[v],t.executorGroups[v]=[],c.dirty=!1;for(let i=0,o=x.length;i{const s=x?e.declutter[x].all().map((t=>t.value)):null;for(let e=0,a=n.length;e{const n=this.getLayer(),s=(0,f.v6)(n),r=n.getSource(),o=this.renderedProjection,l=o.getExtent(),h=this.renderedResolution,d=r.getTileGridForProjection(o),_=(0,u.Bb)(this.renderedPixelToCoordinateTransform_,t.slice()),x=d.getTileCoordForCoordAndResolution(_,h);let v;for(let t=0,e=this.renderedTiles.length;t0)return void e([]);const y=d.getTileCoordExtent(v.wrappedTileCoord),E=(0,g.Py)(y),T=[(_[0]-E[0])/h,(E[1]-_[1])/h],A=v.getSourceTiles().reduce((function(t,e){return t.concat(e.getFeatures())}),[]);let C=v.hitDetectionImageData[s];if(!C){const t=(0,p.xq)(d.getTileSize(d.getZForResolution(h,r.zDirection))),e=this.renderedRotation_,i=[this.getRenderTransform(d.getTileCoordCenter(v.wrappedTileCoord),h,0,c.tF,t[0]*c.tF,t[1]*c.tF,0)];C=(0,c._7)(t,i,A,n.getStyleFunction(),d.getTileCoordExtent(v.wrappedTileCoord),v.getReplayState(n).renderedResolution,e),v.hitDetectionImageData[s]=C}e((0,c.F8)(T,A,C))}))}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&void 0!==this.renderedLayerRevision_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}renderDeclutter(t,e){const i=this.context,n=i.globalAlpha;i.globalAlpha=e.opacity;const s=t.viewHints,o=!(s[l.A.ANIMATING]||s[l.A.INTERACTING]),a=this.renderedTiles;for(let e=0,i=a.length;e=0;--e)n[e].execute(this.context,[this.context.canvas.width,this.context.canvas.height],this.getTileRenderTransform(i,t),t.viewState.rotation,o,r.$i,s?t.declutter[s]:void 0)}i.globalAlpha=n}renderDeferredInternal(t){const e=this.renderedTiles.reduce(((t,e,i)=>(e.executorGroups[(0,f.v6)(this.getLayer())].forEach((e=>t.push({executorGroup:e,index:i}))),t)),[]),i=e.map((({executorGroup:t})=>t.getDeferredZIndexContexts()));i.map((t=>Object.keys(t))).flat().sort(d.V_).map(Number).forEach((t=>{i.forEach(((i,n)=>{i[t]&&i[t].forEach((t=>{const{executorGroup:i,index:s}=e[n],r=i.getRenderedContext(),o=r.globalAlpha;r.globalAlpha=this.renderedOpacity_;const a=this.tileClipContexts_[s];a&&a.draw(r),t.draw(r),a&&r.restore(),r.globalAlpha=o,t.clear()}))}))}))}getTileRenderTransform(t,e){const i=e.pixelRatio,n=e.viewState,s=n.center,r=n.resolution,o=n.rotation,a=e.size,l=Math.round(a[0]*i),h=Math.round(a[1]*i),c=this.getLayer().getSource().getTileGridForProjection(e.viewState.projection),d=t.tileCoord,g=c.getTileCoordExtent(t.wrappedTileCoord),_=c.getTileCoordExtent(d,this.tmpExtent)[0]-g[0];return(0,u.lw)((0,u.hs)(this.inversePixelTransform.slice(),1/i,1/i),this.getRenderTransform(s,r,o,i,l,h,_))}postRender(t,e){const i=e.viewHints,n=!(i[l.A.ANIMATING]||i[l.A.INTERACTING]);this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation,this.renderedOpacity_=e.layerStatesArray[e.layerIndex].opacity;const s=this.getLayer(),o=s.getRenderMode(),a=t.globalAlpha;t.globalAlpha=this.renderedOpacity_;const c=s.getDeclutter(),u=c?v[o].filter((t=>!r.$i.includes(t))):v[o],d=e.viewState,_=d.rotation,p=s.getSource(),m=p.getTileGridForProjection(d.projection).getZForResolution(d.resolution,p.zDirection),x=this.renderedTiles,y=[],E=[],T=[];let A=!0;for(let i=x.length-1;i>=0;--i){const r=x[i];A=A&&!r.getReplayState(s).dirty;const o=r.executorGroups[(0,f.v6)(s)].filter((t=>t.hasExecutors(u)));if(0===o.length)continue;const a=this.getTileRenderTransform(r,e),l=r.tileCoord[0];let d=!1;const p=o[0].getClipCoords(a);let v,C=t;if(p){c&&(v=new h.A,C=v.getContext());for(let t=0,e=y.length;t{"use strict";i.d(e,{A:()=>u});var n=i(2808),s=i(5332),r=i(2323),o=i(9825),a=i(5516);function l(t,e,i){const n=(0,o.SR)();return n.style=t.style,(0,a.nR)(e,i,n,t)}function h(t,e){const i=`\n attribute vec2 ${r.eS.TEXTURE_COORD};\n uniform mat4 ${r.gF.TILE_TRANSFORM};\n uniform float ${r.gF.TEXTURE_PIXEL_WIDTH};\n uniform float ${r.gF.TEXTURE_PIXEL_HEIGHT};\n uniform float ${r.gF.TEXTURE_RESOLUTION};\n uniform float ${r.gF.TEXTURE_ORIGIN_X};\n uniform float ${r.gF.TEXTURE_ORIGIN_Y};\n uniform float ${r.gF.DEPTH};\n\n varying vec2 v_textureCoord;\n varying vec2 v_mapCoord;\n\n void main() {\n v_textureCoord = ${r.eS.TEXTURE_COORD};\n v_mapCoord = vec2(\n ${r.gF.TEXTURE_ORIGIN_X} + ${r.gF.TEXTURE_RESOLUTION} * ${r.gF.TEXTURE_PIXEL_WIDTH} * v_textureCoord[0],\n ${r.gF.TEXTURE_ORIGIN_Y} - ${r.gF.TEXTURE_RESOLUTION} * ${r.gF.TEXTURE_PIXEL_HEIGHT} * v_textureCoord[1]\n );\n gl_Position = ${r.gF.TILE_TRANSFORM} * vec4(${r.eS.TEXTURE_COORD}, ${r.gF.DEPTH}, 1.0);\n }\n `,n={...(0,a.z0)(),inFragmentShader:!0,bandCount:e,style:t},s=[];if(void 0!==t.color){const e=l(n,t.color,o.mE);s.push(`color = ${e};`)}if(void 0!==t.contrast){const e=l(n,t.contrast,o.wl);s.push(`color.rgb = clamp((${e} + 1.0) * color.rgb - (${e} / 2.0), vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}if(void 0!==t.exposure){const e=l(n,t.exposure,o.wl);s.push(`color.rgb = clamp((${e} + 1.0) * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}if(void 0!==t.saturation){const e=l(n,t.saturation,o.wl);s.push(`\n float saturation = ${e} + 1.0;\n float sr = (1.0 - saturation) * 0.2126;\n float sg = (1.0 - saturation) * 0.7152;\n float sb = (1.0 - saturation) * 0.0722;\n mat3 saturationMatrix = mat3(\n sr + saturation, sr, sr,\n sg, sg + saturation, sg,\n sb, sb, sb + saturation\n );\n color.rgb = clamp(saturationMatrix * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));\n `)}if(void 0!==t.gamma){const e=l(n,t.gamma,o.wl);s.push(`color.rgb = pow(color.rgb, vec3(1.0 / ${e}));`)}if(void 0!==t.brightness){const e=l(n,t.brightness,o.wl);s.push(`color.rgb = clamp(color.rgb + ${e}, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}const h={},c=Object.keys(n.variables).length;if(c>1&&!t.variables)throw new Error(`Missing variables in style (expected ${n.variables})`);for(let e=0;e ${r.gF.RENDER_EXTENT}[2] ||\n v_mapCoord[1] > ${r.gF.RENDER_EXTENT}[3]\n ) {\n discard;\n }\n\n vec4 color = texture2D(${r.gF.TILE_TEXTURE_ARRAY}[0], v_textureCoord);\n\n ${s.join("\n")}\n\n gl_FragColor = color;\n gl_FragColor.rgb *= gl_FragColor.a;\n gl_FragColor *= ${r.gF.TRANSITION_ALPHA};\n }`,uniforms:h,paletteTextures:n.paletteTextures}}class c extends n.A{constructor(t){const e=(t=t?Object.assign({},t):{}).style||{};delete t.style;const i=t.cacheSize;delete t.cacheSize,super(t),this.sources_=t.sources,this.renderedSource_=null,this.renderedResolution_=NaN,this.style_=e,this.cacheSize_=i,this.styleVariables_=this.style_.variables||{},this.addChangeListener(s.A.SOURCE,this.handleSourceUpdate_)}getSources(t,e){const i=this.getSource();return this.sources_?"function"==typeof this.sources_?this.sources_(t,e):this.sources_:i?[i]:[]}getRenderSource(){return this.renderedSource_||this.getSource()}getSourceState(){const t=this.getRenderSource();return t?t.getState():"undefined"}handleSourceUpdate_(){this.hasRenderer()&&this.getRenderer().clearCache(),this.getSource()&&this.setStyle(this.style_)}getSourceBandCount_(){const t=Number.MAX_SAFE_INTEGER,e=this.getSources([-t,-t,t,t],t);return e&&e.length&&"bandCount"in e[0]?e[0].bandCount:4}createRenderer(){const t=h(this.style_,this.getSourceBandCount_());return new r.Ay(this,{vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,cacheSize:this.cacheSize_,paletteTextures:t.paletteTextures})}renderSources(t,e){const i=this.getRenderer();let n;for(let s=0,r=e.length;s{"ready"==e.getState()&&(e.removeEventListener("change",t),this.changed())};e.addEventListener("change",t)}s=s&&"ready"==i}const r=this.renderSources(t,n);if(this.getRenderer().renderComplete&&s)return this.renderedResolution_=i.resolution,r;if(this.renderedResolution_>.5*i.resolution){const e=this.getSources(t.extent,this.renderedResolution_).filter((t=>!n.includes(t)));if(e.length>0)return this.renderSources(t,e)}return r}setStyle(t){this.styleVariables_=t.variables||{},this.style_=t;const e=h(this.style_,this.getSourceBandCount_());this.getRenderer().reset({vertexShader:e.vertexShader,fragmentShader:e.fragmentShader,uniforms:e.uniforms,paletteTextures:e.paletteTextures}),this.changed()}updateStyleVariables(t){Object.assign(this.styleVariables_,t),this.changed()}}c.prototype.dispose;const u=c},1597:(t,e,i)=>{"use strict";function n(t,e,i){return Math.min(Math.max(t,e),i)}function s(t,e,i,n,s,o){const a=s-i,l=o-n;if(0!==a||0!==l){const r=((t-i)*a+(e-n)*l)/(a*a+l*l);r>1?(i=s,n=o):r>0&&(i+=a*r,n+=l*r)}return r(t,e,i,n)}function r(t,e,i,n){const s=i-t,r=n-e;return s*s+r*r}function o(t){const e=t.length;for(let i=0;is&&(s=e,n=r)}if(0===s)return null;const r=t[n];t[n]=t[i],t[i]=r;for(let n=i+1;n=0;n--){i[n]=t[n][e]/t[n][n];for(let s=n-1;s>=0;s--)t[s][e]-=t[s][n]*i[n]}return i}function a(t){return 180*t/Math.PI}function l(t){return t*Math.PI/180}function h(t,e){const i=t%e;return i*e<0?i+e:i}function c(t,e,i){return t+i*(e-t)}function u(t,e){const i=Math.pow(10,e);return Math.round(t*i)/i}function d(t,e){return Math.round(u(t,e))}function g(t,e){return Math.floor(u(t,e))}function _(t,e){return Math.ceil(u(t,e))}i.d(e,{Cc:()=>c,KU:()=>o,LI:()=>d,Mg:()=>u,Q1:()=>s,RI:()=>g,eh:()=>l,hG:()=>r,mk:()=>_,qE:()=>n,xP:()=>h,xW:()=>a})},3530:(t,e,i)=>{"use strict";function n(t){for(const e in t)delete t[e]}function s(t){let e;for(e in t)return!1;return!e}i.d(e,{I:()=>n,p:()=>s})},613:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"}},3407:(t,e,i)=>{"use strict";i.d(e,{Ig:()=>f.I,MF:()=>n.A,hB:()=>D,O3:()=>L,bF:()=>w,Av:()=>P,wU:()=>H,RJ:()=>C,tI:()=>k,Rb:()=>F,Ad:()=>Z,SD:()=>Y,Jt:()=>b,hO:()=>I,RG:()=>G,FO:()=>N,Tf:()=>U,R6:()=>R,WP:()=>O,te:()=>X,JR:()=>W,vN:()=>V,pd:()=>z,DI:()=>j});var n=i(5286);const s=6378137,r=Math.PI*s,o=[-r,-r,r,r],a=[-180,-85,180,85],l=s*Math.log(Math.tan(Math.PI/2));class h extends n.A{constructor(t){super({code:t,units:"m",extent:o,global:!0,worldExtent:a,getPointResolution:function(t,e){return t/Math.cosh(e[1]/s)}})}}const c=[new h("EPSG:3857"),new h("EPSG:102100"),new h("EPSG:102113"),new h("EPSG:900913"),new h("http://www.opengis.net/def/crs/EPSG/0/3857"),new h("http://www.opengis.net/gml/srs/epsg.xml#3857")];const u=[-180,-90,180,90],d=6378137*Math.PI/180;class g extends n.A{constructor(t,e){super({code:t,units:"degrees",extent:u,axisOrientation:e,global:!0,metersPerUnit:d,worldExtent:u})}}const _=[new g("CRS:84"),new g("EPSG:4326","neu"),new g("urn:ogc:def:crs:OGC:1.3:CRS84"),new g("urn:ogc:def:crs:OGC:2:84"),new g("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new g("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new g("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];var f=i(8100);let p={};var m=i(3158),x=i(915),v=i(1597),y=i(6933),E=i(2490),T=i(4422);let A=!0;function C(t){A=!(void 0===t||t)}function S(t,e){if(void 0!==e)for(let i=0,n=t.length;i=o?e[r+t]:s[t]}return i}}function D(t,e,i,n){const s=b(t),r=b(e);(0,m.WQ)(s,r,M(i)),(0,m.WQ)(r,s,M(n))}function F(t,e){return C(),z(t,"EPSG:4326",void 0!==e?e:"EPSG:3857")}function O(t,e){const i=z(t,void 0!==e?e:"EPSG:3857","EPSG:4326"),n=i[0];return(n<-180||n>180)&&(i[0]=(0,v.xP)(n+180,360)-180),i}function k(t,e){if(t===e)return!0;const i=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||N(t,e)===S)&&i}function N(t,e){const i=t.getCode(),n=e.getCode();let s=(0,m.Jt)(i,n);return s||(s=R),s}function G(t,e){return N(b(t),b(e))}function z(t,e,i){return G(e,i)(t,void 0,t.length)}function j(t,e,i,n){const s=G(e,i);return(0,x.NW)(t,s,void 0,n)}let B=null;function U(){return B}function X(t,e){return B?z(t,e,B):t}function Z(t,e){return B?z(t,B,e):(A&&!(0,y.aI)(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(A=!1,(0,T.R8)("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t)}function W(t,e){return B?j(t,e,B):t}function Y(t,e){return B?j(t,B,e):t}function V(t,e){if(!B)return t;const i=b(e).getMetersPerUnit(),n=B.getMetersPerUnit();return i&&n?t*i/n:t}function H(t,e,i){return function(n){let s,r;if(t.canWrapX()){const e=t.getExtent(),o=(0,x.RG)(e);n=n.slice(0),r=(0,y.U$)(n,t,o),r&&(n[0]=n[0]-r*o),n[0]=(0,v.qE)(n[0],e[0],e[2]),n[1]=(0,v.qE)(n[1],e[1],e[3]),s=i(n)}else s=i(n);return r&&e.canWrapX()&&(s[0]+=r*(0,x.RG)(e.getExtent())),s}}var q,K,$;L(c),L(_),q=c,K=function(t,e,i){const n=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(n));for(let o=0;ol?i=l:i<-l&&(i=-l),e[o+1]=i}return e},$=function(t,e,i){const n=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(n));for(let o=0;o{"use strict";i.d(e,{A:()=>s});var n=i(8100);const s=class{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||n.I[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}}},8100:(t,e,i)=>{"use strict";i.d(e,{I:()=>r,q:()=>s});const n={9001:"m",9002:"ft",9003:"us-ft",9101:"radians",9102:"degrees"};function s(t){return n[t]}const r={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937}},3158:(t,e,i)=>{"use strict";i.d(e,{Jt:()=>r,WQ:()=>s});let n={};function s(t,e,i){const s=t.getCode(),r=e.getCode();s in n||(n[s]={}),n[s][r]=i}function r(t,e){let i;return t in n&&e in n[t]&&(i=n[t][e]),i}},7331:(t,e,i)=>{"use strict";i.d(e,{r2:()=>a});var n=i(2236),s=i(9703),r=i(3608),o=i(3407);function a(t){if(!(t.context instanceof CanvasRenderingContext2D))throw new Error("Only works for render events from Canvas 2D layers");const e=t.inversePixelTransform[0],i=t.inversePixelTransform[1],a=Math.sqrt(e*e+i*i),l=t.frameState,h=(0,s.lw)(t.inversePixelTransform.slice(),l.coordinateToPixelTransform),c=(0,r.j)(l.viewState.resolution,a);let u;const d=(0,o.Tf)();return d&&(u=(0,o.FO)(d,l.viewState.projection)),new n.A(t.context,a,l.extent,h,l.viewState.rotation,c,u)}},9960:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});var n=i(1685);class s extends n.Ay{constructor(t,e,i,n){super(t),this.inversePixelTransform=e,this.frameState=i,this.context=n}}const r=s},3984:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"}},4778:(t,e,i)=>{"use strict";i.d(e,{Ay:()=>p});var n=i(9703),s=i(915),r=i(3671),o=i(6514),a=i(2616),l=i(3407),h=i(3402),c=i(9969),u=i(4049),d=i(4238),g=i(7622);const _=(0,n.vt)();class f{constructor(t,e,i,n,s,r){this.styleFunction,this.extent_,this.id_=r,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=i||null,this.properties_=s,this.squaredTolerance_,this.stride_=n,this.simplifiedGeometry_}get(t){return this.properties_[t]}getExtent(){return this.extent_||(this.extent_="Point"===this.type_?(0,s.dP)(this.flatCoordinates_):(0,s.Vy)(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const t=(0,s.q1)(this.getExtent());this.flatInteriorPoints_=(0,a.J)(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const t=(0,h.yJ)(this.flatCoordinates_,this.ends_),e=(0,u.C)(this.flatCoordinates_,0,t,2);this.flatInteriorPoints_=(0,a.p)(this.flatCoordinates_,0,t,2,e)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=(0,c.SH)(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const t=this.flatCoordinates_;let e=0;const i=this.ends_;for(let n=0,s=i.length;n{if(t===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),e&&this.simplifiedGeometry_.applyTransform(e);const i=this.simplifiedGeometry_.getFlatCoordinates();let n;switch(this.type_){case"LineString":i.length=(0,r.P4)(i,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,t,i,0),n=[i.length];break;case"MultiLineString":n=[],i.length=(0,r.AL)(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,t,i,0,n);break;case"Polygon":n=[],i.length=(0,r.Hg)(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(t),i,0,n)}return n&&(this.simplifiedGeometry_=new f(this.type_,i,n,2,this.properties_,this.id_)),this.squaredTolerance_=t,this.simplifiedGeometry_})),this}}f.prototype.getFlatCoordinates=f.prototype.getOrientedFlatCoordinates;const p=f},2826:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n=class{drawCustom(t,e,i,n,s){}drawGeometry(t){}setStyle(t){}drawCircle(t,e,i){}drawFeature(t,e,i){}drawGeometryCollection(t,e,i){}drawLineString(t,e,i){}drawMultiLineString(t,e,i){}drawMultiPoint(t,e,i){}drawMultiPolygon(t,e,i){}drawPoint(t,e,i){}drawPolygon(t,e,i){}drawText(t,e,i){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}}},8774:(t,e,i)=>{"use strict";i.d(e,{Jw:()=>L,M8:()=>m,MY:()=>p,NT:()=>f,Oq:()=>u,TA:()=>b,Tq:()=>x,ZV:()=>l,_K:()=>g,_m:()=>c,aq:()=>v,eL:()=>_,fZ:()=>C,jT:()=>I,qY:()=>h,vk:()=>d,yY:()=>y});var n=i(4120),s=i(7771),r=i(3530),o=i(8711),a=i(5176);const l="10px sans-serif",h="#000",c="round",u=[],d=0,g="round",_=10,f="#000",p="center",m="middle",x=[0,0,0,0],v=1,y=new n.A;let E,T=null;const A={},C=function(){const t="32px ",e=["monospace","serif"],i=e.length,n="wmytzilWMYTZIL@#/&?$%10";let s,o;function l(s,r,a){let l=!0;for(let h=0;hMath.max(e,w(t,i))),0);return i[e]=n,n}function I(t,e){const i=[],n=[],s=[];let r=0,o=0,a=0,l=0;for(let h=0,c=e.length;h<=c;h+=2){const u=e[h];if("\n"===u||h===c){r=Math.max(r,o),s.push(o),o=0,a+=l;continue}const d=e[h+1]||t.font,g=w(d,u);i.push(g),o+=g;const _=S(d);n.push(_),l=Math.max(l,_)}return{width:r,height:a,widths:i,heights:n,lineWidths:s}}function L(t,e,i,n,s,r,o,a,l,h,c){t.save(),1!==i&&(void 0===t.globalAlpha?t.globalAlpha=t=>t.globalAlpha*=i:t.globalAlpha*=i),e&&t.transform.apply(t,e),n.contextInstructions?(t.translate(l,h),t.scale(c[0],c[1]),function(t,e){const i=t.contextInstructions;for(let t=0,n=i.length;t{"use strict";i.d(e,{A:()=>d});var n=i(6429),s=i(1580),r=i(2826),o=i(7295),a=i(915),l=i(8774),h=i(6514),c=i(6361);class u extends r.A{constructor(t,e,i,n){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=n,this.maxLineWidth=0,this.resolution=i,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){const e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))}appendFlatPointCoordinates(t,e){const i=this.getBufferedMaxExtent(),n=this.tmpCoordinate_,s=this.coordinates;let r=s.length;for(let o=0,l=t.length;ol&&(this.instructions.push([n.Ay.CUSTOM,l,u,t,i,c.n2,r]),this.hitDetectionInstructions.push([n.Ay.CUSTOM,l,u,t,s||i,c.n2,r]));break;case"Point":h=t.getFlatCoordinates(),this.coordinates.push(h[0],h[1]),u=this.coordinates.length,this.instructions.push([n.Ay.CUSTOM,l,u,t,i,void 0,r]),this.hitDetectionInstructions.push([n.Ay.CUSTOM,l,u,t,s||i,void 0,r])}this.endGeometry(e)}beginGeometry(t,e,i){this.beginGeometryInstruction1_=[n.Ay.BEGIN_GEOMETRY,e,0,t,i],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[n.Ay.BEGIN_GEOMETRY,e,0,t,i],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;let e;t.reverse();const i=t.length;let s,r,o=-1;for(e=0;ethis.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0}createFill(t){const e=t.fillStyle,i=[n.Ay.SET_FILL_STYLE,e];return"string"!=typeof e&&i.push(t.fillPatternScale),i}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[n.Ay.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)}updateStrokeStyle(t,e){const i=t.strokeStyle,n=t.lineCap,s=t.lineDash,r=t.lineDashOffset,o=t.lineJoin,a=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||s!=t.currentLineDash&&!(0,h.aI)(t.currentLineDash,s)||t.currentLineDashOffset!=r||t.currentLineJoin!=o||t.currentLineWidth!=a||t.currentMiterLimit!=l)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=s,t.currentLineDashOffset=r,t.currentLineJoin=o,t.currentLineWidth=a,t.currentMiterLimit=l)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[n.Ay.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=(0,a.o8)(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;(0,a.r)(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}const d=u},136:(t,e,i)=>{"use strict";i.d(e,{A:()=>p});var n=i(8130),s=i(6429),r=i(915);class o extends n.A{constructor(t,e,i,n){super(t,e,i,n),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e,i){if(!this.image_||this.maxExtent&&!(0,r.Ym)(this.maxExtent,t.getFlatCoordinates()))return;this.beginGeometry(t,e,i);const n=t.getFlatCoordinates(),o=t.getStride(),a=this.coordinates.length,l=this.appendFlatPointCoordinates(n,o);this.instructions.push([s.Ay.DRAW_IMAGE,a,l,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([s.Ay.DRAW_IMAGE,a,l,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e,i){if(!this.image_)return;this.beginGeometry(t,e,i);const n=t.getFlatCoordinates(),o=[];for(let e=0,i=n.length;e{"use strict";i.d(e,{y2:()=>R,$i:()=>w,x$:()=>b,Ay:()=>L});var n=i(6429),s=i(808),r=i(3624),o=i(9703),a=i(915),l=i(8774),h=i(1597),c=i(7622);function u(t,e,i,n,s,r,o,a,l,u,d,g){let _=t[e],f=t[e+1],p=0,m=0,x=0,v=0;function y(){p=_,m=f,_=t[e+=n],f=t[e+1],v+=x,x=Math.sqrt((_-p)*(_-p)+(f-m)*(f-m))}do{y()}while(et[2]}else I=T>w;const L=Math.PI,P=[],M=C+n===e;let D;if(x=0,v=S,_=t[e=C],f=t[e+1],M){y(),D=Math.atan2(f-m,_-p),I&&(D+=D>0?-L:L);const t=(w+T)/2,e=(b+A)/2;return P[0]=[t,e,(R-r)/2,D,s],P}for(let t=0,c=(s=s.replace(/\n/g," ")).length;t0?-L:L),void 0!==D){let t=g-D;if(t+=t>L?-2*L:t<-L?2*L:0,Math.abs(t)>o)return null}D=g;const T=t;let A=0;for(;t0&&t.push("\n",""),t.push(e,""),t}const A=class{constructor(t,e,i,n,r){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignAndScaleFill_,this.instructions=n.instructions,this.coordinates=n.coordinates,this.coordinateCache_={},this.renderedTransform_=(0,o.vt)(),this.hitDetectionInstructions=n.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=n.fillStates||{},this.strokeStates=n.strokeStates||{},this.textStates=n.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=r?new s.A:null}getZIndexContext(){return this.zIndexContext_}createLabel(t,e,i,n){const s=t+e+i+n;if(this.labels_[s])return this.labels_[s];const o=n?this.strokeStates[n]:null,a=i?this.fillStates[i]:null,h=this.textStates[e],c=this.pixelRatio,u=[h.scale[0]*c,h.scale[1]*c],d=Array.isArray(t),g=h.justify?r.E[h.justify]:E(Array.isArray(t)?t[0]:t,h.textAlign||l.MY),_=n&&o.lineWidth?o.lineWidth:0,f=d?t:t.split("\n").reduce(T,[]),{width:p,height:m,widths:x,heights:v,lineWidths:y}=(0,l.jT)(h,f),A=p+_,C=[],S=(A+2)*u[0],R=(m+_)*u[1],w={width:S<0?Math.floor(S):Math.ceil(S),height:R<0?Math.floor(R):Math.ceil(R),contextInstructions:C};1==u[0]&&1==u[1]||C.push("scale",u),n&&(C.push("strokeStyle",o.strokeStyle),C.push("lineWidth",_),C.push("lineCap",o.lineCap),C.push("lineJoin",o.lineJoin),C.push("miterLimit",o.miterLimit),C.push("setLineDash",[o.lineDash]),C.push("lineDashOffset",o.lineDashOffset)),i&&C.push("fillStyle",a.fillStyle),C.push("textBaseline","middle"),C.push("textAlign","center");const b=.5-g;let I=g*A+b*_;const L=[],P=[];let M,D=0,F=0,O=0,k=0;for(let t=0,e=f.length;tt?t-c:s,R=r+u>e?e-u:r,w=y[3]+S*g[0]+y[1],b=y[0]+R*g[1]+y[2],I=A-y[3],L=C-y[0];let P;return(E||0!==d)&&(f[0]=I,x[0]=I,f[1]=L,p[1]=L,p[0]=I+w,m[0]=p[0],m[1]=L+b,x[1]=m[1]),0!==d?(P=(0,o.Zz)((0,o.vt)(),i,n,1,1,d,-i,-n),(0,o.Bb)(P,f),(0,o.Bb)(P,p),(0,o.Bb)(P,m),(0,o.Bb)(P,x),(0,a.N)(Math.min(f[0],p[0],m[0],x[0]),Math.min(f[1],p[1],m[1],x[1]),Math.max(f[0],p[0],m[0],x[0]),Math.max(f[1],p[1],m[1],x[1]),_)):(0,a.N)(Math.min(I,I+w),Math.min(L,L+b),Math.max(I,I+w),Math.max(L,L+b),_),v&&(A=Math.round(A),C=Math.round(C)),{drawImageX:A,drawImageY:C,drawImageW:S,drawImageH:R,originX:c,originY:u,declutterBox:{minX:_[0],minY:_[1],maxX:_[2],maxY:_[3],value:T},canvasTransform:P,scale:g}}replayImageOrLabel_(t,e,i,n,s,r,o){const a=!(!r&&!o),h=n.declutterBox,c=o?o[2]*n.scale[0]/2:0;return h.minX-c<=e[0]&&h.maxX+c>=0&&h.minY-c<=e[1]&&h.maxY+c>=0&&(a&&this.replayTextBackground_(t,f,p,m,x,r,o),(0,l.Jw)(t,n.canvasTransform,s,i,n.originX,n.originY,n.drawImageW,n.drawImageH,n.drawImageX,n.drawImageY,n.scale)),!0}fill_(t){const e=this.alignAndScaleFill_;if(e){const i=(0,o.Bb)(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;t.save(),t.translate(i[0]%n,i[1]%n),1!==e&&t.scale(e,e),t.rotate(this.viewRotation_)}t.fill(),e&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,i,n){const s=this.textStates[e],o=this.createLabel(t,e,n,i),a=this.strokeStates[i],h=this.pixelRatio,c=E(Array.isArray(t)?t[0]:t,s.textAlign||l.MY),u=r.E[s.textBaseline||l.M8],d=a&&a.lineWidth?a.lineWidth:0;return{label:o,anchorX:c*(o.width/h-2*s.scale[0])+2*(.5-c)*d,anchorY:u*o.height/h+2*(.5-u)*d}}execute_(t,e,i,s,r,h,_,f){const p=this.zIndexContext_;let m;this.pixelCoordinates_&&(0,d.aI)(i,this.renderedTransform_)?m=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),m=(0,c.Rc)(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),(0,o.k3)(this.renderedTransform_,i));let x=0;const y=s.length;let T,A,C,S,R,w,b,I,L,P,M,D,F,O=0,k=0,N=0,G=null,z=null;const j=this.coordinateCache_,B=this.viewRotation_,U=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,X={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:B},Z=this.instructions!=s||this.overlaps?0:200;let W,Y,V,H;for(;xZ&&(this.fill_(t),k=0),N>Z&&(t.stroke(),N=0),k||N||(t.beginPath(),R=NaN,w=NaN),++x;break;case n.Ay.CIRCLE:O=i[1];const s=m[O],o=m[O+1],c=m[O+2]-s,d=m[O+3]-o,y=Math.sqrt(c*c+d*d);t.moveTo(s+y,o),t.arc(s,o,y,0,2*Math.PI,!0),++x;break;case n.Ay.CLOSE_PATH:t.closePath(),++x;break;case n.Ay.CUSTOM:O=i[1],T=i[2];const q=i[3],K=i[4],$=i[5];X.geometry=q,X.feature=W,x in j||(j[x]=[]);const J=j[x];$?$(m,O,T,2,J):(J[0]=m[O],J[1]=m[O+1],J.length=2),p&&(p.zIndex=i[6]),K(J,X),++x;break;case n.Ay.DRAW_IMAGE:O=i[1],T=i[2],L=i[3],A=i[4],C=i[5];let Q=i[6];const tt=i[7],et=i[8],it=i[9],nt=i[10];let st=i[11];const rt=i[12];let ot=i[13];S=i[14]||"declutter";const at=i[15];if(!L&&i.length>=20){P=i[19],M=i[20],D=i[21],F=i[22];const t=this.drawLabelWithPointPlacement_(P,M,D,F);L=t.label,i[3]=L;const e=i[23];A=(t.anchorX-e)*this.pixelRatio,i[4]=A;const n=i[24];C=(t.anchorY-n)*this.pixelRatio,i[5]=C,Q=L.height,i[6]=Q,ot=L.width,i[13]=ot}let lt,ht,ct,ut;i.length>25&&(lt=i[25]),i.length>17?(ht=i[16],ct=i[17],ut=i[18]):(ht=l.Tq,ct=!1,ut=!1),nt&&U?st+=B:nt||U||(st-=B);let dt=0;for(;O!w.includes(t))),I={},L=class{constructor(t,e,i,n,s,r,a){this.maxExtent_=t,this.overlaps_=n,this.pixelRatio_=i,this.resolution_=e,this.renderBuffer_=r,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=(0,o.vt)(),this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(s,a)}clip(t,e){const i=this.getClipCoords(e);t.beginPath(),t.moveTo(i[0],i[1]),t.lineTo(i[2],i[3]),t.lineTo(i[4],i[5]),t.lineTo(i[6],i[7]),t.clip()}createExecutors_(t,e){for(const i in t){let n=this.executorsByZIndex_[i];void 0===n&&(n={},this.executorsByZIndex_[i]=n);const s=t[i];for(const t in s){const i=s[t];n[t]=new A(this.resolution_,this.pixelRatio_,this.overlaps_,i,e)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const i=this.executorsByZIndex_[e];for(let e=0,n=t.length;ei)break;let a=n[o];a||(a=[],n[o]=a),a.push(4*((t+s)*e+(t+r))+3),s>0&&a.push(4*((t-s)*e+(t+r))+3),r>0&&(a.push(4*((t+s)*e+(t-r))+3),s>0&&a.push(4*((t-s)*e+(t-r))+3))}const s=[];for(let t=0,e=n.length;t0){if(!r||"Image"!==f&&"Text"!==f||r.includes(t)){const i=(_[o]-3)/4,r=n-i%l,a=n-(i/l|0),h=s(t,e,r*r+a*a);if(h)return h}u.clearRect(0,0,l,l);break}}const m=Object.keys(this.executorsByZIndex_).map(Number);let x,v,y,E,T;for(m.sort(d.V_),x=m.length-1;x>=0;--x){const t=m[x].toString();for(y=this.executorsByZIndex_[t],v=R.length-1;v>=0;--v)if(f=R[v],E=y[f],void 0!==E&&(T=E.executeHitDetection(u,h,i,p,g),T))return T}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const i=e[0],n=e[1],s=e[2],r=e[3],o=[i,n,i,r,s,r,s,n];return(0,c.Rc)(o,0,8,2,t,o),o}isEmpty(){return(0,S.p)(this.executorsByZIndex_)}execute(t,e,i,n,s,r,o){const a=Object.keys(this.executorsByZIndex_).map(Number);let l,h,c,u,g,_;for(a.sort(d.V_),r=r||R,o&&a.reverse(),l=0,h=a.length;l{t.draw(this.renderedContext_),t.clear()}))}}},2236:(t,e,i)=>{"use strict";i.d(e,{A:()=>g});var n=i(2826),s=i(7295),r=i(9703),o=i(8774),a=i(6514),l=i(915),h=i(1597),c=i(7622),u=i(2096);class d extends n.A{constructor(t,e,i,n,s,o,a){super(),this.context_=t,this.pixelRatio_=e,this.extent_=i,this.transform_=n,this.transformRotation_=n?(0,h.Mg)(Math.atan2(n[1],n[0]),10):0,this.viewRotation_=s,this.squaredTolerance_=o,this.userTransform_=a,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=(0,r.vt)()}drawImages_(t,e,i,n){if(!this.image_)return;const s=(0,c.Rc)(t,e,i,n,this.transform_,this.pixelCoordinates_),o=this.context_,a=this.tmpLocalTransform_,l=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=l*this.imageOpacity_);let h=this.imageRotation_;0===this.transformRotation_&&(h-=this.viewRotation_),this.imageRotateWithView_&&(h+=this.viewRotation_);for(let t=0,e=s.length;tt*this.pixelRatio_)),lineDashOffset:(r||o.vk)*this.pixelRatio_,lineJoin:void 0!==a?a:o._K,lineWidth:(void 0!==l?l:o.aq)*this.pixelRatio_,miterLimit:void 0!==h?h:o.eL,strokeStyle:(0,s.F)(t||o.NT)}}else this.strokeState_=null}setImageStyle(t){let e;if(!t||!(e=t.getSize()))return void(this.image_=null);const i=t.getPixelRatio(this.pixelRatio_),n=t.getAnchor(),s=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=n[0]*i,this.imageAnchorY_=n[1]*i,this.imageHeight_=e[1]*i,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=s[0],this.imageOriginY_=s[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const r=t.getScaleArray();this.imageScale_=[r[0]*this.pixelRatio_/i,r[1]*this.pixelRatio_/i],this.imageWidth_=e[0]*i}setTextStyle(t){if(t){const e=t.getFill();if(e){const t=e.getColor();this.textFillState_={fillStyle:(0,s.F)(t||o.qY)}}else this.textFillState_=null;const i=t.getStroke();if(i){const t=i.getColor(),e=i.getLineCap(),n=i.getLineDash(),r=i.getLineDashOffset(),a=i.getLineJoin(),l=i.getWidth(),h=i.getMiterLimit();this.textStrokeState_={lineCap:void 0!==e?e:o._m,lineDash:n||o.Oq,lineDashOffset:r||o.vk,lineJoin:void 0!==a?a:o._K,lineWidth:void 0!==l?l:o.aq,miterLimit:void 0!==h?h:o.eL,strokeStyle:(0,s.F)(t||o.NT)}}else this.textStrokeState_=null;const n=t.getFont(),r=t.getOffsetX(),a=t.getOffsetY(),l=t.getRotateWithView(),h=t.getRotation(),c=t.getScaleArray(),u=t.getText(),d=t.getTextAlign(),g=t.getTextBaseline();this.textState_={font:void 0!==n?n:o.ZV,textAlign:void 0!==d?d:o.MY,textBaseline:void 0!==g?g:o.M8},this.text_=void 0!==u?Array.isArray(u)?u.reduce(((t,e,i)=>t+(i%2?" ":e)),""):u:"",this.textOffsetX_=void 0!==r?this.pixelRatio_*r:0,this.textOffsetY_=void 0!==a?this.pixelRatio_*a:0,this.textRotateWithView_=void 0!==l&&l,this.textRotation_=void 0!==h?h:0,this.textScale_=[this.pixelRatio_*c[0],this.pixelRatio_*c[1]]}else this.text_=""}}const g=d},6429:(t,e,i)=>{"use strict";i.d(e,{Ay:()=>l,I5:()=>s,VD:()=>r,kx:()=>a,th:()=>o});const n={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},s=[n.FILL],r=[n.STROKE],o=[n.BEGIN_PATH],a=[n.CLOSE_PATH],l=n},3624:(t,e,i)=>{"use strict";i.d(e,{E:()=>d,A:()=>_});var n=i(8130),s=i(6429),r=i(7295),o=i(8774),a=i(4087),l=i(915),h=i(1597);function c(t,e,i,n,s){const r=[];let o=i,a=0,l=e.slice(i,2);for(;a=t){const e=(t-a+d)/d,g=(0,h.Cc)(i,c,e),_=(0,h.Cc)(n,u,e);l.push(g,_),r.push(l),l=[g,_],a==t&&(o+=s),a=0}else if(a0&&r.push(l),r}function u(t,e,i,n,s){let r,o,a,l,h,c,u,d,g,_,f=i,p=i,m=0,x=0,v=i;for(o=i;ot&&(x>m&&(m=x,f=v,p=o),x=0,v=o-s)),a=l,u=g,d=_),h=i,c=n}return x+=l,x>m?[v,o]:[f,p]}const d={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class g extends n.A{constructor(t,e,i,n){super(t,e,i,n),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[o.qY]={fillStyle:o.qY},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e,i){const n=this.textFillState_,r=this.textStrokeState_,a=this.textState_;if(""===this.text_||!a||!n&&!r)return;const h=this.coordinates;let d=h.length;const g=t.getType();let _=null,f=t.getStride();if("line"!==a.placement||"LineString"!=g&&"MultiLineString"!=g&&"Polygon"!=g&&"MultiPolygon"!=g){let n=a.overflow?null:[];switch(g){case"Point":case"MultiPoint":_=t.getFlatCoordinates();break;case"LineString":_=t.getFlatMidpoint();break;case"Circle":_=t.getCenter();break;case"MultiLineString":_=t.getFlatMidpoints(),f=2;break;case"Polygon":_=t.getFlatInteriorPoint(),a.overflow||n.push(_[2]/this.resolution),f=3;break;case"MultiPolygon":const e=t.getFlatInteriorPoints();_=[];for(let t=0,i=e.length;t{const n=h[2*(t+i)]===_[i*f]&&h[2*(t+i)+1]===_[i*f+1];return n||--t,n}))}this.saveTextStates_(),(a.backgroundFill||a.backgroundStroke)&&(this.setFillStrokeStyle(a.backgroundFill,a.backgroundStroke),a.backgroundFill&&this.updateFillStyle(this.state,this.createFill),a.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e,i);let l=a.padding;if(l!=o.Tq&&(a.scale[0]<0||a.scale[1]<0)){let t=a.padding[0],e=a.padding[1],i=a.padding[2],n=a.padding[3];a.scale[0]<0&&(e=-e,n=-n),a.scale[1]<0&&(t=-t,i=-i),l=[t,e,i,n]}const c=this.pixelRatio;this.instructions.push([s.Ay.DRAW_IMAGE,d,r,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,l==o.Tq?o.Tq:l.map((function(t){return t*c})),!!a.backgroundFill,!!a.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,n]);const u=1/c,p=this.state.fillStyle;a.backgroundFill&&(this.state.fillStyle=o.qY,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([s.Ay.DRAW_IMAGE,d,r,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[u,u],NaN,this.declutterMode_,this.declutterImageWithText_,l,!!a.backgroundFill,!!a.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?o.qY:this.fillKey_,this.textOffsetX_,this.textOffsetY_,n]),a.backgroundFill&&(this.state.fillStyle=p,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(e)}else{if(!(0,l.HY)(this.maxExtent,t.getExtent()))return;let n;if(_=t.getFlatCoordinates(),"LineString"==g)n=[_.length];else if("MultiLineString"==g)n=t.getEnds();else if("Polygon"==g)n=t.getEnds().slice(0,1);else if("MultiPolygon"==g){const e=t.getEndss();n=[];for(let t=0,i=e.length;t{"use strict";i.d(e,{A:()=>s});var n=i(8711);const s=class{constructor(){this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy(CanvasRenderingContext2D.prototype,{get:(t,e)=>{if("function"==typeof(0,n.lr)()[e])return this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e),this.pushMethodArgs_},set:(t,e,i)=>(this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e,i),!0)})}pushMethodArgs_=(...t)=>(this.instructions_[this.zIndex+this.offset_].push(t),this);getContext(){return this.context_}draw(t){this.instructions_.forEach((e=>{for(let i=0,n=e.length;i{"use strict";i.d(e,{F8:()=>d,_7:()=>u,tF:()=>c});var n=i(2236),s=i(9700),r=i(6514),o=i(1597),a=i(8711),l=i(3407),h=i(915);const c=.5;function u(t,e,i,o,u,d,g,_,f){const p=f?(0,l.JR)(u,f):u,m=t[0]*c,x=t[1]*c,v=(0,a.Y)(m,x);v.imageSmoothingEnabled=!1;const y=v.canvas,E=new n.A(v,c,u,null,g,_,f?(0,l.FO)((0,l.Tf)(),f):null),T=i.length,A=Math.floor(16777215/T),C={};for(let t=1;t<=T;++t){const e=i[t-1],n=e.getStyleFunction()||o;if(!n)continue;let r=n(e,d);if(!r)continue;Array.isArray(r)||(r=[r]);const l=(t*A).toString(16).padStart(7,"#00000");for(let t=0,i=r.length;t{"use strict";i.d(e,{A:()=>l});var n=i(6837),s=i(6141),r=i(1854),o=i(4087);class a extends r.A{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.declutterExecutorGroup=null}getFeatures(t){return(0,o.b0)()}getData(t){return null}prepareFrame(t){return(0,o.b0)()}renderFrame(t,e){return(0,o.b0)()}loadedTileCallback(t,e,i){t[e]||(t[e]={}),t[e][i.tileCoord.toString()]=i}createLoadedTileFinder(t,e,i){return(n,s)=>{const r=this.loadedTileCallback.bind(this,i,n);return t.forEachLoadedTile(e,n,s,r)}}forEachFeatureAtCoordinate(t,e,i,n,s){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;e.getState()!==s.A.LOADED&&e.getState()!==s.A.ERROR||this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=s.A.LOADED&&e!=s.A.ERROR&&t.addEventListener(n.A.CHANGE,this.boundHandleImageChange_),e==s.A.IDLE&&(t.load(),e=t.getState()),e==s.A.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&"ready"===t.getSourceState()&&t.changed()}renderDeferred(t){}disposeInternal(){delete this.layer_,super.disposeInternal()}}const l=a},6769:(t,e,i)=>{"use strict";i.d(e,{A:()=>f,B:()=>d});var n=i(5986),s=i(9960),r=i(3984),o=i(808),a=i(9703),l=i(3730),h=i(8711),c=i(6514),u=i(915);const d=[];let g=null;class _ extends n.A{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=(0,a.vt)(),this.pixelTransform=(0,a.vt)(),this.inversePixelTransform=(0,a.vt)(),this.context=null,this.deferredContext_=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,i){let n;g||(g=(0,h.Y)(1,1,void 0,{willReadFrequently:!0})),g.clearRect(0,0,1,1);try{g.drawImage(t,e,i,1,1,0,0,1,1),n=g.getImageData(0,0,1,1).data}catch(t){return g=null,null}return n}getBackground(t){let e=this.getLayer().getBackground();return"function"==typeof e&&(e=e(t.viewState.resolution)),e||void 0}useContainer(t,e,i){const n=this.getLayer().getClassName();let s,r;if(t&&t.className===n&&(!i||t&&t.style.backgroundColor&&(0,c.aI)((0,l._j)(t.style.backgroundColor),(0,l._j)(i)))){const e=t.firstElementChild;e instanceof HTMLCanvasElement&&(r=e.getContext("2d"))}if(r&&r.canvas.style.transform===e?(this.container=t,this.context=r,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){s=document.createElement("div"),s.className=n;let t=s.style;t.position="absolute",t.width="100%",t.height="100%",r=(0,h.Y)();const e=r.canvas;s.appendChild(e),t=e.style,t.position="absolute",t.left="0",t.transformOrigin="top left",this.container=s,this.context=r}this.containerReused||!i||this.container.style.backgroundColor||(this.container.style.backgroundColor=i)}clipUnrotated(t,e,i){const n=(0,u.Py)(i),s=(0,u.WU)(i),r=(0,u.k_)(i),o=(0,u.R)(i);(0,a.Bb)(e.coordinateToPixelTransform,n),(0,a.Bb)(e.coordinateToPixelTransform,s),(0,a.Bb)(e.coordinateToPixelTransform,r),(0,a.Bb)(e.coordinateToPixelTransform,o);const l=this.inversePixelTransform;(0,a.Bb)(l,n),(0,a.Bb)(l,s),(0,a.Bb)(l,r),(0,a.Bb)(l,o),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.clip()}dispatchRenderEvent_(t,e,i){const n=this.getLayer();if(n.hasListener(t)){const r=new s.A(t,this.inversePixelTransform,i,e);n.dispatchEvent(r)}}preRender(t,e){this.frameState=e,e.declutter||this.dispatchRenderEvent_(r.A.PRERENDER,t,e)}postRender(t,e){e.declutter||this.dispatchRenderEvent_(r.A.POSTRENDER,t,e)}renderDeferredInternal(t){}getRenderContext(t){return t.declutter&&!this.deferredContext_&&(this.deferredContext_=new o.A),t.declutter?this.deferredContext_.getContext():this.context}renderDeferred(t){t.declutter&&(this.dispatchRenderEvent_(r.A.PRERENDER,this.context,t),t.declutter&&this.deferredContext_&&(this.deferredContext_.draw(this.context),this.deferredContext_.clear()),this.renderDeferredInternal(t),this.dispatchRenderEvent_(r.A.POSTRENDER,this.context,t))}getRenderTransform(t,e,i,n,s,r,o){const l=s/2,h=r/2,c=n/e,u=-c,d=-t[0]+o,g=-t[1];return(0,a.Zz)(this.tempTransform,l,h,c,u,-i,d,g)}disposeInternal(){delete this.frameState,super.disposeInternal()}}const f=_},4029:(t,e,i)=>{"use strict";i.d(e,{A:()=>f});var n=i(6769),s=i(190),r=i(7404),o=i(1110),a=i(1078),l=i(9703),h=i(6514),c=i(915),u=i(3407),d=i(4087),g=i(4401);class _ extends n.A{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=(0,c.S5)(),this.tmpTileRange_=new o.A(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),i=t.getState(),n=e.getUseInterimTilesOnError();return i==a.A.LOADED||i==a.A.EMPTY||i==a.A.ERROR&&!n}getTile(t,e,i,n){const s=n.pixelRatio,r=n.viewState.projection,o=this.getLayer();let l=o.getSource().getTile(t,e,i,s,r);return l.getState()==a.A.ERROR&&o.getUseInterimTilesOnError()&&o.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(l)||(l=l.getInterimTile()),l}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),n=(0,l.Bb)(e.pixelToCoordinateTransform,t.slice()),o=i.getExtent();if(o&&!(0,c.Ym)(o,n))return null;const h=e.pixelRatio,u=e.viewState.projection,d=e.viewState,_=i.getRenderSource(),f=_.getTileGridForProjection(d.projection),p=_.getTilePixelRatio(e.pixelRatio);for(let t=f.getZForResolution(d.resolution);t>=f.getMinZoom();--t){const e=f.getTileCoordForCoordAndZ(n,t),i=_.getTile(t,e[1],e[2],h,u);if(!(i instanceof s.A||i instanceof r.A)||i instanceof r.A&&i.getState()===a.A.EMPTY)return null;if(i.getState()!==a.A.LOADED)continue;const o=f.getOrigin(t),l=(0,g.xq)(f.getTileSize(t)),c=f.getResolution(t),m=Math.floor(p*((n[0]-o[0])/c-e[1]*l[0])),x=Math.floor(p*((o[1]-n[1])/c-e[2]*l[1])),v=Math.round(p*_.getGutterForProjection(d.projection));return this.getImageData(i.getImage(),m+v,x+v)}return null}loadedTileCallback(t,e,i){return!!this.isDrawableTile(i)&&super.loadedTileCallback(t,e,i)}prepareFrame(t){return!!this.getLayer().getSource()}renderFrame(t,e){const i=t.layerStatesArray[t.layerIndex],n=t.viewState,s=n.projection,r=n.resolution,o=n.center,g=n.rotation,_=t.pixelRatio,f=this.getLayer(),p=f.getSource(),m=p.getRevision(),x=p.getTileGridForProjection(s),v=x.getZForResolution(r,p.zDirection),y=x.getResolution(v);let E=t.extent;const T=t.viewState.resolution,A=p.getTilePixelRatio(_),C=Math.round((0,c.RG)(E)/T*_),S=Math.round((0,c.Oq)(E)/T*_),R=i.extent&&(0,u.SD)(i.extent,s);R&&(E=(0,c._N)(E,(0,u.SD)(i.extent,s)));const w=y*C/2/A,b=y*S/2/A,I=[o[0]-w,o[1]-b,o[0]+w,o[1]+b],L=x.getTileRangeForExtentAndZ(E,v),P={};P[v]={};const M=this.createLoadedTileFinder(p,s,P),D=this.tmpExtent,F=this.tmpTileRange_;this.newTiles_=!1;const O=g?(0,c.Yw)(n.center,T,g,t.size):void 0;for(let e=L.minX;e<=L.maxX;++e)for(let n=L.minY;n<=L.maxY;++n){if(g&&!x.tileCoordIntersectsViewport([v,e,n],O))continue;const s=this.getTile(v,e,n,t);if(this.isDrawableTile(s)){const e=(0,d.v6)(this);if(s.getState()==a.A.LOADED){P[v][s.tileCoord.toString()]=s;let t=s.inTransition(e);t&&1!==i.opacity&&(s.endTransition(e),t=!1),this.newTiles_||!t&&this.renderedTiles.includes(s)||(this.newTiles_=!0)}if(1===s.getAlpha(e,t.time))continue}const r=x.getTileCoordChildTileRange(s.tileCoord,F,D);let o=!1;r&&(o=M(v+1,r)),o||x.forEachTileCoordParentTileRange(s.tileCoord,M,F,D)}const k=y/r*_/A;(0,l.Zz)(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/_,1/_,g,-C/2,-S/2);const N=(0,l.dI)(this.pixelTransform);this.useContainer(e,N,this.getBackground(t));const G=this.getRenderContext(t),z=this.context.canvas;(0,l.T9)(this.inversePixelTransform,this.pixelTransform),(0,l.Zz)(this.tempTransform,C/2,S/2,k,k,0,-C/2,-S/2),z.width!=C||z.height!=S?(z.width=C,z.height=S):this.containerReused||G.clearRect(0,0,C,S),R&&this.clipUnrotated(G,t,R),p.getInterpolate()||(G.imageSmoothingEnabled=!1),this.preRender(G,t),this.renderedTiles.length=0;let j,B,U,X=Object.keys(P).map(Number);X.sort(h.V_),1!==i.opacity||this.containerReused&&!p.getOpaque(t.viewState.projection)?(j=[],B=[]):X=X.reverse();for(let e=X.length-1;e>=0;--e){const i=X[e],n=p.getTilePixelSize(i,_,s),r=x.getResolution(i)/y,o=n[0]*r*k,a=n[1]*r*k,h=x.getTileCoordForCoordAndZ((0,c.Py)(I),i),u=x.getTileCoordExtent(h),g=(0,l.Bb)(this.tempTransform,[A*(u[0]-I[0])/y,A*(I[3]-u[3])/y]),f=A*p.getGutterForProjection(s),m=P[i];for(const e in m){const n=m[e],s=n.tileCoord,r=h[1]-s[1],l=Math.round(g[0]-(r-1)*o),u=h[2]-s[2],_=Math.round(g[1]-(u-1)*a),x=Math.round(g[0]-r*o),y=Math.round(g[1]-u*a),E=l-x,T=_-y,A=v===i,C=A&&1!==n.getAlpha((0,d.v6)(this),t.time);let S=!1;if(!C)if(j){U=[x,y,x+E,y,x+E,y+T,x,y+T];for(let t=0,e=j.length;t{"use strict";i.d(e,{Eo:()=>a,gY:()=>h,j:()=>l,nl:()=>c});var n=i(6141),s=i(4087);const r=.5,o={Point:function(t,e,i,s,r,o){const a=i.getImage(),l=i.getText(),h=l&&l.getText(),c=o&&a&&h?{}:void 0;if(a){if(a.getImageState()!=n.A.LOADED)return;const o=t.getBuilder(i.getZIndex(),"Image");o.setImageStyle(a,c),o.drawPoint(e,s,r)}if(h){const n=t.getBuilder(i.getZIndex(),"Text");n.setTextStyle(l,c),n.drawText(e,s,r)}},LineString:function(t,e,i,n,s){const r=i.getStroke();if(r){const o=t.getBuilder(i.getZIndex(),"LineString");o.setFillStrokeStyle(null,r),o.drawLineString(e,n,s)}const o=i.getText();if(o&&o.getText()){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(o),r.drawText(e,n,s)}},Polygon:function(t,e,i,n,s){const r=i.getFill(),o=i.getStroke();if(r||o){const a=t.getBuilder(i.getZIndex(),"Polygon");a.setFillStrokeStyle(r,o),a.drawPolygon(e,n,s)}const a=i.getText();if(a&&a.getText()){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(a),r.drawText(e,n,s)}},MultiPoint:function(t,e,i,s,r,o){const a=i.getImage(),l=a&&0!==a.getOpacity(),h=i.getText(),c=h&&h.getText(),u=o&&l&&c?{}:void 0;if(l){if(a.getImageState()!=n.A.LOADED)return;const o=t.getBuilder(i.getZIndex(),"Image");o.setImageStyle(a,u),o.drawMultiPoint(e,s,r)}if(c){const n=t.getBuilder(i.getZIndex(),"Text");n.setTextStyle(h,u),n.drawText(e,s,r)}},MultiLineString:function(t,e,i,n,s){const r=i.getStroke();if(r){const o=t.getBuilder(i.getZIndex(),"LineString");o.setFillStrokeStyle(null,r),o.drawMultiLineString(e,n,s)}const o=i.getText();if(o&&o.getText()){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(o),r.drawText(e,n,s)}},MultiPolygon:function(t,e,i,n,s){const r=i.getFill(),o=i.getStroke();if(o||r){const a=t.getBuilder(i.getZIndex(),"Polygon");a.setFillStrokeStyle(r,o),a.drawMultiPolygon(e,n,s)}const a=i.getText();if(a&&a.getText()){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(a),r.drawText(e,n,s)}},GeometryCollection:function(t,e,i,n,s,r){const a=e.getGeometriesArray();let l,h;for(l=0,h=a.length;l0;return _&&Promise.all(c).then((()=>r(null))),function(t,e,i,n,s,r,a){const l=i.getGeometryFunction()(e);if(!l)return;const h=l.simplifyTransformed(n,s);i.getRenderer()?u(t,h,i,e,a):(0,o[h.getType()])(t,h,i,e,a,r)}(t,e,i,s,a,l,h),_}function u(t,e,i,n,s){if("GeometryCollection"!=e.getType())t.getBuilder(i.getZIndex(),"Default").drawCustom(e,n,i.getRenderer(),i.getHitDetectionRenderer(),s);else{const r=e.getGeometries();for(let e=0,o=r.length;e{"use strict";i.d(e,{A:()=>c});var n=i(5332),s=i(5986),r=i(9960),o=i(3984),a=i(9777),l=i(9703);class h extends s.A{constructor(t,e){super(t),e=e||{},this.inversePixelTransform_=(0,l.vt)(),this.pixelContext_=null,this.postProcesses_=e.postProcesses,this.uniforms_=e.uniforms,this.helper,t.addChangeListener(n.A.MAP,this.removeHelper.bind(this)),this.dispatchPreComposeEvent=this.dispatchPreComposeEvent.bind(this),this.dispatchPostComposeEvent=this.dispatchPostComposeEvent.bind(this)}dispatchPreComposeEvent(t,e){const i=this.getLayer();if(i.hasListener(o.A.PRECOMPOSE)){const n=new r.A(o.A.PRECOMPOSE,void 0,e,t);i.dispatchEvent(n)}}dispatchPostComposeEvent(t,e){const i=this.getLayer();if(i.hasListener(o.A.POSTCOMPOSE)){const n=new r.A(o.A.POSTCOMPOSE,void 0,e,t);i.dispatchEvent(n)}}reset(t){this.uniforms_=t.uniforms,this.helper&&this.helper.setUniforms(this.uniforms_)}removeHelper(){this.helper&&(this.helper.dispose(),delete this.helper)}prepareFrame(t){if(this.getLayer().getRenderSource()){let e,i=!0,n=-1;for(let s=0,r=t.layerStatesArray.length;s{"use strict";i.d(e,{eS:()=>j,gF:()=>z,Ay:()=>U});var n=i(8596),s=i(7404),r=i(1078),o=i(9332),a=i(6837),l=i(190),h=i(4087);class c extends o.A{constructor(t){super(),this.tile,this.handleTileChange_=this.handleTileChange_.bind(this),this.gutter_=t.gutter||0,this.helper_=t.helper,this.loaded=!1,this.ready=!1}setTile(t){if(t!==this.tile)if(this.tile&&this.tile.removeEventListener(a.A.CHANGE,this.handleTileChange_),this.tile=t,this.loaded=t.getState()===r.A.LOADED,this.loaded)this.uploadTile();else{if(t instanceof l.A){const e=t.getImage();e instanceof Image&&!e.crossOrigin&&(e.crossOrigin="anonymous")}t.addEventListener(a.A.CHANGE,this.handleTileChange_)}}uploadTile(){(0,h.b0)()}setReady(){this.ready=!0,this.dispatchEvent(a.A.CHANGE)}handleTileChange_(){this.tile.getState()===r.A.LOADED&&(this.loaded=!0,this.uploadTile())}disposeInternal(){this.tile.removeEventListener(a.A.CHANGE,this.handleTileChange_)}}const u=c;var d=i(7607),g=i(259),_=i(130),f=i(8711),p=i(4401);function m(t,e,i){const n=i?t.LINEAR:t.NEAREST;t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,n)}function x(t,e,i,n,s,r){const o=t.getGL();let a,l;i instanceof Float32Array?(a=o.FLOAT,t.getExtension("OES_texture_float"),l=null!==t.getExtension("OES_texture_float_linear")):(a=o.UNSIGNED_BYTE,l=!0),m(o,e,r&&l);const h=i.byteLength/n[1];let c,u=1;switch(h%8==0?u=8:h%4==0?u=4:h%2==0&&(u=2),s){case 1:c=o.LUMINANCE;break;case 2:c=o.LUMINANCE_ALPHA;break;case 3:c=o.RGB;break;case 4:c=o.RGBA;break;default:throw new Error(`Unsupported number of bands: ${s}`)}const d=o.getParameter(o.UNPACK_ALIGNMENT);o.pixelStorei(o.UNPACK_ALIGNMENT,u),o.texImage2D(o.TEXTURE_2D,0,c,n[0],n[1],0,c,a,i),o.pixelStorei(o.UNPACK_ALIGNMENT,d)}let v=null;const y=class extends u{constructor(t){super(t),this.textures=[],this.renderSize_=(0,p.xq)(t.grid.getTileSize(t.tile.tileCoord[0])),this.bandCount=NaN;const e=new g.Ay(_.H7,_.Ek);e.fromArray([0,1,1,1,1,0,0,0]),this.helper_.flushBufferData(e),this.coords=e,this.setTile(t.tile)}uploadTile(){const t=this.helper_,e=t.getGL(),i=this.tile;let n;this.textures.length=0,n=i instanceof l.A||i instanceof s.A?i.getImage():i.getData();const r=(0,d.xo)(n);if(r){const t=e.createTexture();return this.textures.push(t),this.bandCount=4,function(t,e,i,n){m(t,e,n),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,i)}(e,t,r,i.interpolate),void this.setReady()}n=(0,d.bL)(n);const o=i.getSize(),a=[o[0]+2*this.gutter_,o[1]+2*this.gutter_],h=n instanceof Float32Array,c=a[0]*a[1],u=h?Float32Array:Uint8Array,g=u.BYTES_PER_ELEMENT,_=n.byteLength/a[1];this.bandCount=Math.floor(_/g/a[0]);const f=Math.ceil(this.bandCount/4);if(1===f){const s=e.createTexture();return this.textures.push(s),x(t,s,n,a,this.bandCount,i.interpolate),void this.setReady()}const p=new Array(f);for(let t=0;t=p;--s){const i=c.getTileRangeForExtentAndZ(e,s,this.tempTileRange_),a=c.getResolution(s);for(let e=i.minX;e<=i.maxX;++e)for(let h=i.minY;h<=i.maxY;++h){const i=(0,S.N)(s,e,h,this.tempTileCoord_),f=O(l,i);let p,m;if(_.containsKey(f)&&(p=_.get(f),m=p.tile),p&&p.tile.key===l.getKey()||(m=l.getTile(s,e,h,t.pixelRatio,o.projection)),M(n,m))continue;if(p)if(this.isDrawableTile_(m))p.setTile(m);else{const t=m.getInterimTile();p.setTile(t)}else p=this.createTileRepresentation({tile:m,grid:c,helper:this.helper,gutter:u}),_.set(f,p);D(n,p,s);const x=m.getKey();g[x]=!0,m.getState()===r.A.IDLE&&(t.tileQueue.isKeyQueued(x)||t.tileQueue.enqueue([m,d,c.getTileCoordCenter(i),a]))}}}beforeTilesRender(t,e){this.helper.prepareDraw(this.frameState,!e,!0)}beforeTilesMaskRender(t){return!1}renderTile(t,e,i,n,s,r,o,a,l,h,c){}renderTileMask(t,e,i,n){}drawTile_(t,e,i,n,s,r,o){if(!e.ready)return;const a=e.tile.tileCoord,l=(0,S.i7)(a),h=l in r?r[l]:1,c=o.getResolution(i),u=(0,p.xq)(o.getTileSize(i),this.tempSize_),d=o.getOrigin(i),g=o.getTileCoordExtent(a),_=h<1?-1:P(i);h<1&&(t.animate=!0);const f=t.viewState,m=f.center[0],x=f.center[1],v=u[0]+2*n,y=u[1]+2*n,E=v/y,T=(m-d[0])/(u[0]*c),A=(d[1]-x)/(u[1]*c),C=f.resolution/c,w=a[1],b=a[2];(0,R.cL)(this.tileTransform_),(0,R.hs)(this.tileTransform_,2/(t.size[0]*C/v),-2/(t.size[1]*C/v)),(0,R.e$)(this.tileTransform_,f.rotation),(0,R.hs)(this.tileTransform_,1,1/E),(0,R.Tl)(this.tileTransform_,(u[0]*(w-T)-n)/v,(u[1]*(b-A)-n)/y),this.renderTile(e,this.tileTransform_,t,s,c,u,d,g,_,n,h)}renderFrame(t){this.frameState=t,this.renderComplete=!0;const e=this.helper.getGL();this.preRender(e,t);const i=t.viewState,o=this.getLayer(),a=o.getRenderSource(),l=a.getTileGridForProjection(i.projection),c=a.getGutterForProjection(i.projection),u=F(t,t.extent),d=l.getZForResolution(i.resolution,a.zDirection),g={tileIds:new Set,representationsByZ:{}},_=o.getPreload();if(t.nextExtent){const e=l.getZForResolution(i.nextResolution,a.zDirection),n=F(t,t.nextExtent);this.enqueueTiles(t,n,e,g,_)}this.enqueueTiles(t,u,d,g,0),_>0&&setTimeout((()=>{this.enqueueTiles(t,u,d-1,g,_-1)}),0);const f={},p=(0,h.v6)(this),m=t.time;let x=!1;for(const t of g.representationsByZ[d]){const e=t.tile;if((e instanceof s.A||e instanceof n.A)&&e.getState()===r.A.EMPTY)continue;const i=e.tileCoord;if(t.ready){const t=e.getAlpha(p,m);if(1===t){e.endTransition(p);continue}x=!0,f[(0,S.i7)(i)]=t}if(this.renderComplete=!1,this.findAltTiles_(l,i,d+1,g))continue;const o=l.getMinZoom();for(let t=d-1;t>=o&&!this.findAltTiles_(l,i,t,g);--t);}const v=g.representationsByZ,y=Object.keys(v).map(Number).sort(w.rG);if(this.beforeTilesMaskRender(t))for(let t=0,e=y.length;tt.dispose())),t.clear()}removeHelper(){this.helper&&this.clearCache(),super.removeHelper()}disposeInternal(){super.disposeInternal(),delete this.frameState}}const N=k;var G=i(9777);const z={TILE_TRANSFORM:"u_tileTransform",TRANSITION_ALPHA:"u_transitionAlpha",DEPTH:"u_depth",RENDER_EXTENT:"u_renderExtent",PATTERN_ORIGIN:"u_patternOrigin",RESOLUTION:"u_resolution",ZOOM:"u_zoom",GLOBAL_ALPHA:"u_globalAlpha",PROJECTION_MATRIX:"u_projectionMatrix",SCREEN_TO_WORLD_MATRIX:"u_screenToWorldMatrix",TILE_TEXTURE_ARRAY:"u_tileTextures",TEXTURE_PIXEL_WIDTH:"u_texturePixelWidth",TEXTURE_PIXEL_HEIGHT:"u_texturePixelHeight",TEXTURE_RESOLUTION:"u_textureResolution",TEXTURE_ORIGIN_X:"u_textureOriginX",TEXTURE_ORIGIN_Y:"u_textureOriginY"},j={TEXTURE_COORD:"a_textureCoord"},B=[{name:j.TEXTURE_COORD,size:2,type:G.jQ.FLOAT}],U=class extends N{constructor(t,e){super(t,e),this.program_,this.vertexShader_=e.vertexShader,this.fragmentShader_=e.fragmentShader,this.indices_=new g.Ay(_.IP,_.Ek),this.indices_.fromArray([0,1,3,1,2,3]),this.paletteTextures_=e.paletteTextures||[]}reset(t){super.reset(t),this.vertexShader_=t.vertexShader,this.fragmentShader_=t.fragmentShader,this.paletteTextures_=t.paletteTextures||[],this.helper&&(this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_))}afterHelperCreated(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.helper.flushBufferData(this.indices_)}createTileRepresentation(t){return new y(t)}beforeTilesRender(t,e){super.beforeTilesRender(t,e),this.helper.useProgram(this.program_,t)}renderTile(t,e,i,n,s,r,o,a,l,h,c){const u=this.helper.getGL();this.helper.bindBuffer(t.coords),this.helper.bindBuffer(this.indices_),this.helper.enableAttributes(B);let d=0;for(;d0&&(v=a,(0,I._N)(v,n,v)),this.helper.setUniformFloatVec4(z.RENDER_EXTENT,v),this.helper.setUniformFloatValue(z.RESOLUTION,g.resolution),this.helper.setUniformFloatValue(z.ZOOM,g.zoom),this.helper.setUniformFloatValue(z.TEXTURE_PIXEL_WIDTH,_),this.helper.setUniformFloatValue(z.TEXTURE_PIXEL_HEIGHT,f),this.helper.setUniformFloatValue(z.TEXTURE_RESOLUTION,s),this.helper.setUniformFloatValue(z.TEXTURE_ORIGIN_X,o[0]+m*r[0]*s-h*s),this.helper.setUniformFloatValue(z.TEXTURE_ORIGIN_Y,o[1]-x*r[1]*s+h*s),this.helper.drawElements(0,this.indices_.getSize())}getData(t){if(!this.helper.getGL())return null;const e=this.frameState;if(!e)return null;const i=this.getLayer(),o=(0,R.Bb)(e.pixelToCoordinateTransform,t.slice()),a=e.viewState,l=i.getExtent();if(l&&!(0,I.Ym)((0,b.SD)(l,a.projection),o))return null;const h=i.getSources((0,I.Tr)([o]),a.resolution);let c,u,d;for(c=h.length-1;c>=0;--c)if(u=h[c],"ready"===u.getState()){if(d=u.getTileGridForProjection(a.projection),u.getWrapX())break;const t=d.getExtent();if(!t||(0,I.Ym)(t,o))break}if(c<0)return null;const g=this.tileRepresentationCache;for(let t=d.getZForResolution(a.resolution);t>=d.getMinZoom();--t){const e=d.getTileCoordForCoordAndZ(o,t),i=O(u,e);if(!g.containsKey(i))continue;const a=g.get(i),l=a.tile;if((l instanceof s.A||l instanceof n.A)&&l.getState()===r.A.EMPTY)return null;if(!a.loaded)continue;const h=d.getOrigin(t),c=(0,p.xq)(d.getTileSize(t)),_=d.getResolution(t),f=(o[0]-h[0])/_-e[1]*c[0],m=(h[1]-o[1])/_-e[2]*c[1];return a.getPixelData(f,m)}return null}disposeInternal(){const t=this.helper;t&&(t.getGL().deleteProgram(this.program_),delete this.program_,t.deleteBuffer(this.indices_)),super.disposeInternal(),delete this.indices_}}},3513:(t,e,i)=>{"use strict";i.d(e,{BV:()=>l,KQ:()=>u,XX:()=>g,aY:()=>d});var n=i(915),s=i(8711),r=i(3407),o=i(1597);let a;const l=[];function h(t,e,i,n,s){t.beginPath(),t.moveTo(0,0),t.lineTo(e,i),t.lineTo(n,s),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,n)+1,Math.max(i,s)),t.restore()}function c(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function u(t,e,i,s){const o=(0,r.pd)(i,e,t);let a=(0,r.hO)(e,s,i);const l=e.getMetersPerUnit();void 0!==l&&(a*=l);const h=t.getMetersPerUnit();void 0!==h&&(a/=h);const c=t.getExtent();if(!c||(0,n.Ym)(c,o)){const e=(0,r.hO)(t,a,o)/a;isFinite(e)&&e>0&&(a/=e)}return a}function d(t,e,i,s){const r=(0,n.q1)(i);let o=u(t,e,r,s);return(!isFinite(o)||o<=0)&&(0,n.sB)(i,(function(i){return o=u(t,e,i,s),isFinite(o)&&o>0})),o}function g(t,e,i,r,u,d,g,_,f,p,m,x,v,y){const E=(0,s.Y)(Math.round(i*t),Math.round(i*e),l);if(x||(E.imageSmoothingEnabled=!1),0===f.length)return E.canvas;function T(t){return Math.round(t*i)/i}E.scale(i,i),E.globalCompositeOperation="lighter";const A=(0,n.S5)();let C;f.forEach((function(t,e,i){(0,n.X$)(A,t.extent)}));const S=i/r,R=(x?1:1+Math.pow(2,-24))/S;if(!v||1!==f.length||0!==p){if(C=(0,s.Y)(Math.round((0,n.RG)(A)*S),Math.round((0,n.Oq)(A)*S),l),x||(C.imageSmoothingEnabled=!1),u&&y){const t=(u[0]-A[0])*S,e=-(u[3]-A[3])*S,i=(0,n.RG)(u)*S,s=(0,n.Oq)(u)*S;C.rect(t,e,i,s),C.clip()}f.forEach((function(t,e,i){const s=(t.extent[0]-A[0])*S,r=-(t.extent[3]-A[3])*S,o=(0,n.RG)(t.extent)*S,a=(0,n.Oq)(t.extent)*S;t.image.width>0&&t.image.height>0&&C.drawImage(t.image,p,p,t.image.width-2*p,t.image.height-2*p,x?s:Math.round(s),x?r:Math.round(r),x?o:Math.round(s+o)-Math.round(s),x?a:Math.round(r+a)-Math.round(r))}))}const w=(0,n.Py)(g);return _.getTriangles().forEach((function(t,e,i){const r=t.source,u=t.target;let g=r[0][0],_=r[0][1],p=r[1][0],m=r[1][1],v=r[2][0],y=r[2][1];const S=T((u[0][0]-w[0])/d),b=T(-(u[0][1]-w[1])/d),I=T((u[1][0]-w[0])/d),L=T(-(u[1][1]-w[1])/d),P=T((u[2][0]-w[0])/d),M=T(-(u[2][1]-w[1])/d),D=g,F=_;g=0,_=0,p-=D,m-=F,v-=D,y-=F;const O=[[p,m,0,0,I-S],[v,y,0,0,P-S],[0,0,p,m,L-b],[0,0,v,y,M-b]],k=(0,o.KU)(O);if(!k)return;if(E.save(),E.beginPath(),function(){if(void 0===a){const t=(0,s.Y)(6,6,l);t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",h(t,4,5,4,0),h(t,4,5,0,5);const e=t.getImageData(0,0,3,3).data;a=c(e,0)||c(e,4)||c(e,8),(0,s.Yg)(t),l.push(t.canvas)}return a}()||!x){E.moveTo(I,L);const t=4,e=S-I,i=b-L;for(let n=0;n{"use strict";i.d(e,{A:()=>_});var n=i(3101),s=i(7607),r=i(6837),o=i(1078),a=i(2913),l=i(3513),h=i(1597),c=i(8711),u=i(915),d=i(9438);class g extends s.Ay{constructor(t){super({tileCoord:t.tileCoord,loader:()=>Promise.resolve(new Uint8Array(4)),interpolate:t.interpolate,transition:t.transition}),this.pixelRatio_=t.pixelRatio,this.gutter_=t.gutter,this.reprojData_=null,this.reprojError_=null,this.reprojSize_=void 0,this.sourceTileGrid_=t.sourceTileGrid,this.targetTileGrid_=t.targetTileGrid,this.wrappedTileCoord_=t.wrappedTileCoord||t.tileCoord,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const e=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_),i=this.targetTileGrid_.getExtent();let s=this.sourceTileGrid_.getExtent();const r=i?(0,u._N)(e,i):e;if(0===(0,u.UG)(r))return void(this.state=o.A.EMPTY);const c=t.sourceProj,d=c.getExtent();d&&(s=s?(0,u._N)(s,d):d);const g=this.targetTileGrid_.getResolution(this.wrappedTileCoord_[0]),_=t.targetProj,f=(0,l.aY)(c,_,r,g);if(!isFinite(f)||f<=0)return void(this.state=o.A.EMPTY);const p=void 0!==t.errorThreshold?t.errorThreshold:n.l;if(this.triangulation_=new a.A(c,_,r,s,f*p,g),0===this.triangulation_.getTriangles().length)return void(this.state=o.A.EMPTY);this.sourceZ_=this.sourceTileGrid_.getZForResolution(f);let m=this.triangulation_.calculateSourceExtent();if(s&&(c.canWrapX()?(m[1]=(0,h.qE)(m[1],s[1],s[3]),m[3]=(0,h.qE)(m[3],s[1],s[3])):m=(0,u._N)(m,s)),(0,u.UG)(m)){const e=this.sourceTileGrid_.getTileRangeForExtentAndZ(m,this.sourceZ_),i=t.getTileFunction;for(let t=e.minX;t<=e.maxX;t++)for(let n=e.minY;n<=e.maxY;n++){const e=i(this.sourceZ_,t,n,this.pixelRatio_);e&&this.sourceTiles_.push(e)}0===this.sourceTiles_.length&&(this.state=o.A.EMPTY)}else this.state=o.A.EMPTY}getSize(){return this.reprojSize_}getData(){return this.reprojData_}getError(){return this.reprojError_}reproject_(){const t=[];if(this.sourceTiles_.forEach((e=>{if(!e||e.getState()!==o.A.LOADED)return;const i=e.getSize(),n=this.gutter_;let r;r=(0,s.bL)(e.getData())||(0,s.$r)((0,s.xo)(e.getData()));const a=[i[0]+2*n,i[1]+2*n],l=r instanceof Float32Array,h=a[0]*a[1],c=l?Float32Array:Uint8Array,u=new c(r.buffer),d=c.BYTES_PER_ELEMENT,g=d*u.length/h,_=u.byteLength/a[1],f=Math.floor(_/d/a[0]),p=h*f;let m=u;if(u.length!==p){m=new c(p);let t=0,e=0;const i=a[0]*f;for(let n=0;n=0;--e){const i=[];for(let n=0,s=t.length;n{const i=e.getState();if(i!==o.A.IDLE&&i!==o.A.LOADING)return;t++;const n=(0,d.KT)(e,r.A.CHANGE,(function(){const i=e.getState();i!=o.A.LOADED&&i!=o.A.ERROR&&i!=o.A.EMPTY||((0,d.JH)(n),t--,0===t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(n)})),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(t){t.getState()==o.A.IDLE&&t.load()}))}unlistenSources_(){this.sourcesListenerKeys_.forEach(d.JH),this.sourcesListenerKeys_=null}}const _=g},7404:(t,e,i)=>{"use strict";i.d(e,{A:()=>_});var n=i(3101),s=i(6837),r=i(8143),o=i(1078),a=i(2913),l=i(3513),h=i(1597),c=i(915),u=i(9438),d=i(8711);class g extends r.A{constructor(t,e,i,s,r,u,d,g,_,f,p,m){super(r,o.A.IDLE,m),this.renderEdges_=void 0!==p&&p,this.pixelRatio_=d,this.gutter_=g,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=s,this.wrappedTileCoord_=u||r,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const x=s.getTileCoordExtent(this.wrappedTileCoord_),v=this.targetTileGrid_.getExtent();let y=this.sourceTileGrid_.getExtent();const E=v?(0,c._N)(x,v):x;if(0===(0,c.UG)(E))return void(this.state=o.A.EMPTY);const T=t.getExtent();T&&(y=y?(0,c._N)(y,T):T);const A=s.getResolution(this.wrappedTileCoord_[0]),C=(0,l.aY)(t,i,E,A);if(!isFinite(C)||C<=0)return void(this.state=o.A.EMPTY);const S=void 0!==f?f:n.l;if(this.triangulation_=new a.A(t,i,E,y,C*S,A),0===this.triangulation_.getTriangles().length)return void(this.state=o.A.EMPTY);this.sourceZ_=e.getZForResolution(C);let R=this.triangulation_.calculateSourceExtent();if(y&&(t.canWrapX()?(R[1]=(0,h.qE)(R[1],y[1],y[3]),R[3]=(0,h.qE)(R[3],y[1],y[3])):R=(0,c._N)(R,y)),(0,c.UG)(R)){const t=e.getTileRangeForExtentAndZ(R,this.sourceZ_);for(let e=t.minX;e<=t.maxX;e++)for(let i=t.minY;i<=t.maxY;i++){const t=_(this.sourceZ_,e,i,d);t&&this.sourceTiles_.push(t)}0===this.sourceTiles_.length&&(this.state=o.A.EMPTY)}else this.state=o.A.EMPTY}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach((e=>{e&&e.getState()==o.A.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})})),this.sourceTiles_.length=0,0===t.length)this.state=o.A.ERROR;else{const e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),n="number"==typeof i?i:i[0],s="number"==typeof i?i:i[1],r=this.targetTileGrid_.getResolution(e),a=this.sourceTileGrid_.getResolution(this.sourceZ_),h=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=(0,l.XX)(n,s,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),r,h,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=o.A.LOADED}this.changed()}load(){if(this.state==o.A.IDLE){this.state=o.A.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach((e=>{const i=e.getState();if(i==o.A.IDLE||i==o.A.LOADING){t++;const i=(0,u.KT)(e,s.A.CHANGE,(function(n){const s=e.getState();s!=o.A.LOADED&&s!=o.A.ERROR&&s!=o.A.EMPTY||((0,u.JH)(i),t--,0===t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(i)}})),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(t,e,i){t.getState()==o.A.IDLE&&t.load()}))}}unlistenSources_(){this.sourcesListenerKeys_.forEach(u.JH),this.sourcesListenerKeys_=null}release(){this.canvas_&&((0,d.Yg)(this.canvas_.getContext("2d")),l.BV.push(this.canvas_),this.canvas_=null),super.release()}}const _=g},2913:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(915),s=i(3407),r=i(1597);const o=class{constructor(t,e,i,r,o,a){this.sourceProj_=t,this.targetProj_=e;let l={};const h=(0,s.RG)(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){const e=t[0]+"/"+t[1];return l[e]||(l[e]=h(t)),l[e]},this.maxSourceExtent_=r,this.errorThresholdSquared_=o*o,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!r&&!!this.sourceProj_.getExtent()&&(0,n.RG)(r)>=(0,n.RG)(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?(0,n.RG)(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?(0,n.RG)(this.targetProj_.getExtent()):null;const c=(0,n.Py)(i),u=(0,n.WU)(i),d=(0,n.k_)(i),g=(0,n.R)(i),_=this.transformInv_(c),f=this.transformInv_(u),p=this.transformInv_(d),m=this.transformInv_(g),x=10+(a?Math.max(0,Math.ceil(Math.log2((0,n.UG)(i)/(a*a*256*256)))):0);if(this.addQuad_(c,u,d,g,_,f,p,m,x),this.wrapsXInSource_){let t=1/0;this.triangles_.forEach((function(e,i,n){t=Math.min(t,e.source[0][0],e.source[1][0],e.source[2][0])})),this.triangles_.forEach((e=>{if(Math.max(e.source[0][0],e.source[1][0],e.source[2][0])-t>this.sourceWorldWidth_/2){const i=[[e.source[0][0],e.source[0][1]],[e.source[1][0],e.source[1][1]],[e.source[2][0],e.source[2][1]]];i[0][0]-t>this.sourceWorldWidth_/2&&(i[0][0]-=this.sourceWorldWidth_),i[1][0]-t>this.sourceWorldWidth_/2&&(i[1][0]-=this.sourceWorldWidth_),i[2][0]-t>this.sourceWorldWidth_/2&&(i[2][0]-=this.sourceWorldWidth_);const n=Math.min(i[0][0],i[1][0],i[2][0]);Math.max(i[0][0],i[1][0],i[2][0])-n.5&&d<1;let f=!1;if(c>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const r=(0,n.Tr)([t,e,i,s]);f=(0,n.RG)(r)/this.targetWorldWidth_>.25||f}!_&&this.sourceProj_.isGlobal()&&d&&(f=d>.25||f)}if(!f&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!(0,n.HY)(u,this.maxSourceExtent_))return;let p=0;if(!(f||isFinite(o[0])&&isFinite(o[1])&&isFinite(a[0])&&isFinite(a[1])&&isFinite(l[0])&&isFinite(l[1])&&isFinite(h[0])&&isFinite(h[1])))if(c>0)f=!0;else if(p=(isFinite(o[0])&&isFinite(o[1])?0:8)+(isFinite(a[0])&&isFinite(a[1])?0:4)+(isFinite(l[0])&&isFinite(l[1])?0:2)+(isFinite(h[0])&&isFinite(h[1])?0:1),1!=p&&2!=p&&4!=p&&8!=p)return;if(c>0){if(!f){const e=[(t[0]+i[0])/2,(t[1]+i[1])/2],n=this.transformInv_(e);let s;s=_?((0,r.xP)(o[0],g)+(0,r.xP)(l[0],g))/2-(0,r.xP)(n[0],g):(o[0]+l[0])/2-n[0];const a=(o[1]+l[1])/2-n[1];f=s*s+a*a>this.errorThresholdSquared_}if(f){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){const n=[(e[0]+i[0])/2,(e[1]+i[1])/2],r=this.transformInv_(n),u=[(s[0]+t[0])/2,(s[1]+t[1])/2],d=this.transformInv_(u);this.addQuad_(t,e,n,u,o,a,r,d,c-1),this.addQuad_(u,n,i,s,d,r,l,h,c-1)}else{const n=[(t[0]+e[0])/2,(t[1]+e[1])/2],r=this.transformInv_(n),u=[(i[0]+s[0])/2,(i[1]+s[1])/2],d=this.transformInv_(u);this.addQuad_(t,n,u,s,o,r,d,h,c-1),this.addQuad_(n,e,i,u,r,a,l,d,c-1)}return}}if(_){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}11&p||this.addTriangle_(t,i,s,o,l,h),14&p||this.addTriangle_(t,i,e,o,l,a),p&&(13&p||this.addTriangle_(e,s,t,a,h,o),7&p||this.addTriangle_(e,s,i,a,h,l))}calculateSourceExtent(){const t=(0,n.S5)();return this.triangles_.forEach((function(e,i,s){const r=e.source;(0,n.$C)(t,r[0]),(0,n.$C)(t,r[1]),(0,n.$C)(t,r[2])})),t}getTriangles(){return this.triangles_}}},3101:(t,e,i)=>{"use strict";i.d(e,{l:()=>n});const n=.5},4498:(t,e,i)=>{"use strict";i.d(e,{a$:()=>o,b8:()=>s,cq:()=>a,dv:()=>r});var n=i(1597);function s(t){if(void 0!==t)return 0}function r(t){if(void 0!==t)return t}function o(t){const e=2*Math.PI/t;return function(t,i){return i?t:void 0!==t?t=Math.floor(t/e+.5)*e:void 0}}function a(t){const e=void 0===t?(0,n.eh)(5):t;return function(t,i){return i||void 0===t?t:Math.abs(t)<=e?0:t}}},4401:(t,e,i)=>{"use strict";function n(t){return t[0]>0&&t[1]>0}function s(t,e,i){return void 0===i&&(i=[0,0]),i[0]=t[0]*e+.5|0,i[1]=t[1]*e+.5|0,i}function r(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}i.d(e,{Ie:()=>n,hs:()=>s,xq:()=>r})},6203:(t,e,i)=>{"use strict";i.d(e,{A:()=>d});var n=i(6837),s=i(6717),r=i(4294),o=i(731),a=i(6933),l=i(588),h=i(915),c=i(4087);class u extends o.A{constructor(t){super({attributions:t.attributions,wrapX:t.wrapX}),this.resolution=void 0,this.distance=void 0!==t.distance?t.distance:20,this.minDistance=t.minDistance||0,this.interpolationRatio=0,this.features=[],this.geometryFunction=t.geometryFunction||function(t){const e=t.getGeometry();return(0,l.v)(!e||"Point"===e.getType(),"The default `geometryFunction` can only handle `Point` or null geometries"),e},this.createCustomCluster_=t.createCluster,this.source=null,this.boundRefresh_=this.refresh.bind(this),this.updateDistance(this.distance,this.minDistance),this.setSource(t.source||null)}clear(t){this.features.length=0,super.clear(t)}getDistance(){return this.distance}getSource(){return this.source}loadFeatures(t,e,i){this.source.loadFeatures(t,e,i),e!==this.resolution&&(this.resolution=e,this.refresh())}setDistance(t){this.updateDistance(t,this.minDistance)}setMinDistance(t){this.updateDistance(this.distance,t)}getMinDistance(){return this.minDistance}setSource(t){this.source&&this.source.removeEventListener(n.A.CHANGE,this.boundRefresh_),this.source=t,t&&t.addEventListener(n.A.CHANGE,this.boundRefresh_),this.refresh()}refresh(){this.clear(),this.cluster(),this.addFeatures(this.features)}updateDistance(t,e){const i=0===t?0:Math.min(e,t)/t,n=t!==this.distance||this.interpolationRatio!==i;this.distance=t,this.minDistance=e,this.interpolationRatio=i,n&&this.refresh()}cluster(){if(void 0===this.resolution||!this.source)return;const t=(0,h.S5)(),e=this.distance*this.resolution,i=this.source.getFeatures(),n={};for(let s=0,r=i.length;s=0;--e){const n=this.geometryFunction(t[e]);n?(0,a.WQ)(i,n.getCoordinates()):t.splice(e,1)}(0,a.hs)(i,1/t.length);const n=(0,h.q1)(e),o=this.interpolationRatio,l=new r.A([i[0]*(1-o)+n[0]*o,i[1]*(1-o)+n[1]*o]);return this.createCustomCluster_?this.createCustomCluster_(l,t):new s.A({geometry:l,features:t})}}const d=u},9925:(t,e,i)=>{"use strict";i.d(e,{Ay:()=>C,VV:()=>T,QD:()=>A});var n=i(1685),s=i(6837),r=i(6141),o=i(3938),a=i(3101),l=i(2913),h=i(3513);function c(t){return Array.isArray(t)?Math.min(...t):t}var u=i(915),d=i(9438);class g extends o.Ay{constructor(t,e,i,n,s,o,c){let d=t.getExtent();d&&t.canWrapX()&&(d=d.slice(),d[0]=-1/0,d[2]=1/0);let g=e.getExtent();g&&e.canWrapX()&&(g=g.slice(),g[0]=-1/0,g[2]=1/0);const _=g?(0,u._N)(i,g):i,f=(0,u.q1)(_),p=(0,h.KQ)(t,e,f,n),m=a.l,x=new l.A(t,e,_,d,p*m,n),v=x.calculateSourceExtent(),y=(0,u.Im)(v)?null:o(v,p,s),E=y?r.A.IDLE:r.A.EMPTY,T=y?y.getPixelRatio():1;super(i,n,T,E),this.targetProj_=e,this.maxSourceExtent_=d,this.triangulation_=x,this.targetResolution_=n,this.targetExtent_=i,this.sourceImage_=y,this.sourcePixelRatio_=T,this.interpolate_=c,this.canvas_=null,this.sourceListenerKey_=null}disposeInternal(){this.state==r.A.LOADING&&this.unlistenSource_(),super.disposeInternal()}getImage(){return this.canvas_}getProjection(){return this.targetProj_}reproject_(){const t=this.sourceImage_.getState();if(t==r.A.LOADED){const t=(0,u.RG)(this.targetExtent_)/this.targetResolution_,e=(0,u.Oq)(this.targetExtent_)/this.targetResolution_;this.canvas_=(0,h.XX)(t,e,this.sourcePixelRatio_,c(this.sourceImage_.getResolution()),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.interpolate_,!0)}this.state=t,this.changed()}load(){if(this.state==r.A.IDLE){this.state=r.A.LOADING,this.changed();const t=this.sourceImage_.getState();t==r.A.LOADED||t==r.A.ERROR?this.reproject_():(this.sourceListenerKey_=(0,d.KT)(this.sourceImage_,s.A.CHANGE,(function(t){const e=this.sourceImage_.getState();e!=r.A.LOADED&&e!=r.A.ERROR||(this.unlistenSource_(),this.reproject_())}),this),this.sourceImage_.load())}}unlistenSource_(){(0,d.JH)(this.sourceListenerKey_),this.sourceListenerKey_=null}}const _=g;var f=i(6444),p=i(2192),m=i(1597),x=i(3407),v=i(6514);class y extends n.Ay{constructor(t,e){super(t),this.image=e}}class E extends f.A{constructor(t){super({attributions:t.attributions,projection:t.projection,state:t.state,interpolate:void 0===t.interpolate||t.interpolate}),this.on,this.once,this.un,this.loader=t.loader||null,this.resolutions_=void 0!==t.resolutions?t.resolutions:null,this.reprojectedImage_=null,this.reprojectedRevision_=0,this.image=null,this.wantedExtent_,this.wantedResolution_,this.static_=!!t.loader&&0===t.loader.length,this.wantedProjection_=null}getResolutions(){return this.resolutions_}setResolutions(t){this.resolutions_=t}findNearestResolution(t){const e=this.getResolutions();return e&&(t=e[(0,v.FT)(e,t,0)]),t}getImage(t,e,i,n){const s=this.getProjection();if(!s||!n||(0,x.tI)(s,n))return s&&(n=s),this.getImageInternal(t,e,i,n);if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&(0,x.tI)(this.reprojectedImage_.getProjection(),n)&&this.reprojectedImage_.getResolution()==e&&(0,u.aI)(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new _(s,n,t,e,i,((t,e,i)=>this.getImageInternal(t,e,i,s)),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}getImageInternal(t,e,i,n){if(this.loader){const r=A(t,e,i,1),a=this.findNearestResolution(e);if(this.image&&(this.static_||this.wantedProjection_===n&&(this.wantedExtent_&&(0,u.ms)(this.wantedExtent_,r)||(0,u.ms)(this.image.getExtent(),r))&&(this.wantedResolution_&&c(this.wantedResolution_)===a||c(this.image.getResolution())===a)))return this.image;this.wantedProjection_=n,this.wantedExtent_=r,this.wantedResolution_=a,this.image=new o.Ay(r,a,i,this.loader),this.image.addEventListener(s.A.CHANGE,this.handleImageChange.bind(this))}return this.image}handleImageChange(t){const e=t.target;let i;switch(e.getState()){case r.A.LOADING:this.loading=!0,i="imageloadstart";break;case r.A.LOADED:this.loading=!1,i="imageloadend";break;case r.A.ERROR:this.loading=!1,i="imageloaderror";break;default:return}this.hasListener(i)&&this.dispatchEvent(new y(i,e))}}function T(t,e){t.getImage().src=e}function A(t,e,i,n){const s=e/i,r=(0,u.q1)(t),o=(0,m.mk)((0,u.RG)(t)/s,p.B),a=(0,m.mk)((0,u.Oq)(t)/s,p.B),l=o+2*(0,m.mk)((n-1)*o/2,p.B),h=a+2*(0,m.mk)((n-1)*a/2,p.B);return(0,u.Bg)(r,s,0,[l,h])}const C=E},8270:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(6837),s=i(9925),r=i(3938),o=i(915),a=i(3407);class l extends s.Ay{constructor(t){const e=void 0!==t.crossOrigin?t.crossOrigin:null,i=void 0!==t.imageLoadFunction?t.imageLoadFunction:s.VV;super({attributions:t.attributions,interpolate:t.interpolate,projection:(0,a.Jt)(t.projection)}),this.url_=t.url,this.imageExtent_=t.imageExtent,this.image=null,this.image=new r.Ay(this.imageExtent_,void 0,1,function(t){const e=t.load||r.D4,i=t.imageExtent,n=new Image;return null!==t.crossOrigin&&(n.crossOrigin=t.crossOrigin),()=>e(n,t.url).then((t=>{const e=(0,o.RG)(i)/t.width,n=(0,o.Oq)(i)/t.height;return{image:t,extent:i,resolution:e!==n?[e,n]:n,pixelRatio:1}}))}({url:t.url,imageExtent:t.imageExtent,crossOrigin:e,load:(t,e)=>(this.image.setImage(t),i(this.image,e),(0,r.D4)(t))})),this.image.addEventListener(n.A.CHANGE,this.handleImageChange.bind(this))}getImageExtent(){return this.imageExtent_}getImageInternal(t,e,i,n){return(0,o.HY)(t,this.image.getExtent())?this.image:null}getUrl(){return this.url_}}const h=l},1011:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(9925),s=i(3513),r=i(7500),o=i(3938),a=i(3407);class l extends n.Ay{constructor(t){super({attributions:(t=t||{}).attributions,interpolate:t.interpolate,projection:t.projection,resolutions:t.resolutions}),this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null,this.url_=t.url,this.imageLoadFunction_=void 0!==t.imageLoadFunction?t.imageLoadFunction:n.VV,this.params_=Object.assign({},t.params),this.serverType_=t.serverType,this.hidpi_=void 0===t.hidpi||t.hidpi,this.renderedRevision_=0,this.ratio_=void 0!==t.ratio?t.ratio:1.5,this.loaderProjection_=null}getFeatureInfoUrl(t,e,i,n){const o=(0,a.Jt)(i),l=this.getProjection();l&&l!==o&&(e=(0,s.KQ)(l,o,t,e),t=(0,a.pd)(t,o,l));const h={url:this.url_,params:{...this.params_,...n},projection:l||o};return(0,r.y4)(h,t,e)}getLegendUrl(t,e){return(0,r.$q)({url:this.url_,params:{...this.params_,...e}},t)}getParams(){return this.params_}getImageInternal(t,e,i,n){return void 0===this.url_?null:(this.loader&&this.loaderProjection_===n||(this.loaderProjection_=n,this.loader=(0,r.Eq)({crossOrigin:this.crossOrigin_,params:this.params_,projection:n,serverType:this.serverType_,hidpi:this.hidpi_,url:this.url_,ratio:this.ratio_,load:(t,e)=>(this.image.setImage(t),this.imageLoadFunction_(this.image,e),(0,o.D4)(t))})),super.getImageInternal(t,e,i,n))}getImageLoadFunction(){return this.imageLoadFunction_}getUrl(){return this.url_}setImageLoadFunction(t){this.imageLoadFunction_=t,this.changed()}setUrl(t){t!=this.url_&&(this.url_=t,this.loader=null,this.changed())}updateParams(t){Object.assign(this.params_,t),this.changed()}changed(){this.image=null,super.changed()}}const h=l},7896:(t,e,i)=>{"use strict";i.d(e,{A:()=>o,o:()=>s});var n=i(702);const s='© OpenStreetMap contributors.';class r extends n.A{constructor(t){let e;e=void 0!==(t=t||{}).attributions?t.attributions:[s];const i=void 0!==t.crossOrigin?t.crossOrigin:"anonymous",n=void 0!==t.url?t.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:e,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:i,interpolate:t.interpolate,maxZoom:void 0!==t.maxZoom?t.maxZoom:19,opaque:void 0===t.opaque||t.opaque,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:n,wrapX:t.wrapX,zDirection:t.zDirection})}}const o=r},6444:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(4120),s=i(3407);class r extends n.A{constructor(t){super(),this.projection=(0,s.Jt)(t.projection),this.attributions_=o(t.attributions),this.attributionsCollapsible_=void 0===t.attributionsCollapsible||t.attributionsCollapsible,this.loading=!1,this.state_=void 0!==t.state?t.state:"ready",this.wrapX_=void 0!==t.wrapX&&t.wrapX,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const e=this;this.viewPromise_=new Promise((function(t,i){e.viewResolver=t,e.viewRejector=i}))}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(t){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=o(t),this.changed()}setState(t){this.state_=t,this.changed()}}function o(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}const a=r},6017:(t,e,i)=>{"use strict";i.d(e,{A:()=>f,c:()=>_});var n=i(1685),s=i(6444),r=i(61),o=i(1078),a=i(4087),l=i(588),h=i(3407),c=i(186),u=i(4863),d=i(4401);class g extends s.A{constructor(t){super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:t.projection,state:t.state,wrapX:t.wrapX,interpolate:t.interpolate}),this.on,this.once,this.un,this.opaque_=void 0!==t.opaque&&t.opaque,this.tilePixelRatio_=void 0!==t.tilePixelRatio?t.tilePixelRatio:1,this.tileGrid=void 0!==t.tileGrid?t.tileGrid:null;this.tileGrid&&(0,d.xq)(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),[256,256]),this.tileCache=new r.A(t.cacheSize||0),this.tmpSize=[0,0],this.key_=t.key||"",this.tileOptions={transition:t.transition,interpolate:t.interpolate},this.zDirection=t.zDirection?t.zDirection:0}canExpireCache(){return this.tileCache.canExpireCache()}expireCache(t,e){const i=this.getTileCacheForProjection(t);i&&i.expireCache(e)}forEachLoadedTile(t,e,i,n){const s=this.getTileCacheForProjection(t);if(!s)return!1;let r,a,l,h=!0;for(let t=i.minX;t<=i.maxX;++t)for(let u=i.minY;u<=i.maxY;++u)a=(0,c.dp)(e,t,u),l=!1,s.containsKey(a)&&(r=s.get(a),l=r.getState()===o.A.LOADED,l&&(l=!1!==n(r))),l||(h=!1);return h}getGutterForProjection(t){return 0}getKey(){return this.key_}setKey(t){this.key_!==t&&(this.key_=t,this.changed())}getOpaque(t){return this.opaque_}getResolutions(t){const e=t?this.getTileGridForProjection(t):this.tileGrid;return e?e.getResolutions():null}getTile(t,e,i,n,s){return(0,a.b0)()}getTileGrid(){return this.tileGrid}getTileGridForProjection(t){return this.tileGrid?this.tileGrid:(0,u.pr)(t)}getTileCacheForProjection(t){const e=this.getProjection();return(0,l.v)(null===e||(0,h.tI)(e,t),"A VectorTile source can only be rendered if it has a projection compatible with the view projection."),this.tileCache}getTilePixelRatio(t){return this.tilePixelRatio_}getTilePixelSize(t,e,i){const n=this.getTileGridForProjection(i),s=this.getTilePixelRatio(e),r=(0,d.xq)(n.getTileSize(t),this.tmpSize);return 1==s?r:(0,d.hs)(r,s,this.tmpSize)}getTileCoordForTileUrlFunction(t,e){e=void 0!==e?e:this.getProjection();const i=this.getTileGridForProjection(e);return this.getWrapX()&&e.isGlobal()&&(t=(0,u.Li)(i,t,e)),(0,c.N5)(t,i)?t:null}clear(){this.tileCache.clear()}refresh(){this.clear(),super.refresh()}updateCacheSize(t,e){const i=this.getTileCacheForProjection(e);t>i.highWaterMark&&(i.highWaterMark=t)}useTile(t,e,i,n){}}class _ extends n.Ay{constructor(t,e){super(t),this.tile=e}}const f=g},8469:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"}},8512:(t,e,i)=>{"use strict";i.d(e,{A:()=>f});var n=i(6837),s=i(190),r=i(7404),o=i(61),a=i(1078),l=i(6164),h=i(3407),c=i(186),u=i(4863),d=i(4087);class g extends l.A{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:_,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,interpolate:void 0===t.interpolate||t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.crossOrigin=void 0!==t.crossOrigin?t.crossOrigin:null,this.tileClass=void 0!==t.tileClass?t.tileClass:s.A,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=t.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}canExpireCache(){if(this.tileCache.canExpireCache())return!0;for(const t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1}expireCache(t,e){const i=this.getTileCacheForProjection(t);this.tileCache.expireCache(this.tileCache==i?e:{});for(const t in this.tileCacheForProjection){const n=this.tileCacheForProjection[t];n.expireCache(n==i?e:{})}}getGutterForProjection(t){return this.getProjection()&&t&&!(0,h.tI)(this.getProjection(),t)?0:this.getGutter()}getGutter(){return 0}getKey(){let t=super.getKey();return this.getInterpolate()||(t+=":disable-interpolation"),t}getOpaque(t){return!(this.getProjection()&&t&&!(0,h.tI)(this.getProjection(),t))&&super.getOpaque(t)}getTileGridForProjection(t){const e=this.getProjection();if(this.tileGrid&&(!e||(0,h.tI)(e,t)))return this.tileGrid;const i=(0,d.v6)(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=(0,u.pr)(t)),this.tileGridForProjection[i]}getTileCacheForProjection(t){const e=this.getProjection();if(!e||(0,h.tI)(e,t))return this.tileCache;const i=(0,d.v6)(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new o.A(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]}createTile_(t,e,i,s,r,o){const l=[t,e,i],h=this.getTileCoordForTileUrlFunction(l,r),c=h?this.tileUrlFunction(h,s,r):void 0,u=new this.tileClass(l,void 0!==c?a.A.IDLE:a.A.EMPTY,void 0!==c?c:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=o,u.addEventListener(n.A.CHANGE,this.handleTileChange.bind(this)),u}getTile(t,e,i,n,s){const o=this.getProjection();if(!o||!s||(0,h.tI)(o,s))return this.getTileInternal(t,e,i,n,o||s);const a=this.getTileCacheForProjection(s),l=[t,e,i];let u;const d=(0,c.i7)(l);a.containsKey(d)&&(u=a.get(d));const g=this.getKey();if(u&&u.key==g)return u;const _=this.getTileGridForProjection(o),f=this.getTileGridForProjection(s),p=this.getTileCoordForTileUrlFunction(l,s),m=new r.A(o,_,s,f,l,p,this.getTilePixelRatio(n),this.getGutter(),((t,e,i,n)=>this.getTileInternal(t,e,i,n,o)),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return m.key=g,u?(m.interimTile=u,m.refreshInterimChain(),a.replace(d,m)):a.set(d,m),m}getTileInternal(t,e,i,n,s){let r=null;const o=(0,c.dp)(t,e,i),l=this.getKey();if(this.tileCache.containsKey(o)){if(r=this.tileCache.get(o),r.key!=l){const h=r;r=this.createTile_(t,e,i,n,s,l),h.getState()==a.A.IDLE?r.interimTile=h.interimTile:r.interimTile=h,r.refreshInterimChain(),this.tileCache.replace(o,r)}}else r=this.createTile_(t,e,i,n,s,l),this.tileCache.set(o,r);return r}setRenderReprojectionEdges(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear();this.changed()}}setTileGridForProjection(t,e){const i=(0,h.Jt)(t);if(i){const t=(0,d.v6)(i);t in this.tileGridForProjection||(this.tileGridForProjection[t]=e)}}clear(){super.clear();for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}}function _(t,e){t.getImage().src=e}const f=g},4218:(t,e,i)=>{"use strict";i.d(e,{A:()=>c});var n=i(8512),s=i(915),r=i(2654),o=i(4863),a=i(3407),l=i(4087);Error,Error;class h extends n.A{constructor(t){if(super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:(0,a.Jt)("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.tileJSON_=null,this.tileSize_=t.tileSize,t.url)if(t.jsonp)!function(t,e,i,n){const s=document.createElement("script"),r="olc_"+(0,l.v6)(e);function o(){delete window[r],s.parentNode.removeChild(s)}s.async=!0,s.src=t+(t.includes("?")?"&":"?")+"callback="+r;const a=setTimeout((function(){o(),i&&i()}),1e4);window[r]=function(t){clearTimeout(a),o(),e(t)},document.head.appendChild(s)}(t.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{const e=new XMLHttpRequest;e.addEventListener("load",this.onXHRLoad_.bind(this)),e.addEventListener("error",this.onXHRError_.bind(this)),e.open("GET",t.url),e.send()}else{if(!t.tileJSON)throw new Error("Either `url` or `tileJSON` options must be provided");this.handleTileJSONResponse(t.tileJSON)}}onXHRLoad_(t){const e=t.target;if(!e.status||e.status>=200&&e.status<300){let t;try{t=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(t)}else this.handleTileJSONError()}onXHRError_(t){this.handleTileJSONError()}getTileJSON(){return this.tileJSON_}handleTileJSONResponse(t){const e=(0,a.Jt)("EPSG:4326"),i=this.getProjection();let n;if(void 0!==t.bounds){const r=(0,a.FO)(e,i);n=(0,s.NW)(t.bounds,r)}const l=(0,o.kZ)(i),h=t.minzoom||0,c=t.maxzoom||22,u=(0,o.EN)({extent:l,maxZoom:c,minZoom:h,tileSize:this.tileSize_});if(this.tileGrid=u,this.tileUrlFunction=(0,r.Qz)(t.tiles,u),t.attribution&&!this.getAttributions()){const e=void 0!==n?n:l;this.setAttributions((function(i){return(0,s.HY)(e,i.extent)?[t.attribution]:null}))}this.tileJSON_=t,this.setState("ready")}handleTileJSONError(){this.setState("error")}}const c=h},2728:(t,e,i)=>{"use strict";i.d(e,{A:()=>g});var n=i(8512),s=i(7500),r=i(4465),o=i(915),a=i(3513),l=i(2806),h=i(3407),c=i(1597),u=i(186);class d extends n.A{constructor(t){t=t||{};const e=Object.assign({},t.params),i=!("TRANSPARENT"in e)||e.TRANSPARENT;super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:!i,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.gutter_=void 0!==t.gutter?t.gutter:0,this.params_=e,this.v13_=!0,this.serverType_=t.serverType,this.hidpi_=void 0===t.hidpi||t.hidpi,this.tmpExtent_=(0,o.S5)(),this.updateV13_(),this.setKey(this.getKeyForParams_())}getFeatureInfoUrl(t,e,i,n){const r=(0,h.Jt)(i),l=this.getProjection()||r;let c=this.getTileGrid();c||(c=this.getTileGridForProjection(l));const u=(0,h.pd)(t,r,l),d=(0,a.KQ)(l,r,t,e),g=c.getZForResolution(d,this.zDirection),_=c.getResolution(g),f=c.getTileCoordForCoordAndZ(u,g);if(c.getResolutions().length<=f[0])return;let p=c.getTileCoordExtent(f,this.tmpExtent_);const m=this.gutter_;0!==m&&(p=(0,o.r)(p,_*m,p));const x={QUERY_LAYERS:this.params_.LAYERS};Object.assign(x,(0,s.W3)(this.params_,"GetFeatureInfo"),n);const v=Math.floor((u[0]-p[0])/_),y=Math.floor((p[3]-u[1])/_);return x[this.v13_?"I":"X"]=v,x[this.v13_?"J":"Y"]=y,this.getRequestUrl_(f,p,1,l||r,x)}getLegendUrl(t,e){if(void 0===this.urls[0])return;const i={SERVICE:"WMS",VERSION:s.jD,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){const t=this.params_.LAYERS;if(Array.isArray(t)&&1!==t.length)return;i.LAYER=t}if(void 0!==t){const e=this.getProjection()?this.getProjection().getMetersPerUnit():1,n=28e-5;i.SCALE=t*e/n}return Object.assign(i,e),(0,r.L)(this.urls[0],i)}getGutter(){return this.gutter_}getParams(){return this.params_}getRequestUrl_(t,e,i,n,r){const o=this.urls;if(!o)return;let a;return a=1==o.length?o[0]:o[(0,c.xP)((0,u.tW)(t),o.length)],(0,s.AE)(e,(this.tileGrid||this.getTileGridForProjection(n)).getResolution(t[0]),i,n,a,r,this.serverType_)}getTilePixelRatio(t){return this.hidpi_&&void 0!==this.serverType_?t:1}getKeyForParams_(){let t=0;const e=[];for(const i in this.params_)e[t++]=i+"-"+this.params_[i];return e.join("/")}updateParams(t){Object.assign(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())}updateV13_(){const t=this.params_.VERSION||s.jD;this.v13_=(0,l.Z)(t,"1.3")>=0}tileUrlFunction(t,e,i){let n=this.getTileGrid();if(n||(n=this.getTileGridForProjection(i)),n.getResolutions().length<=t[0])return;1==e||this.hidpi_&&void 0!==this.serverType_||(e=1);const r=n.getResolution(t[0]);let a=n.getTileCoordExtent(t,this.tmpExtent_);const l=this.gutter_;0!==l&&(a=(0,o.r)(a,r*l,a));const h=Object.assign({},(0,s.W3)(this.params_,"GetMap"));return this.getRequestUrl_(t,a,e,i,h)}}const g=d},6164:(t,e,i)=>{"use strict";i.d(e,{A:()=>c});var n=i(8469),s=i(6017),r=i(1078),o=i(2654),a=i(186),l=i(4087);class h extends s.A{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.generateTileUrlFunction_=this.tileUrlFunction===h.prototype.tileUrlFunction,this.tileLoadFunction=t.tileLoadFunction,t.tileUrlFunction&&(this.tileUrlFunction=t.tileUrlFunction),this.urls=null,t.urls?this.setUrls(t.urls):t.url&&this.setUrl(t.url),this.tileLoadingKeys_={}}getTileLoadFunction(){return this.tileLoadFunction}getTileUrlFunction(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction}getUrls(){return this.urls}handleTileChange(t){const e=t.target,i=(0,l.v6)(e),o=e.getState();let a;o==r.A.LOADING?(this.tileLoadingKeys_[i]=!0,a=n.A.TILELOADSTART):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],a=o==r.A.ERROR?n.A.TILELOADERROR:o==r.A.LOADED?n.A.TILELOADEND:void 0),null!=a&&this.dispatchEvent(new s.c(a,e))}setTileLoadFunction(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()}setTileUrlFunction(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()}setUrl(t){const e=(0,o.Uu)(t);this.urls=e,this.setUrls(e)}setUrls(t){this.urls=t;const e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction((0,o.Qz)(t,this.tileGrid),e):this.setKey(e)}tileUrlFunction(t,e,i){}useTile(t,e,i){const n=(0,a.dp)(t,e,i);this.tileCache.containsKey(n)&&this.tileCache.get(n)}}const c=h},731:(t,e,i)=>{"use strict";i.d(e,{A:()=>A});var n=i(71),s=i(2135),r=i(1685),o=i(6837),a=i(8450),l=i(5902),h=i(4778),c=i(6444),u=i(8280),d=i(4238);function g(t,e){return[[-1/0,-1/0,1/0,1/0]]}i(3407);var _=i(588),f=i(915),p=i(6514),m=i(4087),x=i(3530),v=i(9438),y=i(1142);class E extends r.Ay{constructor(t,e,i){super(t),this.feature=e,this.features=i}}class T extends c.A{constructor(t){super({attributions:(t=t||{}).attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:void 0===t.wrapX||t.wrapX}),this.on,this.once,this.un,this.loader_=d.tV,this.format_=t.format,this.overlaps_=void 0===t.overlaps||t.overlaps,this.url_=t.url,void 0!==t.loader?this.loader_=t.loader:void 0!==this.url_&&((0,_.v)(this.format_,"`format` must be set when `url` is set"),this.loader_=(0,y.nF)(this.url_,this.format_)),this.strategy_=void 0!==t.strategy?t.strategy:g;const e=void 0===t.useSpatialIndex||t.useSpatialIndex;let i,s;this.featuresRtree_=e?new l.A:null,this.loadedExtentsRtree_=new l.A,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null,Array.isArray(t.features)?s=t.features:t.features&&(i=t.features,s=i.getArray()),e||void 0!==i||(i=new n.A(s)),void 0!==s&&this.addFeaturesInternal(s),void 0!==i&&this.bindFeaturesCollection_(i)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=(0,m.v6)(t);if(!this.addToIndex_(e,t))return void(this.featuresCollection_&&this.featuresCollection_.remove(t));this.setupChangeEvents_(e,t);const i=t.getGeometry();if(i){const e=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(e,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new E(u.A.ADDFEATURE,t))}setupChangeEvents_(t,e){e instanceof h.Ay||(this.featureChangeKeys_[t]=[(0,v.KT)(e,o.A.CHANGE,this.handleFeatureChange_,this),(0,v.KT)(e,a.A.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(t,e){let i=!0;if(void 0!==e.getId()){const t=String(e.getId());if(t in this.idIndex_)if(e instanceof h.Ay){const n=this.idIndex_[t];n instanceof h.Ay?Array.isArray(n)?n.push(e):this.idIndex_[t]=[n,e]:i=!1}else i=!1;else this.idIndex_[t]=e}return i&&((0,_.v)(!(t in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[t]=e),i}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],i=[],n=[];for(let e=0,n=t.length;e{e||(e=!0,this.addFeature(t.element),e=!1)})),t.addEventListener(s.A.REMOVE,(t=>{e||(e=!0,this.removeFeature(t.element),e=!1)})),this.featuresCollection_=t}clear(t){if(t){for(const t in this.featureChangeKeys_)this.featureChangeKeys_[t].forEach(v.JH);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const t=t=>{this.removeFeatureInternal(t)};this.featuresRtree_.forEach(t);for(const t in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[t])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new E(u.A.CLEAR);this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,(function(i){const n=i.getGeometry();if(n instanceof h.Ay||n.intersectsCoordinate(t))return e(i)}))}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,(function(i){const n=i.getGeometry();if(n instanceof h.Ay||n.intersectsExtent(t)){const t=e(i);if(t)return t}}))}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),(0,x.p)(this.nullGeometryFeatures_)||(0,p.X$)(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){e.push(t)})),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const i=(0,f.QJ)(t,e);return[].concat(...i.map((t=>this.featuresRtree_.getInExtent(t))))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const i=t[0],n=t[1];let s=null;const r=[NaN,NaN];let o=1/0;const a=[-1/0,-1/0,1/0,1/0];return e=e||d.rT,this.featuresRtree_.forEachInExtent(a,(function(t){if(e(t)){const e=t.getGeometry(),l=o;if(o=e instanceof h.Ay?0:e.closestPointXY(i,n,r,o),o{--this.loadingExtentsCount_,this.dispatchEvent(new E(u.A.FEATURESLOADEND,void 0,t))}),(()=>{--this.loadingExtentsCount_,this.dispatchEvent(new E(u.A.FEATURESLOADERROR))})),n.insert(r,{extent:r.slice()}))}this.loading=!(this.loader_.length<4)&&this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let i;e.forEachInExtent(t,(function(e){if((0,f.aI)(e.extent,t))return i=e,!0})),i&&e.remove(i)}removeFeatures(t){const e=[];for(let i=0,n=t.length;i0&&this.changed()}removeFeature(t){t&&this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=(0,m.v6)(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t);const i=this.featureChangeKeys_[e];if(!i)return;i.forEach(v.JH),delete this.featureChangeKeys_[e];const n=t.getId();return void 0!==n&&delete this.idIndex_[n.toString()],delete this.uidIndex_[e],this.hasListener(u.A.REMOVEFEATURE)&&this.dispatchEvent(new E(u.A.REMOVEFEATURE,t)),t}removeFromIdIndex_(t){let e=!1;for(const i in this.idIndex_){const n=this.idIndex_[i];if(t instanceof h.Ay&&Array.isArray(n)&&n.includes(t))n.splice(n.indexOf(t),1);else if(this.idIndex_[i]===t){delete this.idIndex_[i],e=!0;break}}return e}setLoader(t){this.loader_=t}setUrl(t){(0,_.v)(this.format_,"`format` must be set when `url` is set"),this.url_=t,this.setLoader((0,y.nF)(t,this.format_))}}const A=T},8280:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"}},5620:(t,e,i)=>{"use strict";i.d(e,{A:()=>C});var n=i(6837),s=i(8143),r=i(1078);class o extends s.A{constructor(t,e,i,n,s,r){super(t,e,r),this.extent=null,this.format_=n,this.features_=null,this.loader_,this.projection=null,this.resolution,this.tileLoadFunction_=s,this.url_=i,this.key=i}getFormat(){return this.format_}getFeatures(){return this.features_}load(){this.state==r.A.IDLE&&(this.setState(r.A.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))}onLoad(t,e){this.setFeatures(t)}onError(){this.setState(r.A.ERROR)}setFeatures(t){this.features_=t,this.setState(r.A.LOADED)}setLoader(t){this.loader_=t}}const a=o;var l=i(61),h=i(6758),c=i(6164),u=i(8711),d=i(4087);const g=[];class _ extends s.A{constructor(t,e,i,n){super(t,e,{transition:0}),this.context_={},this.executorGroups={},this.loadingSourceTiles=0,this.hitDetectionImageData={},this.replayState_={},this.sourceTiles=[],this.errorTileKeys={},this.wantedResolution,this.getSourceTiles=n.bind(void 0,this),this.wrappedTileCoord=i}getContext(t){const e=(0,d.v6)(t);return e in this.context_||(this.context_[e]=(0,u.Y)(1,1,g)),this.context_[e]}hasContext(t){return(0,d.v6)(t)in this.context_}getImage(t){return this.hasContext(t)?this.getContext(t).canvas:null}getReplayState(t){const e=(0,d.v6)(t);return e in this.replayState_||(this.replayState_[e]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[e]}load(){this.getSourceTiles()}release(){for(const t in this.context_){const e=this.context_[t];(0,u.Yg)(e),g.push(e.canvas),delete this.context_[t]}super.release()}}const f=_;var p=i(9496),m=i(915),x=i(4863),v=i(186),y=i(3530),E=i(1142),T=i(4401);class A extends c.A{constructor(t){const e=t.projection||"EPSG:3857",i=t.extent||(0,x.kZ)(e),n=t.tileGrid||(0,x.EN)({extent:i,maxResolution:t.maxResolution,maxZoom:void 0!==t.maxZoom?t.maxZoom:22,minZoom:t.minZoom,tileSize:t.tileSize||512});super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,interpolate:!0,opaque:!1,projection:e,state:t.state,tileGrid:n,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:S,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:void 0===t.zDirection?1:t.zDirection}),this.format_=t.format?t.format:null,this.sourceTileCache=new l.A(this.tileCache.highWaterMark),this.overlaps_=null==t.overlaps||t.overlaps,this.tileClass=t.tileClass?t.tileClass:a,this.tileGrids_={}}getFeaturesInExtent(t){const e=[],i=this.tileCache;if(0===i.getCount())return e;const n=(0,v.K)(i.peekFirstKey())[0],s=this.tileGrid;return i.forEach((function(i){if(i.tileCoord[0]!==n||i.getState()!==r.A.LOADED)return;const o=i.getSourceTiles();for(let i=0,n=o.length;i{const n=(0,v.gr)(e),s=i.peek(n);if(s){const e=s.sourceTiles;for(let i=0,n=e.length;i{const o=this.tileUrlFunction(s,t,e),a=this.sourceTileCache.containsKey(o)?this.sourceTileCache.get(o):new this.tileClass(s,o?r.A.IDLE:r.A.EMPTY,o,this.format_,this.tileLoadFunction);i.sourceTiles.push(a);const l=a.getState();if(l{this.handleTileChange(e);const s=a.getState();if(s===r.A.LOADED||s===r.A.ERROR){const e=a.getKey();e in i.errorTileKeys?a.getState()===r.A.LOADED&&delete i.errorTileKeys[e]:i.loadingSourceTiles--,s===r.A.ERROR?i.errorTileKeys[e]=!0:a.removeEventListener(n.A.CHANGE,t),0===i.loadingSourceTiles&&i.setState((0,y.p)(i.errorTileKeys)?r.A.LOADED:r.A.ERROR)}};a.addEventListener(n.A.CHANGE,t),i.loadingSourceTiles++}l===r.A.IDLE&&(a.extent=c.getTileCoordExtent(s),a.projection=e,a.resolution=c.getResolution(s[0]),this.sourceTileCache.set(o,a),a.load())})),i.loadingSourceTiles||i.setState(i.sourceTiles.some((t=>t.getState()===r.A.ERROR))?r.A.ERROR:r.A.LOADED)}return i.sourceTiles}getTile(t,e,i,n,s){const o=(0,v.dp)(t,e,i),a=this.getKey();let l;if(this.tileCache.containsKey(o)&&(l=this.tileCache.get(o),l.key===a))return l;const h=[t,e,i];let c=this.getTileCoordForTileUrlFunction(h,s);const u=this.getTileGrid().getExtent(),d=this.getTileGridForProjection(s);if(c&&u){const e=d.getTileCoordExtent(c);(0,m.r)(e,-d.getResolution(t),e),(0,m.HY)(u,e)||(c=null)}let g=!0;if(null!==c){const e=this.tileGrid,i=d.getResolution(t),r=e.getZForResolution(i,1),o=d.getTileCoordExtent(c);(0,m.r)(o,-i,o),e.forEachTileCoord(o,r,(t=>{g=g&&!this.tileUrlFunction(t,n,s)}))}const _=new f(h,g?r.A.EMPTY:r.A.IDLE,c,this.getSourceTiles.bind(this,n,s));return _.key=a,l?(_.interimTile=l,_.refreshInterimChain(),this.tileCache.replace(o,_)):this.tileCache.set(o,_),_}getTileGridForProjection(t){const e=t.getCode();let i=this.tileGrids_[e];if(!i){const t=this.tileGrid,n=t.getResolutions().slice(),s=n.map((function(e,i){return t.getOrigin(i)})),r=n.map((function(e,i){return t.getTileSize(i)})),o=p.L+1;for(let t=n.length;t{"use strict";i.d(e,{A:()=>u,t:()=>d});var n=i(8512),s=i(4465),r=i(915),o=i(6758),a=i(3407);class l extends o.A{constructor(t){super({extent:t.extent,origin:t.origin,origins:t.origins,resolutions:t.resolutions,tileSize:t.tileSize,tileSizes:t.tileSizes,sizes:t.sizes}),this.matrixIds_=t.matrixIds}getMatrixId(t){return this.matrixIds_[t]}getMatrixIds(){return this.matrixIds_}}var h=i(2654);class c extends n.A{constructor(t){const e=void 0!==t.requestEncoding?t.requestEncoding:"KVP",i=t.tileGrid;let n=t.urls;void 0===n&&void 0!==t.url&&(n=(0,h.Uu)(t.url)),super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:i,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,urls:n,wrapX:void 0!==t.wrapX&&t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.version_=void 0!==t.version?t.version:"1.0.0",this.format_=void 0!==t.format?t.format:"image/jpeg",this.dimensions_=void 0!==t.dimensions?t.dimensions:{},this.layer_=t.layer,this.matrixSet_=t.matrixSet,this.style_=t.style,this.requestEncoding_=e,this.setKey(this.getKeyForDimensions_()),n&&n.length>0&&(this.tileUrlFunction=(0,h.FD)(n.map(this.createFromWMTSTemplate.bind(this))))}setUrls(t){this.urls=t;const e=t.join("\n");this.setTileUrlFunction((0,h.FD)(t.map(this.createFromWMTSTemplate.bind(this))),e)}getDimensions(){return this.dimensions_}getFormat(){return this.format_}getLayer(){return this.layer_}getMatrixSet(){return this.matrixSet_}getRequestEncoding(){return this.requestEncoding_}getStyle(){return this.style_}getVersion(){return this.version_}getKeyForDimensions_(){const t=this.urls?this.urls.slice(0):[];for(const e in this.dimensions_)t.push(e+"-"+this.dimensions_[e]);return t.join("/")}updateDimensions(t){Object.assign(this.dimensions_,t),this.setKey(this.getKeyForDimensions_())}createFromWMTSTemplate(t){const e=this.requestEncoding_,i={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};"KVP"==e&&Object.assign(i,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t="KVP"==e?(0,s.L)(t,i):t.replace(/\{(\w+?)\}/g,(function(t,e){return e.toLowerCase()in i?i[e.toLowerCase()]:t}));const n=this.tileGrid,r=this.dimensions_;return function(i,o,a){if(!i)return;const l={TileMatrix:n.getMatrixId(i[0]),TileCol:i[1],TileRow:i[2]};Object.assign(l,r);let h=t;return h="KVP"==e?(0,s.L)(h,l):h.replace(/\{(\w+?)\}/g,(function(t,e){return l[e]})),h}}}const u=c;function d(t,e){const i=t.Contents.Layer,n=i?.find((function(t){return t.Identifier==e.layer}));if(!n)return null;const s=t.Contents.TileMatrixSet;let o;o=n.TileMatrixSetLink.length>1?"projection"in e?n.TileMatrixSetLink.findIndex((function(t){const i=s.find((function(e){return e.Identifier==t.TileMatrixSet})).SupportedCRS,n=(0,a.Jt)(i),r=(0,a.Jt)(e.projection);return n&&r?(0,a.tI)(n,r):i==e.projection})):n.TileMatrixSetLink.findIndex((function(t){return t.TileMatrixSet==e.matrixSet})):0,o<0&&(o=0);const h=n.TileMatrixSetLink[o].TileMatrixSet,c=n.TileMatrixSetLink[o].TileMatrixSetLimits;let u=n.Format[0];"format"in e&&(u=e.format),o=n.Style.findIndex((function(t){return"style"in e?t.Title==e.style:t.isDefault})),o<0&&(o=0);const d=n.Style[o].Identifier,g={};"Dimension"in n&&n.Dimension.forEach((function(t,e,i){const n=t.Identifier;let s=t.Default;void 0===s&&(s=t.Value[0]),g[n]=s}));const _=t.Contents.TileMatrixSet.find((function(t){return t.Identifier==h}));let f;const p=_.SupportedCRS;if(p&&(f=(0,a.Jt)(p)),"projection"in e){const t=(0,a.Jt)(e.projection);t&&(f&&!(0,a.tI)(t,f)||(f=t))}let m=!1;const x="ne"==f.getAxisOrientation().substr(0,2);let v=_.TileMatrix[0],y={MinTileCol:0,MinTileRow:0,MaxTileCol:v.MatrixWidth-1,MaxTileRow:v.MatrixHeight-1};if(c){y=c[c.length-1];const t=_.TileMatrix.find((t=>t.Identifier===y.TileMatrix||_.Identifier+":"+t.Identifier===y.TileMatrix));t&&(v=t)}const E=28e-5*v.ScaleDenominator/f.getMetersPerUnit(),T=x?[v.TopLeftCorner[1],v.TopLeftCorner[0]]:v.TopLeftCorner,A=v.TileWidth*E,C=v.TileHeight*E;let S=_.BoundingBox;S&&x&&(S=[S[1],S[0],S[3],S[2]]);let R=[T[0]+A*y.MinTileCol,T[1]-C*(1+y.MaxTileRow),T[0]+A*(1+y.MaxTileCol),T[1]-C*y.MinTileRow];if(void 0!==S&&!(0,r.ms)(S,R)){const t=n.WGS84BoundingBox,e=(0,a.Jt)("EPSG:4326").getExtent();if(R=S,t)m=t[0]===e[0]&&t[2]===e[2];else{const t=(0,a.DI)(S,_.SupportedCRS,"EPSG:4326");m=t[0]-1e-10<=e[0]&&t[2]+1e-10>=e[2]}}const w=function(t,e,i){const n=[],s=[],r=[],o=[],h=[];i=void 0!==i?i:[];const c="TileMatrix",u="Identifier",d="ScaleDenominator",g="TopLeftCorner",_=t.SupportedCRS,f=(0,a.Jt)(_),p=f.getMetersPerUnit(),m="ne"==f.getAxisOrientation().substr(0,2);return t[c].sort((function(t,e){return e[d]-t[d]})),t[c].forEach((function(e){let a;if(a=!(i.length>0)||i.find((function(i){return e[u]==i[c]||!e[u].includes(":")&&t[u]+":"+e[u]===i[c]})),a){s.push(e[u]);const t=28e-5*e[d]/p,i=e.TileWidth,a=e.TileHeight;m?r.push([e[g][1],e[g][0]]):r.push(e[g]),n.push(t),o.push(i==a?i:[i,a]),h.push([e.MatrixWidth,e.MatrixHeight])}})),new l({extent:e,origins:r,resolutions:n,matrixIds:s,tileSizes:o,sizes:h})}(_,R,c),b=[];let I=e.requestEncoding;if(I=void 0!==I?I:"","OperationsMetadata"in t&&"GetTile"in t.OperationsMetadata){const e=t.OperationsMetadata.GetTile.DCP.HTTP.Get;for(let t=0,i=e.length;t{"use strict";i.d(e,{A:()=>o});var n=i(8512),s=i(4863);class r extends n.A{constructor(t){const e=void 0!==(t=t||{}).projection?t.projection:"EPSG:3857",i=void 0!==t.tileGrid?t.tileGrid:(0,s.EN)({extent:(0,s.kZ)(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:t.opaque,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=void 0!==t.gutter?t.gutter:0}getGutter(){return this.gutter_}}const o=r},2192:(t,e,i)=>{"use strict";i.d(e,{B:()=>n});const n=4},7500:(t,e,i)=>{"use strict";i.d(e,{$q:()=>x,AE:()=>_,Eq:()=>p,W3:()=>f,jD:()=>u,y4:()=>m});var n=i(2192),s=i(4465),r=i(2806),o=i(3938),a=i(1597),l=i(915),h=i(3407),c=i(9925);const u="1.3.0",d=[101,101];function g(t,e,i,n,o){o.WIDTH=i[0],o.HEIGHT=i[1];const a=n.getAxisOrientation();let l;const h=(0,r.Z)(o.VERSION,"1.3")>=0;return o[h?"CRS":"SRS"]=n.getCode(),l=h&&"ne"==a.substr(0,2)?[e[1],e[0],e[3],e[2]]:e,o.BBOX=l.join(","),(0,s.L)(t,o)}function _(t,e,i,s,r,o,h){o=Object.assign({REQUEST:"GetMap"},o);const c=e/i,u=[(0,a.LI)((0,l.RG)(t)/c,n.B),(0,a.LI)((0,l.Oq)(t)/c,n.B)];if(1!=i)switch(h){case"geoserver":const t=90*i+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+t:o.FORMAT_OPTIONS="dpi:"+t;break;case"mapserver":o.MAP_RESOLUTION=90*i;break;case"carmentaserver":case"qgis":o.DPI=90*i;break;default:throw new Error("Unknown `serverType` configured")}return g(r,t,u,s,o)}function f(t,e){return Object.assign({REQUEST:e,SERVICE:"WMS",VERSION:u,FORMAT:"image/png",STYLES:"",TRANSPARENT:!0},t)}function p(t){const e=void 0===t.hidpi||t.hidpi,i=(0,h.Jt)(t.projection||"EPSG:3857"),n=t.ratio||1.5,s=t.load||o.D4;return(r,o,a)=>{r=(0,c.QD)(r,o,a,n),1==a||e&&void 0!==t.serverType||(a=1);const l=_(r,o,a,i,t.url,f(t.params,"GetMap"),t.serverType),h=new Image;return null!==t.crossOrigin&&(h.crossOrigin=t.crossOrigin),s(h,l).then((t=>({image:t,extent:r,pixelRatio:a})))}}function m(t,e,i){if(void 0===t.url)return;const s=(0,h.Jt)(t.projection||"EPSG:3857"),o=(0,l.Bg)(e,i,0,d),c={QUERY_LAYERS:t.params.LAYERS,INFO_FORMAT:"application/json"};Object.assign(c,f(t.params,"GetFeatureInfo"),t.params);const u=(0,a.RI)((e[0]-o[0])/i,n.B),_=(0,a.RI)((o[3]-e[1])/i,n.B),p=(0,r.Z)(c.VERSION,"1.3")>=0;return c[p?"I":"X"]=u,c[p?"J":"Y"]=_,g(t.url,o,d,s,c)}function x(t,e){if(void 0===t.url)return;const i={SERVICE:"WMS",VERSION:u,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===t.params||void 0===t.params.LAYER){const e=t.params.LAYERS;if(Array.isArray(e)&&1!==e.length)return;i.LAYER=e}if(void 0!==e){const n=(0,h.Jt)(t.projection||"EPSG:3857").getMetersPerUnit()||1,s=28e-5;i.SCALE=e*n/s}return Object.assign(i,t.params),(0,s.L)(t.url,i)}},2490:(t,e,i)=>{"use strict";i.d(e,{Yf:()=>r,cY:()=>o});var n=i(1597);const s=6371008.8;function r(t,e,i){i=i||s;const r=(0,n.eh)(t[1]),o=(0,n.eh)(e[1]),a=(o-r)/2,l=(0,n.eh)(e[0]-t[0])/2,h=Math.sin(a)*Math.sin(a)+Math.sin(l)*Math.sin(l)*Math.cos(r)*Math.cos(o);return 2*i*Math.atan2(Math.sqrt(h),Math.sqrt(1-h))}function o(t,e,i,r){r=r||s;const o=(0,n.eh)(t[1]),a=(0,n.eh)(t[0]),l=e/r,h=Math.asin(Math.sin(o)*Math.cos(l)+Math.cos(o)*Math.sin(l)*Math.cos(i)),c=a+Math.atan2(Math.sin(i)*Math.sin(l)*Math.cos(o),Math.cos(l)-Math.sin(o)*Math.sin(h));return[(0,n.xW)(c),(0,n.xW)(h)]}},2806:(t,e,i)=>{"use strict";function n(t,e,i){const n=void 0!==i?t.toFixed(i):""+t;let s=n.indexOf(".");return s=-1===s?n.length:s,s>e?n:new Array(1+e-s).join("0")+n}function s(t,e){const i=(""+t).split("."),n=(""+e).split(".");for(let t=0;ts)return 1;if(s>e)return-1}return 0}i.d(e,{H:()=>n,Z:()=>s})},4969:(t,e,i)=>{"use strict";i.d(e,{A:()=>s});var n=i(588);const s=class{constructor(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;for(;e;)t(e.value_,e.key_,this),e=e.newer}get(t,e){const i=this.entries_[t];return(0,n.v)(void 0!==i,"Tried to get a value for a key that does not exist in the cache"),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_}remove(t){const e=this.entries_[t];return(0,n.v)(void 0!==e,"Tried to get a value for a key that does not exist in the cache"),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_}getCount(){return this.count_}getKeys(){const t=new Array(this.count_);let e,i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.key_;return t}getValues(){const t=new Array(this.count_);let e,i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){return this.entries_[t]?.value_}pop(){const t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){(0,n.v)(!(t in this.entries_),"Tried to set a value for a key that is used already");const i={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[t]=i,++this.count_}setSize(t){this.highWaterMark=t}}},5902:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(5341),s=i(915),r=i(4087),o=i(3530);const a=class{constructor(t){this.rbush_=new n(t),this.items_={}}insert(t,e){const i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[(0,r.v6)(e)]=i}load(t,e){const i=new Array(e.length);for(let n=0,s=e.length;n{"use strict";i.d(e,{A:()=>r});var n=i(6936);class s extends n.A{constructor(t){super({points:1/0,fill:(t=t||{radius:5}).fill,radius:t.radius,stroke:t.stroke,scale:void 0!==t.scale?t.scale:1,rotation:void 0!==t.rotation?t.rotation:0,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new s({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}setRadius(t){this.radius_=t,this.render()}}const r=s},3628:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(6141),s=i(7907);class r{constructor(t){t=t||{},this.patternImage_=null,this.color_=null,void 0!==t.color&&this.setColor(t.color)}clone(){const t=this.getColor();return new r({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){if(null!==t&&"object"==typeof t&&"src"in t){const e=(0,s.J)(null,t.src,"anonymous",void 0,t.offset?null:t.color?t.color:null,!(t.offset&&t.size));e.ready().then((()=>{this.patternImage_=null})),e.getImageState()===n.A.IDLE&&e.load(),e.getImageState()===n.A.LOADING&&(this.patternImage_=e)}this.color_=t}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}const o=r},9700:(t,e,i)=>{"use strict";i.d(e,{A:()=>d});var n=i(6837),s=i(6141),r=i(940),o=i(3730),a=i(588),l=i(7907),h=i(4087);function c(t,e,i,n){return void 0!==i&&void 0!==n?[i/t,n/e]:void 0!==i?i/t:void 0!==n?n/e:1}class u extends r.A{constructor(t){const e=void 0!==(t=t||{}).opacity?t.opacity:1,i=void 0!==t.rotation?t.rotation:0,n=void 0!==t.scale?t.scale:1,r=void 0!==t.rotateWithView&&t.rotateWithView;super({opacity:e,rotation:i,scale:n,displacement:void 0!==t.displacement?t.displacement:[0,0],rotateWithView:r,declutterMode:t.declutterMode}),this.anchor_=void 0!==t.anchor?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==t.anchorOrigin?t.anchorOrigin:"top-left",this.anchorXUnits_=void 0!==t.anchorXUnits?t.anchorXUnits:"fraction",this.anchorYUnits_=void 0!==t.anchorYUnits?t.anchorYUnits:"fraction",this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null;const u=void 0!==t.img?t.img:null;let d,g=t.src;if((0,a.v)(!(void 0!==g&&u),"`image` and `src` cannot be provided at the same time"),void 0!==g&&0!==g.length||!u||(g=u.src||(0,h.v6)(u)),(0,a.v)(void 0!==g&&g.length>0,"A defined and non-empty `src` or `image` must be provided"),(0,a.v)(!((void 0!==t.width||void 0!==t.height)&&void 0!==t.scale),"`width` or `height` cannot be provided together with `scale`"),void 0!==t.src?d=s.A.IDLE:void 0!==u&&(d=u instanceof HTMLImageElement?u.complete?u.src?s.A.LOADED:s.A.IDLE:s.A.LOADING:s.A.LOADED),this.color_=void 0!==t.color?(0,o._j)(t.color):null,this.iconImage_=(0,l.J)(u,g,this.crossOrigin_,d,this.color_),this.offset_=void 0!==t.offset?t.offset:[0,0],this.offsetOrigin_=void 0!==t.offsetOrigin?t.offsetOrigin:"top-left",this.origin_=null,this.size_=void 0!==t.size?t.size:null,void 0!==t.width||void 0!==t.height){let e,i;if(t.size)[e,i]=t.size;else{const n=this.getImage(1);if(n.width&&n.height)e=n.width,i=n.height;else if(n instanceof HTMLImageElement){this.initialOptions_=t;const e=()=>{if(this.unlistenImageChange(e),!this.initialOptions_)return;const i=this.iconImage_.getSize();this.setScale(c(i[0],i[1],t.width,t.height))};return void this.listenImageChange(e)}}void 0!==e&&this.setScale(c(e,i,t.width,t.height))}}clone(){let t,e,i;return this.initialOptions_?(e=this.initialOptions_.width,i=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new u({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:i,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const e=this.getSize();if("fraction"==this.anchorXUnits_||"fraction"==this.anchorYUnits_){if(!e)return null;t=this.anchor_.slice(),"fraction"==this.anchorXUnits_&&(t[0]*=e[0]),"fraction"==this.anchorYUnits_&&(t[1]*=e[1])}if("top-left"!=this.anchorOrigin_){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),"top-right"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[0]=-t[0]+e[0]),"bottom-left"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]-e[0]/i[0],t[1]+e[1]/i[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if("top-left"!=this.offsetOrigin_){const e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),"top-right"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[0]=i[0]-e[0]-t[0]),"bottom-left"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();return this.size_?this.size_[0]*t[0]:this.iconImage_.getImageState()==s.A.LOADED?this.iconImage_.getSize()[0]*t[0]:void 0}getHeight(){const t=this.getScaleArray();return this.size_?this.size_[1]*t[1]:this.iconImage_.getImageState()==s.A.LOADED?this.iconImage_.getSize()[1]*t[1]:void 0}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(n.A.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(n.A.CHANGE,t)}ready(){return this.iconImage_.ready()}}const d=u},7907:(t,e,i)=>{"use strict";i.d(e,{J:()=>d});var n=i(9332),s=i(6837),r=i(6141),o=i(3730),a=i(8711),l=i(3938),h=i(2241);let c=null;class u extends n.A{constructor(t,e,i,n,s){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=i,this.canvas_={},this.color_=s,this.imageState_=void 0===n?r.A.IDLE:n,this.size_=t&&t.width&&t.height?[t.width,t.height]:null,this.src_=e,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(void 0===this.tainted_&&this.imageState_===r.A.LOADED){c||(c=(0,a.Y)(1,1,void 0,{willReadFrequently:!0})),c.drawImage(this.image_,0,0);try{c.getImageData(0,0,1,1),this.tainted_=!1}catch(t){c=null,this.tainted_=!0}}return!0===this.tainted_}dispatchChangeEvent_(){this.dispatchEvent(s.A.CHANGE)}handleImageError_(){this.imageState_=r.A.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=r.A.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],i=(0,a.Y)(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===r.A.IDLE){this.image_||this.initializeImage_(),this.imageState_=r.A.LOADING;try{void 0!==this.src_&&(this.image_.src=this.src_)}catch(t){this.handleImageError_()}this.image_ instanceof HTMLImageElement&&(0,l.RA)(this.image_,this.src_).then((t=>{this.image_=t,this.handleImageLoad_()})).catch(this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==r.A.LOADED)return;const e=this.image_,i=document.createElement("canvas");i.width=Math.ceil(e.width*t),i.height=Math.ceil(e.height*t);const n=i.getContext("2d");n.scale(t,t),n.drawImage(e,0,0),n.globalCompositeOperation="multiply",n.fillStyle=(0,o.oJ)(this.color_),n.fillRect(0,0,i.width/t,i.height/t),n.globalCompositeOperation="destination-in",n.drawImage(e,0,0),this.canvas_[t]=i}ready(){return this.ready_||(this.ready_=new Promise((t=>{this.imageState_===r.A.LOADED||this.imageState_===r.A.ERROR?t():this.addEventListener(s.A.CHANGE,(function e(){this.imageState_!==r.A.LOADED&&this.imageState_!==r.A.ERROR||(this.removeEventListener(s.A.CHANGE,e),t())}))}))),this.ready_}}function d(t,e,i,n,s,r){let o=void 0===e?void 0:h.ue.get(e,i,s);return o||(o=new u(t,t instanceof HTMLImageElement?t.src||void 0:e,i,n,s),h.ue.set(e,i,s,o,r)),r&&o&&!h.ue.getPattern(e,i,s)&&h.ue.set(e,i,s,o,r),o}},2241:(t,e,i)=>{"use strict";i.d(e,{ue:()=>a});var n=i(6141),s=i(3730),r=i(8711);function o(t,e,i){return e+":"+t+":"+(i?(0,s._j)(i):"null")}const a=new class{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const i=this.cache_[e];3&t++||i.hasListener()||(delete this.cache_[e],delete this.patternCache_[e],--this.cacheSize_)}}}get(t,e,i){const n=o(t,e,i);return n in this.cache_?this.cache_[n]:null}getPattern(t,e,i){const n=o(t,e,i);return n in this.patternCache_?this.patternCache_[n]:null}set(t,e,i,s,a){const l=o(t,e,i),h=l in this.cache_;this.cache_[l]=s,a&&(s.getImageState()===n.A.IDLE&&s.load(),s.getImageState()===n.A.LOADING?s.ready().then((()=>{this.patternCache_[l]=(0,r.lr)().createPattern(s.getImage(1),"repeat")})):this.patternCache_[l]=(0,r.lr)().createPattern(s.getImage(1),"repeat")),h||++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}},940:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(4087),s=i(4401);class r{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=(0,s.xq)(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new r({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return(0,n.b0)()}getImage(t){return(0,n.b0)()}getHitDetectionImage(){return(0,n.b0)()}getPixelRatio(t){return 1}getImageState(){return(0,n.b0)()}getImageSize(){return(0,n.b0)()}getOrigin(){return(0,n.b0)()}getSize(){return(0,n.b0)()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=(0,s.xq)(t)}listenImageChange(t){(0,n.b0)()}load(){(0,n.b0)()}unlistenImageChange(t){(0,n.b0)()}ready(){return Promise.resolve()}}const o=r},6936:(t,e,i)=>{"use strict";i.d(e,{A:()=>c});var n=i(6141),s=i(940),r=i(3730),o=i(7295),a=i(8711),l=i(8774);class h extends s.A{constructor(t){super({opacity:1,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,rotation:void 0!==t.rotation?t.rotation:0,scale:void 0!==t.scale?t.scale:1,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvases_,this.hitDetectionCanvas_=null,this.fill_=void 0!==t.fill?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=t.radius,this.radius2_=t.radius2,this.angle_=void 0!==t.angle?t.angle:0,this.stroke_=void 0!==t.stroke?t.stroke:null,this.size_,this.renderOptions_,this.imageState_=this.fill_&&this.fill_.loading()?n.A.LOADING:n.A.LOADED,this.imageState_===n.A.LOADING&&this.ready().then((()=>this.imageState_=n.A.LOADED)),this.render()}clone(){const t=this.getScale(),e=new h({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_,e=this.getDisplacement(),i=this.getScaleArray();return[t[0]/2-e[0]/i[0],t[1]/2+e[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(t){let e=this.canvases_[t];if(!e){const i=this.renderOptions_,n=(0,a.Y)(i.size*t,i.size*t);this.draw_(i,n,t),e=n.canvas,this.canvases_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,i){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;let n=this.radius_,s=void 0===this.radius2_?n:this.radius2_;if(n{"use strict";i.d(e,{A:()=>s});class n{constructor(t){t=t||{},this.color_=void 0!==t.color?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=void 0!==t.lineDash?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new n({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}const s=n},9276:(t,e,i)=>{"use strict";i.d(e,{Ay:()=>g,d1:()=>c,mC:()=>l,mY:()=>u});var n=i(7733),s=i(3628),r=i(953),o=i(588);class a{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=d,void 0!==t.geometry&&this.setGeometry(t.geometry),this.fill_=void 0!==t.fill?t.fill:null,this.image_=void 0!==t.image?t.image:null,this.renderer_=void 0!==t.renderer?t.renderer:null,this.hitDetectionRenderer_=void 0!==t.hitDetectionRenderer?t.hitDetectionRenderer:null,this.stroke_=void 0!==t.stroke?t.stroke:null,this.text_=void 0!==t.text?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&"object"==typeof t&&(t=t.clone()),new a({geometry:t??void 0,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer()??void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=d,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function l(t){let e;if("function"==typeof t)e=t;else{let i;Array.isArray(t)?i=t:((0,o.v)("function"==typeof t.getZIndex,"Expected an `Style` or an array of `Style`"),i=[t]),e=function(){return i}}return e}let h=null;function c(t,e){if(!h){const t=new s.A({color:"rgba(255,255,255,0.4)"}),e=new r.A({color:"#3399CC",width:1.25});h=[new a({image:new n.A({fill:t,stroke:e,radius:5}),fill:t,stroke:e})]}return h}function u(){const t={},e=[255,255,255,1],i=[0,153,255,1];return t.Polygon=[new a({fill:new s.A({color:[255,255,255,.5]})})],t.MultiPolygon=t.Polygon,t.LineString=[new a({stroke:new r.A({color:e,width:5})}),new a({stroke:new r.A({color:i,width:3})})],t.MultiLineString=t.LineString,t.Circle=t.Polygon.concat(t.LineString),t.Point=[new a({image:new n.A({radius:6,fill:new s.A({color:i}),stroke:new r.A({color:e,width:1.5})}),zIndex:1/0})],t.MultiPoint=t.Point,t.GeometryCollection=t.Polygon.concat(t.LineString,t.Point),t}function d(t){return t.getGeometry()}const g=a},1426:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(3628),s=i(4401);class r{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=(0,s.xq)(void 0!==t.scale?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.repeat_=t.repeat,this.textBaseline_=t.textBaseline,this.fill_=void 0!==t.fill?t.fill:new n.A({color:"#333"}),this.maxAngle_=void 0!==t.maxAngle?t.maxAngle:Math.PI/4,this.placement_=void 0!==t.placement?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=void 0!==t.stroke?t.stroke:null,this.offsetX_=void 0!==t.offsetX?t.offsetX:0,this.offsetY_=void 0!==t.offsetY?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=void 0===t.padding?null:t.padding,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new r({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0,declutterMode:this.getDeclutterMode()})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}getDeclutterMode(){return this.declutterMode_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRepeat(t){this.repeat_=t}setRotateWithView(t){this.rotateWithView_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=(0,s.xq)(void 0!==t?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}const o=r},186:(t,e,i)=>{"use strict";function n(t,e,i,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=i,n):[t,e,i]}function s(t,e,i){return t+"/"+e+"/"+i}function r(t){return s(t[0],t[1],t[2])}function o(t){const[e,i,n]=t.substring(t.lastIndexOf("/")+1,t.length).split(",").map(Number);return s(e,i,n)}function a(t){return t.split("/").map(Number)}function l(t){return(t[1]<i||i>e.getMaxZoom())return!1;const r=e.getFullTileRange(i);return!r||r.containsXY(n,s)}i.d(e,{K:()=>a,N:()=>n,N5:()=>h,dp:()=>s,gr:()=>o,i7:()=>r,tW:()=>l})},4863:(t,e,i)=>{"use strict";i.d(e,{EN:()=>c,Li:()=>h,kZ:()=>d,pr:()=>l});var n=i(6758),s=i(9496),r=i(3407),o=i(915),a=i(4401);function l(t){let e=t.getDefaultTileGrid();return e||(e=function(t,e,i,s){return function(t,e,i,s){s=void 0!==s?s:"top-left";const r=u(t,e,i);return new n.A({extent:t,origin:(0,o.qF)(t,s),resolutions:r,tileSize:i})}(d(t),void 0,void 0,void 0)}(t),t.setDefaultTileGrid(e)),e}function h(t,e,i){const n=e[0],s=t.getTileCoordCenter(e),r=d(i);if(!(0,o.Ym)(r,s)){const e=(0,o.RG)(r),i=Math.ceil((r[0]-s[0])/e);return s[0]+=e*i,t.getTileCoordForCoordAndZ(s,n)}return e}function c(t){const e=t||{},i=e.extent||(0,r.Jt)("EPSG:3857").getExtent(),s={extent:i,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:u(i,e.maxZoom,e.tileSize,e.maxResolution)};return new n.A(s)}function u(t,e,i,n){e=void 0!==e?e:s.L,i=(0,a.xq)(void 0!==i?i:s.R);const r=(0,o.Oq)(t),l=(0,o.RG)(t);n=n>0?n:Math.max(l/i[0],r/i[1]);const h=e+1,c=new Array(h);for(let t=0;t{"use strict";i.d(e,{A:()=>g});var n=i(1110),s=i(9496),r=i(588),o=i(1597),a=i(915),l=i(186),h=i(4350),c=i(6514),u=i(4401);const d=[0,0,0],g=class{constructor(t){let e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,(0,r.v)((0,c.WC)(this.resolutions_,((t,e)=>e-t),!0),"`resolutions` must be sorted in descending order"),!t.origins)for(let t=0,i=this.resolutions_.length-1;t{const s=new n.A(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));if(i){const t=this.getTileRangeForExtentAndZ(i,e);s.minX=Math.max(t.minX,s.minX),s.maxX=Math.min(t.maxX,s.maxX),s.minY=Math.max(t.minY,s.minY),s.maxY=Math.min(t.maxY,s.maxY)}return s})):i&&this.calculateTileRanges_(i)}forEachTileCoord(t,e,i){const n=this.getTileRangeForExtentAndZ(t,e);for(let t=n.minX,s=n.maxX;t<=s;++t)for(let s=n.minY,r=n.maxY;s<=r;++s)i([e,t,s])}forEachTileCoordParentTileRange(t,e,i,s){let r,o,a,l=null,h=t[0]-1;for(2===this.zoomFactor_?(o=t[1],a=t[2]):l=this.getTileCoordExtent(t,s);h>=this.minZoom;){if(void 0!==o&&void 0!==a?(o=Math.floor(o/2),a=Math.floor(a/2),r=(0,n.N)(o,o,a,a,i)):r=this.getTileRangeForExtentAndZ(l,h,i),e(h,r))return!0;--h}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(t){return this.origin_?this.origin_:this.origins_[t]}getResolution(t){return this.resolutions_[t]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(t,e,i){if(t[0]this.maxZoom||e{"use strict";i.d(e,{L:()=>n,R:()=>s});const n=42,s=256},2654:(t,e,i)=>{"use strict";i.d(e,{FD:()=>a,Qz:()=>o,Uu:()=>l});var n=i(1597),s=i(186);function r(t,e){const i=/\{z\}/g,n=/\{x\}/g,s=/\{y\}/g,r=/\{-y\}/g;return function(o,a,l){if(o)return t.replace(i,o[0].toString()).replace(n,o[1].toString()).replace(s,o[2].toString()).replace(r,(function(){const t=o[0],i=e.getFullTileRange(t);if(!i)throw new Error("The {-y} placeholder requires a tile grid with extent");return(i.getHeight()-o[2]-1).toString()}))}}function o(t,e){const i=t.length,n=new Array(i);for(let s=0;s{"use strict";i.d(e,{Bb:()=>c,T9:()=>f,Tl:()=>g,Zz:()=>_,cL:()=>o,dI:()=>m,e$:()=>u,hs:()=>d,k3:()=>h,lw:()=>a,vt:()=>r});var n=i(588);const s=new Array(6);function r(){return[1,0,0,1,0,0]}function o(t){return l(t,1,0,0,1,0,0)}function a(t,e){const i=t[0],n=t[1],s=t[2],r=t[3],o=t[4],a=t[5],l=e[0],h=e[1],c=e[2],u=e[3],d=e[4],g=e[5];return t[0]=i*l+s*h,t[1]=n*l+r*h,t[2]=i*c+s*u,t[3]=n*c+r*u,t[4]=i*d+s*g+o,t[5]=n*d+r*g+a,t}function l(t,e,i,n,s,r,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=s,t[4]=r,t[5]=o,t}function h(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function c(t,e){const i=e[0],n=e[1];return e[0]=t[0]*i+t[2]*n+t[4],e[1]=t[1]*i+t[3]*n+t[5],e}function u(t,e){const i=Math.cos(e),n=Math.sin(e);return a(t,l(s,i,n,-n,i,0,0))}function d(t,e,i){return a(t,l(s,e,0,0,i,0,0))}function g(t,e,i){return a(t,l(s,1,0,0,1,e,i))}function _(t,e,i,n,s,r,o,a){const l=Math.sin(r),h=Math.cos(r);return t[0]=n*h,t[1]=s*l,t[2]=-n*l,t[3]=s*h,t[4]=o*n*h-a*n*l+e,t[5]=o*s*l+a*s*h+i,t}function f(t,e){const i=(s=e)[0]*s[3]-s[1]*s[2];var s;(0,n.v)(0!==i,"Transformation matrix cannot be inverted");const r=e[0],o=e[1],a=e[2],l=e[3],h=e[4],c=e[5];return t[0]=l/i,t[1]=-o/i,t[2]=-a/i,t[3]=r/i,t[4]=(a*c-l*h)/i,t[5]=-(r*c-o*h)/i,t}const p=[1e6,1e6,1e6,1e6,2,2];function m(t){return"matrix("+t.map(((t,e)=>Math.round(t*p[e])/p[e])).join(", ")+")"}},4465:(t,e,i)=>{"use strict";function n(t,e){const i=[];Object.keys(e).forEach((function(t){null!==e[t]&&void 0!==e[t]&&i.push(t+"="+encodeURIComponent(e[t]))}));const n=i.join("&");return t=t.replace(/[?&]$/,""),(t+=t.includes("?")?"&":"?")+n}i.d(e,{L:()=>n})},3954:(t,e,i)=>{"use strict";function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(t,e){return t[0]=e[0],t[1]=e[1],t[4]=e[2],t[5]=e[3],t[12]=e[4],t[13]=e[5],t}i.d(e,{Z:()=>s,v:()=>n})},130:(t,e,i)=>{"use strict";i.d(e,{Be:()=>l,Ek:()=>a,H7:()=>s,IP:()=>r,JL:()=>c,SD:()=>_,Ss:()=>o,UD:()=>u,l4:()=>h,zH:()=>d});var n=i(7771);const s=34962,r=34963,o=35040,a=35044,l=35048,h=5121,c=5123,u=5125,d=5126,g=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function _(t,e){e=Object.assign({preserveDrawingBuffer:!0,antialias:!n.oF},e);const i=g.length;for(let n=0;n{"use strict";i.d(e,{Ay:()=>a});var n=i(130),s=i(588);const r={STATIC_DRAW:n.Ek,STREAM_DRAW:n.Ss,DYNAMIC_DRAW:n.Be};function o(t){switch(t){case n.H7:return Float32Array;case n.IP:return Uint32Array;default:return Float32Array}}const a=class{constructor(t,e){this.array_=null,this.type_=t,(0,s.v)(t===n.H7||t===n.IP,"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`"),this.usage_=void 0!==e?e:r.STATIC_DRAW}ofSize(t){return this.array_=new(o(this.type_))(t),this}fromArray(t){return this.array_=o(this.type_).from(t),this}fromArrayBuffer(t){return this.array_=new(o(this.type_))(t),this}getType(){return this.type_}getArray(){return this.array_}getUsage(){return this.usage_}getSize(){return this.array_?this.array_.length:0}}},9777:(t,e,i)=>{"use strict";i.d(e,{jQ:()=>g,M8:()=>d,Ay:()=>v});const n="webglcontextlost",s="webglcontextrestored";var r=i(25),o=i(4087);const a=class{constructor(t){this.gl_=t.webGlContext;const e=this.gl_;this.scaleRatio_=t.scaleRatio||1,this.renderTargetTexture_=e.createTexture(),this.renderTargetTextureSize_=null,this.frameBuffer_=e.createFramebuffer(),this.depthBuffer_=e.createRenderbuffer();const i=e.createShader(e.VERTEX_SHADER);e.shaderSource(i,t.vertexShader||"\n precision mediump float;\n \n attribute vec2 a_position;\n varying vec2 v_texCoord;\n varying vec2 v_screenCoord;\n \n uniform vec2 u_screenSize;\n \n void main() {\n v_texCoord = a_position * 0.5 + 0.5;\n v_screenCoord = v_texCoord * u_screenSize;\n gl_Position = vec4(a_position, 0.0, 1.0);\n }\n"),e.compileShader(i);const n=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(n,t.fragmentShader||"\n precision mediump float;\n \n uniform sampler2D u_image;\n uniform float u_opacity;\n \n varying vec2 v_texCoord;\n \n void main() {\n gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\n }\n"),e.compileShader(n),this.renderTargetProgram_=e.createProgram(),e.attachShader(this.renderTargetProgram_,i),e.attachShader(this.renderTargetProgram_,n),e.linkProgram(this.renderTargetProgram_),this.renderTargetVerticesBuffer_=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,-1,1,1,-1,1]),e.STATIC_DRAW),this.renderTargetAttribLocation_=e.getAttribLocation(this.renderTargetProgram_,"a_position"),this.renderTargetUniformLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_screenSize"),this.renderTargetOpacityLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_opacity"),this.renderTargetTextureLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_image"),this.uniforms_=[],t.uniforms&&Object.keys(t.uniforms).forEach((i=>{this.uniforms_.push({value:t.uniforms[i],location:e.getUniformLocation(this.renderTargetProgram_,i)})}))}getGL(){return this.gl_}init(t){const e=this.getGL(),i=[e.drawingBufferWidth*this.scaleRatio_,e.drawingBufferHeight*this.scaleRatio_];if(e.bindFramebuffer(e.FRAMEBUFFER,this.getFrameBuffer()),e.bindRenderbuffer(e.RENDERBUFFER,this.getDepthBuffer()),e.viewport(0,0,i[0],i[1]),!this.renderTargetTextureSize_||this.renderTargetTextureSize_[0]!==i[0]||this.renderTargetTextureSize_[1]!==i[1]){this.renderTargetTextureSize_=i;const t=0,n=e.RGBA,s=0,r=e.RGBA,o=e.UNSIGNED_BYTE,a=null;e.bindTexture(e.TEXTURE_2D,this.renderTargetTexture_),e.texImage2D(e.TEXTURE_2D,t,n,i[0],i[1],s,r,o,a),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.renderTargetTexture_,0),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,i[0],i[1]),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,this.depthBuffer_)}}apply(t,e,i,n){const s=this.getGL(),r=t.size;if(s.bindFramebuffer(s.FRAMEBUFFER,e?e.getFrameBuffer():null),s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,this.renderTargetTexture_),!e){const e=(0,o.v6)(s.canvas);if(!t.renderTargets[e]){const i=s.getContextAttributes();i&&i.preserveDrawingBuffer&&(s.clearColor(0,0,0,0),s.clearDepth(1),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT)),t.renderTargets[e]=!0}}s.disable(s.DEPTH_TEST),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA),s.viewport(0,0,s.drawingBufferWidth,s.drawingBufferHeight),s.bindBuffer(s.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),s.useProgram(this.renderTargetProgram_),s.enableVertexAttribArray(this.renderTargetAttribLocation_),s.vertexAttribPointer(this.renderTargetAttribLocation_,2,s.FLOAT,!1,0,0),s.uniform2f(this.renderTargetUniformLocation_,r[0],r[1]),s.uniform1i(this.renderTargetTextureLocation_,0);const a=t.layerStatesArray[t.layerIndex].opacity;s.uniform1f(this.renderTargetOpacityLocation_,a),this.applyUniforms(t),i&&i(s,t),s.drawArrays(s.TRIANGLES,0,6),n&&n(s,t)}getFrameBuffer(){return this.frameBuffer_}getDepthBuffer(){return this.depthBuffer_}applyUniforms(t){const e=this.getGL();let i,n=1;this.uniforms_.forEach((function(s){if(i="function"==typeof s.value?s.value(t):s.value,i instanceof HTMLCanvasElement||i instanceof ImageData)s.texture||(s.texture=e.createTexture()),e.activeTexture(e[`TEXTURE${n}`]),e.bindTexture(e.TEXTURE_2D,s.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),i instanceof ImageData?e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,i.width,i.height,0,e.UNSIGNED_BYTE,new Uint8Array(i.data)):e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,i),e.uniform1i(s.location,n++);else if(Array.isArray(i))switch(i.length){case 2:return void e.uniform2f(s.location,i[0],i[1]);case 3:return void e.uniform3f(s.location,i[0],i[1],i[2]);case 4:return void e.uniform4f(s.location,i[0],i[1],i[2],i[3]);default:return}else"number"==typeof i&&e.uniform1f(s.location,i)}))}};var l=i(130),h=i(3530),c=i(9703),u=i(3954);const d={PROJECTION_MATRIX:"u_projectionMatrix",SCREEN_TO_WORLD_MATRIX:"u_screenToWorldMatrix",TIME:"u_time",ZOOM:"u_zoom",RESOLUTION:"u_resolution",ROTATION:"u_rotation",VIEWPORT_SIZE_PX:"u_viewportSizePx",PIXEL_RATIO:"u_pixelRatio",HIT_DETECTION:"u_hitDetection"},g={UNSIGNED_BYTE:l.l4,UNSIGNED_SHORT:l.JL,UNSIGNED_INT:l.UD,FLOAT:l.zH},_={};function f(t){return"shared/"+t}let p=0;class m extends r.A{constructor(t){super(),t=t||{},this.boundHandleWebGLContextLost_=this.handleWebGLContextLost.bind(this),this.boundHandleWebGLContextRestored_=this.handleWebGLContextRestored.bind(this),this.canvasCacheKey_=t.canvasCacheKey?f(t.canvasCacheKey):function(){const t="unique/"+p;return p+=1,t}(),this.gl_=function(t){let e=_[t];if(!e){const i=document.createElement("canvas");i.width=1,i.height=1,i.style.position="absolute",i.style.left="0",e={users:0,context:(0,l.SD)(i)},_[t]=e}return e.users+=1,e.context}(this.canvasCacheKey_),this.bufferCache_={},this.extensionCache_={},this.currentProgram_=null,this.needsToBeRecreated_=!1;const e=this.gl_.canvas;e.addEventListener(n,this.boundHandleWebGLContextLost_),e.addEventListener(s,this.boundHandleWebGLContextRestored_),this.offsetRotateMatrix_=(0,c.vt)(),this.offsetScaleMatrix_=(0,c.vt)(),this.tmpMat4_=(0,u.v)(),this.uniformLocationsByProgram_={},this.attribLocationsByProgram_={},this.uniforms_=[],t.uniforms&&this.setUniforms(t.uniforms),this.postProcessPasses_=t.postProcesses?t.postProcesses.map((t=>new a({webGlContext:this.gl_,scaleRatio:t.scaleRatio,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms}))):[new a({webGlContext:this.gl_})],this.shaderCompileErrors_=null,this.startTime_=Date.now()}setUniforms(t){this.uniforms_=[],this.addUniforms(t)}addUniforms(t){for(const e in t)this.uniforms_.push({name:e,value:t[e]})}canvasCacheKeyMatches(t){return this.canvasCacheKey_===f(t)}getExtension(t){if(t in this.extensionCache_)return this.extensionCache_[t];const e=this.gl_.getExtension(t);return this.extensionCache_[t]=e,e}bindBuffer(t){const e=this.gl_,i=(0,o.v6)(t);let n=this.bufferCache_[i];n||(n={buffer:t,webGlBuffer:e.createBuffer()},this.bufferCache_[i]=n),e.bindBuffer(t.getType(),n.webGlBuffer)}flushBufferData(t){const e=this.gl_;this.bindBuffer(t),e.bufferData(t.getType(),t.getArray(),t.getUsage())}deleteBuffer(t){const e=this.gl_,i=(0,o.v6)(t),n=this.bufferCache_[i];n&&!e.isContextLost()&&e.deleteBuffer(n.webGlBuffer),delete this.bufferCache_[i]}disposeInternal(){const t=this.gl_.canvas;t.removeEventListener(n,this.boundHandleWebGLContextLost_),t.removeEventListener(s,this.boundHandleWebGLContextRestored_),function(t){const e=_[t];if(!e)return;if(e.users-=1,e.users>0)return;const i=e.context,n=i.getExtension("WEBGL_lose_context");n&&n.loseContext();const s=i.canvas;s.width=1,s.height=1,delete _[t]}(this.canvasCacheKey_),delete this.gl_}prepareDraw(t,e,i){const n=this.gl_,s=this.getCanvas(),r=t.size,o=t.pixelRatio;s.width===r[0]*o&&s.height===r[1]*o||(s.width=r[0]*o,s.height=r[1]*o,s.style.width=r[0]+"px",s.style.height=r[1]+"px");for(let e=this.postProcessPasses_.length-1;e>=0;e--)this.postProcessPasses_[e].init(t);n.bindTexture(n.TEXTURE_2D,null),n.clearColor(0,0,0,0),n.depthRange(0,1),n.clearDepth(1),n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT),n.enable(n.BLEND),n.blendFunc(n.ONE,e?n.ZERO:n.ONE_MINUS_SRC_ALPHA),i?(n.enable(n.DEPTH_TEST),n.depthFunc(n.LEQUAL)):n.disable(n.DEPTH_TEST)}bindTexture(t,e,i){const n=this.gl_;n.activeTexture(n.TEXTURE0+e),n.bindTexture(n.TEXTURE_2D,t),n.uniform1i(this.getUniformLocation(i),e)}prepareDrawToRenderTarget(t,e,i,n){const s=this.gl_,r=e.getSize();s.bindFramebuffer(s.FRAMEBUFFER,e.getFramebuffer()),s.bindRenderbuffer(s.RENDERBUFFER,e.getDepthbuffer()),s.viewport(0,0,r[0],r[1]),s.bindTexture(s.TEXTURE_2D,e.getTexture()),s.clearColor(0,0,0,0),s.depthRange(0,1),s.clearDepth(1),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.enable(s.BLEND),s.blendFunc(s.ONE,i?s.ZERO:s.ONE_MINUS_SRC_ALPHA),n?(s.enable(s.DEPTH_TEST),s.depthFunc(s.LEQUAL)):s.disable(s.DEPTH_TEST)}drawElements(t,e){const i=this.gl_;this.getExtension("OES_element_index_uint");const n=i.UNSIGNED_INT,s=e-t,r=4*t;i.drawElements(i.TRIANGLES,s,n,r)}finalizeDraw(t,e,i){for(let n=0,s=this.postProcessPasses_.length;n{if(i="function"==typeof s.value?s.value(t):s.value,i instanceof HTMLCanvasElement||i instanceof HTMLImageElement||i instanceof ImageData||i instanceof WebGLTexture){i instanceof WebGLTexture&&!s.texture?(s.prevValue=void 0,s.texture=i):s.texture||(s.prevValue=void 0,s.texture=e.createTexture()),this.bindTexture(s.texture,n,s.name),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);const t=!(i instanceof HTMLImageElement)||i.complete;i instanceof WebGLTexture||!t||s.prevValue===i||(s.prevValue=i,e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,i)),n++}else if(Array.isArray(i)&&6===i.length)this.setUniformMatrixValue(s.name,(0,u.Z)(this.tmpMat4_,i));else if(Array.isArray(i)&&i.length<=4)switch(i.length){case 2:return void e.uniform2f(this.getUniformLocation(s.name),i[0],i[1]);case 3:return void e.uniform3f(this.getUniformLocation(s.name),i[0],i[1],i[2]);case 4:return void e.uniform4f(this.getUniformLocation(s.name),i[0],i[1],i[2],i[3]);default:return}else"number"==typeof i&&e.uniform1f(this.getUniformLocation(s.name),i)}))}useProgram(t,e){this.gl_.useProgram(t),this.currentProgram_=t,this.applyFrameState(e),this.applyUniforms(e)}compileShader(t,e){const i=this.gl_,n=i.createShader(e);return i.shaderSource(n,t),i.compileShader(n),n}getProgram(t,e){const i=this.gl_,n=this.compileShader(t,i.FRAGMENT_SHADER),s=this.compileShader(e,i.VERTEX_SHADER),r=i.createProgram();if(i.attachShader(r,n),i.attachShader(r,s),i.linkProgram(r),!i.getShaderParameter(n,i.COMPILE_STATUS)){const t=`Fragment shader compilation failed: ${i.getShaderInfoLog(n)}`;throw new Error(t)}if(i.deleteShader(n),!i.getShaderParameter(s,i.COMPILE_STATUS)){const t=`Vertex shader compilation failed: ${i.getShaderInfoLog(s)}`;throw new Error(t)}if(i.deleteShader(s),!i.getProgramParameter(r,i.LINK_STATUS)){const t=`GL program linking failed: ${i.getProgramInfoLog(r)}`;throw new Error(t)}return r}getUniformLocation(t){const e=(0,o.v6)(this.currentProgram_);return void 0===this.uniformLocationsByProgram_[e]&&(this.uniformLocationsByProgram_[e]={}),void 0===this.uniformLocationsByProgram_[e][t]&&(this.uniformLocationsByProgram_[e][t]=this.gl_.getUniformLocation(this.currentProgram_,t)),this.uniformLocationsByProgram_[e][t]}getAttributeLocation(t){const e=(0,o.v6)(this.currentProgram_);return void 0===this.attribLocationsByProgram_[e]&&(this.attribLocationsByProgram_[e]={}),void 0===this.attribLocationsByProgram_[e][t]&&(this.attribLocationsByProgram_[e][t]=this.gl_.getAttribLocation(this.currentProgram_,t)),this.attribLocationsByProgram_[e][t]}makeProjectionTransform(t,e){const i=t.size,n=t.viewState.rotation,s=t.viewState.resolution,r=t.viewState.center;return(0,c.Zz)(e,0,0,2/(s*i[0]),2/(s*i[1]),-n,-r[0],-r[1]),e}setUniformFloatValue(t,e){this.gl_.uniform1f(this.getUniformLocation(t),e)}setUniformFloatVec2(t,e){this.gl_.uniform2fv(this.getUniformLocation(t),e)}setUniformFloatVec4(t,e){this.gl_.uniform4fv(this.getUniformLocation(t),e)}setUniformMatrixValue(t,e){this.gl_.uniformMatrix4fv(this.getUniformLocation(t),!1,e)}enableAttributeArray_(t,e,i,n,s){const r=this.getAttributeLocation(t);r<0||(this.gl_.enableVertexAttribArray(r),this.gl_.vertexAttribPointer(r,e,i,!1,n,s))}enableAttributes(t){const e=function(t){let e=0;for(let i=0;i{"use strict";function e(t,e,n){n=n||2;var r,o,a,l,u,d,_,f=e&&e.length,p=f?e[0]*n:t.length,m=i(t,0,p,n,!0),x=[];if(!m||m.next===m.prev)return x;if(f&&(m=function(t,e,n,s){var r,o,a,l=[];for(r=0,o=e.length;r80*n){r=a=t[0],o=l=t[1];for(var v=n;va&&(a=u),d>l&&(l=d);_=0!==(_=Math.max(a-r,l-o))?32767/_:0}return s(m,x,n,r,o,_,0),x}function i(t,e,i,n,s){var r,o;if(s===R(t,e,i,n)>0)for(r=e;r=e;r-=n)o=A(r,t[r],t[r+1],o);return o&&m(o,o.next)&&(C(o),o=o.next),o}function n(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!m(n,n.next)&&0!==p(n.prev,n,n.next))n=n.next;else{if(C(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function s(t,e,i,h,c,u,g){if(t){!g&&u&&function(t,e,i,n){var s=t;do{0===s.z&&(s.z=d(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,l,h=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||l>0&&n;)0!==a&&(0===l||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,l--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,h*=2}while(o>1)}(s)}(t,h,c,u);for(var _,f,p=t;t.prev!==t.next;)if(_=t.prev,f=t.next,u?o(t,h,c,u):r(t))e.push(_.i/i|0),e.push(t.i/i|0),e.push(f.i/i|0),C(t),t=f.next,p=f.next;else if((t=f)===p){g?1===g?s(t=a(n(t),e,i),e,i,h,c,u,2):2===g&&l(t,e,i,h,c,u):s(n(t),e,i,h,c,u,1);break}}}function r(t){var e=t.prev,i=t,n=t.next;if(p(e,i,n)>=0)return!1;for(var s=e.x,r=i.x,o=n.x,a=e.y,l=i.y,h=n.y,c=sr?s>o?s:o:r>o?r:o,g=a>l?a>h?a:h:l>h?l:h,f=n.next;f!==e;){if(f.x>=c&&f.x<=d&&f.y>=u&&f.y<=g&&_(s,a,r,l,o,h,f.x,f.y)&&p(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function o(t,e,i,n){var s=t.prev,r=t,o=t.next;if(p(s,r,o)>=0)return!1;for(var a=s.x,l=r.x,h=o.x,c=s.y,u=r.y,g=o.y,f=al?a>h?a:h:l>h?l:h,v=c>u?c>g?c:g:u>g?u:g,y=d(f,m,e,i,n),E=d(x,v,e,i,n),T=t.prevZ,A=t.nextZ;T&&T.z>=y&&A&&A.z<=E;){if(T.x>=f&&T.x<=x&&T.y>=m&&T.y<=v&&T!==s&&T!==o&&_(a,c,l,u,h,g,T.x,T.y)&&p(T.prev,T,T.next)>=0)return!1;if(T=T.prevZ,A.x>=f&&A.x<=x&&A.y>=m&&A.y<=v&&A!==s&&A!==o&&_(a,c,l,u,h,g,A.x,A.y)&&p(A.prev,A,A.next)>=0)return!1;A=A.nextZ}for(;T&&T.z>=y;){if(T.x>=f&&T.x<=x&&T.y>=m&&T.y<=v&&T!==s&&T!==o&&_(a,c,l,u,h,g,T.x,T.y)&&p(T.prev,T,T.next)>=0)return!1;T=T.prevZ}for(;A&&A.z<=E;){if(A.x>=f&&A.x<=x&&A.y>=m&&A.y<=v&&A!==s&&A!==o&&_(a,c,l,u,h,g,A.x,A.y)&&p(A.prev,A,A.next)>=0)return!1;A=A.nextZ}return!0}function a(t,e,i){var s=t;do{var r=s.prev,o=s.next.next;!m(r,o)&&x(r,s,s.next,o)&&E(r,o)&&E(o,r)&&(e.push(r.i/i|0),e.push(s.i/i|0),e.push(o.i/i|0),C(s),C(s.next),s=t=o),s=s.next}while(s!==t);return n(s)}function l(t,e,i,r,o,a){var l=t;do{for(var h=l.next.next;h!==l.prev;){if(l.i!==h.i&&f(l,h)){var c=T(l,h);return l=n(l,l.next),c=n(c,c.next),s(l,e,i,r,o,a,0),void s(c,e,i,r,o,a,0)}h=h.next}l=l.next}while(l!==t)}function h(t,e){return t.x-e.x}function c(t,e){var i=function(t,e){var i,n=e,s=t.x,r=t.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o&&(o=a,i=n.x=n.x&&n.x>=c&&s!==n.x&&_(ri.x||n.x===i.x&&u(i,n)))&&(i=n,g=l)),n=n.next}while(n!==h);return i}(t,e);if(!i)return e;var s=T(i,t);return n(s,s.next),n(i,i.next)}function u(t,e){return p(t.prev,t,e.prev)<0&&p(e.next,t,t.next)<0}function d(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-i)*s|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*s|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function g(t){var e=t,i=t;do{(e.x=(t-o)*(r-a)&&(t-o)*(n-a)>=(i-o)*(e-a)&&(i-o)*(r-a)>=(s-o)*(n-a)}function f(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&x(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(E(t,e)&&E(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)&&(p(t.prev,t,e.prev)||p(t,e.prev,e))||m(t,e)&&p(t.prev,t,t.next)>0&&p(e.prev,e,e.next)>0)}function p(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function m(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,i,n){var s=y(p(t,e,i)),r=y(p(t,e,n)),o=y(p(i,n,t)),a=y(p(i,n,e));return s!==r&&o!==a||!(0!==s||!v(t,i,e))||!(0!==r||!v(t,n,e))||!(0!==o||!v(i,t,n))||!(0!==a||!v(i,e,n))}function v(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function y(t){return t>0?1:t<0?-1:0}function E(t,e){return p(t.prev,t,t.next)<0?p(t,e,t.next)>=0&&p(t,t.prev,e)>=0:p(t,e,t.prev)<0||p(t,t.next,e)<0}function T(t,e){var i=new S(t.i,t.x,t.y),n=new S(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function A(t,e,i,n){var s=new S(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function C(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function R(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},5341:function(t){t.exports=function(){"use strict";function t(t,n,s,r,o){!function t(i,n,s,r,o){for(;r>s;){if(r-s>600){var a=r-s+1,l=n-s+1,h=Math.log(a),c=.5*Math.exp(2*h/3),u=.5*Math.sqrt(h*c*(a-c)/a)*(l-a/2<0?-1:1);t(i,n,Math.max(s,Math.floor(n-l*c/a+u)),Math.min(r,Math.floor(n+(a-l)*c/a+u)),o)}var d=i[n],g=s,_=r;for(e(i,s,n),o(i[r],d)>0&&e(i,s,r);g<_;){for(e(i,g,_),g++,_--;o(i[g],d)<0;)g++;for(;o(i[_],d)>0;)_--}0===o(i[s],d)?e(i,s,_):e(i,++_,r),_<=n&&(s=_+1),n<=_&&(r=_-1)}}(t,n,s||0,r||t.length-1,o||i)}function e(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function i(t,e){return te?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function s(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n=t.minX&&e.maxY>=t.minY}function _(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function f(e,i,n,s,r){for(var o=[i,n];o.length;)if(!((n=o.pop())-(i=o.pop())<=s)){var a=i+Math.ceil((n-i)/s/2)*s;t(e,a,i,n,r),o.push(i,a,a,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,i=[];if(!g(t,e))return i;for(var n=this.toBBox,s=[];e;){for(var r=0;r=0&&s[e].children.length>this._maxEntries;)this._split(s,e),e--;this._adjustParentBBoxes(n,s,e)},n.prototype._split=function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var o=this._chooseSplitIndex(i,s,n),a=_(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,r(i,this.toBBox),r(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},n.prototype._splitRoot=function(t,e){this.data=_([t,e]),this.data.height=t.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,i){for(var n,s,r,a,l,h,u,d=1/0,g=1/0,_=e;_<=i-e;_++){var f=o(t,0,_,this.toBBox),p=o(t,_,i,this.toBBox),m=(s=f,r=p,void 0,void 0,void 0,void 0,a=Math.max(s.minX,r.minX),l=Math.max(s.minY,r.minY),h=Math.min(s.maxX,r.maxX),u=Math.min(s.maxY,r.maxY),Math.max(0,h-a)*Math.max(0,u-l)),x=c(f)+c(p);m=e;g--){var _=t.children[g];a(l,t.leaf?s(_):_),h+=u(l)}return h},n.prototype._adjustParentBBoxes=function(t,e,i){for(var n=i;n>=0;n--)a(e[n],t)},n.prototype._condense=function(t){for(var e=t.length-1,i=void 0;e>=0;e--)0===t[e].children.length?e>0?(i=t[e-1].children).splice(i.indexOf(t[e]),1):this.clear():r(t[e],this.toBBox)},n}()},9303:(t,e,i)=>{"use strict";i.d(e,{q:()=>g});const n="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,s=new Set,r={env:{RLAYERS_DEBUG:void 0}},o=(t,e,i,n)=>{"function"==typeof r.emitWarning?r.emitWarning(t,e,i,n):console.error(`[${i}] ${e}: ${t}`)};let a=globalThis.AbortController,l=globalThis.AbortSignal;if(void 0===a){l=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(t,e){this._onabort.push(e)}},a=class{constructor(){e()}signal=new l;abort(t){if(!this.signal.aborted){this.signal.reason=t,this.signal.aborted=!0;for(const e of this.signal._onabort)e(t);this.signal.onabort?.(t)}}};let t="1"!==r.env?.LRU_CACHE_IGNORE_AC_WARNING;const e=()=>{t&&(t=!1,o("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}Symbol("type");const h=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),c=t=>h(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?u:null:null;class u extends Array{constructor(t){super(t),this.fill(0)}}class d{heap;length;static#t=!1;static create(t){const e=c(t);if(!e)return[];d.#t=!0;const i=new d(t,e);return d.#t=!1,i}constructor(t,e){if(!d.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class g{#e;#i;#n;#s;#r;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#a;#l;#h;#c;#u;#d;#g;#_;#f;#p;#m;#x;#v;#y;#E;#T;static unsafeExposeInternals(t){return{starts:t.#x,ttls:t.#v,sizes:t.#m,keyMap:t.#l,keyList:t.#h,valList:t.#c,next:t.#u,prev:t.#d,get head(){return t.#g},get tail(){return t.#_},free:t.#f,isBackgroundFetch:e=>t.#A(e),backgroundFetch:(e,i,n,s)=>t.#C(e,i,n,s),moveToTail:e=>t.#S(e),indexes:e=>t.#R(e),rindexes:e=>t.#w(e),isStale:e=>t.#b(e)}}get max(){return this.#e}get maxSize(){return this.#i}get calculatedSize(){return this.#a}get size(){return this.#o}get fetchMethod(){return this.#r}get dispose(){return this.#n}get disposeAfter(){return this.#s}constructor(t){const{max:e=0,ttl:i,ttlResolution:n=1,ttlAutopurge:r,updateAgeOnGet:a,updateAgeOnHas:l,allowStale:u,dispose:_,disposeAfter:f,noDisposeOnSet:p,noUpdateTTL:m,maxSize:x=0,maxEntrySize:v=0,sizeCalculation:y,fetchMethod:E,noDeleteOnFetchRejection:T,noDeleteOnStaleGet:A,allowStaleOnFetchRejection:C,allowStaleOnFetchAbort:S,ignoreFetchAbort:R}=t;if(0!==e&&!h(e))throw new TypeError("max option must be a nonnegative integer");const w=e?c(e):Array;if(!w)throw new Error("invalid max value: "+e);if(this.#e=e,this.#i=x,this.maxEntrySize=v||this.#i,this.sizeCalculation=y,this.sizeCalculation){if(!this.#i&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==E&&"function"!=typeof E)throw new TypeError("fetchMethod must be a function if specified");if(this.#r=E,this.#E=!!E,this.#l=new Map,this.#h=new Array(e).fill(void 0),this.#c=new Array(e).fill(void 0),this.#u=new w(e),this.#d=new w(e),this.#g=0,this.#_=0,this.#f=d.create(e),this.#o=0,this.#a=0,"function"==typeof _&&(this.#n=_),"function"==typeof f?(this.#s=f,this.#p=[]):(this.#s=void 0,this.#p=void 0),this.#y=!!this.#n,this.#T=!!this.#s,this.noDisposeOnSet=!!p,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!T,this.allowStaleOnFetchRejection=!!C,this.allowStaleOnFetchAbort=!!S,this.ignoreFetchAbort=!!R,0!==this.maxEntrySize){if(0!==this.#i&&!h(this.#i))throw new TypeError("maxSize must be a positive integer if specified");if(!h(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#I()}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!A,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!l,this.ttlResolution=h(n)||0===n?n:1,this.ttlAutopurge=!!r,this.ttl=i||0,this.ttl){if(!h(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#L()}if(0===this.#e&&0===this.ttl&&0===this.#i)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#i){const t="LRU_CACHE_UNBOUNDED";(t=>!s.has(t))(t)&&(s.add(t),o("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",t,g))}}getRemainingTTL(t){return this.#l.has(t)?1/0:0}#L(){const t=new u(this.#e),e=new u(this.#e);this.#v=t,this.#x=e,this.#P=(i,s,r=n.now())=>{if(e[i]=0!==s?r:0,t[i]=s,0!==s&&this.ttlAutopurge){const t=setTimeout((()=>{this.#b(i)&&this.delete(this.#h[i])}),s+1);t.unref&&t.unref()}},this.#M=i=>{e[i]=0!==t[i]?n.now():0},this.#D=(n,r)=>{if(t[r]){const o=t[r],a=e[r];if(!o||!a)return;n.ttl=o,n.start=a,n.now=i||s();const l=n.now-a;n.remainingTTL=o-l}};let i=0;const s=()=>{const t=n.now();if(this.ttlResolution>0){i=t;const e=setTimeout((()=>i=0),this.ttlResolution);e.unref&&e.unref()}return t};this.getRemainingTTL=n=>{const r=this.#l.get(n);if(void 0===r)return 0;const o=t[r],a=e[r];return o&&a?o-((i||s())-a):1/0},this.#b=n=>{const r=e[n],o=t[n];return!!o&&!!r&&(i||s())-r>o}}#M=()=>{};#D=()=>{};#P=()=>{};#b=()=>!1;#I(){const t=new u(this.#e);this.#a=0,this.#m=t,this.#F=e=>{this.#a-=t[e],t[e]=0},this.#O=(t,e,i,n)=>{if(this.#A(e))return 0;if(!h(i)){if(!n)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof n)throw new TypeError("sizeCalculation must be a function");if(i=n(e,t),!h(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return i},this.#k=(e,i,n)=>{if(t[e]=i,this.#i){const i=this.#i-t[e];for(;this.#a>i;)this.#N(!0)}this.#a+=t[e],n&&(n.entrySize=i,n.totalCalculatedSize=this.#a)}}#F=t=>{};#k=(t,e,i)=>{};#O=(t,e,i,n)=>{if(i||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#R({allowStale:t=this.allowStale}={}){if(this.#o)for(let e=this.#_;this.#G(e)&&(!t&&this.#b(e)||(yield e),e!==this.#g);)e=this.#d[e]}*#w({allowStale:t=this.allowStale}={}){if(this.#o)for(let e=this.#g;this.#G(e)&&(!t&&this.#b(e)||(yield e),e!==this.#_);)e=this.#u[e]}#G(t){return void 0!==t&&this.#l.get(this.#h[t])===t}*entries(){for(const t of this.#R())void 0===this.#c[t]||void 0===this.#h[t]||this.#A(this.#c[t])||(yield[this.#h[t],this.#c[t]])}*rentries(){for(const t of this.#w())void 0===this.#c[t]||void 0===this.#h[t]||this.#A(this.#c[t])||(yield[this.#h[t],this.#c[t]])}*keys(){for(const t of this.#R()){const e=this.#h[t];void 0===e||this.#A(this.#c[t])||(yield e)}}*rkeys(){for(const t of this.#w()){const e=this.#h[t];void 0===e||this.#A(this.#c[t])||(yield e)}}*values(){for(const t of this.#R())void 0===this.#c[t]||this.#A(this.#c[t])||(yield this.#c[t])}*rvalues(){for(const t of this.#w())void 0===this.#c[t]||this.#A(this.#c[t])||(yield this.#c[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(const i of this.#R()){const n=this.#c[i],s=this.#A(n)?n.__staleWhileFetching:n;if(void 0!==s&&t(s,this.#h[i],this))return this.get(this.#h[i],e)}}forEach(t,e=this){for(const i of this.#R()){const n=this.#c[i],s=this.#A(n)?n.__staleWhileFetching:n;void 0!==s&&t.call(e,s,this.#h[i],this)}}rforEach(t,e=this){for(const i of this.#w()){const n=this.#c[i],s=this.#A(n)?n.__staleWhileFetching:n;void 0!==s&&t.call(e,s,this.#h[i],this)}}purgeStale(){let t=!1;for(const e of this.#w({allowStale:!0}))this.#b(e)&&(this.delete(this.#h[e]),t=!0);return t}info(t){const e=this.#l.get(t);if(void 0===e)return;const i=this.#c[e],s=this.#A(i)?i.__staleWhileFetching:i;if(void 0===s)return;const r={value:s};if(this.#v&&this.#x){const t=this.#v[e],i=this.#x[e];if(t&&i){const e=t-(n.now()-i);r.ttl=e,r.start=Date.now()}}return this.#m&&(r.size=this.#m[e]),r}dump(){const t=[];for(const e of this.#R({allowStale:!0})){const i=this.#h[e],s=this.#c[e],r=this.#A(s)?s.__staleWhileFetching:s;if(void 0===r||void 0===i)continue;const o={value:r};if(this.#v&&this.#x){o.ttl=this.#v[e];const t=n.now()-this.#x[e];o.start=Math.floor(Date.now()-t)}this.#m&&(o.size=this.#m[e]),t.unshift([i,o])}return t}load(t){this.clear();for(const[e,i]of t){if(i.start){const t=Date.now()-i.start;i.start=n.now()-t}this.set(e,i.value,i)}}set(t,e,i={}){if(void 0===e)return this.delete(t),this;const{ttl:n=this.ttl,start:s,noDisposeOnSet:r=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:a}=i;let{noUpdateTTL:l=this.noUpdateTTL}=i;const h=this.#O(t,e,i.size||0,o);if(this.maxEntrySize&&h>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.delete(t),this;let c=0===this.#o?void 0:this.#l.get(t);if(void 0===c)c=0===this.#o?this.#_:0!==this.#f.length?this.#f.pop():this.#o===this.#e?this.#N(!1):this.#o,this.#h[c]=t,this.#c[c]=e,this.#l.set(t,c),this.#u[this.#_]=c,this.#d[c]=this.#_,this.#_=c,this.#o++,this.#k(c,h,a),a&&(a.set="add"),l=!1;else{this.#S(c);const i=this.#c[c];if(e!==i){if(this.#E&&this.#A(i)){i.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:e}=i;void 0===e||r||(this.#y&&this.#n?.(e,t,"set"),this.#T&&this.#p?.push([e,t,"set"]))}else r||(this.#y&&this.#n?.(i,t,"set"),this.#T&&this.#p?.push([i,t,"set"]));if(this.#F(c),this.#k(c,h,a),this.#c[c]=e,a){a.set="replace";const t=i&&this.#A(i)?i.__staleWhileFetching:i;void 0!==t&&(a.oldValue=t)}}else a&&(a.set="update")}if(0===n||this.#v||this.#L(),this.#v&&(l||this.#P(c,n,s),a&&this.#D(a,c)),!r&&this.#T&&this.#p){const t=this.#p;let e;for(;e=t?.shift();)this.#s?.(...e)}return this}pop(){try{for(;this.#o;){const t=this.#c[this.#g];if(this.#N(!0),this.#A(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(void 0!==t)return t}}finally{if(this.#T&&this.#p){const t=this.#p;let e;for(;e=t?.shift();)this.#s?.(...e)}}}#N(t){const e=this.#g,i=this.#h[e],n=this.#c[e];return this.#E&&this.#A(n)?n.__abortController.abort(new Error("evicted")):(this.#y||this.#T)&&(this.#y&&this.#n?.(n,i,"evict"),this.#T&&this.#p?.push([n,i,"evict"])),this.#F(e),t&&(this.#h[e]=void 0,this.#c[e]=void 0,this.#f.push(e)),1===this.#o?(this.#g=this.#_=0,this.#f.length=0):this.#g=this.#u[e],this.#l.delete(i),this.#o--,e}has(t,e={}){const{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=e,s=this.#l.get(t);if(void 0!==s){const t=this.#c[s];if(this.#A(t)&&void 0===t.__staleWhileFetching)return!1;if(!this.#b(s))return i&&this.#M(s),n&&(n.has="hit",this.#D(n,s)),!0;n&&(n.has="stale",this.#D(n,s))}else n&&(n.has="miss");return!1}peek(t,e={}){const{allowStale:i=this.allowStale}=e,n=this.#l.get(t);if(void 0===n||!i&&this.#b(n))return;const s=this.#c[n];return this.#A(s)?s.__staleWhileFetching:s}#C(t,e,i,n){const s=void 0===e?void 0:this.#c[e];if(this.#A(s))return s;const r=new a,{signal:o}=i;o?.addEventListener("abort",(()=>r.abort(o.reason)),{signal:r.signal});const l={signal:r.signal,options:i,context:n},h=(n,s=!1)=>{const{aborted:o}=r.signal,a=i.ignoreFetchAbort&&void 0!==n;if(i.status&&(o&&!s?(i.status.fetchAborted=!0,i.status.fetchError=r.signal.reason,a&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),o&&!a&&!s)return c(r.signal.reason);const h=u;return this.#c[e]===u&&(void 0===n?h.__staleWhileFetching?this.#c[e]=h.__staleWhileFetching:this.delete(t):(i.status&&(i.status.fetchUpdated=!0),this.set(t,n,l.options))),n},c=n=>{const{aborted:s}=r.signal,o=s&&i.allowStaleOnFetchAbort,a=o||i.allowStaleOnFetchRejection,l=a||i.noDeleteOnFetchRejection,h=u;if(this.#c[e]===u&&(l&&void 0!==h.__staleWhileFetching?o||(this.#c[e]=h.__staleWhileFetching):this.delete(t)),a)return i.status&&void 0!==h.__staleWhileFetching&&(i.status.returnedStale=!0),h.__staleWhileFetching;if(h.__returned===h)throw n};i.status&&(i.status.fetchDispatched=!0);const u=new Promise(((e,n)=>{const o=this.#r?.(t,s,l);o&&o instanceof Promise&&o.then((t=>e(void 0===t?void 0:t)),n),r.signal.addEventListener("abort",(()=>{i.ignoreFetchAbort&&!i.allowStaleOnFetchAbort||(e(void 0),i.allowStaleOnFetchAbort&&(e=t=>h(t,!0)))}))})).then(h,(t=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=t),c(t)))),d=Object.assign(u,{__abortController:r,__staleWhileFetching:s,__returned:void 0});return void 0===e?(this.set(t,d,{...l.options,status:void 0}),e=this.#l.get(t)):this.#c[e]=d,d}#A(t){if(!this.#E)return!1;const e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof a}async fetch(t,e={}){const{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:r=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:_,forceRefresh:f=!1,status:p,signal:m}=e;if(!this.#E)return p&&(p.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,status:p});const x={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,ttl:r,noDisposeOnSet:o,size:a,sizeCalculation:l,noUpdateTTL:h,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:g,ignoreFetchAbort:d,status:p,signal:m};let v=this.#l.get(t);if(void 0===v){p&&(p.fetch="miss");const e=this.#C(t,v,x,_);return e.__returned=e}{const e=this.#c[v];if(this.#A(e)){const t=i&&void 0!==e.__staleWhileFetching;return p&&(p.fetch="inflight",t&&(p.returnedStale=!0)),t?e.__staleWhileFetching:e.__returned=e}const s=this.#b(v);if(!f&&!s)return p&&(p.fetch="hit"),this.#S(v),n&&this.#M(v),p&&this.#D(p,v),e;const r=this.#C(t,v,x,_),o=void 0!==r.__staleWhileFetching&&i;return p&&(p.fetch=s?"stale":"refresh",o&&s&&(p.returnedStale=!0)),o?r.__staleWhileFetching:r.__returned=r}}get(t,e={}){const{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:r}=e,o=this.#l.get(t);if(void 0!==o){const e=this.#c[o],a=this.#A(e);return r&&this.#D(r,o),this.#b(o)?(r&&(r.get="stale"),a?(r&&i&&void 0!==e.__staleWhileFetching&&(r.returnedStale=!0),i?e.__staleWhileFetching:void 0):(s||this.delete(t),r&&i&&(r.returnedStale=!0),i?e:void 0)):(r&&(r.get="hit"),a?e.__staleWhileFetching:(this.#S(o),n&&this.#M(o),e))}r&&(r.get="miss")}#z(t,e){this.#d[e]=t,this.#u[t]=e}#S(t){t!==this.#_&&(t===this.#g?this.#g=this.#u[t]:this.#z(this.#d[t],this.#u[t]),this.#z(this.#_,t),this.#_=t)}delete(t){let e=!1;if(0!==this.#o){const i=this.#l.get(t);if(void 0!==i)if(e=!0,1===this.#o)this.clear();else{this.#F(i);const e=this.#c[i];if(this.#A(e)?e.__abortController.abort(new Error("deleted")):(this.#y||this.#T)&&(this.#y&&this.#n?.(e,t,"delete"),this.#T&&this.#p?.push([e,t,"delete"])),this.#l.delete(t),this.#h[i]=void 0,this.#c[i]=void 0,i===this.#_)this.#_=this.#d[i];else if(i===this.#g)this.#g=this.#u[i];else{const t=this.#d[i];this.#u[t]=this.#u[i];const e=this.#u[i];this.#d[e]=this.#d[i]}this.#o--,this.#f.push(i)}}if(this.#T&&this.#p?.length){const t=this.#p;let e;for(;e=t?.shift();)this.#s?.(...e)}return e}clear(){for(const t of this.#w({allowStale:!0})){const e=this.#c[t];if(this.#A(e))e.__abortController.abort(new Error("deleted"));else{const i=this.#h[t];this.#y&&this.#n?.(e,i,"delete"),this.#T&&this.#p?.push([e,i,"delete"])}}if(this.#l.clear(),this.#c.fill(void 0),this.#h.fill(void 0),this.#v&&this.#x&&(this.#v.fill(0),this.#x.fill(0)),this.#m&&this.#m.fill(0),this.#g=0,this.#_=0,this.#f.length=0,this.#a=0,this.#o=0,this.#T&&this.#p){const t=this.#p;let e;for(;e=t?.shift();)this.#s?.(...e)}}}},71:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(4120),s=i(2135),r=i(1685);const o="length";class a extends r.Ay{constructor(t,e,i){super(t),this.element=e,this.index=i}}class l extends n.A{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],this.unique_)for(let t=0,e=this.array_.length;t0;)this.pop()}extend(t){for(let e=0,i=t.length;ethis.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new a(s.A.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let i=0,n=e.length;i=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new a(s.A.REMOVE,e,t)),e}setAt(t,e){if(t>=this.getLength())return void this.insertAt(t,e);if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const i=this.array_[t];this.array_[t]=e,this.dispatchEvent(new a(s.A.REMOVE,i,t)),this.dispatchEvent(new a(s.A.ADD,e,t))}updateLength_(){this.set(o,this.array_.length)}assertUnique_(t,e){for(let i=0,n=this.array_.length;i{"use strict";i.d(e,{A:()=>n});const n={ADD:"add",REMOVE:"remove"}},7607:(t,e,i)=>{"use strict";i.d(e,{$r:()=>h,Ay:()=>d,bL:()=>a,xo:()=>o});var n=i(8143),s=i(1078),r=i(8711);function o(t){return t instanceof Image||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageBitmap?t:null}function a(t){return t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Float32Array||t instanceof DataView?t:null}let l=null;function h(t){l||(l=(0,r.Y)(t.width,t.height,void 0,{willReadFrequently:!0}));const e=l.canvas,i=t.width;e.width!==i&&(e.width=i);const n=t.height;return e.height!==n&&(e.height=n),l.clearRect(0,0,i,n),l.drawImage(t,0,0),l.getImageData(0,0,i,n).data}const c=[256,256];class u extends n.A{constructor(t){const e=s.A.IDLE;super(t.tileCoord,e,{transition:t.transition,interpolate:t.interpolate}),this.loader_=t.loader,this.data_=null,this.error_=null,this.size_=t.size||null}getSize(){if(this.size_)return this.size_;const t=o(this.data_);return t?[t.width,t.height]:c}getData(){return this.data_}getError(){return this.error_}load(){if(this.state!==s.A.IDLE&&this.state!==s.A.ERROR)return;this.state=s.A.LOADING,this.changed();const t=this;this.loader_().then((function(e){t.data_=e,t.state=s.A.LOADED,t.changed()})).catch((function(e){t.error_=e,t.state=s.A.ERROR,t.changed()}))}}const d=u},25:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n=class{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}},6717:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var n=i(4120),s=i(6837),r=i(588),o=i(9438);class a extends n.A{constructor(t){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),t)if("function"==typeof t.getSimplifiedGeometry){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new a(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const i=this.getStyle();return i&&t.setStyle(i),t}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&((0,o.JH)(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=(0,o.KT)(t,s.A.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?function(t){if("function"==typeof t)return t;let e;return Array.isArray(t)?e=t:((0,r.v)("function"==typeof t.getZIndex,"Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),e=[t]),function(){return e}}(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}const l=a},5213:(t,e,i)=>{"use strict";i.d(e,{A:()=>y});var n=i(1685),s=i(4120),r=i(1064),o=i(3407),a=i(1597);const l="accuracy",h="accuracyGeometry",c="altitude",u="altitudeAccuracy",d="heading",g="position",_="projection",f="speed",p="tracking",m="trackingOptions";class x extends n.Ay{constructor(t){super("error"),this.code=t.code,this.message=t.message}}class v extends s.A{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.position_=null,this.transform_=o.R6,this.watchId_=void 0,this.addChangeListener(_,this.handleProjectionChanged_),this.addChangeListener(p,this.handleTrackingChanged_),void 0!==t.projection&&this.setProjection(t.projection),void 0!==t.trackingOptions&&this.setTrackingOptions(t.trackingOptions),this.setTracking(void 0!==t.tracking&&t.tracking)}disposeInternal(){this.setTracking(!1),super.disposeInternal()}handleProjectionChanged_(){const t=this.getProjection();t&&(this.transform_=(0,o.FO)((0,o.Jt)("EPSG:4326"),t),this.position_&&this.set(g,this.transform_(this.position_)))}handleTrackingChanged_(){if("geolocation"in navigator){const t=this.getTracking();t&&void 0===this.watchId_?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):t||void 0===this.watchId_||(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}}positionChange_(t){const e=t.coords;this.set(l,e.accuracy),this.set(c,null===e.altitude?void 0:e.altitude),this.set(u,null===e.altitudeAccuracy?void 0:e.altitudeAccuracy),this.set(d,null===e.heading?void 0:(0,a.eh)(e.heading)),this.position_?(this.position_[0]=e.longitude,this.position_[1]=e.latitude):this.position_=[e.longitude,e.latitude];const i=this.transform_(this.position_);this.set(g,i.slice()),this.set(f,null===e.speed?void 0:e.speed);const n=(0,r.kj)(this.position_,e.accuracy);n.applyTransform(this.transform_),this.set(h,n),this.changed()}positionError_(t){this.dispatchEvent(new x(t))}getAccuracy(){return this.get(l)}getAccuracyGeometry(){return this.get(h)||null}getAltitude(){return this.get(c)}getAltitudeAccuracy(){return this.get(u)}getHeading(){return this.get(d)}getPosition(){return this.get(g)}getProjection(){return this.get(_)}getSpeed(){return this.get(f)}getTracking(){return this.get(p)}getTrackingOptions(){return this.get(m)}setProjection(t){this.set(_,(0,o.Jt)(t))}setTracking(t){this.set(p,t)}setTrackingOptions(t){this.set(m,t)}}const y=v},3938:(t,e,i)=>{"use strict";i.d(e,{Ay:()=>g,D4:()=>d,RA:()=>u,f6:()=>c});var n=i(9332),s=i(6837),r=i(6141),o=i(7771),a=i(9438),l=i(4238);class h extends n.A{constructor(t,e,i,n){super(),this.extent=t,this.pixelRatio_=i,this.resolution=e,this.state="function"==typeof n?r.A.IDLE:n,this.image_=null,this.loader="function"==typeof n?n:null}changed(){this.dispatchEvent(s.A.CHANGE)}getExtent(){return this.extent}getImage(){return this.image_}getPixelRatio(){return this.pixelRatio_}getResolution(){return this.resolution}getState(){return this.state}load(){if(this.state==r.A.IDLE&&this.loader){this.state=r.A.LOADING,this.changed();const t=this.getResolution(),e=Array.isArray(t)?t[0]:t;(0,l.hq)((()=>this.loader(this.getExtent(),e,this.getPixelRatio()))).then((t=>{"image"in t&&(this.image_=t.image),"extent"in t&&(this.extent=t.extent),"resolution"in t&&(this.resolution=t.resolution),"pixelRatio"in t&&(this.pixelRatio_=t.pixelRatio),(t instanceof HTMLImageElement||t instanceof ImageBitmap||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement)&&(this.image_=t),this.state=r.A.LOADED})).catch((t=>{this.state=r.A.ERROR,console.error(t)})).finally((()=>this.changed()))}}setImage(t){this.image_=t}setResolution(t){this.resolution=t}}function c(t,e,i){const n=t;let r=!0,l=!1,h=!1;const c=[(0,a.Jz)(n,s.A.LOAD,(function(){h=!0,l||e()}))];return n.src&&o.DT?(l=!0,n.decode().then((function(){r&&e()})).catch((function(t){r&&(h?e():i())}))):c.push((0,a.Jz)(n,s.A.ERROR,i)),function(){r=!1,c.forEach(a.JH)}}function u(t,e){return e&&(t.src=e),t.src&&o.DT?new Promise(((e,i)=>t.decode().then((()=>e(t))).catch((n=>t.complete&&t.width?e(t):i(n))))):function(t,e){return new Promise(((e,i)=>{function n(){r(),e(t)}function s(){r(),i(new Error("Image load error"))}function r(){t.removeEventListener("load",n),t.removeEventListener("error",s)}t.addEventListener("load",n),t.addEventListener("error",s)}))}(t)}function d(t,e){return e&&(t.src=e),t.src&&o.DT&&o.XM?t.decode().then((()=>createImageBitmap(t))).catch((e=>{if(t.complete&&t.width)return t;throw e})):u(t)}const g=h},6141:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4}},190:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var n=i(8143),s=i(1078),r=i(8711),o=i(3938);class a extends n.A{constructor(t,e,i,n,s,r){super(t,e,r),this.crossOrigin_=n,this.src_=i,this.key=i,this.image_=new Image,null!==n&&(this.image_.crossOrigin=n),this.unlisten_=null,this.tileLoadFunction_=s}getImage(){return this.image_}setImage(t){this.image_=t,this.state=s.A.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=s.A.ERROR,this.unlistenImage_(),this.image_=function(){const t=(0,r.Y)(1,1);return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas}(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=s.A.LOADED:this.state=s.A.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==s.A.ERROR&&(this.state=s.A.IDLE,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==s.A.IDLE&&(this.state=s.A.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=(0,o.f6)(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}const l=a},2961:(t,e,i)=>{"use strict";i.d(e,{A:()=>mt});var n=i(4120),s=i(71),r=i(2135),o=i(2284),a=i(25),l=i(4238),h=i(4087),c=i(9703),u=i(915),d=i(2241),g=i(764),_=i(6933);class f extends a.A{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){(0,h.b0)()}calculateMatrices2D(t){const e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;(0,c.Zz)(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),(0,c.T9)(n,i)}forEachFeatureAtCoordinate(t,e,i,n,s,r,o,a){let l;const h=e.viewState;function c(t,e,i,n){return s.call(r,e,t?i:null,n)}const d=h.projection,f=(0,_.Li)(t.slice(),d),p=[[0,0]];if(d.canWrapX()&&n){const t=d.getExtent(),e=(0,u.RG)(t);p.push([-e,0],[e,0])}const m=e.layerStatesArray,x=m.length,v=[],y=[];for(let n=0;n=0;--s){const r=m[s],u=r.layer;if(u.hasRenderer()&&(0,g.l)(r,h)&&o.call(a,u)){const s=u.getRenderer(),o=u.getSource();if(s&&o){const a=o.getWrapX()?f:t,h=c.bind(null,r.managed);y[0]=a[0]+p[n][0],y[1]=a[1]+p[n][1],l=s.forEachFeatureAtCoordinate(y,e,i,h,v)}if(l)return l}}if(0===v.length)return;const E=1/v.length;return v.forEach(((t,e)=>t.distanceSq+=e*E)),v.sort(((t,e)=>t.distanceSq-e.distanceSq)),v.some((t=>l=t.callback(t.feature,t.layer,t.geometry))),l}hasFeatureAtCoordinate(t,e,i,n,s,r){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,n,l.rT,this,s,r)}getMap(){return this.map_}renderFrame(t){(0,h.b0)()}scheduleExpireIconCache(t){d.ue.canExpireCache()&&t.postRenderFunctions.push(p)}}function p(t,e){d.ue.expire()}const m=f;var x=i(8450),v=i(9960),y=i(3984),E=i(5176),T=i(8774),A=i(9438),C=i(8711);const S=class extends m{constructor(t){super(t),this.fontChangeListenerKey_=(0,A.KT)(T.yY,x.A.PROPERTYCHANGE,t.redrawText.bind(t)),this.element_=document.createElement("div");const e=this.element_.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.element_.className=E.XI+" ol-layers";const i=t.getViewport();i.insertBefore(this.element_,i.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(t,e){const i=this.getMap();if(i.hasListener(t)){const n=new v.A(t,void 0,e);i.dispatchEvent(n)}}disposeInternal(){(0,A.JH)(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),super.disposeInternal()}renderFrame(t){if(!t)return void(this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1));this.calculateMatrices2D(t),this.dispatchRenderEvent(y.A.PRECOMPOSE,t);const e=t.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex}));e.some((t=>t.layer instanceof o.A&&t.layer.getDeclutter()))&&(t.declutter={});const i=t.viewState;this.children_.length=0;const n=[];let s=null;for(let r=0,o=e.length;r=0;--i){const n=e[i],s=n.layer;s.getDeclutter()&&s.renderDeclutter(t,n)}e.forEach((e=>e.layer.renderDeferred(t)))}}};var R=i(6837),w=i(8620),b=i(1685),I=i(588),L=i(3530);class P extends b.Ay{constructor(t,e){super(t),this.layer=e}}const M="layers";class D extends w.A{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let i=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(M,this.handleLayersChanged_),i?Array.isArray(i)?i=new s.A(i.slice(),{unique:!0}):(0,I.v)("function"==typeof i.getArray,"Expected `layers` to be an array or a `Collection`"):i=new s.A(void 0,{unique:!0}),this.setLayers(i)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(A.JH),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push((0,A.KT)(t,r.A.ADD,this.handleLayersAdd_,this),(0,A.KT)(t,r.A.REMOVE,this.handleLayersRemove_,this));for(const t in this.listenerKeys_)this.listenerKeys_[t].forEach(A.JH);(0,L.I)(this.listenerKeys_);const e=t.getArray();for(let t=0,i=e.length;t{this.clickTimeoutId_=void 0;const e=new O.A(k.A.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}),250)}updateActivePointers_(t){const e=t,i=e.pointerId;if(e.type==k.A.POINTERUP||e.type==k.A.POINTERCANCEL){delete this.trackedTouches_[i];for(const t in this.trackedTouches_)if(this.trackedTouches_[t].target!==e.target){delete this.trackedTouches_[t];break}}else e.type!=k.A.POINTERDOWN&&e.type!=k.A.POINTERMOVE||(this.trackedTouches_[i]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new O.A(k.A.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_.length&&(this.dragListenerKeys_.forEach(A.JH),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return 0===t.button}handlePointerDown_(t){this.emulateClicks_=0===this.activePointers_.length,this.updateActivePointers_(t);const e=new O.A(k.A.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);if(this.dispatchEvent(e),this.down_=new PointerEvent(t.type,t),Object.defineProperty(this.down_,"target",{writable:!1,value:t.target}),0===this.dragListenerKeys_.length){const t=this.map_.getOwnerDocument();this.dragListenerKeys_.push((0,A.KT)(t,k.A.POINTERMOVE,this.handlePointerMove_,this),(0,A.KT)(t,k.A.POINTERUP,this.handlePointerUp_,this),(0,A.KT)(this.element_,k.A.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==t&&this.dragListenerKeys_.push((0,A.KT)(this.element_.getRootNode(),k.A.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new O.A(k.A.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;const e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new O.A(k.A.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;e&&!e.defaultPrevented||"boolean"==typeof t.cancelable&&!0!==t.cancelable||t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&((0,A.JH)(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(R.A.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&((0,A.JH)(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(A.JH),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const B=j;var U=i(5801),X=i(2585),W=i(3116);const Z=1/0,Y=class{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,(0,L.I)(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const n=this.keyFunction_(i);return delete this.queuedElements_[n],i}enqueue(t){(0,I.v)(!(this.keyFunction_(t)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const e=this.priorityFunction_(t);return e!=Z&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)}getCount(){return this.elements_.length}getLeftChildIndex_(t){return 2*t+1}getRightChildIndex_(t){return 2*t+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return 0===this.elements_.length}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,i=this.priorities_,n=e.length,s=e[t],r=i[t],o=t;for(;t>1;){const s=this.getLeftChildIndex_(t),r=this.getRightChildIndex_(t),o=rt;){const t=this.getParentIndex_(e);if(!(n[t]>r))break;i[e]=i[t],n[e]=n[t],e=t}i[e]=s,n[e]=r}reprioritize(){const t=this.priorityFunction_,e=this.elements_,i=this.priorities_;let n=0;const s=e.length;let r,o,a;for(o=0;o0;)n=this.dequeue()[0],s=n.getKey(),i=n.getState(),i!==V.A.IDLE||s in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[s]=!0,++this.tilesLoading_,++r,n.load())}};var q=i(3568),K=i(2703),$=i(7456),J=i(2898),Q=i(9186),tt=i(6068),et=i(4473),it=i(4051),nt=i(4423),st=i(9888),rt=i(6856);const ot=class{constructor(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(t,e){this.points_.push(t,e,Date.now())}end(){if(this.points_.length<6)return!1;const t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]0&&this.points_[i+2]>t;)i-=3;const n=this.points_[e+2]-this.points_[i+2];if(n<1e3/60)return!1;const s=this.points_[e]-this.points_[i],r=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(r,s),this.initialVelocity_=Math.sqrt(s*s+r*r)/n,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}};var at=i(8751),lt=i(3711),ht=i(5243),ct=i(6514),ut=i(3407),dt=i(4401),gt=i(4422);function _t(t){t instanceof g.A?t.setMapInternal(null):t instanceof F&&t.getLayers().forEach(_t)}function ft(t,e){if(t instanceof g.A)t.setMapInternal(e);else if(t instanceof F){const i=t.getLayers().getArray();for(let t=0,n=i.length;tthis.updateSize())),this.controls=e.controls||function(t){t=t||{};const e=new s.A;return(void 0===t.zoom||t.zoom)&&e.push(new Q.A(t.zoomOptions)),(void 0===t.rotate||t.rotate)&&e.push(new J.A(t.rotateOptions)),(void 0===t.attribution||t.attribution)&&e.push(new $.A(t.attributionOptions)),e}(),this.interactions=e.interactions||function(t){t=t||{};const e=new s.A,i=new ot(-.005,.05,100);return(void 0===t.altShiftDragRotate||t.altShiftDragRotate)&&e.push(new it.A),(void 0===t.doubleClickZoom||t.doubleClickZoom)&&e.push(new tt.A({delta:t.zoomDelta,duration:t.zoomDuration})),(void 0===t.dragPan||t.dragPan)&&e.push(new et.A({onFocusOnly:t.onFocusOnly,kinetic:i})),(void 0===t.pinchRotate||t.pinchRotate)&&e.push(new lt.A),(void 0===t.pinchZoom||t.pinchZoom)&&e.push(new ht.A({duration:t.zoomDuration})),(void 0===t.keyboard||t.keyboard)&&(e.push(new st.A),e.push(new rt.A({delta:t.zoomDelta,duration:t.zoomDuration}))),(void 0===t.mouseWheelZoom||t.mouseWheelZoom)&&e.push(new at.A({onFocusOnly:t.onFocusOnly,duration:t.zoomDuration})),(void 0===t.shiftDragZoom||t.shiftDragZoom)&&e.push(new nt.A({duration:t.zoomDuration})),e}({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new H(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(W.A.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(W.A.VIEW,this.handleViewChanged_),this.addChangeListener(W.A.SIZE,this.handleSizeChanged_),this.addChangeListener(W.A.TARGET,this.handleTargetChanged_),this.setProperties(e.values);const i=this;!t.view||t.view instanceof q.Ay||t.view.then((function(t){i.setView(new q.Ay(t))})),this.controls.addEventListener(r.A.ADD,(t=>{t.element.setMap(this)})),this.controls.addEventListener(r.A.REMOVE,(t=>{t.element.setMap(null)})),this.interactions.addEventListener(r.A.ADD,(t=>{t.element.setMap(this)})),this.interactions.addEventListener(r.A.REMOVE,(t=>{t.element.setMap(null)})),this.overlays_.addEventListener(r.A.ADD,(t=>{this.addOverlayInternal_(t.element)})),this.overlays_.addEventListener(r.A.REMOVE,(t=>{const e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)})),this.controls.forEach((t=>{t.setMap(this)})),this.interactions.forEach((t=>{t.setMap(this)})),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){this.getLayerGroup().getLayers().push(t)}handleLayerAdd_(t){ft(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,i){if(!this.frameState_||!this.renderer_)return;const n=this.getCoordinateFromPixelInternal(t),s=void 0!==(i=void 0!==i?i:{}).hitTolerance?i.hitTolerance:0,r=void 0!==i.layerFilter?i.layerFilter:l.rT,o=!1!==i.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,s,o,e,null,r,null)}getFeaturesAtPixel(t,e){const i=[];return this.forEachFeatureAtPixel(t,(function(t){i.push(t)}),e),i}getAllLayers(){const t=[];return function e(i){i.forEach((function(i){i instanceof F?e(i.getLayers()):t.push(i)}))}(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const i=this.getCoordinateFromPixelInternal(t),n=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:l.rT,s=void 0!==e.hitTolerance?e.hitTolerance:0,r=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,s,r,n,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const e=this.viewport_.getBoundingClientRect(),i=this.getSize(),n=e.width/i[0],s=e.height/i[1],r="changedTouches"in t?t.changedTouches[0]:t;return[(r.clientX-e.left)/n,(r.clientY-e.top)/s]}getTarget(){return this.get(W.A.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(t){return(0,ut.te)(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?(0,c.Bb)(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(W.A.LAYERGROUP)}setLayers(t){const e=this.getLayerGroup();if(t instanceof s.A)return void e.setLayers(t);const i=e.getLayers();i.clear(),i.extend(t)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,i=t.length;e=0;i--){const n=e[i];if(n.getMap()===this&&n.getActive()&&this.getTargetElement()&&(!n.handleEvent(t)||t.propagationStopped))break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let i=this.maxTilesLoading_,n=i;if(t){const e=t.viewHints;if(e[K.A.ANIMATING]||e[K.A.INTERACTING]){const e=Date.now()-t.time>8;i=e?0:8,n=e?0:2}}e.getTilesLoading(){this.postRenderTimeoutHandle_=void 0,this.handlePostRender()}),0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new P("removelayer",e)),this.set(W.A.LAYERGROUP,t)}setSize(t){this.set(W.A.SIZE,t)}setTarget(t){this.set(W.A.TARGET,t)}setView(t){if(!t||t instanceof q.Ay)return void this.set(W.A.VIEW,t);this.set(W.A.VIEW,new q.Ay);const e=this;t.then((function(t){e.setView(new q.Ay(t))}))}updateSize(){const t=this.getTargetElement();let e;if(t){const i=getComputedStyle(t),n=t.offsetWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderRightWidth),s=t.offsetHeight-parseFloat(i.borderTopWidth)-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderBottomWidth);isNaN(n)||isNaN(s)||(e=[n,s],!(0,dt.Ie)(e)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&(0,gt.R8)("No map visible because the map container's width or height are 0."))}const i=this.getSize();!e||i&&(0,ct.aI)(e,i)||(this.setSize(e),this.updateViewportSize_(e))}updateViewportSize_(t){const e=this.getView();e&&e.setViewportSize(t)}}const mt=pt},277:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});var n=i(5801);class s extends n.A{constructor(t,e,i,n,s,r){super(t,e,s),this.originalEvent=i,this.pixel_=null,this.coordinate_=null,this.dragging=void 0!==n&&n,this.activePointers=r}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(t){this.pixel_=t}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(t){this.coordinate_=t}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}}const r=s},3445:(t,e,i)=>{"use strict";i.d(e,{A:()=>s});var n=i(6837);const s={SINGLECLICK:"singleclick",CLICK:n.A.CLICK,DBLCLICK:n.A.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"}},5801:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});var n=i(1685);class s extends n.Ay{constructor(t,e,i){super(t),this.map=e,this.frameState=void 0!==i?i:null}}const r=s},2585:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"}},3116:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"}},4120:(t,e,i)=>{"use strict";i.d(e,{A:()=>c});var n=i(1685),s=i(8450),r=i(1854),o=i(4087),a=i(3530);class l extends n.Ay{constructor(t,e,i){super(t),this.key=e,this.oldValue=i}}class h extends r.A{constructor(t){super(),this.on,this.once,this.un,(0,o.v6)(this),this.values_=null,void 0!==t&&this.setProperties(t)}get(t){let e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}getPropertiesInternal(){return this.values_}hasProperties(){return!!this.values_}notify(t,e){let i;i=`change:${t}`,this.hasListener(i)&&this.dispatchEvent(new l(i,t,e)),i=s.A.PROPERTYCHANGE,this.hasListener(i)&&this.dispatchEvent(new l(i,t,e))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,i){const n=this.values_||(this.values_={});if(i)n[t]=e;else{const i=n[t];n[t]=e,i!==e&&this.notify(t,i)}}setProperties(t,e){for(const i in t)this.set(i,t[i],e)}applyProperties(t){t.values_&&Object.assign(this.values_||(this.values_={}),t.values_)}unset(t,e){if(this.values_&&t in this.values_){const i=this.values_[t];delete this.values_[t],(0,a.p)(this.values_)&&(this.values_=null),e||this.notify(t,i)}}}const c=h},8450:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={PROPERTYCHANGE:"propertychange"}},1854:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(9332),s=i(6837),r=i(9438);class o extends n.A{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(s.A.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const i=t.length,n=new Array(i);for(let s=0;s{"use strict";i.d(e,{A:()=>f});var n=i(4120),s=i(2585),r=i(5176),o=i(915),a=i(9438),l=i(8711);const h="element",c="map",u="offset",d="position",g="positioning";class _ extends n.A{constructor(t){super(),this.on,this.once,this.un,this.options=t,this.id=t.id,this.insertFirst=void 0===t.insertFirst||t.insertFirst,this.stopEvent=void 0===t.stopEvent||t.stopEvent,this.element=document.createElement("div"),this.element.className=void 0!==t.className?t.className:"ol-overlay-container "+r.Q5,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=!0===t.autoPan?{}:t.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(h,this.handleElementChanged),this.addChangeListener(c,this.handleMapChanged),this.addChangeListener(u,this.handleOffsetChanged),this.addChangeListener(d,this.handlePositionChanged),this.addChangeListener(g,this.handlePositioningChanged),void 0!==t.element&&this.setElement(t.element),this.setOffset(void 0!==t.offset?t.offset:[0,0]),this.setPositioning(t.positioning||"top-left"),void 0!==t.position&&this.setPosition(t.position)}getElement(){return this.get(h)}getId(){return this.id}getMap(){return this.get(c)||null}getOffset(){return this.get(u)}getPosition(){return this.get(d)}getPositioning(){return this.get(g)}handleElementChanged(){(0,l.gS)(this.element);const t=this.getElement();t&&this.element.appendChild(t)}handleMapChanged(){this.mapPostrenderListenerKey&&((0,l.bf)(this.element),(0,a.JH)(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const t=this.getMap();if(t){this.mapPostrenderListenerKey=(0,a.KT)(t,s.A.POSTRENDER,this.render,this),this.updatePixelPosition();const e=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?e.insertBefore(this.element,e.childNodes[0]||null):e.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(t){this.set(h,t)}setMap(t){this.set(c,t)}setOffset(t){this.set(u,t)}setPosition(t){this.set(d,t)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(t){const e=this.getMap();if(!e||!e.getTargetElement()||!this.get(d))return;const i=this.getRect(e.getTargetElement(),e.getSize()),n=this.getElement(),s=this.getRect(n,[(0,l.Gq)(n),(0,l.DK)(n)]),r=void 0===(t=t||{}).margin?20:t.margin;if(!(0,o.ms)(i,s)){const n=s[0]-i[0],o=i[2]-s[2],a=s[1]-i[1],l=i[3]-s[3],h=[0,0];if(n<0?h[0]=n-r:o<0&&(h[0]=Math.abs(o)+r),a<0?h[1]=a-r:l<0&&(h[1]=Math.abs(l)+r),0!==h[0]||0!==h[1]){const i=e.getView().getCenterInternal(),n=e.getPixelFromCoordinateInternal(i);if(!n)return;const s=[n[0]+h[0],n[1]+h[1]],r=t.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(s),duration:r.duration,easing:r.easing})}}}getRect(t,e){const i=t.getBoundingClientRect(),n=i.left+window.pageXOffset,s=i.top+window.pageYOffset;return[n,s,n+e[0],s+e[1]]}setPositioning(t){this.set(g,t)}setVisible(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)}updatePixelPosition(){const t=this.getMap(),e=this.getPosition();if(!t||!t.isRendered()||!e)return void this.setVisible(!1);const i=t.getPixelFromCoordinate(e),n=t.getSize();this.updateRenderedPosition(i,n)}updateRenderedPosition(t,e){const i=this.element.style,n=this.getOffset(),s=this.getPositioning();this.setVisible(!0);let r="0%",o="0%";"bottom-right"==s||"center-right"==s||"top-right"==s?r="-100%":"bottom-center"!=s&&"center-center"!=s&&"top-center"!=s||(r="-50%"),"bottom-left"==s||"bottom-center"==s||"bottom-right"==s?o="-100%":"center-left"!=s&&"center-center"!=s&&"center-right"!=s||(o="-50%");const a=`translate(${r}, ${o}) translate(${Math.round(t[0]+n[0])+"px"}, ${Math.round(t[1]+n[1])+"px"})`;this.rendered.transform_!=a&&(this.rendered.transform_=a,i.transform=a)}getOptions(){return this.options}}const f=_},8143:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(9332),s=i(6837),r=i(1078),o=i(4087),a=i(3474);class l extends n.A{constructor(t,e,i){super(),i=i||{},this.tileCoord=t,this.state=e,this.interimTile=null,this.key="",this.transition_=void 0===i.transition?250:i.transition,this.transitionStarts_={},this.interpolate=!!i.interpolate}changed(){this.dispatchEvent(s.A.CHANGE)}release(){this.state===r.A.ERROR&&this.setState(r.A.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getInterimTile(){let t=this.interimTile;if(!t)return this;do{if(t.getState()==r.A.LOADED)return this.transition_=0,t;t=t.interimTile}while(t);return this}refreshInterimChain(){let t=this.interimTile;if(!t)return;let e=this;do{if(t.getState()==r.A.LOADED){t.interimTile=null;break}t.getState()==r.A.LOADING?e=t:t.getState()==r.A.IDLE?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(t){if(this.state!==r.A.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){(0,o.b0)()}getAlpha(t,e){if(!this.transition_)return 1;let i=this.transitionStarts_[t];if(i){if(-1===i)return 1}else i=e,this.transitionStarts_[t]=i;const n=e-i+1e3/60;return n>=this.transition_?1:(0,a.a6)(n/this.transition_)}inTransition(t){return!!this.transition_&&-1!==this.transitionStarts_[t]}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}}const h=l},61:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(4969),s=i(186);class r extends n.A{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()}pruneExceptNewestZ(){if(0===this.getCount())return;const t=this.peekFirstKey(),e=(0,s.K)(t)[0];this.forEach((t=>{t.tileCoord[0]!==e&&(this.remove((0,s.i7)(t.tileCoord)),t.release())}))}}const o=r},1110:(t,e,i)=>{"use strict";i.d(e,{A:()=>r,N:()=>s});class n{constructor(t,e,i,n){this.minX=t,this.maxX=e,this.minY=i,this.maxY=n}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minXthis.maxX&&(this.maxX=t.maxX),t.minYthis.maxY&&(this.maxY=t.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}function s(t,e,i,s,r){return void 0!==r?(r.minX=t,r.maxX=e,r.minY=i,r.maxY=s,r):new n(t,e,i,s)}const r=n},1078:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4}},3568:(t,e,i)=>{"use strict";i.d(e,{Ay:()=>R});var n=i(4120),s=i(2703),r=i(9015),o=i(9496),a=i(3407),l=i(4238),h=i(6933),c=i(588),u=i(1597);function d(t,e,i){return function(n,s,r,o,a){if(!n)return;if(!s&&!e)return n;const l=e?0:r[0]*s,h=e?0:r[1]*s,c=a?a[0]:0,d=a?a[1]:0;let g=t[0]+l/2+c,_=t[2]-l/2+c,f=t[1]+h/2+d,p=t[3]-h/2+d;g>_&&(g=(_+g)/2,_=g),f>p&&(f=(p+f)/2,p=f);let m=(0,u.qE)(n[0],g,_),x=(0,u.qE)(n[1],f,p);if(o&&i&&s){const t=30*s;m+=-t*Math.log(1+Math.max(0,g-n[0])/t)+t*Math.log(1+Math.max(0,n[0]-_)/t),x+=-t*Math.log(1+Math.max(0,f-n[1])/t)+t*Math.log(1+Math.max(0,n[1]-p)/t)}return[m,x]}}function g(t){return t}var _=i(915),f=i(6514);function p(t,e,i,n){const s=(0,_.RG)(e)/i[0],r=(0,_.Oq)(e)/i[1];return n?Math.min(t,Math.max(s,r)):Math.min(t,Math.min(s,r))}function m(t,e,i){let n=Math.min(t,e);return n*=Math.log(1+50*Math.max(0,t/e-1))/50+1,i&&(n=Math.max(n,i),n/=Math.log(1+50*Math.max(0,i/t-1))/50+1),(0,u.qE)(n,i/2,2*e)}function x(t,e,i,n,s){return i=void 0===i||i,function(r,o,a,l){if(void 0!==r){const o=n?p(t,n,a,s):t;return i&&l?m(r,o,e):(0,u.qE)(r,e,o)}}}var v=i(4498),y=i(3474),E=i(1064);class T extends n.A{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=(0,a.Av)(t.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,t.projection&&(0,a.RJ)(),t.center&&(t.center=(0,a.Ad)(t.center,this.projection_)),t.extent&&(t.extent=(0,a.SD)(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const t in r.A)delete e[t];this.setProperties(e,!0);const i=function(t){let e,i,n;let s=void 0!==t.minZoom?t.minZoom:0,r=void 0!==t.maxZoom?t.maxZoom:28;const l=void 0!==t.zoomFactor?t.zoomFactor:2,h=void 0!==t.multiWorld&&t.multiWorld,c=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,d=void 0!==t.showFullExtent&&t.showFullExtent,g=(0,a.Av)(t.projection,"EPSG:3857"),v=g.getExtent();let y=t.constrainOnlyCenter,E=t.extent;if(h||E||!g.isGlobal()||(y=!1,E=v),void 0!==t.resolutions){const o=t.resolutions;i=o[s],n=void 0!==o[r]?o[r]:o[o.length-1],e=t.constrainResolution?function(t,e,i,n){return e=void 0===e||e,function(s,r,o,a){if(void 0!==s){const l=t[0],h=t[t.length-1],c=i?p(l,i,o,n):l;if(a)return e?m(s,c,h):(0,u.qE)(s,h,c);const d=Math.min(c,s),g=Math.floor((0,f.FT)(t,d,r));return t[g]>c&&g1&&"function"==typeof arguments[i-1]&&(e=arguments[i-1],--i);let n=0;for(;n0}getInteracting(){return this.hints_[s.A.INTERACTING]>0}cancelAnimations(){let t;this.setHint(s.A.ANIMATING,-this.hints_[s.A.ANIMATING]);for(let e=0,i=this.animations_.length;e=0;--i){const n=this.animations_[i];let r=!0;for(let i=0,s=n.length;i0?o/s.duration:1;a>=1?(s.complete=!0,a=1):r=!1;const l=s.easing(a);if(s.sourceCenter){const t=s.sourceCenter[0],e=s.sourceCenter[1],i=s.targetCenter[0],n=s.targetCenter[1];this.nextCenter_=s.targetCenter;const r=t+l*(i-t),o=e+l*(n-e);this.targetCenter_=[r,o]}if(s.sourceResolution&&s.targetResolution){const t=1===l?s.targetResolution:s.sourceResolution+l*(s.targetResolution-s.sourceResolution);if(s.anchor){const e=this.getViewportSize_(this.getRotation()),i=this.constraints_.resolution(t,0,e,!0);this.targetCenter_=this.calculateCenterZoom(i,s.anchor)}this.nextResolution_=s.targetResolution,this.targetResolution_=t,this.applyTargetState_(!0)}if(void 0!==s.sourceRotation&&void 0!==s.targetRotation){const t=1===l?(0,u.xP)(s.targetRotation+Math.PI,2*Math.PI)-Math.PI:s.sourceRotation+l*(s.targetRotation-s.sourceRotation);if(s.anchor){const e=this.constraints_.rotation(t,!0);this.targetCenter_=this.calculateCenterRotate(e,s.anchor)}this.nextRotation_=s.targetRotation,this.targetRotation_=t}if(this.applyTargetState_(!0),e=!0,!s.complete)break}if(r){this.animations_[i]=null,this.setHint(s.A.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const t=n[0].callback;t&&A(t,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let i;const n=this.getCenterInternal();return void 0!==n&&(i=[n[0]-e[0],n[1]-e[1]],(0,h.e$)(i,t-this.getRotation()),(0,h.WQ)(i,e)),i}calculateCenterZoom(t,e){let i;const n=this.getCenterInternal(),s=this.getResolution();return void 0!==n&&void 0!==s&&(i=[e[0]-t*(e[0]-n[0])/s,e[1]-t*(e[1]-n[1])/s]),i}getViewportSize_(t){const e=this.viewportSize_;if(t){const i=e[0],n=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t?(0,a.te)(t,this.getProjection()):t}getCenterInternal(){return this.get(r.A.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){const e=this.calculateExtentInternal(t);return(0,a.JR)(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();(0,c.v)(e,"The view center is not defined");const i=this.getResolution();(0,c.v)(void 0!==i,"The view resolution is not defined");const n=this.getRotation();return(0,c.v)(void 0!==n,"The view rotation is not defined"),(0,_.Bg)(e,i,n,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(r.A.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal((0,a.SD)(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const i=(0,_.RG)(t)/e[0],n=(0,_.Oq)(t)/e[1];return Math.max(i,n)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,n=Math.log(e/i)/Math.log(t);return function(i){return e/Math.pow(t,i*n)}}getRotation(){return this.get(r.A.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,s=Math.log(i/n)/e;return function(t){return Math.log(i/t)/e/s}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),i=this.getRotation();let n=this.getCenterInternal();const s=this.padding_;if(s){const t=this.getViewportSizeMinusPadding_();n=S(n,this.getViewportSize_(),[t[0]/2+s[3],t[1]/2+s[0]],e,i)}return{center:n.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t;const e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e,i,n=this.minZoom_||0;if(this.resolutions_){const s=(0,f.FT)(this.resolutions_,t,1);n=s,e=this.resolutions_[s],i=s==this.resolutions_.length-1?2:e/this.resolutions_[s+1]}else e=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(e/t)/Math.log(i)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=(0,u.qE)(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,(0,u.qE)(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if((0,c.v)(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,"Invalid extent or geometry provided as `geometry`"),Array.isArray(t)){(0,c.v)(!(0,_.Im)(t),"Cannot fit empty extent provided as `geometry`");const e=(0,a.SD)(t,this.getProjection());i=(0,E.VY)(e)}else if("Circle"===t.getType()){const e=(0,a.SD)(t.getExtent(),this.getProjection());i=(0,E.VY)(e),i.rotate(this.getRotation(),(0,_.q1)(e))}else{const e=(0,a.Tf)();i=e?t.clone().transform(e,this.getProjection()):t}this.fitInternal(i,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),i=Math.cos(e),n=Math.sin(-e),s=t.getFlatCoordinates(),r=t.getStride();let o=1/0,a=1/0,l=-1/0,h=-1/0;for(let t=0,e=s.length;t{"use strict";i.d(e,{A:()=>n});const n={ANIMATING:0,INTERACTING:1}},9015:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"}},6514:(t,e,i)=>{"use strict";function n(t,e,i){let n,r;i=i||s;let o=0,a=t.length,l=!1;for(;o>1),r=+i(t[n],e),r<0?o=n+1:(a=n,l=!r);return l?o:~o}function s(t,e){return t>e?1:te?-1:0}function o(t,e,i){if(t[0]<=e)return 0;const n=t.length;if(e<=t[n-1])return n-1;if("function"==typeof i){for(let s=1;s0?s-1:s}return n-1}if(i>0){for(let i=1;i0||i&&0===r)}))}i.d(e,{El:()=>n,FT:()=>o,V_:()=>s,WC:()=>c,X$:()=>l,aI:()=>h,gI:()=>a,rG:()=>r})},588:(t,e,i)=>{"use strict";function n(t,e){if(!t)throw new Error(e)}i.d(e,{v:()=>n})},3730:(t,e,i)=>{"use strict";i.d(e,{_j:()=>T,oJ:()=>_,sH:()=>E,$C:()=>S,cD:()=>y,S8:()=>A,eE:()=>v,dI:()=>C,fu:()=>x});const n={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]};var s={name:"xyz",min:[0,0,0],channel:["X","Y","Z"],alias:["XYZ","ciexyz","cie1931"],whitepoint:{2:{A:[109.85,100,35.585],C:[98.074,100,118.232],D50:[96.422,100,82.521],D55:[95.682,100,92.149],D65:[95.045592705167,100,108.9057750759878],D75:[94.972,100,122.638],F2:[99.187,100,67.395],F7:[95.044,100,108.755],F11:[100.966,100,64.37],E:[100,100,100]},10:{A:[111.144,100,35.2],C:[97.285,100,116.145],D50:[96.72,100,81.427],D55:[95.799,100,90.926],D65:[94.811,100,107.304],D75:[94.416,100,120.641],F2:[103.28,100,69.026],F7:[95.792,100,107.687],F11:[103.866,100,65.627],E:[100,100,100]}}};s.max=s.whitepoint[2].D65,s.rgb=function(t,e){e=e||s.whitepoint[2].E;var i,n,r,o=t[0]/e[0],a=t[1]/e[1],l=t[2]/e[2];return n=-.96924363628087*o+1.87596750150772*a+.041555057407175*l,r=.055630079696993*o+-.20397695888897*a+1.056971514242878*l,i=(i=3.240969941904521*o+-1.537383177570093*a+-.498610760293*l)>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r*=12.92,[255*(i=Math.min(Math.max(0,i),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},n.xyz=function(t,e){var i=t[0]/255,n=t[1]/255,r=t[2]/255,o=.21263900587151*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)+.71516867876775*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.072192315360733*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92),a=.019330818715591*i+.11919477979462*n+.95053215224966*r;return[(.41239079926595*i+.35758433938387*n+.18048078840183*r)*(e=e||s.whitepoint[2].E)[0],o*e[1],a*e[2]]};const r=s,o={name:"luv",min:[0,-134,-140],max:[100,224,122],channel:["lightness","u","v"],alias:["LUV","cieluv","cie1976"],xyz:function(t,e,i){var n,s,o,a,l,h,c,u,d;return o=t[0],a=t[1],l=t[2],0===o?[0,0,0]:(e=e||"D65",i=i||2,n=a/(13*o)+4*(c=r.whitepoint[i][e][0])/(c+15*(u=r.whitepoint[i][e][1])+3*(d=r.whitepoint[i][e][2]))||0,s=l/(13*o)+9*u/(c+15*u+3*d)||0,[9*(h=o>8?u*Math.pow((o+16)/116,3):u*o*.0011070564598794539)*n/(4*s)||0,h,h*(12-3*n-20*s)/(4*s)||0])}};r.luv=function(t,e,i){var n,s,o,a,l,h,c,u,d,g,_;e=e||"D65",i=i||2,g=4*(c=r.whitepoint[i][e][0])/(c+15*(u=r.whitepoint[i][e][1])+3*(d=r.whitepoint[i][e][2])),_=9*u/(c+15*u+3*d),n=4*(a=t[0])/(a+15*(l=t[1])+3*(h=t[2]))||0,s=9*l/(a+15*l+3*h)||0;var f=l/u;return[o=f<=.008856451679035631?903.2962962962961*f:116*Math.pow(f,1/3)-16,13*o*(n-g),13*o*(s-_)]};var a={name:"lchuv",channel:["lightness","chroma","hue"],alias:["LCHuv","cielchuv"],min:[0,0,0],max:[100,100,360],luv:function(t){var e,i=t[0],n=t[1];return e=t[2]/360*2*Math.PI,[i,n*Math.cos(e),n*Math.sin(e)]},xyz:function(t){return o.xyz(a.luv(t))}};const l=a;o.lchuv=function(t){var e=t[0],i=t[1],n=t[2],s=Math.sqrt(i*i+n*n),r=360*Math.atan2(n,i)/2/Math.PI;return r<0&&(r+=360),[e,s,r]},r.lchuv=function(t){return o.lchuv(r.luv(t))};const h={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},c=function(t){var e,i,n=[],s=1;if("number"==typeof t)return{space:"rgb",values:[t>>>16,(65280&t)>>>8,255&t],alpha:1};if("number"==typeof t)return{space:"rgb",values:[t>>>16,(65280&t)>>>8,255&t],alpha:1};if(t=String(t).toLowerCase(),h[t])n=h[t].slice(),i="rgb";else if("transparent"===t)s=0,i="rgb",n=[0,0,0];else if("#"===t[0]){var r=t.slice(1),o=r.length;s=1,o<=4?(n=[parseInt(r[0]+r[0],16),parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16)],4===o&&(s=parseInt(r[3]+r[3],16)/255)):(n=[parseInt(r[0]+r[1],16),parseInt(r[2]+r[3],16),parseInt(r[4]+r[5],16)],8===o&&(s=parseInt(r[6]+r[7],16)/255)),n[0]||(n[0]=0),n[1]||(n[1]=0),n[2]||(n[2]=0),i="rgb"}else if(e=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(t)){var a=e[1],l="cmyk"===(i=a.replace(/a$/,""))?4:"gray"===i?1:3;n=e[2].trim().split(/\s*[,\/]\s*|\s+/),"color"===i&&(i=n.shift()),s=(n=n.map((function(t,e){if("%"===t[t.length-1])return t=parseFloat(t)/100,3===e?t:"rgb"===i?255*t:"h"===i[0]?100*t:"l"!==i[0]||e?"lab"===i?125*t:"lch"===i?e<2?150*t:360*t:"o"!==i[0]||e?"oklab"===i?.4*t:"oklch"===i?e<2?.4*t:360*t:t:t:100*t;if("h"===i[e]||2===e&&"h"===i[i.length-1]){if(void 0!==u[t])return u[t];if(t.endsWith("deg"))return parseFloat(t);if(t.endsWith("turn"))return 360*parseFloat(t);if(t.endsWith("grad"))return 360*parseFloat(t)/400;if(t.endsWith("rad"))return 180*parseFloat(t)/Math.PI}return"none"===t?0:parseFloat(t)}))).length>l?n.pop():1}else/[0-9](?:\s|\/|,)/.test(t)&&(n=t.match(/([0-9]+)/g).map((function(t){return parseFloat(t)})),i=t.match(/([a-z])/gi)?.join("")?.toLowerCase()||"rgb");return{space:i,values:n,alpha:s}};var u={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};const d={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e,i,n,s,r,o=t[0]/360,a=t[1]/100,l=t[2]/100,h=0;if(0===a)return[r=255*l,r,r];for(e=2*l-(i=l<.5?l*(1+a):l+a-l*a),s=[0,0,0];h<3;)(n=o+1/3*-(h-1))<0?n++:n>1&&n--,r=6*n<1?e+6*(i-e)*n:2*n<1?i:3*n<2?e+(i-e)*(2/3-n)*6:e,s[h++]=255*r;return s}};n.hsl=function(t){var e,i,n=t[0]/255,s=t[1]/255,r=t[2]/255,o=Math.min(n,s,r),a=Math.max(n,s,r),l=a-o;return a===o?e=0:n===a?e=(s-r)/l:s===a?e=2+(r-n)/l:r===a&&(e=4+(n-s)/l),(e=Math.min(60*e,360))<0&&(e+=360),i=(o+a)/2,[e,100*(a===o?0:i<=.5?l/(a+o):l/(2-a-o)),100*i]};var g=i(1597);function _(t){return"string"==typeof t?t:C(t)}const f=1024,p={};let m=0;function x(t){if(4===t.length)return t;const e=t.slice();return e[3]=1,e}function v(t){const e=r.lchuv(n.xyz(t));return e[3]=t[3],e}function y(t){const e=r.rgb(l.xyz(t));return e[3]=t[3],e}function E(t){if(p.hasOwnProperty(t))return p[t];if(m>=f){let t=0;for(const e in p)3&t++||(delete p[e],--m)}const e=function(t){var e;Array.isArray(t)&&t.raw&&(t=String.raw(...arguments)),t instanceof Number&&(t=+t);var i=c(t);if(!i.space)return[];const s="h"===i.space[0]?d.min:n.min,r="h"===i.space[0]?d.max:n.max;return(e=Array(3))[0]=Math.min(Math.max(i.values[0],s[0]),r[0]),e[1]=Math.min(Math.max(i.values[1],s[1]),r[1]),e[2]=Math.min(Math.max(i.values[2],s[2]),r[2]),"h"===i.space[0]&&(e=d.rgb(e)),e.push(Math.min(Math.max(i.alpha,0),1)),e}(t);if(4!==e.length)throw new Error('Failed to parse "'+t+'" as color');for(const i of e)if(isNaN(i))throw new Error('Failed to parse "'+t+'" as color');return A(e),p[t]=e,++m,e}function T(t){return Array.isArray(t)?t:E(t)}function A(t){return t[0]=(0,g.qE)(t[0]+.5|0,0,255),t[1]=(0,g.qE)(t[1]+.5|0,0,255),t[2]=(0,g.qE)(t[2]+.5|0,0,255),t[3]=(0,g.qE)(t[3],0,1),t}function C(t){let e=t[0];e!=(0|e)&&(e=e+.5|0);let i=t[1];i!=(0|i)&&(i=i+.5|0);let n=t[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+e+","+i+","+n+","+(void 0===t[3]?1:Math.round(1e3*t[3])/1e3)+")"}function S(t){try{return E(t),!0}catch(t){return!1}}},7295:(t,e,i)=>{"use strict";i.d(e,{F:()=>l});var n=i(6141),s=i(8711),r=i(7907),o=i(2241),a=i(3730);function l(t){return t?Array.isArray(t)?(0,a.dI)(t):"object"==typeof t&&"src"in t?function(t){if(!t.offset||!t.size)return o.ue.getPattern(t.src,"anonymous",t.color);const e=t.src+":"+t.offset,i=o.ue.getPattern(e,void 0,t.color);if(i)return i;const a=o.ue.get(t.src,"anonymous",null);if(a.getImageState()!==n.A.LOADED)return null;const l=(0,s.Y)(t.size[0],t.size[1]);return l.drawImage(a.getImage(1),t.offset[0],t.offset[1],t.size[0],t.size[1],0,0,t.size[0],t.size[1]),(0,r.J)(l.canvas,e,void 0,n.A.LOADED,t.color,!0),o.ue.getPattern(e,void 0,t.color)}(t):t:null}},4422:(t,e,i)=>{"use strict";i.d(e,{R8:()=>r,z3:()=>o});const n={info:1,warn:2,error:3,none:4};let s=n.info;function r(...t){s>n.warn||console.warn(...t)}function o(...t){s>n.error||console.error(...t)}},7456:(t,e,i)=>{"use strict";i.d(e,{A:()=>c});var n=i(972),s=i(6837),r=i(5176),o=i(6514),a=i(8711),l=i(4238);class h extends n.A{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=void 0===t.collapsed||t.collapsed,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=void 0!==t.collapsible,this.collapsible_=void 0===t.collapsible||t.collapsible,this.collapsible_||(this.collapsed_=!1);const e=void 0!==t.className?t.className:"ol-attribution",i=void 0!==t.tipLabel?t.tipLabel:"Attributions",n=void 0!==t.expandClassName?t.expandClassName:e+"-expand",o=void 0!==t.collapseLabel?t.collapseLabel:"›",a=void 0!==t.collapseClassName?t.collapseClassName:e+"-collapse";"string"==typeof o?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=o,this.collapseLabel_.className=a):this.collapseLabel_=o;const l=void 0!==t.label?t.label:"i";"string"==typeof l?(this.label_=document.createElement("span"),this.label_.textContent=l,this.label_.className=n):this.label_=l;const h=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=i,this.toggleButton_.appendChild(h),this.toggleButton_.addEventListener(s.A.CLICK,this.handleClick_.bind(this),!1);const c=e+" "+r.XI+" "+r.$N+(this.collapsed_&&this.collapsible_?" "+r.nT:"")+(this.collapsible_?"":" ol-uncollapsible"),u=this.element;u.className=c,u.appendChild(this.toggleButton_),u.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(t){const e=Array.from(new Set(this.getMap().getAllLayers().flatMap((e=>e.getAttributions(t))))),i=!this.getMap().getAllLayers().some((t=>t.getSource()&&!1===t.getSource().getAttributionsCollapsible()));return this.overrideCollapsible_||this.setCollapsible(i),e}async updateElement_(t){if(!t)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const e=await Promise.all(this.collectSourceAttributions_(t).map((t=>(0,l.hq)((()=>t))))),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!(0,o.aI)(e,this.renderedAttributions_)){(0,a.gS)(this.ulElement_);for(let t=0,i=e.length;t{"use strict";i.d(e,{A:()=>h});var n=i(4120),s=i(2585),r=i(4238),o=i(9438),a=i(8711);class l extends n.A{constructor(t){super();const e=t.element;!e||t.target||e.style.pointerEvents||(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){(0,a.bf)(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&(0,a.bf)(this.element);for(let t=0,e=this.listenerKeys.length;t{"use strict";i.d(e,{A:()=>_});var n=i(972),s=i(6837),r=i(3116),o=i(5176),a=i(9438),l=i(8711);const h=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"];class c extends n.A{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target}),this.on,this.once,this.un,this.keys_=void 0!==t.keys&&t.keys,this.source_=t.source,this.isInFullscreen_=!1,this.boundHandleMapTargetChange_=this.handleMapTargetChange_.bind(this),this.cssClassName_=void 0!==t.className?t.className:"ol-full-screen",this.documentListeners_=[],this.activeClassName_=void 0!==t.activeClassName?t.activeClassName.split(" "):[this.cssClassName_+"-true"],this.inactiveClassName_=void 0!==t.inactiveClassName?t.inactiveClassName.split(" "):[this.cssClassName_+"-false"];const e=void 0!==t.label?t.label:"⤢";this.labelNode_="string"==typeof e?document.createTextNode(e):e;const i=void 0!==t.labelActive?t.labelActive:"×";this.labelActiveNode_="string"==typeof i?document.createTextNode(i):i;const n=t.tipLabel?t.tipLabel:"Toggle full-screen";this.button_=document.createElement("button"),this.button_.title=n,this.button_.setAttribute("type","button"),this.button_.appendChild(this.labelNode_),this.button_.addEventListener(s.A.CLICK,this.handleClick_.bind(this),!1),this.setClassName_(this.button_,this.isInFullscreen_),this.element.className=`${this.cssClassName_} ${o.XI} ${o.$N}`,this.element.appendChild(this.button_)}handleClick_(t){t.preventDefault(),this.handleFullScreen_()}handleFullScreen_(){const t=this.getMap();if(!t)return;const e=t.getOwnerDocument();if(u(e))if(d(e))!function(t){t.exitFullscreen?t.exitFullscreen():t.webkitExitFullscreen&&t.webkitExitFullscreen()}(e);else{let i;i=this.source_?"string"==typeof this.source_?e.getElementById(this.source_):this.source_:t.getTargetElement(),this.keys_?function(t){t.webkitRequestFullscreen?t.webkitRequestFullscreen():g(t)}(i):g(i)}}handleFullScreenChange_(){const t=this.getMap();if(!t)return;const e=this.isInFullscreen_;this.isInFullscreen_=d(t.getOwnerDocument()),e!==this.isInFullscreen_&&(this.setClassName_(this.button_,this.isInFullscreen_),this.isInFullscreen_?((0,l.fo)(this.labelActiveNode_,this.labelNode_),this.dispatchEvent("enterfullscreen")):((0,l.fo)(this.labelNode_,this.labelActiveNode_),this.dispatchEvent("leavefullscreen")),t.updateSize())}setClassName_(t,e){e?(t.classList.remove(...this.inactiveClassName_),t.classList.add(...this.activeClassName_)):(t.classList.remove(...this.activeClassName_),t.classList.add(...this.inactiveClassName_))}setMap(t){const e=this.getMap();e&&e.removeChangeListener(r.A.TARGET,this.boundHandleMapTargetChange_),super.setMap(t),this.handleMapTargetChange_(),t&&t.addChangeListener(r.A.TARGET,this.boundHandleMapTargetChange_)}handleMapTargetChange_(){const t=this.documentListeners_;for(let e=0,i=t.length;e{"use strict";i.d(e,{A:()=>u});var n=i(972),s=i(613),r=i(3407),o=i(9438),a=i(6933);const l="projection",h="coordinateFormat";class c extends n.A{constructor(t){t=t||{};const e=document.createElement("div");e.className=void 0!==t.className?t.className:"ol-mouse-position",super({element:e,render:t.render,target:t.target}),this.on,this.once,this.un,this.addChangeListener(l,this.handleProjectionChanged_),t.coordinateFormat&&this.setCoordinateFormat(t.coordinateFormat),t.projection&&this.setProjection(t.projection),this.renderOnMouseOut_=void 0!==t.placeholder,this.placeholder_=this.renderOnMouseOut_?t.placeholder:" ",this.renderedHTML_=e.innerHTML,this.mapProjection_=null,this.transform_=null,this.wrapX_=!1!==t.wrapX}handleProjectionChanged_(){this.transform_=null}getCoordinateFormat(){return this.get(h)}getProjection(){return this.get(l)}handleMouseMove(t){const e=this.getMap();this.updateHTML_(e.getEventPixel(t))}handleMouseOut(t){this.updateHTML_(null)}setMap(t){if(super.setMap(t),t){const e=t.getViewport();this.listenerKeys.push((0,o.KT)(e,s.A.POINTERMOVE,this.handleMouseMove,this)),this.renderOnMouseOut_&&this.listenerKeys.push((0,o.KT)(e,s.A.POINTEROUT,this.handleMouseOut,this)),this.updateHTML_(null)}}setCoordinateFormat(t){this.set(h,t)}setProjection(t){this.set(l,(0,r.Jt)(t))}updateHTML_(t){let e=this.placeholder_;if(t&&this.mapProjection_){if(!this.transform_){const t=this.getProjection();this.transform_=t?(0,r.FO)(this.mapProjection_,t):r.R6}const i=this.getMap().getCoordinateFromPixelInternal(t);if(i){const t=(0,r.Tf)();if(t&&(this.transform_=(0,r.FO)(this.mapProjection_,t)),this.transform_(i,i),this.wrapX_){const e=t||this.getProjection()||this.mapProjection_;(0,a.Li)(i,e)}const n=this.getCoordinateFormat();e=n?n(i):i.toString()}}this.renderedHTML_&&e===this.renderedHTML_||(this.element.innerHTML=e,this.renderedHTML_=e)}render(t){const e=t.frameState;e?this.mapProjection_!=e.viewState.projection&&(this.mapProjection_=e.viewState.projection,this.transform_=null):this.mapProjection_=null}}const u=c},6950:(t,e,i)=>{"use strict";i.d(e,{A:()=>v});var n=i(71),s=i(972),r=i(6837),o=i(2961),a=i(2585),l=i(3116),h=i(8450),c=i(1795),u=i(3568),d=i(9015),g=i(5176),_=i(915),f=i(9438),p=i(1064),m=i(8711);class x extends s.A{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.boundHandleRotationChanged_=this.handleRotationChanged_.bind(this),this.collapsed_=void 0===t.collapsed||t.collapsed,this.collapsible_=void 0===t.collapsible||t.collapsible,this.collapsible_||(this.collapsed_=!1),this.rotateWithView_=void 0!==t.rotateWithView&&t.rotateWithView,this.viewExtent_=void 0;const e=void 0!==t.className?t.className:"ol-overviewmap",i=void 0!==t.tipLabel?t.tipLabel:"Overview map",s=void 0!==t.collapseLabel?t.collapseLabel:"‹";"string"==typeof s?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=s):this.collapseLabel_=s;const a=void 0!==t.label?t.label:"›";"string"==typeof a?(this.label_=document.createElement("span"),this.label_.textContent=a):this.label_=a;const l=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_,h=document.createElement("button");h.setAttribute("type","button"),h.title=i,h.appendChild(l),h.addEventListener(r.A.CLICK,this.handleClick_.bind(this),!1),this.ovmapDiv_=document.createElement("div"),this.ovmapDiv_.className="ol-overviewmap-map",this.view_=t.view;const u=new o.A({view:t.view,controls:new n.A,interactions:new n.A});this.ovmap_=u,t.layers&&t.layers.forEach((function(t){u.addLayer(t)}));const d=document.createElement("div");d.className="ol-overviewmap-box",d.style.boxSizing="border-box",this.boxOverlay_=new c.A({position:[0,0],positioning:"center-center",element:d}),this.ovmap_.addOverlay(this.boxOverlay_);const _=e+" "+g.XI+" "+g.$N+(this.collapsed_&&this.collapsible_?" "+g.nT:"")+(this.collapsible_?"":" ol-uncollapsible"),f=this.element;f.className=_,f.appendChild(this.ovmapDiv_),f.appendChild(h);const p=this,m=this.boxOverlay_,x=this.boxOverlay_.getElement(),v=function(t){const e={clientX:(i=t).clientX,clientY:i.clientY};var i;const n=u.getEventCoordinateInternal(e);m.setPosition(n)},y=function(t){const e=u.getEventCoordinateInternal(t);p.getMap().getView().setCenterInternal(e),window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",y)};x.addEventListener("mousedown",(function(){window.addEventListener("mousemove",v),window.addEventListener("mouseup",y)}))}setMap(t){const e=this.getMap();if(t!==e){if(e){const t=e.getView();t&&this.unbindView_(t),this.ovmap_.setTarget(null)}if(super.setMap(t),t){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push((0,f.KT)(t,h.A.PROPERTYCHANGE,this.handleMapPropertyChange_,this));const e=t.getView();e&&(this.bindView_(e),e.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_())),this.ovmap_.isRendered()||this.updateBoxAfterOvmapIsRendered_()}}}handleMapPropertyChange_(t){if(t.key===l.A.VIEW){const e=t.oldValue;e&&this.unbindView_(e);const i=this.getMap().getView();this.bindView_(i)}else this.ovmap_.isRendered()||t.key!==l.A.TARGET&&t.key!==l.A.SIZE||this.ovmap_.updateSize()}bindView_(t){if(!this.view_){const e=new u.Ay({projection:t.getProjection()});this.ovmap_.setView(e)}t.addChangeListener(d.A.ROTATION,this.boundHandleRotationChanged_),this.handleRotationChanged_()}unbindView_(t){t.removeChangeListener(d.A.ROTATION,this.boundHandleRotationChanged_)}handleRotationChanged_(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())}validateExtent_(){const t=this.getMap(),e=this.ovmap_;if(!t.isRendered()||!e.isRendered())return;const i=t.getSize(),n=t.getView().calculateExtentInternal(i);if(this.viewExtent_&&(0,_.aI)(n,this.viewExtent_))return;this.viewExtent_=n;const s=e.getSize(),r=e.getView().calculateExtentInternal(s),o=e.getPixelFromCoordinateInternal((0,_.Py)(n)),a=e.getPixelFromCoordinateInternal((0,_.k_)(n)),l=Math.abs(o[0]-a[0]),h=Math.abs(o[1]-a[1]),c=s[0],u=s[1];l<.1*c||h<.1*u||l>.75*c||h>.75*u?this.resetExtent_():(0,_.ms)(r,n)||this.recenter_()}resetExtent_(){const t=this.getMap(),e=this.ovmap_,i=t.getSize(),n=t.getView().calculateExtentInternal(i),s=e.getView(),r=Math.log(7.5)/Math.LN2,o=1/(.1*Math.pow(2,r/2));(0,_.Af)(n,o),s.fitInternal((0,p.VY)(n))}recenter_(){const t=this.getMap(),e=this.ovmap_,i=t.getView();e.getView().setCenterInternal(i.getCenterInternal())}updateBox_(){const t=this.getMap(),e=this.ovmap_;if(!t.isRendered()||!e.isRendered())return;const i=t.getSize(),n=t.getView(),s=e.getView(),r=this.rotateWithView_?0:-n.getRotation(),o=this.boxOverlay_,a=this.boxOverlay_.getElement(),l=n.getCenterInternal(),h=n.getResolution(),c=s.getResolution(),u=i[0]*h/c,d=i[1]*h/c;if(o.setPosition(l),a){a.style.width=u+"px",a.style.height=d+"px";const t="rotate("+r+"rad)";a.style.transform=t}}updateBoxAfterOvmapIsRendered_(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=(0,f.Jz)(this.ovmap_,a.A.POSTRENDER,(function(t){delete this.ovmapPostrenderKey_,this.updateBox_()}),this))}handleClick_(t){t.preventDefault(),this.handleToggle_()}handleToggle_(){this.element.classList.toggle(g.nT),this.collapsed_?(0,m.fo)(this.collapseLabel_,this.label_):(0,m.fo)(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;const t=this.ovmap_;if(!this.collapsed_){if(t.isRendered())return this.viewExtent_=void 0,void t.render();t.updateSize(),this.resetExtent_(),this.updateBoxAfterOvmapIsRendered_()}}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())}setCollapsed(t){this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()}getCollapsed(){return this.collapsed_}getRotateWithView(){return this.rotateWithView_}setRotateWithView(t){this.rotateWithView_!==t&&(this.rotateWithView_=t,0!==this.getMap().getView().getRotation()&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))}getOverviewMap(){return this.ovmap_}render(t){this.validateExtent_(),this.updateBox_()}}const v=x},2898:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var n=i(972),s=i(6837),r=i(5176),o=i(3474);class a extends n.A{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target});const e=void 0!==t.className?t.className:"ol-rotate",i=void 0!==t.label?t.label:"⇧",n=void 0!==t.compassClassName?t.compassClassName:"ol-compass";this.label_=null,"string"==typeof i?(this.label_=document.createElement("span"),this.label_.className=n,this.label_.textContent=i):(this.label_=i,this.label_.classList.add(n));const o=t.tipLabel?t.tipLabel:"Reset rotation",a=document.createElement("button");a.className=e+"-reset",a.setAttribute("type","button"),a.title=o,a.appendChild(this.label_),a.addEventListener(s.A.CLICK,this.handleClick_.bind(this),!1);const l=e+" "+r.XI+" "+r.$N,h=this.element;h.className=l,h.appendChild(a),this.callResetNorth_=t.resetNorth?t.resetNorth:void 0,this.duration_=void 0!==t.duration?t.duration:250,this.autoHide_=void 0===t.autoHide||t.autoHide,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(r.Si)}handleClick_(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const t=this.getMap().getView();if(!t)return;const e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:o.vT}):t.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const i=e.viewState.rotation;if(i!=this.rotation_){const t="rotate("+i+"rad)";if(this.autoHide_){const t=this.element.classList.contains(r.Si);t||0!==i?t&&0!==i&&this.element.classList.remove(r.Si):this.element.classList.add(r.Si)}this.label_.style.transform=t}this.rotation_=i}}const l=a},3965:(t,e,i)=>{"use strict";i.d(e,{A:()=>c});var n=i(972),s=i(5176),r=i(3407);const o="units",a=[1,2,5],l=25.4/.28;class h extends n.A{constructor(t){t=t||{};const e=document.createElement("div");e.style.pointerEvents="none",super({element:e,render:t.render,target:t.target}),this.on,this.once,this.un;const i=void 0!==t.className?t.className:t.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=i+"-inner",this.element.className=i+" "+s.XI,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=void 0!==t.minWidth?t.minWidth:64,this.maxWidth_=t.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(o,this.handleUnitsChanged_),this.setUnits(t.units||"metric"),this.scaleBar_=t.bar||!1,this.scaleBarSteps_=t.steps||4,this.scaleBarText_=t.text||!1,this.dpi_=t.dpi||void 0}getUnits(){return this.get(o)}handleUnitsChanged_(){this.updateElement_()}setUnits(t){this.set(o,t)}setDpi(t){this.dpi_=t}updateElement_(){const t=this.viewState_;if(!t)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const e=t.center,i=t.projection,n=this.getUnits(),s="degrees"==n?"degrees":"m";let o=(0,r.hO)(i,t.resolution,e,s);const h=this.minWidth_*(this.dpi_||l)/l,c=void 0!==this.maxWidth_?this.maxWidth_*(this.dpi_||l)/l:void 0;let u=h*o,d="";if("degrees"==n){const t=r.Ig.degrees;u*=t,u=c){g=p,_=m,f=x;break}if(_>=h)break;p=g,m=_,x=f,++v}const y=this.scaleBar_?this.createScaleBar(_,g,d):g.toFixed(f<0?-f:0)+" "+d;this.renderedHTML_!=y&&(this.innerElement_.innerHTML=y,this.renderedHTML_=y),this.renderedWidth_!=_&&(this.innerElement_.style.width=_+"px",this.renderedWidth_=_),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(t,e,i){const n=this.getScaleForResolution(),s=n<1?Math.round(1/n).toLocaleString()+" : 1":"1 : "+Math.round(n).toLocaleString(),r=this.scaleBarSteps_,o=t/r,a=[this.createMarker("absolute")];for(let n=0;n
    `+this.createMarker("relative")+(n%2==0||2===r?this.createStepText(n,t,!1,e,i):"")+"")}return a.push(this.createStepText(r,t,!0,e,i)),(this.scaleBarText_?`
    `+s+"
    ":"")+a.join("")}createMarker(t){return`
    `}createStepText(t,e,i,n,s){const r=(0===t?0:Math.round(n/this.scaleBarSteps_*t*100)/100)+(0===t?"":" "+s);return`
    `+r+"
    "}getScaleForResolution(){return(0,r.hO)(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m")*(1e3/25.4)*(this.dpi_||l)}render(t){const e=t.frameState;this.viewState_=e?e.viewState:null,this.updateElement_()}}const c=h},9186:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var n=i(972),s=i(6837),r=i(5176),o=i(3474);class a extends n.A{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=void 0!==t.className?t.className:"ol-zoom",i=void 0!==t.delta?t.delta:1,n=void 0!==t.zoomInClassName?t.zoomInClassName:e+"-in",o=void 0!==t.zoomOutClassName?t.zoomOutClassName:e+"-out",a=void 0!==t.zoomInLabel?t.zoomInLabel:"+",l=void 0!==t.zoomOutLabel?t.zoomOutLabel:"–",h=void 0!==t.zoomInTipLabel?t.zoomInTipLabel:"Zoom in",c=void 0!==t.zoomOutTipLabel?t.zoomOutTipLabel:"Zoom out",u=document.createElement("button");u.className=n,u.setAttribute("type","button"),u.title=h,u.appendChild("string"==typeof a?document.createTextNode(a):a),u.addEventListener(s.A.CLICK,this.handleClick_.bind(this,i),!1);const d=document.createElement("button");d.className=o,d.setAttribute("type","button"),d.title=c,d.appendChild("string"==typeof l?document.createTextNode(l):l),d.addEventListener(s.A.CLICK,this.handleClick_.bind(this,-i),!1);const g=e+" "+r.XI+" "+r.$N,_=this.element;_.className=g,_.appendChild(u),_.appendChild(d),this.duration_=void 0!==t.duration?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const e=this.getMap().getView();if(!e)return;const i=e.getZoom();if(void 0!==i){const n=e.getConstrainedZoom(i+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:n,duration:this.duration_,easing:o.vT})):e.setZoom(n)}}}const l=a},9439:(t,e,i)=>{"use strict";i.d(e,{A:()=>d});var n=i(972),s=i(6837),r=i(613),o=i(5176),a=i(1597),l=i(3474),h=i(9438),c=i(1685);class u extends n.A{constructor(t){super({target:(t=t||{}).target,element:document.createElement("div"),render:t.render}),this.dragListenerKeys_=[],this.currentResolution_=void 0,this.direction_=0,this.dragging_,this.heightLimit_=0,this.widthLimit_=0,this.startX_,this.startY_,this.thumbSize_=null,this.sliderInitialized_=!1,this.duration_=void 0!==t.duration?t.duration:200;const e=void 0!==t.className?t.className:"ol-zoomslider",i=document.createElement("button");i.setAttribute("type","button"),i.className=e+"-thumb "+o.XI;const n=this.element;n.className=e+" "+o.XI+" "+o.$N,n.appendChild(i),n.addEventListener(r.A.POINTERDOWN,this.handleDraggerStart_.bind(this),!1),n.addEventListener(r.A.POINTERMOVE,this.handleDraggerDrag_.bind(this),!1),n.addEventListener(r.A.POINTERUP,this.handleDraggerEnd_.bind(this),!1),n.addEventListener(s.A.CLICK,this.handleContainerClick_.bind(this),!1),i.addEventListener(s.A.CLICK,c.dG,!1)}setMap(t){super.setMap(t),t&&t.render()}initSlider_(){const t=this.element;let e=t.offsetWidth,i=t.offsetHeight;if(0===e&&0===i)return this.sliderInitialized_=!1;const n=getComputedStyle(t);e-=parseFloat(n.paddingRight)+parseFloat(n.paddingLeft),i-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom);const s=t.firstElementChild,r=getComputedStyle(s),o=s.offsetWidth+parseFloat(r.marginRight)+parseFloat(r.marginLeft),a=s.offsetHeight+parseFloat(r.marginTop)+parseFloat(r.marginBottom);return this.thumbSize_=[o,a],e>i?(this.direction_=1,this.widthLimit_=e-o):(this.direction_=0,this.heightLimit_=i-a),this.sliderInitialized_=!0}handleContainerClick_(t){const e=this.getMap().getView(),i=this.getRelativePosition_(t.offsetX-this.thumbSize_[0]/2,t.offsetY-this.thumbSize_[1]/2),n=this.getResolutionForPosition_(i),s=e.getConstrainedZoom(e.getZoomForResolution(n));e.animateInternal({zoom:s,duration:this.duration_,easing:l.vT})}handleDraggerStart_(t){if(!this.dragging_&&t.target===this.element.firstElementChild){const e=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.startX_=t.clientX-parseFloat(e.style.left),this.startY_=t.clientY-parseFloat(e.style.top),this.dragging_=!0,0===this.dragListenerKeys_.length){const t=this.handleDraggerDrag_,e=this.handleDraggerEnd_,i=this.getMap().getOwnerDocument();this.dragListenerKeys_.push((0,h.KT)(i,r.A.POINTERMOVE,t,this),(0,h.KT)(i,r.A.POINTERUP,e,this))}}}handleDraggerDrag_(t){if(this.dragging_){const e=t.clientX-this.startX_,i=t.clientY-this.startY_,n=this.getRelativePosition_(e,i);this.currentResolution_=this.getResolutionForPosition_(n),this.getMap().getView().setResolution(this.currentResolution_)}}handleDraggerEnd_(t){this.dragging_&&(this.getMap().getView().endInteraction(),this.dragging_=!1,this.startX_=void 0,this.startY_=void 0,this.dragListenerKeys_.forEach(h.JH),this.dragListenerKeys_.length=0)}setThumbPosition_(t){const e=this.getPositionForResolution_(t),i=this.element.firstElementChild;1==this.direction_?i.style.left=this.widthLimit_*e+"px":i.style.top=this.heightLimit_*e+"px"}getRelativePosition_(t,e){let i;return i=1===this.direction_?t/this.widthLimit_:e/this.heightLimit_,(0,a.qE)(i,0,1)}getResolutionForPosition_(t){return this.getMap().getView().getResolutionForValueFunction()(1-t)}getPositionForResolution_(t){const e=this.getMap().getView().getValueForResolutionFunction();return(0,a.qE)(1-e(t),0,1)}render(t){if(!t.frameState)return;if(!this.sliderInitialized_&&!this.initSlider_())return;const e=t.frameState.viewState.resolution;this.currentResolution_=e,this.setThumbPosition_(e)}}const d=u},1727:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(972),s=i(6837),r=i(5176),o=i(3407),a=i(1064);class l extends n.A{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target}),this.extent=t.extent?t.extent:null;const e=void 0!==t.className?t.className:"ol-zoom-extent",i=void 0!==t.label?t.label:"E",n=void 0!==t.tipLabel?t.tipLabel:"Fit to extent",o=document.createElement("button");o.setAttribute("type","button"),o.title=n,o.appendChild("string"==typeof i?document.createTextNode(i):i),o.addEventListener(s.A.CLICK,this.handleClick_.bind(this),!1);const a=e+" "+r.XI+" "+r.$N,l=this.element;l.className=a,l.appendChild(o)}handleClick_(t){t.preventDefault(),this.handleZoomToExtent()}handleZoomToExtent(){const t=this.getMap().getView(),e=this.extent?(0,o.SD)(this.extent,t.getProjection()):t.getProjection().getExtent();t.fitInternal((0,a.VY)(e))}}const h=l},6933:(t,e,i)=>{"use strict";i.d(e,{$x:()=>_,Io:()=>g,Li:()=>f,U$:()=>p,WQ:()=>o,aI:()=>h,aP:()=>l,e$:()=>c,hG:()=>d,hs:()=>u,sG:()=>a});var n=i(915),s=i(1597),r=i(2806);function o(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function a(t,e){const i=t[0],n=t[1],s=e[0],r=e[1],o=s[0],a=s[1],l=r[0],h=r[1],c=l-o,u=h-a,d=0===c&&0===u?0:(c*(i-o)+u*(n-a))/(c*c+u*u||0);let g,_;return d<=0?(g=o,_=a):d>=1?(g=l,_=h):(g=o+d*c,_=a+d*u),[g,_]}function l(t,e,i){const n=(0,s.xP)(e+180,360)-180,o=Math.abs(3600*n),a=i||0;let l=Math.floor(o/3600),h=Math.floor((o-3600*l)/60),c=(0,s.Mg)(o-3600*l-60*h,a);c>=60&&(c=0,h+=1),h>=60&&(h=0,l+=1);let u=l+"°";return 0===h&&0===c||(u+=" "+(0,r.H)(h,2)+"′"),0!==c&&(u+=" "+(0,r.H)(c,2,a)+"″"),0!==n&&(u+=" "+t.charAt(n<0?1:0)),u}function h(t,e){let i=!0;for(let n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i}function c(t,e){const i=Math.cos(e),n=Math.sin(e),s=t[0]*i-t[1]*n,r=t[1]*i+t[0]*n;return t[0]=s,t[1]=r,t}function u(t,e){return t[0]*=e,t[1]*=e,t}function d(t,e){const i=t[0]-e[0],n=t[1]-e[1];return i*i+n*n}function g(t,e){return Math.sqrt(d(t,e))}function _(t,e){return d(t,a(t,e))}function f(t,e){if(e.canWrapX()){const i=(0,n.RG)(e.getExtent()),s=p(t,e,i);s&&(t[0]-=s*i)}return t}function p(t,e,i){const s=e.getExtent();let r=0;return e.canWrapX()&&(t[0]s[2])&&(i=i||(0,n.RG)(s),r=Math.floor((t[0]-s[0])/i)),r}},5176:(t,e,i)=>{"use strict";i.d(e,{$N:()=>a,K5:()=>u,Q5:()=>s,Si:()=>n,Vv:()=>o,XI:()=>r,nT:()=>l});const n="ol-hidden",s="ol-selectable",r="ol-unselectable",o="ol-unsupported",a="ol-control",l="ol-collapsed",h=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),c=["style","variant","weight","size","lineHeight","family"],u=function(t){const e=t.match(h);if(!e)return null;const i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let t=0,n=c.length;t{"use strict";i.d(e,{DK:()=>h,Gq:()=>l,WM:()=>g,Y:()=>s,Yg:()=>a,bf:()=>u,fo:()=>c,gS:()=>d,lr:()=>o});var n=i(7771);function s(t,e,i,s){let r;return r=i&&i.length?i.shift():n.Wl?new OffscreenCanvas(t||300,e||300):document.createElement("canvas"),t&&(r.width=t),e&&(r.height=e),r.getContext("2d",s)}let r;function o(){return r||(r=s(1,1)),r}function a(t){const e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function l(t){let e=t.offsetWidth;const i=getComputedStyle(t);return e+=parseInt(i.marginLeft,10)+parseInt(i.marginRight,10),e}function h(t){let e=t.offsetHeight;const i=getComputedStyle(t);return e+=parseInt(i.marginTop,10)+parseInt(i.marginBottom,10),e}function c(t,e){const i=e.parentNode;i&&i.replaceChild(t,e)}function u(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function d(t){for(;t.lastChild;)t.removeChild(t.lastChild)}function g(t,e){const i=t.childNodes;for(let n=0;;++n){const s=i[n],r=e[n];if(!s&&!r)break;s!==r&&(s?r?t.insertBefore(r,s):(t.removeChild(s),--n):t.appendChild(r))}}},3474:(t,e,i)=>{"use strict";function n(t){return Math.pow(t,3)}function s(t){return 1-n(1-t)}function r(t){return 3*t*t-2*t*t*t}function o(t){return t}i.d(e,{T9:()=>r,a6:()=>n,sn:()=>o,vT:()=>s})},9438:(t,e,i)=>{"use strict";i.d(e,{JH:()=>o,Jz:()=>r,KT:()=>s});var n=i(3530);function s(t,e,i,n,s){if(n&&n!==t&&(i=i.bind(n)),s){const n=i;i=function(){t.removeEventListener(e,i),n.apply(this,arguments)}}const r={target:t,type:e,listener:i};return t.addEventListener(e,i),r}function r(t,e,i,n){return s(t,e,i,n,!0)}function o(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),(0,n.I)(t))}},1685:(t,e,i)=>{"use strict";function n(t){t.stopPropagation()}i.d(e,{Ay:()=>s,dG:()=>n});const s=class{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}},6837:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"}},9332:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var n=i(25),s=i(1685),r=i(4238),o=i(3530);class a extends n.A{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const i=this.listeners_||(this.listeners_={}),n=i[t]||(i[t]=[]);n.includes(e)||n.push(e)}dispatchEvent(t){const e="string"==typeof t,i=e?t:t.type,n=this.listeners_&&this.listeners_[i];if(!n)return;const o=e?new s.Ay(t):t;o.target||(o.target=this.eventTarget_||this);const a=this.dispatching_||(this.dispatching_={}),l=this.pendingRemovals_||(this.pendingRemovals_={});let h;i in a||(a[i]=0,l[i]=0),++a[i];for(let t=0,e=n.length;t0)}removeEventListener(t,e){if(!this.listeners_)return;const i=this.listeners_[t];if(!i)return;const n=i.indexOf(e);-1!==n&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[n]=r.tV,++this.pendingRemovals_[t]):(i.splice(n,1),0===i.length&&delete this.listeners_[t]))}}const l=a},8704:(t,e,i)=>{"use strict";i.d(e,{A4:()=>E,GB:()=>x,Gk:()=>u,IO:()=>h,Js:()=>l,Kg:()=>v,Q7:()=>a,TS:()=>p,Zm:()=>g,at:()=>d,eL:()=>c,fs:()=>T,k5:()=>m,qG:()=>f,t5:()=>_,tE:()=>y});var n=i(3445),s=i(4238),r=i(7771),o=i(588);function a(t){const e=arguments;return function(t){let i=!0;for(let n=0,s=e.length;n{"use strict";i.d(e,{DG:()=>v,Fq:()=>u,SR:()=>y,T8:()=>a,Xj:()=>m,Ye:()=>L,ZD:()=>T,_D:()=>x,cT:()=>h,go:()=>f,ho:()=>p,j:()=>o,mE:()=>c,qg:()=>E,wl:()=>l});var n=i(6514),s=i(3730);let r=0;const o=0,a=1<",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Coalesce:"coalesce",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette",ToString:"to-string"},A={[T.Get]:I((([t,e])=>void 0!==e?function(t){switch(t){case"string":return h;case"color":return c;case"number":return l;case"boolean":return a;case"number[]":return u;default:throw new Error(`Unrecognized type hint: ${t}`)}}(e.value):d),S(1,2),(function(t,e){const i=E(t[1],e);if(!(i instanceof x))throw new Error("Expected a literal argument for get operation");if("string"!=typeof i.value)throw new Error("Expected a string argument for get operation");return e.properties.add(i.value),3===t.length?[i,E(t[2],e)]:[i]})),[T.Var]:I((([t])=>t.type),S(1,1),(function(t,e,i,n){const s=t[1];if("string"!=typeof s)throw new Error("Expected a string argument for var operation");if(e.variables.add(s),!("variables"in e.style)||void 0===e.style.variables[s])return[new x(d,s)];const r=E(e.style.variables[s],e);if(r.value=s,n&&!p(n,r.type))throw new Error(`The variable ${s} has type ${f(r.type)} but the following type was expected: ${f(n)}`);return[r]})),[T.Id]:I(l|h,C,(function(t,e){e.featureId=!0})),[T.Concat]:I(h,S(2,1/0),R(d)),[T.GeometryType]:I(h,C,(function(t,e){e.geometryType=!0})),[T.Resolution]:I(l,C),[T.Zoom]:I(l,C),[T.Time]:I(l,C),[T.Any]:I(a,S(2,1/0),R(a)),[T.All]:I(a,S(2,1/0),R(a)),[T.Not]:I(a,S(1,1),R(a)),[T.Equal]:I(a,S(2,2),R(d),w),[T.NotEqual]:I(a,S(2,2),R(d),w),[T.GreaterThan]:I(a,S(2,2),R(d),w),[T.GreaterThanOrEqualTo]:I(a,S(2,2),R(d),w),[T.LessThan]:I(a,S(2,2),R(d),w),[T.LessThanOrEqualTo]:I(a,S(2,2),R(d),w),[T.Multiply]:I((t=>{let e=l|c;for(let i=0;i{let e=d;for(let i=1;i{let e=d;for(let i=2;i{let e=c|l;for(let i=3;i{let e=d;for(let i=1;i3===t.length||4===t.length?u|c:u),S(1,1/0),R(l)),[T.Color]:I(c,S(1,4),R(l)),[T.Band]:I(l,S(1,3),R(l)),[T.Palette]:I(c,S(2,2),(function(t,e){const i=E(t[1],e,l);if(i.type!==l)throw new Error(`The first argument of palette must be an number, got ${f(i.type)} instead`);const n=t[2];if(!Array.isArray(n))throw new Error("The second argument of palette must be an array");const s=new Array(n.length);for(let t=0;te)throw new Error(`Expected ${e===1/0?`${t} or more`:`${t} to ${e}`} arguments for ${s}, got ${r}`)}}function R(t){return function(e,i){const n=e[0],s=e.length-1,r=new Array(s);for(let o=0;o{"use strict";i.d(e,{uZ:()=>m,nR:()=>x,VO:()=>h,Lm:()=>d,z0:()=>f,$R:()=>a,Tl:()=>g,Sl:()=>_});const n=class{constructor(t,e){this.name=t,this.data=e,this.texture_=null}getTexture(t){if(!this.texture_){const e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.data.length/4,1,0,t.RGBA,t.UNSIGNED_BYTE,this.data),this.texture_=e}return this.texture_}delete(t){this.texture_&&t.deleteTexture(this.texture_),this.texture_=null}};var s=i(9825),r=i(2323),o=i(3730);function a(t){const e=t.toString();return e.includes(".")?e:e+".0"}function l(t){if(t.length<2||t.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return`vec${t.length}(${t.map(a).join(", ")})`}function h(t){const e=(0,o._j)(t),i=e.length>3?e[3]:1;return l([e[0]/255*i,e[1]/255*i,e[2]/255*i,i])}const c={};let u=0;function d(t){return t in c||(c[t]=u++),c[t]}function g(t){return a(d(t))}function _(t){return"u_var_"+t}function f(){return{inFragmentShader:!1,variables:{},properties:{},functions:{},bandCount:0,style:{}}}const p="getBandValue",m="u_paletteTextures";function x(t,e,i,n){const r=(0,s.qg)(t,i,e);if((0,s.Xj)(r.type,s.j))throw new Error("No matching type was found");if(!(0,s.ho)(e,r.type)){const t=(0,s.go)(e),i=(0,s.go)(r.type);throw new Error(`Expected expression to be of type ${t}, got ${i}`)}return E(r,e,n)}function v(t){return(e,i,n)=>{const s=i.args.length,r=new Array(s);for(let t=0;t{const i=e.args[0].value;return i in t.properties||(t.properties[i]={name:i,type:e.type}),(t.inFragmentShader?"v_prop_":"a_prop_")+i},[s.ZD.GeometryType]:(t,e,i)=>{const n="geometryType";return n in t.properties||(t.properties[n]={name:n,type:s.cT,evaluator:t=>(0,s.Ye)(t.getGeometry())}),(t.inFragmentShader?"v_prop_":"a_prop_")+n},[s.ZD.Var]:(t,e)=>{const i=e.args[0].value;return i in t.variables||(t.variables[i]={name:i,type:e.type}),_(i)},[s.ZD.Resolution]:()=>"u_resolution",[s.ZD.Zoom]:()=>"u_zoom",[s.ZD.Time]:()=>"u_time",[s.ZD.Any]:v((t=>`(${t.join(" || ")})`)),[s.ZD.All]:v((t=>`(${t.join(" && ")})`)),[s.ZD.Not]:v((([t])=>`(!${t})`)),[s.ZD.Equal]:v((([t,e])=>`(${t} == ${e})`)),[s.ZD.NotEqual]:v((([t,e])=>`(${t} != ${e})`)),[s.ZD.GreaterThan]:v((([t,e])=>`(${t} > ${e})`)),[s.ZD.GreaterThanOrEqualTo]:v((([t,e])=>`(${t} >= ${e})`)),[s.ZD.LessThan]:v((([t,e])=>`(${t} < ${e})`)),[s.ZD.LessThanOrEqualTo]:v((([t,e])=>`(${t} <= ${e})`)),[s.ZD.Multiply]:v((t=>`(${t.join(" * ")})`)),[s.ZD.Divide]:v((([t,e])=>`(${t} / ${e})`)),[s.ZD.Add]:v((t=>`(${t.join(" + ")})`)),[s.ZD.Subtract]:v((([t,e])=>`(${t} - ${e})`)),[s.ZD.Clamp]:v((([t,e,i])=>`clamp(${t}, ${e}, ${i})`)),[s.ZD.Mod]:v((([t,e])=>`mod(${t}, ${e})`)),[s.ZD.Pow]:v((([t,e])=>`pow(${t}, ${e})`)),[s.ZD.Abs]:v((([t])=>`abs(${t})`)),[s.ZD.Floor]:v((([t])=>`floor(${t})`)),[s.ZD.Ceil]:v((([t])=>`ceil(${t})`)),[s.ZD.Round]:v((([t])=>`floor(${t} + 0.5)`)),[s.ZD.Sin]:v((([t])=>`sin(${t})`)),[s.ZD.Cos]:v((([t])=>`cos(${t})`)),[s.ZD.Atan]:v((([t,e])=>void 0!==e?`atan(${t}, ${e})`:`atan(${t})`)),[s.ZD.Sqrt]:v((([t])=>`sqrt(${t})`)),[s.ZD.Match]:v((t=>{const e=t[0],i=t[t.length-1];let n=null;for(let s=t.length-3;s>=1;s-=2)n=`(${e} == ${t[s]} ? ${t[s+1]} : ${n||i})`;return n})),[s.ZD.Between]:v((([t,e,i])=>`(${t} >= ${e} && ${t} <= ${i})`)),[s.ZD.Interpolate]:v((([t,e,...i])=>{let n="";for(let s=0;s{const e=t[t.length-1];let i=null;for(let n=t.length-3;n>=0;n-=2)i=`(${t[n]} ? ${t[n+1]} : ${i||e})`;return i})),[s.ZD.In]:v((([t,...e],i)=>{const n=function(t,e){return`operator_in_${Object.keys(e.functions).length}`}(0,i),s=[];for(let t=0;t`vec${t.length}(${t.join(", ")})`)),[s.ZD.Color]:v((t=>{if(1===t.length)return`vec4(vec3(${t[0]} / 255.0), 1.0)`;if(2===t.length)return`(${t[1]} * vec4(vec3(${t[0]} / 255.0), 1.0))`;const e=t.slice(0,3).map((t=>`${t} / 255.0`));return 3===t.length?`vec4(${e.join(", ")}, 1.0)`:`(${t[3]} * vec4(${e.join(", ")}, 1.0))`})),[s.ZD.Band]:v((([t,e,i],n)=>{if(!(p in n.functions)){let t="";const e=n.bandCount||1;for(let i=0;i{const[i,...r]=e.args,a=r.length,l=new Uint8Array(4*a);for(let t=0;t0)return a(t.value);if((t.type&s.T8)>0)return t.value.toString();if((t.type&s.cT)>0)return g(t.value.toString());if((t.type&s.mE)>0)return h(t.value);if((t.type&s.Fq)>0)return l(t.value);throw new Error(`Unexpected expression ${t.value} (expected type ${(0,s.go)(e)})`)}},915:(t,e,i)=>{"use strict";i.d(e,{$C:()=>y,$u:()=>G,Af:()=>z,Bg:()=>I,HY:()=>k,Im:()=>N,Ld:()=>a,Li:()=>U,Mx:()=>j,N:()=>g,NW:()=>B,Oq:()=>P,Py:()=>D,QJ:()=>X,R:()=>S,R8:()=>E,RG:()=>O,Rj:()=>c,S5:()=>d,Tr:()=>s,UG:()=>C,Vy:()=>p,WU:()=>F,X$:()=>v,Ym:()=>l,Yw:()=>L,_N:()=>M,aI:()=>m,aZ:()=>_,bE:()=>x,dP:()=>f,k_:()=>R,ms:()=>h,o8:()=>o,q1:()=>w,qF:()=>b,r:()=>r,sB:()=>A,vz:()=>u});var n=i(1580);function s(t){const e=[1/0,1/0,-1/0,-1/0];for(let i=0,n=t.length;ir&&(h|=n.A.RIGHT),lo&&(h|=n.A.ABOVE),h===n.A.UNKNOWN&&(h=n.A.INTERSECTING),h}function d(){return[1/0,1/0,-1/0,-1/0]}function g(t,e,i,n,s){return s?(s[0]=t,s[1]=e,s[2]=i,s[3]=n,s):[t,e,i,n]}function _(t){return g(1/0,1/0,-1/0,-1/0,t)}function f(t,e){const i=t[0],n=t[1];return g(i,n,i,n,e)}function p(t,e,i,n,s){return E(_(s),t,e,i,n)}function m(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function x(t,e,i){return Math.abs(t[0]-e[0])t[2]&&(t[2]=e[2]),e[1]t[3]&&(t[3]=e[3]),t}function y(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function E(t,e,i,n,s){for(;ie[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function N(t){return t[2]=a&&p<=h),s||!(o&n.A.RIGHT)||r&n.A.RIGHT||(m=_-(g-h)*f,s=m>=l&&m<=c),s||!(o&n.A.BELOW)||r&n.A.BELOW||(p=g-(_-l)/f,s=p>=a&&p<=h),s||!(o&n.A.LEFT)||r&n.A.LEFT||(m=_-(g-a)*f,s=m>=l&&m<=c)}return s}function B(t,e,i,n){if(N(t))return _(i);let s=[];if(n>1){const e=t[2]-t[0],i=t[3]-t[1];for(let r=0;r=i[2])){const e=O(i),s=Math.floor((n[0]-i[0])/e)*e;t[0]-=s,t[2]-=s}return t}function X(t,e,i){if(e.canWrapX()){const n=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[n[0],t[1],n[2],t[3]]];U(t,e);const s=O(n);if(O(t)>s&&!i)return[[n[0],t[1],n[2],t[3]]];if(t[0]n[2])return[[t[0],t[1],n[2],t[3]],[n[0],t[1],t[2]-s,t[3]]]}return[t]}},1580:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16}},1142:(t,e,i)=>{"use strict";i.d(e,{m8:()=>r,nF:()=>o});var n=i(4238);let s=!1;function r(t,e,i,n,r,o,a){const l=new XMLHttpRequest;l.open("GET","function"==typeof t?t(i,n,r):t,!0),"arraybuffer"==e.getType()&&(l.responseType="arraybuffer"),l.withCredentials=s,l.onload=function(t){if(!l.status||l.status>=200&&l.status<300){const t=e.getType();try{let n;"text"==t||"json"==t?n=l.responseText:"xml"==t?n=l.responseXML||l.responseText:"arraybuffer"==t&&(n=l.response),n?o(e.readFeatures(n,{extent:i,featureProjection:r}),e.readProjection(n)):a()}catch{a()}}else a()},l.onerror=a,l.send()}function o(t,e){return function(i,s,o,a,l){const h=this;r(t,e,i,s,o,(function(t,e){h.addFeatures(t),void 0!==a&&a(t)}),l||n.tV)}}},6067:(t,e,i)=>{"use strict";i.d(e,{A:()=>V});var n=i(4087);function s(t,e){return r(t,e,[]).join("")}function r(t,e,i){if(t.nodeType==Node.CDATA_SECTION_NODE||t.nodeType==Node.TEXT_NODE)e?i.push(String(t.nodeValue).replace(/(\r\n|\r|\n)/g,"")):i.push(t.nodeValue);else{let n;for(n=t.firstChild;n;n=n.nextSibling)r(n,e,i)}return i}function o(t,e){return function(i,n){const s=t.call(void 0!==e?e:this,i,n);void 0!==s&&n[n.length-1].push(s)}}function a(t,e,i){return function(n,s){const r=t.call(void 0!==i?i:this,n,s);if(void 0!==r){const t=s[s.length-1],i=void 0!==e?e:n.localName;let o;i in t?o=t[i]:(o=[],t[i]=o),o.push(r)}}}function l(t,e,i){return function(n,s){const r=t.call(void 0!==i?i:this,n,s);void 0!==r&&(s[s.length-1][void 0!==e?e:n.localName]=r)}}function h(t,e,i){let n,s;for(i=void 0!==i?i:{},n=0,s=t.length;n{"use strict";i.d(e,{B4:()=>a,W8:()=>r,hq:()=>l,rT:()=>s,tV:()=>o});var n=i(6514);function s(){return!0}function r(){return!1}function o(){}function a(t){let e,i,s,r=!1;return function(){const o=Array.prototype.slice.call(arguments);return r&&this===s&&(0,n.aI)(o,i)||(r=!0,s=this,i=o,e=t.apply(this,arguments)),e}}function l(t){return function(){let e;try{e=t()}catch(t){return Promise.reject(t)}return e instanceof Promise?e:Promise.resolve(e)}()}},7430:(t,e,i)=>{"use strict";i.d(e,{A:()=>d});var n=i(4120),s=i(4087),r=i(9703),o=i(915),a=i(3407),l=i(4238),h=i(7622);const c=(0,r.vt)();class u extends n.A{constructor(){super(),this.extent_=(0,o.S5)(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=(0,l.B4)(((t,e,i)=>{if(!i)return this.getSimplifiedGeometry(e);const n=this.clone();return n.applyTransform(i),n.getSimplifiedGeometry(e)}))}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return(0,s.b0)()}closestPointXY(t,e,i,n){return(0,s.b0)()}containsXY(t,e){const i=this.getClosestPoint([t,e]);return i[0]===t&&i[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return(0,s.b0)()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const t=this.computeExtent(this.extent_);(isNaN(t[0])||isNaN(t[1]))&&(0,o.aZ)(t),this.extentRevision_=this.getRevision()}return(0,o.$u)(this.extent_,t)}rotate(t,e){(0,s.b0)()}scale(t,e,i){(0,s.b0)()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return(0,s.b0)()}getType(){return(0,s.b0)()}applyTransform(t){(0,s.b0)()}intersectsExtent(t){return(0,s.b0)()}translate(t,e){(0,s.b0)()}transform(t,e){const i=(0,a.Jt)(t),n="tile-pixels"==i.getUnits()?function(t,n,s){const l=i.getExtent(),u=i.getWorldExtent(),d=(0,o.Oq)(u)/(0,o.Oq)(l);return(0,r.Zz)(c,u[0],u[3],d,-d,0,0,0),(0,h.Rc)(t,0,t.length,s,c,n),(0,a.RG)(i,e)(t,n,s)}:(0,a.RG)(i,e);return this.applyTransform(n),this}}const d=u},4338:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(6837),s=i(7430),r=i(915),o=i(9438);class a extends s.A{constructor(t){super(),this.geometries_=t,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(o.JH),this.changeEventsKeys_.length=0}listenGeometriesChange_(){const t=this.geometries_;for(let e=0,i=t.length;et.clone()))}const h=a},1217:(t,e,i)=>{"use strict";i.d(e,{A:()=>f});var n=i(2096),s=i(3953),r=i(915),o=i(2497),a=i(3671),l=i(6514),h=i(1374),c=i(6361),u=i(9969),d=i(4350),g=i(904);class _ extends n.Ay{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}appendCoordinate(t){(0,l.X$)(this.flatCoordinates,t),this.changed()}clone(){const t=new _(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<(0,r.Ld)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,s.MD)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,s.n)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,i,n))}forEachSegment(t){return(0,h.j)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinateAtM(t,e){return"XYM"!=this.layout&&"XYZM"!=this.layout?null:(e=void 0!==e&&e,(0,u.gr)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))}getCoordinates(){return(0,c.n2)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(t,e){return(0,u.SH)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return(0,g.k)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_??void 0),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(t){const e=[];return e.length=(0,a.P4)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new _(e,"XY")}getType(){return"LineString"}intersectsExtent(t){return(0,d.gp)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,o.z2)(this.flatCoordinates,0,t,this.stride),this.changed()}}const f=_},6702:(t,e,i)=>{"use strict";i.d(e,{A:()=>_});var n=i(1217),s=i(2096),r=i(3953),o=i(915),a=i(2497),l=i(3671),h=i(6514),c=i(6361),u=i(9969),d=i(4350);class g extends s.Ay{constructor(t,e,i){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,e);else if(void 0!==e&&i)this.setFlatCoordinates(e,t),this.ends_=i;else{const e=t,i=[],n=[];for(let t=0,s=e.length;t{"use strict";i.d(e,{A:()=>u});var n=i(4294),s=i(2096),r=i(915),o=i(2497),a=i(6514),l=i(6361),h=i(1597);class c extends s.Ay{constructor(t,e){super(),e&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendPoint(t){(0,a.X$)(this.flatCoordinates,t.getFlatCoordinates()),this.changed()}clone(){const t=new c(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){if(n<(0,r.Ld)(this.getExtent(),t,e))return n;const s=this.flatCoordinates,o=this.stride;for(let r=0,a=s.length;r{"use strict";i.d(e,{A:()=>v});var n=i(503),s=i(1064),r=i(2096),o=i(3953),a=i(915),l=i(2497),h=i(6514),c=i(2616),u=i(6361),d=i(4350),g=i(3402),_=i(8609),f=i(4049),p=i(2845),m=i(3671);class x extends r.Ay{constructor(t,e,i){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!i&&!Array.isArray(t[0])){const n=t,s=[],r=[];for(let t=0,e=n.length;t{"use strict";i.d(e,{A:()=>l});var n=i(2096),s=i(915),r=i(2497),o=i(1597);class a extends n.Ay{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new a(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){const s=this.flatCoordinates,r=(0,o.hG)(t,e,s[0],s[1]);if(r{"use strict";i.d(e,{kj:()=>T,Ay:()=>E,nD:()=>C,VY:()=>A});var n=i(2096),s=i(3953),r=i(915),o=i(2497),a=i(3671),l=i(6361),h=i(8609);class c extends n.Ay{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}clone(){return new c(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,i,n){return n<(0,r.Ld)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,s.MD)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,s.n)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,n))}getArea(){return(0,h.eN)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return(0,l.n2)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=(0,a.P4)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new c(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,o.z2)(this.flatCoordinates,0,t,this.stride),this.changed()}}const u=c;var d=i(4294),g=i(6514),_=i(2616),f=i(4350),p=i(3402),m=i(2845),x=i(1597),v=i(2490);class y extends n.Ay{constructor(t,e,i){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,void 0!==e&&i?(this.setFlatCoordinates(e,t),this.ends_=i):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?(0,g.X$)(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new y(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<(0,r.Ld)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,s.HX)(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,s.oW)(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,n))}containsXY(t,e){return(0,m.zb)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return(0,h.PK)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),(0,p.ug)(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,(0,l.cD)(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=(0,r.q1)(this.getExtent());this.flatInteriorPoint_=(0,_.J)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new d.A(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new u(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,i=this.ends_,n=[];let s=0;for(let r=0,o=i.length;r{"use strict";i.d(e,{Ay:()=>u,dn:()=>h,p0:()=>l,v7:()=>c});var n=i(7430),s=i(4087),r=i(915),o=i(7622);class a extends n.A{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(t){return(0,r.Vy)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return(0,s.b0)()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length{"use strict";function n(t,e,i,n){let s=0,r=t[i-n],o=t[i-n+1];for(;er,PK:()=>s,eN:()=>n})},4049:(t,e,i)=>{"use strict";i.d(e,{C:()=>s});var n=i(915);function s(t,e,i,s){const r=[];let o=(0,n.S5)();for(let a=0,l=i.length;a{"use strict";i.d(e,{HX:()=>o,MD:()=>r,c:()=>a,n:()=>l,oW:()=>h,te:()=>c});var n=i(1597);function s(t,e,i,s,r,o,a){const l=t[e],h=t[e+1],c=t[i]-l,u=t[i+1]-h;let d;if(0===c&&0===u)d=e;else{const g=((r-l)*c+(o-h)*u)/(c*c+u*u);if(g>1)d=i;else{if(g>0){for(let r=0;rr&&(r=l),o=i,a=s}return r}function o(t,e,i,n,s){for(let o=0,a=i.length;o{"use strict";i.d(e,{Gd:()=>a,a_:()=>r,t7:()=>s,zb:()=>o});var n=i(915);function s(t,e,i,s,o){return!(0,n.sB)(o,(function(n){return!r(t,e,i,s,n[0],n[1])}))}function r(t,e,i,n,s,r){let o=0,a=t[i-n],l=t[i-n+1];for(;er&&(i-a)*(r-l)-(s-a)*(n-l)>0&&o++:n<=r&&(i-a)*(r-l)-(s-a)*(n-l)<0&&o--,a=i,l=n}return 0!==o}function o(t,e,i,n,s,o){if(0===i.length)return!1;if(!r(t,e,i[0],n,s,o))return!1;for(let e=1,a=i.length;e{"use strict";function n(t,e,i,n){for(let n=0,s=i.length;nr,_n:()=>n,d6:()=>o,z2:()=>s})},6361:(t,e,i)=>{"use strict";function n(t,e,i,n,s){s=void 0!==s?s:[];let r=0;for(let o=e;or,cD:()=>s,n2:()=>n})},2616:(t,e,i)=>{"use strict";i.d(e,{J:()=>r,p:()=>o});var n=i(6514),s=i(2845);function r(t,e,i,r,o,a,l){let h,c,u,d,g,_,f;const p=o[a+1],m=[];for(let n=0,s=i.length;nv&&(u=(d+g)/2,(0,s.zb)(t,e,i,r,u,p)&&(x=u,v=n)),d=g}return isNaN(x)&&(x=o[a]),l?(l.push(x,p,v),l):[x,p,v]}function o(t,e,i,n,s){let o=[];for(let a=0,l=i.length;a{"use strict";i.d(e,{L8:()=>a,SH:()=>r,gr:()=>o});var n=i(6514),s=i(1597);function r(t,e,i,r,o,a,l){let h,c;const u=(i-e)/r;if(1===u)h=e;else if(2===u)h=e,c=o;else if(0!==u){let s=t[e],a=t[e+1],l=0;const u=[0];for(let n=e+r;n1?l:2,a=a||new Array(l);for(let e=0;e>1;r{"use strict";i.d(e,{HT:()=>h,Wp:()=>c,fB:()=>a,gp:()=>o,sj:()=>l});var n=i(915),s=i(1374),r=i(2845);function o(t,e,i,r,o){const a=(0,n.R8)((0,n.S5)(),t,e,i,r);return!!(0,n.HY)(o,a)&&(!!(0,n.ms)(o,a)||a[0]>=o[0]&&a[2]<=o[2]||a[1]>=o[1]&&a[3]<=o[3]||(0,s.j)(t,e,i,r,(function(t,e){return(0,n.Mx)(o,t,e)})))}function a(t,e,i,n,s){for(let r=0,a=i.length;r{"use strict";function n(t,e,i,n){let s=t[e],r=t[e+1],o=0;for(let a=e+n;an})},3402:(t,e,i)=>{"use strict";function n(t,e,i,n){for(;e0}function r(t,e,i,n,r){r=void 0!==r&&r;for(let o=0,a=i.length;oh,PA:()=>r,mb:()=>o,ug:()=>a,NK:()=>l})},1374:(t,e,i)=>{"use strict";function n(t,e,i,n,s){let r;for(e+=n;en})},3671:(t,e,i)=>{"use strict";i.d(e,{AL:()=>r,Hg:()=>l,P4:()=>s,n$:()=>o,sx:()=>h});var n=i(1597);function s(t,e,i,s,r,o,a){const l=(i-e)/s;if(l<3){for(;e0;){const i=c.pop(),o=c.pop();let a=0;const l=t[o],d=t[o+1],g=t[i],_=t[i+1];for(let e=o+s;ea&&(u=e,a=r)}a>r&&(h[(u-e)/s]=1,o+s0&&f>g)&&(_<0&&p<_||_==p||_>0&&p>_)?(l=i,h=d):(r[a++]=l,r[a++]=h,c=l,u=h,l=i,h=d)}return r[a++]=l,r[a++]=h,a}function l(t,e,i,n,s,r,o,l){for(let h=0,c=i.length;h{"use strict";function n(t,e,i,n,s,r){r=r||[];let o=0;for(let a=e;an,Tl:()=>o,e$:()=>s,hs:()=>r})},7771:(t,e,i)=>{"use strict";i.d(e,{DT:()=>c,FT:()=>d,Wl:()=>h,XM:()=>u,_p:()=>s,cr:()=>l,ew:()=>a,j:()=>o,oF:()=>r});const n="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",s=n.includes("firefox"),r=n.includes("safari")&&!n.includes("chrom")&&(n.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(n)),o=n.includes("webkit")&&!n.includes("edge"),a=n.includes("macintosh"),l="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,h="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,c="undefined"!=typeof Image&&Image.prototype.decode,u="function"==typeof createImageBitmap,d=function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(t){}return t}()},6068:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(6292),s=i(3445);class r extends n.Ay{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:250}handleEvent(t){let e=!1;if(t.type==s.A.DBLCLICK){const i=t.originalEvent,s=t.map,r=t.coordinate,o=i.shiftKey?-this.delta_:this.delta_,a=s.getView();(0,n.D2)(a,o,r,this.duration_),i.preventDefault(),e=!0}return!e}}const o=r},422:(t,e,i)=>{"use strict";i.d(e,{A:()=>g});var n=i(1685),s=i(1409),r=i(25),o=i(1064);class a extends r.A{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,i="px",n=this.element_.style;n.left=Math.min(t[0],e[0])+i,n.top=Math.min(t[1],e[1])+i,n.width=Math.abs(e[0]-t[0])+i,n.height=Math.abs(e[1]-t[1])+i}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const t=this.element_.style;t.left="inherit",t.top="inherit",t.width="inherit",t.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){if(!this.map_)return;const t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new o.Ay([i])}getGeometry(){return this.geometry_}}const l=a;var h=i(8704);const c="boxcancel";class u extends n.Ay{constructor(t,e,i){super(t),this.coordinate=e,this.mapBrowserEvent=i}}class d extends s.A{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new l(t.className||"ol-dragbox"),this.minArea_=void 0!==t.minArea?t.minArea:64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition?t.condition:h.at,this.boxEndCondition_=t.boxEndCondition?t.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,i){const n=i[0]-e[0],s=i[1]-e[1];return n*n+s*s>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.startPixel_&&(this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new u("boxdrag",t.coordinate,t)))}handleUpEvent(t){if(!this.startPixel_)return!1;this.box_.setMap(null);const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new u(e?"boxend":c,t.coordinate,t)),!1}handleDownEvent(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new u("boxstart",t.coordinate,t)),!0)}onBoxEnd(t){}setActive(t){t||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new u(c,this.startPixel_,null)),this.startPixel_=null)),super.setActive(t)}}const g=d},4473:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(1409),s=i(4238),r=i(8704),o=i(3474),a=i(6933);class l extends n.A{constructor(t){super({stopDown:s.W8}),t=t||{},this.kinetic_=t.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const e=t.condition?t.condition:(0,r.Q7)(r.TS,r.fs);this.condition_=t.onFocusOnly?(0,r.Q7)(r.eL,e):e,this.noKinetic_=!1}handleDragEvent(t){const e=t.map;this.panning_||(this.panning_=!0,e.getView().beginInteraction());const i=this.targetPointers,s=e.getEventPixel((0,n.v)(i));if(i.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(s[0],s[1]),this.lastCentroid){const e=[this.lastCentroid[0]-s[0],s[1]-this.lastCentroid[1]],i=t.map.getView();(0,a.hs)(e,i.getResolution()),(0,a.e$)(e,i.getRotation()),i.adjustCenterInternal(e)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=s,this.lastPointersCount_=i.length,t.originalEvent.preventDefault()}handleUpEvent(t){const e=t.map,i=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const t=this.kinetic_.getDistance(),n=this.kinetic_.getAngle(),s=i.getCenterInternal(),r=e.getPixelFromCoordinateInternal(s),a=e.getCoordinateFromPixelInternal([r[0]-t*Math.cos(n),r[1]-t*Math.sin(n)]);i.animateInternal({center:i.getConstrainedCenter(a),duration:500,easing:o.vT})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(t){if(this.targetPointers.length>0&&this.condition_(t)){const e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}const h=l},4051:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var n=i(1409),s=i(4238),r=i(8704),o=i(4498);class a extends n.A{constructor(t){t=t||{},super({stopDown:s.W8}),this.condition_=t.condition?t.condition:r.IO,this.lastAngle_=void 0,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){if(!(0,r.A4)(t))return;const e=t.map,i=e.getView();if(i.getConstraints().rotation===o.b8)return;const n=e.getSize(),s=t.pixel,a=Math.atan2(n[1]/2-s[1],s[0]-n[0]/2);if(void 0!==this.lastAngle_){const t=a-this.lastAngle_;i.adjustRotationInternal(-t)}this.lastAngle_=a}handleUpEvent(t){return!(0,r.A4)(t)||(t.map.getView().endInteraction(this.duration_),!1)}handleDownEvent(t){return!!(0,r.A4)(t)&&(!(!(0,r.at)(t)||!this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))}}const l=a},4423:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(422),s=i(3474),r=i(8704);class o extends n.A{constructor(t){super({condition:(t=t||{}).condition?t.condition:r.Kg,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=void 0!==t.duration?t.duration:200,this.out_=void 0!==t.out&&t.out}onBoxEnd(t){const e=this.getMap().getView();let i=this.getGeometry();if(this.out_){const t=e.rotatedExtentForGeometry(i),n=e.getResolutionForExtentInternal(t),s=e.getResolution()/n;i=i.clone(),i.scale(s*s)}e.fitInternal(i,{duration:this.duration_,easing:s.vT})}}const a=o},9964:(t,e,i)=>{"use strict";i.d(e,{Ay:()=>W});var n=i(2096),s=i(915),r=i(2497),o=i(7622);class a extends n.Ay{constructor(t,e,i){super(),void 0!==i&&void 0===e?this.setFlatCoordinates(i,t):(e=e||0,this.setCenterAndRadius(t,e,i))}clone(){const t=new a(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){const s=this.flatCoordinates,r=t-s[0],o=e-s[1],a=r*r+o*o;if(a=e[0]||t[1]<=e[1]&&t[3]>=e[1]||(0,s.sB)(t,this.intersectsCoordinate.bind(this))}return!1}setCenter(t){const e=this.stride,i=this.flatCoordinates[e]-this.flatCoordinates[0],n=t.slice();n[e]=n[0]+i;for(let i=1;i=i?t[e-i]:t[e]}function O(t,e,i){let n,s;eo)return D(B(t,n),B(t,s));let a=0;n=i?n-=i:n<0&&(n+=i);let r=n+1;r>=i&&(r-=i);const o=t[n],a=o[0],l=o[1],h=t[r];return[a+(h[0]-a)*s,l+(h[1]-l)*s]}class U extends E.A{constructor(t){const e=t;e.stopDown||(e.stopDown=S.W8),super(e),this.on,this.once,this.un,this.shouldHandle_=!1,this.downPx_=null,this.downTimeout_,this.lastDragTime_,this.pointerType_,this.freehand_=!1,this.source_=t.source?t.source:null,this.features_=t.features?t.features:null,this.snapTolerance_=t.snapTolerance?t.snapTolerance:12,this.type_=t.type,this.mode_=function(t){switch(t){case"Point":case"MultiPoint":return"Point";case"LineString":case"MultiLineString":return"LineString";case"Polygon":case"MultiPolygon":return"Polygon";case"Circle":return"Circle";default:throw new Error("Invalid type: "+t)}}(this.type_),this.stopClick_=!!t.stopClick,this.minPoints_=t.minPoints?t.minPoints:"Polygon"===this.mode_?3:2,this.maxPoints_="Circle"===this.mode_?2:t.maxPoints?t.maxPoints:1/0,this.finishCondition_=t.finishCondition?t.finishCondition:S.rT,this.geometryLayout_=t.geometryLayout?t.geometryLayout:"XY";let i=t.geometryFunction;if(!i){const t=this.mode_;if("Circle"===t)i=function(t,e,i){const n=e||new l([NaN,NaN]),s=(0,L.Ad)(t[0],i),r=(0,I.hG)(s,(0,L.Ad)(t[t.length-1],i));n.setCenterAndRadius(s,Math.sqrt(r),this.geometryLayout_);const o=(0,L.Tf)();return o&&n.transform(i,o),n};else{let e;"Point"===t?e=y.A:"LineString"===t?e=_.A:"Polygon"===t&&(e=T.Ay),i=function(i,n,s){return n?"Polygon"===t?i[0].length?n.setCoordinates([i[0].concat([i[0][0]])],this.geometryLayout_):n.setCoordinates([],this.geometryLayout_):n.setCoordinates(i,this.geometryLayout_):n=new e(i,this.geometryLayout_),n}}}this.geometryFunction_=i,this.dragVertexDelay_=void 0!==t.dragVertexDelay?t.dragVertexDelay:500,this.finishCoordinate_=null,this.sketchFeature_=null,this.sketchPoint_=null,this.sketchCoords_=null,this.sketchLine_=null,this.sketchLineCoords_=null,this.squaredClickTolerance_=t.clickTolerance?t.clickTolerance*t.clickTolerance:36,this.overlay_=new A.A({source:new C.A({useSpatialIndex:!1,wrapX:!!t.wrapX&&t.wrapX}),style:t.style?t.style:X(),updateWhileInteracting:!0}),this.geometryName_=t.geometryName,this.condition_=t.condition?t.condition:R.TS,this.freehandCondition_,t.freehand?this.freehandCondition_=R.Gk:this.freehandCondition_=t.freehandCondition?t.freehandCondition:R.Kg,this.traceCondition_,this.setTrace(t.trace||!1),this.traceState_={active:!1},this.traceSource_=t.traceSource||t.source||null,this.addChangeListener(g.A.ACTIVE,this.updateState_)}setTrace(t){let e;e=t?!0===t?R.Gk:t:R.Zm,this.traceCondition_=e}setMap(t){super.setMap(t),this.updateState_()}getOverlay(){return this.overlay_}handleEvent(t){t.originalEvent.type===c.A.CONTEXTMENU&&t.originalEvent.preventDefault(),this.freehand_="Point"!==this.mode_&&this.freehandCondition_(t);let e=t.type===p.A.POINTERMOVE,i=!0;return!this.freehand_&&this.lastDragTime_&&t.type===p.A.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=t.pixel,this.shouldHandle_=!this.freehand_,e=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&t.type===p.A.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(t.coordinate),i=!1):this.freehand_&&t.type===p.A.POINTERDOWN?i=!1:e&&this.getPointerCount()<2?(i=t.type===p.A.POINTERMOVE,i&&this.freehand_?(this.handlePointerMove_(t),this.shouldHandle_&&t.originalEvent.preventDefault()):("mouse"===t.originalEvent.pointerType||t.type===p.A.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(t)):t.type===p.A.DBLCLICK&&(i=!1),super.handleEvent(t)&&i}handleDownEvent(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout((()=>{this.handlePointerMove_(new f.A(p.A.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)}deactivateTrace_(){this.traceState_={active:!1}}toggleTraceState_(t){if(!this.traceSource_||!this.traceCondition_(t))return;if(this.traceState_.active)return void this.deactivateTrace_();const e=this.getMap(),i=e.getCoordinateFromPixel([t.pixel[0]-this.snapTolerance_,t.pixel[1]+this.snapTolerance_]),n=e.getCoordinateFromPixel([t.pixel[0]+this.snapTolerance_,t.pixel[1]-this.snapTolerance_]),r=(0,s.Tr)([i,n]),o=this.traceSource_.getFeaturesInExtent(r);if(0===o.length)return;const a=function(t,e){const i=[];for(let n=0;nt.endIndex||!i&&et.endIndex)&&this.removeTracedCoordinates_(e,t.endIndex):(this.removeTracedCoordinates_(t.startIndex,t.endIndex),this.addTracedCoordinates_(t,t.startIndex,e))}removeTracedCoordinates_(t,e){if(t===e)return;let i=0;if(t0&&this.removeLastPoints_(i)}addTracedCoordinates_(t,e,i){if(e===i)return;const n=[];if(e=r;--e)n.push(F(t.coordinates,e))}n.length&&this.appendCoordinates(n)}updateTrace_(t){const e=this.traceState_;if(!e.active)return;if(-1===e.targetIndex&&(0,I.Io)(e.startPx,t.pixel)i.startIndex?hi.startIndex&&(h-=n.length)),l=h,a=t)}const h=e.targets[a];let c=h.ring;if(e.targetIndex===a&&c){const t=B(h.coordinates,l),s=i.getPixelFromCoordinate(t);(0,I.Io)(s,e.startPx)>n&&(c=!1)}if(c){const t=h.coordinates,e=t.length,i=h.startIndex,n=l;if(ithis.squaredClickTolerance_:r<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?(this.updateTrace_(t),this.modifyDrawing_(t.coordinate)):this.createOrUpdateSketchPoint_(t.coordinate.slice())}atFinish_(t,e){let i=!1;if(this.sketchFeature_){let n=!1,s=[this.finishCoordinate_];const r=this.mode_;if("Point"===r)i=!0;else if("Circle"===r)i=2===this.sketchCoords_.length;else if("LineString"===r)n=!e&&this.sketchCoords_.length>this.minPoints_;else if("Polygon"===r){const t=this.sketchCoords_;n=t[0].length>this.minPoints_,s=[t[0][0],t[0][t[0].length-2]],s=e?[t[0][0]]:[t[0][0],t[0][t[0].length-2]]}if(n){const e=this.getMap();for(let n=0,r=s.length;n=this.maxPoints_&&(this.freehand_?s.pop():n=!0),s.push(t.slice()),this.geometryFunction_(s,e,i)):"Polygon"===r&&(s=this.sketchCoords_[0],s.length>=this.maxPoints_&&(this.freehand_?s.pop():n=!0),s.push(t.slice()),n&&(this.finishCoordinate_=s[0]),this.geometryFunction_(this.sketchCoords_,e,i)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),n?this.finishDrawing():this.sketchFeature_}removeLastPoints_(t){if(!this.sketchFeature_)return;const e=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection(),n=this.mode_;for(let s=0;s=2){this.finishCoordinate_=t[t.length-2].slice();const e=this.finishCoordinate_.slice();t[t.length-1]=e,this.createOrUpdateSketchPoint_(e)}this.geometryFunction_(t,e,i),"Polygon"===e.getType()&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(e)}else if("Polygon"===n){t=this.sketchCoords_[0],t.splice(-2,1);const n=this.sketchLine_.getGeometry();if(t.length>=2){const e=t[t.length-2].slice();t[t.length-1]=e,this.createOrUpdateSketchPoint_(e)}n.setCoordinates(t),this.geometryFunction_(this.sketchCoords_,e,i)}if(1===t.length){this.abortDrawing();break}}this.updateSketchFeatures_()}removeLastPoint(){this.removeLastPoints_(1)}finishDrawing(){const t=this.abortDrawing_();if(!t)return null;let e=this.sketchCoords_;const i=t.getGeometry(),n=this.getMap().getView().getProjection();return"LineString"===this.mode_?(e.pop(),this.geometryFunction_(e,i,n)):"Polygon"===this.mode_&&(e[0].pop(),this.geometryFunction_(e,i,n),e=i.getCoordinates()),"MultiPoint"===this.type_?t.setGeometry(new x.A([e])):"MultiLineString"===this.type_?t.setGeometry(new m.A([e])):"MultiPolygon"===this.type_&&t.setGeometry(new v.A([e])),this.dispatchEvent(new M("drawend",t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t),t}abortDrawing_(){this.finishCoordinate_=null;const t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),this.deactivateTrace_(),t}abortDrawing(){const t=this.abortDrawing_();t&&this.dispatchEvent(new M("drawabort",t))}appendCoordinates(t){const e=this.mode_,i=!this.sketchFeature_;let n;if(i&&this.startDrawing_(t[0]),"LineString"===e||"Circle"===e)n=this.sketchCoords_;else{if("Polygon"!==e)return;n=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[]}i&&n.shift(),n.pop();for(let e=0;e{"use strict";i.d(e,{Ay:()=>h,D2:()=>l,e4:()=>a});var n=i(4120),s=i(2187),r=i(3474);class o extends n.A{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(s.A.ACTIVE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(s.A.ACTIVE,t)}setMap(t){this.map_=t}}function a(t,e,i){const n=t.getCenterInternal();if(n){const s=[n[0]+e[0],n[1]+e[1]];t.animateInternal({duration:void 0!==i?i:250,easing:r.sn,center:t.getConstrainedCenter(s)})}}function l(t,e,i,n){const s=t.getZoom();if(void 0===s)return;const o=t.getConstrainedZoom(s+e),a=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:a,anchor:i,duration:void 0!==n?n:250,easing:r.vT})}const h=o},9888:(t,e,i)=>{"use strict";i.d(e,{A:()=>u});var n=i(6837),s=i(6292);const r="ArrowLeft",o="ArrowRight",a="ArrowDown";var l=i(8704),h=i(6933);class c extends s.Ay{constructor(t){super(),t=t||{},this.defaultCondition_=function(t){return(0,l.TS)(t)&&(0,l.tE)(t)},this.condition_=void 0!==t.condition?t.condition:this.defaultCondition_,this.duration_=void 0!==t.duration?t.duration:100,this.pixelDelta_=void 0!==t.pixelDelta?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==n.A.KEYDOWN){const i=t.originalEvent,n=i.key;if(this.condition_(t)&&(n==a||n==r||n==o||"ArrowUp"==n)){const l=t.map.getView(),c=l.getResolution()*this.pixelDelta_;let u=0,d=0;n==a?d=-c:n==r?u=-c:n==o?u=c:d=c;const g=[u,d];(0,h.e$)(g,l.getRotation()),(0,s.e4)(l,g,this.duration_),i.preventDefault(),e=!0}}return!e}}const u=c},6856:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(6837),s=i(6292),r=i(8704);class o extends s.Ay{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:function(t){return!(0,r.GB)(t)&&(0,r.tE)(t)},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:100}handleEvent(t){let e=!1;if(t.type==n.A.KEYDOWN||t.type==n.A.KEYPRESS){const i=t.originalEvent,n=i.key;if(this.condition_(t)&&("+"===n||"-"===n)){const r=t.map,o="+"===n?this.delta_:-this.delta_,a=r.getView();(0,s.D2)(a,o,void 0,this.duration_),i.preventDefault(),e=!0}}return!e}}const a=o},9132:(t,e,i)=>{"use strict";i.d(e,{A:()=>M});var n=i(71),s=i(2135),r=i(1685),o=i(6837),a=i(6717),l=i(3445),h=i(4294),c=i(1409),u=i(5902),d=i(8280),g=i(2757),_=i(731),f=i(8704),p=i(915),m=i(6933),x=i(9276),v=i(6514),y=i(1064),E=i(3407),T=i(4087);const A=[0,0,0,0],C=[],S="modifyend";class R extends r.Ay{constructor(t,e,i){super(t),this.features=e,this.mapBrowserEvent=i}}class w extends c.A{constructor(t){let e;if(super(t),this.on,this.once,this.un,this.boundHandleFeatureChange_=this.handleFeatureChange_.bind(this),this.condition_=t.condition?t.condition:f.fs,this.defaultDeleteCondition_=function(t){return(0,f.Js)(t)&&(0,f.t5)(t)},this.deleteCondition_=t.deleteCondition?t.deleteCondition:this.defaultDeleteCondition_,this.insertVertexCondition_=t.insertVertexCondition?t.insertVertexCondition:f.Gk,this.vertexFeature_=null,this.vertexSegments_=null,this.lastPixel_=[0,0],this.ignoreNextSingleClick_=!1,this.featuresBeingModified_=null,this.rBush_=new u.A,this.pixelTolerance_=void 0!==t.pixelTolerance?t.pixelTolerance:10,this.snappedToVertex_=!1,this.changingFeature_=!1,this.dragSegments_=[],this.overlay_=new g.A({source:new _.A({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.style?t.style:P(),updateWhileAnimating:!0,updateWhileInteracting:!0}),this.SEGMENT_WRITERS_={Point:this.writePointGeometry_.bind(this),LineString:this.writeLineStringGeometry_.bind(this),LinearRing:this.writeLineStringGeometry_.bind(this),Polygon:this.writePolygonGeometry_.bind(this),MultiPoint:this.writeMultiPointGeometry_.bind(this),MultiLineString:this.writeMultiLineStringGeometry_.bind(this),MultiPolygon:this.writeMultiPolygonGeometry_.bind(this),Circle:this.writeCircleGeometry_.bind(this),GeometryCollection:this.writeGeometryCollectionGeometry_.bind(this)},this.source_=null,this.hitDetection_=null,t.features?e=t.features:t.source&&(this.source_=t.source,e=new n.A(this.source_.getFeatures()),this.source_.addEventListener(d.A.ADDFEATURE,this.handleSourceAdd_.bind(this)),this.source_.addEventListener(d.A.REMOVEFEATURE,this.handleSourceRemove_.bind(this))),!e)throw new Error("The modify interaction requires features, a source or a layer");t.hitDetection&&(this.hitDetection_=t.hitDetection),this.features_=e,this.features_.forEach(this.addFeature_.bind(this)),this.features_.addEventListener(s.A.ADD,this.handleFeatureAdd_.bind(this)),this.features_.addEventListener(s.A.REMOVE,this.handleFeatureRemove_.bind(this)),this.lastPointerEvent_=null,this.delta_=[0,0],this.snapToPointer_=void 0===t.snapToPointer?!this.hitDetection_:t.snapToPointer}addFeature_(t){const e=t.getGeometry();if(e){const i=this.SEGMENT_WRITERS_[e.getType()];i&&i(t,e)}const i=this.getMap();i&&i.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,i),t.addEventListener(o.A.CHANGE,this.boundHandleFeatureChange_)}willModifyFeatures_(t,e){if(!this.featuresBeingModified_){this.featuresBeingModified_=new n.A;const i=this.featuresBeingModified_.getArray();for(let t=0,n=e.length;t=0;--t){const n=i[t];for(let t=this.dragSegments_.length-1;t>=0;--t)this.dragSegments_[t][0]===n&&this.dragSegments_.splice(t,1);e.remove(n)}}setActive(t){this.vertexFeature_&&!t&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),super.setActive(t)}setMap(t){this.overlay_.setMap(t),super.setMap(t)}getOverlay(){return this.overlay_}handleSourceAdd_(t){t.feature&&this.features_.push(t.feature)}handleSourceRemove_(t){t.feature&&this.features_.remove(t.feature)}handleFeatureAdd_(t){this.addFeature_(t.element)}handleFeatureChange_(t){if(!this.changingFeature_){const e=t.target;this.removeFeature_(e),this.addFeature_(e)}}handleFeatureRemove_(t){this.removeFeature_(t.element)}writePointGeometry_(t,e){const i=e.getCoordinates(),n={feature:t,geometry:e,segment:[i,i]};this.rBush_.insert(e.getExtent(),n)}writeMultiPointGeometry_(t,e){const i=e.getCoordinates();for(let n=0,s=i.length;n=0;--t)this.insertVertex_(s[t],r)}return!!this.vertexFeature_}handleUpEvent(t){for(let e=this.dragSegments_.length-1;e>=0;--e){const i=this.dragSegments_[e][0],n=i.geometry;if("Circle"===n.getType()){const e=n.getCenter(),s=i.featureSegments[0],r=i.featureSegments[1];s.segment[0]=e,s.segment[1]=e,r.segment[0]=e,r.segment[1]=e,this.rBush_.update((0,p.dP)(e),s);let o=n;const a=(0,E.Tf)();if(a){const e=t.map.getView().getProjection();o=o.clone().transform(a,e),o=(0,y.nD)(o).transform(e,a)}this.rBush_.update(o.getExtent(),r)}else this.rBush_.update((0,p.Tr)(i.segment),i)}return this.featuresBeingModified_&&(this.dispatchEvent(new R(S,this.featuresBeingModified_,t)),this.featuresBeingModified_=null),!1}handlePointerMove_(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)}handlePointerAtPixel_(t,e,i){const n=i||e.getCoordinateFromPixel(t),s=e.getView().getProjection(),r=function(t,e){return I(n,t,s)-I(n,e,s)};let o,l;if(this.hitDetection_){const i="object"==typeof this.hitDetection_?t=>t===this.hitDetection_:void 0;e.forEachFeatureAtPixel(t,((t,e,i)=>{i&&"Point"===i.getType()&&(i=new h.A((0,E.te)(i.getCoordinates(),s)));const n=i||t.getGeometry();if(t instanceof a.A&&this.features_.getArray().includes(t)){l=n;const e=t.getGeometry().getFlatCoordinates().slice(0,2);o=[{feature:t,geometry:l,segment:[e,e]}]}return!0}),{layerFilter:i})}if(!o){const t=(0,E.SD)((0,p.dP)(n,A),s),i=e.getView().getResolution()*this.pixelTolerance_,r=(0,E.JR)((0,p.r)(t,i,A),s);o=this.rBush_.getInExtent(r)}if(o&&o.length>0){const i=o.sort(r)[0],a=i.segment;let h=L(n,i,s);const c=e.getPixelFromCoordinate(h);let u=(0,m.Io)(t,c);if(l||u<=this.pixelTolerance_){const t={};if(t[(0,T.v6)(a)]=!0,this.snapToPointer_||(this.delta_[0]=h[0]-n[0],this.delta_[1]=h[1]-n[1]),"Circle"===i.geometry.getType()&&1===i.index)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(h,[i.feature],[i.geometry]);else{const n=e.getPixelFromCoordinate(a[0]),s=e.getPixelFromCoordinate(a[1]),r=(0,m.hG)(c,n),l=(0,m.hG)(c,s);u=Math.sqrt(Math.min(r,l)),this.snappedToVertex_=u<=this.pixelTolerance_,this.snappedToVertex_&&(h=r>l?a[1]:a[0]),this.createOrUpdateVertexFeature_(h,[i.feature],[i.geometry]);const d={};d[(0,T.v6)(i.geometry)]=!0;for(let e=1,i=o.length;e=0;--o)s=t[o],u=s[0],d=(0,T.v6)(u.feature),u.depth&&(d+="-"+u.depth.join("-")),d in e||(e[d]={}),0===s[1]?(e[d].right=u,e[d].index=u.index):1==s[1]&&(e[d].left=u,e[d].index=u.index+1);for(d in e){switch(c=e[d].right,l=e[d].left,a=e[d].index,h=a-1,u=void 0!==l?l:c,h<0&&(h=0),r=u.geometry,n=r.getCoordinates(),i=n,g=!1,r.getType()){case"MultiLineString":n[u.depth[0]].length>2&&(n[u.depth[0]].splice(a,1),g=!0);break;case"LineString":n.length>2&&(n.splice(a,1),g=!0);break;case"MultiPolygon":i=i[u.depth[1]];case"Polygon":i=i[u.depth[0]],i.length>4&&(a==i.length-1&&(a=0),i.splice(a,1),g=!0,0===a&&(i.pop(),i.push(i[0]),h=i.length-1))}if(g){this.setGeometryCoordinates_(r,n);const e=[];if(void 0!==l&&(this.rBush_.remove(l),e.push(l.segment[0])),void 0!==c&&(this.rBush_.remove(c),e.push(c.segment[1])),void 0!==l&&void 0!==c){const t={depth:u.depth,feature:u.feature,geometry:u.geometry,index:h,segment:e};this.rBush_.insert((0,p.Tr)(t.segment),t)}this.updateSegmentIndices_(r,a,u.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.length=0}}return g}setGeometryCoordinates_(t,e){this.changingFeature_=!0,t.setCoordinates(e),this.changingFeature_=!1}updateSegmentIndices_(t,e,i,n){this.rBush_.forEachInExtent(t.getExtent(),(function(s){s.geometry===t&&(void 0===i||void 0===s.depth||(0,v.aI)(s.depth,i))&&s.index>e&&(s.index+=n)}))}}function b(t,e){return t.index-e.index}function I(t,e,i){const n=e.geometry;if("Circle"===n.getType()){let s=n;if(1===e.index){const e=(0,E.Tf)();e&&(s=s.clone().transform(e,i));const n=(0,m.hG)(s.getCenter(),(0,E.Ad)(t,i)),r=Math.sqrt(n)-s.getRadius();return r*r}}const s=(0,E.Ad)(t,i);return C[0]=(0,E.Ad)(e.segment[0],i),C[1]=(0,E.Ad)(e.segment[1],i),(0,m.$x)(s,C)}function L(t,e,i){const n=e.geometry;if("Circle"===n.getType()&&1===e.index){let e=n;const s=(0,E.Tf)();return s&&(e=e.clone().transform(s,i)),(0,E.te)(e.getClosestPoint((0,E.Ad)(t,i)),i)}const s=(0,E.Ad)(t,i);return C[0]=(0,E.Ad)(e.segment[0],i),C[1]=(0,E.Ad)(e.segment[1],i),(0,E.te)((0,m.sG)(s,C),i)}function P(){const t=(0,x.mY)();return function(e,i){return t.Point}}const M=w},8751:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(6837),s=i(6292),r=i(7771),o=i(8704),a=i(1597);class l extends s.Ay{constructor(t){super(t=t||{}),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=void 0!==t.maxDelta?t.maxDelta:1,this.duration_=void 0!==t.duration?t.duration:250,this.timeout_=void 0!==t.timeout?t.timeout:80,this.useAnchor_=void 0===t.useAnchor||t.useAnchor,this.constrainResolution_=void 0!==t.constrainResolution&&t.constrainResolution;const e=t.condition?t.condition:o.Gk;this.condition_=t.onFocusOnly?(0,o.Q7)(o.eL,e):e,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const t=this.getMap();t&&t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(t){if(!this.condition_(t))return!0;if(t.type!==n.A.WHEEL)return!0;const e=t.map,i=t.originalEvent;let s;if(i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==n.A.WHEEL&&(s=i.deltaY,r._p&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(s/=r.cr),i.deltaMode===WheelEvent.DOM_DELTA_LINE&&(s*=40)),0===s)return!1;this.lastDelta_=s;const o=Date.now();void 0===this.startTime_&&(this.startTime_=o),(!this.mode_||o-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(s)<4?"trackpad":"wheel");const a=e.getView();if("trackpad"===this.mode_&&!a.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(a.getAnimating()&&a.cancelAnimations(),a.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),a.adjustZoom(-s/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=o,!1;this.totalDelta_+=s;const l=Math.max(this.timeout_-(o-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,e),l),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let i=-(0,a.qE)(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),(0,s.D2)(e,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}}const h=l},3711:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(1409),s=i(4238),r=i(4498);class o extends n.A{constructor(t){const e=t=t||{};e.stopDown||(e.stopDown=s.W8),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=void 0!==t.threshold?t.threshold:.3,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){let e=0;const i=this.targetPointers[0],s=this.targetPointers[1],o=Math.atan2(s.clientY-i.clientY,s.clientX-i.clientX);if(void 0!==this.lastAngle_){const t=o-this.lastAngle_;this.rotationDelta_+=t,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=t}this.lastAngle_=o;const a=t.map,l=a.getView();l.getConstraints().rotation!==r.b8&&(this.anchor_=a.getCoordinateFromPixelInternal(a.getEventPixel((0,n.v)(this.targetPointers))),this.rotating_&&(a.render(),l.adjustRotationInternal(e,this.anchor_)))}handleUpEvent(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.duration_),!1)}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}const a=o},5243:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(1409),s=i(4238);class r extends n.A{constructor(t){const e=t=t||{};e.stopDown||(e.stopDown=s.W8),super(e),this.anchor_=null,this.duration_=void 0!==t.duration?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const i=this.targetPointers[0],s=this.targetPointers[1],r=i.clientX-s.clientX,o=i.clientY-s.clientY,a=Math.sqrt(r*r+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/a),this.lastDistance_=a;const l=t.map,h=l.getView();1!=e&&(this.lastScaleDelta_=e),this.anchor_=l.getCoordinateFromPixelInternal(l.getEventPixel((0,n.v)(this.targetPointers))),l.render(),h.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const e=t.map.getView(),i=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,i),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}const o=r},1409:(t,e,i)=>{"use strict";i.d(e,{A:()=>a,v:()=>o});var n=i(6292),s=i(3445);class r extends n.Ay{constructor(t){super(t=t||{}),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==s.A.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==s.A.POINTERUP){const e=this.handleUpEvent(t);this.handlingDownUpSequence=e&&this.targetPointers.length>0}}else if(t.type==s.A.POINTERDOWN){const i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==s.A.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}}function o(t){const e=t.length;let i=0,n=0;for(let s=0;s{"use strict";i.d(e,{A:()=>n});const n={ACTIVE:"active"}},4458:(t,e,i)=>{"use strict";i.d(e,{A:()=>g});var n=i(71),s=i(1685),r=i(6717),o=i(2187),a=i(1409),l=i(4238),h=i(8704),c=i(3407);class u extends s.Ay{constructor(t,e,i,n,s){super(t),this.features=e,this.coordinate=i,this.startCoordinate=n,this.mapBrowserEvent=s}}class d extends a.A{constructor(t){let e;if(super(t=t||{}),this.on,this.once,this.un,this.lastCoordinate_=null,this.startCoordinate_=null,this.features_=void 0!==t.features?t.features:null,t.layers&&!this.features_)if("function"==typeof t.layers)e=t.layers;else{const i=t.layers;e=function(t){return i.includes(t)}}else e=l.rT;this.layerFilter_=e,this.filter_=t.filter&&!this.features_?t.filter:l.rT,this.hitTolerance_=t.hitTolerance?t.hitTolerance:0,this.condition_=t.condition?t.condition:h.Gk,this.lastFeature_=null,this.addChangeListener(o.A.ACTIVE,this.handleActiveChanged_)}handleDownEvent(t){if(!t.originalEvent||!this.condition_(t))return!1;if(this.lastFeature_=this.featuresAtPixel_(t.pixel,t.map),!this.lastCoordinate_&&this.lastFeature_){this.startCoordinate_=t.coordinate,this.lastCoordinate_=t.coordinate,this.handleMoveEvent(t);const e=this.features_||new n.A([this.lastFeature_]);return this.dispatchEvent(new u("translatestart",e,t.coordinate,this.startCoordinate_,t)),!0}return!1}handleUpEvent(t){if(this.lastCoordinate_){this.lastCoordinate_=null,this.handleMoveEvent(t);const e=this.features_||new n.A([this.lastFeature_]);return this.dispatchEvent(new u("translateend",e,t.coordinate,this.startCoordinate_,t)),this.startCoordinate_=null,!0}return!1}handleDragEvent(t){if(this.lastCoordinate_){const e=t.coordinate,i=t.map.getView().getProjection(),s=(0,c.Ad)(e,i),r=(0,c.Ad)(this.lastCoordinate_,i),o=s[0]-r[0],a=s[1]-r[1],l=this.features_||new n.A([this.lastFeature_]),h=(0,c.Tf)();l.forEach((function(t){const e=t.getGeometry();h?(e.transform(h,i),e.translate(o,a),e.transform(i,h)):e.translate(o,a),t.setGeometry(e)})),this.lastCoordinate_=e,this.dispatchEvent(new u("translating",l,e,this.startCoordinate_,t))}}handleMoveEvent(t){const e=t.map.getViewport();this.featuresAtPixel_(t.pixel,t.map)?(e.classList.remove(this.lastCoordinate_?"ol-grab":"ol-grabbing"),e.classList.add(this.lastCoordinate_?"ol-grabbing":"ol-grab")):e.classList.remove("ol-grab","ol-grabbing")}featuresAtPixel_(t,e){return e.forEachFeatureAtPixel(t,((t,e)=>{if(t instanceof r.A&&this.filter_(t,e)&&(!this.features_||this.features_.getArray().includes(t)))return t}),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_})}getHitTolerance(){return this.hitTolerance_}setHitTolerance(t){this.hitTolerance_=t}setMap(t){const e=this.getMap();super.setMap(t),this.updateState_(e)}handleActiveChanged_(){this.updateState_(null)}updateState_(t){let e=this.getMap();const i=this.getActive();e&&i||(e=e||t,!e)||e.getViewport().classList.remove("ol-grab","ol-grabbing")}}const g=d},8620:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(4120),s=i(5332),r=i(4087),o=i(588),a=i(1597);class l extends n.A{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);"object"==typeof t.properties&&(delete e.properties,Object.assign(e,t.properties)),e[s.A.OPACITY]=void 0!==t.opacity?t.opacity:1,(0,o.v)("number"==typeof e[s.A.OPACITY],"Layer opacity must be a number"),e[s.A.VISIBLE]=void 0===t.visible||t.visible,e[s.A.Z_INDEX]=t.zIndex,e[s.A.MAX_RESOLUTION]=void 0!==t.maxResolution?t.maxResolution:1/0,e[s.A.MIN_RESOLUTION]=void 0!==t.minResolution?t.minResolution:0,e[s.A.MIN_ZOOM]=void 0!==t.minZoom?t.minZoom:-1/0,e[s.A.MAX_ZOOM]=void 0!==t.maxZoom?t.maxZoom:1/0,this.className_=void 0!==e.className?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:void 0===t||t},i=this.getZIndex();return e.opacity=(0,a.qE)(Math.round(100*this.getOpacity())/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==i||e.managed?i:1/0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return(0,r.b0)()}getLayerStatesArray(t){return(0,r.b0)()}getExtent(){return this.get(s.A.EXTENT)}getMaxResolution(){return this.get(s.A.MAX_RESOLUTION)}getMinResolution(){return this.get(s.A.MIN_RESOLUTION)}getMinZoom(){return this.get(s.A.MIN_ZOOM)}getMaxZoom(){return this.get(s.A.MAX_ZOOM)}getOpacity(){return this.get(s.A.OPACITY)}getSourceState(){return(0,r.b0)()}getVisible(){return this.get(s.A.VISIBLE)}getZIndex(){return this.get(s.A.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(s.A.EXTENT,t)}setMaxResolution(t){this.set(s.A.MAX_RESOLUTION,t)}setMinResolution(t){this.set(s.A.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(s.A.MAX_ZOOM,t)}setMinZoom(t){this.set(s.A.MIN_ZOOM,t)}setOpacity(t){(0,o.v)("number"==typeof t,"Layer opacity must be a number"),this.set(s.A.OPACITY,t)}setVisible(t){this.set(s.A.VISIBLE,t)}setZIndex(t){this.set(s.A.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const h=l},2808:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(764),s=i(5360);class r extends n.A{constructor(t){t=t||{};const e=Object.assign({},t);delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.setPreload(void 0!==t.preload?t.preload:0),this.setUseInterimTilesOnError(void 0===t.useInterimTilesOnError||t.useInterimTilesOnError)}getPreload(){return this.get(s.A.PRELOAD)}setPreload(t){this.set(s.A.PRELOAD,t)}getUseInterimTilesOnError(){return this.get(s.A.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set(s.A.USE_INTERIM_TILES_ON_ERROR,t)}getData(t){return super.getData(t)}}const o=r},2284:(t,e,i)=>{"use strict";i.d(e,{A:()=>Z});var n=i(764),s=i(5341),r=i(9276),o=i(7733),a=i(3628),l=i(9700),h=i(6936),c=i(953),u=i(1426),d=i(9825),g=i(3730);function _(t,e,i){const n=(0,d.qg)(t,i);if(!(0,d.ho)(e,n.type)){const t=(0,d.go)(e),i=(0,d.go)(n.type);throw new Error(`Expected expression to be of type ${t}, got ${i}`)}return f(n,i)}function f(t,e){if(t instanceof d._D){if(t.type===d.mE&&"string"==typeof t.value){const e=(0,g.sH)(t.value);return function(){return e}}return function(){return t.value}}const i=t.operator;switch(i){case d.ZD.Number:case d.ZD.String:case d.ZD.Coalesce:return function(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let i=0;i{for(let e=0;e{for(let e=0;et.properties[i];case d.ZD.Var:return t=>t.variables[i];default:throw new Error(`Unsupported accessor operator ${t.operator}`)}}(t);case d.ZD.Id:return t=>t.featureId;case d.ZD.GeometryType:return t=>t.geometryType;case d.ZD.Concat:{const i=t.args.map((t=>f(t,e)));return t=>"".concat(...i.map((e=>e(t).toString())))}case d.ZD.Resolution:return t=>t.resolution;case d.ZD.Any:case d.ZD.All:case d.ZD.Between:case d.ZD.In:case d.ZD.Not:return function(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let i=0;i{for(let e=0;e{for(let e=0;e{const e=s[0](t),i=s[1](t),n=s[2](t);return e>=i&&e<=n};case d.ZD.In:return t=>{const e=s[0](t);for(let i=1;i!s[0](t);default:throw new Error(`Unsupported logical operator ${i}`)}}(t,e);case d.ZD.Equal:case d.ZD.NotEqual:case d.ZD.LessThan:case d.ZD.LessThanOrEqualTo:case d.ZD.GreaterThan:case d.ZD.GreaterThanOrEqualTo:return function(t,e){const i=t.operator,n=f(t.args[0],e),s=f(t.args[1],e);switch(i){case d.ZD.Equal:return t=>n(t)===s(t);case d.ZD.NotEqual:return t=>n(t)!==s(t);case d.ZD.LessThan:return t=>n(t)n(t)<=s(t);case d.ZD.GreaterThan:return t=>n(t)>s(t);case d.ZD.GreaterThanOrEqualTo:return t=>n(t)>=s(t);default:throw new Error(`Unsupported comparison operator ${i}`)}}(t,e);case d.ZD.Multiply:case d.ZD.Divide:case d.ZD.Add:case d.ZD.Subtract:case d.ZD.Clamp:case d.ZD.Mod:case d.ZD.Pow:case d.ZD.Abs:case d.ZD.Floor:case d.ZD.Ceil:case d.ZD.Round:case d.ZD.Sin:case d.ZD.Cos:case d.ZD.Atan:case d.ZD.Sqrt:return function(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let i=0;i{let e=1;for(let i=0;is[0](t)/s[1](t);case d.ZD.Add:return t=>{let e=0;for(let i=0;is[0](t)-s[1](t);case d.ZD.Clamp:return t=>{const e=s[0](t),i=s[1](t);if(en?n:e};case d.ZD.Mod:return t=>s[0](t)%s[1](t);case d.ZD.Pow:return t=>Math.pow(s[0](t),s[1](t));case d.ZD.Abs:return t=>Math.abs(s[0](t));case d.ZD.Floor:return t=>Math.floor(s[0](t));case d.ZD.Ceil:return t=>Math.ceil(s[0](t));case d.ZD.Round:return t=>Math.round(s[0](t));case d.ZD.Sin:return t=>Math.sin(s[0](t));case d.ZD.Cos:return t=>Math.cos(s[0](t));case d.ZD.Atan:return 2===n?t=>Math.atan2(s[0](t),s[1](t)):t=>Math.atan(s[0](t));case d.ZD.Sqrt:return t=>Math.sqrt(s[0](t));default:throw new Error(`Unsupported numeric operator ${i}`)}}(t,e);case d.ZD.Case:return function(t,e){const i=t.args.length,n=new Array(i);for(let s=0;s{for(let e=0;e{const e=n[0](t);for(let s=1;s{const e=n[0](t),s=n[1](t);let r,o;for(let a=2;a=s)return 2===a?l:h?m(e,s,r,o,i,l):p(e,s,r,o,i,l);r=i,o=l}return o}}(t,e);case d.ZD.ToString:return function(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let i=0;i{const i=s[0](e);return t.args[0].type===d.mE?(0,g.dI)(i):i.toString()};throw new Error(`Unsupported convert operator ${i}`)}(t,e);default:throw new Error(`Unsupported operator ${i}`)}}function p(t,e,i,n,s,r){const o=s-i;if(0===o)return n;const a=e-i;return n+(1===t?a/o:(Math.pow(t,a)-1)/(Math.pow(t,o)-1))*(r-n)}function m(t,e,i,n,s,r){if(0==s-i)return n;const o=(0,g.eE)(n),a=(0,g.eE)(r);let l=a[2]-o[2];l>180?l-=360:l<-180&&(l+=360);const h=[p(t,e,i,o[0],s,a[0]),p(t,e,i,o[1],s,a[1]),o[2]+p(t,e,i,0,s,l),p(t,e,i,n[3],s,r[3])];return(0,g.S8)((0,g.cD)(h))}var x=i(3530),v=i(4401);function y(t){return!0}function E(t){const e=(0,d.SR)(),i=t.length,n=new Array(i);for(let s=0;s4)throw new Error(`Expected a color with 3 or 4 values for ${e}`);return i}function U(t,e){const i=G(t,e);if(2!==i.length)throw new Error(`Expected an array of two numbers for ${e}`);return i}const X="renderOrder";class W extends n.A{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter?String(t.declutter):void 0,this.renderBuffer_=void 0!==t.renderBuffer?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=void 0!==t.updateWhileAnimating&&t.updateWhileAnimating,this.updateWhileInteracting_=void 0!==t.updateWhileInteracting&&t.updateWhileInteracting}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(X)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t,e){const i=this.getDeclutter();i in t.declutter==0&&(t.declutter[i]=new s(9)),this.getRenderer().renderDeclutter(t,e)}setRenderOrder(t){this.set(X,t)}setStyle(t){this.style_=void 0===t?r.d1:t;const e=function(t){if(void 0===t)return r.d1;if(!t)return null;if("function"==typeof t)return t;if(t instanceof r.Ay)return t;if(!Array.isArray(t))return E([t]);if(0===t.length)return[];const e=t.length,i=t[0];if(i instanceof r.Ay){const i=new Array(e);for(let n=0;n{"use strict";i.d(e,{A:()=>A});var n=i(71),s=i(3984),r=i(6717),o=i(3628),a=i(1217),l=i(4294),h=i(953),c=i(9276),u=i(1426),d=i(2757),g=i(731),_=i(915),f=i(1597),p=i(6933),m=i(3407),x=i(7331);function v(t,e,i){const n=[];let s=t(0),r=t(1),o=e(s),a=e(r);const l=[r,s],h=[a,o],c=[1,0],u={};let d,g,_,p,m,x,v=1e5;for(;--v>0&&c.length>0;)_=c.pop(),s=l.pop(),o=h.pop(),x=_.toString(),x in u||(n.push(o[0],o[1]),u[x]=!0),p=c.pop(),r=l.pop(),a=h.pop(),m=(_+p)/2,d=t(m),g=e(d),(0,f.Q1)(g[0],g[1],o[0],o[1],a[0],a[1]){const e=t.get("graticule_label");return this.lonLabelStyleBase_.getText().setText(e),this.lonLabelStyleBase_},this.latLabelStyleBase_=new c.Ay({text:void 0!==t.latLabelStyle?t.latLabelStyle.clone():new u.A({font:"12px Calibri,sans-serif",textAlign:"right",fill:new o.A({color:"rgba(0,0,0,1)"}),stroke:new h.A({color:"rgba(255,255,255,1)",width:3})})}),this.latLabelStyle_=t=>{const e=t.get("graticule_label");return this.latLabelStyleBase_.getText().setText(e),this.latLabelStyleBase_},this.meridiansLabels_=[],this.parallelsLabels_=[],this.addEventListener(s.A.POSTRENDER,this.drawLabels_.bind(this))),this.intervals_=void 0!==t.intervals?t.intervals:E,this.setSource(new g.A({loader:this.loaderFunction.bind(this),strategy:this.strategyFunction.bind(this),features:new n.A,overlaps:!1,useSpatialIndex:!1,wrapX:t.wrapX})),this.featurePool_=[],this.lineStyle_=new c.Ay({stroke:this.strokeStyle_}),this.loadedExtent_=null,this.renderedExtent_=null,this.renderedResolution_=null,this.setRenderOrder(null)}strategyFunction(t,e){let i=t.slice();return this.projection_&&this.getSource().getWrapX()&&(0,_.Li)(i,this.projection_),this.loadedExtent_&&((0,_.bE)(this.loadedExtent_,i,e)?i=this.loadedExtent_.slice():this.getSource().removeLoadedExtent(this.loadedExtent_)),[i]}loaderFunction(t,e,i){this.loadedExtent_=t;const n=this.getSource(),s=this.getExtent()||[-1/0,-1/0,1/0,1/0],o=(0,_._N)(s,t);if(this.renderedExtent_&&(0,_.aI)(this.renderedExtent_,o)&&this.renderedResolution_===e)return;if(this.renderedExtent_=o,this.renderedResolution_=e,(0,_.Im)(o))return;const a=(0,_.q1)(o),l=e*e/4;(!this.projection_||!(0,m.tI)(this.projection_,i))&&this.updateProjectionInfo_(i),this.createGraticule_(o,a,e,l);let h,c=this.meridians_.length+this.parallels_.length;for(this.meridiansLabels_&&(c+=this.meridians_.length),this.parallelsLabels_&&(c+=this.parallels_.length);c>this.featurePool_.length;)h=new r.A,this.featurePool_.push(h);const u=n.getFeaturesCollection();u.clear();let d,g,f=0;for(d=0,g=this.meridians_.length;dMath.PI/2);const d=(0,x.r2)(t);for(let t=a;t<=l;++t){let i,n,c,g,_=this.meridians_.length+this.parallels_.length;if(this.meridiansLabels_)for(n=0,c=this.meridiansLabels_.length;n=a?(t[0]=o[0],t[2]=o[2]):r=!0);const l=[(0,f.qE)(e[0],this.minX_,this.maxX_),(0,f.qE)(e[1],this.minY_,this.maxY_)],h=this.toLonLatTransform_(l);isNaN(h[1])&&(h[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_);let c=(0,f.qE)(h[0],this.minLon_,this.maxLon_),u=(0,f.qE)(h[1],this.minLat_,this.maxLat_);const d=this.maxLines_;let g,p,m,x,v=t;r||(v=[(0,f.qE)(t[0],this.minX_,this.maxX_),(0,f.qE)(t[1],this.minY_,this.maxY_),(0,f.qE)(t[2],this.minX_,this.maxX_),(0,f.qE)(t[3],this.minY_,this.maxY_)]);const y=(0,_.NW)(v,this.toLonLatTransform_,void 0,8);let E=y[3],T=y[2],A=y[1],C=y[0];if(r||((0,_.Ym)(v,this.bottomLeft_)&&(C=this.minLon_,A=this.minLat_),(0,_.Ym)(v,this.bottomRight_)&&(T=this.maxLon_,A=this.minLat_),(0,_.Ym)(v,this.topLeft_)&&(C=this.minLon_,E=this.maxLat_),(0,_.Ym)(v,this.topRight_)&&(T=this.maxLon_,E=this.maxLat_),E=(0,f.qE)(E,u,this.maxLat_),T=(0,f.qE)(T,c,this.maxLon_),A=(0,f.qE)(A,this.minLat_,u),C=(0,f.qE)(C,this.minLon_,c)),c=Math.floor(c/s)*s,x=(0,f.qE)(c,this.minLon_,this.maxLon_),p=this.addMeridian_(x,A,E,n,t,0),g=0,r)for(;(x-=s)>=C&&g++n[r]&&(s=r,r=1);const o=Math.max(e[1],n[s]),a=Math.min(e[3],n[r]),l=(0,f.qE)(e[1]+Math.abs(e[1]-e[3])*this.lonLabelPosition_,o,a),h=[n[s-1]+(n[r-1]-n[s-1])*(l-n[s])/(n[r]-n[s]),l],c=this.meridiansLabels_[i].geom;return c.setCoordinates(h),c}getMeridians(){return this.meridians_}getParallel_(t,e,i,n,s){const r=function(t,e,i,n,s){const r=(0,m.Jt)("EPSG:4326");return v((function(n){return[e+(i-e)*n,t]}),(0,m.RG)(r,n),s)}(t,e,i,this.projection_,n);let o=this.parallels_[s];return o?(o.setFlatCoordinates("XY",r),o.changed()):o=new a.A(r,"XY"),o}getParallelPoint_(t,e,i){const n=t.getFlatCoordinates();let s=0,r=n.length-2;n[s]>n[r]&&(s=r,r=0);const o=Math.max(e[0],n[s]),a=Math.min(e[2],n[r]),l=(0,f.qE)(e[0]+Math.abs(e[0]-e[2])*this.latLabelPosition_,o,a),h=[l,n[s+1]+(n[r+1]-n[s+1])*(l-n[s])/(n[r]-n[s])],c=this.parallelsLabels_[i].geom;return c.setCoordinates(h),c}getParallels(){return this.parallels_}updateProjectionInfo_(t){const e=(0,m.Jt)("EPSG:4326"),i=t.getWorldExtent();this.maxLat_=i[3],this.maxLon_=i[2],this.minLat_=i[1],this.minLon_=i[0];const n=(0,m.RG)(t,e);if(this.minLon_=Math.abs(this.minLat_)?this.maxLat_:this.minLat_),this.projection_=t}}const A=T},1905:(t,e,i)=>{"use strict";i.d(e,{A:()=>z});var n=i(2284),s=i(8280),r=i(2703),o=i(259),a=i(492),l=i(6514);const h=new Uint8Array(4),c=class{constructor(t,e){this.helper_=t;const i=t.getGL();this.texture_=i.createTexture(),this.framebuffer_=i.createFramebuffer(),this.depthbuffer_=i.createRenderbuffer(),this.size_=e||[1,1],this.data_=new Uint8Array(0),this.dataCacheDirty_=!0,this.updateSize_()}setSize(t){(0,l.aI)(t,this.size_)||(this.size_[0]=t[0],this.size_[1]=t[1],this.updateSize_())}getSize(){return this.size_}clearCachedData(){this.dataCacheDirty_=!0}readAll(){if(this.dataCacheDirty_){const t=this.size_,e=this.helper_.getGL();e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.readPixels(0,0,t[0],t[1],e.RGBA,e.UNSIGNED_BYTE,this.data_),this.dataCacheDirty_=!1}return this.data_}readPixel(t,e){if(t<0||e<0||t>this.size_[0]||e>=this.size_[1])return h[0]=0,h[1]=0,h[2]=0,h[3]=0,h;this.readAll();const i=Math.floor(t)+(this.size_[1]-Math.floor(e)-1)*this.size_[0];return h[0]=this.data_[4*i],h[1]=this.data_[4*i+1],h[2]=this.data_[4*i+2],h[3]=this.data_[4*i+3],h}getTexture(){return this.texture_}getFramebuffer(){return this.framebuffer_}getDepthbuffer(){return this.depthbuffer_}updateSize_(){const t=this.size_,e=this.helper_.getGL();this.texture_=this.helper_.createTexture(t,null,this.texture_),e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.viewport(0,0,t[0],t[1]),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture_,0),e.bindRenderbuffer(e.RENDERBUFFER,this.depthbuffer_),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,t[0],t[1]),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,this.depthbuffer_),this.data_=new Uint8Array(t[0]*t[1]*4)}};var u=i(130),d=i(9777);const g="GENERATE_POINT_BUFFERS";var _=i(9703),f=i(588),p=i(915);function m(t,e){const i=256,n=255;return(e=e||[])[0]=Math.floor(t/i/i/i)/n,e[1]=Math.floor(t/i/i)%i/n,e[2]=Math.floor(t/i)%i/n,e[3]=t%i/n,e}i(6570);var x=i(3407),v=i(4087),y=i(9438);class E extends a.A{constructor(t,e){const i=e.uniforms||{},n=(0,_.vt)();i[d.M8.PROJECTION_MATRIX]=n,super(t,{uniforms:i,postProcesses:e.postProcesses}),this.sourceRevision_=-1,this.verticesBuffer_=new o.Ay(u.H7,u.Be),this.indicesBuffer_=new o.Ay(u.IP,u.Be),this.vertexShader_=e.vertexShader,this.fragmentShader_=e.fragmentShader,this.program_,this.hitDetectionEnabled_=e.hitDetectionEnabled??!0;const r=e.attributes?e.attributes.map((function(t){return{name:"a_prop_"+t.name,size:1,type:d.jQ.FLOAT}})):[];this.attributes=[{name:"a_position",size:2,type:d.jQ.FLOAT},{name:"a_index",size:1,type:d.jQ.FLOAT}],this.hitDetectionEnabled_&&(this.attributes.push({name:"a_prop_hitColor",size:4,type:d.jQ.FLOAT}),this.attributes.push({name:"a_featureUid",size:1,type:d.jQ.FLOAT})),this.attributes.push(...r),this.customAttributes=e.attributes?e.attributes:[],this.previousExtent_=(0,p.S5)(),this.currentTransform_=n,this.renderTransform_=(0,_.vt)(),this.invertRenderTransform_=(0,_.vt)(),this.renderInstructions_=new Float32Array(0),this.hitRenderTarget_,this.lastSentId=0,this.worker_=function(){const t='const e="GENERATE_POLYGON_BUFFERS",t="GENERATE_POINT_BUFFERS",n="GENERATE_LINE_STRING_BUFFERS";function r(e,t){const n=t[0],r=t[1];return t[0]=e[0]*n+e[2]*r+e[4],t[1]=e[1]*n+e[3]*r+e[5],t}function x(e,t){const n=(r=t)[0]*r[3]-r[1]*r[2];var r;!function(e,t){if(!e)throw new Error(t)}(0!==n,"Transformation matrix cannot be inverted");const x=t[0],i=t[1],u=t[2],o=t[3],f=t[4],s=t[5];return e[0]=o/n,e[1]=-i/n,e[2]=-u/n,e[3]=x/n,e[4]=(u*s-o*f)/n,e[5]=-(x*s-i*f)/n,e}function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}new Array(6);var u={exports:{}};function o(e,t,n){n=n||2;var r,x,i,u,o,s,l,v=t&&t.length,h=v?t[0]*n:e.length,c=f(e,0,h,n,!0),g=[];if(!c||c.next===c.prev)return g;if(v&&(c=function(e,t,n,r){var x,i,u,o=[];for(x=0,i=t.length;x80*n){r=i=e[0],x=u=e[1];for(var b=n;bi&&(i=o),s>u&&(u=s);l=0!==(l=Math.max(i-r,u-x))?32767/l:0}return a(c,g,n,r,x,l,0),g}function f(e,t,n,r,x){var i,u;if(x===O(e,t,n,r)>0)for(i=t;i=t;i-=r)u=P(i,e[i],e[i+1],u);return u&&m(u,u.next)&&(B(u),u=u.next),u}function s(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!m(r,r.next)&&0!==w(r.prev,r,r.next))r=r.next;else{if(B(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function a(e,t,n,r,x,i,u){if(e){!u&&i&&function(e,t,n,r){var x=e;do{0===x.z&&(x.z=b(x.x,x.y,t,n,r)),x.prevZ=x.prev,x.nextZ=x.next,x=x.next}while(x!==e);x.prevZ.nextZ=null,x.prevZ=null,function(e){var t,n,r,x,i,u,o,f,s=1;do{for(n=e,e=null,i=null,u=0;n;){for(u++,r=n,o=0,t=0;t0||f>0&&r;)0!==o&&(0===f||!r||n.z<=r.z)?(x=n,n=n.nextZ,o--):(x=r,r=r.nextZ,f--),i?i.nextZ=x:e=x,x.prevZ=i,i=x;n=r}i.nextZ=null,s*=2}while(u>1)}(x)}(e,r,x,i);for(var o,f,p=e;e.prev!==e.next;)if(o=e.prev,f=e.next,i?v(e,r,x,i):l(e))t.push(o.i/n|0),t.push(e.i/n|0),t.push(f.i/n|0),B(e),e=f.next,p=f.next;else if((e=f)===p){u?1===u?a(e=h(s(e),t,n),t,n,r,x,i,2):2===u&&c(e,t,n,r,x,i):a(s(e),t,n,r,x,i,1);break}}}function l(e){var t=e.prev,n=e,r=e.next;if(w(t,n,r)>=0)return!1;for(var x=t.x,i=n.x,u=r.x,o=t.y,f=n.y,s=r.y,a=xi?x>u?x:u:i>u?i:u,h=o>f?o>s?o:s:f>s?f:s,c=r.next;c!==t;){if(c.x>=a&&c.x<=v&&c.y>=l&&c.y<=h&&M(x,o,i,f,u,s,c.x,c.y)&&w(c.prev,c,c.next)>=0)return!1;c=c.next}return!0}function v(e,t,n,r){var x=e.prev,i=e,u=e.next;if(w(x,i,u)>=0)return!1;for(var o=x.x,f=i.x,s=u.x,a=x.y,l=i.y,v=u.y,h=of?o>s?o:s:f>s?f:s,y=a>l?a>v?a:v:l>v?l:v,g=b(h,c,t,n,r),d=b(p,y,t,n,r),Z=e.prevZ,m=e.nextZ;Z&&Z.z>=g&&m&&m.z<=d;){if(Z.x>=h&&Z.x<=p&&Z.y>=c&&Z.y<=y&&Z!==x&&Z!==u&&M(o,a,f,l,s,v,Z.x,Z.y)&&w(Z.prev,Z,Z.next)>=0)return!1;if(Z=Z.prevZ,m.x>=h&&m.x<=p&&m.y>=c&&m.y<=y&&m!==x&&m!==u&&M(o,a,f,l,s,v,m.x,m.y)&&w(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;Z&&Z.z>=g;){if(Z.x>=h&&Z.x<=p&&Z.y>=c&&Z.y<=y&&Z!==x&&Z!==u&&M(o,a,f,l,s,v,Z.x,Z.y)&&w(Z.prev,Z,Z.next)>=0)return!1;Z=Z.prevZ}for(;m&&m.z<=d;){if(m.x>=h&&m.x<=p&&m.y>=c&&m.y<=y&&m!==x&&m!==u&&M(o,a,f,l,s,v,m.x,m.y)&&w(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function h(e,t,n){var r=e;do{var x=r.prev,i=r.next.next;!m(x,i)&&A(x,r,r.next,i)&&z(x,i)&&z(i,x)&&(t.push(x.i/n|0),t.push(r.i/n|0),t.push(i.i/n|0),B(r),B(r.next),r=e=i),r=r.next}while(r!==e);return s(r)}function c(e,t,n,r,x,i){var u=e;do{for(var o=u.next.next;o!==u.prev;){if(u.i!==o.i&&Z(u,o)){var f=F(u,o);return u=s(u,u.next),f=s(f,f.next),a(u,t,n,r,x,i,0),void a(f,t,n,r,x,i,0)}o=o.next}u=u.next}while(u!==e)}function p(e,t){return e.x-t.x}function y(e,t){var n=function(e,t){var n,r=t,x=e.x,i=e.y,u=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var o=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(o<=x&&o>u&&(u=o,n=r.x=r.x&&r.x>=a&&x!==r.x&&M(in.x||r.x===n.x&&g(n,r)))&&(n=r,v=f)),r=r.next}while(r!==s);return n}(e,t);if(!n)return t;var r=F(n,e);return s(r,r.next),s(n,n.next)}function g(e,t){return w(e.prev,e,t.prev)<0&&w(t.next,e,e.next)<0}function b(e,t,n,r,x){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*x|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*x|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function d(e){var t=e,n=e;do{(t.x=(e-u)*(i-o)&&(e-u)*(r-o)>=(n-u)*(t-o)&&(n-u)*(i-o)>=(x-u)*(r-o)}function Z(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&A(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(z(e,t)&&z(t,e)&&function(e,t){var n=e,r=!1,x=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&x<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(w(e.prev,e,t.prev)||w(e,t.prev,t))||m(e,t)&&w(e.prev,e,e.next)>0&&w(t.prev,t,t.next)>0)}function w(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function m(e,t){return e.x===t.x&&e.y===t.y}function A(e,t,n,r){var x=I(w(e,t,n)),i=I(w(e,t,r)),u=I(w(n,r,e)),o=I(w(n,r,t));return x!==i&&u!==o||(!(0!==x||!E(e,n,t))||(!(0!==i||!E(e,r,t))||(!(0!==u||!E(n,e,r))||!(0!==o||!E(n,t,r)))))}function E(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function I(e){return e>0?1:e<0?-1:0}function z(e,t){return w(e.prev,e,e.next)<0?w(e,t,e.next)>=0&&w(e,e.prev,t)>=0:w(e,t,e.prev)<0||w(e,e.next,t)<0}function F(e,t){var n=new _(e.i,e.x,e.y),r=new _(t.i,t.x,t.y),x=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=x,x.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function P(e,t,n,r){var x=new _(e,t,n);return r?(x.next=r.next,x.prev=r,r.next.prev=x,r.next=x):(x.prev=x,x.next=x),x}function B(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function _(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function O(e,t,n,r){for(var x=0,i=t,u=n-r;i0&&(r+=e[x-1].length,n.holes.push(r))}return n};var N=i(u.exports);const R=[],S={vertexPosition:0,indexPosition:0};function T(e,t,n,r,x){e[t+0]=n,e[t+1]=r,e[t+2]=x}function U(e,t,n,r,x,i){const u=3+x,o=e[t+0],f=e[t+1],s=R;s.length=x;for(let n=0;n0?f:2*Math.PI-f}let d=-1,M=-1,Z=l;const w=null!==i;if(null!==x){d=b(y,g,r(s,[...[e[x],e[x+1]]])),Math.cos(d)<=.985&&(Z+=Math.tan((d-Math.PI)/2))}if(w){M=b(g,y,r(s,[...[e[i],e[i+1]]])),Math.cos(M)<=.985&&(Z+=Math.tan((Math.PI-M)/2))}function m(e,t){return 0===t?1e4*e:Math.sign(t)*(1e4*e+Math.abs(t))}return u.push(c[0],c[1],p[0],p[1],d,M,a,m(0,l)),u.push(...f),u.push(c[0],c[1],p[0],p[1],d,M,a,m(1,l)),u.push(...f),u.push(c[0],c[1],p[0],p[1],d,M,a,m(2,l)),u.push(...f),u.push(c[0],c[1],p[0],p[1],d,M,a,m(3,l)),u.push(...f),o.push(h,h+1,h+2,h+1,h+3,h+2),{length:a+Math.sqrt((g[0]-y[0])*(g[0]-y[0])+(g[1]-y[1])*(g[1]-y[1])),angle:Z}}function G(e,t,n,r,x){const i=2+x;let u=t;const o=e.slice(u,u+x);u+=x;const f=e[u++];let s=0;const a=new Array(f-1);for(let t=0;t{const i=r.data;switch(i.type){case t:{const e=3,t=2,n=i.customAttributesSize,r=t+n,x=new Float32Array(i.renderInstructions),u=x.length/r,o=4*u*(n+e),f=new Uint32Array(6*u),s=new Float32Array(o);let a;for(let e=0;e0?c=o+(n-1)*r:l&&(c=i-r);let p=null;n{const e=t.data;if(e.type===g){const i=e.projectionTransform;this.verticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_),this.indicesBuffer_.fromArrayBuffer(e.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=i,(0,_.T9)(this.invertRenderTransform_,this.renderTransform_),this.renderInstructions_=new Float32Array(t.data.renderInstructions),e.id===this.lastSentId&&(this.ready=!0),this.getLayer().changed()}})),this.featureCache_={},this.featureCount_=0;const a=this.getLayer().getSource();this.sourceListenKeys_=[(0,y.KT)(a,s.A.ADDFEATURE,this.handleSourceFeatureAdded_,this),(0,y.KT)(a,s.A.CHANGEFEATURE,this.handleSourceFeatureChanged_,this),(0,y.KT)(a,s.A.REMOVEFEATURE,this.handleSourceFeatureDelete_,this),(0,y.KT)(a,s.A.CLEAR,this.handleSourceFeatureClear_,this)],a.forEachFeature((t=>{this.featureCache_[(0,v.v6)(t)]={feature:t,properties:t.getProperties(),geometry:t.getGeometry()},this.featureCount_++}))}afterHelperCreated(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.hitDetectionEnabled_&&(this.hitRenderTarget_=new c(this.helper))}handleSourceFeatureAdded_(t){const e=t.feature;this.featureCache_[(0,v.v6)(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()},this.featureCount_++}handleSourceFeatureChanged_(t){const e=t.feature;this.featureCache_[(0,v.v6)(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()}}handleSourceFeatureDelete_(t){const e=t.feature;delete this.featureCache_[(0,v.v6)(e)],this.featureCount_--}handleSourceFeatureClear_(){this.featureCache_={},this.featureCount_=0}renderFrame(t){const e=this.helper.getGL();this.preRender(e,t);const[i,n,s]=function(t,e){const i=t.viewState.projection,n=e.getSource().getWrapX()&&i.canWrapX(),s=i.getExtent(),r=t.extent,o=n?(0,p.RG)(s):null,a=n?Math.ceil((r[2]-s[2])/o)+1:1;return[n?Math.floor((r[0]-s[0])/o):0,a,o]}(t,this.getLayer());return this.renderWorlds(t,!1,i,n,s),this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent),this.hitDetectionEnabled_&&(this.renderWorlds(t,!0,i,n,s),this.hitRenderTarget_.clearCachedData()),this.postRender(e,t),this.helper.getCanvas()}prepareFrameInternal(t){const e=this.getLayer(),i=e.getSource(),s=t.viewState,o=!t.viewHints[r.A.ANIMATING]&&!t.viewHints[r.A.INTERACTING],a=!(0,p.aI)(this.previousExtent_,t.extent),l=this.sourceRevision_ 0) {\n if (gl_FragColor.a < 0.05) { discard; };\n gl_FragColor = v_prop_hitColor;\n }\n}`:null}getStrokeVertexShader(){return this.hasStroke_?`${C}\n${this.uniforms_.map((function(t){return"uniform "+t+";"})).join("\n")}\nattribute vec2 a_position;\nattribute float a_index;\nattribute vec2 a_segmentStart;\nattribute vec2 a_segmentEnd;\nattribute float a_parameters;\nattribute float a_distance;\nattribute vec2 a_joinAngles;\nattribute vec4 a_prop_hitColor;\n${this.attributes_.map((function(t){return"attribute "+t+";"})).join("\n")}\nvarying vec2 v_segmentStart;\nvarying vec2 v_segmentEnd;\nvarying float v_angleStart;\nvarying float v_angleEnd;\nvarying float v_width;\nvarying vec4 v_prop_hitColor;\nvarying float v_distanceOffsetPx;\n${this.varyings_.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")}\n${this.vertexShaderFunctions_.join("\n")}\nvec2 worldToPx(vec2 worldPos) {\n vec4 screenPos = u_projectionMatrix * vec4(worldPos, 0.0, 1.0);\n return (0.5 * screenPos.xy + 0.5) * u_viewportSizePx;\n}\n\nvec4 pxToScreen(vec2 pxPos) {\n vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;\n return vec4(screenPos, u_depth, 1.0);\n}\n\nbool isCap(float joinAngle) {\n return joinAngle < -0.1;\n}\n\nvec2 getJoinOffsetDirection(vec2 normalPx, float joinAngle) {\n float halfAngle = joinAngle / 2.0;\n float c = cos(halfAngle);\n float s = sin(halfAngle);\n vec2 angleBisectorNormal = vec2(s * normalPx.x + c * normalPx.y, -c * normalPx.x + s * normalPx.y);\n float length = 1.0 / s;\n return angleBisectorNormal * length;\n}\n\nvec2 getOffsetPoint(vec2 point, vec2 normal, float joinAngle, float offsetPx) {\n // if on a cap or the join angle is too high, offset the line along the segment normal\n if (cos(joinAngle) > 0.998 || isCap(joinAngle)) {\n return point - normal * offsetPx;\n }\n // offset is applied along the inverted normal (positive offset goes "right" relative to line direction)\n return point - getJoinOffsetDirection(normal, joinAngle) * offsetPx;\n}\n\nvoid main(void) {\n v_angleStart = a_joinAngles.x;\n v_angleEnd = a_joinAngles.y;\n float vertexNumber = floor(abs(a_parameters) / 10000. + 0.5);\n // we're reading the fractional part while keeping the sign (so -4.12 gives -0.12, 3.45 gives 0.45)\n float angleTangentSum = fract(abs(a_parameters) / 10000.) * 10000. * sign(a_parameters);\n\n float lineWidth = ${this.strokeWidthExpression_};\n float lineOffsetPx = ${this.strokeOffsetExpression_};\n\n // compute segment start/end in px with offset\n vec2 segmentStartPx = worldToPx(a_segmentStart);\n vec2 segmentEndPx = worldToPx(a_segmentEnd);\n vec2 tangentPx = normalize(segmentEndPx - segmentStartPx);\n vec2 normalPx = vec2(-tangentPx.y, tangentPx.x);\n segmentStartPx = getOffsetPoint(segmentStartPx, normalPx, v_angleStart, lineOffsetPx),\n segmentEndPx = getOffsetPoint(segmentEndPx, normalPx, v_angleEnd, lineOffsetPx);\n \n // compute current vertex position\n float normalDir = vertexNumber < 0.5 || (vertexNumber > 1.5 && vertexNumber < 2.5) ? 1.0 : -1.0;\n float tangentDir = vertexNumber < 1.5 ? 1.0 : -1.0;\n float angle = vertexNumber < 1.5 ? v_angleStart : v_angleEnd;\n vec2 joinDirection;\n vec2 positionPx = vertexNumber < 1.5 ? segmentStartPx : segmentEndPx;\n // if angle is too high, do not make a proper join\n if (cos(angle) > 0.985 || isCap(angle)) {\n joinDirection = normalPx * normalDir - tangentPx * tangentDir;\n } else {\n joinDirection = getJoinOffsetDirection(normalPx * normalDir, angle);\n }\n positionPx = positionPx + joinDirection * (lineWidth * 0.5 + 1.); // adding 1 pixel for antialiasing\n gl_Position = pxToScreen(positionPx);\n\n v_segmentStart = segmentStartPx;\n v_segmentEnd = segmentEndPx;\n v_width = lineWidth;\n v_prop_hitColor = a_prop_hitColor;\n v_distanceOffsetPx = a_distance / u_resolution - (lineOffsetPx * angleTangentSum);\n${this.varyings_.map((function(t){return" "+t.name+" = "+t.expression+";"})).join("\n")}\n}`:null}getStrokeFragmentShader(){return this.hasStroke_?`${C}\n${this.uniforms_.map((function(t){return"uniform "+t+";"})).join("\n")}\nvarying vec2 v_segmentStart;\nvarying vec2 v_segmentEnd;\nvarying float v_angleStart;\nvarying float v_angleEnd;\nvarying float v_width;\nvarying vec4 v_prop_hitColor;\nvarying float v_distanceOffsetPx;\n${this.varyings_.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")}\n${this.fragmentShaderFunctions_.join("\n")}\n\nvec2 pxToWorld(vec2 pxPos) {\n vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;\n return (u_screenToWorldMatrix * vec4(screenPos, 0.0, 1.0)).xy;\n}\n\nbool isCap(float joinAngle) {\n return joinAngle < -0.1;\n}\n\nfloat segmentDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n vec2 tangent = normalize(end - start);\n vec2 normal = vec2(-tangent.y, tangent.x);\n vec2 startToPoint = point - start;\n return abs(dot(startToPoint, normal)) - width * 0.5;\n}\n\nfloat buttCapDistanceField(vec2 point, vec2 start, vec2 end) {\n vec2 startToPoint = point - start;\n vec2 tangent = normalize(end - start);\n return dot(startToPoint, -tangent);\n}\n\nfloat squareCapDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n return buttCapDistanceField(point, start, end) - width * 0.5;\n}\n\nfloat roundCapDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n float onSegment = max(0., 1000. * dot(point - start, end - start)); // this is very high when inside the segment\n return length(point - start) - width * 0.5 - onSegment;\n}\n\nfloat roundJoinDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n return roundCapDistanceField(point, start, end, width);\n}\n\nfloat bevelJoinField(vec2 point, vec2 start, vec2 end, float width, float joinAngle) {\n vec2 startToPoint = point - start;\n vec2 tangent = normalize(end - start);\n float c = cos(joinAngle * 0.5);\n float s = sin(joinAngle * 0.5);\n float direction = -sign(sin(joinAngle));\n vec2 bisector = vec2(c * tangent.x - s * tangent.y, s * tangent.x + c * tangent.y);\n float radius = width * 0.5 * s;\n return dot(startToPoint, bisector * direction) - radius;\n}\n\nfloat miterJoinDistanceField(vec2 point, vec2 start, vec2 end, float width, float joinAngle) {\n if (cos(joinAngle) > 0.985) { // avoid risking a division by zero\n return bevelJoinField(point, start, end, width, joinAngle);\n }\n float miterLength = 1. / sin(joinAngle * 0.5);\n float miterLimit = ${this.strokeMiterLimitExpression_};\n if (miterLength > miterLimit) {\n return bevelJoinField(point, start, end, width, joinAngle);\n }\n return -1000.;\n}\n\nfloat capDistanceField(vec2 point, vec2 start, vec2 end, float width, float capType) {\n if (capType == ${(0,A.Tl)("butt")}) {\n return buttCapDistanceField(point, start, end);\n } else if (capType == ${(0,A.Tl)("square")}) {\n return squareCapDistanceField(point, start, end, width);\n }\n return roundCapDistanceField(point, start, end, width);\n}\n\nfloat joinDistanceField(vec2 point, vec2 start, vec2 end, float width, float joinAngle, float joinType) {\n if (joinType == ${(0,A.Tl)("bevel")}) {\n return bevelJoinField(point, start, end, width, joinAngle);\n } else if (joinType == ${(0,A.Tl)("miter")}) {\n return miterJoinDistanceField(point, start, end, width, joinAngle);\n }\n return roundJoinDistanceField(point, start, end, width);\n}\n\nfloat computeSegmentPointDistance(vec2 point, vec2 start, vec2 end, float width, float joinAngle, float capType, float joinType) {\n if (isCap(joinAngle)) {\n return capDistanceField(point, start, end, width, capType);\n }\n return joinDistanceField(point, start, end, width, joinAngle, joinType);\n}\n\nvoid main(void) {\n vec2 currentPoint = gl_FragCoord.xy / u_pixelRatio;\n #ifdef GL_FRAGMENT_PRECISION_HIGH\n vec2 worldPos = pxToWorld(currentPoint);\n if (\n abs(u_renderExtent[0] - u_renderExtent[2]) > 0.0 && (\n worldPos[0] < u_renderExtent[0] ||\n worldPos[1] < u_renderExtent[1] ||\n worldPos[0] > u_renderExtent[2] ||\n worldPos[1] > u_renderExtent[3]\n )\n ) {\n discard;\n }\n #endif\n if (${this.discardExpression_}) { discard; }\n\n float segmentLength = length(v_segmentEnd - v_segmentStart);\n vec2 segmentTangent = (v_segmentEnd - v_segmentStart) / segmentLength;\n vec2 segmentNormal = vec2(-segmentTangent.y, segmentTangent.x);\n vec2 startToPoint = currentPoint - v_segmentStart;\n float currentLengthPx = max(0., min(dot(segmentTangent, startToPoint), segmentLength)) + v_distanceOffsetPx; \n float currentRadiusPx = abs(dot(segmentNormal, startToPoint));\n float currentRadiusRatio = dot(segmentNormal, startToPoint) * 2. / v_width;\n vec4 color = ${this.strokeColorExpression_} * u_globalAlpha;\n float capType = ${this.strokeCapExpression_};\n float joinType = ${this.strokeJoinExpression_};\n float segmentStartDistance = computeSegmentPointDistance(currentPoint, v_segmentStart, v_segmentEnd, v_width, v_angleStart, capType, joinType);\n float segmentEndDistance = computeSegmentPointDistance(currentPoint, v_segmentEnd, v_segmentStart, v_width, v_angleEnd, capType, joinType);\n float distance = max(\n segmentDistanceField(currentPoint, v_segmentStart, v_segmentEnd, v_width),\n max(segmentStartDistance, segmentEndDistance)\n );\n distance = max(distance, ${this.strokeDistanceFieldExpression_});\n gl_FragColor = color * smoothstep(0.5, -0.5, distance);\n if (u_hitDetection > 0) {\n if (gl_FragColor.a < 0.1) { discard; };\n gl_FragColor = v_prop_hitColor;\n }\n}`:null}getFillVertexShader(){return this.hasFill_?`${C}\n${this.uniforms_.map((function(t){return"uniform "+t+";"})).join("\n")}\nattribute vec2 a_position;\nattribute vec4 a_prop_hitColor;\n${this.attributes_.map((function(t){return"attribute "+t+";"})).join("\n")}\nvarying vec4 v_prop_hitColor;\n${this.varyings_.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")}\n${this.vertexShaderFunctions_.join("\n")}\nvoid main(void) {\n gl_Position = u_projectionMatrix * vec4(a_position, u_depth, 1.0);\n v_prop_hitColor = a_prop_hitColor;\n${this.varyings_.map((function(t){return" "+t.name+" = "+t.expression+";"})).join("\n")}\n}`:null}getFillFragmentShader(){return this.hasFill_?`${C}\n${this.uniforms_.map((function(t){return"uniform "+t+";"})).join("\n")}\nvarying vec4 v_prop_hitColor;\n${this.varyings_.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")}\n${this.fragmentShaderFunctions_.join("\n")}\nvec2 pxToWorld(vec2 pxPos) {\n vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;\n return (u_screenToWorldMatrix * vec4(screenPos, 0.0, 1.0)).xy;\n}\n\nvec2 worldToPx(vec2 worldPos) {\n vec4 screenPos = u_projectionMatrix * vec4(worldPos, 0.0, 1.0);\n return (0.5 * screenPos.xy + 0.5) * u_viewportSizePx;\n}\n\nvoid main(void) {\n vec2 pxPos = gl_FragCoord.xy / u_pixelRatio;\n vec2 pxOrigin = worldToPx(u_patternOrigin);\n #ifdef GL_FRAGMENT_PRECISION_HIGH\n vec2 worldPos = pxToWorld(pxPos);\n if (\n abs(u_renderExtent[0] - u_renderExtent[2]) > 0.0 && (\n worldPos[0] < u_renderExtent[0] ||\n worldPos[1] < u_renderExtent[1] ||\n worldPos[0] > u_renderExtent[2] ||\n worldPos[1] > u_renderExtent[3]\n )\n ) {\n discard;\n }\n #endif\n if (${this.discardExpression_}) { discard; }\n gl_FragColor = ${this.fillColorExpression_} * u_globalAlpha;\n if (u_hitDetection > 0) {\n if (gl_FragColor.a < 0.1) { discard; };\n gl_FragColor = v_prop_hitColor;\n }\n}`:null}}var M=i(1597),D=i(8711);const F="blur",O="gradient",k="radius",N=["#00f","#0ff","#0f0","#ff0","#f00"];class G extends n.A{constructor(t){t=t||{};const e=Object.assign({},t);delete e.gradient,delete e.radius,delete e.blur,delete e.weight,super(e),this.gradient_=null,this.addChangeListener(O,this.handleGradientChanged_),this.setGradient(t.gradient?t.gradient:N),this.setBlur(void 0!==t.blur?t.blur:15),this.setRadius(void 0!==t.radius?t.radius:8);const i=t.weight?t.weight:"weight";this.weightFunction_="string"==typeof i?function(t){return t.get(i)}:i,this.setRenderOrder(null)}getBlur(){return this.get(F)}getGradient(){return this.get(O)}getRadius(){return this.get(k)}handleGradientChanged_(){this.gradient_=function(t){const e=(0,D.Y)(1,256),i=e.createLinearGradient(0,0,1,256),n=1/(t.length-1);for(let e=0,s=t.length;e{const e=this.weightFunction_(t);return void 0!==e?(0,M.qE)(e,0,1):1}}],uniforms:{u_size:()=>2*(this.get(k)+this.get(F)),u_blurSlope:()=>this.get(k)/Math.max(1,this.get(F))},hitDetectionEnabled:!0,vertexShader:t.getSymbolVertexShader(),fragmentShader:t.getSymbolFragmentShader(),postProcesses:[{fragmentShader:"\n precision mediump float;\n\n uniform sampler2D u_image;\n uniform sampler2D u_gradientTexture;\n uniform float u_opacity;\n\n varying vec2 v_texCoord;\n\n void main() {\n vec4 color = texture2D(u_image, v_texCoord);\n gl_FragColor.a = color.a * u_opacity;\n gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;\n gl_FragColor.rgb *= gl_FragColor.a;\n }",uniforms:{u_gradientTexture:()=>this.gradient_,u_opacity:()=>this.getOpacity()}}]})}renderDeclutter(){}}const z=G},8044:(t,e,i)=>{"use strict";i.d(e,{A:()=>_});var n=i(764);class s extends n.A{constructor(t){super(t=t||{})}}const r=s;var o=i(6769),a=i(6141),l=i(2703),h=i(9703),c=i(915),u=i(3407);class d extends o.A{constructor(t){super(t),this.image_=null}getImage(){return this.image_?this.image_.getImage():null}prepareFrame(t){const e=t.layerStatesArray[t.layerIndex],i=t.pixelRatio,n=t.viewState,s=n.resolution,r=this.getLayer().getSource(),o=t.viewHints;let h=t.extent;if(void 0!==e.extent&&(h=(0,c._N)(h,(0,u.SD)(e.extent,n.projection))),!o[l.A.ANIMATING]&&!o[l.A.INTERACTING]&&!(0,c.Im)(h))if(r){const t=n.projection,e=r.getImage(h,s,i,t);e&&(this.loadImage(e)?this.image_=e:e.getState()===a.A.EMPTY&&(this.image_=null))}else this.image_=null;return!!this.image_}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),n=(0,h.Bb)(e.pixelToCoordinateTransform,t.slice()),s=i.getExtent();if(s&&!(0,c.Ym)(s,n))return null;const r=this.image_.getExtent(),o=this.image_.getImage(),a=(0,c.RG)(r),l=Math.floor(o.width*((n[0]-r[0])/a));if(l<0||l>=o.width)return null;const u=(0,c.Oq)(r),d=Math.floor(o.height*((r[3]-n[1])/u));return d<0||d>=o.height?null:this.getImageData(o,l,d)}renderFrame(t,e){const i=this.image_,n=i.getExtent(),s=i.getResolution(),[r,o]=Array.isArray(s)?s:[s,s],a=i.getPixelRatio(),l=t.layerStatesArray[t.layerIndex],d=t.pixelRatio,g=t.viewState,_=g.center,f=g.resolution,p=d*r/(f*a),m=d*o/(f*a);this.prepareContainer(t,e);const x=this.context.canvas.width,v=this.context.canvas.height,y=this.getRenderContext(t);let E=!1,T=!0;if(l.extent){const e=(0,u.SD)(l.extent,g.projection);T=(0,c.HY)(e,t.extent),E=T&&!(0,c.ms)(e,t.extent),E&&this.clipUnrotated(y,t,e)}const A=i.getImage(),C=(0,h.Zz)(this.tempTransform,x/2,v/2,p,m,0,a*(n[0]-_[0])/r,a*(_[1]-n[3])/o);this.renderedResolution=o*d/a;const S=A.width*C[0],R=A.height*C[3];if(this.getLayer().getSource().getInterpolate()||(y.imageSmoothingEnabled=!1),this.preRender(y,t),T&&S>=.5&&R>=.5){const t=C[4],e=C[5],i=l.opacity;1!==i&&(y.save(),y.globalAlpha=i),y.drawImage(A,0,0,+A.width,+A.height,t,e,S,R),1!==i&&y.restore()}return this.postRender(this.context,t),E&&y.restore(),y.imageSmoothingEnabled=!0,this.container}}const g=d,_=class extends r{constructor(t){super(t)}createRenderer(){return new g(this)}getData(t){return super.getData(t)}}},764:(t,e,i)=>{"use strict";i.d(e,{A:()=>g,l:()=>d});var n=i(8620),s=i(6837),r=i(5332),o=i(3984),a=i(3568),l=i(588),h=i(915),c=i(9438);class u extends n.A{constructor(t){const e=Object.assign({},t);delete e.source,super(e),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(r.A.SOURCE,this.handleSourcePropertyChange_);const i=t.source?t.source:null;this.setSource(i)}getLayersArray(t){return(t=t||[]).push(this),t}getLayerStatesArray(t){return(t=t||[]).push(this.getLayerState()),t}getSource(){return this.get(r.A.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed(),this.sourceReady_||"ready"!==this.getSource().getState()||(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&((0,c.JH)(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const t=this.getSource();t&&(this.sourceChangeKey_=(0,c.KT)(t,s.A.CHANGE,this.handleSourceChange_,this),"ready"===t.getState()&&(this.sourceReady_=!0,setTimeout((()=>{this.dispatchEvent("sourceready")}),0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null}isVisible(t){let e;const i=this.getMapInternal();let n;!t&&i&&(t=i.getView()),e=t instanceof a.Ay?{viewState:t.getState(),extent:t.calculateExtent()}:t,!e.layerStatesArray&&i&&(e.layerStatesArray=i.getLayerGroup().getLayerStatesArray()),n=e.layerStatesArray?e.layerStatesArray.find((t=>t.layer===this)):this.getLayerState();const s=this.getExtent();return d(n,e.viewState)&&(!s||(0,h.HY)(s,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];let e;const i=this.getSource();if(i&&(e=i.getAttributions()),!e)return[];let n=e(t instanceof a.Ay?t.getViewStateAndExtent():t);return Array.isArray(n)||(n=[n]),n}render(t,e){const i=this.getRenderer();return i.prepareFrame(t)?(this.rendered=!0,i.renderFrame(t,e)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(t,e){}renderDeferred(t){const e=this.getRenderer();e&&e.renderDeferred(t)}setMapInternal(t){t||this.unrender(),this.set(r.A.MAP,t)}getMapInternal(){return this.get(r.A.MAP)}setMap(t){this.mapPrecomposeKey_&&((0,c.JH)(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&((0,c.JH)(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=(0,c.KT)(t,o.A.PRECOMPOSE,(function(t){const e=t.frameState.layerStatesArray,i=this.getLayerState(!1);(0,l.v)(!e.some((function(t){return t.layer===i.layer})),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),e.push(i)}),this),this.mapRenderKey_=(0,c.KT)(this,s.A.CHANGE,t.render,t),this.changed())}setSource(t){this.set(r.A.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function d(t,e){if(!t.visible)return!1;const i=e.resolution;if(i=t.maxResolution)return!1;const n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}const g=u},5332:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"}},945:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(2808),s=i(4029);class r extends n.A{constructor(t){super(t)}createRenderer(){return new s.A(this)}}const o=r},5360:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"}},2757:(t,e,i)=>{"use strict";i.d(e,{A:()=>y});var n=i(2284),s=i(136),r=i(6769),o=i(7343),a=i(3984),l=i(2703),h=i(3663),c=i(915),u=i(8711),d=i(3608),g=i(6514),_=i(3407),f=i(4087),p=i(6933);class m extends r.A{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.clipped_=!1,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=(0,c.S5)(),this.wrappedRenderedExtent_=(0,c.S5)(),this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedPixelRatio_=1,this.renderedRenderOrder_=null,this.renderedFrameDeclutter_,this.replayGroup_=null,this.replayGroupChanged=!0,this.clipping=!0,this.targetContext_=null,this.opacity_=1}renderWorlds(t,e,i){const n=e.extent,s=e.viewState,r=s.center,a=s.resolution,h=s.projection,u=s.rotation,d=h.getExtent(),g=this.getLayer().getSource(),_=this.getLayer().getDeclutter(),f=e.pixelRatio,p=e.viewHints,m=!(p[l.A.ANIMATING]||p[l.A.INTERACTING]),x=this.context,v=Math.round((0,c.RG)(n)/a*f),y=Math.round((0,c.Oq)(n)/a*f),E=g.getWrapX()&&h.canWrapX(),T=E?(0,c.RG)(d):null,A=E?Math.ceil((n[2]-d[2])/T)+1:1;let C=E?Math.floor((n[0]-d[0])/T):0;do{let n=this.getRenderTransform(r,a,0,f,v,y,C*T);e.declutter&&(n=n.slice(0)),t.execute(x,[x.canvas.width,x.canvas.height],n,u,m,void 0===i?o.y2:i?o.$i:o.x$,i?_&&e.declutter[_]:void 0)}while(++C{if(this.frameState&&!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const t=this.frameState.size.slice(),e=this.renderedCenter_,i=this.renderedResolution_,n=this.renderedRotation_,s=this.renderedProjection_,r=this.wrappedRenderedExtent_,o=this.getLayer(),a=[],l=t[0]*h.tF,u=t[1]*h.tF;a.push(this.getRenderTransform(e,i,n,h.tF,l,u,0).slice());const g=o.getSource(),f=s.getExtent();if(g.getWrapX()&&s.canWrapX()&&!(0,c.ms)(f,r)){let t=r[0];const s=(0,c.RG)(f);let o,d=0;for(;tf[2];)++d,o=s*d,a.push(this.getRenderTransform(e,i,n,h.tF,l,u,o).slice()),t-=s}const p=(0,_.Tf)();this.hitDetectionImageData_=(0,h._7)(t,a,this.renderedFeatures_,o.getStyleFunction(),r,i,n,(0,d.j)(i,this.renderedPixelRatio_),p?s:null)}e((0,h.F8)(t,this.renderedFeatures_,this.hitDetectionImageData_))}))}forEachFeatureAtCoordinate(t,e,i,n,s){if(!this.replayGroup_)return;const r=e.viewState.resolution,o=e.viewState.rotation,a=this.getLayer(),l={},h=function(t,e,i){const r=(0,f.v6)(t),o=l[r];if(o){if(!0!==o&&ic=n.forEachFeatureAtCoordinate(t,r,o,i,h,d&&e.declutter[d]?e.declutter[d].all().map((t=>t.value)):null))),c}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),i=e.getSource();if(!i)return!1;const n=t.viewHints[l.A.ANIMATING],r=t.viewHints[l.A.INTERACTING],a=e.getUpdateWhileAnimating(),h=e.getUpdateWhileInteracting();if(this.ready&&!a&&n||!h&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const u=t.extent,f=t.viewState,m=f.projection,x=f.resolution,v=t.pixelRatio,y=e.getRevision(),E=e.getRenderBuffer();let T=e.getRenderOrder();void 0===T&&(T=d.Eo);const A=f.center.slice(),C=(0,c.r)(u,E*x),S=C.slice(),R=[C.slice()],w=m.getExtent();if(i.getWrapX()&&m.canWrapX()&&!(0,c.ms)(w,t.extent)){const t=(0,c.RG)(w),e=Math.max((0,c.RG)(C)/2,t);C[0]=w[0]-e,C[2]=w[2]+e,(0,p.Li)(A,m);const i=(0,c.Li)(R[0],m);i[0]w[0]&&i[2]>w[2]&&R.push([i[0]-t,i[1],i[2]-t,i[3]])}if(this.ready&&this.renderedResolution_==x&&this.renderedRevision_==y&&this.renderedRenderOrder_==T&&this.renderedFrameDeclutter_===!!t.declutter&&(0,c.ms)(this.wrappedRenderedExtent_,C))return(0,g.aI)(this.renderedExtent_,S)||(this.hitDetectionImageData_=null,this.renderedExtent_=S),this.renderedCenter_=A,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const b=new s.A((0,d.gY)(x,v),C,x,v),I=(0,_.Tf)();let L;if(I){for(let t=0,e=R.length;t{let n;const s=t.getStyleFunction()||e.getStyleFunction();if(s&&(n=s(t,x)),n){const e=this.renderFeature(t,P,n,b,L,this.getLayer().getDeclutter(),i);M=M&&!e}},F=(0,_.JR)(C,m),O=i.getFeaturesInExtent(F);T&&O.sort(T);for(let t=0,e=O.length;t{"use strict";i.d(e,{A:()=>S});var n=i(2284),s=i(136),r=i(7343),o=i(4029),a=i(1078),l=i(2703),h=i(808),c=i(3663),u=i(9703),d=i(6514),g=i(915),_=i(3608),f=i(4087),p=i(4401),m=i(6933);const x={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},v={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]};class y extends o.A{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.renderedOpacity_=1,this.tmpTransform_=(0,u.vt)(),this.tileClipContexts_=null}prepareTile(t,e,i){let n;const s=t.getState();return s!==a.A.LOADED&&s!==a.A.ERROR||(this.updateExecutorGroup_(t,e,i),this.tileImageNeedsRender_(t)&&(n=!0)),n}getTile(t,e,i,n){const s=n.pixelRatio,r=n.viewState,o=r.resolution,a=r.projection,h=this.getLayer(),c=h.getSource().getTile(t,e,i,s,a),u=n.viewHints,d=!(u[l.A.ANIMATING]||u[l.A.INTERACTING]);return!d&&c.wantedResolution||(c.wantedResolution=o),this.prepareTile(c,s,a)&&(d||Date.now()-n.time<8)&&"vector"!==h.getRenderMode()&&this.renderTileImage_(c,n),super.getTile(t,e,i,n)}isDrawableTile(t){const e=this.getLayer();return super.isDrawableTile(t)&&("vector"===e.getRenderMode()?(0,f.v6)(e)in t.executorGroups:t.hasContext(e))}getTileImage(t){return t.getImage(this.getLayer())}prepareFrame(t){const e=this.getLayer().getRevision();return this.renderedLayerRevision_!==e&&(this.renderedLayerRevision_=e,this.renderedTiles.length=0),super.prepareFrame(t)}updateExecutorGroup_(t,e,i){const n=this.getLayer(),o=n.getRevision(),l=n.getRenderOrder()||null,h=t.wantedResolution,c=t.getReplayState(n);if(!c.dirty&&c.renderedResolution===h&&c.renderedRevision==o&&c.renderedRenderOrder==l)return;const u=n.getSource(),d=!!n.getDeclutter(),p=u.getTileGrid(),m=u.getTileGridForProjection(i).getTileCoordExtent(t.wrappedTileCoord),x=u.getSourceTiles(e,i,t),v=(0,f.v6)(n);delete t.hitDetectionImageData[v],t.executorGroups[v]=[],c.dirty=!1;for(let i=0,o=x.length;i{const s=x?e.declutter[x].all().map((t=>t.value)):null;for(let e=0,a=n.length;e{const n=this.getLayer(),s=(0,f.v6)(n),r=n.getSource(),o=this.renderedProjection,l=o.getExtent(),h=this.renderedResolution,d=r.getTileGridForProjection(o),_=(0,u.Bb)(this.renderedPixelToCoordinateTransform_,t.slice()),x=d.getTileCoordForCoordAndResolution(_,h);let v;for(let t=0,e=this.renderedTiles.length;t0)return void e([]);const y=d.getTileCoordExtent(v.wrappedTileCoord),E=(0,g.Py)(y),T=[(_[0]-E[0])/h,(E[1]-_[1])/h],A=v.getSourceTiles().reduce((function(t,e){return t.concat(e.getFeatures())}),[]);let C=v.hitDetectionImageData[s];if(!C){const t=(0,p.xq)(d.getTileSize(d.getZForResolution(h,r.zDirection))),e=this.renderedRotation_,i=[this.getRenderTransform(d.getTileCoordCenter(v.wrappedTileCoord),h,0,c.tF,t[0]*c.tF,t[1]*c.tF,0)];C=(0,c._7)(t,i,A,n.getStyleFunction(),d.getTileCoordExtent(v.wrappedTileCoord),v.getReplayState(n).renderedResolution,e),v.hitDetectionImageData[s]=C}e((0,c.F8)(T,A,C))}))}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&void 0!==this.renderedLayerRevision_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}renderDeclutter(t,e){const i=this.context,n=i.globalAlpha;i.globalAlpha=e.opacity;const s=t.viewHints,o=!(s[l.A.ANIMATING]||s[l.A.INTERACTING]),a=this.renderedTiles;for(let e=0,i=a.length;e=0;--e)n[e].execute(this.context,[this.context.canvas.width,this.context.canvas.height],this.getTileRenderTransform(i,t),t.viewState.rotation,o,r.$i,s?t.declutter[s]:void 0)}i.globalAlpha=n}renderDeferredInternal(t){const e=this.renderedTiles.reduce(((t,e,i)=>(e.executorGroups[(0,f.v6)(this.getLayer())].forEach((e=>t.push({executorGroup:e,index:i}))),t)),[]),i=e.map((({executorGroup:t})=>t.getDeferredZIndexContexts())),n={};for(let t=0,i=e.length;t{i.forEach(((i,n)=>{i[t]&&(i[t].forEach((t=>{const{executorGroup:i,index:s}=e[n],r=i.getRenderedContext(),o=r.globalAlpha;r.globalAlpha=this.renderedOpacity_;const a=this.tileClipContexts_[s];a&&a.draw(r),t.draw(r),a&&r.restore(),r.globalAlpha=o,t.clear()})),i[t].length=0)}))}))}getTileRenderTransform(t,e){const i=e.pixelRatio,n=e.viewState,s=n.center,r=n.resolution,o=n.rotation,a=e.size,l=Math.round(a[0]*i),h=Math.round(a[1]*i),c=this.getLayer().getSource().getTileGridForProjection(e.viewState.projection),d=t.tileCoord,g=c.getTileCoordExtent(t.wrappedTileCoord),_=c.getTileCoordExtent(d,this.tmpExtent)[0]-g[0];return(0,u.lw)((0,u.hs)(this.inversePixelTransform.slice(),1/i,1/i),this.getRenderTransform(s,r,o,i,l,h,_))}postRender(t,e){const i=e.viewHints,n=!(i[l.A.ANIMATING]||i[l.A.INTERACTING]);this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation,this.renderedOpacity_=e.layerStatesArray[e.layerIndex].opacity;const s=this.getLayer(),o=s.getRenderMode(),a=t.globalAlpha;t.globalAlpha=this.renderedOpacity_;const c=s.getDeclutter()?v[o].filter((t=>!r.$i.includes(t))):v[o],u=e.viewState,d=u.rotation,_=s.getSource(),p=_.getTileGridForProjection(u.projection).getZForResolution(u.resolution,_.zDirection),m=this.renderedTiles,x=[],y=[],E=[];let T=!0;for(let i=m.length-1;i>=0;--i){const r=m[i];T=T&&!r.getReplayState(s).dirty;const o=r.executorGroups[(0,f.v6)(s)].filter((t=>t.hasExecutors(c)));if(0===o.length)continue;const a=this.getTileRenderTransform(r,e),l=r.tileCoord[0];let u=!1;const _=o[0].getClipCoords(a);let v,A=t;if(_){v=new h.A,A=v.getContext();for(let t=0,e=x.length;t{"use strict";i.d(e,{A:()=>u});var n=i(2808),s=i(5332),r=i(2323),o=i(9825),a=i(5516);function l(t,e,i){const n=(0,o.SR)();return n.style=t.style,(0,a.nR)(e,i,n,t)}function h(t,e){const i=`\n attribute vec2 ${r.eS.TEXTURE_COORD};\n uniform mat4 ${r.gF.TILE_TRANSFORM};\n uniform float ${r.gF.TEXTURE_PIXEL_WIDTH};\n uniform float ${r.gF.TEXTURE_PIXEL_HEIGHT};\n uniform float ${r.gF.TEXTURE_RESOLUTION};\n uniform float ${r.gF.TEXTURE_ORIGIN_X};\n uniform float ${r.gF.TEXTURE_ORIGIN_Y};\n uniform float ${r.gF.DEPTH};\n\n varying vec2 v_textureCoord;\n varying vec2 v_mapCoord;\n\n void main() {\n v_textureCoord = ${r.eS.TEXTURE_COORD};\n v_mapCoord = vec2(\n ${r.gF.TEXTURE_ORIGIN_X} + ${r.gF.TEXTURE_RESOLUTION} * ${r.gF.TEXTURE_PIXEL_WIDTH} * v_textureCoord[0],\n ${r.gF.TEXTURE_ORIGIN_Y} - ${r.gF.TEXTURE_RESOLUTION} * ${r.gF.TEXTURE_PIXEL_HEIGHT} * v_textureCoord[1]\n );\n gl_Position = ${r.gF.TILE_TRANSFORM} * vec4(${r.eS.TEXTURE_COORD}, ${r.gF.DEPTH}, 1.0);\n }\n `,n={...(0,a.z0)(),inFragmentShader:!0,bandCount:e,style:t},s=[];if(void 0!==t.color){const e=l(n,t.color,o.mE);s.push(`color = ${e};`)}if(void 0!==t.contrast){const e=l(n,t.contrast,o.wl);s.push(`color.rgb = clamp((${e} + 1.0) * color.rgb - (${e} / 2.0), vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}if(void 0!==t.exposure){const e=l(n,t.exposure,o.wl);s.push(`color.rgb = clamp((${e} + 1.0) * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}if(void 0!==t.saturation){const e=l(n,t.saturation,o.wl);s.push(`\n float saturation = ${e} + 1.0;\n float sr = (1.0 - saturation) * 0.2126;\n float sg = (1.0 - saturation) * 0.7152;\n float sb = (1.0 - saturation) * 0.0722;\n mat3 saturationMatrix = mat3(\n sr + saturation, sr, sr,\n sg, sg + saturation, sg,\n sb, sb, sb + saturation\n );\n color.rgb = clamp(saturationMatrix * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));\n `)}if(void 0!==t.gamma){const e=l(n,t.gamma,o.wl);s.push(`color.rgb = pow(color.rgb, vec3(1.0 / ${e}));`)}if(void 0!==t.brightness){const e=l(n,t.brightness,o.wl);s.push(`color.rgb = clamp(color.rgb + ${e}, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}const h={},c=Object.keys(n.variables).length;if(c>1&&!t.variables)throw new Error(`Missing variables in style (expected ${n.variables})`);for(let e=0;e ${r.gF.RENDER_EXTENT}[2] ||\n v_mapCoord[1] > ${r.gF.RENDER_EXTENT}[3]\n ) {\n discard;\n }\n\n vec4 color = texture2D(${r.gF.TILE_TEXTURE_ARRAY}[0], v_textureCoord);\n\n ${s.join("\n")}\n\n gl_FragColor = color;\n gl_FragColor.rgb *= gl_FragColor.a;\n gl_FragColor *= ${r.gF.TRANSITION_ALPHA};\n }`,uniforms:h,paletteTextures:n.paletteTextures}}class c extends n.A{constructor(t){const e=(t=t?Object.assign({},t):{}).style||{};delete t.style;const i=t.cacheSize;delete t.cacheSize,super(t),this.sources_=t.sources,this.renderedSource_=null,this.renderedResolution_=NaN,this.style_=e,this.cacheSize_=i,this.styleVariables_=this.style_.variables||{},this.addChangeListener(s.A.SOURCE,this.handleSourceUpdate_)}getSources(t,e){const i=this.getSource();return this.sources_?"function"==typeof this.sources_?this.sources_(t,e):this.sources_:i?[i]:[]}getRenderSource(){return this.renderedSource_||this.getSource()}getSourceState(){const t=this.getRenderSource();return t?t.getState():"undefined"}handleSourceUpdate_(){this.hasRenderer()&&this.getRenderer().clearCache(),this.getSource()&&this.setStyle(this.style_)}getSourceBandCount_(){const t=Number.MAX_SAFE_INTEGER,e=this.getSources([-t,-t,t,t],t);return e&&e.length&&"bandCount"in e[0]?e[0].bandCount:4}createRenderer(){const t=h(this.style_,this.getSourceBandCount_());return new r.Ay(this,{vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,cacheSize:this.cacheSize_,paletteTextures:t.paletteTextures})}renderSources(t,e){const i=this.getRenderer();let n;for(let s=0,r=e.length;s{"ready"==e.getState()&&(e.removeEventListener("change",t),this.changed())};e.addEventListener("change",t)}s=s&&"ready"==i}const r=this.renderSources(t,n);if(this.getRenderer().renderComplete&&s)return this.renderedResolution_=i.resolution,r;if(this.renderedResolution_>.5*i.resolution){const e=this.getSources(t.extent,this.renderedResolution_).filter((t=>!n.includes(t)));if(e.length>0)return this.renderSources(t,e)}return r}setStyle(t){this.styleVariables_=t.variables||{},this.style_=t;const e=h(this.style_,this.getSourceBandCount_());this.getRenderer().reset({vertexShader:e.vertexShader,fragmentShader:e.fragmentShader,uniforms:e.uniforms,paletteTextures:e.paletteTextures}),this.changed()}updateStyleVariables(t){Object.assign(this.styleVariables_,t),this.changed()}}c.prototype.dispose;const u=c},1597:(t,e,i)=>{"use strict";function n(t,e,i){return Math.min(Math.max(t,e),i)}function s(t,e,i,n,s,o){const a=s-i,l=o-n;if(0!==a||0!==l){const r=((t-i)*a+(e-n)*l)/(a*a+l*l);r>1?(i=s,n=o):r>0&&(i+=a*r,n+=l*r)}return r(t,e,i,n)}function r(t,e,i,n){const s=i-t,r=n-e;return s*s+r*r}function o(t){const e=t.length;for(let i=0;is&&(s=e,n=r)}if(0===s)return null;const r=t[n];t[n]=t[i],t[i]=r;for(let n=i+1;n=0;n--){i[n]=t[n][e]/t[n][n];for(let s=n-1;s>=0;s--)t[s][e]-=t[s][n]*i[n]}return i}function a(t){return 180*t/Math.PI}function l(t){return t*Math.PI/180}function h(t,e){const i=t%e;return i*e<0?i+e:i}function c(t,e,i){return t+i*(e-t)}function u(t,e){const i=Math.pow(10,e);return Math.round(t*i)/i}function d(t,e){return Math.round(u(t,e))}function g(t,e){return Math.floor(u(t,e))}function _(t,e){return Math.ceil(u(t,e))}i.d(e,{Cc:()=>c,KU:()=>o,LI:()=>d,Mg:()=>u,Q1:()=>s,RI:()=>g,eh:()=>l,hG:()=>r,mk:()=>_,qE:()=>n,xP:()=>h,xW:()=>a})},3530:(t,e,i)=>{"use strict";function n(t){for(const e in t)delete t[e]}function s(t){let e;for(e in t)return!1;return!e}i.d(e,{I:()=>n,p:()=>s})},613:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"}},3407:(t,e,i)=>{"use strict";i.d(e,{Ig:()=>f.I,MF:()=>n.A,hB:()=>D,O3:()=>L,bF:()=>w,Av:()=>P,wU:()=>H,RJ:()=>C,tI:()=>k,Rb:()=>F,Ad:()=>W,SD:()=>Y,Jt:()=>b,hO:()=>I,RG:()=>G,FO:()=>N,Tf:()=>U,R6:()=>R,WP:()=>O,te:()=>X,JR:()=>Z,vN:()=>V,pd:()=>z,DI:()=>j});var n=i(5286);const s=6378137,r=Math.PI*s,o=[-r,-r,r,r],a=[-180,-85,180,85],l=s*Math.log(Math.tan(Math.PI/2));class h extends n.A{constructor(t){super({code:t,units:"m",extent:o,global:!0,worldExtent:a,getPointResolution:function(t,e){return t/Math.cosh(e[1]/s)}})}}const c=[new h("EPSG:3857"),new h("EPSG:102100"),new h("EPSG:102113"),new h("EPSG:900913"),new h("http://www.opengis.net/def/crs/EPSG/0/3857"),new h("http://www.opengis.net/gml/srs/epsg.xml#3857")];const u=[-180,-90,180,90],d=6378137*Math.PI/180;class g extends n.A{constructor(t,e){super({code:t,units:"degrees",extent:u,axisOrientation:e,global:!0,metersPerUnit:d,worldExtent:u})}}const _=[new g("CRS:84"),new g("EPSG:4326","neu"),new g("urn:ogc:def:crs:OGC:1.3:CRS84"),new g("urn:ogc:def:crs:OGC:2:84"),new g("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new g("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new g("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];var f=i(8100);let p={};var m=i(3158),x=i(915),v=i(1597),y=i(6933),E=i(2490),T=i(4422);let A=!0;function C(t){A=!(void 0===t||t)}function S(t,e){if(void 0!==e)for(let i=0,n=t.length;i=o?e[r+t]:s[t]}return i}}function D(t,e,i,n){const s=b(t),r=b(e);(0,m.WQ)(s,r,M(i)),(0,m.WQ)(r,s,M(n))}function F(t,e){return C(),z(t,"EPSG:4326",void 0!==e?e:"EPSG:3857")}function O(t,e){const i=z(t,void 0!==e?e:"EPSG:3857","EPSG:4326"),n=i[0];return(n<-180||n>180)&&(i[0]=(0,v.xP)(n+180,360)-180),i}function k(t,e){if(t===e)return!0;const i=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||N(t,e)===S)&&i}function N(t,e){const i=t.getCode(),n=e.getCode();let s=(0,m.Jt)(i,n);return s||(s=R),s}function G(t,e){return N(b(t),b(e))}function z(t,e,i){return G(e,i)(t,void 0,t.length)}function j(t,e,i,n){const s=G(e,i);return(0,x.NW)(t,s,void 0,n)}let B=null;function U(){return B}function X(t,e){return B?z(t,e,B):t}function W(t,e){return B?z(t,B,e):(A&&!(0,y.aI)(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(A=!1,(0,T.R8)("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t)}function Z(t,e){return B?j(t,e,B):t}function Y(t,e){return B?j(t,B,e):t}function V(t,e){if(!B)return t;const i=b(e).getMetersPerUnit(),n=B.getMetersPerUnit();return i&&n?t*i/n:t}function H(t,e,i){return function(n){let s,r;if(t.canWrapX()){const e=t.getExtent(),o=(0,x.RG)(e);n=n.slice(0),r=(0,y.U$)(n,t,o),r&&(n[0]=n[0]-r*o),n[0]=(0,v.qE)(n[0],e[0],e[2]),n[1]=(0,v.qE)(n[1],e[1],e[3]),s=i(n)}else s=i(n);return r&&e.canWrapX()&&(s[0]+=r*(0,x.RG)(e.getExtent())),s}}var q,K,$;L(c),L(_),q=c,K=function(t,e,i){const n=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(n));for(let o=0;ol?i=l:i<-l&&(i=-l),e[o+1]=i}return e},$=function(t,e,i){const n=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(n));for(let o=0;o{"use strict";i.d(e,{A:()=>s});var n=i(8100);const s=class{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||n.I[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}}},8100:(t,e,i)=>{"use strict";i.d(e,{I:()=>r,q:()=>s});const n={9001:"m",9002:"ft",9003:"us-ft",9101:"radians",9102:"degrees"};function s(t){return n[t]}const r={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937}},3158:(t,e,i)=>{"use strict";i.d(e,{Jt:()=>r,WQ:()=>s});let n={};function s(t,e,i){const s=t.getCode(),r=e.getCode();s in n||(n[s]={}),n[s][r]=i}function r(t,e){let i;return t in n&&e in n[t]&&(i=n[t][e]),i}},7331:(t,e,i)=>{"use strict";i.d(e,{r2:()=>a});var n=i(2236),s=i(9703),r=i(3608),o=i(3407);function a(t){if(!(t.context instanceof CanvasRenderingContext2D))throw new Error("Only works for render events from Canvas 2D layers");const e=t.inversePixelTransform[0],i=t.inversePixelTransform[1],a=Math.sqrt(e*e+i*i),l=t.frameState,h=(0,s.lw)(t.inversePixelTransform.slice(),l.coordinateToPixelTransform),c=(0,r.j)(l.viewState.resolution,a);let u;const d=(0,o.Tf)();return d&&(u=(0,o.FO)(d,l.viewState.projection)),new n.A(t.context,a,l.extent,h,l.viewState.rotation,c,u)}},9960:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});var n=i(1685);class s extends n.Ay{constructor(t,e,i,n){super(t),this.inversePixelTransform=e,this.frameState=i,this.context=n}}const r=s},3984:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"}},4778:(t,e,i)=>{"use strict";i.d(e,{Ay:()=>p});var n=i(9703),s=i(915),r=i(3671),o=i(6514),a=i(2616),l=i(3407),h=i(3402),c=i(9969),u=i(4049),d=i(4238),g=i(7622);const _=(0,n.vt)();class f{constructor(t,e,i,n,s,r){this.styleFunction,this.extent_,this.id_=r,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=i||null,this.properties_=s,this.squaredTolerance_,this.stride_=n,this.simplifiedGeometry_}get(t){return this.properties_[t]}getExtent(){return this.extent_||(this.extent_="Point"===this.type_?(0,s.dP)(this.flatCoordinates_):(0,s.Vy)(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const t=(0,s.q1)(this.getExtent());this.flatInteriorPoints_=(0,a.J)(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const t=(0,h.yJ)(this.flatCoordinates_,this.ends_),e=(0,u.C)(this.flatCoordinates_,0,t,2);this.flatInteriorPoints_=(0,a.p)(this.flatCoordinates_,0,t,2,e)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=(0,c.SH)(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const t=this.flatCoordinates_;let e=0;const i=this.ends_;for(let n=0,s=i.length;n{if(t===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),e&&this.simplifiedGeometry_.applyTransform(e);const i=this.simplifiedGeometry_.getFlatCoordinates();let n;switch(this.type_){case"LineString":i.length=(0,r.P4)(i,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,t,i,0),n=[i.length];break;case"MultiLineString":n=[],i.length=(0,r.AL)(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,t,i,0,n);break;case"Polygon":n=[],i.length=(0,r.Hg)(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(t),i,0,n)}return n&&(this.simplifiedGeometry_=new f(this.type_,i,n,2,this.properties_,this.id_)),this.squaredTolerance_=t,this.simplifiedGeometry_})),this}}f.prototype.getFlatCoordinates=f.prototype.getOrientedFlatCoordinates;const p=f},2826:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n=class{drawCustom(t,e,i,n,s){}drawGeometry(t){}setStyle(t){}drawCircle(t,e,i){}drawFeature(t,e,i){}drawGeometryCollection(t,e,i){}drawLineString(t,e,i){}drawMultiLineString(t,e,i){}drawMultiPoint(t,e,i){}drawMultiPolygon(t,e,i){}drawPoint(t,e,i){}drawPolygon(t,e,i){}drawText(t,e,i){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}}},8774:(t,e,i)=>{"use strict";i.d(e,{Jw:()=>L,M8:()=>m,MY:()=>p,NT:()=>f,Oq:()=>u,TA:()=>b,Tq:()=>x,ZV:()=>l,_K:()=>g,_m:()=>c,aq:()=>v,eL:()=>_,fZ:()=>C,jT:()=>I,qY:()=>h,vk:()=>d,yY:()=>y});var n=i(4120),s=i(7771),r=i(3530),o=i(8711),a=i(5176);const l="10px sans-serif",h="#000",c="round",u=[],d=0,g="round",_=10,f="#000",p="center",m="middle",x=[0,0,0,0],v=1,y=new n.A;let E,T=null;const A={},C=function(){const t="32px ",e=["monospace","serif"],i=e.length,n="wmytzilWMYTZIL@#/&?$%10";let s,o;function l(s,r,a){let l=!0;for(let h=0;hMath.max(e,w(t,i))),0);return i[e]=n,n}function I(t,e){const i=[],n=[],s=[];let r=0,o=0,a=0,l=0;for(let h=0,c=e.length;h<=c;h+=2){const u=e[h];if("\n"===u||h===c){r=Math.max(r,o),s.push(o),o=0,a+=l,l=0;continue}const d=e[h+1]||t.font,g=w(d,u);i.push(g),o+=g;const _=S(d);n.push(_),l=Math.max(l,_)}return{width:r,height:a,widths:i,heights:n,lineWidths:s}}function L(t,e,i,n,s,r,o,a,l,h,c){t.save(),1!==i&&(void 0===t.globalAlpha?t.globalAlpha=t=>t.globalAlpha*=i:t.globalAlpha*=i),e&&t.transform.apply(t,e),n.contextInstructions?(t.translate(l,h),t.scale(c[0],c[1]),function(t,e){const i=t.contextInstructions;for(let t=0,n=i.length;t{"use strict";i.d(e,{A:()=>d});var n=i(6429),s=i(1580),r=i(2826),o=i(7295),a=i(915),l=i(8774),h=i(6514),c=i(6361);class u extends r.A{constructor(t,e,i,n){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=n,this.maxLineWidth=0,this.resolution=i,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){const e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))}appendFlatPointCoordinates(t,e){const i=this.getBufferedMaxExtent(),n=this.tmpCoordinate_,s=this.coordinates;let r=s.length;for(let o=0,l=t.length;ol&&(this.instructions.push([n.Ay.CUSTOM,l,u,t,i,c.n2,r]),this.hitDetectionInstructions.push([n.Ay.CUSTOM,l,u,t,s||i,c.n2,r]));break;case"Point":h=t.getFlatCoordinates(),this.coordinates.push(h[0],h[1]),u=this.coordinates.length,this.instructions.push([n.Ay.CUSTOM,l,u,t,i,void 0,r]),this.hitDetectionInstructions.push([n.Ay.CUSTOM,l,u,t,s||i,void 0,r])}this.endGeometry(e)}beginGeometry(t,e,i){this.beginGeometryInstruction1_=[n.Ay.BEGIN_GEOMETRY,e,0,t,i],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[n.Ay.BEGIN_GEOMETRY,e,0,t,i],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;let e;t.reverse();const i=t.length;let s,r,o=-1;for(e=0;ethis.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0}createFill(t){const e=t.fillStyle,i=[n.Ay.SET_FILL_STYLE,e];return"string"!=typeof e&&i.push(t.fillPatternScale),i}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[n.Ay.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)}updateStrokeStyle(t,e){const i=t.strokeStyle,n=t.lineCap,s=t.lineDash,r=t.lineDashOffset,o=t.lineJoin,a=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||s!=t.currentLineDash&&!(0,h.aI)(t.currentLineDash,s)||t.currentLineDashOffset!=r||t.currentLineJoin!=o||t.currentLineWidth!=a||t.currentMiterLimit!=l)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=s,t.currentLineDashOffset=r,t.currentLineJoin=o,t.currentLineWidth=a,t.currentMiterLimit=l)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[n.Ay.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=(0,a.o8)(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;(0,a.r)(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}const d=u},136:(t,e,i)=>{"use strict";i.d(e,{A:()=>p});var n=i(8130),s=i(6429),r=i(915);class o extends n.A{constructor(t,e,i,n){super(t,e,i,n),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e,i){if(!this.image_||this.maxExtent&&!(0,r.Ym)(this.maxExtent,t.getFlatCoordinates()))return;this.beginGeometry(t,e,i);const n=t.getFlatCoordinates(),o=t.getStride(),a=this.coordinates.length,l=this.appendFlatPointCoordinates(n,o);this.instructions.push([s.Ay.DRAW_IMAGE,a,l,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([s.Ay.DRAW_IMAGE,a,l,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e,i){if(!this.image_)return;this.beginGeometry(t,e,i);const n=t.getFlatCoordinates(),o=[];for(let e=0,i=n.length;e{"use strict";i.d(e,{y2:()=>R,$i:()=>w,x$:()=>b,Ay:()=>L});var n=i(6429),s=i(808),r=i(3624),o=i(9703),a=i(915),l=i(8774),h=i(1597),c=i(7622);function u(t,e,i,n,s,r,o,a,l,u,d,g){let _=t[e],f=t[e+1],p=0,m=0,x=0,v=0;function y(){p=_,m=f,_=t[e+=n],f=t[e+1],v+=x,x=Math.sqrt((_-p)*(_-p)+(f-m)*(f-m))}do{y()}while(et[2]}else I=T>w;const L=Math.PI,P=[],M=C+n===e;let D;if(x=0,v=S,_=t[e=C],f=t[e+1],M){y(),D=Math.atan2(f-m,_-p),I&&(D+=D>0?-L:L);const t=(w+T)/2,e=(b+A)/2;return P[0]=[t,e,(R-r)/2,D,s],P}for(let t=0,c=(s=s.replace(/\n/g," ")).length;t0?-L:L),void 0!==D){let t=g-D;if(t+=t>L?-2*L:t<-L?2*L:0,Math.abs(t)>o)return null}D=g;const T=t;let A=0;for(;t0&&t.push("\n",""),t.push(e,""),t}const A=class{constructor(t,e,i,n,r){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignAndScaleFill_,this.instructions=n.instructions,this.coordinates=n.coordinates,this.coordinateCache_={},this.renderedTransform_=(0,o.vt)(),this.hitDetectionInstructions=n.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=n.fillStates||{},this.strokeStates=n.strokeStates||{},this.textStates=n.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=r?new s.A:null}getZIndexContext(){return this.zIndexContext_}createLabel(t,e,i,n){const s=t+e+i+n;if(this.labels_[s])return this.labels_[s];const o=n?this.strokeStates[n]:null,a=i?this.fillStates[i]:null,h=this.textStates[e],c=this.pixelRatio,u=[h.scale[0]*c,h.scale[1]*c],d=Array.isArray(t),g=h.justify?r.E[h.justify]:E(Array.isArray(t)?t[0]:t,h.textAlign||l.MY),_=n&&o.lineWidth?o.lineWidth:0,f=d?t:t.split("\n").reduce(T,[]),{width:p,height:m,widths:x,heights:v,lineWidths:y}=(0,l.jT)(h,f),A=p+_,C=[],S=(A+2)*u[0],R=(m+_)*u[1],w={width:S<0?Math.floor(S):Math.ceil(S),height:R<0?Math.floor(R):Math.ceil(R),contextInstructions:C};1==u[0]&&1==u[1]||C.push("scale",u),n&&(C.push("strokeStyle",o.strokeStyle),C.push("lineWidth",_),C.push("lineCap",o.lineCap),C.push("lineJoin",o.lineJoin),C.push("miterLimit",o.miterLimit),C.push("setLineDash",[o.lineDash]),C.push("lineDashOffset",o.lineDashOffset)),i&&C.push("fillStyle",a.fillStyle),C.push("textBaseline","middle"),C.push("textAlign","center");const b=.5-g;let I=g*A+b*_;const L=[],P=[];let M,D=0,F=0,O=0,k=0;for(let t=0,e=f.length;tt?t-c:s,R=r+u>e?e-u:r,w=y[3]+S*g[0]+y[1],b=y[0]+R*g[1]+y[2],I=A-y[3],L=C-y[0];let P;return(E||0!==d)&&(f[0]=I,x[0]=I,f[1]=L,p[1]=L,p[0]=I+w,m[0]=p[0],m[1]=L+b,x[1]=m[1]),0!==d?(P=(0,o.Zz)((0,o.vt)(),i,n,1,1,d,-i,-n),(0,o.Bb)(P,f),(0,o.Bb)(P,p),(0,o.Bb)(P,m),(0,o.Bb)(P,x),(0,a.N)(Math.min(f[0],p[0],m[0],x[0]),Math.min(f[1],p[1],m[1],x[1]),Math.max(f[0],p[0],m[0],x[0]),Math.max(f[1],p[1],m[1],x[1]),_)):(0,a.N)(Math.min(I,I+w),Math.min(L,L+b),Math.max(I,I+w),Math.max(L,L+b),_),v&&(A=Math.round(A),C=Math.round(C)),{drawImageX:A,drawImageY:C,drawImageW:S,drawImageH:R,originX:c,originY:u,declutterBox:{minX:_[0],minY:_[1],maxX:_[2],maxY:_[3],value:T},canvasTransform:P,scale:g}}replayImageOrLabel_(t,e,i,n,s,r,o){const a=!(!r&&!o),h=n.declutterBox,c=o?o[2]*n.scale[0]/2:0;return h.minX-c<=e[0]&&h.maxX+c>=0&&h.minY-c<=e[1]&&h.maxY+c>=0&&(a&&this.replayTextBackground_(t,f,p,m,x,r,o),(0,l.Jw)(t,n.canvasTransform,s,i,n.originX,n.originY,n.drawImageW,n.drawImageH,n.drawImageX,n.drawImageY,n.scale)),!0}fill_(t){const e=this.alignAndScaleFill_;if(e){const i=(0,o.Bb)(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;t.save(),t.translate(i[0]%n,i[1]%n),1!==e&&t.scale(e,e),t.rotate(this.viewRotation_)}t.fill(),e&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,i,n){const s=this.textStates[e],o=this.createLabel(t,e,n,i),a=this.strokeStates[i],h=this.pixelRatio,c=E(Array.isArray(t)?t[0]:t,s.textAlign||l.MY),u=r.E[s.textBaseline||l.M8],d=a&&a.lineWidth?a.lineWidth:0;return{label:o,anchorX:c*(o.width/h-2*s.scale[0])+2*(.5-c)*d,anchorY:u*o.height/h+2*(.5-u)*d}}execute_(t,e,i,s,r,h,_,f){const p=this.zIndexContext_;let m;this.pixelCoordinates_&&(0,d.aI)(i,this.renderedTransform_)?m=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),m=(0,c.Rc)(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),(0,o.k3)(this.renderedTransform_,i));let x=0;const y=s.length;let T,A,C,S,R,w,b,I,L,P,M,D,F,O=0,k=0,N=0,G=null,z=null;const j=this.coordinateCache_,B=this.viewRotation_,U=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,X={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:B},W=this.instructions!=s||this.overlaps?0:200;let Z,Y,V,H;for(;xW&&(this.fill_(t),k=0),N>W&&(t.stroke(),N=0),k||N||(t.beginPath(),R=NaN,w=NaN),++x;break;case n.Ay.CIRCLE:O=i[1];const s=m[O],o=m[O+1],c=m[O+2]-s,d=m[O+3]-o,y=Math.sqrt(c*c+d*d);t.moveTo(s+y,o),t.arc(s,o,y,0,2*Math.PI,!0),++x;break;case n.Ay.CLOSE_PATH:t.closePath(),++x;break;case n.Ay.CUSTOM:O=i[1],T=i[2];const q=i[3],K=i[4],$=i[5];X.geometry=q,X.feature=Z,x in j||(j[x]=[]);const J=j[x];$?$(m,O,T,2,J):(J[0]=m[O],J[1]=m[O+1],J.length=2),p&&(p.zIndex=i[6]),K(J,X),++x;break;case n.Ay.DRAW_IMAGE:O=i[1],T=i[2],L=i[3],A=i[4],C=i[5];let Q=i[6];const tt=i[7],et=i[8],it=i[9],nt=i[10];let st=i[11];const rt=i[12];let ot=i[13];S=i[14]||"declutter";const at=i[15];if(!L&&i.length>=20){P=i[19],M=i[20],D=i[21],F=i[22];const t=this.drawLabelWithPointPlacement_(P,M,D,F);L=t.label,i[3]=L;const e=i[23];A=(t.anchorX-e)*this.pixelRatio,i[4]=A;const n=i[24];C=(t.anchorY-n)*this.pixelRatio,i[5]=C,Q=L.height,i[6]=Q,ot=L.width,i[13]=ot}let lt,ht,ct,ut;i.length>25&&(lt=i[25]),i.length>17?(ht=i[16],ct=i[17],ut=i[18]):(ht=l.Tq,ct=!1,ut=!1),nt&&U?st+=B:nt||U||(st-=B);let dt=0;for(;O!w.includes(t))),I={},L=class{constructor(t,e,i,n,s,r,a){this.maxExtent_=t,this.overlaps_=n,this.pixelRatio_=i,this.resolution_=e,this.renderBuffer_=r,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=(0,o.vt)(),this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(s,a)}clip(t,e){const i=this.getClipCoords(e);t.beginPath(),t.moveTo(i[0],i[1]),t.lineTo(i[2],i[3]),t.lineTo(i[4],i[5]),t.lineTo(i[6],i[7]),t.clip()}createExecutors_(t,e){for(const i in t){let n=this.executorsByZIndex_[i];void 0===n&&(n={},this.executorsByZIndex_[i]=n);const s=t[i];for(const t in s){const i=s[t];n[t]=new A(this.resolution_,this.pixelRatio_,this.overlaps_,i,e)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const i=this.executorsByZIndex_[e];for(let e=0,n=t.length;ei)break;let a=n[o];a||(a=[],n[o]=a),a.push(4*((t+s)*e+(t+r))+3),s>0&&a.push(4*((t-s)*e+(t+r))+3),r>0&&(a.push(4*((t+s)*e+(t-r))+3),s>0&&a.push(4*((t-s)*e+(t-r))+3))}const s=[];for(let t=0,e=n.length;t0){if(!r||"none"===i||"Image"!==f&&"Text"!==f||r.includes(t)){const i=(_[a]-3)/4,r=n-i%l,o=n-(i/l|0),h=s(t,e,r*r+o*o);if(h)return h}u.clearRect(0,0,l,l);break}}const m=Object.keys(this.executorsByZIndex_).map(Number);let x,v,y,E,T;for(m.sort(d.V_),x=m.length-1;x>=0;--x){const t=m[x].toString();for(y=this.executorsByZIndex_[t],v=R.length-1;v>=0;--v)if(f=R[v],E=y[f],void 0!==E&&(T=E.executeHitDetection(u,h,i,p,g),T))return T}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const i=e[0],n=e[1],s=e[2],r=e[3],o=[i,n,i,r,s,r,s,n];return(0,c.Rc)(o,0,8,2,t,o),o}isEmpty(){return(0,S.p)(this.executorsByZIndex_)}execute(t,e,i,n,s,r,o){const a=Object.keys(this.executorsByZIndex_).map(Number);a.sort(d.V_),r=r||R;const l=R.length;let h,c,u,g,_;for(o&&a.reverse(),h=0,c=a.length;hd.execute(t,e,i,n,s,o))):d.execute(g,e,i,n,s,o),_&&g.restore(),r){r.offset();const t=a[h]*l+u;this.deferredZIndexContexts_[t]||(this.deferredZIndexContexts_[t]=[]),this.deferredZIndexContexts_[t].push(r)}}}}this.renderedContext_=t}getDeferredZIndexContexts(){return this.deferredZIndexContexts_}getRenderedContext(){return this.renderedContext_}renderDeferred(){const t=this.deferredZIndexContexts_,e=Object.keys(t).map(Number).sort(d.V_);for(let i=0,n=e.length;i{t.draw(this.renderedContext_),t.clear()})),t[e[i]].length=0}}},2236:(t,e,i)=>{"use strict";i.d(e,{A:()=>g});var n=i(2826),s=i(7295),r=i(9703),o=i(8774),a=i(6514),l=i(915),h=i(1597),c=i(7622),u=i(2096);class d extends n.A{constructor(t,e,i,n,s,o,a){super(),this.context_=t,this.pixelRatio_=e,this.extent_=i,this.transform_=n,this.transformRotation_=n?(0,h.Mg)(Math.atan2(n[1],n[0]),10):0,this.viewRotation_=s,this.squaredTolerance_=o,this.userTransform_=a,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=(0,r.vt)()}drawImages_(t,e,i,n){if(!this.image_)return;const s=(0,c.Rc)(t,e,i,n,this.transform_,this.pixelCoordinates_),o=this.context_,a=this.tmpLocalTransform_,l=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=l*this.imageOpacity_);let h=this.imageRotation_;0===this.transformRotation_&&(h-=this.viewRotation_),this.imageRotateWithView_&&(h+=this.viewRotation_);for(let t=0,e=s.length;tt*this.pixelRatio_)),lineDashOffset:(r||o.vk)*this.pixelRatio_,lineJoin:void 0!==a?a:o._K,lineWidth:(void 0!==l?l:o.aq)*this.pixelRatio_,miterLimit:void 0!==h?h:o.eL,strokeStyle:(0,s.F)(t||o.NT)}}else this.strokeState_=null}setImageStyle(t){let e;if(!t||!(e=t.getSize()))return void(this.image_=null);const i=t.getPixelRatio(this.pixelRatio_),n=t.getAnchor(),s=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=n[0]*i,this.imageAnchorY_=n[1]*i,this.imageHeight_=e[1]*i,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=s[0],this.imageOriginY_=s[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const r=t.getScaleArray();this.imageScale_=[r[0]*this.pixelRatio_/i,r[1]*this.pixelRatio_/i],this.imageWidth_=e[0]*i}setTextStyle(t){if(t){const e=t.getFill();if(e){const t=e.getColor();this.textFillState_={fillStyle:(0,s.F)(t||o.qY)}}else this.textFillState_=null;const i=t.getStroke();if(i){const t=i.getColor(),e=i.getLineCap(),n=i.getLineDash(),r=i.getLineDashOffset(),a=i.getLineJoin(),l=i.getWidth(),h=i.getMiterLimit();this.textStrokeState_={lineCap:void 0!==e?e:o._m,lineDash:n||o.Oq,lineDashOffset:r||o.vk,lineJoin:void 0!==a?a:o._K,lineWidth:void 0!==l?l:o.aq,miterLimit:void 0!==h?h:o.eL,strokeStyle:(0,s.F)(t||o.NT)}}else this.textStrokeState_=null;const n=t.getFont(),r=t.getOffsetX(),a=t.getOffsetY(),l=t.getRotateWithView(),h=t.getRotation(),c=t.getScaleArray(),u=t.getText(),d=t.getTextAlign(),g=t.getTextBaseline();this.textState_={font:void 0!==n?n:o.ZV,textAlign:void 0!==d?d:o.MY,textBaseline:void 0!==g?g:o.M8},this.text_=void 0!==u?Array.isArray(u)?u.reduce(((t,e,i)=>t+(i%2?" ":e)),""):u:"",this.textOffsetX_=void 0!==r?this.pixelRatio_*r:0,this.textOffsetY_=void 0!==a?this.pixelRatio_*a:0,this.textRotateWithView_=void 0!==l&&l,this.textRotation_=void 0!==h?h:0,this.textScale_=[this.pixelRatio_*c[0],this.pixelRatio_*c[1]]}else this.text_=""}}const g=d},6429:(t,e,i)=>{"use strict";i.d(e,{Ay:()=>l,I5:()=>s,VD:()=>r,kx:()=>a,th:()=>o});const n={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},s=[n.FILL],r=[n.STROKE],o=[n.BEGIN_PATH],a=[n.CLOSE_PATH],l=n},3624:(t,e,i)=>{"use strict";i.d(e,{E:()=>d,A:()=>_});var n=i(8130),s=i(6429),r=i(7295),o=i(8774),a=i(4087),l=i(915),h=i(1597);function c(t,e,i,n,s){const r=[];let o=i,a=0,l=e.slice(i,2);for(;a=t){const e=(t-a+d)/d,g=(0,h.Cc)(i,c,e),_=(0,h.Cc)(n,u,e);l.push(g,_),r.push(l),l=[g,_],a==t&&(o+=s),a=0}else if(a0&&r.push(l),r}function u(t,e,i,n,s){let r,o,a,l,h,c,u,d,g,_,f=i,p=i,m=0,x=0,v=i;for(o=i;ot&&(x>m&&(m=x,f=v,p=o),x=0,v=o-s)),a=l,u=g,d=_),h=i,c=n}return x+=l,x>m?[v,o]:[f,p]}const d={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class g extends n.A{constructor(t,e,i,n){super(t,e,i,n),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[o.qY]={fillStyle:o.qY},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e,i){const n=this.textFillState_,r=this.textStrokeState_,a=this.textState_;if(""===this.text_||!a||!n&&!r)return;const h=this.coordinates;let d=h.length;const g=t.getType();let _=null,f=t.getStride();if("line"!==a.placement||"LineString"!=g&&"MultiLineString"!=g&&"Polygon"!=g&&"MultiPolygon"!=g){let n=a.overflow?null:[];switch(g){case"Point":case"MultiPoint":_=t.getFlatCoordinates();break;case"LineString":_=t.getFlatMidpoint();break;case"Circle":_=t.getCenter();break;case"MultiLineString":_=t.getFlatMidpoints(),f=2;break;case"Polygon":_=t.getFlatInteriorPoint(),a.overflow||n.push(_[2]/this.resolution),f=3;break;case"MultiPolygon":const e=t.getFlatInteriorPoints();_=[];for(let t=0,i=e.length;t{const n=h[2*(t+i)]===_[i*f]&&h[2*(t+i)+1]===_[i*f+1];return n||--t,n}))}this.saveTextStates_(),(a.backgroundFill||a.backgroundStroke)&&(this.setFillStrokeStyle(a.backgroundFill,a.backgroundStroke),a.backgroundFill&&this.updateFillStyle(this.state,this.createFill),a.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e,i);let l=a.padding;if(l!=o.Tq&&(a.scale[0]<0||a.scale[1]<0)){let t=a.padding[0],e=a.padding[1],i=a.padding[2],n=a.padding[3];a.scale[0]<0&&(e=-e,n=-n),a.scale[1]<0&&(t=-t,i=-i),l=[t,e,i,n]}const c=this.pixelRatio;this.instructions.push([s.Ay.DRAW_IMAGE,d,r,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,l==o.Tq?o.Tq:l.map((function(t){return t*c})),!!a.backgroundFill,!!a.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,n]);const u=1/c,p=this.state.fillStyle;a.backgroundFill&&(this.state.fillStyle=o.qY,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([s.Ay.DRAW_IMAGE,d,r,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[u,u],NaN,this.declutterMode_,this.declutterImageWithText_,l,!!a.backgroundFill,!!a.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?o.qY:this.fillKey_,this.textOffsetX_,this.textOffsetY_,n]),a.backgroundFill&&(this.state.fillStyle=p,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(e)}else{if(!(0,l.HY)(this.maxExtent,t.getExtent()))return;let n;if(_=t.getFlatCoordinates(),"LineString"==g)n=[_.length];else if("MultiLineString"==g)n=t.getEnds();else if("Polygon"==g)n=t.getEnds().slice(0,1);else if("MultiPolygon"==g){const e=t.getEndss();n=[];for(let t=0,i=e.length;t{"use strict";i.d(e,{A:()=>s});var n=i(8711);const s=class{constructor(){this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy((0,n.lr)(),{get:(t,e)=>{if("function"==typeof(0,n.lr)()[e])return this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e),this.pushMethodArgs_},set:(t,e,i)=>(this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e,i),!0)})}pushMethodArgs_=(...t)=>(this.instructions_[this.zIndex+this.offset_].push(t),this);pushFunction(t){this.instructions_[this.zIndex+this.offset_].push(t)}getContext(){return this.context_}draw(t){this.instructions_.forEach((e=>{for(let i=0,n=e.length;i{"use strict";i.d(e,{F8:()=>d,_7:()=>u,tF:()=>c});var n=i(2236),s=i(9700),r=i(6514),o=i(1597),a=i(8711),l=i(3407),h=i(915);const c=.5;function u(t,e,i,o,u,d,g,_,f){const p=f?(0,l.JR)(u,f):u,m=t[0]*c,x=t[1]*c,v=(0,a.Y)(m,x);v.imageSmoothingEnabled=!1;const y=v.canvas,E=new n.A(v,c,u,null,g,_,f?(0,l.FO)((0,l.Tf)(),f):null),T=i.length,A=Math.floor(16777215/T),C={};for(let t=1;t<=T;++t){const e=i[t-1],n=e.getStyleFunction()||o;if(!n)continue;let r=n(e,d);if(!r)continue;Array.isArray(r)||(r=[r]);const l=(t*A).toString(16).padStart(7,"#00000");for(let t=0,i=r.length;t{"use strict";i.d(e,{A:()=>l});var n=i(6837),s=i(6141),r=i(1854),o=i(4087);class a extends r.A{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t}getFeatures(t){return(0,o.b0)()}getData(t){return null}prepareFrame(t){return(0,o.b0)()}renderFrame(t,e){return(0,o.b0)()}loadedTileCallback(t,e,i){t[e]||(t[e]={}),t[e][i.tileCoord.toString()]=i}createLoadedTileFinder(t,e,i){return(n,s)=>{const r=this.loadedTileCallback.bind(this,i,n);return t.forEachLoadedTile(e,n,s,r)}}forEachFeatureAtCoordinate(t,e,i,n,s){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;e.getState()!==s.A.LOADED&&e.getState()!==s.A.ERROR||this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=s.A.LOADED&&e!=s.A.ERROR&&t.addEventListener(n.A.CHANGE,this.boundHandleImageChange_),e==s.A.IDLE&&(t.load(),e=t.getState()),e==s.A.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&"ready"===t.getSourceState()&&t.changed()}renderDeferred(t){}disposeInternal(){delete this.layer_,super.disposeInternal()}}const l=a},6769:(t,e,i)=>{"use strict";i.d(e,{A:()=>f,B:()=>d});var n=i(5986),s=i(9960),r=i(3984),o=i(808),a=i(9703),l=i(3730),h=i(8711),c=i(6514),u=i(915);const d=[];let g=null;class _ extends n.A{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=(0,a.vt)(),this.pixelTransform=(0,a.vt)(),this.inversePixelTransform=(0,a.vt)(),this.context=null,this.deferredContext_=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,i){let n;g||(g=(0,h.Y)(1,1,void 0,{willReadFrequently:!0})),g.clearRect(0,0,1,1);try{g.drawImage(t,e,i,1,1,0,0,1,1),n=g.getImageData(0,0,1,1).data}catch(t){return g=null,null}return n}getBackground(t){let e=this.getLayer().getBackground();return"function"==typeof e&&(e=e(t.viewState.resolution)),e||void 0}useContainer(t,e,i){const n=this.getLayer().getClassName();let s,r;if(t&&t.className===n&&(!i||t&&t.style.backgroundColor&&(0,c.aI)((0,l._j)(t.style.backgroundColor),(0,l._j)(i)))){const e=t.firstElementChild;e instanceof HTMLCanvasElement&&(r=e.getContext("2d"))}if(r&&r.canvas.style.transform===e?(this.container=t,this.context=r,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){s=document.createElement("div"),s.className=n;let t=s.style;t.position="absolute",t.width="100%",t.height="100%",r=(0,h.Y)();const e=r.canvas;s.appendChild(e),t=e.style,t.position="absolute",t.left="0",t.transformOrigin="top left",this.container=s,this.context=r}this.containerReused||!i||this.container.style.backgroundColor||(this.container.style.backgroundColor=i)}clipUnrotated(t,e,i){const n=(0,u.Py)(i),s=(0,u.WU)(i),r=(0,u.k_)(i),o=(0,u.R)(i);(0,a.Bb)(e.coordinateToPixelTransform,n),(0,a.Bb)(e.coordinateToPixelTransform,s),(0,a.Bb)(e.coordinateToPixelTransform,r),(0,a.Bb)(e.coordinateToPixelTransform,o);const l=this.inversePixelTransform;(0,a.Bb)(l,n),(0,a.Bb)(l,s),(0,a.Bb)(l,r),(0,a.Bb)(l,o),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.clip()}prepareContainer(t,e){const i=t.extent,n=t.viewState.resolution,s=t.viewState.rotation,r=t.pixelRatio,o=Math.round((0,u.RG)(i)/n*r),l=Math.round((0,u.Oq)(i)/n*r);(0,a.Zz)(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/r,1/r,s,-o/2,-l/2),(0,a.T9)(this.inversePixelTransform,this.pixelTransform);const h=(0,a.dI)(this.pixelTransform);if(this.useContainer(e,h,this.getBackground(t)),!this.containerReused){const t=this.context.canvas;t.width!=o||t.height!=l?(t.width=o,t.height=l):this.context.clearRect(0,0,o,l),h!==t.style.transform&&(t.style.transform=h)}}dispatchRenderEvent_(t,e,i){const n=this.getLayer();if(n.hasListener(t)){const r=new s.A(t,this.inversePixelTransform,i,e);n.dispatchEvent(r)}}preRender(t,e){this.frameState=e,e.declutter||this.dispatchRenderEvent_(r.A.PRERENDER,t,e)}postRender(t,e){e.declutter||this.dispatchRenderEvent_(r.A.POSTRENDER,t,e)}renderDeferredInternal(t){}getRenderContext(t){return t.declutter&&!this.deferredContext_&&(this.deferredContext_=new o.A),t.declutter?this.deferredContext_.getContext():this.context}renderDeferred(t){t.declutter&&(this.dispatchRenderEvent_(r.A.PRERENDER,this.context,t),t.declutter&&this.deferredContext_&&(this.deferredContext_.draw(this.context),this.deferredContext_.clear()),this.renderDeferredInternal(t),this.dispatchRenderEvent_(r.A.POSTRENDER,this.context,t))}getRenderTransform(t,e,i,n,s,r,o){const l=s/2,h=r/2,c=n/e,u=-c,d=-t[0]+o,g=-t[1];return(0,a.Zz)(this.tempTransform,l,h,c,u,-i,d,g)}disposeInternal(){delete this.frameState,super.disposeInternal()}}const f=_},4029:(t,e,i)=>{"use strict";i.d(e,{A:()=>f});var n=i(6769),s=i(190),r=i(7404),o=i(1110),a=i(1078),l=i(9703),h=i(6514),c=i(915),u=i(3407),d=i(4087),g=i(4401);class _ extends n.A{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=(0,c.S5)(),this.tmpTileRange_=new o.A(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),i=t.getState(),n=e.getUseInterimTilesOnError();return i==a.A.LOADED||i==a.A.EMPTY||i==a.A.ERROR&&!n}getTile(t,e,i,n){const s=n.pixelRatio,r=n.viewState.projection,o=this.getLayer();let l=o.getSource().getTile(t,e,i,s,r);return l.getState()==a.A.ERROR&&o.getUseInterimTilesOnError()&&o.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(l)||(l=l.getInterimTile()),l}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),n=(0,l.Bb)(e.pixelToCoordinateTransform,t.slice()),o=i.getExtent();if(o&&!(0,c.Ym)(o,n))return null;const h=e.pixelRatio,u=e.viewState.projection,d=e.viewState,_=i.getRenderSource(),f=_.getTileGridForProjection(d.projection),p=_.getTilePixelRatio(e.pixelRatio);for(let t=f.getZForResolution(d.resolution);t>=f.getMinZoom();--t){const e=f.getTileCoordForCoordAndZ(n,t),i=_.getTile(t,e[1],e[2],h,u);if(!(i instanceof s.A||i instanceof r.A)||i instanceof r.A&&i.getState()===a.A.EMPTY)return null;if(i.getState()!==a.A.LOADED)continue;const o=f.getOrigin(t),l=(0,g.xq)(f.getTileSize(t)),c=f.getResolution(t),m=Math.floor(p*((n[0]-o[0])/c-e[1]*l[0])),x=Math.floor(p*((o[1]-n[1])/c-e[2]*l[1])),v=Math.round(p*_.getGutterForProjection(d.projection));return this.getImageData(i.getImage(),m+v,x+v)}return null}loadedTileCallback(t,e,i){return!!this.isDrawableTile(i)&&super.loadedTileCallback(t,e,i)}prepareFrame(t){return!!this.getLayer().getSource()}renderFrame(t,e){const i=t.layerStatesArray[t.layerIndex],n=t.viewState,s=n.projection,r=n.resolution,o=n.center,g=n.rotation,_=t.pixelRatio,f=this.getLayer(),p=f.getSource(),m=p.getRevision(),x=p.getTileGridForProjection(s),v=x.getZForResolution(r,p.zDirection),y=x.getResolution(v);let E=t.extent;const T=t.viewState.resolution,A=p.getTilePixelRatio(_);this.prepareContainer(t,e);const C=this.context.canvas.width,S=this.context.canvas.height,R=i.extent&&(0,u.SD)(i.extent,s);R&&(E=(0,c._N)(E,(0,u.SD)(i.extent,s)));const w=y*C/2/A,b=y*S/2/A,I=[o[0]-w,o[1]-b,o[0]+w,o[1]+b],L=x.getTileRangeForExtentAndZ(E,v),P={};P[v]={};const M=this.createLoadedTileFinder(p,s,P),D=this.tmpExtent,F=this.tmpTileRange_;this.newTiles_=!1;const O=g?(0,c.Yw)(n.center,T,g,t.size):void 0;for(let e=L.minX;e<=L.maxX;++e)for(let n=L.minY;n<=L.maxY;++n){if(g&&!x.tileCoordIntersectsViewport([v,e,n],O))continue;const s=this.getTile(v,e,n,t);if(this.isDrawableTile(s)){const e=(0,d.v6)(this);if(s.getState()==a.A.LOADED){P[v][s.tileCoord.toString()]=s;let t=s.inTransition(e);t&&1!==i.opacity&&(s.endTransition(e),t=!1),this.newTiles_||!t&&this.renderedTiles.includes(s)||(this.newTiles_=!0)}if(1===s.getAlpha(e,t.time))continue}const r=x.getTileCoordChildTileRange(s.tileCoord,F,D);let o=!1;r&&(o=M(v+1,r)),o||x.forEachTileCoordParentTileRange(s.tileCoord,M,F,D)}const k=y/r*_/A,N=this.getRenderContext(t);(0,l.Zz)(this.tempTransform,C/2,S/2,k,k,0,-C/2,-S/2),R&&this.clipUnrotated(N,t,R),p.getInterpolate()||(N.imageSmoothingEnabled=!1),this.preRender(N,t),this.renderedTiles.length=0;let G,z,j,B=Object.keys(P).map(Number);B.sort(h.V_),1!==i.opacity||this.containerReused&&!p.getOpaque(t.viewState.projection)?(G=[],z=[]):B=B.reverse();for(let e=B.length-1;e>=0;--e){const i=B[e],n=p.getTilePixelSize(i,_,s),r=x.getResolution(i)/y,o=n[0]*r*k,a=n[1]*r*k,h=x.getTileCoordForCoordAndZ((0,c.Py)(I),i),u=x.getTileCoordExtent(h),g=(0,l.Bb)(this.tempTransform,[A*(u[0]-I[0])/y,A*(I[3]-u[3])/y]),f=A*p.getGutterForProjection(s),m=P[i];for(const e in m){const n=m[e],s=n.tileCoord,r=h[1]-s[1],l=Math.round(g[0]-(r-1)*o),u=h[2]-s[2],_=Math.round(g[1]-(u-1)*a),x=Math.round(g[0]-r*o),y=Math.round(g[1]-u*a),E=l-x,T=_-y,A=v===i,C=A&&1!==n.getAlpha((0,d.v6)(this),t.time);let S=!1;if(!C)if(G){j=[x,y,x+E,y,x+E,y+T,x,y+T];for(let t=0,e=G.length;t{"use strict";i.d(e,{Eo:()=>a,gY:()=>h,j:()=>l,nl:()=>c});var n=i(6141),s=i(4087);const r=.5,o={Point:function(t,e,i,s,r,o){const a=i.getImage(),l=i.getText(),h=l&&l.getText(),c=o&&a&&h?{}:void 0;if(a){if(a.getImageState()!=n.A.LOADED)return;const o=t.getBuilder(i.getZIndex(),"Image");o.setImageStyle(a,c),o.drawPoint(e,s,r)}if(h){const n=t.getBuilder(i.getZIndex(),"Text");n.setTextStyle(l,c),n.drawText(e,s,r)}},LineString:function(t,e,i,n,s){const r=i.getStroke();if(r){const o=t.getBuilder(i.getZIndex(),"LineString");o.setFillStrokeStyle(null,r),o.drawLineString(e,n,s)}const o=i.getText();if(o&&o.getText()){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(o),r.drawText(e,n,s)}},Polygon:function(t,e,i,n,s){const r=i.getFill(),o=i.getStroke();if(r||o){const a=t.getBuilder(i.getZIndex(),"Polygon");a.setFillStrokeStyle(r,o),a.drawPolygon(e,n,s)}const a=i.getText();if(a&&a.getText()){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(a),r.drawText(e,n,s)}},MultiPoint:function(t,e,i,s,r,o){const a=i.getImage(),l=a&&0!==a.getOpacity(),h=i.getText(),c=h&&h.getText(),u=o&&l&&c?{}:void 0;if(l){if(a.getImageState()!=n.A.LOADED)return;const o=t.getBuilder(i.getZIndex(),"Image");o.setImageStyle(a,u),o.drawMultiPoint(e,s,r)}if(c){const n=t.getBuilder(i.getZIndex(),"Text");n.setTextStyle(h,u),n.drawText(e,s,r)}},MultiLineString:function(t,e,i,n,s){const r=i.getStroke();if(r){const o=t.getBuilder(i.getZIndex(),"LineString");o.setFillStrokeStyle(null,r),o.drawMultiLineString(e,n,s)}const o=i.getText();if(o&&o.getText()){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(o),r.drawText(e,n,s)}},MultiPolygon:function(t,e,i,n,s){const r=i.getFill(),o=i.getStroke();if(o||r){const a=t.getBuilder(i.getZIndex(),"Polygon");a.setFillStrokeStyle(r,o),a.drawMultiPolygon(e,n,s)}const a=i.getText();if(a&&a.getText()){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(a),r.drawText(e,n,s)}},GeometryCollection:function(t,e,i,n,s,r){const a=e.getGeometriesArray();let l,h;for(l=0,h=a.length;l0;return _&&Promise.all(c).then((()=>r(null))),function(t,e,i,n,s,r,a){const l=i.getGeometryFunction()(e);if(!l)return;const h=l.simplifyTransformed(n,s);i.getRenderer()?u(t,h,i,e,a):(0,o[h.getType()])(t,h,i,e,a,r)}(t,e,i,s,a,l,h),_}function u(t,e,i,n,s){if("GeometryCollection"!=e.getType())t.getBuilder(i.getZIndex(),"Default").drawCustom(e,n,i.getRenderer(),i.getHitDetectionRenderer(),s);else{const r=e.getGeometries();for(let e=0,o=r.length;e{"use strict";i.d(e,{A:()=>c});var n=i(5332),s=i(5986),r=i(9960),o=i(3984),a=i(9777),l=i(9703);class h extends s.A{constructor(t,e){super(t),e=e||{},this.inversePixelTransform_=(0,l.vt)(),this.pixelContext_=null,this.postProcesses_=e.postProcesses,this.uniforms_=e.uniforms,this.helper,t.addChangeListener(n.A.MAP,this.removeHelper.bind(this)),this.dispatchPreComposeEvent=this.dispatchPreComposeEvent.bind(this),this.dispatchPostComposeEvent=this.dispatchPostComposeEvent.bind(this)}dispatchPreComposeEvent(t,e){const i=this.getLayer();if(i.hasListener(o.A.PRECOMPOSE)){const n=new r.A(o.A.PRECOMPOSE,void 0,e,t);i.dispatchEvent(n)}}dispatchPostComposeEvent(t,e){const i=this.getLayer();if(i.hasListener(o.A.POSTCOMPOSE)){const n=new r.A(o.A.POSTCOMPOSE,void 0,e,t);i.dispatchEvent(n)}}reset(t){this.uniforms_=t.uniforms,this.helper&&this.helper.setUniforms(this.uniforms_)}removeHelper(){this.helper&&(this.helper.dispose(),delete this.helper)}prepareFrame(t){if(this.getLayer().getRenderSource()){let e,i=!0,n=-1;for(let s=0,r=t.layerStatesArray.length;s{"use strict";i.d(e,{eS:()=>j,gF:()=>z,Ay:()=>U});var n=i(8596),s=i(7404),r=i(1078),o=i(9332),a=i(6837),l=i(190),h=i(4087);class c extends o.A{constructor(t){super(),this.tile,this.handleTileChange_=this.handleTileChange_.bind(this),this.gutter_=t.gutter||0,this.helper_=t.helper,this.loaded=!1,this.ready=!1}setTile(t){if(t!==this.tile)if(this.tile&&this.tile.removeEventListener(a.A.CHANGE,this.handleTileChange_),this.tile=t,this.loaded=t.getState()===r.A.LOADED,this.loaded)this.uploadTile();else{if(t instanceof l.A){const e=t.getImage();e instanceof Image&&!e.crossOrigin&&(e.crossOrigin="anonymous")}t.addEventListener(a.A.CHANGE,this.handleTileChange_)}}uploadTile(){(0,h.b0)()}setReady(){this.ready=!0,this.dispatchEvent(a.A.CHANGE)}handleTileChange_(){this.tile.getState()===r.A.LOADED&&(this.loaded=!0,this.uploadTile())}disposeInternal(){this.tile.removeEventListener(a.A.CHANGE,this.handleTileChange_)}}const u=c;var d=i(7607),g=i(259),_=i(130),f=i(8711),p=i(4401);function m(t,e,i){const n=i?t.LINEAR:t.NEAREST;t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,n)}function x(t,e,i,n,s,r){const o=t.getGL();let a,l;i instanceof Float32Array?(a=o.FLOAT,t.getExtension("OES_texture_float"),l=null!==t.getExtension("OES_texture_float_linear")):(a=o.UNSIGNED_BYTE,l=!0),m(o,e,r&&l);const h=i.byteLength/n[1];let c,u=1;switch(h%8==0?u=8:h%4==0?u=4:h%2==0&&(u=2),s){case 1:c=o.LUMINANCE;break;case 2:c=o.LUMINANCE_ALPHA;break;case 3:c=o.RGB;break;case 4:c=o.RGBA;break;default:throw new Error(`Unsupported number of bands: ${s}`)}const d=o.getParameter(o.UNPACK_ALIGNMENT);o.pixelStorei(o.UNPACK_ALIGNMENT,u),o.texImage2D(o.TEXTURE_2D,0,c,n[0],n[1],0,c,a,i),o.pixelStorei(o.UNPACK_ALIGNMENT,d)}let v=null;const y=class extends u{constructor(t){super(t),this.textures=[],this.renderSize_=(0,p.xq)(t.grid.getTileSize(t.tile.tileCoord[0])),this.bandCount=NaN;const e=new g.Ay(_.H7,_.Ek);e.fromArray([0,1,1,1,1,0,0,0]),this.helper_.flushBufferData(e),this.coords=e,this.setTile(t.tile)}uploadTile(){const t=this.helper_,e=t.getGL(),i=this.tile;let n;this.textures.length=0,n=i instanceof l.A||i instanceof s.A?i.getImage():i.getData();const r=(0,d.xo)(n);if(r){const t=e.createTexture();return this.textures.push(t),this.bandCount=4,function(t,e,i,n){m(t,e,n),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,i)}(e,t,r,i.interpolate),void this.setReady()}n=(0,d.bL)(n);const o=i.getSize(),a=[o[0]+2*this.gutter_,o[1]+2*this.gutter_],h=n instanceof Float32Array,c=a[0]*a[1],u=h?Float32Array:Uint8Array,g=u.BYTES_PER_ELEMENT,_=n.byteLength/a[1];this.bandCount=Math.floor(_/g/a[0]);const f=Math.ceil(this.bandCount/4);if(1===f){const s=e.createTexture();return this.textures.push(s),x(t,s,n,a,this.bandCount,i.interpolate),void this.setReady()}const p=new Array(f);for(let t=0;t=p;--s){const i=c.getTileRangeForExtentAndZ(e,s,this.tempTileRange_),a=c.getResolution(s);for(let e=i.minX;e<=i.maxX;++e)for(let h=i.minY;h<=i.maxY;++h){const i=(0,S.N)(s,e,h,this.tempTileCoord_),f=O(l,i);let p,m;if(_.containsKey(f)&&(p=_.get(f),m=p.tile),p&&p.tile.key===l.getKey()||(m=l.getTile(s,e,h,t.pixelRatio,o.projection)),M(n,m))continue;if(p)if(this.isDrawableTile_(m))p.setTile(m);else{const t=m.getInterimTile();p.setTile(t)}else p=this.createTileRepresentation({tile:m,grid:c,helper:this.helper,gutter:u}),_.set(f,p);D(n,p,s);const x=m.getKey();g[x]=!0,m.getState()===r.A.IDLE&&(t.tileQueue.isKeyQueued(x)||t.tileQueue.enqueue([m,d,c.getTileCoordCenter(i),a]))}}}beforeTilesRender(t,e){this.helper.prepareDraw(this.frameState,!e,!0)}beforeTilesMaskRender(t){return!1}renderTile(t,e,i,n,s,r,o,a,l,h,c){}renderTileMask(t,e,i,n){}drawTile_(t,e,i,n,s,r,o){if(!e.ready)return;const a=e.tile.tileCoord,l=(0,S.i7)(a),h=l in r?r[l]:1,c=o.getResolution(i),u=(0,p.xq)(o.getTileSize(i),this.tempSize_),d=o.getOrigin(i),g=o.getTileCoordExtent(a),_=h<1?-1:P(i);h<1&&(t.animate=!0);const f=t.viewState,m=f.center[0],x=f.center[1],v=u[0]+2*n,y=u[1]+2*n,E=v/y,T=(m-d[0])/(u[0]*c),A=(d[1]-x)/(u[1]*c),C=f.resolution/c,w=a[1],b=a[2];(0,R.cL)(this.tileTransform_),(0,R.hs)(this.tileTransform_,2/(t.size[0]*C/v),-2/(t.size[1]*C/v)),(0,R.e$)(this.tileTransform_,f.rotation),(0,R.hs)(this.tileTransform_,1,1/E),(0,R.Tl)(this.tileTransform_,(u[0]*(w-T)-n)/v,(u[1]*(b-A)-n)/y),this.renderTile(e,this.tileTransform_,t,s,c,u,d,g,_,n,h)}renderFrame(t){this.frameState=t,this.renderComplete=!0;const e=this.helper.getGL();this.preRender(e,t);const i=t.viewState,o=this.getLayer(),a=o.getRenderSource(),l=a.getTileGridForProjection(i.projection),c=a.getGutterForProjection(i.projection),u=F(t,t.extent),d=l.getZForResolution(i.resolution,a.zDirection),g={tileIds:new Set,representationsByZ:{}},_=o.getPreload();if(t.nextExtent){const e=l.getZForResolution(i.nextResolution,a.zDirection),n=F(t,t.nextExtent);this.enqueueTiles(t,n,e,g,_)}this.enqueueTiles(t,u,d,g,0),_>0&&setTimeout((()=>{this.enqueueTiles(t,u,d-1,g,_-1)}),0);const f={},p=(0,h.v6)(this),m=t.time;let x=!1;for(const t of g.representationsByZ[d]){const e=t.tile;if((e instanceof s.A||e instanceof n.A)&&e.getState()===r.A.EMPTY)continue;const i=e.tileCoord;if(t.ready){const t=e.getAlpha(p,m);if(1===t){e.endTransition(p);continue}x=!0,f[(0,S.i7)(i)]=t}if(this.renderComplete=!1,this.findAltTiles_(l,i,d+1,g))continue;const o=l.getMinZoom();for(let t=d-1;t>=o&&!this.findAltTiles_(l,i,t,g);--t);}const v=g.representationsByZ,y=Object.keys(v).map(Number).sort(w.rG);if(this.beforeTilesMaskRender(t))for(let t=0,e=y.length;tt.dispose())),t.clear()}removeHelper(){this.helper&&this.clearCache(),super.removeHelper()}disposeInternal(){super.disposeInternal(),delete this.frameState}}const N=k;var G=i(9777);const z={TILE_TRANSFORM:"u_tileTransform",TRANSITION_ALPHA:"u_transitionAlpha",DEPTH:"u_depth",RENDER_EXTENT:"u_renderExtent",PATTERN_ORIGIN:"u_patternOrigin",RESOLUTION:"u_resolution",ZOOM:"u_zoom",GLOBAL_ALPHA:"u_globalAlpha",PROJECTION_MATRIX:"u_projectionMatrix",SCREEN_TO_WORLD_MATRIX:"u_screenToWorldMatrix",TILE_TEXTURE_ARRAY:"u_tileTextures",TEXTURE_PIXEL_WIDTH:"u_texturePixelWidth",TEXTURE_PIXEL_HEIGHT:"u_texturePixelHeight",TEXTURE_RESOLUTION:"u_textureResolution",TEXTURE_ORIGIN_X:"u_textureOriginX",TEXTURE_ORIGIN_Y:"u_textureOriginY"},j={TEXTURE_COORD:"a_textureCoord"},B=[{name:j.TEXTURE_COORD,size:2,type:G.jQ.FLOAT}],U=class extends N{constructor(t,e){super(t,e),this.program_,this.vertexShader_=e.vertexShader,this.fragmentShader_=e.fragmentShader,this.indices_=new g.Ay(_.IP,_.Ek),this.indices_.fromArray([0,1,3,1,2,3]),this.paletteTextures_=e.paletteTextures||[]}reset(t){if(super.reset(t),this.helper){const t=this.helper.getGL();for(const e of this.paletteTextures_)e.delete(t)}this.vertexShader_=t.vertexShader,this.fragmentShader_=t.fragmentShader,this.paletteTextures_=t.paletteTextures||[],this.helper&&(this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_))}afterHelperCreated(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.helper.flushBufferData(this.indices_)}removeHelper(){if(this.helper){const t=this.helper.getGL();for(const e of this.paletteTextures_)e.delete(t)}super.removeHelper()}createTileRepresentation(t){return new y(t)}beforeTilesRender(t,e){super.beforeTilesRender(t,e),this.helper.useProgram(this.program_,t)}renderTile(t,e,i,n,s,r,o,a,l,h,c){const u=this.helper.getGL();this.helper.bindBuffer(t.coords),this.helper.bindBuffer(this.indices_),this.helper.enableAttributes(B);let d=0;for(;d0&&(v=a,(0,I._N)(v,n,v)),this.helper.setUniformFloatVec4(z.RENDER_EXTENT,v),this.helper.setUniformFloatValue(z.RESOLUTION,g.resolution),this.helper.setUniformFloatValue(z.ZOOM,g.zoom),this.helper.setUniformFloatValue(z.TEXTURE_PIXEL_WIDTH,_),this.helper.setUniformFloatValue(z.TEXTURE_PIXEL_HEIGHT,f),this.helper.setUniformFloatValue(z.TEXTURE_RESOLUTION,s),this.helper.setUniformFloatValue(z.TEXTURE_ORIGIN_X,o[0]+m*r[0]*s-h*s),this.helper.setUniformFloatValue(z.TEXTURE_ORIGIN_Y,o[1]-x*r[1]*s+h*s),this.helper.drawElements(0,this.indices_.getSize())}getData(t){if(!this.helper.getGL())return null;const e=this.frameState;if(!e)return null;const i=this.getLayer(),o=(0,R.Bb)(e.pixelToCoordinateTransform,t.slice()),a=e.viewState,l=i.getExtent();if(l&&!(0,I.Ym)((0,b.SD)(l,a.projection),o))return null;const h=i.getSources((0,I.Tr)([o]),a.resolution);let c,u,d;for(c=h.length-1;c>=0;--c)if(u=h[c],"ready"===u.getState()){if(d=u.getTileGridForProjection(a.projection),u.getWrapX())break;const t=d.getExtent();if(!t||(0,I.Ym)(t,o))break}if(c<0)return null;const g=this.tileRepresentationCache;for(let t=d.getZForResolution(a.resolution);t>=d.getMinZoom();--t){const e=d.getTileCoordForCoordAndZ(o,t),i=O(u,e);if(!g.containsKey(i))continue;const a=g.get(i),l=a.tile;if((l instanceof s.A||l instanceof n.A)&&l.getState()===r.A.EMPTY)return null;if(!a.loaded)continue;const h=d.getOrigin(t),c=(0,p.xq)(d.getTileSize(t)),_=d.getResolution(t),f=(o[0]-h[0])/_-e[1]*c[0],m=(h[1]-o[1])/_-e[2]*c[1];return a.getPixelData(f,m)}return null}disposeInternal(){const t=this.helper;if(t){const e=t.getGL();for(const t of this.paletteTextures_)t.delete(e);this.paletteTextures_.length=0,e.deleteProgram(this.program_),delete this.program_,t.deleteBuffer(this.indices_)}super.disposeInternal(),delete this.indices_}}},3513:(t,e,i)=>{"use strict";i.d(e,{BV:()=>l,KQ:()=>u,XX:()=>g,aY:()=>d});var n=i(915),s=i(8711),r=i(3407),o=i(1597);let a;const l=[];function h(t,e,i,n,s){t.beginPath(),t.moveTo(0,0),t.lineTo(e,i),t.lineTo(n,s),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,n)+1,Math.max(i,s)),t.restore()}function c(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function u(t,e,i,s){const o=(0,r.pd)(i,e,t);let a=(0,r.hO)(e,s,i);const l=e.getMetersPerUnit();void 0!==l&&(a*=l);const h=t.getMetersPerUnit();void 0!==h&&(a/=h);const c=t.getExtent();if(!c||(0,n.Ym)(c,o)){const e=(0,r.hO)(t,a,o)/a;isFinite(e)&&e>0&&(a/=e)}return a}function d(t,e,i,s){const r=(0,n.q1)(i);let o=u(t,e,r,s);return(!isFinite(o)||o<=0)&&(0,n.sB)(i,(function(i){return o=u(t,e,i,s),isFinite(o)&&o>0})),o}function g(t,e,i,r,u,d,g,_,f,p,m,x,v,y){const E=(0,s.Y)(Math.round(i*t),Math.round(i*e),l);if(x||(E.imageSmoothingEnabled=!1),0===f.length)return E.canvas;function T(t){return Math.round(t*i)/i}E.scale(i,i),E.globalCompositeOperation="lighter";const A=(0,n.S5)();let C;f.forEach((function(t,e,i){(0,n.X$)(A,t.extent)}));const S=i/r,R=(x?1:1+Math.pow(2,-24))/S;if(!v||1!==f.length||0!==p){if(C=(0,s.Y)(Math.round((0,n.RG)(A)*S),Math.round((0,n.Oq)(A)*S),l),x||(C.imageSmoothingEnabled=!1),u&&y){const t=(u[0]-A[0])*S,e=-(u[3]-A[3])*S,i=(0,n.RG)(u)*S,s=(0,n.Oq)(u)*S;C.rect(t,e,i,s),C.clip()}f.forEach((function(t,e,i){if(t.image.width>0&&t.image.height>0){if(t.clipExtent){C.save();const e=(t.clipExtent[0]-A[0])*S,i=-(t.clipExtent[3]-A[3])*S,s=(0,n.RG)(t.clipExtent)*S,r=(0,n.Oq)(t.clipExtent)*S;C.rect(x?e:Math.round(e),x?i:Math.round(i),x?s:Math.round(e+s)-Math.round(e),x?r:Math.round(i+r)-Math.round(i)),C.clip()}const e=(t.extent[0]-A[0])*S,i=-(t.extent[3]-A[3])*S,s=(0,n.RG)(t.extent)*S,r=(0,n.Oq)(t.extent)*S;C.drawImage(t.image,p,p,t.image.width-2*p,t.image.height-2*p,x?e:Math.round(e),x?i:Math.round(i),x?s:Math.round(e+s)-Math.round(e),x?r:Math.round(i+r)-Math.round(i)),t.clipExtent&&C.restore()}}))}const w=(0,n.Py)(g);return _.getTriangles().forEach((function(t,e,i){const r=t.source,u=t.target;let g=r[0][0],_=r[0][1],p=r[1][0],m=r[1][1],v=r[2][0],y=r[2][1];const S=T((u[0][0]-w[0])/d),b=T(-(u[0][1]-w[1])/d),I=T((u[1][0]-w[0])/d),L=T(-(u[1][1]-w[1])/d),P=T((u[2][0]-w[0])/d),M=T(-(u[2][1]-w[1])/d),D=g,F=_;g=0,_=0,p-=D,m-=F,v-=D,y-=F;const O=[[p,m,0,0,I-S],[v,y,0,0,P-S],[0,0,p,m,L-b],[0,0,v,y,M-b]],k=(0,o.KU)(O);if(!k)return;if(E.save(),E.beginPath(),function(){if(void 0===a){const t=(0,s.Y)(6,6,l);t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",h(t,4,5,4,0),h(t,4,5,0,5);const e=t.getImageData(0,0,3,3).data;a=c(e,0)||c(e,4)||c(e,8),(0,s.Yg)(t),l.push(t.canvas)}return a}()||!x){E.moveTo(I,L);const t=4,e=S-I,i=b-L;for(let n=0;n{"use strict";i.d(e,{A:()=>_});var n=i(3101),s=i(7607),r=i(6837),o=i(1078),a=i(2913),l=i(3513),h=i(1597),c=i(8711),u=i(915),d=i(9438);class g extends s.Ay{constructor(t){super({tileCoord:t.tileCoord,loader:()=>Promise.resolve(new Uint8Array(4)),interpolate:t.interpolate,transition:t.transition}),this.pixelRatio_=t.pixelRatio,this.gutter_=t.gutter,this.reprojData_=null,this.reprojError_=null,this.reprojSize_=void 0,this.sourceTileGrid_=t.sourceTileGrid,this.targetTileGrid_=t.targetTileGrid,this.wrappedTileCoord_=t.wrappedTileCoord||t.tileCoord,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const e=t.sourceProj,i=e.getExtent(),s=t.sourceTileGrid.getExtent();this.clipExtent_=e.canWrapX()?s?(0,u._N)(i,s):i:s;const r=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_),c=this.targetTileGrid_.getExtent();let d=this.sourceTileGrid_.getExtent();const g=c?(0,u._N)(r,c):r;if(0===(0,u.UG)(g))return void(this.state=o.A.EMPTY);i&&(d=d?(0,u._N)(d,i):i);const _=this.targetTileGrid_.getResolution(this.wrappedTileCoord_[0]),f=t.targetProj,p=(0,l.aY)(e,f,g,_);if(!isFinite(p)||p<=0)return void(this.state=o.A.EMPTY);const m=void 0!==t.errorThreshold?t.errorThreshold:n.l;if(this.triangulation_=new a.A(e,f,g,d,p*m,_),0===this.triangulation_.getTriangles().length)return void(this.state=o.A.EMPTY);this.sourceZ_=this.sourceTileGrid_.getZForResolution(p);let x=this.triangulation_.calculateSourceExtent();if(d&&(e.canWrapX()?(x[1]=(0,h.qE)(x[1],d[1],d[3]),x[3]=(0,h.qE)(x[3],d[1],d[3])):x=(0,u._N)(x,d)),(0,u.UG)(x)){let n=0,s=0;e.canWrapX()&&(n=(0,u.RG)(i),s=Math.floor((x[0]-i[0])/n)),(0,u.QJ)(x.slice(),e,!0).forEach((e=>{const i=this.sourceTileGrid_.getTileRangeForExtentAndZ(e,this.sourceZ_),r=t.getTileFunction;for(let t=i.minX;t<=i.maxX;t++)for(let e=i.minY;e<=i.maxY;e++){const i=r(this.sourceZ_,t,e,this.pixelRatio_);if(i){const t=s*n;this.sourceTiles_.push({tile:i,offset:t})}}++s})),0===this.sourceTiles_.length&&(this.state=o.A.EMPTY)}else this.state=o.A.EMPTY}getSize(){return this.reprojSize_}getData(){return this.reprojData_}getError(){return this.reprojError_}reproject_(){const t=[];if(this.sourceTiles_.forEach((e=>{const i=e.tile;if(!i||i.getState()!==o.A.LOADED)return;const n=i.getSize(),r=this.gutter_;let a;a=(0,s.bL)(i.getData())||(0,s.$r)((0,s.xo)(i.getData()));const l=[n[0]+2*r,n[1]+2*r],h=a instanceof Float32Array,c=l[0]*l[1],u=h?Float32Array:Uint8Array,d=new u(a.buffer),g=u.BYTES_PER_ELEMENT,_=g*d.length/c,f=d.byteLength/l[1],p=Math.floor(f/g/l[0]),m=c*p;let x=d;if(d.length!==m){x=new u(m);let t=0,e=0;const i=l[0]*p;for(let n=0;n=0;--e){const i=[];for(let n=0,s=t.length;n{const i=e.getState();if(i!==o.A.IDLE&&i!==o.A.LOADING)return;t++;const n=(0,d.KT)(e,r.A.CHANGE,(function(){const i=e.getState();i!=o.A.LOADED&&i!=o.A.ERROR&&i!=o.A.EMPTY||((0,d.JH)(n),t--,0===t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(n)})),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function({tile:t}){t.getState()==o.A.IDLE&&t.load()}))}unlistenSources_(){this.sourcesListenerKeys_.forEach(d.JH),this.sourcesListenerKeys_=null}}const _=g},7404:(t,e,i)=>{"use strict";i.d(e,{A:()=>_});var n=i(3101),s=i(6837),r=i(8143),o=i(1078),a=i(2913),l=i(3513),h=i(1597),c=i(915),u=i(9438),d=i(8711);class g extends r.A{constructor(t,e,i,s,r,u,d,g,_,f,p,m){super(r,o.A.IDLE,m),this.renderEdges_=void 0!==p&&p,this.pixelRatio_=d,this.gutter_=g,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=s,this.wrappedTileCoord_=u||r,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0,this.clipExtent_=t.canWrapX()?t.getExtent():void 0;const x=s.getTileCoordExtent(this.wrappedTileCoord_),v=this.targetTileGrid_.getExtent();let y=this.sourceTileGrid_.getExtent();const E=v?(0,c._N)(x,v):x;if(0===(0,c.UG)(E))return void(this.state=o.A.EMPTY);const T=t.getExtent();T&&(y=y?(0,c._N)(y,T):T);const A=s.getResolution(this.wrappedTileCoord_[0]),C=(0,l.aY)(t,i,E,A);if(!isFinite(C)||C<=0)return void(this.state=o.A.EMPTY);const S=void 0!==f?f:n.l;if(this.triangulation_=new a.A(t,i,E,y,C*S,A),0===this.triangulation_.getTriangles().length)return void(this.state=o.A.EMPTY);this.sourceZ_=e.getZForResolution(C);let R=this.triangulation_.calculateSourceExtent();if(y&&(t.canWrapX()?(R[1]=(0,h.qE)(R[1],y[1],y[3]),R[3]=(0,h.qE)(R[3],y[1],y[3])):R=(0,c._N)(R,y)),(0,c.UG)(R)){let i=0,n=0;t.canWrapX()&&(i=(0,c.RG)(T),n=Math.floor((R[0]-T[0])/i)),(0,c.QJ)(R.slice(),t,!0).forEach((t=>{const s=e.getTileRangeForExtentAndZ(t,this.sourceZ_);for(let t=s.minX;t<=s.maxX;t++)for(let e=s.minY;e<=s.maxY;e++){const s=_(this.sourceZ_,t,e,d);if(s){const t=n*i;this.sourceTiles_.push({tile:s,offset:t})}}++n})),0===this.sourceTiles_.length&&(this.state=o.A.EMPTY)}else this.state=o.A.EMPTY}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach((e=>{const i=e.tile;if(i&&i.getState()==o.A.LOADED){const n=this.sourceTileGrid_.getTileCoordExtent(i.tileCoord);n[0]+=e.offset,n[2]+=e.offset;const s=this.clipExtent_?.slice();s&&(s[0]+=e.offset,s[2]+=e.offset),t.push({extent:n,clipExtent:s,image:i.getImage()})}})),this.sourceTiles_.length=0,0===t.length)this.state=o.A.ERROR;else{const e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),n="number"==typeof i?i:i[0],s="number"==typeof i?i:i[1],r=this.targetTileGrid_.getResolution(e),a=this.sourceTileGrid_.getResolution(this.sourceZ_),h=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=(0,l.XX)(n,s,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),r,h,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=o.A.LOADED}this.changed()}load(){if(this.state==o.A.IDLE){this.state=o.A.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach((({tile:e})=>{const i=e.getState();if(i==o.A.IDLE||i==o.A.LOADING){t++;const i=(0,u.KT)(e,s.A.CHANGE,(function(n){const s=e.getState();s!=o.A.LOADED&&s!=o.A.ERROR&&s!=o.A.EMPTY||((0,u.JH)(i),t--,0===t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(i)}})),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function({tile:t},e,i){t.getState()==o.A.IDLE&&t.load()}))}}unlistenSources_(){this.sourcesListenerKeys_.forEach(u.JH),this.sourcesListenerKeys_=null}release(){this.canvas_&&((0,d.Yg)(this.canvas_.getContext("2d")),l.BV.push(this.canvas_),this.canvas_=null),super.release()}}const _=g},2913:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(915),s=i(3407),r=i(1597);const o=class{constructor(t,e,i,r,o,a){this.sourceProj_=t,this.targetProj_=e;let l={};const h=(0,s.RG)(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){const e=t[0]+"/"+t[1];return l[e]||(l[e]=h(t)),l[e]},this.maxSourceExtent_=r,this.errorThresholdSquared_=o*o,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!r&&!!this.sourceProj_.getExtent()&&(0,n.RG)(r)>=(0,n.RG)(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?(0,n.RG)(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?(0,n.RG)(this.targetProj_.getExtent()):null;const c=(0,n.Py)(i),u=(0,n.WU)(i),d=(0,n.k_)(i),g=(0,n.R)(i),_=this.transformInv_(c),f=this.transformInv_(u),p=this.transformInv_(d),m=this.transformInv_(g),x=10+(a?Math.max(0,Math.ceil(Math.log2((0,n.UG)(i)/(a*a*256*256)))):0);if(this.addQuad_(c,u,d,g,_,f,p,m,x),this.wrapsXInSource_){let t=1/0;this.triangles_.forEach((function(e,i,n){t=Math.min(t,e.source[0][0],e.source[1][0],e.source[2][0])})),this.triangles_.forEach((e=>{if(Math.max(e.source[0][0],e.source[1][0],e.source[2][0])-t>this.sourceWorldWidth_/2){const i=[[e.source[0][0],e.source[0][1]],[e.source[1][0],e.source[1][1]],[e.source[2][0],e.source[2][1]]];i[0][0]-t>this.sourceWorldWidth_/2&&(i[0][0]-=this.sourceWorldWidth_),i[1][0]-t>this.sourceWorldWidth_/2&&(i[1][0]-=this.sourceWorldWidth_),i[2][0]-t>this.sourceWorldWidth_/2&&(i[2][0]-=this.sourceWorldWidth_);const n=Math.min(i[0][0],i[1][0],i[2][0]);Math.max(i[0][0],i[1][0],i[2][0])-n.5&&d<1;let f=!1;if(c>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const r=(0,n.Tr)([t,e,i,s]);f=(0,n.RG)(r)/this.targetWorldWidth_>.25||f}!_&&this.sourceProj_.isGlobal()&&d&&(f=d>.25||f)}if(!f&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!(0,n.HY)(u,this.maxSourceExtent_))return;let p=0;if(!(f||isFinite(o[0])&&isFinite(o[1])&&isFinite(a[0])&&isFinite(a[1])&&isFinite(l[0])&&isFinite(l[1])&&isFinite(h[0])&&isFinite(h[1])))if(c>0)f=!0;else if(p=(isFinite(o[0])&&isFinite(o[1])?0:8)+(isFinite(a[0])&&isFinite(a[1])?0:4)+(isFinite(l[0])&&isFinite(l[1])?0:2)+(isFinite(h[0])&&isFinite(h[1])?0:1),1!=p&&2!=p&&4!=p&&8!=p)return;if(c>0){if(!f){const e=[(t[0]+i[0])/2,(t[1]+i[1])/2],n=this.transformInv_(e);let s;s=_?((0,r.xP)(o[0],g)+(0,r.xP)(l[0],g))/2-(0,r.xP)(n[0],g):(o[0]+l[0])/2-n[0];const a=(o[1]+l[1])/2-n[1];f=s*s+a*a>this.errorThresholdSquared_}if(f){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){const n=[(e[0]+i[0])/2,(e[1]+i[1])/2],r=this.transformInv_(n),u=[(s[0]+t[0])/2,(s[1]+t[1])/2],d=this.transformInv_(u);this.addQuad_(t,e,n,u,o,a,r,d,c-1),this.addQuad_(u,n,i,s,d,r,l,h,c-1)}else{const n=[(t[0]+e[0])/2,(t[1]+e[1])/2],r=this.transformInv_(n),u=[(i[0]+s[0])/2,(i[1]+s[1])/2],d=this.transformInv_(u);this.addQuad_(t,n,u,s,o,r,d,h,c-1),this.addQuad_(n,e,i,u,r,a,l,d,c-1)}return}}if(_){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}11&p||this.addTriangle_(t,i,s,o,l,h),14&p||this.addTriangle_(t,i,e,o,l,a),p&&(13&p||this.addTriangle_(e,s,t,a,h,o),7&p||this.addTriangle_(e,s,i,a,h,l))}calculateSourceExtent(){const t=(0,n.S5)();return this.triangles_.forEach((function(e,i,s){const r=e.source;(0,n.$C)(t,r[0]),(0,n.$C)(t,r[1]),(0,n.$C)(t,r[2])})),t}getTriangles(){return this.triangles_}}},3101:(t,e,i)=>{"use strict";i.d(e,{l:()=>n});const n=.5},4498:(t,e,i)=>{"use strict";i.d(e,{a$:()=>o,b8:()=>s,cq:()=>a,dv:()=>r});var n=i(1597);function s(t){if(void 0!==t)return 0}function r(t){if(void 0!==t)return t}function o(t){const e=2*Math.PI/t;return function(t,i){return i?t:void 0!==t?t=Math.floor(t/e+.5)*e:void 0}}function a(t){const e=void 0===t?(0,n.eh)(5):t;return function(t,i){return i||void 0===t?t:Math.abs(t)<=e?0:t}}},4401:(t,e,i)=>{"use strict";function n(t){return t[0]>0&&t[1]>0}function s(t,e,i){return void 0===i&&(i=[0,0]),i[0]=t[0]*e+.5|0,i[1]=t[1]*e+.5|0,i}function r(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}i.d(e,{Ie:()=>n,hs:()=>s,xq:()=>r})},6203:(t,e,i)=>{"use strict";i.d(e,{A:()=>d});var n=i(6837),s=i(6717),r=i(4294),o=i(731),a=i(6933),l=i(588),h=i(915),c=i(4087);class u extends o.A{constructor(t){super({attributions:(t=t||{}).attributions,wrapX:t.wrapX}),this.resolution=void 0,this.distance=void 0!==t.distance?t.distance:20,this.minDistance=t.minDistance||0,this.interpolationRatio=0,this.features=[],this.geometryFunction=t.geometryFunction||function(t){const e=t.getGeometry();return(0,l.v)(!e||"Point"===e.getType(),"The default `geometryFunction` can only handle `Point` or null geometries"),e},this.createCustomCluster_=t.createCluster,this.source=null,this.boundRefresh_=this.refresh.bind(this),this.updateDistance(this.distance,this.minDistance),this.setSource(t.source||null)}clear(t){this.features.length=0,super.clear(t)}getDistance(){return this.distance}getSource(){return this.source}loadFeatures(t,e,i){this.source?.loadFeatures(t,e,i),e!==this.resolution&&(this.resolution=e,this.refresh())}setDistance(t){this.updateDistance(t,this.minDistance)}setMinDistance(t){this.updateDistance(this.distance,t)}getMinDistance(){return this.minDistance}setSource(t){this.source&&this.source.removeEventListener(n.A.CHANGE,this.boundRefresh_),this.source=t,t&&t.addEventListener(n.A.CHANGE,this.boundRefresh_),this.refresh()}refresh(){this.clear(),this.cluster(),this.addFeatures(this.features)}updateDistance(t,e){const i=0===t?0:Math.min(e,t)/t,n=t!==this.distance||this.interpolationRatio!==i;this.distance=t,this.minDistance=e,this.interpolationRatio=i,n&&this.refresh()}cluster(){if(void 0===this.resolution||!this.source)return;const t=(0,h.S5)(),e=this.distance*this.resolution,i=this.source.getFeatures(),n={};for(let s=0,r=i.length;s=0;--e){const n=this.geometryFunction(t[e]);n?(0,a.WQ)(i,n.getCoordinates()):t.splice(e,1)}(0,a.hs)(i,1/t.length);const n=(0,h.q1)(e),o=this.interpolationRatio,l=new r.A([i[0]*(1-o)+n[0]*o,i[1]*(1-o)+n[1]*o]);return this.createCustomCluster_?this.createCustomCluster_(l,t):new s.A({geometry:l,features:t})}}const d=u},9925:(t,e,i)=>{"use strict";i.d(e,{Ay:()=>C,VV:()=>T,QD:()=>A});var n=i(1685),s=i(6837),r=i(6141),o=i(3938),a=i(3101),l=i(2913),h=i(3513);function c(t){return Array.isArray(t)?Math.min(...t):t}var u=i(915),d=i(9438);class g extends o.Ay{constructor(t,e,i,n,s,o,c){let d=t.getExtent();d&&t.canWrapX()&&(d=d.slice(),d[0]=-1/0,d[2]=1/0);let g=e.getExtent();g&&e.canWrapX()&&(g=g.slice(),g[0]=-1/0,g[2]=1/0);const _=g?(0,u._N)(i,g):i,f=(0,u.q1)(_),p=(0,h.KQ)(t,e,f,n),m=a.l,x=new l.A(t,e,_,d,p*m,n),v=x.calculateSourceExtent(),y=(0,u.Im)(v)?null:o(v,p,s),E=y?r.A.IDLE:r.A.EMPTY,T=y?y.getPixelRatio():1;super(i,n,T,E),this.targetProj_=e,this.maxSourceExtent_=d,this.triangulation_=x,this.targetResolution_=n,this.targetExtent_=i,this.sourceImage_=y,this.sourcePixelRatio_=T,this.interpolate_=c,this.canvas_=null,this.sourceListenerKey_=null}disposeInternal(){this.state==r.A.LOADING&&this.unlistenSource_(),super.disposeInternal()}getImage(){return this.canvas_}getProjection(){return this.targetProj_}reproject_(){const t=this.sourceImage_.getState();if(t==r.A.LOADED){const t=(0,u.RG)(this.targetExtent_)/this.targetResolution_,e=(0,u.Oq)(this.targetExtent_)/this.targetResolution_;this.canvas_=(0,h.XX)(t,e,this.sourcePixelRatio_,c(this.sourceImage_.getResolution()),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.interpolate_,!0)}this.state=t,this.changed()}load(){if(this.state==r.A.IDLE){this.state=r.A.LOADING,this.changed();const t=this.sourceImage_.getState();t==r.A.LOADED||t==r.A.ERROR?this.reproject_():(this.sourceListenerKey_=(0,d.KT)(this.sourceImage_,s.A.CHANGE,(function(t){const e=this.sourceImage_.getState();e!=r.A.LOADED&&e!=r.A.ERROR||(this.unlistenSource_(),this.reproject_())}),this),this.sourceImage_.load())}}unlistenSource_(){(0,d.JH)(this.sourceListenerKey_),this.sourceListenerKey_=null}}const _=g;var f=i(6444),p=i(2192),m=i(1597),x=i(3407),v=i(6514);class y extends n.Ay{constructor(t,e){super(t),this.image=e}}class E extends f.A{constructor(t){super({attributions:t.attributions,projection:t.projection,state:t.state,interpolate:void 0===t.interpolate||t.interpolate}),this.on,this.once,this.un,this.loader=t.loader||null,this.resolutions_=void 0!==t.resolutions?t.resolutions:null,this.reprojectedImage_=null,this.reprojectedRevision_=0,this.image=null,this.wantedExtent_,this.wantedResolution_,this.static_=!!t.loader&&0===t.loader.length,this.wantedProjection_=null}getResolutions(){return this.resolutions_}setResolutions(t){this.resolutions_=t}findNearestResolution(t){const e=this.getResolutions();return e&&(t=e[(0,v.FT)(e,t,0)]),t}getImage(t,e,i,n){const s=this.getProjection();if(!s||!n||(0,x.tI)(s,n))return s&&(n=s),this.getImageInternal(t,e,i,n);if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&(0,x.tI)(this.reprojectedImage_.getProjection(),n)&&this.reprojectedImage_.getResolution()==e&&(0,u.aI)(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new _(s,n,t,e,i,((t,e,i)=>this.getImageInternal(t,e,i,s)),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}getImageInternal(t,e,i,n){if(this.loader){const r=A(t,e,i,1),a=this.findNearestResolution(e);if(this.image&&(this.static_||this.wantedProjection_===n&&(this.wantedExtent_&&(0,u.ms)(this.wantedExtent_,r)||(0,u.ms)(this.image.getExtent(),r))&&(this.wantedResolution_&&c(this.wantedResolution_)===a||c(this.image.getResolution())===a)))return this.image;this.wantedProjection_=n,this.wantedExtent_=r,this.wantedResolution_=a,this.image=new o.Ay(r,a,i,this.loader),this.image.addEventListener(s.A.CHANGE,this.handleImageChange.bind(this))}return this.image}handleImageChange(t){const e=t.target;let i;switch(e.getState()){case r.A.LOADING:this.loading=!0,i="imageloadstart";break;case r.A.LOADED:this.loading=!1,i="imageloadend";break;case r.A.ERROR:this.loading=!1,i="imageloaderror";break;default:return}this.hasListener(i)&&this.dispatchEvent(new y(i,e))}}function T(t,e){t.getImage().src=e}function A(t,e,i,n){const s=e/i,r=(0,u.q1)(t),o=(0,m.mk)((0,u.RG)(t)/s,p.B),a=(0,m.mk)((0,u.Oq)(t)/s,p.B),l=o+2*(0,m.mk)((n-1)*o/2,p.B),h=a+2*(0,m.mk)((n-1)*a/2,p.B);return(0,u.Bg)(r,s,0,[l,h])}const C=E},8270:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(6837),s=i(9925),r=i(3938),o=i(915),a=i(3407);class l extends s.Ay{constructor(t){const e=void 0!==t.crossOrigin?t.crossOrigin:null,i=void 0!==t.imageLoadFunction?t.imageLoadFunction:s.VV;super({attributions:t.attributions,interpolate:t.interpolate,projection:(0,a.Jt)(t.projection)}),this.url_=t.url,this.imageExtent_=t.imageExtent,this.image=null,this.image=new r.Ay(this.imageExtent_,void 0,1,function(t){const e=t.load||r.D4,i=t.imageExtent,n=new Image;return null!==t.crossOrigin&&(n.crossOrigin=t.crossOrigin),()=>e(n,t.url).then((t=>{const e=(0,o.RG)(i)/t.width,n=(0,o.Oq)(i)/t.height;return{image:t,extent:i,resolution:e!==n?[e,n]:n,pixelRatio:1}}))}({url:t.url,imageExtent:t.imageExtent,crossOrigin:e,load:(t,e)=>(this.image.setImage(t),i(this.image,e),(0,r.D4)(t))})),this.image.addEventListener(n.A.CHANGE,this.handleImageChange.bind(this))}getImageExtent(){return this.imageExtent_}getImageInternal(t,e,i,n){return(0,o.HY)(t,this.image.getExtent())?this.image:null}getUrl(){return this.url_}}const h=l},1011:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(9925),s=i(3513),r=i(7500),o=i(3938),a=i(3407);class l extends n.Ay{constructor(t){super({attributions:(t=t||{}).attributions,interpolate:t.interpolate,projection:t.projection,resolutions:t.resolutions}),this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null,this.url_=t.url,this.imageLoadFunction_=void 0!==t.imageLoadFunction?t.imageLoadFunction:n.VV,this.params_=Object.assign({},t.params),this.serverType_=t.serverType,this.hidpi_=void 0===t.hidpi||t.hidpi,this.renderedRevision_=0,this.ratio_=void 0!==t.ratio?t.ratio:1.5,this.loaderProjection_=null}getFeatureInfoUrl(t,e,i,n){const o=(0,a.Jt)(i),l=this.getProjection();l&&l!==o&&(e=(0,s.KQ)(l,o,t,e),t=(0,a.pd)(t,o,l));const h={url:this.url_,params:{...this.params_,...n},projection:l||o};return(0,r.y4)(h,t,e)}getLegendUrl(t,e){return(0,r.$q)({url:this.url_,params:{...this.params_,...e}},t)}getParams(){return this.params_}getImageInternal(t,e,i,n){return void 0===this.url_?null:(this.loader&&this.loaderProjection_===n||(this.loaderProjection_=n,this.loader=(0,r.Eq)({crossOrigin:this.crossOrigin_,params:this.params_,projection:n,serverType:this.serverType_,hidpi:this.hidpi_,url:this.url_,ratio:this.ratio_,load:(t,e)=>(this.image.setImage(t),this.imageLoadFunction_(this.image,e),(0,o.D4)(t))})),super.getImageInternal(t,e,i,n))}getImageLoadFunction(){return this.imageLoadFunction_}getUrl(){return this.url_}setImageLoadFunction(t){this.imageLoadFunction_=t,this.changed()}setUrl(t){t!=this.url_&&(this.url_=t,this.loader=null,this.changed())}updateParams(t){Object.assign(this.params_,t),this.changed()}changed(){this.image=null,super.changed()}}const h=l},7896:(t,e,i)=>{"use strict";i.d(e,{A:()=>o,o:()=>s});var n=i(702);const s='© OpenStreetMap contributors.';class r extends n.A{constructor(t){let e;e=void 0!==(t=t||{}).attributions?t.attributions:[s];const i=void 0!==t.crossOrigin?t.crossOrigin:"anonymous",n=void 0!==t.url?t.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:e,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:i,interpolate:t.interpolate,maxZoom:void 0!==t.maxZoom?t.maxZoom:19,opaque:void 0===t.opaque||t.opaque,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:n,wrapX:t.wrapX,zDirection:t.zDirection})}}const o=r},6444:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(4120),s=i(3407);class r extends n.A{constructor(t){super(),this.projection=(0,s.Jt)(t.projection),this.attributions_=o(t.attributions),this.attributionsCollapsible_=void 0===t.attributionsCollapsible||t.attributionsCollapsible,this.loading=!1,this.state_=void 0!==t.state?t.state:"ready",this.wrapX_=void 0!==t.wrapX&&t.wrapX,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const e=this;this.viewPromise_=new Promise((function(t,i){e.viewResolver=t,e.viewRejector=i}))}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(t){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=o(t),this.changed()}setState(t){this.state_=t,this.changed()}}function o(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}const a=r},6017:(t,e,i)=>{"use strict";i.d(e,{A:()=>f,c:()=>_});var n=i(1685),s=i(6444),r=i(61),o=i(1078),a=i(4087),l=i(588),h=i(3407),c=i(186),u=i(4863),d=i(4401);class g extends s.A{constructor(t){super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:t.projection,state:t.state,wrapX:t.wrapX,interpolate:t.interpolate}),this.on,this.once,this.un,this.opaque_=void 0!==t.opaque&&t.opaque,this.tilePixelRatio_=void 0!==t.tilePixelRatio?t.tilePixelRatio:1,this.tileGrid=void 0!==t.tileGrid?t.tileGrid:null;this.tileGrid&&(0,d.xq)(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),[256,256]),this.tileCache=new r.A(t.cacheSize||0),this.tmpSize=[0,0],this.key_=t.key||"",this.tileOptions={transition:t.transition,interpolate:t.interpolate},this.zDirection=t.zDirection?t.zDirection:0}canExpireCache(){return this.tileCache.canExpireCache()}expireCache(t,e){const i=this.getTileCacheForProjection(t);i&&i.expireCache(e)}forEachLoadedTile(t,e,i,n){const s=this.getTileCacheForProjection(t);if(!s)return!1;let r,a,l,h=!0;for(let t=i.minX;t<=i.maxX;++t)for(let u=i.minY;u<=i.maxY;++u)a=(0,c.dp)(e,t,u),l=!1,s.containsKey(a)&&(r=s.get(a),l=r.getState()===o.A.LOADED,l&&(l=!1!==n(r))),l||(h=!1);return h}getGutterForProjection(t){return 0}getKey(){return this.key_}setKey(t){this.key_!==t&&(this.key_=t,this.changed())}getOpaque(t){return this.opaque_}getResolutions(t){const e=t?this.getTileGridForProjection(t):this.tileGrid;return e?e.getResolutions():null}getTile(t,e,i,n,s){return(0,a.b0)()}getTileGrid(){return this.tileGrid}getTileGridForProjection(t){return this.tileGrid?this.tileGrid:(0,u.pr)(t)}getTileCacheForProjection(t){const e=this.getProjection();return(0,l.v)(null===e||(0,h.tI)(e,t),"A VectorTile source can only be rendered if it has a projection compatible with the view projection."),this.tileCache}getTilePixelRatio(t){return this.tilePixelRatio_}getTilePixelSize(t,e,i){const n=this.getTileGridForProjection(i),s=this.getTilePixelRatio(e),r=(0,d.xq)(n.getTileSize(t),this.tmpSize);return 1==s?r:(0,d.hs)(r,s,this.tmpSize)}getTileCoordForTileUrlFunction(t,e){e=void 0!==e?e:this.getProjection();const i=this.getTileGridForProjection(e);return this.getWrapX()&&e.isGlobal()&&(t=(0,u.Li)(i,t,e)),(0,c.N5)(t,i)?t:null}clear(){this.tileCache.clear()}refresh(){this.clear(),super.refresh()}updateCacheSize(t,e){const i=this.getTileCacheForProjection(e);t>i.highWaterMark&&(i.highWaterMark=t)}useTile(t,e,i,n){}}class _ extends n.Ay{constructor(t,e){super(t),this.tile=e}}const f=g},8469:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"}},8512:(t,e,i)=>{"use strict";i.d(e,{A:()=>f});var n=i(6837),s=i(190),r=i(7404),o=i(61),a=i(1078),l=i(6164),h=i(3407),c=i(186),u=i(4863),d=i(4087);class g extends l.A{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:_,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,interpolate:void 0===t.interpolate||t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.crossOrigin=void 0!==t.crossOrigin?t.crossOrigin:null,this.tileClass=void 0!==t.tileClass?t.tileClass:s.A,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=t.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}canExpireCache(){if(this.tileCache.canExpireCache())return!0;for(const t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1}expireCache(t,e){const i=this.getTileCacheForProjection(t);this.tileCache.expireCache(this.tileCache==i?e:{});for(const t in this.tileCacheForProjection){const n=this.tileCacheForProjection[t];n.expireCache(n==i?e:{})}}getGutterForProjection(t){return this.getProjection()&&t&&!(0,h.tI)(this.getProjection(),t)?0:this.getGutter()}getGutter(){return 0}getKey(){let t=super.getKey();return this.getInterpolate()||(t+=":disable-interpolation"),t}getOpaque(t){return!(this.getProjection()&&t&&!(0,h.tI)(this.getProjection(),t))&&super.getOpaque(t)}getTileGridForProjection(t){const e=this.getProjection();if(this.tileGrid&&(!e||(0,h.tI)(e,t)))return this.tileGrid;const i=(0,d.v6)(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=(0,u.pr)(t)),this.tileGridForProjection[i]}getTileCacheForProjection(t){const e=this.getProjection();if(!e||(0,h.tI)(e,t))return this.tileCache;const i=(0,d.v6)(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new o.A(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]}createTile_(t,e,i,s,r,o){const l=[t,e,i],h=this.getTileCoordForTileUrlFunction(l,r),c=h?this.tileUrlFunction(h,s,r):void 0,u=new this.tileClass(l,void 0!==c?a.A.IDLE:a.A.EMPTY,void 0!==c?c:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=o,u.addEventListener(n.A.CHANGE,this.handleTileChange.bind(this)),u}getTile(t,e,i,n,s){const o=this.getProjection();if(!o||!s||(0,h.tI)(o,s))return this.getTileInternal(t,e,i,n,o||s);const a=this.getTileCacheForProjection(s),l=[t,e,i];let u;const d=(0,c.i7)(l);a.containsKey(d)&&(u=a.get(d));const g=this.getKey();if(u&&u.key==g)return u;const _=this.getTileGridForProjection(o),f=this.getTileGridForProjection(s),p=this.getTileCoordForTileUrlFunction(l,s),m=new r.A(o,_,s,f,l,p,this.getTilePixelRatio(n),this.getGutter(),((t,e,i,n)=>this.getTileInternal(t,e,i,n,o)),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return m.key=g,u?(m.interimTile=u,m.refreshInterimChain(),a.replace(d,m)):a.set(d,m),m}getTileInternal(t,e,i,n,s){let r=null;const o=(0,c.dp)(t,e,i),l=this.getKey();if(this.tileCache.containsKey(o)){if(r=this.tileCache.get(o),r.key!=l){const h=r;r=this.createTile_(t,e,i,n,s,l),h.getState()==a.A.IDLE?r.interimTile=h.interimTile:r.interimTile=h,r.refreshInterimChain(),this.tileCache.replace(o,r)}}else r=this.createTile_(t,e,i,n,s,l),this.tileCache.set(o,r);return r}setRenderReprojectionEdges(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear();this.changed()}}setTileGridForProjection(t,e){const i=(0,h.Jt)(t);if(i){const t=(0,d.v6)(i);t in this.tileGridForProjection||(this.tileGridForProjection[t]=e)}}clear(){super.clear();for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}}function _(t,e){t.getImage().src=e}const f=g},4218:(t,e,i)=>{"use strict";i.d(e,{A:()=>c});var n=i(8512),s=i(915),r=i(2654),o=i(4863),a=i(3407),l=i(4087);Error,Error;class h extends n.A{constructor(t){if(super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:(0,a.Jt)("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.tileJSON_=null,this.tileSize_=t.tileSize,t.url)if(t.jsonp)!function(t,e,i,n){const s=document.createElement("script"),r="olc_"+(0,l.v6)(e);function o(){delete window[r],s.parentNode.removeChild(s)}s.async=!0,s.src=t+(t.includes("?")?"&":"?")+"callback="+r;const a=setTimeout((function(){o(),i&&i()}),1e4);window[r]=function(t){clearTimeout(a),o(),e(t)},document.head.appendChild(s)}(t.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{const e=new XMLHttpRequest;e.addEventListener("load",this.onXHRLoad_.bind(this)),e.addEventListener("error",this.onXHRError_.bind(this)),e.open("GET",t.url),e.send()}else{if(!t.tileJSON)throw new Error("Either `url` or `tileJSON` options must be provided");this.handleTileJSONResponse(t.tileJSON)}}onXHRLoad_(t){const e=t.target;if(!e.status||e.status>=200&&e.status<300){let t;try{t=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(t)}else this.handleTileJSONError()}onXHRError_(t){this.handleTileJSONError()}getTileJSON(){return this.tileJSON_}handleTileJSONResponse(t){const e=(0,a.Jt)("EPSG:4326"),i=this.getProjection();let n;if(void 0!==t.bounds){const r=(0,a.FO)(e,i);n=(0,s.NW)(t.bounds,r)}const l=(0,o.kZ)(i),h=t.minzoom||0,c=t.maxzoom||22,u=(0,o.EN)({extent:l,maxZoom:c,minZoom:h,tileSize:this.tileSize_});if(this.tileGrid=u,this.tileUrlFunction=(0,r.Qz)(t.tiles,u),t.attribution&&!this.getAttributions()){const e=void 0!==n?n:l;this.setAttributions((function(i){return(0,s.HY)(e,i.extent)?[t.attribution]:null}))}this.tileJSON_=t,this.setState("ready")}handleTileJSONError(){this.setState("error")}}const c=h},2728:(t,e,i)=>{"use strict";i.d(e,{A:()=>g});var n=i(8512),s=i(7500),r=i(4465),o=i(915),a=i(3513),l=i(2806),h=i(3407),c=i(1597),u=i(186);class d extends n.A{constructor(t){t=t||{};const e=Object.assign({},t.params),i=!("TRANSPARENT"in e)||e.TRANSPARENT;super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:!i,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.gutter_=void 0!==t.gutter?t.gutter:0,this.params_=e,this.v13_=!0,this.serverType_=t.serverType,this.hidpi_=void 0===t.hidpi||t.hidpi,this.tmpExtent_=(0,o.S5)(),this.updateV13_(),this.setKey(this.getKeyForParams_())}getFeatureInfoUrl(t,e,i,n){const r=(0,h.Jt)(i),l=this.getProjection()||r;let c=this.getTileGrid();c||(c=this.getTileGridForProjection(l));const u=(0,h.pd)(t,r,l),d=(0,a.KQ)(l,r,t,e),g=c.getZForResolution(d,this.zDirection),_=c.getResolution(g),f=c.getTileCoordForCoordAndZ(u,g);if(c.getResolutions().length<=f[0])return;let p=c.getTileCoordExtent(f,this.tmpExtent_);const m=this.gutter_;0!==m&&(p=(0,o.r)(p,_*m,p));const x={QUERY_LAYERS:this.params_.LAYERS};Object.assign(x,(0,s.W3)(this.params_,"GetFeatureInfo"),n);const v=Math.floor((u[0]-p[0])/_),y=Math.floor((p[3]-u[1])/_);return x[this.v13_?"I":"X"]=v,x[this.v13_?"J":"Y"]=y,this.getRequestUrl_(f,p,1,l||r,x)}getLegendUrl(t,e){if(void 0===this.urls[0])return;const i={SERVICE:"WMS",VERSION:s.jD,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){const t=this.params_.LAYERS;if(Array.isArray(t)&&1!==t.length)return;i.LAYER=t}if(void 0!==t){const e=this.getProjection()?this.getProjection().getMetersPerUnit():1,n=28e-5;i.SCALE=t*e/n}return Object.assign(i,e),(0,r.L)(this.urls[0],i)}getGutter(){return this.gutter_}getParams(){return this.params_}getRequestUrl_(t,e,i,n,r){const o=this.urls;if(!o)return;let a;return a=1==o.length?o[0]:o[(0,c.xP)((0,u.tW)(t),o.length)],(0,s.AE)(e,(this.tileGrid||this.getTileGridForProjection(n)).getResolution(t[0]),i,n,a,r,this.serverType_)}getTilePixelRatio(t){return this.hidpi_&&void 0!==this.serverType_?t:1}getKeyForParams_(){let t=0;const e=[];for(const i in this.params_)e[t++]=i+"-"+this.params_[i];return e.join("/")}updateParams(t){Object.assign(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())}updateV13_(){const t=this.params_.VERSION||s.jD;this.v13_=(0,l.Z)(t,"1.3")>=0}tileUrlFunction(t,e,i){let n=this.getTileGrid();if(n||(n=this.getTileGridForProjection(i)),n.getResolutions().length<=t[0])return;1==e||this.hidpi_&&void 0!==this.serverType_||(e=1);const r=n.getResolution(t[0]);let a=n.getTileCoordExtent(t,this.tmpExtent_);const l=this.gutter_;0!==l&&(a=(0,o.r)(a,r*l,a));const h=Object.assign({},(0,s.W3)(this.params_,"GetMap"));return this.getRequestUrl_(t,a,e,i,h)}}const g=d},6164:(t,e,i)=>{"use strict";i.d(e,{A:()=>c});var n=i(8469),s=i(6017),r=i(1078),o=i(2654),a=i(186),l=i(4087);class h extends s.A{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.generateTileUrlFunction_=this.tileUrlFunction===h.prototype.tileUrlFunction,this.tileLoadFunction=t.tileLoadFunction,t.tileUrlFunction&&(this.tileUrlFunction=t.tileUrlFunction),this.urls=null,t.urls?this.setUrls(t.urls):t.url&&this.setUrl(t.url),this.tileLoadingKeys_={}}getTileLoadFunction(){return this.tileLoadFunction}getTileUrlFunction(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction}getUrls(){return this.urls}handleTileChange(t){const e=t.target,i=(0,l.v6)(e),o=e.getState();let a;o==r.A.LOADING?(this.tileLoadingKeys_[i]=!0,a=n.A.TILELOADSTART):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],a=o==r.A.ERROR?n.A.TILELOADERROR:o==r.A.LOADED?n.A.TILELOADEND:void 0),null!=a&&this.dispatchEvent(new s.c(a,e))}setTileLoadFunction(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()}setTileUrlFunction(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()}setUrl(t){const e=(0,o.Uu)(t);this.urls=e,this.setUrls(e)}setUrls(t){this.urls=t;const e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction((0,o.Qz)(t,this.tileGrid),e):this.setKey(e)}tileUrlFunction(t,e,i){}useTile(t,e,i){const n=(0,a.dp)(t,e,i);this.tileCache.containsKey(n)&&this.tileCache.get(n)}}const c=h},731:(t,e,i)=>{"use strict";i.d(e,{A:()=>A});var n=i(71),s=i(2135),r=i(1685),o=i(6837),a=i(8450),l=i(5902),h=i(4778),c=i(6444),u=i(8280),d=i(4238);function g(t,e){return[[-1/0,-1/0,1/0,1/0]]}i(3407);var _=i(588),f=i(915),p=i(6514),m=i(4087),x=i(3530),v=i(9438),y=i(1142);class E extends r.Ay{constructor(t,e,i){super(t),this.feature=e,this.features=i}}class T extends c.A{constructor(t){super({attributions:(t=t||{}).attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:void 0===t.wrapX||t.wrapX}),this.on,this.once,this.un,this.loader_=d.tV,this.format_=t.format,this.overlaps_=void 0===t.overlaps||t.overlaps,this.url_=t.url,void 0!==t.loader?this.loader_=t.loader:void 0!==this.url_&&((0,_.v)(this.format_,"`format` must be set when `url` is set"),this.loader_=(0,y.nF)(this.url_,this.format_)),this.strategy_=void 0!==t.strategy?t.strategy:g;const e=void 0===t.useSpatialIndex||t.useSpatialIndex;let i,s;this.featuresRtree_=e?new l.A:null,this.loadedExtentsRtree_=new l.A,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null,Array.isArray(t.features)?s=t.features:t.features&&(i=t.features,s=i.getArray()),e||void 0!==i||(i=new n.A(s)),void 0!==s&&this.addFeaturesInternal(s),void 0!==i&&this.bindFeaturesCollection_(i)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=(0,m.v6)(t);if(!this.addToIndex_(e,t))return void(this.featuresCollection_&&this.featuresCollection_.remove(t));this.setupChangeEvents_(e,t);const i=t.getGeometry();if(i){const e=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(e,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new E(u.A.ADDFEATURE,t))}setupChangeEvents_(t,e){e instanceof h.Ay||(this.featureChangeKeys_[t]=[(0,v.KT)(e,o.A.CHANGE,this.handleFeatureChange_,this),(0,v.KT)(e,a.A.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(t,e){let i=!0;if(void 0!==e.getId()){const t=String(e.getId());if(t in this.idIndex_)if(e instanceof h.Ay){const n=this.idIndex_[t];n instanceof h.Ay?Array.isArray(n)?n.push(e):this.idIndex_[t]=[n,e]:i=!1}else i=!1;else this.idIndex_[t]=e}return i&&((0,_.v)(!(t in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[t]=e),i}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],i=[],n=[];for(let e=0,n=t.length;e{e||(e=!0,this.addFeature(t.element),e=!1)})),t.addEventListener(s.A.REMOVE,(t=>{e||(e=!0,this.removeFeature(t.element),e=!1)})),this.featuresCollection_=t}clear(t){if(t){for(const t in this.featureChangeKeys_)this.featureChangeKeys_[t].forEach(v.JH);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const t=t=>{this.removeFeatureInternal(t)};this.featuresRtree_.forEach(t);for(const t in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[t])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new E(u.A.CLEAR);this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,(function(i){const n=i.getGeometry();if(n instanceof h.Ay||n.intersectsCoordinate(t))return e(i)}))}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,(function(i){const n=i.getGeometry();if(n instanceof h.Ay||n.intersectsExtent(t)){const t=e(i);if(t)return t}}))}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),(0,x.p)(this.nullGeometryFeatures_)||(0,p.X$)(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){e.push(t)})),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const i=(0,f.QJ)(t,e);return[].concat(...i.map((t=>this.featuresRtree_.getInExtent(t))))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const i=t[0],n=t[1];let s=null;const r=[NaN,NaN];let o=1/0;const a=[-1/0,-1/0,1/0,1/0];return e=e||d.rT,this.featuresRtree_.forEachInExtent(a,(function(t){if(e(t)){const e=t.getGeometry(),l=o;if(o=e instanceof h.Ay?0:e.closestPointXY(i,n,r,o),o{--this.loadingExtentsCount_,this.dispatchEvent(new E(u.A.FEATURESLOADEND,void 0,t))}),(()=>{--this.loadingExtentsCount_,this.dispatchEvent(new E(u.A.FEATURESLOADERROR))})),n.insert(r,{extent:r.slice()}))}this.loading=!(this.loader_.length<4)&&this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let i;e.forEachInExtent(t,(function(e){if((0,f.aI)(e.extent,t))return i=e,!0})),i&&e.remove(i)}removeFeatures(t){const e=[];for(let i=0,n=t.length;i0&&this.changed()}removeFeature(t){t&&this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=(0,m.v6)(t);if(!(e in this.uidIndex_))return;e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t);const i=this.featureChangeKeys_[e];i?.forEach(v.JH),delete this.featureChangeKeys_[e];const n=t.getId();if(void 0!==n){const e=n.toString(),i=this.idIndex_[e];i===t?delete this.idIndex_[e]:Array.isArray(i)&&(i.splice(i.indexOf(t),1),1===i.length&&(this.idIndex_[e]=i[0]))}return delete this.uidIndex_[e],this.hasListener(u.A.REMOVEFEATURE)&&this.dispatchEvent(new E(u.A.REMOVEFEATURE,t)),t}removeFromIdIndex_(t){let e=!1;for(const i in this.idIndex_){const n=this.idIndex_[i];if(t instanceof h.Ay&&Array.isArray(n)&&n.includes(t))n.splice(n.indexOf(t),1);else if(this.idIndex_[i]===t){delete this.idIndex_[i],e=!0;break}}return e}setLoader(t){this.loader_=t}setUrl(t){(0,_.v)(this.format_,"`format` must be set when `url` is set"),this.url_=t,this.setLoader((0,y.nF)(t,this.format_))}}const A=T},8280:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"}},5620:(t,e,i)=>{"use strict";i.d(e,{A:()=>C});var n=i(6837),s=i(8143),r=i(1078);class o extends s.A{constructor(t,e,i,n,s,r){super(t,e,r),this.extent=null,this.format_=n,this.features_=null,this.loader_,this.projection=null,this.resolution,this.tileLoadFunction_=s,this.url_=i,this.key=i}getFormat(){return this.format_}getFeatures(){return this.features_}load(){this.state==r.A.IDLE&&(this.setState(r.A.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))}onLoad(t,e){this.setFeatures(t)}onError(){this.setState(r.A.ERROR)}setFeatures(t){this.features_=t,this.setState(r.A.LOADED)}setLoader(t){this.loader_=t}}const a=o;var l=i(61),h=i(6758),c=i(6164),u=i(8711),d=i(4087);const g=[];class _ extends s.A{constructor(t,e,i,n){super(t,e,{transition:0}),this.context_={},this.executorGroups={},this.loadingSourceTiles=0,this.hitDetectionImageData={},this.replayState_={},this.sourceTiles=[],this.errorTileKeys={},this.wantedResolution,this.getSourceTiles=n.bind(void 0,this),this.wrappedTileCoord=i}getContext(t){const e=(0,d.v6)(t);return e in this.context_||(this.context_[e]=(0,u.Y)(1,1,g)),this.context_[e]}hasContext(t){return(0,d.v6)(t)in this.context_}getImage(t){return this.hasContext(t)?this.getContext(t).canvas:null}getReplayState(t){const e=(0,d.v6)(t);return e in this.replayState_||(this.replayState_[e]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[e]}load(){this.getSourceTiles()}release(){for(const t in this.context_){const e=this.context_[t];(0,u.Yg)(e),g.push(e.canvas),delete this.context_[t]}super.release()}}const f=_;var p=i(9496),m=i(915),x=i(4863),v=i(186),y=i(3530),E=i(1142),T=i(4401);class A extends c.A{constructor(t){const e=t.projection||"EPSG:3857",i=t.extent||(0,x.kZ)(e),n=t.tileGrid||(0,x.EN)({extent:i,maxResolution:t.maxResolution,maxZoom:void 0!==t.maxZoom?t.maxZoom:22,minZoom:t.minZoom,tileSize:t.tileSize||512});super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,interpolate:!0,opaque:!1,projection:e,state:t.state,tileGrid:n,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:S,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:void 0===t.zDirection?1:t.zDirection}),this.format_=t.format?t.format:null,this.sourceTileCache=new l.A(this.tileCache.highWaterMark),this.overlaps_=null==t.overlaps||t.overlaps,this.tileClass=t.tileClass?t.tileClass:a,this.tileGrids_={}}getFeaturesInExtent(t){const e=[],i=this.tileCache;if(0===i.getCount())return e;const n=(0,v.K)(i.peekFirstKey())[0],s=this.tileGrid;return i.forEach((function(i){if(i.tileCoord[0]!==n||i.getState()!==r.A.LOADED)return;const o=i.getSourceTiles();for(let i=0,n=o.length;i{const n=(0,v.gr)(e),s=i.peek(n);if(s){const e=s.sourceTiles;for(let i=0,n=e.length;i{const o=this.tileUrlFunction(s,t,e),a=this.sourceTileCache.containsKey(o)?this.sourceTileCache.get(o):new this.tileClass(s,o?r.A.IDLE:r.A.EMPTY,o,this.format_,this.tileLoadFunction);i.sourceTiles.push(a);const l=a.getState();if(l{this.handleTileChange(e);const s=a.getState();if(s===r.A.LOADED||s===r.A.ERROR){const e=a.getKey();e in i.errorTileKeys?a.getState()===r.A.LOADED&&delete i.errorTileKeys[e]:i.loadingSourceTiles--,s===r.A.ERROR?i.errorTileKeys[e]=!0:a.removeEventListener(n.A.CHANGE,t),0===i.loadingSourceTiles&&i.setState((0,y.p)(i.errorTileKeys)?r.A.LOADED:r.A.ERROR)}};a.addEventListener(n.A.CHANGE,t),i.loadingSourceTiles++}l===r.A.IDLE&&(a.extent=c.getTileCoordExtent(s),a.projection=e,a.resolution=c.getResolution(s[0]),this.sourceTileCache.set(o,a),a.load())})),i.loadingSourceTiles||i.setState(i.sourceTiles.some((t=>t.getState()===r.A.ERROR))?r.A.ERROR:r.A.LOADED)}return i.sourceTiles}getTile(t,e,i,n,s){const o=(0,v.dp)(t,e,i),a=this.getKey();let l;if(this.tileCache.containsKey(o)&&(l=this.tileCache.get(o),l.key===a))return l;const h=[t,e,i];let c=this.getTileCoordForTileUrlFunction(h,s);const u=this.getTileGrid().getExtent(),d=this.getTileGridForProjection(s);if(c&&u){const e=d.getTileCoordExtent(c);(0,m.r)(e,-d.getResolution(t),e),(0,m.HY)(u,e)||(c=null)}let g=!0;if(null!==c){const e=this.tileGrid,i=d.getResolution(t),r=e.getZForResolution(i,1),o=d.getTileCoordExtent(c);(0,m.r)(o,-i,o),e.forEachTileCoord(o,r,(t=>{g=g&&!this.tileUrlFunction(t,n,s)}))}const _=new f(h,g?r.A.EMPTY:r.A.IDLE,c,this.getSourceTiles.bind(this,n,s));return _.key=a,l?(_.interimTile=l,_.refreshInterimChain(),this.tileCache.replace(o,_)):this.tileCache.set(o,_),_}getTileGridForProjection(t){const e=t.getCode();let i=this.tileGrids_[e];if(!i){const t=this.tileGrid,n=t.getResolutions().slice(),s=n.map((function(e,i){return t.getOrigin(i)})),r=n.map((function(e,i){return t.getTileSize(i)})),o=p.L+1;for(let t=n.length;t{"use strict";i.d(e,{A:()=>u,t:()=>d});var n=i(8512),s=i(4465),r=i(915),o=i(6758),a=i(3407);class l extends o.A{constructor(t){super({extent:t.extent,origin:t.origin,origins:t.origins,resolutions:t.resolutions,tileSize:t.tileSize,tileSizes:t.tileSizes,sizes:t.sizes}),this.matrixIds_=t.matrixIds}getMatrixId(t){return this.matrixIds_[t]}getMatrixIds(){return this.matrixIds_}}var h=i(2654);class c extends n.A{constructor(t){const e=void 0!==t.requestEncoding?t.requestEncoding:"KVP",i=t.tileGrid;let n=t.urls;void 0===n&&void 0!==t.url&&(n=(0,h.Uu)(t.url)),super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:i,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,urls:n,wrapX:void 0!==t.wrapX&&t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.version_=void 0!==t.version?t.version:"1.0.0",this.format_=void 0!==t.format?t.format:"image/jpeg",this.dimensions_=void 0!==t.dimensions?t.dimensions:{},this.layer_=t.layer,this.matrixSet_=t.matrixSet,this.style_=t.style,this.requestEncoding_=e,this.setKey(this.getKeyForDimensions_()),n&&n.length>0&&(this.tileUrlFunction=(0,h.FD)(n.map(this.createFromWMTSTemplate.bind(this))))}setUrls(t){this.urls=t;const e=t.join("\n");this.setTileUrlFunction((0,h.FD)(t.map(this.createFromWMTSTemplate.bind(this))),e)}getDimensions(){return this.dimensions_}getFormat(){return this.format_}getLayer(){return this.layer_}getMatrixSet(){return this.matrixSet_}getRequestEncoding(){return this.requestEncoding_}getStyle(){return this.style_}getVersion(){return this.version_}getKeyForDimensions_(){const t=this.urls?this.urls.slice(0):[];for(const e in this.dimensions_)t.push(e+"-"+this.dimensions_[e]);return t.join("/")}updateDimensions(t){Object.assign(this.dimensions_,t),this.setKey(this.getKeyForDimensions_())}createFromWMTSTemplate(t){const e=this.requestEncoding_,i={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};"KVP"==e&&Object.assign(i,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t="KVP"==e?(0,s.L)(t,i):t.replace(/\{(\w+?)\}/g,(function(t,e){return e.toLowerCase()in i?i[e.toLowerCase()]:t}));const n=this.tileGrid,r=this.dimensions_;return function(i,o,a){if(!i)return;const l={TileMatrix:n.getMatrixId(i[0]),TileCol:i[1],TileRow:i[2]};Object.assign(l,r);let h=t;return h="KVP"==e?(0,s.L)(h,l):h.replace(/\{(\w+?)\}/g,(function(t,e){return l[e]})),h}}}const u=c;function d(t,e){const i=t.Contents.Layer,n=i?.find((function(t){return t.Identifier==e.layer}));if(!n)return null;const s=t.Contents.TileMatrixSet;let o;o=n.TileMatrixSetLink.length>1?"projection"in e?n.TileMatrixSetLink.findIndex((function(t){const i=s.find((function(e){return e.Identifier==t.TileMatrixSet})).SupportedCRS,n=(0,a.Jt)(i),r=(0,a.Jt)(e.projection);return n&&r?(0,a.tI)(n,r):i==e.projection})):n.TileMatrixSetLink.findIndex((function(t){return t.TileMatrixSet==e.matrixSet})):0,o<0&&(o=0);const h=n.TileMatrixSetLink[o].TileMatrixSet,c=n.TileMatrixSetLink[o].TileMatrixSetLimits;let u=n.Format[0];"format"in e&&(u=e.format),o=n.Style.findIndex((function(t){return"style"in e?t.Title==e.style:t.isDefault})),o<0&&(o=0);const d=n.Style[o].Identifier,g={};"Dimension"in n&&n.Dimension.forEach((function(t,e,i){const n=t.Identifier;let s=t.Default;void 0===s&&(s=t.Value[0]),g[n]=s}));const _=t.Contents.TileMatrixSet.find((function(t){return t.Identifier==h}));let f;const p=_.SupportedCRS;if(p&&(f=(0,a.Jt)(p)),"projection"in e){const t=(0,a.Jt)(e.projection);t&&(f&&!(0,a.tI)(t,f)||(f=t))}let m=!1;const x="ne"==f.getAxisOrientation().substr(0,2);let v=_.TileMatrix[0],y={MinTileCol:0,MinTileRow:0,MaxTileCol:v.MatrixWidth-1,MaxTileRow:v.MatrixHeight-1};if(c){y=c[c.length-1];const t=_.TileMatrix.find((t=>t.Identifier===y.TileMatrix||_.Identifier+":"+t.Identifier===y.TileMatrix));t&&(v=t)}const E=28e-5*v.ScaleDenominator/f.getMetersPerUnit(),T=x?[v.TopLeftCorner[1],v.TopLeftCorner[0]]:v.TopLeftCorner,A=v.TileWidth*E,C=v.TileHeight*E;let S=_.BoundingBox;S&&x&&(S=[S[1],S[0],S[3],S[2]]);let R=[T[0]+A*y.MinTileCol,T[1]-C*(1+y.MaxTileRow),T[0]+A*(1+y.MaxTileCol),T[1]-C*y.MinTileRow];if(void 0!==S&&!(0,r.ms)(S,R)){const t=n.WGS84BoundingBox,e=(0,a.Jt)("EPSG:4326").getExtent();if(R=S,t)m=t[0]===e[0]&&t[2]===e[2];else{const t=(0,a.DI)(S,_.SupportedCRS,"EPSG:4326");m=t[0]-1e-10<=e[0]&&t[2]+1e-10>=e[2]}}const w=function(t,e,i){const n=[],s=[],r=[],o=[],h=[];i=void 0!==i?i:[];const c="TileMatrix",u="Identifier",d="ScaleDenominator",g="TopLeftCorner",_=t.SupportedCRS,f=(0,a.Jt)(_),p=f.getMetersPerUnit(),m="ne"==f.getAxisOrientation().substr(0,2);return t[c].sort((function(t,e){return e[d]-t[d]})),t[c].forEach((function(e){let a;if(a=!(i.length>0)||i.find((function(i){return e[u]==i[c]||!e[u].includes(":")&&t[u]+":"+e[u]===i[c]})),a){s.push(e[u]);const t=28e-5*e[d]/p,i=e.TileWidth,a=e.TileHeight;m?r.push([e[g][1],e[g][0]]):r.push(e[g]),n.push(t),o.push(i==a?i:[i,a]),h.push([e.MatrixWidth,e.MatrixHeight])}})),new l({extent:e,origins:r,resolutions:n,matrixIds:s,tileSizes:o,sizes:h})}(_,R,c),b=[];let I=e.requestEncoding;if(I=void 0!==I?I:"","OperationsMetadata"in t&&"GetTile"in t.OperationsMetadata){const e=t.OperationsMetadata.GetTile.DCP.HTTP.Get;for(let t=0,i=e.length;t{"use strict";i.d(e,{A:()=>o});var n=i(8512),s=i(4863);class r extends n.A{constructor(t){const e=void 0!==(t=t||{}).projection?t.projection:"EPSG:3857",i=void 0!==t.tileGrid?t.tileGrid:(0,s.EN)({extent:(0,s.kZ)(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:t.opaque,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=void 0!==t.gutter?t.gutter:0}getGutter(){return this.gutter_}}const o=r},2192:(t,e,i)=>{"use strict";i.d(e,{B:()=>n});const n=4},7500:(t,e,i)=>{"use strict";i.d(e,{$q:()=>x,AE:()=>_,Eq:()=>p,W3:()=>f,jD:()=>u,y4:()=>m});var n=i(2192),s=i(4465),r=i(2806),o=i(3938),a=i(1597),l=i(915),h=i(3407),c=i(9925);const u="1.3.0",d=[101,101];function g(t,e,i,n,o){o.WIDTH=i[0],o.HEIGHT=i[1];const a=n.getAxisOrientation();let l;const h=(0,r.Z)(o.VERSION,"1.3")>=0;return o[h?"CRS":"SRS"]=n.getCode(),l=h&&"ne"==a.substr(0,2)?[e[1],e[0],e[3],e[2]]:e,o.BBOX=l.join(","),(0,s.L)(t,o)}function _(t,e,i,s,r,o,h){o=Object.assign({REQUEST:"GetMap"},o);const c=e/i,u=[(0,a.LI)((0,l.RG)(t)/c,n.B),(0,a.LI)((0,l.Oq)(t)/c,n.B)];if(1!=i)switch(h){case"geoserver":const t=90*i+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+t:o.FORMAT_OPTIONS="dpi:"+t;break;case"mapserver":o.MAP_RESOLUTION=90*i;break;case"carmentaserver":case"qgis":o.DPI=90*i;break;default:throw new Error("Unknown `serverType` configured")}return g(r,t,u,s,o)}function f(t,e){return Object.assign({REQUEST:e,SERVICE:"WMS",VERSION:u,FORMAT:"image/png",STYLES:"",TRANSPARENT:!0},t)}function p(t){const e=void 0===t.hidpi||t.hidpi,i=(0,h.Jt)(t.projection||"EPSG:3857"),n=t.ratio||1.5,s=t.load||o.D4;return(r,o,a)=>{r=(0,c.QD)(r,o,a,n),1==a||e&&void 0!==t.serverType||(a=1);const l=_(r,o,a,i,t.url,f(t.params,"GetMap"),t.serverType),h=new Image;return null!==t.crossOrigin&&(h.crossOrigin=t.crossOrigin),s(h,l).then((t=>({image:t,extent:r,pixelRatio:a})))}}function m(t,e,i){if(void 0===t.url)return;const s=(0,h.Jt)(t.projection||"EPSG:3857"),o=(0,l.Bg)(e,i,0,d),c={QUERY_LAYERS:t.params.LAYERS,INFO_FORMAT:"application/json"};Object.assign(c,f(t.params,"GetFeatureInfo"),t.params);const u=(0,a.RI)((e[0]-o[0])/i,n.B),_=(0,a.RI)((o[3]-e[1])/i,n.B),p=(0,r.Z)(c.VERSION,"1.3")>=0;return c[p?"I":"X"]=u,c[p?"J":"Y"]=_,g(t.url,o,d,s,c)}function x(t,e){if(void 0===t.url)return;const i={SERVICE:"WMS",VERSION:u,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===t.params||void 0===t.params.LAYER){const e=t.params.LAYERS;if(Array.isArray(e)&&1!==e.length)return;i.LAYER=e}if(void 0!==e){const n=(0,h.Jt)(t.projection||"EPSG:3857").getMetersPerUnit()||1,s=28e-5;i.SCALE=e*n/s}return Object.assign(i,t.params),(0,s.L)(t.url,i)}},2490:(t,e,i)=>{"use strict";i.d(e,{Yf:()=>r,cY:()=>o});var n=i(1597);const s=6371008.8;function r(t,e,i){i=i||s;const r=(0,n.eh)(t[1]),o=(0,n.eh)(e[1]),a=(o-r)/2,l=(0,n.eh)(e[0]-t[0])/2,h=Math.sin(a)*Math.sin(a)+Math.sin(l)*Math.sin(l)*Math.cos(r)*Math.cos(o);return 2*i*Math.atan2(Math.sqrt(h),Math.sqrt(1-h))}function o(t,e,i,r){r=r||s;const o=(0,n.eh)(t[1]),a=(0,n.eh)(t[0]),l=e/r,h=Math.asin(Math.sin(o)*Math.cos(l)+Math.cos(o)*Math.sin(l)*Math.cos(i)),c=a+Math.atan2(Math.sin(i)*Math.sin(l)*Math.cos(o),Math.cos(l)-Math.sin(o)*Math.sin(h));return[(0,n.xW)(c),(0,n.xW)(h)]}},2806:(t,e,i)=>{"use strict";function n(t,e,i){const n=void 0!==i?t.toFixed(i):""+t;let s=n.indexOf(".");return s=-1===s?n.length:s,s>e?n:new Array(1+e-s).join("0")+n}function s(t,e){const i=(""+t).split("."),n=(""+e).split(".");for(let t=0;ts)return 1;if(s>e)return-1}return 0}i.d(e,{H:()=>n,Z:()=>s})},4969:(t,e,i)=>{"use strict";i.d(e,{A:()=>s});var n=i(588);const s=class{constructor(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;for(;e;)t(e.value_,e.key_,this),e=e.newer}get(t,e){const i=this.entries_[t];return(0,n.v)(void 0!==i,"Tried to get a value for a key that does not exist in the cache"),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_}remove(t){const e=this.entries_[t];return(0,n.v)(void 0!==e,"Tried to get a value for a key that does not exist in the cache"),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_}getCount(){return this.count_}getKeys(){const t=new Array(this.count_);let e,i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.key_;return t}getValues(){const t=new Array(this.count_);let e,i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){return this.entries_[t]?.value_}pop(){const t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){(0,n.v)(!(t in this.entries_),"Tried to set a value for a key that is used already");const i={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[t]=i,++this.count_}setSize(t){this.highWaterMark=t}}},5902:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(5341),s=i(915),r=i(4087),o=i(3530);const a=class{constructor(t){this.rbush_=new n(t),this.items_={}}insert(t,e){const i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[(0,r.v6)(e)]=i}load(t,e){const i=new Array(e.length);for(let n=0,s=e.length;n{"use strict";i.d(e,{A:()=>r});var n=i(6936);class s extends n.A{constructor(t){super({points:1/0,fill:(t=t||{radius:5}).fill,radius:t.radius,stroke:t.stroke,scale:void 0!==t.scale?t.scale:1,rotation:void 0!==t.rotation?t.rotation:0,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new s({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}setRadius(t){this.radius_=t,this.render()}}const r=s},3628:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(6141),s=i(7907);class r{constructor(t){t=t||{},this.patternImage_=null,this.color_=null,void 0!==t.color&&this.setColor(t.color)}clone(){const t=this.getColor();return new r({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){if(null!==t&&"object"==typeof t&&"src"in t){const e=(0,s.J)(null,t.src,"anonymous",void 0,t.offset?null:t.color?t.color:null,!(t.offset&&t.size));e.ready().then((()=>{this.patternImage_=null})),e.getImageState()===n.A.IDLE&&e.load(),e.getImageState()===n.A.LOADING&&(this.patternImage_=e)}this.color_=t}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}const o=r},9700:(t,e,i)=>{"use strict";i.d(e,{A:()=>d});var n=i(6837),s=i(6141),r=i(940),o=i(3730),a=i(588),l=i(7907),h=i(4087);function c(t,e,i,n){return void 0!==i&&void 0!==n?[i/t,n/e]:void 0!==i?i/t:void 0!==n?n/e:1}class u extends r.A{constructor(t){const e=void 0!==(t=t||{}).opacity?t.opacity:1,i=void 0!==t.rotation?t.rotation:0,n=void 0!==t.scale?t.scale:1,r=void 0!==t.rotateWithView&&t.rotateWithView;super({opacity:e,rotation:i,scale:n,displacement:void 0!==t.displacement?t.displacement:[0,0],rotateWithView:r,declutterMode:t.declutterMode}),this.anchor_=void 0!==t.anchor?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==t.anchorOrigin?t.anchorOrigin:"top-left",this.anchorXUnits_=void 0!==t.anchorXUnits?t.anchorXUnits:"fraction",this.anchorYUnits_=void 0!==t.anchorYUnits?t.anchorYUnits:"fraction",this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null;const u=void 0!==t.img?t.img:null;let d,g=t.src;if((0,a.v)(!(void 0!==g&&u),"`image` and `src` cannot be provided at the same time"),void 0!==g&&0!==g.length||!u||(g=u.src||(0,h.v6)(u)),(0,a.v)(void 0!==g&&g.length>0,"A defined and non-empty `src` or `image` must be provided"),(0,a.v)(!((void 0!==t.width||void 0!==t.height)&&void 0!==t.scale),"`width` or `height` cannot be provided together with `scale`"),void 0!==t.src?d=s.A.IDLE:void 0!==u&&(d="complete"in u?u.complete?u.src?s.A.LOADED:s.A.IDLE:s.A.LOADING:s.A.LOADED),this.color_=void 0!==t.color?(0,o._j)(t.color):null,this.iconImage_=(0,l.J)(u,g,this.crossOrigin_,d,this.color_),this.offset_=void 0!==t.offset?t.offset:[0,0],this.offsetOrigin_=void 0!==t.offsetOrigin?t.offsetOrigin:"top-left",this.origin_=null,this.size_=void 0!==t.size?t.size:null,void 0!==t.width||void 0!==t.height){let e,i;if(t.size)[e,i]=t.size;else{const n=this.getImage(1);if(n.width&&n.height)e=n.width,i=n.height;else if(n instanceof HTMLImageElement){this.initialOptions_=t;const e=()=>{if(this.unlistenImageChange(e),!this.initialOptions_)return;const i=this.iconImage_.getSize();this.setScale(c(i[0],i[1],t.width,t.height))};return void this.listenImageChange(e)}}void 0!==e&&this.setScale(c(e,i,t.width,t.height))}}clone(){let t,e,i;return this.initialOptions_?(e=this.initialOptions_.width,i=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new u({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:i,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const e=this.getSize();if("fraction"==this.anchorXUnits_||"fraction"==this.anchorYUnits_){if(!e)return null;t=this.anchor_.slice(),"fraction"==this.anchorXUnits_&&(t[0]*=e[0]),"fraction"==this.anchorYUnits_&&(t[1]*=e[1])}if("top-left"!=this.anchorOrigin_){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),"top-right"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[0]=-t[0]+e[0]),"bottom-left"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]-e[0]/i[0],t[1]+e[1]/i[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if("top-left"!=this.offsetOrigin_){const e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),"top-right"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[0]=i[0]-e[0]-t[0]),"bottom-left"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();return this.size_?this.size_[0]*t[0]:this.iconImage_.getImageState()==s.A.LOADED?this.iconImage_.getSize()[0]*t[0]:void 0}getHeight(){const t=this.getScaleArray();return this.size_?this.size_[1]*t[1]:this.iconImage_.getImageState()==s.A.LOADED?this.iconImage_.getSize()[1]*t[1]:void 0}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(n.A.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(n.A.CHANGE,t)}ready(){return this.iconImage_.ready()}}const d=u},7907:(t,e,i)=>{"use strict";i.d(e,{J:()=>d});var n=i(9332),s=i(6837),r=i(6141),o=i(3730),a=i(8711),l=i(3938),h=i(2241);let c=null;class u extends n.A{constructor(t,e,i,n,s){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=i,this.canvas_={},this.color_=s,this.imageState_=void 0===n?r.A.IDLE:n,this.size_=t&&t.width&&t.height?[t.width,t.height]:null,this.src_=e,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(void 0===this.tainted_&&this.imageState_===r.A.LOADED){c||(c=(0,a.Y)(1,1,void 0,{willReadFrequently:!0})),c.drawImage(this.image_,0,0);try{c.getImageData(0,0,1,1),this.tainted_=!1}catch(t){c=null,this.tainted_=!0}}return!0===this.tainted_}dispatchChangeEvent_(){this.dispatchEvent(s.A.CHANGE)}handleImageError_(){this.imageState_=r.A.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=r.A.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],i=(0,a.Y)(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===r.A.IDLE){this.image_||this.initializeImage_(),this.imageState_=r.A.LOADING;try{void 0!==this.src_&&(this.image_.src=this.src_)}catch(t){this.handleImageError_()}this.image_ instanceof HTMLImageElement&&(0,l.RA)(this.image_,this.src_).then((t=>{this.image_=t,this.handleImageLoad_()})).catch(this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==r.A.LOADED)return;const e=this.image_,i=document.createElement("canvas");i.width=Math.ceil(e.width*t),i.height=Math.ceil(e.height*t);const n=i.getContext("2d");n.scale(t,t),n.drawImage(e,0,0),n.globalCompositeOperation="multiply",n.fillStyle=(0,o.oJ)(this.color_),n.fillRect(0,0,i.width/t,i.height/t),n.globalCompositeOperation="destination-in",n.drawImage(e,0,0),this.canvas_[t]=i}ready(){return this.ready_||(this.ready_=new Promise((t=>{this.imageState_===r.A.LOADED||this.imageState_===r.A.ERROR?t():this.addEventListener(s.A.CHANGE,(function e(){this.imageState_!==r.A.LOADED&&this.imageState_!==r.A.ERROR||(this.removeEventListener(s.A.CHANGE,e),t())}))}))),this.ready_}}function d(t,e,i,n,s,r){let o=void 0===e?void 0:h.ue.get(e,i,s);return o||(o=new u(t,t&&"src"in t?t.src||void 0:e,i,n,s),h.ue.set(e,i,s,o,r)),r&&o&&!h.ue.getPattern(e,i,s)&&h.ue.set(e,i,s,o,r),o}},2241:(t,e,i)=>{"use strict";i.d(e,{ue:()=>a});var n=i(6141),s=i(3730),r=i(8711);function o(t,e,i){return e+":"+t+":"+(i?(0,s._j)(i):"null")}const a=new class{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const i=this.cache_[e];3&t++||i.hasListener()||(delete this.cache_[e],delete this.patternCache_[e],--this.cacheSize_)}}}get(t,e,i){const n=o(t,e,i);return n in this.cache_?this.cache_[n]:null}getPattern(t,e,i){const n=o(t,e,i);return n in this.patternCache_?this.patternCache_[n]:null}set(t,e,i,s,a){const l=o(t,e,i),h=l in this.cache_;this.cache_[l]=s,a&&(s.getImageState()===n.A.IDLE&&s.load(),s.getImageState()===n.A.LOADING?s.ready().then((()=>{this.patternCache_[l]=(0,r.lr)().createPattern(s.getImage(1),"repeat")})):this.patternCache_[l]=(0,r.lr)().createPattern(s.getImage(1),"repeat")),h||++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}},940:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(4087),s=i(4401);class r{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=(0,s.xq)(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new r({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return(0,n.b0)()}getImage(t){return(0,n.b0)()}getHitDetectionImage(){return(0,n.b0)()}getPixelRatio(t){return 1}getImageState(){return(0,n.b0)()}getImageSize(){return(0,n.b0)()}getOrigin(){return(0,n.b0)()}getSize(){return(0,n.b0)()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=(0,s.xq)(t)}listenImageChange(t){(0,n.b0)()}load(){(0,n.b0)()}unlistenImageChange(t){(0,n.b0)()}ready(){return Promise.resolve()}}const o=r},6936:(t,e,i)=>{"use strict";i.d(e,{A:()=>c});var n=i(6141),s=i(940),r=i(3730),o=i(7295),a=i(8711),l=i(8774);class h extends s.A{constructor(t){super({opacity:1,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,rotation:void 0!==t.rotation?t.rotation:0,scale:void 0!==t.scale?t.scale:1,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvases_,this.hitDetectionCanvas_=null,this.fill_=void 0!==t.fill?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=t.radius,this.radius2_=t.radius2,this.angle_=void 0!==t.angle?t.angle:0,this.stroke_=void 0!==t.stroke?t.stroke:null,this.size_,this.renderOptions_,this.imageState_=this.fill_&&this.fill_.loading()?n.A.LOADING:n.A.LOADED,this.imageState_===n.A.LOADING&&this.ready().then((()=>this.imageState_=n.A.LOADED)),this.render()}clone(){const t=this.getScale(),e=new h({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_,e=this.getDisplacement(),i=this.getScaleArray();return[t[0]/2-e[0]/i[0],t[1]/2+e[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(t){let e=this.canvases_[t];if(!e){const i=this.renderOptions_,n=(0,a.Y)(i.size*t,i.size*t);this.draw_(i,n,t),e=n.canvas,this.canvases_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,i){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;let n=this.radius_,s=void 0===this.radius2_?n:this.radius2_;if(n{"use strict";i.d(e,{A:()=>s});class n{constructor(t){t=t||{},this.color_=void 0!==t.color?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=void 0!==t.lineDash?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new n({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}const s=n},9276:(t,e,i)=>{"use strict";i.d(e,{Ay:()=>g,d1:()=>c,mC:()=>l,mY:()=>u});var n=i(7733),s=i(3628),r=i(953),o=i(588);class a{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=d,void 0!==t.geometry&&this.setGeometry(t.geometry),this.fill_=void 0!==t.fill?t.fill:null,this.image_=void 0!==t.image?t.image:null,this.renderer_=void 0!==t.renderer?t.renderer:null,this.hitDetectionRenderer_=void 0!==t.hitDetectionRenderer?t.hitDetectionRenderer:null,this.stroke_=void 0!==t.stroke?t.stroke:null,this.text_=void 0!==t.text?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&"object"==typeof t&&(t=t.clone()),new a({geometry:t??void 0,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer()??void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=d,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function l(t){let e;if("function"==typeof t)e=t;else{let i;Array.isArray(t)?i=t:((0,o.v)("function"==typeof t.getZIndex,"Expected an `Style` or an array of `Style`"),i=[t]),e=function(){return i}}return e}let h=null;function c(t,e){if(!h){const t=new s.A({color:"rgba(255,255,255,0.4)"}),e=new r.A({color:"#3399CC",width:1.25});h=[new a({image:new n.A({fill:t,stroke:e,radius:5}),fill:t,stroke:e})]}return h}function u(){const t={},e=[255,255,255,1],i=[0,153,255,1];return t.Polygon=[new a({fill:new s.A({color:[255,255,255,.5]})})],t.MultiPolygon=t.Polygon,t.LineString=[new a({stroke:new r.A({color:e,width:5})}),new a({stroke:new r.A({color:i,width:3})})],t.MultiLineString=t.LineString,t.Circle=t.Polygon.concat(t.LineString),t.Point=[new a({image:new n.A({radius:6,fill:new s.A({color:i}),stroke:new r.A({color:e,width:1.5})}),zIndex:1/0})],t.MultiPoint=t.Point,t.GeometryCollection=t.Polygon.concat(t.LineString,t.Point),t}function d(t){return t.getGeometry()}const g=a},1426:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(3628),s=i(4401);class r{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=(0,s.xq)(void 0!==t.scale?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.repeat_=t.repeat,this.textBaseline_=t.textBaseline,this.fill_=void 0!==t.fill?t.fill:new n.A({color:"#333"}),this.maxAngle_=void 0!==t.maxAngle?t.maxAngle:Math.PI/4,this.placement_=void 0!==t.placement?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=void 0!==t.stroke?t.stroke:null,this.offsetX_=void 0!==t.offsetX?t.offsetX:0,this.offsetY_=void 0!==t.offsetY?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=void 0===t.padding?null:t.padding,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new r({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0,declutterMode:this.getDeclutterMode()})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}getDeclutterMode(){return this.declutterMode_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRepeat(t){this.repeat_=t}setRotateWithView(t){this.rotateWithView_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=(0,s.xq)(void 0!==t?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}const o=r},186:(t,e,i)=>{"use strict";function n(t,e,i,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=i,n):[t,e,i]}function s(t,e,i){return t+"/"+e+"/"+i}function r(t){return s(t[0],t[1],t[2])}function o(t){const[e,i,n]=t.substring(t.lastIndexOf("/")+1,t.length).split(",").map(Number);return s(e,i,n)}function a(t){return t.split("/").map(Number)}function l(t){return(t[1]<i||i>e.getMaxZoom())return!1;const r=e.getFullTileRange(i);return!r||r.containsXY(n,s)}i.d(e,{K:()=>a,N:()=>n,N5:()=>h,dp:()=>s,gr:()=>o,i7:()=>r,tW:()=>l})},4863:(t,e,i)=>{"use strict";i.d(e,{EN:()=>c,Li:()=>h,kZ:()=>d,pr:()=>l});var n=i(6758),s=i(9496),r=i(3407),o=i(915),a=i(4401);function l(t){let e=t.getDefaultTileGrid();return e||(e=function(t,e,i,s){return function(t,e,i,s){s=void 0!==s?s:"top-left";const r=u(t,e,i);return new n.A({extent:t,origin:(0,o.qF)(t,s),resolutions:r,tileSize:i})}(d(t),void 0,void 0,void 0)}(t),t.setDefaultTileGrid(e)),e}function h(t,e,i){const n=e[0],s=t.getTileCoordCenter(e),r=d(i);if(!(0,o.Ym)(r,s)){const e=(0,o.RG)(r),i=Math.ceil((r[0]-s[0])/e);return s[0]+=e*i,t.getTileCoordForCoordAndZ(s,n)}return e}function c(t){const e=t||{},i=e.extent||(0,r.Jt)("EPSG:3857").getExtent(),s={extent:i,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:u(i,e.maxZoom,e.tileSize,e.maxResolution)};return new n.A(s)}function u(t,e,i,n){e=void 0!==e?e:s.L,i=(0,a.xq)(void 0!==i?i:s.R);const r=(0,o.Oq)(t),l=(0,o.RG)(t);n=n>0?n:Math.max(l/i[0],r/i[1]);const h=e+1,c=new Array(h);for(let t=0;t{"use strict";i.d(e,{A:()=>g});var n=i(1110),s=i(9496),r=i(588),o=i(1597),a=i(915),l=i(186),h=i(4350),c=i(6514),u=i(4401);const d=[0,0,0],g=class{constructor(t){let e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,(0,r.v)((0,c.WC)(this.resolutions_,((t,e)=>e-t),!0),"`resolutions` must be sorted in descending order"),!t.origins)for(let t=0,i=this.resolutions_.length-1;t{const s=new n.A(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));if(i){const t=this.getTileRangeForExtentAndZ(i,e);s.minX=Math.max(t.minX,s.minX),s.maxX=Math.min(t.maxX,s.maxX),s.minY=Math.max(t.minY,s.minY),s.maxY=Math.min(t.maxY,s.maxY)}return s})):i&&this.calculateTileRanges_(i)}forEachTileCoord(t,e,i){const n=this.getTileRangeForExtentAndZ(t,e);for(let t=n.minX,s=n.maxX;t<=s;++t)for(let s=n.minY,r=n.maxY;s<=r;++s)i([e,t,s])}forEachTileCoordParentTileRange(t,e,i,s){let r,o,a,l=null,h=t[0]-1;for(2===this.zoomFactor_?(o=t[1],a=t[2]):l=this.getTileCoordExtent(t,s);h>=this.minZoom;){if(void 0!==o&&void 0!==a?(o=Math.floor(o/2),a=Math.floor(a/2),r=(0,n.N)(o,o,a,a,i)):r=this.getTileRangeForExtentAndZ(l,h,i),e(h,r))return!0;--h}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(t){return this.origin_?this.origin_:this.origins_[t]}getResolution(t){return this.resolutions_[t]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(t,e,i){if(t[0]this.maxZoom||e{"use strict";i.d(e,{L:()=>n,R:()=>s});const n=42,s=256},2654:(t,e,i)=>{"use strict";i.d(e,{FD:()=>a,Qz:()=>o,Uu:()=>l});var n=i(1597),s=i(186);function r(t,e){const i=/\{z\}/g,n=/\{x\}/g,s=/\{y\}/g,r=/\{-y\}/g;return function(o,a,l){if(o)return t.replace(i,o[0].toString()).replace(n,o[1].toString()).replace(s,o[2].toString()).replace(r,(function(){const t=o[0],i=e.getFullTileRange(t);if(!i)throw new Error("The {-y} placeholder requires a tile grid with extent");return(i.getHeight()-o[2]-1).toString()}))}}function o(t,e){const i=t.length,n=new Array(i);for(let s=0;s{"use strict";i.d(e,{Bb:()=>c,T9:()=>f,Tl:()=>g,Zz:()=>_,cL:()=>o,dI:()=>m,e$:()=>u,hs:()=>d,k3:()=>h,lw:()=>a,vt:()=>r});var n=i(588);const s=new Array(6);function r(){return[1,0,0,1,0,0]}function o(t){return l(t,1,0,0,1,0,0)}function a(t,e){const i=t[0],n=t[1],s=t[2],r=t[3],o=t[4],a=t[5],l=e[0],h=e[1],c=e[2],u=e[3],d=e[4],g=e[5];return t[0]=i*l+s*h,t[1]=n*l+r*h,t[2]=i*c+s*u,t[3]=n*c+r*u,t[4]=i*d+s*g+o,t[5]=n*d+r*g+a,t}function l(t,e,i,n,s,r,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=s,t[4]=r,t[5]=o,t}function h(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function c(t,e){const i=e[0],n=e[1];return e[0]=t[0]*i+t[2]*n+t[4],e[1]=t[1]*i+t[3]*n+t[5],e}function u(t,e){const i=Math.cos(e),n=Math.sin(e);return a(t,l(s,i,n,-n,i,0,0))}function d(t,e,i){return a(t,l(s,e,0,0,i,0,0))}function g(t,e,i){return a(t,l(s,1,0,0,1,e,i))}function _(t,e,i,n,s,r,o,a){const l=Math.sin(r),h=Math.cos(r);return t[0]=n*h,t[1]=s*l,t[2]=-n*l,t[3]=s*h,t[4]=o*n*h-a*n*l+e,t[5]=o*s*l+a*s*h+i,t}function f(t,e){const i=(s=e)[0]*s[3]-s[1]*s[2];var s;(0,n.v)(0!==i,"Transformation matrix cannot be inverted");const r=e[0],o=e[1],a=e[2],l=e[3],h=e[4],c=e[5];return t[0]=l/i,t[1]=-o/i,t[2]=-a/i,t[3]=r/i,t[4]=(a*c-l*h)/i,t[5]=-(r*c-o*h)/i,t}const p=[1e6,1e6,1e6,1e6,2,2];function m(t){return"matrix("+t.map(((t,e)=>Math.round(t*p[e])/p[e])).join(", ")+")"}},4465:(t,e,i)=>{"use strict";function n(t,e){const i=[];Object.keys(e).forEach((function(t){null!==e[t]&&void 0!==e[t]&&i.push(t+"="+encodeURIComponent(e[t]))}));const n=i.join("&");return t=t.replace(/[?&]$/,""),(t+=t.includes("?")?"&":"?")+n}i.d(e,{L:()=>n})},3954:(t,e,i)=>{"use strict";function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(t,e){return t[0]=e[0],t[1]=e[1],t[4]=e[2],t[5]=e[3],t[12]=e[4],t[13]=e[5],t}i.d(e,{Z:()=>s,v:()=>n})},130:(t,e,i)=>{"use strict";i.d(e,{Be:()=>l,Ek:()=>a,H7:()=>s,IP:()=>r,JL:()=>c,SD:()=>_,Ss:()=>o,UD:()=>u,l4:()=>h,zH:()=>d});var n=i(7771);const s=34962,r=34963,o=35040,a=35044,l=35048,h=5121,c=5123,u=5125,d=5126,g=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function _(t,e){e=Object.assign({preserveDrawingBuffer:!0,antialias:!n.oF},e);const i=g.length;for(let n=0;n{"use strict";i.d(e,{Ay:()=>a});var n=i(130),s=i(588);const r={STATIC_DRAW:n.Ek,STREAM_DRAW:n.Ss,DYNAMIC_DRAW:n.Be};function o(t){switch(t){case n.H7:return Float32Array;case n.IP:return Uint32Array;default:return Float32Array}}const a=class{constructor(t,e){this.array_=null,this.type_=t,(0,s.v)(t===n.H7||t===n.IP,"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`"),this.usage_=void 0!==e?e:r.STATIC_DRAW}ofSize(t){return this.array_=new(o(this.type_))(t),this}fromArray(t){return this.array_=o(this.type_).from(t),this}fromArrayBuffer(t){return this.array_=new(o(this.type_))(t),this}getType(){return this.type_}getArray(){return this.array_}getUsage(){return this.usage_}getSize(){return this.array_?this.array_.length:0}}},9777:(t,e,i)=>{"use strict";i.d(e,{jQ:()=>g,M8:()=>d,Ay:()=>v});const n="webglcontextlost",s="webglcontextrestored";var r=i(25),o=i(4087);const a=class{constructor(t){this.gl_=t.webGlContext;const e=this.gl_;this.scaleRatio_=t.scaleRatio||1,this.renderTargetTexture_=e.createTexture(),this.renderTargetTextureSize_=null,this.frameBuffer_=e.createFramebuffer(),this.depthBuffer_=e.createRenderbuffer();const i=e.createShader(e.VERTEX_SHADER);e.shaderSource(i,t.vertexShader||"\n precision mediump float;\n \n attribute vec2 a_position;\n varying vec2 v_texCoord;\n varying vec2 v_screenCoord;\n \n uniform vec2 u_screenSize;\n \n void main() {\n v_texCoord = a_position * 0.5 + 0.5;\n v_screenCoord = v_texCoord * u_screenSize;\n gl_Position = vec4(a_position, 0.0, 1.0);\n }\n"),e.compileShader(i);const n=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(n,t.fragmentShader||"\n precision mediump float;\n \n uniform sampler2D u_image;\n uniform float u_opacity;\n \n varying vec2 v_texCoord;\n \n void main() {\n gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\n }\n"),e.compileShader(n),this.renderTargetProgram_=e.createProgram(),e.attachShader(this.renderTargetProgram_,i),e.attachShader(this.renderTargetProgram_,n),e.linkProgram(this.renderTargetProgram_),this.renderTargetVerticesBuffer_=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,-1,1,1,-1,1]),e.STATIC_DRAW),this.renderTargetAttribLocation_=e.getAttribLocation(this.renderTargetProgram_,"a_position"),this.renderTargetUniformLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_screenSize"),this.renderTargetOpacityLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_opacity"),this.renderTargetTextureLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_image"),this.uniforms_=[],t.uniforms&&Object.keys(t.uniforms).forEach((i=>{this.uniforms_.push({value:t.uniforms[i],location:e.getUniformLocation(this.renderTargetProgram_,i)})}))}getGL(){return this.gl_}init(t){const e=this.getGL(),i=[e.drawingBufferWidth*this.scaleRatio_,e.drawingBufferHeight*this.scaleRatio_];if(e.bindFramebuffer(e.FRAMEBUFFER,this.getFrameBuffer()),e.bindRenderbuffer(e.RENDERBUFFER,this.getDepthBuffer()),e.viewport(0,0,i[0],i[1]),!this.renderTargetTextureSize_||this.renderTargetTextureSize_[0]!==i[0]||this.renderTargetTextureSize_[1]!==i[1]){this.renderTargetTextureSize_=i;const t=0,n=e.RGBA,s=0,r=e.RGBA,o=e.UNSIGNED_BYTE,a=null;e.bindTexture(e.TEXTURE_2D,this.renderTargetTexture_),e.texImage2D(e.TEXTURE_2D,t,n,i[0],i[1],s,r,o,a),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.renderTargetTexture_,0),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,i[0],i[1]),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,this.depthBuffer_)}}apply(t,e,i,n){const s=this.getGL(),r=t.size;if(s.bindFramebuffer(s.FRAMEBUFFER,e?e.getFrameBuffer():null),s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,this.renderTargetTexture_),!e){const e=(0,o.v6)(s.canvas);if(!t.renderTargets[e]){const i=s.getContextAttributes();i&&i.preserveDrawingBuffer&&(s.clearColor(0,0,0,0),s.clearDepth(1),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT)),t.renderTargets[e]=!0}}s.disable(s.DEPTH_TEST),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA),s.viewport(0,0,s.drawingBufferWidth,s.drawingBufferHeight),s.bindBuffer(s.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),s.useProgram(this.renderTargetProgram_),s.enableVertexAttribArray(this.renderTargetAttribLocation_),s.vertexAttribPointer(this.renderTargetAttribLocation_,2,s.FLOAT,!1,0,0),s.uniform2f(this.renderTargetUniformLocation_,r[0],r[1]),s.uniform1i(this.renderTargetTextureLocation_,0);const a=t.layerStatesArray[t.layerIndex].opacity;s.uniform1f(this.renderTargetOpacityLocation_,a),this.applyUniforms(t),i&&i(s,t),s.drawArrays(s.TRIANGLES,0,6),n&&n(s,t)}getFrameBuffer(){return this.frameBuffer_}getDepthBuffer(){return this.depthBuffer_}applyUniforms(t){const e=this.getGL();let i,n=1;this.uniforms_.forEach((function(s){if(i="function"==typeof s.value?s.value(t):s.value,i instanceof HTMLCanvasElement||i instanceof ImageData)s.texture||(s.texture=e.createTexture()),e.activeTexture(e[`TEXTURE${n}`]),e.bindTexture(e.TEXTURE_2D,s.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),i instanceof ImageData?e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,i.width,i.height,0,e.UNSIGNED_BYTE,new Uint8Array(i.data)):e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,i),e.uniform1i(s.location,n++);else if(Array.isArray(i))switch(i.length){case 2:return void e.uniform2f(s.location,i[0],i[1]);case 3:return void e.uniform3f(s.location,i[0],i[1],i[2]);case 4:return void e.uniform4f(s.location,i[0],i[1],i[2],i[3]);default:return}else"number"==typeof i&&e.uniform1f(s.location,i)}))}};var l=i(130),h=i(3530),c=i(9703),u=i(3954);const d={PROJECTION_MATRIX:"u_projectionMatrix",SCREEN_TO_WORLD_MATRIX:"u_screenToWorldMatrix",TIME:"u_time",ZOOM:"u_zoom",RESOLUTION:"u_resolution",ROTATION:"u_rotation",VIEWPORT_SIZE_PX:"u_viewportSizePx",PIXEL_RATIO:"u_pixelRatio",HIT_DETECTION:"u_hitDetection"},g={UNSIGNED_BYTE:l.l4,UNSIGNED_SHORT:l.JL,UNSIGNED_INT:l.UD,FLOAT:l.zH},_={};function f(t){return"shared/"+t}let p=0;class m extends r.A{constructor(t){super(),t=t||{},this.boundHandleWebGLContextLost_=this.handleWebGLContextLost.bind(this),this.boundHandleWebGLContextRestored_=this.handleWebGLContextRestored.bind(this),this.canvasCacheKey_=t.canvasCacheKey?f(t.canvasCacheKey):function(){const t="unique/"+p;return p+=1,t}(),this.gl_=function(t){let e=_[t];if(!e){const i=document.createElement("canvas");i.width=1,i.height=1,i.style.position="absolute",i.style.left="0",e={users:0,context:(0,l.SD)(i)},_[t]=e}return e.users+=1,e.context}(this.canvasCacheKey_),this.bufferCache_={},this.extensionCache_={},this.currentProgram_=null,this.needsToBeRecreated_=!1;const e=this.gl_.canvas;e.addEventListener(n,this.boundHandleWebGLContextLost_),e.addEventListener(s,this.boundHandleWebGLContextRestored_),this.offsetRotateMatrix_=(0,c.vt)(),this.offsetScaleMatrix_=(0,c.vt)(),this.tmpMat4_=(0,u.v)(),this.uniformLocationsByProgram_={},this.attribLocationsByProgram_={},this.uniforms_=[],t.uniforms&&this.setUniforms(t.uniforms),this.postProcessPasses_=t.postProcesses?t.postProcesses.map((t=>new a({webGlContext:this.gl_,scaleRatio:t.scaleRatio,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms}))):[new a({webGlContext:this.gl_})],this.shaderCompileErrors_=null,this.startTime_=Date.now()}setUniforms(t){this.uniforms_=[],this.addUniforms(t)}addUniforms(t){for(const e in t)this.uniforms_.push({name:e,value:t[e]})}canvasCacheKeyMatches(t){return this.canvasCacheKey_===f(t)}getExtension(t){if(t in this.extensionCache_)return this.extensionCache_[t];const e=this.gl_.getExtension(t);return this.extensionCache_[t]=e,e}bindBuffer(t){const e=this.gl_,i=(0,o.v6)(t);let n=this.bufferCache_[i];n||(n={buffer:t,webGlBuffer:e.createBuffer()},this.bufferCache_[i]=n),e.bindBuffer(t.getType(),n.webGlBuffer)}flushBufferData(t){const e=this.gl_;this.bindBuffer(t),e.bufferData(t.getType(),t.getArray(),t.getUsage())}deleteBuffer(t){const e=this.gl_,i=(0,o.v6)(t),n=this.bufferCache_[i];n&&!e.isContextLost()&&e.deleteBuffer(n.webGlBuffer),delete this.bufferCache_[i]}disposeInternal(){const t=this.gl_.canvas;t.removeEventListener(n,this.boundHandleWebGLContextLost_),t.removeEventListener(s,this.boundHandleWebGLContextRestored_),function(t){const e=_[t];if(!e)return;if(e.users-=1,e.users>0)return;const i=e.context,n=i.getExtension("WEBGL_lose_context");n&&n.loseContext();const s=i.canvas;s.width=1,s.height=1,delete _[t]}(this.canvasCacheKey_),delete this.gl_}prepareDraw(t,e,i){const n=this.gl_,s=this.getCanvas(),r=t.size,o=t.pixelRatio;s.width===r[0]*o&&s.height===r[1]*o||(s.width=r[0]*o,s.height=r[1]*o,s.style.width=r[0]+"px",s.style.height=r[1]+"px");for(let e=this.postProcessPasses_.length-1;e>=0;e--)this.postProcessPasses_[e].init(t);n.bindTexture(n.TEXTURE_2D,null),n.clearColor(0,0,0,0),n.depthRange(0,1),n.clearDepth(1),n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT),n.enable(n.BLEND),n.blendFunc(n.ONE,e?n.ZERO:n.ONE_MINUS_SRC_ALPHA),i?(n.enable(n.DEPTH_TEST),n.depthFunc(n.LEQUAL)):n.disable(n.DEPTH_TEST)}bindTexture(t,e,i){const n=this.gl_;n.activeTexture(n.TEXTURE0+e),n.bindTexture(n.TEXTURE_2D,t),n.uniform1i(this.getUniformLocation(i),e)}prepareDrawToRenderTarget(t,e,i,n){const s=this.gl_,r=e.getSize();s.bindFramebuffer(s.FRAMEBUFFER,e.getFramebuffer()),s.bindRenderbuffer(s.RENDERBUFFER,e.getDepthbuffer()),s.viewport(0,0,r[0],r[1]),s.bindTexture(s.TEXTURE_2D,e.getTexture()),s.clearColor(0,0,0,0),s.depthRange(0,1),s.clearDepth(1),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.enable(s.BLEND),s.blendFunc(s.ONE,i?s.ZERO:s.ONE_MINUS_SRC_ALPHA),n?(s.enable(s.DEPTH_TEST),s.depthFunc(s.LEQUAL)):s.disable(s.DEPTH_TEST)}drawElements(t,e){const i=this.gl_;this.getExtension("OES_element_index_uint");const n=i.UNSIGNED_INT,s=e-t,r=4*t;i.drawElements(i.TRIANGLES,s,n,r)}finalizeDraw(t,e,i){for(let n=0,s=this.postProcessPasses_.length;n{if(i="function"==typeof s.value?s.value(t):s.value,i instanceof HTMLCanvasElement||i instanceof HTMLImageElement||i instanceof ImageData||i instanceof WebGLTexture){i instanceof WebGLTexture&&!s.texture?(s.prevValue=void 0,s.texture=i):s.texture||(s.prevValue=void 0,s.texture=e.createTexture()),this.bindTexture(s.texture,n,s.name),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);const t=!(i instanceof HTMLImageElement)||i.complete;i instanceof WebGLTexture||!t||s.prevValue===i||(s.prevValue=i,e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,i)),n++}else if(Array.isArray(i)&&6===i.length)this.setUniformMatrixValue(s.name,(0,u.Z)(this.tmpMat4_,i));else if(Array.isArray(i)&&i.length<=4)switch(i.length){case 2:return void e.uniform2f(this.getUniformLocation(s.name),i[0],i[1]);case 3:return void e.uniform3f(this.getUniformLocation(s.name),i[0],i[1],i[2]);case 4:return void e.uniform4f(this.getUniformLocation(s.name),i[0],i[1],i[2],i[3]);default:return}else"number"==typeof i&&e.uniform1f(this.getUniformLocation(s.name),i)}))}useProgram(t,e){this.gl_.useProgram(t),this.currentProgram_=t,this.applyFrameState(e),this.applyUniforms(e)}compileShader(t,e){const i=this.gl_,n=i.createShader(e);return i.shaderSource(n,t),i.compileShader(n),n}getProgram(t,e){const i=this.gl_,n=this.compileShader(t,i.FRAGMENT_SHADER),s=this.compileShader(e,i.VERTEX_SHADER),r=i.createProgram();if(i.attachShader(r,n),i.attachShader(r,s),i.linkProgram(r),!i.getShaderParameter(n,i.COMPILE_STATUS)){const t=`Fragment shader compilation failed: ${i.getShaderInfoLog(n)}`;throw new Error(t)}if(i.deleteShader(n),!i.getShaderParameter(s,i.COMPILE_STATUS)){const t=`Vertex shader compilation failed: ${i.getShaderInfoLog(s)}`;throw new Error(t)}if(i.deleteShader(s),!i.getProgramParameter(r,i.LINK_STATUS)){const t=`GL program linking failed: ${i.getProgramInfoLog(r)}`;throw new Error(t)}return r}getUniformLocation(t){const e=(0,o.v6)(this.currentProgram_);return void 0===this.uniformLocationsByProgram_[e]&&(this.uniformLocationsByProgram_[e]={}),void 0===this.uniformLocationsByProgram_[e][t]&&(this.uniformLocationsByProgram_[e][t]=this.gl_.getUniformLocation(this.currentProgram_,t)),this.uniformLocationsByProgram_[e][t]}getAttributeLocation(t){const e=(0,o.v6)(this.currentProgram_);return void 0===this.attribLocationsByProgram_[e]&&(this.attribLocationsByProgram_[e]={}),void 0===this.attribLocationsByProgram_[e][t]&&(this.attribLocationsByProgram_[e][t]=this.gl_.getAttribLocation(this.currentProgram_,t)),this.attribLocationsByProgram_[e][t]}makeProjectionTransform(t,e){const i=t.size,n=t.viewState.rotation,s=t.viewState.resolution,r=t.viewState.center;return(0,c.Zz)(e,0,0,2/(s*i[0]),2/(s*i[1]),-n,-r[0],-r[1]),e}setUniformFloatValue(t,e){this.gl_.uniform1f(this.getUniformLocation(t),e)}setUniformFloatVec2(t,e){this.gl_.uniform2fv(this.getUniformLocation(t),e)}setUniformFloatVec4(t,e){this.gl_.uniform4fv(this.getUniformLocation(t),e)}setUniformMatrixValue(t,e){this.gl_.uniformMatrix4fv(this.getUniformLocation(t),!1,e)}enableAttributeArray_(t,e,i,n,s){const r=this.getAttributeLocation(t);r<0||(this.gl_.enableVertexAttribArray(r),this.gl_.vertexAttribPointer(r,e,i,!1,n,s))}enableAttributes(t){const e=function(t){let e=0;for(let i=0;i{e.r(o),e.d(o,{default:()=>r});const r="import React, {useCallback} from 'react';\nimport {fromLonLat} from 'ol/proj';\nimport {Coordinate} from 'ol/coordinate';\nimport {Polygon, Point} from 'ol/geom';\nimport 'ol/ol.css';\n\nimport {RMap, ROSM, RLayerVector, RFeature, RPopup} from 'rlayers';\nimport {RStyle, RIcon, RFill, RStroke} from 'rlayers/style';\n\nimport locationIcon from './svg/location.svg';\nimport {Feature} from 'ol';\n\nconst coords: Record = {\n origin: [2.364, 48.82],\n ArcDeTriomphe: [2.295, 48.8737],\n PlaceDItalie: [2.355, 48.831],\n Bastille: [2.369, 48.853],\n TourEiffel: [2.294, 48.858],\n Montmartre: [2.342, 48.887]\n};\n\nexport default function Popups(): JSX.Element {\n const popup = React.useRef();\n return (\n \n \n \n \n \n \n \n \n \n
    \n

    \n Arc de Triomphe\n

    \n

    Popup on click

    \n
    \n
    \n
    \n \n e.map.getView().fit(e.target.getGeometry().getExtent(), {\n duration: 250\n }),\n []\n )}\n >\n \n \n \n \n \n

    \n Les catacombes\n

    \n

    \n Popup on hover, pan on click\n

    \n
    \n \n
    \n
    \n
    Control programmatically:
    \n
    \n \n \n
    \n
    \n );\n}\n"}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[5888],{5888:(n,o,e)=>{e.r(o),e.d(o,{default:()=>r});const r="import React, {useCallback} from 'react';\nimport {fromLonLat} from 'ol/proj';\nimport {Coordinate} from 'ol/coordinate';\nimport {Polygon, Point} from 'ol/geom';\nimport 'ol/ol.css';\n\nimport {RMap, ROSM, RLayerVector, RFeature, RPopup} from 'rlayers';\nimport {RStyle, RIcon, RFill, RStroke} from 'rlayers/style';\n\nimport locationIcon from './svg/location.svg';\n\nconst coords: Record = {\n origin: [2.364, 48.82],\n ArcDeTriomphe: [2.295, 48.8737],\n PlaceDItalie: [2.355, 48.831],\n Bastille: [2.369, 48.853],\n TourEiffel: [2.294, 48.858],\n Montmartre: [2.342, 48.887]\n};\n\nexport default function Popups(): JSX.Element {\n const popup = React.useRef();\n return (\n \n \n \n \n \n \n \n \n \n
    \n

    \n Arc de Triomphe\n

    \n

    Popup on click

    \n
    \n
    \n
    \n \n e.map.getView().fit(e.target.getGeometry().getExtent(), {\n duration: 250\n }),\n []\n )}\n >\n \n \n \n \n \n

    \n Les catacombes\n

    \n

    \n Popup on hover, pan on click\n

    \n
    \n \n
    \n
    \n
    Control programmatically:
    \n
    \n \n \n
    \n
    \n );\n}\n"}}]); \ No newline at end of file diff --git a/6025.bundle.js b/6025.bundle.js index 3a05f281..82c18164 100644 --- a/6025.bundle.js +++ b/6025.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[6025],{783:(e,t,n)=>{n.d(t,{A:()=>l});var a=n(1601),o=n.n(a),r=n(6314),s=n.n(r)()(o());s.push([e.id,".ol-layers-control {\n right: 0.5em;\n top: 2.5em;\n background-color: rgba(255,255,255,0.6);\n}\n\n.ol-layers-control:hover {\n background-color: rgba(255,255,255,0.9);\n}\n\n.ol-layers-control label {\n margin-left: 0.25em;\n}\n\n.ol-layers-control>div {\n padding: 0.25em;\n}\n\n.ol-layers-control>span>*:first-child {\n margin-left: auto;\n}",""]);const l=s},7601:(e,t,n)=>{var a=n(5072),o=n.n(a),r=n(7825),s=n.n(r),l=n(7659),i=n.n(l),p=n(5056),m=n.n(p),c=n(540),u=n.n(c),g=n(1113),d=n.n(g),h=n(783),x={};x.styleTagTransform=d(),x.setAttributes=m(),x.insert=i().bind(null,"head"),x.domAPI=s(),x.insertStyleElement=u(),o()(h.A,x),h.A&&h.A.locals&&h.A.locals},6025:(e,t,n)=>{n.r(t),n.d(t,{default:()=>p});var a=n(6540),o=n(3407),r=n(1365),s=n(7240),l=n(2381);n(5045),n(7601);const i=a.createElement("button",null,"☰");function p(){return a.createElement("div",null,a.createElement("p",null,"Use the layers controls in the upper right corner to switch the active layer"),a.createElement(s.f9,{className:"example-map",initial:{center:(0,o.Rb)([2.364,48.82]),zoom:7}},a.createElement(s.E6.bc,{element:i},a.createElement(s.ej,{properties:{label:"OpenStreetMap"}}),a.createElement(s.HS,{properties:{label:"OpenTopo"},url:"https://{a-c}.tile.opentopomap.org/{z}/{x}/{y}.png",attributions:"Kartendaten: © OpenStreetMap-Mitwirkende, SRTM | Kartendarstellung: © OpenTopoMap (CC-BY-SA)"}),a.createElement(s.HS,{properties:{label:"Transport"},url:"http://tile.thunderforest.com/transport/{z}/{x}/{y}.png"}),a.createElement(l.A,{properties:{label:"Stadia Terrain Background"},layer:"stamen_terrain_background"}),a.createElement(s.QN,{properties:{label:"Mapbox TileJSON"},url:"https://a.tiles.mapbox.com/v3/aj.1x1-degrees.json?secure=1"}),a.createElement(s.Tw,{properties:{label:"Magellium OSM France Schools WMS"},url:"https://magosm.magellium.com/geoserver/ows",params:{LAYERS:"magosm:france_schools_point",FORMAT:"image/jpeg"}}),a.createElement(s.Ff,{properties:{label:"Switzerland ArcGIS TileWMS"},url:"https://wms.geo.admin.ch/",params:{LAYERS:"ch.swisstopo.pixelkarte-farbe-pk1000.noscale",FORMAT:"image/jpeg",serverType:"mapserver"}})),a.createElement(s.j9,{zIndex:5,format:new r.A({featureProjection:"EPSG:3857"}),url:"https://raw.githubusercontent.com/gregoiredavid/france-geojson/master/departements.geojson"},a.createElement(s.cq.RStyle,null,a.createElement(s.cq.RStroke,{color:"#007bff",width:3}),a.createElement(s.cq.RFill,{color:"transparent"})))))}},2381:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(945),o=n(5042),r=n(2662);class s extends r.A{constructor(e,t){var n;super(e,t),this.source=new o.A({layer:this.props.layer,apiKey:this.props.apiKey,retina:null!==(n=this.props.retina)&&void 0!==n&&n}),this.ol=new a.A({source:this.source}),this.eventSources=[this.ol,this.source]}}},5042:(e,t,n)=>{n.d(t,{A:()=>i});var a=n(702),o=n(7896);const r={stamen_terrain:{extension:"png",opaque:!0},stamen_terrain_background:{extension:"png",opaque:!0},stamen_terrain_labels:{extension:"png",opaque:!1},stamen_terrain_lines:{extension:"png",opaque:!1},stamen_toner_background:{extension:"png",opaque:!0},stamen_toner:{extension:"png",opaque:!0},stamen_toner_labels:{extension:"png",opaque:!1},stamen_toner_lines:{extension:"png",opaque:!1},stamen_toner_lite:{extension:"png",opaque:!0},stamen_watercolor:{extension:"jpg",opaque:!0},alidade_smooth:{extension:"png",opaque:!0},alidade_smooth_dark:{extension:"png",opaque:!0},alidade_satellite:{extension:"png",opaque:!0},outdoors:{extension:"png",opaque:!0},osm_bright:{extension:"png",opaque:!0}},s={stamen_terrain:{minZoom:0,maxZoom:18,retina:!0},stamen_toner:{minZoom:0,maxZoom:20,retina:!0},stamen_watercolor:{minZoom:1,maxZoom:18,retina:!1}};class l extends a.A{constructor(e){const t=e.layer.indexOf("-"),n=-1==t?e.layer:e.layer.slice(0,t),a=s[n]||{minZoom:0,maxZoom:20,retina:!0},l=r[e.layer],i=e.apiKey?"?api_key="+e.apiKey:"",p=a.retina&&e.retina?"@2x":"",m=void 0!==e.url?e.url:"https://tiles.stadiamaps.com/tiles/"+e.layer+"/{z}/{x}/{y}"+p+"."+l.extension+i,c=['© Stadia Maps','© OpenMapTiles',o.o];e.layer.startsWith("stamen_")&&c.splice(1,0,'© Stamen Design'),super({attributions:c,cacheSize:e.cacheSize,crossOrigin:"anonymous",interpolate:e.interpolate,maxZoom:void 0!==e.maxZoom?e.maxZoom:a.maxZoom,minZoom:void 0!==e.minZoom?e.minZoom:a.minZoom,opaque:l.opaque,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:m,tilePixelRatio:p?2:1,wrapX:e.wrapX,zDirection:e.zDirection})}}const i=l}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[6025],{783:(e,t,n)=>{n.d(t,{A:()=>l});var a=n(1601),o=n.n(a),r=n(6314),s=n.n(r)()(o());s.push([e.id,".ol-layers-control {\n right: 0.5em;\n top: 2.5em;\n background-color: rgba(255,255,255,0.6);\n}\n\n.ol-layers-control:hover {\n background-color: rgba(255,255,255,0.9);\n}\n\n.ol-layers-control label {\n margin-left: 0.25em;\n}\n\n.ol-layers-control>div {\n padding: 0.25em;\n}\n\n.ol-layers-control>span>*:first-child {\n margin-left: auto;\n}",""]);const l=s},7601:(e,t,n)=>{var a=n(5072),o=n.n(a),r=n(7825),s=n.n(r),l=n(7659),i=n.n(l),p=n(5056),m=n.n(p),c=n(540),u=n.n(c),g=n(1113),d=n.n(g),h=n(783),x={};x.styleTagTransform=d(),x.setAttributes=m(),x.insert=i().bind(null,"head"),x.domAPI=s(),x.insertStyleElement=u(),o()(h.A,x),h.A&&h.A.locals&&h.A.locals},6025:(e,t,n)=>{n.r(t),n.d(t,{default:()=>m});var a=n(6540),o=n(3407),r=n(1365),s=n(7240),l=n(2381),i=(n(5045),n(7601),n(6717));const p=a.createElement("button",null,"☰");function m(){return a.createElement("div",null,a.createElement("p",null,"Use the layers controls in the upper right corner to switch the active layer"),a.createElement(s.f9,{className:"example-map",initial:{center:(0,o.Rb)([2.364,48.82]),zoom:7}},a.createElement(s.E6.bc,{element:p},a.createElement(s.ej,{properties:{label:"OpenStreetMap"}}),a.createElement(s.HS,{properties:{label:"OpenTopo"},url:"https://{a-c}.tile.opentopomap.org/{z}/{x}/{y}.png",attributions:"Kartendaten: © OpenStreetMap-Mitwirkende, SRTM | Kartendarstellung: © OpenTopoMap (CC-BY-SA)"}),a.createElement(s.HS,{properties:{label:"Transport"},url:"http://tile.thunderforest.com/transport/{z}/{x}/{y}.png"}),a.createElement(l.A,{properties:{label:"Stadia Terrain Background"},layer:"stamen_terrain_background"}),a.createElement(s.QN,{properties:{label:"Mapbox TileJSON"},url:"https://a.tiles.mapbox.com/v3/aj.1x1-degrees.json?secure=1"}),a.createElement(s.Tw,{properties:{label:"Magellium OSM France Schools WMS"},url:"https://magosm.magellium.com/geoserver/ows",params:{LAYERS:"magosm:france_schools_point",FORMAT:"image/jpeg"}}),a.createElement(s.Ff,{properties:{label:"Switzerland ArcGIS TileWMS"},url:"https://wms.geo.admin.ch/",params:{LAYERS:"ch.swisstopo.pixelkarte-farbe-pk1000.noscale",FORMAT:"image/jpeg",serverType:"mapserver"}})),a.createElement(s.j9,{zIndex:5,format:new r.A({featureProjection:"EPSG:3857",featureClass:i.A}),url:"https://raw.githubusercontent.com/gregoiredavid/france-geojson/master/departements.geojson"},a.createElement(s.cq.RStyle,null,a.createElement(s.cq.RStroke,{color:"#007bff",width:3}),a.createElement(s.cq.RFill,{color:"transparent"})))))}},2381:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(945),o=n(5042),r=n(2662);class s extends r.A{constructor(e,t){var n;super(e,t),this.source=new o.A({layer:this.props.layer,apiKey:this.props.apiKey,retina:null!==(n=this.props.retina)&&void 0!==n&&n}),this.ol=new a.A({source:this.source}),this.eventSources=[this.ol,this.source]}}},5042:(e,t,n)=>{n.d(t,{A:()=>i});var a=n(702),o=n(7896);const r={stamen_terrain:{extension:"png",opaque:!0},stamen_terrain_background:{extension:"png",opaque:!0},stamen_terrain_labels:{extension:"png",opaque:!1},stamen_terrain_lines:{extension:"png",opaque:!1},stamen_toner_background:{extension:"png",opaque:!0},stamen_toner:{extension:"png",opaque:!0},stamen_toner_labels:{extension:"png",opaque:!1},stamen_toner_lines:{extension:"png",opaque:!1},stamen_toner_lite:{extension:"png",opaque:!0},stamen_watercolor:{extension:"jpg",opaque:!0},alidade_smooth:{extension:"png",opaque:!0},alidade_smooth_dark:{extension:"png",opaque:!0},alidade_satellite:{extension:"png",opaque:!0},outdoors:{extension:"png",opaque:!0},osm_bright:{extension:"png",opaque:!0}},s={stamen_terrain:{minZoom:0,maxZoom:18,retina:!0},stamen_toner:{minZoom:0,maxZoom:20,retina:!0},stamen_watercolor:{minZoom:1,maxZoom:18,retina:!1}};class l extends a.A{constructor(e){const t=e.layer.indexOf("-"),n=-1==t?e.layer:e.layer.slice(0,t),a=s[n]||{minZoom:0,maxZoom:20,retina:!0},l=r[e.layer],i=e.apiKey?"?api_key="+e.apiKey:"",p=a.retina&&e.retina?"@2x":"",m=void 0!==e.url?e.url:"https://tiles.stadiamaps.com/tiles/"+e.layer+"/{z}/{x}/{y}"+p+"."+l.extension+i,c=['© Stadia Maps','© OpenMapTiles',o.o];e.layer.startsWith("stamen_")&&c.splice(1,0,'© Stamen Design'),super({attributions:c,cacheSize:e.cacheSize,crossOrigin:"anonymous",interpolate:e.interpolate,maxZoom:void 0!==e.maxZoom?e.maxZoom:a.maxZoom,minZoom:void 0!==e.minZoom?e.minZoom:a.minZoom,opaque:l.opaque,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:m,tilePixelRatio:p?2:1,wrapX:e.wrapX,zDirection:e.zDirection})}}const i=l}}]); \ No newline at end of file diff --git a/6782.bundle.js b/6782.bundle.js index 93594f6e..7362a807 100644 --- a/6782.bundle.js +++ b/6782.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[6782],{6782:(e,n,t)=>{t.r(n),t.d(n,{default:()=>m});var o=t(6540);const r=JSON.parse('{"U$":{"yvL":{"rE":"5.3.3"},"Deh":{"rE":"9.1.0"},"N69":{"rE":"2.11.0"},"JDG":{"rE":"18.3.1"}}}'),l=r.U$.JDG.rE,s=r.U$.Deh.rE,a=r.U$.yvL.rE,i=r.U$.N69.rE,p=e=>e.replace(/\//g,".").replace(/rlayers\.style/g,"rlayers.RStyle").replace(/rlayers\.control/g,"rlayers.RControl").replace(/rlayers\.interaction/g,"rlayers.RInteraction").replace(/react/g,"React"),m=o.memo((function(e){const[n,t]=o.useState("loading()");o.useEffect((()=>{e.text.then((e=>{let n;const o=[];let r=/import .*\{([A-Za-z,\s\n]+)\}.* from '(.*)'/g;for(;null!==(n=r.exec(e));){const e=n[1].replace(/\s/g,"").replace(/\n/g,"").split(","),t=p(n[2]);for(const n of e)o.push({from:n,to:`${t}.${n}`})}for(r=/import ([A-Za-z]+) from '(ol.*)'/g;null!==(n=r.exec(e));){const e=p(n[2]);o.push({from:n[1],to:e})}for(r=/import ([A-Za-z]+) from '(.*\.svg)'/g;null!==(n=r.exec(e));){const e=`'https://cdn.jsdelivr.net/npm/rlayers/examples/${n[2]}'`;o.push({from:n[1],to:e})}e=(e=(e=e.replace(/import [^;]+;\n/g,"")).replace(/^\n+/,"")).replace(/export default function (.*)/,"function Comp() {"),e+="\nReactDOM.createRoot(document.getElementById('root')).render();\n",o.length>0&&(e="\n"+e);for(const n of o.reverse())e=`const ${n.from} = ${n.to};\n`+e;t(e)}))}),[e.text]);const r=o.useRef();return n&&n.match(/in CodePen/)?null:o.createElement("form",{className:"position-absolute my-2 mx-4",style:{top:"0px",right:"0px"},ref:r,action:"https://codepen.io/pen/define",method:"POST",target:"_blank"},o.createElement("input",{type:"hidden",name:"data",value:JSON.stringify({title:"rlayers "+e.title,description:"This is an editable example from rlayers - https://mmomtchev.githb.io/rlayers",tags:["openlayers","react","maps","rlayers"],html:'
    \n
    \n
    \n
    ',js:n,js_pre_processor:"typescript",css:".example-map p,\n.jumbotron p {\n margin: 0;\n padding: 0;\n}\n\n.example-map {\n width: 100%;\n height: 60vh;\n margin-bottom: 1em;\n}\n\n.no-interaction {\n user-select: none;\n pointer-events: none;\n}\n\n.example-overlay {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n user-select: none;\n pointer-events: none;\n position: absolute;\n width: max-content;\n background-color: white;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);\n padding: 15px;\n border-radius: 10px;\n border: 1px solid #cccccc;\n}\n\n.example-control {\n top: 2.5em;\n right: 0.5em;\n}\n\n.example-list {\n width: 150px;\n max-width: 150px;\n min-width: 150px;\n font-size: 0.7em;\n list-style: lower-latin;\n padding: 0;\n overflow: hidden;\n}\n\n.example-list ul {\n padding: 0;\n overflow: hidden;\n}\n\n.example-list li {\n font-style: italic;\n overflow: hidden;\n}\n\n.example-overview .ol-overviewmap-map {\n border: none !important;\n width: 300px !important;\n}\n\n.example-overview .ol-overviewmap-box {\n border: 2px solid blue;\n}\n\n.example-overview,\n.example-overview.ol-uncollapsible {\n bottom: auto !important;\n left: auto !important;\n right: 0 !important;\n top: 0 !important;\n}\n\n.example-overview:not(.ol-collapsed) button {\n bottom: auto !important;\n left: auto !important;\n right: 1px !important;\n top: 1px !important;\n}\n\n.example-fullscreen {\n top: 5em;\n right: 0.5em;\n}\n\n.fullscreen:-webkit-full-screen {\n height: 100%;\n margin: 0;\n}\n\n.fullscreen:-ms-fullscreen {\n height: 100%;\n}\n\n.fullscreen:fullscreen {\n height: 100%;\n}\n\n.fullscreen {\n margin-bottom: 10px;\n width: 100%;\n height: 400px;\n}\n\n.example-spinner {\n position: absolute;\n top: 40%;\n left: 40%;\n width: 20%;\n height: 20%;\n z-index: 1000;\n}\n\n.example-spinner>img {\n width: 100%;\n}\n",js_external:`https://cdn.jsdelivr.net/npm/bootstrap@${a}/dist/js/bootstrap.min.js;https://cdnjs.cloudflare.com/ajax/libs/react/${l}/umd/react.development.min.js;https://cdnjs.cloudflare.com/ajax/libs/react-dom/${l}/umd/react-dom.development.min.js;https://cdnjs.cloudflare.com/ajax/libs/proj4js/${i}/proj4.js;https://cdn.jsdelivr.net/npm/ol@v${s}/dist/ol.js;https://cdn.jsdelivr.net/npm/rlayers@2.3.2`,css_external:`https://cdn.jsdelivr.net/npm/ol@v${s}/ol.css;https://cdn.jsdelivr.net/npm/bootstrap@${a}/dist/css/bootstrap.min.css`})}),o.createElement("button",{className:"btn border mb-2 bg-light",onClick:()=>{r.current.submit()}},o.createElement("span",{className:"me-2 align-middle"},"Edit on"),o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 138 26",height:"24px",fill:"none",stroke:"#000",strokeWidth:"2.3",strokeLinecap:"round",strokeLinejoin:"round"},o.createElement("path",{d:"M80 6h-9v14h9 M114 6h-9 v14h9 M111 13h-6 M77 13h-6 M122 20V6l11 14V6 M22 16.7L33 24l11-7.3V9.3L33 2L22 9.3V16.7z M44 16.7L33 9.3l-11 7.4 M22 9.3l11 7.3 l11-7.3 M33 2v7.3 M33 16.7V24 M88 14h6c2.2 0 4-1.8 4-4s-1.8-4-4-4h-6v14 M15 8c-1.3-1.3-3-2-5-2c-4 0-7 3-7 7s3 7 7 7 c2 0 3.7-0.8 5-2 M64 13c0 4-3 7-7 7h-5V6h5C61 6 64 9 64 13z"}))))}))}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[6782],{6782:(e,n,t)=>{t.r(n),t.d(n,{default:()=>m});var o=t(6540);const r=JSON.parse('{"U$":{"yvL":{"rE":"5.3.3"},"Deh":{"rE":"9.2.2"},"N69":{"rE":"2.11.0"},"JDG":{"rE":"18.3.1"}}}'),l=r.U$.JDG.rE,s=r.U$.Deh.rE,a=r.U$.yvL.rE,i=r.U$.N69.rE,p=e=>e.replace(/\//g,".").replace(/rlayers\.style/g,"rlayers.RStyle").replace(/rlayers\.control/g,"rlayers.RControl").replace(/rlayers\.interaction/g,"rlayers.RInteraction").replace(/react/g,"React"),m=o.memo((function(e){const[n,t]=o.useState("loading()");o.useEffect((()=>{e.text.then((e=>{let n;const o=[];let r=/import .*\{([A-Za-z,\s\n]+)\}.* from '(.*)'/g;for(;null!==(n=r.exec(e));){const e=n[1].replace(/\s/g,"").replace(/\n/g,"").split(","),t=p(n[2]);for(const n of e)o.push({from:n,to:`${t}.${n}`})}for(r=/import ([A-Za-z]+) from '(ol.*)'/g;null!==(n=r.exec(e));){const e=p(n[2]);o.push({from:n[1],to:e})}for(r=/import ([A-Za-z]+) from '(.*\.svg)'/g;null!==(n=r.exec(e));){const e=`'https://cdn.jsdelivr.net/npm/rlayers/examples/${n[2]}'`;o.push({from:n[1],to:e})}e=(e=(e=e.replace(/import [^;]+;\n/g,"")).replace(/^\n+/,"")).replace(/export default function (.*)/,"function Comp() {"),e+="\nReactDOM.createRoot(document.getElementById('root')).render();\n",o.length>0&&(e="\n"+e);for(const n of o.reverse())e=`const ${n.from} = ${n.to};\n`+e;t(e)}))}),[e.text]);const r=o.useRef();return n&&n.match(/in CodePen/)?null:o.createElement("form",{className:"position-absolute my-2 mx-4",style:{top:"0px",right:"0px"},ref:r,action:"https://codepen.io/pen/define",method:"POST",target:"_blank"},o.createElement("input",{type:"hidden",name:"data",value:JSON.stringify({title:"rlayers "+e.title,description:"This is an editable example from rlayers - https://mmomtchev.githb.io/rlayers",tags:["openlayers","react","maps","rlayers"],html:'
    \n
    \n
    \n
    ',js:n,js_pre_processor:"typescript",css:".example-map p,\n.jumbotron p {\n margin: 0;\n padding: 0;\n}\n\n.example-map {\n width: 100%;\n height: 60vh;\n margin-bottom: 1em;\n}\n\n.no-interaction {\n user-select: none;\n pointer-events: none;\n}\n\n.example-overlay {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n user-select: none;\n pointer-events: none;\n position: absolute;\n width: max-content;\n background-color: white;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);\n padding: 15px;\n border-radius: 10px;\n border: 1px solid #cccccc;\n}\n\n.example-control {\n top: 2.5em;\n right: 0.5em;\n}\n\n.example-list {\n width: 150px;\n max-width: 150px;\n min-width: 150px;\n font-size: 0.7em;\n list-style: lower-latin;\n padding: 0;\n overflow: hidden;\n}\n\n.example-list ul {\n padding: 0;\n overflow: hidden;\n}\n\n.example-list li {\n font-style: italic;\n overflow: hidden;\n}\n\n.example-overview .ol-overviewmap-map {\n border: none !important;\n width: 300px !important;\n}\n\n.example-overview .ol-overviewmap-box {\n border: 2px solid blue;\n}\n\n.example-overview,\n.example-overview.ol-uncollapsible {\n bottom: auto !important;\n left: auto !important;\n right: 0 !important;\n top: 0 !important;\n}\n\n.example-overview:not(.ol-collapsed) button {\n bottom: auto !important;\n left: auto !important;\n right: 1px !important;\n top: 1px !important;\n}\n\n.example-fullscreen {\n top: 5em;\n right: 0.5em;\n}\n\n.fullscreen:-webkit-full-screen {\n height: 100%;\n margin: 0;\n}\n\n.fullscreen:-ms-fullscreen {\n height: 100%;\n}\n\n.fullscreen:fullscreen {\n height: 100%;\n}\n\n.fullscreen {\n margin-bottom: 10px;\n width: 100%;\n height: 400px;\n}\n\n.example-spinner {\n position: absolute;\n top: 40%;\n left: 40%;\n width: 20%;\n height: 20%;\n z-index: 1000;\n}\n\n.example-spinner>img {\n width: 100%;\n}\n",js_external:`https://cdn.jsdelivr.net/npm/bootstrap@${a}/dist/js/bootstrap.min.js;https://cdnjs.cloudflare.com/ajax/libs/react/${l}/umd/react.development.min.js;https://cdnjs.cloudflare.com/ajax/libs/react-dom/${l}/umd/react-dom.development.min.js;https://cdnjs.cloudflare.com/ajax/libs/proj4js/${i}/proj4.js;https://cdn.jsdelivr.net/npm/ol@v${s}/dist/ol.js;https://cdn.jsdelivr.net/npm/rlayers@3.0.0`,css_external:`https://cdn.jsdelivr.net/npm/ol@v${s}/ol.css;https://cdn.jsdelivr.net/npm/bootstrap@${a}/dist/css/bootstrap.min.css`})}),o.createElement("button",{className:"btn border mb-2 bg-light",onClick:()=>{r.current.submit()}},o.createElement("span",{className:"me-2 align-middle"},"Edit on"),o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 138 26",height:"24px",fill:"none",stroke:"#000",strokeWidth:"2.3",strokeLinecap:"round",strokeLinejoin:"round"},o.createElement("path",{d:"M80 6h-9v14h9 M114 6h-9 v14h9 M111 13h-6 M77 13h-6 M122 20V6l11 14V6 M22 16.7L33 24l11-7.3V9.3L33 2L22 9.3V16.7z M44 16.7L33 9.3l-11 7.4 M22 9.3l11 7.3 l11-7.3 M33 2v7.3 M33 16.7V24 M88 14h6c2.2 0 4-1.8 4-4s-1.8-4-4-4h-6v14 M15 8c-1.3-1.3-3-2-5-2c-4 0-7 3-7 7s3 7 7 7 c2 0 3.7-0.8 5-2 M64 13c0 4-3 7-7 7h-5V6h5C61 6 64 9 64 13z"}))))}))}}]); \ No newline at end of file diff --git a/7361.bundle.js b/7361.bundle.js index 7c767e15..4758092d 100644 --- a/7361.bundle.js +++ b/7361.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[7361],{7361:(n,s,a)=>{a.r(s),a.d(s,{default:()=>t});const t='import React, { useCallback } from "react";\nimport { fromLonLat } from "ol/proj";\nimport { Coordinate } from "ol/coordinate";\nimport { Polygon, Point } from "ol/geom";\nimport "ol/ol.css";\n\nimport { RMap, ROSM, RLayerVector, RFeature, RPopup } from "rlayers";\nimport { RStyle, RIcon, RFill, RStroke } from "rlayers/style";\n\nimport locationIcon from "./svg/location.svg";\nimport { Feature } from "ol";\n\nconst coords: Record<string, Coordinate> = {\n origin: [2.364, 48.82],\n ArcDeTriomphe: [2.295, 48.8737],\n PlaceDItalie: [2.355, 48.831],\n Bastille: [2.369, 48.853],\n TourEiffel: [2.294, 48.858],\n Montmartre: [2.342, 48.887],\n};\n\nexport default function Popups(): JSX.Element {\n const popup = React.useRef<RPopup>();\n return (\n <React.Fragment>\n <RMap\n className="example-map"\n initial={{ center: fromLonLat(coords.origin), zoom: 11 }}\n >\n <ROSM />\n <RLayerVector zIndex={10}>\n <RFeature geometry={new Point(fromLonLat(coords.ArcDeTriomphe))}>\n <RStyle>\n <RIcon src={locationIcon} anchor={[0.5, 0.8]} />\n </RStyle>\n <RPopup ref={popup} trigger={"click"} className="example-overlay">\n <div className="card">\n <p className="card-header">\n <strong>Arc de Triomphe</strong>\n </p>\n <p className="card-body text-center">Popup on click</p>\n </div>\n </RPopup>\n </RFeature>\n <RFeature\n geometry={\n new Polygon([\n [\n fromLonLat(coords.PlaceDItalie),\n fromLonLat(coords.Bastille),\n fromLonLat(coords.TourEiffel),\n fromLonLat(coords.PlaceDItalie),\n ],\n ])\n }\n onClick={useCallback(\n (e) =>\n e.map.getView().fit(e.target.getGeometry().getExtent(), {\n duration: 250,\n }),\n []\n )}\n >\n <RStyle>\n <RStroke color="yellow" width={4} />\n <RFill color="transparent" />\n </RStyle>\n <RPopup trigger={"hover"} className="example-overlay">\n <p>\n <strong>Les catacombes</strong>\n </p>\n <p>\n <em>Popup on hover, pan on click</em>\n </p>\n </RPopup>\n </RFeature>\n </RLayerVector>\n </RMap>\n <div>Control programmatically:</div>\n <div>\n <button\n className="btn btn-primary m-1"\n onClick={() => popup.current.hide()}\n >\n Hide Arc de Triomphe\n </button>\n <button\n className="btn btn-primary m-1"\n onClick={() => popup.current.show()}\n >\n Show Arc de Triomphe\n </button>\n </div>\n </React.Fragment>\n );\n}\n'}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[7361],{7361:(n,s,a)=>{a.r(s),a.d(s,{default:()=>t});const t='import React, { useCallback } from "react";\nimport { fromLonLat } from "ol/proj";\nimport { Coordinate } from "ol/coordinate";\nimport { Polygon, Point } from "ol/geom";\nimport "ol/ol.css";\n\nimport { RMap, ROSM, RLayerVector, RFeature, RPopup } from "rlayers";\nimport { RStyle, RIcon, RFill, RStroke } from "rlayers/style";\n\nimport locationIcon from "./svg/location.svg";\n\nconst coords: Record<string, Coordinate> = {\n origin: [2.364, 48.82],\n ArcDeTriomphe: [2.295, 48.8737],\n PlaceDItalie: [2.355, 48.831],\n Bastille: [2.369, 48.853],\n TourEiffel: [2.294, 48.858],\n Montmartre: [2.342, 48.887],\n};\n\nexport default function Popups(): JSX.Element {\n const popup = React.useRef<RPopup>();\n return (\n <React.Fragment>\n <RMap\n className="example-map"\n initial={{ center: fromLonLat(coords.origin), zoom: 11 }}\n >\n <ROSM />\n <RLayerVector zIndex={10}>\n <RFeature geometry={new Point(fromLonLat(coords.ArcDeTriomphe))}>\n <RStyle>\n <RIcon src={locationIcon} anchor={[0.5, 0.8]} />\n </RStyle>\n <RPopup ref={popup} trigger={"click"} className="example-overlay">\n <div className="card">\n <p className="card-header">\n <strong>Arc de Triomphe</strong>\n </p>\n <p className="card-body text-center">Popup on click</p>\n </div>\n </RPopup>\n </RFeature>\n <RFeature\n geometry={\n new Polygon([\n [\n fromLonLat(coords.PlaceDItalie),\n fromLonLat(coords.Bastille),\n fromLonLat(coords.TourEiffel),\n fromLonLat(coords.PlaceDItalie),\n ],\n ])\n }\n onClick={useCallback(\n (e) =>\n e.map.getView().fit(e.target.getGeometry().getExtent(), {\n duration: 250,\n }),\n []\n )}\n >\n <RStyle>\n <RStroke color="yellow" width={4} />\n <RFill color="transparent" />\n </RStyle>\n <RPopup trigger={"hover"} className="example-overlay">\n <p>\n <strong>Les catacombes</strong>\n </p>\n <p>\n <em>Popup on hover, pan on click</em>\n </p>\n </RPopup>\n </RFeature>\n </RLayerVector>\n </RMap>\n <div>Control programmatically:</div>\n <div>\n <button\n className="btn btn-primary m-1"\n onClick={() => popup.current.hide()}\n >\n Hide Arc de Triomphe\n </button>\n <button\n className="btn btn-primary m-1"\n onClick={() => popup.current.show()}\n >\n Show Arc de Triomphe\n </button>\n </div>\n </React.Fragment>\n );\n}\n'}}]); \ No newline at end of file diff --git a/7510.bundle.js b/7510.bundle.js index 817b4497..f26696ca 100644 --- a/7510.bundle.js +++ b/7510.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[7510],{7510:(n,a,s)=>{s.r(a),s.d(a,{default:()=>t});const t='import React from "react";\nimport { fromLonLat } from "ol/proj";\nimport {\n altShiftKeysOnly,\n platformModifierKeyOnly,\n shiftKeyOnly,\n altKeyOnly,\n never,\n doubleClick,\n} from "ol/events/condition";\nimport { Geometry, Point } from "ol/geom";\nimport "ol/ol.css";\n\nimport monument from "./svg/eiffel.svg";\nimport {\n RMap,\n ROSM,\n RInteraction,\n RLayerVector,\n RStyle,\n RFeature,\n} from "rlayers";\nimport VectorSource from "ol/source/Vector";\nimport { OLFeatureClass } from "rlayers/context";\n\nconst TourEiffel = fromLonLat([2.294, 48.858]);\nconst TourEiffelPoint = new Point(TourEiffel);\n\nexport default function Interactions(): JSX.Element {\n const [selected, setSelected] = React.useState(false);\n return (\n <React.Fragment>\n <RMap\n className="example-map"\n initial={{ center: fromLonLat([2.364, 48.82]), zoom: 11 }}\n >\n <ROSM />\n\n <RLayerVector>\n <RStyle.RStyle>\n <RStyle.RIcon src={monument} />\n </RStyle.RStyle>\n <RFeature geometry={TourEiffelPoint} />\n </RLayerVector>\n\n <RLayerVector\n onChange={React.useCallback((e) => {\n // On every change, check if there is a feature covering the Eiffel Tower\n const source = e.target as VectorSource<OLFeatureClass>;\n if (source?.forEachFeatureAtCoordinateDirect)\n setSelected(\n source.forEachFeatureAtCoordinateDirect(TourEiffel, () => true)\n );\n }, [])}\n >\n {/* This is the style used for the drawn polygons */}\n <RStyle.RStyle>\n <RStyle.RStroke color="#0000ff" width={3} />\n <RStyle.RFill color="rgba(0, 0, 0, 0.75)" />\n </RStyle.RStyle>\n\n <RInteraction.RDraw\n type={"Polygon"}\n condition={shiftKeyOnly}\n freehandCondition={altShiftKeysOnly}\n />\n\n <RInteraction.RDraw\n type={"Circle"}\n condition={altKeyOnly}\n freehandCondition={never}\n />\n\n <RInteraction.RModify\n condition={platformModifierKeyOnly}\n deleteCondition={React.useCallback(\n (e) => platformModifierKeyOnly(e) && doubleClick(e),\n []\n )}\n />\n </RLayerVector>\n </RMap>\n <div>\n <p className="p-0 m-0">\n Hold <em>Shift</em> and click without dragging for a regular polygon\n </p>\n <p className="p-0 m-0">\n Hold <em>Shift</em> and <em>Alt</em> and drag for a freehand polygon\n </p>\n <p className="p-0 m-0">\n Hold <em>Alt</em> and click without dragging for a circle\n </p>\n <p className="p-0 m-0">\n Hold <em>Ctrl / &#x2318;</em> and drag to move/add a vertex\n </p>\n <p className="p-0 m-0">\n Hold <em>Ctrl / &#x2318;</em> and double click to remove a vertex\n </p>\n </div>\n <div className="mx-0 mt-1 mb-3 p-1 w-100 jumbotron shadow shadow">\n <p>Currently the Eiffel Tower is{selected ? "" : " not"} covered</p>\n </div>\n </React.Fragment>\n );\n}\n'}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[7510],{7510:(n,a,s)=>{s.r(a),s.d(a,{default:()=>t});const t='import React from "react";\nimport { fromLonLat } from "ol/proj";\nimport {\n altShiftKeysOnly,\n platformModifierKeyOnly,\n shiftKeyOnly,\n altKeyOnly,\n never,\n doubleClick,\n} from "ol/events/condition";\nimport { Geometry, Point } from "ol/geom";\nimport "ol/ol.css";\n\nimport monument from "./svg/eiffel.svg";\nimport {\n RMap,\n ROSM,\n RInteraction,\n RLayerVector,\n RStyle,\n RFeature,\n} from "rlayers";\nimport VectorSource from "ol/source/Vector";\nimport { Feature } from "ol";\n\nconst TourEiffel = fromLonLat([2.294, 48.858]);\nconst TourEiffelPoint = new Point(TourEiffel);\n\nexport default function Interactions(): JSX.Element {\n const [selected, setSelected] = React.useState(false);\n return (\n <React.Fragment>\n <RMap\n className="example-map"\n initial={{ center: fromLonLat([2.364, 48.82]), zoom: 11 }}\n >\n <ROSM />\n\n <RLayerVector>\n <RStyle.RStyle>\n <RStyle.RIcon src={monument} />\n </RStyle.RStyle>\n <RFeature geometry={TourEiffelPoint} />\n </RLayerVector>\n\n <RLayerVector\n onChange={React.useCallback((e) => {\n // On every change, check if there is a feature covering the Eiffel Tower\n const source = e.target as VectorSource<Feature>;\n if (source?.forEachFeatureAtCoordinateDirect)\n setSelected(\n source.forEachFeatureAtCoordinateDirect(TourEiffel, () => true)\n );\n }, [])}\n >\n {/* This is the style used for the drawn polygons */}\n <RStyle.RStyle>\n <RStyle.RStroke color="#0000ff" width={3} />\n <RStyle.RFill color="rgba(0, 0, 0, 0.75)" />\n </RStyle.RStyle>\n\n <RInteraction.RDraw\n type={"Polygon"}\n condition={shiftKeyOnly}\n freehandCondition={altShiftKeysOnly}\n />\n\n <RInteraction.RDraw\n type={"Circle"}\n condition={altKeyOnly}\n freehandCondition={never}\n />\n\n <RInteraction.RModify\n condition={platformModifierKeyOnly}\n deleteCondition={React.useCallback(\n (e) => platformModifierKeyOnly(e) && doubleClick(e),\n []\n )}\n />\n </RLayerVector>\n </RMap>\n <div>\n <p className="p-0 m-0">\n Hold <em>Shift</em> and click without dragging for a regular polygon\n </p>\n <p className="p-0 m-0">\n Hold <em>Shift</em> and <em>Alt</em> and drag for a freehand polygon\n </p>\n <p className="p-0 m-0">\n Hold <em>Alt</em> and click without dragging for a circle\n </p>\n <p className="p-0 m-0">\n Hold <em>Ctrl / &#x2318;</em> and drag to move/add a vertex\n </p>\n <p className="p-0 m-0">\n Hold <em>Ctrl / &#x2318;</em> and double click to remove a vertex\n </p>\n </div>\n <div className="mx-0 mt-1 mb-3 p-1 w-100 jumbotron shadow shadow">\n <p>Currently the Eiffel Tower is{selected ? "" : " not"} covered</p>\n </div>\n </React.Fragment>\n );\n}\n'}}]); \ No newline at end of file diff --git a/7892.bundle.js b/7892.bundle.js index 90f48e5f..45c84b3a 100644 --- a/7892.bundle.js +++ b/7892.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[7892],{7892:(n,s,a)=>{a.r(s),a.d(s,{default:()=>t});const t='import React, { useCallback } from "react";\nimport { fromLonLat } from "ol/proj";\nimport GeoJSON from "ol/format/GeoJSON";\nimport { createEmpty, extend, getHeight, getWidth } from "ol/extent";\nimport "ol/ol.css";\n\n// This example illustrates the versatility of a dynamic RStyle\n// It also makes use of its caching abilities\nimport { RMap, RLayerCluster } from "rlayers";\nimport {\n RStyle,\n RFill,\n RStroke,\n RRegularShape,\n RCircle,\n RText,\n} from "rlayers/style";\nimport RLayerStadia from "rlayers/layer/RLayerStadia";\n\n// Earthquakes of magnitude of at least 3.0 in 2020 (courtesy of USGS)\n// (this won\'t work in CodePen)\nimport earthquakes from "!!file-loader!./data/earthquakes.geojson";\ntype InputFormEventType = React.FormEvent<HTMLInputElement>;\nconst reader = new GeoJSON({ featureProjection: "EPSG:3857" });\n\nconst colorBlob = (size) =>\n "rgba(" +\n [255, 153, 0, Math.min(0.8, 0.4 + Math.log(size / 10) / 20)].join() +\n ")";\nconst radiusStar = (feature) =>\n Math.round(5 * (parseFloat(feature.get("mag")) - 2.5));\n\n// This returns the north/south east/west extent of a group of features\n// divided by the resolution\nconst extentFeatures = (features, resolution) => {\n const extent = createEmpty();\n for (const f of features) extend(extent, f.getGeometry().getExtent());\n return Math.round(0.25 * (getWidth(extent) + getHeight(extent))) / resolution;\n};\n\nexport default function Cluster(): JSX.Element {\n const [distance, setDistance] = React.useState(20);\n const [selected, setSelected] = React.useState<string>(\n "Click a cluster for details"\n );\n const earthquakeLayer = React.useRef();\n return (\n <React.Fragment>\n <RMap\n className="example-map"\n initial={{ center: fromLonLat([0, 0]), zoom: 1 }}\n >\n <RLayerStadia layer="stamen_toner" />\n <RLayerCluster\n ref={earthquakeLayer}\n distance={distance}\n format={reader}\n url={earthquakes}\n onClick={React.useCallback((e) => {\n const features = e.target.get("features") ?? [];\n setSelected(\n `${features.length} earthquakes in this location, ` +\n `magnitudes are ${features\n .map((eq) => eq.get("mag"))\n .join(", ")}`\n );\n }, [])}\n >\n <RStyle\n cacheSize={1024}\n cacheId={useCallback(\n (feature, resolution) =>\n // This is the hashing function, it takes a feature as its input\n // and returns a string\n // It must be dependant of the same inputs as the rendering function\n feature.get("features").length > 1\n ? "#" + extentFeatures(feature.get("features"), resolution)\n : "$" + radiusStar(feature.get("features")[0]),\n []\n )}\n render={useCallback((feature, resolution) => {\n // This is the rendering function\n // It has access to the cluster which appears as a single feature\n // and has a property with an array of all the features that make it\n const size = feature.get("features").length;\n // This is the size (number of features) of the cluster\n if (size > 1) {\n // Render a blob with a number\n const radius = extentFeatures(\n feature.get("features"),\n resolution\n );\n return (\n // A dynamic style should return a fragment instead of a\n // full-blown RStyle - returning a full RStyle here\n // will simply replace the style used by the vector layer\n // with a fixed one\n <React.Fragment>\n <RCircle radius={radius}>\n <RFill color={colorBlob(size)} />\n </RCircle>\n <RText text={size.toString()}>\n <RFill color="#fff" />\n <RStroke color="rgba(0, 0, 0, 0.6)" width={3} />\n </RText>\n </React.Fragment>\n );\n }\n // We have a single feature cluster\n const unclusteredFeature = feature.get("features")[0];\n // Render a star\n return (\n <RRegularShape\n radius1={radiusStar(unclusteredFeature)}\n radius2={3}\n points={5}\n angle={Math.PI}\n >\n <RFill color="rgba(255, 153, 0, 0.8)" />\n <RStroke color="rgba(255, 204, 0, 0.2)" width={1} />\n </RRegularShape>\n );\n }, [])}\n />\n </RLayerCluster>\n </RMap>\n <div className="my-3 w-100">\n <label htmlFor="distance">Clustering distance</label>\n <div className="w-100">\n <input\n type="range"\n className="range-slider range-slider--primary w-100"\n min="5"\n max="50"\n id="distance"\n value={distance}\n onChange={useCallback(\n (e: InputFormEventType) =>\n setDistance(parseInt(e.currentTarget.value)),\n []\n )}\n />\n </div>\n </div>\n <div>{selected}</div>\n </React.Fragment>\n );\n}\n'}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[7892],{7892:(n,s,a)=>{a.r(s),a.d(s,{default:()=>t});const t='import React, { useCallback } from "react";\nimport { fromLonLat } from "ol/proj";\nimport GeoJSON from "ol/format/GeoJSON";\nimport { createEmpty, extend, getHeight, getWidth } from "ol/extent";\nimport "ol/ol.css";\n\n// This example illustrates the versatility of a dynamic RStyle\n// It also makes use of its caching abilities\nimport { RMap, RLayerCluster } from "rlayers";\nimport {\n RStyle,\n RFill,\n RStroke,\n RRegularShape,\n RCircle,\n RText,\n} from "rlayers/style";\nimport RLayerStadia from "rlayers/layer/RLayerStadia";\n\n// Earthquakes of magnitude of at least 3.0 in 2020 (courtesy of USGS)\n// (this won\'t work in CodePen)\nimport earthquakes from "!!file-loader!./data/earthquakes.geojson";\nimport { Feature } from "ol";\ntype InputFormEventType = React.FormEvent<HTMLInputElement>;\nconst reader = new GeoJSON({\n featureProjection: "EPSG:3857",\n featureClass: Feature,\n});\n\nconst colorBlob = (size) =>\n "rgba(" +\n [255, 153, 0, Math.min(0.8, 0.4 + Math.log(size / 10) / 20)].join() +\n ")";\nconst radiusStar = (feature) =>\n Math.round(5 * (parseFloat(feature.get("mag")) - 2.5));\n\n// This returns the north/south east/west extent of a group of features\n// divided by the resolution\nconst extentFeatures = (features, resolution) => {\n const extent = createEmpty();\n for (const f of features) extend(extent, f.getGeometry().getExtent());\n return Math.round(0.25 * (getWidth(extent) + getHeight(extent))) / resolution;\n};\n\nexport default function Cluster(): JSX.Element {\n const [distance, setDistance] = React.useState(20);\n const [selected, setSelected] = React.useState<string>(\n "Click a cluster for details"\n );\n const earthquakeLayer = React.useRef();\n return (\n <React.Fragment>\n <RMap\n className="example-map"\n initial={{ center: fromLonLat([0, 0]), zoom: 1 }}\n >\n <RLayerStadia layer="stamen_toner" />\n <RLayerCluster\n ref={earthquakeLayer}\n distance={distance}\n format={reader}\n url={earthquakes}\n onClick={React.useCallback((e) => {\n const features = e.target.get("features") ?? [];\n setSelected(\n `${features.length} earthquakes in this location, ` +\n `magnitudes are ${features\n .map((eq) => eq.get("mag"))\n .join(", ")}`\n );\n }, [])}\n >\n <RStyle\n cacheSize={1024}\n cacheId={useCallback(\n (feature, resolution) =>\n // This is the hashing function, it takes a feature as its input\n // and returns a string\n // It must be dependant of the same inputs as the rendering function\n feature.get("features").length > 1\n ? "#" + extentFeatures(feature.get("features"), resolution)\n : "$" + radiusStar(feature.get("features")[0]),\n []\n )}\n render={useCallback((feature, resolution) => {\n // This is the rendering function\n // It has access to the cluster which appears as a single feature\n // and has a property with an array of all the features that make it\n const size = feature.get("features").length;\n // This is the size (number of features) of the cluster\n if (size > 1) {\n // Render a blob with a number\n const radius = extentFeatures(\n feature.get("features"),\n resolution\n );\n return (\n // A dynamic style should return a fragment instead of a\n // full-blown RStyle - returning a full RStyle here\n // will simply replace the style used by the vector layer\n // with a fixed one\n <React.Fragment>\n <RCircle radius={radius}>\n <RFill color={colorBlob(size)} />\n </RCircle>\n <RText text={size.toString()}>\n <RFill color="#fff" />\n <RStroke color="rgba(0, 0, 0, 0.6)" width={3} />\n </RText>\n </React.Fragment>\n );\n }\n // We have a single feature cluster\n const unclusteredFeature = feature.get("features")[0];\n // Render a star\n return (\n <RRegularShape\n radius={radiusStar(unclusteredFeature)}\n radius2={3}\n points={5}\n angle={Math.PI}\n >\n <RFill color="rgba(255, 153, 0, 0.8)" />\n <RStroke color="rgba(255, 204, 0, 0.2)" width={1} />\n </RRegularShape>\n );\n }, [])}\n />\n </RLayerCluster>\n </RMap>\n <div className="my-3 w-100">\n <label htmlFor="distance">Clustering distance</label>\n <div className="w-100">\n <input\n type="range"\n className="range-slider range-slider--primary w-100"\n min="5"\n max="50"\n id="distance"\n value={distance}\n onChange={useCallback(\n (e: InputFormEventType) =>\n setDistance(parseInt(e.currentTarget.value)),\n []\n )}\n />\n </div>\n </div>\n <div>{selected}</div>\n </React.Fragment>\n );\n}\n'}}]); \ No newline at end of file diff --git a/8563.bundle.js b/8563.bundle.js index 0a04b7e0..1b24de32 100644 --- a/8563.bundle.js +++ b/8563.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[8563],{8563:(e,n,t)=>{t.r(n),t.d(n,{default:()=>o});const o="import React from 'react';\nimport {fromLonLat} from 'ol/proj';\nimport {\n altShiftKeysOnly,\n platformModifierKeyOnly,\n shiftKeyOnly,\n altKeyOnly,\n never,\n doubleClick\n} from 'ol/events/condition';\nimport {Geometry, Point} from 'ol/geom';\nimport 'ol/ol.css';\n\nimport monument from './svg/eiffel.svg';\nimport {RMap, ROSM, RInteraction, RLayerVector, RStyle, RFeature} from 'rlayers';\nimport VectorSource from 'ol/source/Vector';\nimport {OLFeatureClass} from 'rlayers/context';\n\nconst TourEiffel = fromLonLat([2.294, 48.858]);\nconst TourEiffelPoint = new Point(TourEiffel);\n\nexport default function Interactions(): JSX.Element {\n const [selected, setSelected] = React.useState(false);\n return (\n \n \n \n\n \n \n \n \n \n \n\n {\n // On every change, check if there is a feature covering the Eiffel Tower\n const source = e.target as VectorSource;\n if (source?.forEachFeatureAtCoordinateDirect)\n setSelected(\n source.forEachFeatureAtCoordinateDirect(TourEiffel, () => true)\n );\n }, [])}\n >\n {/* This is the style used for the drawn polygons */}\n \n \n \n \n\n \n\n \n\n platformModifierKeyOnly(e) && doubleClick(e),\n []\n )}\n />\n
    \n \n
    \n

    \n Hold Shift and click without dragging for a regular polygon\n

    \n

    \n Hold Shift and Alt and drag for a freehand polygon\n

    \n

    \n Hold Alt and click without dragging for a circle\n

    \n

    \n Hold Ctrl / ⌘ and drag to move/add a vertex\n

    \n

    \n Hold Ctrl / ⌘ and double click to remove a vertex\n

    \n
    \n
    \n

    Currently the Eiffel Tower is{selected ? '' : ' not'} covered

    \n
    \n \n );\n}\n"}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[8563],{8563:(e,n,t)=>{t.r(n),t.d(n,{default:()=>o});const o="import React from 'react';\nimport {fromLonLat} from 'ol/proj';\nimport {\n altShiftKeysOnly,\n platformModifierKeyOnly,\n shiftKeyOnly,\n altKeyOnly,\n never,\n doubleClick\n} from 'ol/events/condition';\nimport {Geometry, Point} from 'ol/geom';\nimport 'ol/ol.css';\n\nimport monument from './svg/eiffel.svg';\nimport {RMap, ROSM, RInteraction, RLayerVector, RStyle, RFeature} from 'rlayers';\nimport VectorSource from 'ol/source/Vector';\nimport {Feature} from 'ol';\n\nconst TourEiffel = fromLonLat([2.294, 48.858]);\nconst TourEiffelPoint = new Point(TourEiffel);\n\nexport default function Interactions(): JSX.Element {\n const [selected, setSelected] = React.useState(false);\n return (\n \n \n \n\n \n \n \n \n \n \n\n {\n // On every change, check if there is a feature covering the Eiffel Tower\n const source = e.target as VectorSource;\n if (source?.forEachFeatureAtCoordinateDirect)\n setSelected(\n source.forEachFeatureAtCoordinateDirect(TourEiffel, () => true)\n );\n }, [])}\n >\n {/* This is the style used for the drawn polygons */}\n \n \n \n \n\n \n\n \n\n platformModifierKeyOnly(e) && doubleClick(e),\n []\n )}\n />\n
    \n \n
    \n

    \n Hold Shift and click without dragging for a regular polygon\n

    \n

    \n Hold Shift and Alt and drag for a freehand polygon\n

    \n

    \n Hold Alt and click without dragging for a circle\n

    \n

    \n Hold Ctrl / ⌘ and drag to move/add a vertex\n

    \n

    \n Hold Ctrl / ⌘ and double click to remove a vertex\n

    \n
    \n
    \n

    Currently the Eiffel Tower is{selected ? '' : ' not'} covered

    \n
    \n \n );\n}\n"}}]); \ No newline at end of file diff --git a/8954.bundle.js b/8954.bundle.js index 90e2a914..6e3ca688 100644 --- a/8954.bundle.js +++ b/8954.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[8954],{8954:(n,s,a)=>{a.r(s),a.d(s,{default:()=>t});const t='/*\n * This example illustrates using vector tiles\n * and\n * layers that appear only when zoomed in\n */\n\nimport React, { useCallback } from "react";\nimport { Feature } from "ol";\nimport { fromLonLat } from "ol/proj";\nimport { MVT } from "ol/format";\nimport "ol/ol.css";\n\nimport { RMap, RLayerVectorTile } from "rlayers";\nimport {\n useRStyle,\n RStyle,\n RStyleArray,\n RStroke,\n RFill,\n RCircle,\n RText,\n} from "rlayers/style";\nimport { Geometry } from "ol/geom";\nimport RLayerStadia from "rlayers/layer/RLayerStadia";\n\nconst degree = 111319.49079327358;\nconst fonts = {\n 0: { width: 6, font: "1.2rem helvetica,sans-serif" },\n 1: { width: 5, font: "0.6rem helvetica,sans-serif" },\n 2: { width: 3, font: "0.5rem helvetica,sans-serif" },\n def: { width: 1, font: "0.4rem helvetica,sans-serif" },\n};\n\n/*\n * If you know about any open and free to use vector tile services, please let me know\n * This example uses the velivole.fr administrative boundary server which serves EPSG:4326\n *\n * You can also find a primitive pbf tile server based on geojson-vt\n * at https://github.com/mmomtchev/geojson-vt-server.git\n */\nexport default function VectorTiles(): JSX.Element {\n const [country, setCountry] = React.useState("");\n const towns = useRStyle();\n return (\n <React.Fragment>\n <RStyleArray\n ref={towns}\n render={useCallback((feature: Feature<Geometry>) => {\n /* This is a the towns style\n *\n * This examples illustrates superposing two image elements (two circles)\n *\n * This is a dynamic style that creates a new object\n * every time it is access\n * Use with care\n */\n\n const { width, font } = fonts[feature.get("p")] ?? fonts.def;\n const color =\n "#ffff" +\n feature\n .get("c")\n .charAt(0)\n .toString("hex")\n .substring(0, 2)\n .padStart(2, "0");\n return (\n <React.Fragment>\n <RStyle zIndex={10}>\n <RCircle radius={width}>\n <RStroke color={"#007bff"} width={width} />\n <RFill color={"#007bff"} />\n </RCircle>\n <RText font={font} text={feature.get("n")}>\n <RStroke color={"#007bff"} width={2} />\n <RFill color={color} />\n </RText>\n </RStyle>\n <RStyle zIndex={0}>\n <RCircle radius={width * 1.5}>\n <RStroke color={"#000000"} width={width * 1.5} />\n <RFill color={"#000000"} />\n </RCircle>\n </RStyle>\n </React.Fragment>\n );\n }, [])}\n />\n <RMap\n className="example-map"\n initial={{ center: fromLonLat([2.364, 48.82], "EPSG:4326"), zoom: 8 }}\n projection="EPSG:4326"\n >\n {/* This is the background raster map */}\n <RLayerStadia layer="stamen_watercolor" />\n {/* These are the administrative borders */}\n <RLayerVectorTile\n onPointerEnter={React.useCallback(\n (e) =>\n e.target?.get &&\n setCountry(e.target.get("n") + ", " + e.target.get("c")),\n [setCountry]\n )}\n url="https://velivole.b-cdn.net/tiles/admin/{z}/{x}/{y}.pbf"\n projection="EPSG:4326"\n format={new MVT()}\n >\n <RStyle>\n {/* This is the borders style */}\n <RStroke color="#007bff" width={2} />\n <RFill color="transparent" />\n </RStyle>\n </RLayerVectorTile>\n {/* These are the cities */}\n <RLayerVectorTile\n url="https://velivole.b-cdn.net/tiles/place/0/{z}/{x}/{y}.pbf"\n projection="EPSG:4326"\n maxResolution={0.01}\n style={towns}\n format={new MVT()}\n />\n {/* The towns visible only when zoomed in */}\n <RLayerVectorTile\n url="https://velivole.b-cdn.net/tiles/place/1/{z}/{x}/{y}.pbf"\n projection="EPSG:4326"\n maxResolution={0.0025}\n style={towns}\n format={new MVT()}\n />\n {/* The small villages at maximum resolution */}\n <RLayerVectorTile\n url="https://velivole.b-cdn.net/tiles/place/2/{z}/{x}/{y}.pbf"\n projection="EPSG:4326"\n maxResolution={0.0005}\n style={towns}\n format={new MVT()}\n />\n </RMap>\n <div className="mx-0 mt-0 mb-3 p-1 w-100 jumbotron shadow shadow">\n <p>\n You are now in <strong>{country}</strong>\n </p>\n </div>\n </React.Fragment>\n );\n}\n'}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[8954],{8954:(n,s,a)=>{a.r(s),a.d(s,{default:()=>t});const t='/*\n * This example illustrates using vector tiles\n * and\n * layers that appear only when zoomed in\n */\n\nimport React, { useCallback, useMemo } from "react";\nimport { Feature } from "ol";\nimport { fromLonLat } from "ol/proj";\nimport { MVT } from "ol/format";\nimport "ol/ol.css";\n\nimport { RMap, RLayerVectorTile } from "rlayers";\nimport {\n useRStyle,\n RStyle,\n RStyleArray,\n RStroke,\n RFill,\n RCircle,\n RText,\n} from "rlayers/style";\nimport { Geometry } from "ol/geom";\nimport RLayerStadia from "rlayers/layer/RLayerStadia";\nimport RenderFeature from "ol/render/Feature";\n\nconst degree = 111319.49079327358;\nconst fonts = {\n 0: { width: 6, font: "1.2rem helvetica,sans-serif" },\n 1: { width: 5, font: "0.6rem helvetica,sans-serif" },\n 2: { width: 3, font: "0.5rem helvetica,sans-serif" },\n def: { width: 1, font: "0.4rem helvetica,sans-serif" },\n};\n\n/*\n * If you know about any open and free to use vector tile services, please let me know\n * This example uses the velivole.fr administrative boundary server which serves EPSG:4326\n *\n * You can also find a primitive pbf tile server based on geojson-vt\n * at https://github.com/mmomtchev/geojson-vt-server.git\n */\nexport default function VectorTiles(): JSX.Element {\n const [country, setCountry] = React.useState("");\n const towns = useRStyle();\n const parser = useMemo(() => new MVT(), []);\n return (\n <React.Fragment>\n <RStyleArray\n ref={towns}\n render={useCallback((feature: Feature<Geometry>) => {\n /* This is a the towns style\n *\n * This examples illustrates superposing two image elements (two circles)\n *\n * This is a dynamic style that creates a new object\n * every time it is access\n * Use with care\n */\n\n const { width, font } = fonts[feature.get("p")] ?? fonts.def;\n const color =\n "#ffff" +\n feature\n .get("c")\n .charAt(0)\n .toString("hex")\n .substring(0, 2)\n .padStart(2, "0");\n return (\n <React.Fragment>\n <RStyle zIndex={10}>\n <RCircle radius={width}>\n <RStroke color={"#007bff"} width={width} />\n <RFill color={"#007bff"} />\n </RCircle>\n <RText font={font} text={feature.get("n")}>\n <RStroke color={"#007bff"} width={2} />\n <RFill color={color} />\n </RText>\n </RStyle>\n <RStyle zIndex={0}>\n <RCircle radius={width * 1.5}>\n <RStroke color={"#000000"} width={width * 1.5} />\n <RFill color={"#000000"} />\n </RCircle>\n </RStyle>\n </React.Fragment>\n );\n }, [])}\n />\n <RMap\n className="example-map"\n initial={{ center: fromLonLat([2.364, 48.82], "EPSG:4326"), zoom: 8 }}\n projection="EPSG:4326"\n >\n {/* This is the background raster map */}\n <RLayerStadia layer="stamen_watercolor" />\n {/* These are the administrative borders */}\n <RLayerVectorTile\n onPointerEnter={React.useCallback(\n (e) =>\n e.target?.get &&\n setCountry(e.target.get("n") + ", " + e.target.get("c")),\n [setCountry]\n )}\n url="https://velivole.b-cdn.net/tiles/admin/{z}/{x}/{y}.pbf"\n projection="EPSG:4326"\n format={parser}\n >\n <RStyle>\n {/* This is the borders style */}\n <RStroke color="#007bff" width={2} />\n <RFill color="transparent" />\n </RStyle>\n </RLayerVectorTile>\n {/* These are the cities */}\n <RLayerVectorTile\n url="https://velivole.b-cdn.net/tiles/place/0/{z}/{x}/{y}.pbf"\n projection="EPSG:4326"\n maxResolution={0.01}\n style={towns}\n format={parser}\n />\n {/* The towns visible only when zoomed in */}\n <RLayerVectorTile\n url="https://velivole.b-cdn.net/tiles/place/1/{z}/{x}/{y}.pbf"\n projection="EPSG:4326"\n maxResolution={0.0025}\n style={towns}\n format={parser}\n />\n {/* The small villages at maximum resolution */}\n <RLayerVectorTile\n url="https://velivole.b-cdn.net/tiles/place/2/{z}/{x}/{y}.pbf"\n projection="EPSG:4326"\n maxResolution={0.0005}\n style={towns}\n format={parser}\n />\n </RMap>\n <div className="mx-0 mt-0 mb-3 p-1 w-100 jumbotron shadow shadow">\n <p>\n You are now in <strong>{country}</strong>\n </p>\n </div>\n </React.Fragment>\n );\n}\n'}}]); \ No newline at end of file diff --git a/944.bundle.js b/944.bundle.js index 4104c58d..7714527e 100644 --- a/944.bundle.js +++ b/944.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[944],{944:(n,e,o)=>{o.r(e),o.d(e,{default:()=>r});const r="import React from 'react';\nimport {fromLonLat} from 'ol/proj';\nimport {Coordinate} from 'ol/coordinate';\nimport {Point} from 'ol/geom';\nimport 'ol/ol.css';\n\nimport {RMap, ROSM, RLayerVector, RFeature, ROverlay} from 'rlayers';\nimport pacman from './svg/pacman.svg';\n\nconst coords: Record = {\n origin: [2.364, 48.82],\n ArcDeTriomphe: [2.295, 48.8737]\n};\n\nexport default function AnimatedOverlay(): JSX.Element {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n}\n"}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[944],{944:(n,e,o)=>{o.r(e),o.d(e,{default:()=>r});const r="import React from 'react';\nimport {fromLonLat} from 'ol/proj';\nimport {Coordinate} from 'ol/coordinate';\nimport {Point} from 'ol/geom';\nimport 'ol/ol.css';\n\nimport {RMap, ROSM, RLayerVector, RFeature, ROverlay} from 'rlayers';\nimport pacman from './svg/pacman.svg';\n\nconst coords: Record = {\n origin: [2.364, 48.82],\n ArcDeTriomphe: [2.295, 48.8737]\n};\n\nexport default function AnimatedOverlay(): JSX.Element {\n return (\n \n \n \n geometry={new Point(fromLonLat(coords.ArcDeTriomphe))}>\n \n \n \n \n \n \n );\n}\n"}}]); \ No newline at end of file diff --git a/api/index.html b/api/index.html index 12d29cbf..98b049ad 100644 --- a/api/index.html +++ b/api/index.html @@ -5,7 +5,7 @@ rlayers - 2.3.2 | Documentation + 3.0.0 | Documentation @@ -17,7 +17,7 @@