diff --git a/basic-properties/src/main/java/ink/wgink/properties/map/MapProperties.java b/basic-properties/src/main/java/ink/wgink/properties/map/MapProperties.java new file mode 100644 index 00000000..707c5482 --- /dev/null +++ b/basic-properties/src/main/java/ink/wgink/properties/map/MapProperties.java @@ -0,0 +1,30 @@ +package ink.wgink.properties.map; + +/** + * @ClassName: MapProperties + * @Description: 地图配置 + * @Author: wanggeng + * @Date: 2021/12/19 11:18 AM + * @Version: 1.0 + */ +public class MapProperties { + + private String centerLng; + private String centerLat; + + public String getCenterLng() { + return centerLng == null ? "" : centerLng.trim(); + } + + public void setCenterLng(String centerLng) { + this.centerLng = centerLng; + } + + public String getCenterLat() { + return centerLat == null ? "" : centerLat.trim(); + } + + public void setCenterLat(String centerLat) { + this.centerLat = centerLat; + } +} diff --git a/basic-properties/src/main/java/ink/wgink/properties/map/SuperMapProperties.java b/basic-properties/src/main/java/ink/wgink/properties/map/SuperMapProperties.java new file mode 100644 index 00000000..e709a122 --- /dev/null +++ b/basic-properties/src/main/java/ink/wgink/properties/map/SuperMapProperties.java @@ -0,0 +1,26 @@ +package ink.wgink.properties.map; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +/** + * @ClassName: SuperMapProperties + * @Description: 超图配置 + * @Author: wanggeng + * @Date: 2021/12/19 5:25 PM + * @Version: 1.0 + */ +@Component +@ConfigurationProperties(prefix = "map.super-map") +public class SuperMapProperties extends MapProperties { + + private String baseMapUrl; + + public String getBaseMapUrl() { + return baseMapUrl == null ? "" : baseMapUrl.trim(); + } + + public void setBaseMapUrl(String baseMapUrl) { + this.baseMapUrl = baseMapUrl; + } +} diff --git a/common/pom.xml b/common/pom.xml index 7d1703ac..5aaabd14 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -69,10 +69,12 @@ - - - - + + + com.google.code.gson + gson + + diff --git a/module-map/src/main/java/ink/wgink/module/map/controller/route/grid/GridRouteController.java b/module-map/src/main/java/ink/wgink/module/map/controller/route/grid/GridRouteController.java index a26f90ca..625e6352 100644 --- a/module-map/src/main/java/ink/wgink/module/map/controller/route/grid/GridRouteController.java +++ b/module-map/src/main/java/ink/wgink/module/map/controller/route/grid/GridRouteController.java @@ -21,27 +21,27 @@ public class GridRouteController { @GetMapping("save") public ModelAndView save() { - return new ModelAndView("grid/grid/save"); + return new ModelAndView("grid/grid/default/save"); } @GetMapping("update") public ModelAndView update() { - return new ModelAndView("grid/grid/update"); + return new ModelAndView("grid/grid/default/update"); } @GetMapping("get") public ModelAndView get() { - return new ModelAndView("grid/grid/get"); + return new ModelAndView("grid/grid/default/get"); } @GetMapping("list") public ModelAndView list() { - return new ModelAndView("grid/grid/list"); + return new ModelAndView("grid/grid/default/list"); } @GetMapping("list-select") public ModelAndView listSelect() { - return new ModelAndView("grid/grid/list-select"); + return new ModelAndView("grid/grid/default/list-select"); } } diff --git a/module-map/src/main/java/ink/wgink/module/map/controller/route/grid/GridSuperMapRouteController.java b/module-map/src/main/java/ink/wgink/module/map/controller/route/grid/GridSuperMapRouteController.java new file mode 100644 index 00000000..5c3852f3 --- /dev/null +++ b/module-map/src/main/java/ink/wgink/module/map/controller/route/grid/GridSuperMapRouteController.java @@ -0,0 +1,58 @@ +package ink.wgink.module.map.controller.route.grid; + +import ink.wgink.interfaces.consts.ISystemConstant; +import ink.wgink.properties.map.SuperMapProperties; +import io.swagger.annotations.Api; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.servlet.ModelAndView; + +/** + * @ClassName: GridRouteController + * @Description: 网格路由 + * @Author: wanggeng + * @Date: 2021/10/20 9:33 上午 + * @Version: 1.0 + */ +@Api(tags = ISystemConstant.ROUTE_TAGS_PREFIX + "网格") +@Controller +@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/grid/super-map") +public class GridSuperMapRouteController { + + @Autowired + private SuperMapProperties superMapProperties; + + @GetMapping("save") + public ModelAndView save() { + ModelAndView mv = new ModelAndView("grid/grid/super-map/save"); + mv.addObject("superMapProperties", superMapProperties); + return mv; + } + + @GetMapping("update") + public ModelAndView update() { + ModelAndView mv = new ModelAndView("grid/grid/super-map/update"); + mv.addObject("superMapProperties", superMapProperties); + return mv; + } + + @GetMapping("get") + public ModelAndView get() { + ModelAndView mv = new ModelAndView("grid/grid/super-map/get"); + mv.addObject("superMapProperties", superMapProperties); + return mv; + } + + @GetMapping("list") + public ModelAndView list() { + return new ModelAndView("grid/grid/super-map/list"); + } + + @GetMapping("list-select") + public ModelAndView listSelect() { + return new ModelAndView("grid/grid/super-map/list-select"); + } + +} diff --git a/module-map/src/main/java/ink/wgink/module/map/controller/route/grid/GridSuperMapUserRouteController.java b/module-map/src/main/java/ink/wgink/module/map/controller/route/grid/GridSuperMapUserRouteController.java new file mode 100644 index 00000000..aff33664 --- /dev/null +++ b/module-map/src/main/java/ink/wgink/module/map/controller/route/grid/GridSuperMapUserRouteController.java @@ -0,0 +1,27 @@ +package ink.wgink.module.map.controller.route.grid; + +import ink.wgink.interfaces.consts.ISystemConstant; +import io.swagger.annotations.Api; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.servlet.ModelAndView; + +/** + * @ClassName: GridUserRouteController + * @Description: 网格用户路由 + * @Author: wanggeng + * @Date: 2021/10/20 5:44 下午 + * @Version: 1.0 + */ +@Api(tags = ISystemConstant.ROUTE_TAGS_PREFIX + "网格用户") +@Controller +@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/grid/super-map/user") +public class GridSuperMapUserRouteController { + + @GetMapping("list") + public ModelAndView list() { + return new ModelAndView("grid/grid/super-map/user/list"); + } + +} diff --git a/module-map/src/main/java/ink/wgink/module/map/controller/route/grid/GridUserRouteController.java b/module-map/src/main/java/ink/wgink/module/map/controller/route/grid/GridUserRouteController.java index 37ffb2e7..8acdf4da 100644 --- a/module-map/src/main/java/ink/wgink/module/map/controller/route/grid/GridUserRouteController.java +++ b/module-map/src/main/java/ink/wgink/module/map/controller/route/grid/GridUserRouteController.java @@ -21,7 +21,7 @@ public class GridUserRouteController { @GetMapping("list") public ModelAndView list() { - return new ModelAndView("grid/grid/user/list"); + return new ModelAndView("grid/grid/default/user/list"); } } diff --git a/module-map/src/main/java/ink/wgink/module/map/controller/staticfile/SuperMapStaticController.java b/module-map/src/main/java/ink/wgink/module/map/controller/staticfile/SuperMapStaticController.java new file mode 100644 index 00000000..d4210ac4 --- /dev/null +++ b/module-map/src/main/java/ink/wgink/module/map/controller/staticfile/SuperMapStaticController.java @@ -0,0 +1,37 @@ +package ink.wgink.module.map.controller.staticfile; + +import ink.wgink.util.ResourceUtil; +import ink.wgink.util.request.StaticResourceRequestUtil; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.io.InputStream; + +/** + * @ClassName: SuperMapStaticController + * @Description: 超图静态资源 + * @Author: wanggeng + * @Date: 2021/12/18 10:16 PM + * @Version: 1.0 + */ +@Controller +@RequestMapping("static/super-map") +public class SuperMapStaticController { + + @GetMapping("css/{fileName}") + public void css(HttpServletResponse httpServletResponse, @PathVariable("fileName") String fileName) throws IOException { + InputStream inputStream = ResourceUtil.getJarResourceInputStream("static/super-map/css/" + fileName); + StaticResourceRequestUtil.download(httpServletResponse, inputStream, fileName); + } + + @GetMapping("js/{fileName}") + public void js(HttpServletResponse httpServletResponse, @PathVariable("fileName") String fileName) throws IOException { + InputStream inputStream = ResourceUtil.getJarResourceInputStream("static/super-map/js/" + fileName); + StaticResourceRequestUtil.download(httpServletResponse, inputStream, fileName); + } + +} diff --git a/module-map/src/main/resources/static/super-map/css/leaflet-geoman.css b/module-map/src/main/resources/static/super-map/css/leaflet-geoman.css new file mode 100644 index 00000000..a05e13f2 --- /dev/null +++ b/module-map/src/main/resources/static/super-map/css/leaflet-geoman.css @@ -0,0 +1,245 @@ +.marker-icon, +.marker-icon:focus { + background-color: #ffffff; + border: 1px solid #3388ff; + border-radius: 50%; + margin: -8px 0 0 -8px !important; + width: 14px !important; + height: 14px !important; + outline: 0; + transition: opacity ease 0.3s; +} + +.marker-icon-middle, +.marker-icon-middle:focus { + opacity: 0.7; + margin: -6px 0 0 -6px !important; + width: 10px !important; + height: 10px !important; +} + +.leaflet-pm-draggable { + cursor: move !important; +} + +.cursor-marker { + cursor: crosshair; + pointer-events: none; + display: none; +} + +.cursor-marker.visible { + display: block !important; +} + +.leaflet-pm-invalid { + stroke: red; + transition: fill ease 0s, stroke ease 0s; +} + +.rect-style-marker, +.rect-start-marker { + opacity: 0; +} + +.rect-style-marker.visible, +.rect-start-marker.visible { + opacity: 1 !important; +} + +.hidden { + display: none; +} + +.vertexmarker-disabled { + opacity: 0.7; +} + +.leaflet-pm-toolbar { +} + +.leaflet-pm-toolbar .leaflet-buttons-control-button { + padding: 5px; + box-sizing: border-box; + position: relative; + z-index: 3; +} + +.leaflet-pm-toolbar + .leaflet-pm-actions-container + a.leaflet-pm-action:first-child:not(.pos-right), +.leaflet-pm-toolbar + .leaflet-pm-actions-container + a.leaflet-pm-action:last-child.pos-right { + border-radius: 0; +} + +.leaflet-pm-toolbar .button-container a.leaflet-buttons-control-button { + border-radius: 0; +} + +.leaflet-pm-toolbar + .button-container:last-child + a.leaflet-buttons-control-button { + border-radius: 0 0 2px 2px; +} + +.leaflet-pm-toolbar + .button-container:first-child + a.leaflet-buttons-control-button { + border-radius: 2px 2px 0 0; +} + +.leaflet-pm-toolbar + .button-container:last-child + a.leaflet-buttons-control-button { + border-bottom: none; +} + +.leaflet-pm-toolbar .control-fa-icon { + font-size: 19px; + line-height: 24px; +} + +.leaflet-pm-toolbar .control-icon { + width: 100%; + height: 100%; + box-sizing: border-box; + background-size: contain; + background-repeat: no-repeat; + background-position: center center; +} + +.leaflet-pm-toolbar .leaflet-pm-icon-marker { + background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjRweCIgaGVpZ2h0PSIyNHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjUgKDY3NDY5KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5BdG9tcy9JY29ucy9Ub29scy9NYXJrZXI8L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZGVmcz4KICAgICAgICA8cGF0aCBkPSJNMTUuNSwyNC44NzgyOTU5IEMxNS4yOTA5MjAxLDI0Ljg3NzIyMTkgMTUuMTc0NDg1NywyNC44NDY3ODE3IDE0LjY1OTA4NjYsMjQuMjM1NDE2MyBDMTAuMjE5Njk1NSwxOS40MTE4MDU0IDgsMTUuNTAxNDM5MiA4LDEyLjUwNDMxNzcgQzgsOC4zNTk3OTc0NiAxMS4zNTc4NjQ0LDUgMTUuNSw1IEMxOS42NDIxMzU2LDUgMjMsOC4zNTk3OTc0NiAyMywxMi41MDQzMTc3IEMyMywxNyAxOC4yODc4MjE3LDIxLjkyNjgzNzggMTYuMzMzNjYwMSwyNC4yNDQwMTg2IEMxNS44MjI0NjIyLDI0Ljg1MDE4MDIgMTUuNzA5MDc5OSwyNC44NzkzNjk5IDE1LjUsMjQuODc4Mjk1OSBaIE0xNS41LDE1LjUzMjY5NDggQzE3LjI3NTIwMSwxNS41MzI2OTQ4IDE4LjcxNDI4NTcsMTQuMTE4MDAwNCAxOC43MTQyODU3LDEyLjM3Mjg4NjQgQzE4LjcxNDI4NTcsMTAuNjI3NzcyMyAxNy4yNzUyMDEsOS4yMTMwNzc5MiAxNS41LDkuMjEzMDc3OTIgQzEzLjcyNDc5OSw5LjIxMzA3NzkyIDEyLjI4NTcxNDMsMTAuNjI3NzcyMyAxMi4yODU3MTQzLDEyLjM3Mjg4NjQgQzEyLjI4NTcxNDMsMTQuMTE4MDAwNCAxMy43MjQ3OTksMTUuNTMyNjk0OCAxNS41LDE1LjUzMjY5NDggWiIgaWQ9InBhdGgtMSI+PC9wYXRoPgogICAgPC9kZWZzPgogICAgPGcgaWQ9IlN5bWJvbHMiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJBdG9tcy9JY29ucy9Ub29scy9NYXJrZXIiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0zLjAwMDAwMCwgLTMuMDAwMDAwKSI+CiAgICAgICAgICAgIDxtYXNrIGlkPSJtYXNrLTIiIGZpbGw9IndoaXRlIj4KICAgICAgICAgICAgICAgIDx1c2UgeGxpbms6aHJlZj0iI3BhdGgtMSI+PC91c2U+CiAgICAgICAgICAgIDwvbWFzaz4KICAgICAgICAgICAgPHVzZSBpZD0iTWFzayIgZmlsbD0iIzVCNUI1QiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjcGF0aC0xIj48L3VzZT4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==); +} +.leaflet-pm-toolbar .leaflet-pm-icon-polygon { + background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+CiAgPGRlZnM+CiAgICA8cGF0aCBpZD0icG9seWdvbi1hIiBkPSJNMTkuNDIwNjg5Miw5LjE2NTA5NzI1IEMxOS4xNTIzNjgxLDguNjY5OTI5MTQgMTksOC4xMDI3NTgzMSAxOSw3LjUgQzE5LDUuNTY3MDAzMzggMjAuNTY3MDAzNCw0IDIyLjUsNCBDMjQuNDMyOTk2Niw0IDI2LDUuNTY3MDAzMzggMjYsNy41IEMyNiw5LjI2MzIzNTk1IDI0LjY5NjE0NzEsMTAuNzIxOTQwNyAyMywxMC45NjQ1NTU2IEwyMywxOS4wMzU0NDQ0IEMyNC42OTYxNDcxLDE5LjI3ODA1OTMgMjYsMjAuNzM2NzY0IDI2LDIyLjUgQzI2LDI0LjQzMjk5NjYgMjQuNDMyOTk2NiwyNiAyMi41LDI2IEMyMC43MzY3NjQsMjYgMTkuMjc4MDU5MywyNC42OTYxNDcxIDE5LjAzNTQ0NDQsMjMgTDEwLjk2NDU1NTYsMjMgQzEwLjcyMTk0MDcsMjQuNjk2MTQ3MSA5LjI2MzIzNTk1LDI2IDcuNSwyNiBDNS41NjcwMDMzOCwyNiA0LDI0LjQzMjk5NjYgNCwyMi41IEM0LDIwLjU2NzAwMzQgNS41NjcwMDMzOCwxOSA3LjUsMTkgQzguMTAyNzU4MzEsMTkgOC42Njk5MjkxNCwxOS4xNTIzNjgxIDkuMTY1MDk3MjUsMTkuNDIwNjg5MiBMMTkuNDIwNjg5Miw5LjE2NTA5NzI1IFogTTIwLjgzNDkwNzMsMTAuNTc5MzA2MyBMMTAuNTc5MzEwOCwyMC44MzQ5MDI3IEMxMC42MDg2NzMxLDIwLjg4OTA4ODggMTAuNjM2NjQ2OSwyMC45NDQxMzcyIDEwLjY2MzE4NDQsMjEgTDE5LjMzNjgxNTYsMjEgQzE5LjY4MjU3NzUsMjAuMjcyMTU0IDIwLjI3MjE1NCwxOS42ODI1Nzc1IDIxLDE5LjMzNjgxNTYgTDIxLDEwLjY2MzE4NDQgQzIwLjk0NDEzNzIsMTAuNjM2NjQ2OSAyMC44ODkwODg4LDEwLjYwODY3MzEgMjAuODM0OTAyNywxMC41NzkzMTA4IFogTTIyLjUsOSBDMjMuMzI4NDI3MSw5IDI0LDguMzI4NDI3MTIgMjQsNy41IEMyNCw2LjY3MTU3Mjg4IDIzLjMyODQyNzEsNiAyMi41LDYgQzIxLjY3MTU3MjksNiAyMSw2LjY3MTU3Mjg4IDIxLDcuNSBDMjEsOC4zMjg0MjcxMiAyMS42NzE1NzI5LDkgMjIuNSw5IFogTTIyLjUsMjQgQzIzLjMyODQyNzEsMjQgMjQsMjMuMzI4NDI3MSAyNCwyMi41IEMyNCwyMS42NzE1NzI5IDIzLjMyODQyNzEsMjEgMjIuNSwyMSBDMjEuNjcxNTcyOSwyMSAyMSwyMS42NzE1NzI5IDIxLDIyLjUgQzIxLDIzLjMyODQyNzEgMjEuNjcxNTcyOSwyNCAyMi41LDI0IFogTTcuNSwyNCBDOC4zMjg0MjcxMiwyNCA5LDIzLjMyODQyNzEgOSwyMi41IEM5LDIxLjY3MTU3MjkgOC4zMjg0MjcxMiwyMSA3LjUsMjEgQzYuNjcxNTcyODgsMjEgNiwyMS42NzE1NzI5IDYsMjIuNSBDNiwyMy4zMjg0MjcxIDYuNjcxNTcyODgsMjQgNy41LDI0IFoiLz4KICA8L2RlZnM+CiAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMyAtMykiPgogICAgPG1hc2sgaWQ9InBvbHlnb24tYiIgZmlsbD0iI2ZmZiI+CiAgICAgIDx1c2UgeGxpbms6aHJlZj0iI3BvbHlnb24tYSIvPgogICAgPC9tYXNrPgogICAgPHVzZSBmaWxsPSIjNUI1QjVCIiBmaWxsLXJ1bGU9Im5vbnplcm8iIHhsaW5rOmhyZWY9IiNwb2x5Z29uLWEiLz4KICAgIDxnIGZpbGw9IiM1QjVCNUIiIG1hc2s9InVybCgjcG9seWdvbi1iKSI+CiAgICAgIDxyZWN0IHdpZHRoPSIzMCIgaGVpZ2h0PSIzMCIvPgogICAgPC9nPgogIDwvZz4KPC9zdmc+Cg==); +} +.leaflet-pm-toolbar .leaflet-pm-icon-polyline { + background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+CiAgPGRlZnM+CiAgICA8cGF0aCBpZD0ibGluZS1hIiBkPSJNOS4xNjUwOTcyNSwxOS40MjA2ODkyIEwxOC40MjA2ODkyLDEwLjE2NTA5NzMgQzE4LjE1MjM2ODEsOS42Njk5MjkxNCAxOCw5LjEwMjc1ODMxIDE4LDguNSBDMTgsNi41NjcwMDMzOCAxOS41NjcwMDM0LDUgMjEuNSw1IEMyMy40MzI5OTY2LDUgMjUsNi41NjcwMDMzOCAyNSw4LjUgQzI1LDEwLjQzMjk5NjYgMjMuNDMyOTk2NiwxMiAyMS41LDEyIEMyMC44OTcyNDE3LDEyIDIwLjMzMDA3MDksMTEuODQ3NjMxOSAxOS44MzQ5MDI3LDExLjU3OTMxMDggTDEwLjU3OTMxMDgsMjAuODM0OTAyNyBDMTAuODQ3NjMxOSwyMS4zMzAwNzA5IDExLDIxLjg5NzI0MTcgMTEsMjIuNSBDMTEsMjQuNDMyOTk2NiA5LjQzMjk5NjYyLDI2IDcuNSwyNiBDNS41NjcwMDMzOCwyNiA0LDI0LjQzMjk5NjYgNCwyMi41IEM0LDIwLjU2NzAwMzQgNS41NjcwMDMzOCwxOSA3LjUsMTkgQzguMTAyNzU4MzEsMTkgOC42Njk5MjkxNCwxOS4xNTIzNjgxIDkuMTY1MDk3MjUsMTkuNDIwNjg5MiBaIE0yMS41LDEwIEMyMi4zMjg0MjcxLDEwIDIzLDkuMzI4NDI3MTIgMjMsOC41IEMyMyw3LjY3MTU3Mjg4IDIyLjMyODQyNzEsNyAyMS41LDcgQzIwLjY3MTU3MjksNyAyMCw3LjY3MTU3Mjg4IDIwLDguNSBDMjAsOS4zMjg0MjcxMiAyMC42NzE1NzI5LDEwIDIxLjUsMTAgWiBNNy41LDI0IEM4LjMyODQyNzEyLDI0IDksMjMuMzI4NDI3MSA5LDIyLjUgQzksMjEuNjcxNTcyOSA4LjMyODQyNzEyLDIxIDcuNSwyMSBDNi42NzE1NzI4OCwyMSA2LDIxLjY3MTU3MjkgNiwyMi41IEM2LDIzLjMyODQyNzEgNi42NzE1NzI4OCwyNCA3LjUsMjQgWiIvPgogIDwvZGVmcz4KICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0zIC0zKSI+CiAgICA8bWFzayBpZD0ibGluZS1iIiBmaWxsPSIjZmZmIj4KICAgICAgPHVzZSB4bGluazpocmVmPSIjbGluZS1hIi8+CiAgICA8L21hc2s+CiAgICA8dXNlIGZpbGw9IiM1QjVCNUIiIGZpbGwtcnVsZT0ibm9uemVybyIgeGxpbms6aHJlZj0iI2xpbmUtYSIvPgogICAgPGcgZmlsbD0iIzVCNUI1QiIgbWFzaz0idXJsKCNsaW5lLWIpIj4KICAgICAgPHJlY3Qgd2lkdGg9IjMwIiBoZWlnaHQ9IjMwIi8+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K); +} +.leaflet-pm-toolbar .leaflet-pm-icon-circle { + background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjRweCIgaGVpZ2h0PSIyNHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjUgKDY3NDY5KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5BdG9tcy9JY29ucy9Ub29scy9DaXJjbGU8L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZGVmcz4KICAgICAgICA8cGF0aCBkPSJNMTguMjg5Nzc1MSw2Ljc4NjAyMjc1IEMxOC44OTI0MTMxLDYuMjk0NjQ5ODEgMTkuNjYxNzk3LDYgMjAuNSw2IEMyMi40MzI5OTY2LDYgMjQsNy41NjcwMDMzOCAyNCw5LjUgQzI0LDEwLjMzODIwMyAyMy43MDUzNTAyLDExLjEwNzU4NjkgMjMuMjEzOTc3MiwxMS43MTAyMjQ5IEMyMy43MTk1OTksMTIuODcxMjA1MyAyNCwxNC4xNTI4NTcxIDI0LDE1LjUgQzI0LDIwLjc0NjcwNTEgMTkuNzQ2NzA1MSwyNSAxNC41LDI1IEM5LjI1MzI5NDg4LDI1IDUsMjAuNzQ2NzA1MSA1LDE1LjUgQzUsMTAuMjUzMjk0OSA5LjI1MzI5NDg4LDYgMTQuNSw2IEMxNS44NDcxNDI5LDYgMTcuMTI4Nzk0Nyw2LjI4MDQwMDk4IDE4LjI4OTc3NTEsNi43ODYwMjI3NSBaIE0xNy4xNTA0MjI4LDguNDgxNzU4NiBDMTYuMzI2MzU4MSw4LjE3MDM5MjM2IDE1LjQzMzA3NzcsOCAxNC41LDggQzEwLjM1Nzg2NDQsOCA3LDExLjM1Nzg2NDQgNywxNS41IEM3LDE5LjY0MjEzNTYgMTAuMzU3ODY0NCwyMyAxNC41LDIzIEMxOC42NDIxMzU2LDIzIDIyLDE5LjY0MjEzNTYgMjIsMTUuNSBDMjIsMTQuNTY2OTIyMyAyMS44Mjk2MDc2LDEzLjY3MzY0MTkgMjEuNTE4MjQxNCwxMi44NDk1NzcyIEMyMS4xOTYwMzgzLDEyLjk0NzM5NjggMjAuODU0MTYyMiwxMyAyMC41LDEzIEMxOC41NjcwMDM0LDEzIDE3LDExLjQzMjk5NjYgMTcsOS41IEMxNyw5LjE0NTgzNzc4IDE3LjA1MjYwMzIsOC44MDM5NjE2OSAxNy4xNTA0MjI4LDguNDgxNzU4NiBaIE0xNC41LDE3IEMxMy42NzE1NzI5LDE3IDEzLDE2LjMyODQyNzEgMTMsMTUuNSBDMTMsMTQuNjcxNTcyOSAxMy42NzE1NzI5LDE0IDE0LjUsMTQgQzE1LjMyODQyNzEsMTQgMTYsMTQuNjcxNTcyOSAxNiwxNS41IEMxNiwxNi4zMjg0MjcxIDE1LjMyODQyNzEsMTcgMTQuNSwxNyBaIE0yMC41LDExIEMyMS4zMjg0MjcxLDExIDIyLDEwLjMyODQyNzEgMjIsOS41IEMyMiw4LjY3MTU3Mjg4IDIxLjMyODQyNzEsOCAyMC41LDggQzE5LjY3MTU3MjksOCAxOSw4LjY3MTU3Mjg4IDE5LDkuNSBDMTksMTAuMzI4NDI3MSAxOS42NzE1NzI5LDExIDIwLjUsMTEgWiIgaWQ9InBhdGgtMSI+PC9wYXRoPgogICAgPC9kZWZzPgogICAgPGcgaWQ9IlN5bWJvbHMiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJBdG9tcy9JY29ucy9Ub29scy9DaXJjbGUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0zLjAwMDAwMCwgLTMuMDAwMDAwKSI+CiAgICAgICAgICAgIDxtYXNrIGlkPSJtYXNrLTIiIGZpbGw9IndoaXRlIj4KICAgICAgICAgICAgICAgIDx1c2UgeGxpbms6aHJlZj0iI3BhdGgtMSI+PC91c2U+CiAgICAgICAgICAgIDwvbWFzaz4KICAgICAgICAgICAgPHVzZSBpZD0iTWFzayIgZmlsbD0iIzVCNUI1QiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjcGF0aC0xIj48L3VzZT4KICAgICAgICAgICAgPGcgaWQ9IkF0b21zL0NvbG9yL0dyZXkiIG1hc2s9InVybCgjbWFzay0yKSIgZmlsbD0iIzVCNUI1QiI+CiAgICAgICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlIiB4PSIwIiB5PSIwIiB3aWR0aD0iMzAiIGhlaWdodD0iMzAiPjwvcmVjdD4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+); +} +.leaflet-pm-toolbar .leaflet-pm-icon-circle-marker { + background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KCjxzdmcgdmlld0JveD0iMCAwIDEwMCAxMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjNUI1QjVCIiBzdHJva2Utd2lkdGg9IjgiCiAgICAgZmlsbD0ibm9uZSI+CjxjaXJjbGUgY3g9IjUwIiBjeT0iNTAiIHI9IjM1Ii8+CiAgPGNpcmNsZSBjeD0iNTAiIGN5PSI1MCIgcj0iMyIgZmlsbD0iIzVCNUI1QiIvPgo8L3N2Zz4=); +} +.leaflet-pm-toolbar .leaflet-pm-icon-rectangle { + background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+CiAgPGRlZnM+CiAgICA8cGF0aCBpZD0icmVjdGFuZ2xlLWEiIGQ9Ik0yMywxMC45NjQ1NTU2IEwyMywxOS4wMzU0NDQ0IEMyNC42OTYxNDcxLDE5LjI3ODA1OTMgMjYsMjAuNzM2NzY0IDI2LDIyLjUgQzI2LDI0LjQzMjk5NjYgMjQuNDMyOTk2NiwyNiAyMi41LDI2IEMyMC43MzY3NjQsMjYgMTkuMjc4MDU5MywyNC42OTYxNDcxIDE5LjAzNTQ0NDQsMjMgTDEwLjk2NDU1NTYsMjMgQzEwLjcyMTk0MDcsMjQuNjk2MTQ3MSA5LjI2MzIzNTk1LDI2IDcuNSwyNiBDNS41NjcwMDMzOCwyNiA0LDI0LjQzMjk5NjYgNCwyMi41IEM0LDIwLjczNjc2NCA1LjMwMzg1MjkzLDE5LjI3ODA1OTMgNywxOS4wMzU0NDQ0IEw3LDEwLjk2NDU1NTYgQzUuMzAzODUyOTMsMTAuNzIxOTQwNyA0LDkuMjYzMjM1OTUgNCw3LjUgQzQsNS41NjcwMDMzOCA1LjU2NzAwMzM4LDQgNy41LDQgQzkuMjYzMjM1OTUsNCAxMC43MjE5NDA3LDUuMzAzODUyOTMgMTAuOTY0NTU1Niw3IEwxOS4wMzU0NDQ0LDcgQzE5LjI3ODA1OTMsNS4zMDM4NTI5MyAyMC43MzY3NjQsNCAyMi41LDQgQzI0LjQzMjk5NjYsNCAyNiw1LjU2NzAwMzM4IDI2LDcuNSBDMjYsOS4yNjMyMzU5NSAyNC42OTYxNDcxLDEwLjcyMTk0MDcgMjMsMTAuOTY0NTU1NiBaIE0yMSwxMC42NjMxODQ0IEMyMC4yNzIxNTQsMTAuMzE3NDIyNSAxOS42ODI1Nzc1LDkuNzI3ODQ1OTggMTkuMzM2ODE1Niw5IEwxMC42NjMxODQ0LDkgQzEwLjMxNzQyMjUsOS43Mjc4NDU5OCA5LjcyNzg0NTk4LDEwLjMxNzQyMjUgOSwxMC42NjMxODQ0IEw5LDE5LjMzNjgxNTYgQzkuNzI3ODQ1OTgsMTkuNjgyNTc3NSAxMC4zMTc0MjI1LDIwLjI3MjE1NCAxMC42NjMxODQ0LDIxIEwxOS4zMzY4MTU2LDIxIEMxOS42ODI1Nzc1LDIwLjI3MjE1NCAyMC4yNzIxNTQsMTkuNjgyNTc3NSAyMSwxOS4zMzY4MTU2IEwyMSwxMC42NjMxODQ0IFogTTcuNSw5IEM4LjMyODQyNzEyLDkgOSw4LjMyODQyNzEyIDksNy41IEM5LDYuNjcxNTcyODggOC4zMjg0MjcxMiw2IDcuNSw2IEM2LjY3MTU3Mjg4LDYgNiw2LjY3MTU3Mjg4IDYsNy41IEM2LDguMzI4NDI3MTIgNi42NzE1NzI4OCw5IDcuNSw5IFogTTIyLjUsOSBDMjMuMzI4NDI3MSw5IDI0LDguMzI4NDI3MTIgMjQsNy41IEMyNCw2LjY3MTU3Mjg4IDIzLjMyODQyNzEsNiAyMi41LDYgQzIxLjY3MTU3MjksNiAyMSw2LjY3MTU3Mjg4IDIxLDcuNSBDMjEsOC4zMjg0MjcxMiAyMS42NzE1NzI5LDkgMjIuNSw5IFogTTIyLjUsMjQgQzIzLjMyODQyNzEsMjQgMjQsMjMuMzI4NDI3MSAyNCwyMi41IEMyNCwyMS42NzE1NzI5IDIzLjMyODQyNzEsMjEgMjIuNSwyMSBDMjEuNjcxNTcyOSwyMSAyMSwyMS42NzE1NzI5IDIxLDIyLjUgQzIxLDIzLjMyODQyNzEgMjEuNjcxNTcyOSwyNCAyMi41LDI0IFogTTcuNSwyNCBDOC4zMjg0MjcxMiwyNCA5LDIzLjMyODQyNzEgOSwyMi41IEM5LDIxLjY3MTU3MjkgOC4zMjg0MjcxMiwyMSA3LjUsMjEgQzYuNjcxNTcyODgsMjEgNiwyMS42NzE1NzI5IDYsMjIuNSBDNiwyMy4zMjg0MjcxIDYuNjcxNTcyODgsMjQgNy41LDI0IFoiLz4KICA8L2RlZnM+CiAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMyAtMykiPgogICAgPG1hc2sgaWQ9InJlY3RhbmdsZS1iIiBmaWxsPSIjZmZmIj4KICAgICAgPHVzZSB4bGluazpocmVmPSIjcmVjdGFuZ2xlLWEiLz4KICAgIDwvbWFzaz4KICAgIDx1c2UgZmlsbD0iIzVCNUI1QiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjcmVjdGFuZ2xlLWEiLz4KICAgIDxnIGZpbGw9IiM1QjVCNUIiIG1hc2s9InVybCgjcmVjdGFuZ2xlLWIpIj4KICAgICAgPHJlY3Qgd2lkdGg9IjMwIiBoZWlnaHQ9IjMwIi8+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K); +} +.leaflet-pm-toolbar .leaflet-pm-icon-delete { + background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjRweCIgaGVpZ2h0PSIyNHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjUgKDY3NDY5KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5BdG9tcy9JY29ucy9Ub29scy9FcmFzZXI8L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZGVmcz4KICAgICAgICA8cGF0aCBkPSJNMTcuNzg3NDIxOSwxOC40ODEyNTUyIEwxMS42NDgwMDc5LDEzLjM0OTgxODQgTDYuNDA0NjYwMDksMTkuMzgxNjAwMSBMMTAuNTUzOTE1NiwyMi45ODg0OTI5IEwxMy44NjkzNCwyMi45ODg0OTI5IEwxNy43ODc0MjE5LDE4LjQ4MTI1NTIgWiBNMTYuNTA3NDI1MiwyMi45ODg0OTI5IEwyNi4wMDAwMDAyLDIyLjk4ODQ5MjkgTDI2LjAwMDAwMDIsMjQuOTg4NDkyOSBMMTAuMDAwMDAwMiwyNC45ODg0OTI5IEw5LjgwNzA4MzEzLDI0Ljk4ODQ5MjkgTDUuMDkyNTQyMDQsMjAuODkxMDE5MiBDNC4yNTg5MTI4NSwyMC4xNjYzNTY0IDQuMTcwNTc4MTQsMTguOTAzMTExMiA0Ljg5NTI0MDkzLDE4LjA2OTQ4MiBMMTYuMDQ4MjQ0NCw1LjIzOTQxOTE2IEMxNi43NzI5MDcyLDQuNDA1Nzg5OTggMTguMDM2MTUyNSw0LjMxNzQ1NTI2IDE4Ljg2OTc4MTYsNS4wNDIxMTgwNiBMMjQuOTA3NDU4MywxMC4yOTA1OTAzIEMyNS43NDEwODc1LDExLjAxNTI1MzEgMjUuODI5NDIyMiwxMi4yNzg0OTgzIDI1LjEwNDc1OTQsMTMuMTEyMTI3NSBMMTYuNTA3NDI1MiwyMi45ODg0OTI5IFoiIGlkPSJwYXRoLTEiPjwvcGF0aD4KICAgIDwvZGVmcz4KICAgIDxnIGlkPSJTeW1ib2xzIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0iQXRvbXMvSWNvbnMvVG9vbHMvRXJhc2VyIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMy4wMDAwMDAsIC0zLjAwMDAwMCkiPgogICAgICAgICAgICA8bWFzayBpZD0ibWFzay0yIiBmaWxsPSJ3aGl0ZSI+CiAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNwYXRoLTEiPjwvdXNlPgogICAgICAgICAgICA8L21hc2s+CiAgICAgICAgICAgIDx1c2UgaWQ9IkNvbWJpbmVkLVNoYXBlIiBmaWxsPSIjNUI1QjVCIiBmaWxsLXJ1bGU9Im5vbnplcm8iIHhsaW5rOmhyZWY9IiNwYXRoLTEiPjwvdXNlPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+); +} +.leaflet-pm-toolbar .leaflet-pm-icon-edit { + background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+CiAgPGRlZnM+CiAgICA8cGF0aCBpZD0iZWRpdF9hbmNob3ItYSIgZD0iTTEzLjUsMTEgQzExLjU2NzAwMzQsMTEgMTAsOS40MzI5OTY2MiAxMCw3LjUgQzEwLDUuNTY3MDAzMzggMTEuNTY3MDAzNCw0IDEzLjUsNCBDMTUuNDMyOTk2Niw0IDE3LDUuNTY3MDAzMzggMTcsNy41IEMxNyw5LjQzMjk5NjYyIDE1LjQzMjk5NjYsMTEgMTMuNSwxMSBaIE0xMy41LDkgQzE0LjMyODQyNzEsOSAxNSw4LjMyODQyNzEyIDE1LDcuNSBDMTUsNi42NzE1NzI4OCAxNC4zMjg0MjcxLDYgMTMuNSw2IEMxMi42NzE1NzI5LDYgMTIsNi42NzE1NzI4OCAxMiw3LjUgQzEyLDguMzI4NDI3MTIgMTIuNjcxNTcyOSw5IDEzLjUsOSBaIE0xMi4wMDAyODg5LDcuNTI5NzM4OTMgQzEyLjAxMjU5ODMsOC4xNjI3MzY3MiAxMi40MTcwMTk3LDguNjk5NjY0MyAxMi45ODA3MTExLDguOTA3Njc5NjYgTDMsMTUgTDMsMTMgTDEyLjAwMDI4ODksNy41Mjk3Mzg5MyBaIE0xNC4yMTcyNzIyLDYuMTgyMjg0NzIgTDE5LjQ1MzEyNSwzIEwyMi42NTg5MzU1LDMgTDE0Ljk4OTEwMiw3LjY4MTczODg1IEMxNC45OTYyOTcxLDcuNjIyMTY0NTkgMTUsNy41NjE1MTQ3MiAxNSw3LjUgQzE1LDYuOTMxMzgzODEgMTQuNjgzNjA5OCw2LjQzNjY2NDUgMTQuMjE3MjcyMiw2LjE4MjI4NDcyIFogTTIzLjQ0MzQwNDIsMTkuMjg1MTczNiBMMjAuMTI4Mjc5OSwxOS4yODUxNzM2IEwyMS44NzI5OTgzLDIzLjUzNDk1MjUgQzIxLjk5NDUyOTYsMjMuODI5NTc3MyAyMS44NTU2NTQ2LDI0LjE1OTkyMDkgMjEuNTc3ODczNCwyNC4yODQ5MjA4IEwyMC4wNDE0Njc1LDI0Ljk1NDUxNDIgQzE5Ljc1NTA2MTMsMjUuMDc5NTE0MSAxOS40MzM4NzM4LDI0LjkzNjY3MDQgMTkuMzEyMzQyNiwyNC42NTA5NTE4IEwxNy42NTQ0MzY3LDIwLjYxNTQ1NDEgTDE0Ljk0NjE4NzMsMjMuNDAxMDE1MSBDMTQuNTg1MjgxMSwyMy43NzIxNzExIDE0LDIzLjQ4NjA0NjMgMTQsMjIuOTk5MjY1MyBMMTQsOS41NzE4MzUzMyBDMTQsOS4wNTkzMzU2MSAxNC42MjI1MzExLDguODA5NDkyIDE0Ljk0NjE1Niw5LjE3MDA4NTU1IEwyMy44MzQwMjkyLDE4LjMxMjAxNzkgQzI0LjE5MjUyOTEsMTguNjYxMzYxNSAyMy45Mjc5OTc5LDE5LjI4NTE3MzYgMjMuNDQzNDA0MiwxOS4yODUxNzM2IFoiLz4KICA8L2RlZnM+CiAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMyAtMykiPgogICAgPG1hc2sgaWQ9ImVkaXRfYW5jaG9yLWIiIGZpbGw9IiNmZmYiPgogICAgICA8dXNlIHhsaW5rOmhyZWY9IiNlZGl0X2FuY2hvci1hIi8+CiAgICA8L21hc2s+CiAgICA8dXNlIGZpbGw9IiM1QjVCNUIiIGZpbGwtcnVsZT0ibm9uemVybyIgeGxpbms6aHJlZj0iI2VkaXRfYW5jaG9yLWEiLz4KICAgIDxnIGZpbGw9IiM1QjVCNUIiIG1hc2s9InVybCgjZWRpdF9hbmNob3ItYikiPgogICAgICA8cmVjdCB3aWR0aD0iMzAiIGhlaWdodD0iMzAiLz4KICAgIDwvZz4KICA8L2c+Cjwvc3ZnPgo=); +} +.leaflet-pm-toolbar .leaflet-pm-icon-drag { + background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+CiAgPGRlZnM+CiAgICA8cGF0aCBpZD0ibW92ZS1hIiBkPSJNMjEsMTQgTDIxLDEwIEwyNywxNSBMMjEsMjAgTDIxLDE2IEwxNiwxNiBMMTYsMjEgTDIwLDIxIEwxNSwyNyBMMTAsMjEgTDE0LDIxIEwxNCwxNiBMOSwxNiBMOSwyMCBMMywxNSBMOSwxMCBMOSwxNCBMMTQsMTQgTDE0LDkgTDEwLDkgTDE1LDMgTDIwLDkgTDE2LDkgTDE2LDE0IEwyMSwxNCBaIi8+CiAgPC9kZWZzPgogIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTMgLTMpIj4KICAgIDxtYXNrIGlkPSJtb3ZlLWIiIGZpbGw9IiNmZmYiPgogICAgICA8dXNlIHhsaW5rOmhyZWY9IiNtb3ZlLWEiLz4KICAgIDwvbWFzaz4KICAgIDx1c2UgZmlsbD0iI0Q4RDhEOCIgeGxpbms6aHJlZj0iI21vdmUtYSIvPgogICAgPGcgZmlsbD0iIzVCNUI1QiIgbWFzaz0idXJsKCNtb3ZlLWIpIj4KICAgICAgPHJlY3Qgd2lkdGg9IjMwIiBoZWlnaHQ9IjMwIi8+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K); +} +.leaflet-pm-toolbar .leaflet-pm-icon-cut { + background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjRweCIgaGVpZ2h0PSIyNHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjUgKDY3NDY5KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5BdG9tcy9JY29ucy9Ub29scy9TY2lzc29yczwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPgogICAgICAgIDxwYXRoIGQ9Ik0xMi45NjkxNTc0LDEzLjQ5Mzk0MzUgTDIxLjAzMTcwMzIsNS41NDE2NzAxMyBMMjMuNDY0OTQ5OSw1LjY3NzIyOTU3IEwxNy4wNDcwNzEzLDE0LjUxMDY4MTYgTDI3LjU2NjAzMzYsMTcuMTMzMzUzNSBMMjUuNzg5MTk0NCwxOC44MDEyNTg4IEwxNC41ODU0OTUxLDE3Ljg5ODc1MDYgTDEzLjY0ODc5NTUsMTkuMTg4MDA3IEMxMy43OTQ2MzksMTkuMjY1MDk1OCAxMy45MzY3OTg1LDE5LjM1MzQ0MTcgMTQuMDc0MTM3NywxOS40NTMyMjQ1IEMxNS42Mzc5NjQ4LDIwLjU4OTQxMTQgMTUuOTg0NjM1NywyMi43NzgyMDUyIDE0Ljg0ODQ0ODgsMjQuMzQyMDMyNCBDMTMuNzEyMjYxOSwyNS45MDU4NTk1IDExLjUyMzQ2ODEsMjYuMjUyNTMwNCA5Ljk1OTY0MDk2LDI1LjExNjM0MzUgQzguMzk1ODEzODQsMjMuOTgwMTU2NSA4LjA0OTE0Mjk2LDIxLjc5MTM2MjcgOS4xODUzMjk4NiwyMC4yMjc1MzU2IEM5Ljc0NTg3Mjc2LDE5LjQ1NjAxNDUgMTAuNTYyNjE4OCwxOC45ODA3NDc1IDExLjQzNDEyMTgsMTguODMzNjQwNyBMMTIuNjgwNTY1NiwxNy4xMTgwNTc5IEwxMi41MjM5NzI0LDE2LjM3NDcyMTYgTDExLjk1MDY5MzIsMTUuMzAxMjM5MSBMOS44OTMxMDY0NiwxNC43ODgyMjUxIEM5LjEzMDkzNzk2LDE1LjIzNTcyNjEgOC4xOTk3Nzg1NCwxNS4zOTY2NDQ3IDcuMjc0NDUzNTUsMTUuMTY1OTM1MiBDNS4zOTg4NzUxOSwxNC42OTgzMDEgNC4yNTc1MTA5NCwxMi43OTg3NTE5IDQuNzI1MTQ1MTUsMTAuOTIzMTczNiBDNS4xOTI3NzkzNSw5LjA0NzU5NTE5IDcuMDkyMzI4NDYsNy45MDYyMzA5NCA4Ljk2NzkwNjgyLDguMzczODY1MTUgQzEwLjg0MzQ4NTIsOC44NDE0OTkzNSAxMS45ODQ4NDk0LDEwLjc0MTA0ODUgMTEuNTE3MjE1MiwxMi42MTY2MjY4IEMxMS40NzYxNDY0LDEyLjc4MTM0NDkgMTEuNDI0MDMzNSwxMi45NDA0MDAxIDExLjM2MTg2MjcsMTMuMDkzMTk5OSBMMTIuOTY5MTU3NCwxMy40OTM5NDM1IFogTTcuNzU4Mjk3MzUsMTMuMjI1MzQzOCBDOC41NjIxMTY2NCwxMy40MjU3NTg0IDkuMzc2MjA5MTIsMTIuOTM2NjAyMyA5LjU3NjYyMzc4LDEyLjEzMjc4MyBDOS43NzcwMzg0NCwxMS4zMjg5NjM3IDkuMjg3ODgyMzMsMTAuNTE0ODcxMyA4LjQ4NDA2MzAzLDEwLjMxNDQ1NjYgQzcuNjgwMjQzNzMsMTAuMTE0MDQxOSA2Ljg2NjE1MTI2LDEwLjYwMzE5OCA2LjY2NTczNjYsMTEuNDA3MDE3MyBDNi40NjUzMjE5NCwxMi4yMTA4MzY2IDYuOTU0NDc4MDUsMTMuMDI0OTI5MSA3Ljc1ODI5NzM1LDEzLjIyNTM0MzggWiBNMTAuODAzMzYzOSwyMS40MDMxMDYxIEMxMC4zMTY0MjY2LDIyLjA3MzMxNzcgMTAuNDY0OTk5OCwyMy4wMTEzNzIyIDExLjEzNTIxMTUsMjMuNDk4MzA5NSBDMTEuODA1NDIzMSwyMy45ODUyNDY3IDEyLjc0MzQ3NzYsMjMuODM2NjczNSAxMy4yMzA0MTQ4LDIzLjE2NjQ2MTkgQzEzLjcxNzM1MjEsMjIuNDk2MjUwMiAxMy41Njg3Nzg4LDIxLjU1ODE5NTcgMTIuODk4NTY3MiwyMS4wNzEyNTg1IEMxMi4yMjgzNTU2LDIwLjU4NDMyMTIgMTEuMjkwMzAxMSwyMC43MzI4OTQ1IDEwLjgwMzM2MzksMjEuNDAzMTA2MSBaIiBpZD0icGF0aC0xIj48L3BhdGg+CiAgICA8L2RlZnM+CiAgICA8ZyBpZD0iU3ltYm9scyIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9IkF0b21zL0ljb25zL1Rvb2xzL1NjaXNzb3JzIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMy4wMDAwMDAsIC0zLjAwMDAwMCkiPgogICAgICAgICAgICA8bWFzayBpZD0ibWFzay0yIiBmaWxsPSJ3aGl0ZSI+CiAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNwYXRoLTEiPjwvdXNlPgogICAgICAgICAgICA8L21hc2s+CiAgICAgICAgICAgIDx1c2UgaWQ9Ik1hc2siIGZpbGw9IiM1QjVCNUIiIGZpbGwtcnVsZT0ibm9uemVybyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTYuMDkzMTk0LCAxNS42NjMzNTEpIHJvdGF0ZSgtMzIuMDAwMDAwKSB0cmFuc2xhdGUoLTE2LjA5MzE5NCwgLTE1LjY2MzM1MSkgIiB4bGluazpocmVmPSIjcGF0aC0xIj48L3VzZT4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==); +} +.leaflet-pm-toolbar .leaflet-pm-icon-snapping { + background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjRweCIgaGVpZ2h0PSIyNHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDU3LjEgKDgzMDg4KSAtIGh0dHBzOi8vc2tldGNoLmNvbSAtLT4KICAgIDx0aXRsZT5BdG9tcy9JY29ucy9Ub29scy9NYWduZXQ8L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZGVmcz4KICAgICAgICA8cGF0aCBkPSJNMjEuOTk5NDc1OSwxMC45NDI4MTgzIEwyMS45OTk5OTg1LDE2LjM3MTA0MTcgQzIyLDE2LjY4NzIwMDcgMjIsMTcuMDA1ODI3OCAyMiwxNy4zMjY5NDExIEMyMiwyMS41NjQ2NTQ1IDE4LjY0MjEzNTYsMjUgMTQuNSwyNSBDMTAuMzU3ODY0NCwyNSA3LDIxLjU2NDY1NDUgNywxNy4zMjY5NDExIEw3LjAwMDg3NTA4LDEwLjk5MDc1MDcgTDExLjAwMjI4MDgsMTAuOTk4NDEyNSBDMTEuMDAxNzAzMywxMS42OTgwMTE0IDExLjAwMTI0NywxMi40MTY4MjQ4IDExLjAwMDg5OTIsMTMuMTU1NDg4NyBMMTEsMTcuMzI2OTQxMSBDMTEsMTkuMzc1NjgwOSAxMi41ODc2ODQxLDIxIDE0LjUsMjEgQzE2LjQxMjMxNTksMjEgMTgsMTkuMzc1NjgwOSAxOCwxNy4zMjY5NDExIEMxOCwxNS4wNzAyMDMyIDE3Ljk5OTU2OTYsMTIuOTYxOTY2OCAxNy45OTg1MzksMTAuOTkxMDAzMiBMMjEuOTk5NDc1OSwxMC45NDI4MTgzIFogTTEwLDcgQzEwLjU1MjI4NDcsNyAxMSw3LjQ0NzcxNTI1IDExLDggTDExLDEwIEw3LDEwIEw3LDggQzcsNy40NDc3MTUyNSA3LjQ0NzcxNTI1LDcgOCw3IEwxMCw3IFogTTIxLDcgQzIxLjU1MjI4NDcsNyAyMiw3LjQ0NzcxNTI1IDIyLDggTDIyLDEwIEwxOCwxMCBMMTgsOCBDMTgsNy40NDc3MTUyNSAxOC40NDc3MTUzLDcgMTksNyBMMjEsNyBaIiBpZD0icGF0aC0xIj48L3BhdGg+CiAgICA8L2RlZnM+CiAgICA8ZyBpZD0iU3ltYm9scyIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9IkF0b21zL0ljb25zL1Rvb2xzL01hZ25ldCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTMuMDAwMDAwLCAtMy4wMDAwMDApIj4KICAgICAgICAgICAgPG1hc2sgaWQ9Im1hc2stMiIgZmlsbD0id2hpdGUiPgogICAgICAgICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjcGF0aC0xIj48L3VzZT4KICAgICAgICAgICAgPC9tYXNrPgogICAgICAgICAgICA8dXNlIGlkPSJNYXNrIiBmaWxsPSIjNUI1QjVCIiBmaWxsLXJ1bGU9Im5vbnplcm8iIHRyYW5zZm9ybT0idHJhbnNsYXRlKDE0LjUwMDAwMCwgMTYuMDAwMDAwKSByb3RhdGUoNDUuMDAwMDAwKSB0cmFuc2xhdGUoLTE0LjUwMDAwMCwgLTE2LjAwMDAwMCkgIiB4bGluazpocmVmPSIjcGF0aC0xIj48L3VzZT4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==); +} +.leaflet-pm-toolbar .leaflet-pm-icon-rotate { + background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+CiAgICA8ZGVmcz4KICAgICAgICA8cGF0aCBpZD0icm90YXRlIiBkPSJNMjEuMiw1LjhjLTAuMS0wLjItMC4yLTAuMy0wLjMtMC41bC0wLjEtMC4yYy0wLjEtMC4yLTAuMi0wLjMtMC4zLTAuNWwtMC4xLTAuMmMtMC4xLTAuMi0wLjItMC4zLTAuNC0wLjVsLTAuMi0wLjNsMi44LTMuMUwxOCwwLjZsLTQuNiwwLjFsMC41LDQuNWwwLjUsNC41bDMuMi0zLjZ2MC4xbDAuMSwwLjJjMC4xLDAuMSwwLjEsMC4yLDAuMiwwLjJsMC4xLDAuMkMxOCw3LDE4LDcuMSwxOC4xLDcuMmMwLjMsMC43LDAuNiwxLjQsMC43LDIuMWMwLjIsMS40LDAsMi45LTAuNiw0LjJMMTgsMTMuOUwxNy45LDE0bC0wLjMsMC41bC0wLjEsMC4yYy0wLjIsMC4yLTAuNCwwLjUtMC42LDAuN2MtMC41LDAuNS0xLjEsMS0xLjcsMS4zYy0wLjYsMC40LTEuMywwLjYtMi4xLDAuOGMtMC43LDAuMS0xLjUsMC4yLTIuMiwwLjFjLTAuOC0wLjEtMS41LTAuMy0yLjItMC41Yy0wLjctMC4zLTEuMy0wLjctMS45LTEuMmwtMC40LTAuNGwtMC4yLTAuM0w2LDE1Yy0wLjEtMC4xLTAuMi0wLjItMC4yLTAuM2wtMC4zLTAuNGwtMC4xLTAuMWwtMC4yLTAuNGMwLTAuMS0wLjEtMC4xLTAuMS0wLjJsLTAuMy0wLjVsLTAuMS0wLjJjLTAuMS0wLjMtMC4yLTAuNi0wLjMtMC45Yy0wLjItMC44LTAuMy0xLjYtMC4zLTIuNGMwLTAuMiwwLTAuMywwLTAuNVY4LjljMC0wLjIsMC0wLjMsMC4xLTAuNGwwLjEtMC42bDAuMi0wLjZjMC4zLTAuOCwwLjctMS41LDEuMi0yLjJjMC41LTAuNywxLjEtMS4zLDEuOC0xLjhjMC4yLTAuMSwwLjMtMC40LDAuMS0wLjZDNy41LDIuNiw3LjQsMi41LDcuMywyLjVINy4xTDcsMi42QzYuMSwzLDUuNCwzLjYsNC43LDQuMkM0LDQuOSwzLjUsNS43LDMsNi42Yy0wLjksMS44LTEuMiwzLjgtMC44LDUuOGMwLjEsMC41LDAuMiwwLjksMC4zLDEuNGwwLjMsMC44QzIuOSwxNC43LDMsMTQuOCwzLDE1bDAuMiwwLjRjMCwwLjEsMC4xLDAuMiwwLjEsMC4ybDAuMywwLjVjMC4xLDAuMiwwLjIsMC4zLDAuMywwLjVsMC4xLDAuMmMwLjEsMC4xLDAuMiwwLjMsMC4zLDAuNEw1LDE3LjhjMC43LDAuNywxLjYsMS4zLDIuNSwxLjhjMC45LDAuNSwxLjksMC44LDMsMC45YzAuNSwwLjEsMSwwLjEsMS41LDAuMWMwLjYsMCwxLjEsMCwxLjYtMC4xYzEtMC4yLDIuMS0wLjUsMy0xbDAuMi0wLjFjMC4yLTAuMSwwLjMtMC4yLDAuNS0wLjNsMC43LTAuNGMwLjItMC4xLDAuMy0wLjIsMC40LTAuM2wwLjItMC4yYzAuMi0wLjEsMC40LTAuMywwLjUtMC41bDAuMS0wLjFjMC4zLTAuMywwLjctMC43LDAuOS0xbDAuNi0wLjlsMC40LTAuNmMxLTEuOSwxLjQtNC4xLDEuMS02LjJDMjIsNy44LDIxLjcsNi43LDIxLjIsNS44eiIvPgogICAgPC9kZWZzPgogICAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDIpIj4KICAgICAgICA8bWFzayBpZD0icm90YXRlLWIiIGZpbGw9IiNmZmYiPgogICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNyb3RhdGUiLz4KICAgICAgICA8L21hc2s+CiAgICAgICAgPHVzZSBmaWxsPSIjNUI1QjVCIiBmaWxsLXJ1bGU9Im5vbnplcm8iIHhsaW5rOmhyZWY9IiNyb3RhdGUiLz4KICAgICAgICA8ZyBmaWxsPSIjNUI1QjVCIiBtYXNrPSJ1cmwoI3JvdGF0ZS1iKSI+CiAgICAgICAgICAgIDxyZWN0IHdpZHRoPSIzMCIgaGVpZ2h0PSIzMCIvPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+Cg==); +} + +.leaflet-buttons-control-button:hover, +.leaflet-buttons-control-button:focus { + cursor: pointer; + background-color: #f4f4f4; +} +.active .leaflet-buttons-control-button { + box-shadow: inset 0 -1px 5px 2px rgba(81, 77, 77, 0.31); +} + +.leaflet-buttons-control-text-hide { + display: none; +} + +.button-container { + position: relative; +} + +.button-container .leaflet-pm-actions-container { + z-index: 2; + position: absolute; + top: 0; + left: 100%; + display: none; + white-space: nowrap; + direction: ltr; +} + +.leaflet-right + .leaflet-pm-toolbar + .button-container + .leaflet-pm-actions-container { + right: 100%; + left: auto; +} + +.button-container.active .leaflet-pm-actions-container { + display: block; +} + +.button-container + .leaflet-pm-actions-container:not(.pos-right) + a.leaflet-pm-action:last-child { + border-radius: 0 3px 3px 0; + border-right: 0; +} +.button-container + .leaflet-pm-actions-container.pos-right + a.leaflet-pm-action:first-child { + border-radius: 3px 0 0 3px; +} +.button-container + .leaflet-pm-actions-container.pos-right + a.leaflet-pm-action:last-child { + border-right: 0; +} +.button-container .leaflet-pm-actions-container .leaflet-pm-action { + padding: 0 10px; + background-color: #666; + color: #fff; + display: inline-block; + width: auto; + border-right: 1px solid #eee; + user-select: none; + border-bottom: none; + height: 29px; + line-height: 29px; +} +.leaflet-pm-toolbar + .button-container:first-child.pos-right.active + a.leaflet-buttons-control-button { + border-top-left-radius: 0; +} +.leaflet-pm-toolbar + .button-container:first-child.active:not(.pos-right) + a.leaflet-buttons-control-button { + border-top-right-radius: 0; +} + +.button-container .leaflet-pm-actions-container .leaflet-pm-action:hover, +.button-container .leaflet-pm-actions-container .leaflet-pm-action:focus { + cursor: pointer; + background-color: #777; +} + +/* That the active control is always over the other controls */ +.leaflet-pm-toolbar.activeChild { + z-index: 801; +} + +.leaflet-buttons-control-button.pm-disabled { + background-color: #f4f4f4; +} + +.control-icon.pm-disabled { + filter: opacity(0.6); +} diff --git a/module-map/src/main/resources/static/super-map/css/leaflet.css b/module-map/src/main/resources/static/super-map/css/leaflet.css new file mode 100644 index 00000000..92071404 --- /dev/null +++ b/module-map/src/main/resources/static/super-map/css/leaflet.css @@ -0,0 +1,624 @@ +/* required styles */ + +.leaflet-pane, +.leaflet-tile, +.leaflet-marker-icon, +.leaflet-marker-shadow, +.leaflet-tile-container, +.leaflet-pane > svg, +.leaflet-pane > canvas, +.leaflet-zoom-box, +.leaflet-image-layer, +.leaflet-layer { + position: absolute; + left: 0; + top: 0; +} +.leaflet-container { + overflow: hidden; +} +.leaflet-tile, +.leaflet-marker-icon, +.leaflet-marker-shadow { + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-user-drag: none; +} +/* Safari renders non-retina tile on retina better with this, but Chrome is worse */ +.leaflet-safari .leaflet-tile { + image-rendering: -webkit-optimize-contrast; +} +/* hack that prevents hw layers "stretching" when loading new tiles */ +.leaflet-safari .leaflet-tile-container { + width: 1600px; + height: 1600px; + -webkit-transform-origin: 0 0; +} +.leaflet-marker-icon, +.leaflet-marker-shadow { + display: block; +} +/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */ +/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */ +.leaflet-container .leaflet-overlay-pane svg, +.leaflet-container .leaflet-marker-pane img, +.leaflet-container .leaflet-shadow-pane img, +.leaflet-container .leaflet-tile-pane img, +.leaflet-container img.leaflet-image-layer { + max-width: none !important; +} + +.leaflet-container.leaflet-touch-zoom { + -ms-touch-action: pan-x pan-y; + touch-action: pan-x pan-y; +} +.leaflet-container.leaflet-touch-drag { + -ms-touch-action: pinch-zoom; +} +.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom { + -ms-touch-action: none; + touch-action: none; +} +.leaflet-tile { + filter: inherit; + visibility: hidden; +} +.leaflet-tile-loaded { + visibility: inherit; +} +.leaflet-zoom-box { + width: 0; + height: 0; + -moz-box-sizing: border-box; + box-sizing: border-box; + z-index: 800; +} +/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */ +.leaflet-overlay-pane svg { + -moz-user-select: none; +} + +.leaflet-pane { z-index: 400; } + +.leaflet-tile-pane { z-index: 200; } +.leaflet-overlay-pane { z-index: 400; } +.leaflet-shadow-pane { z-index: 500; } +.leaflet-marker-pane { z-index: 600; } +.leaflet-tooltip-pane { z-index: 650; } +.leaflet-popup-pane { z-index: 700; } + +.leaflet-map-pane canvas { z-index: 100; } +.leaflet-map-pane svg { z-index: 200; } + +.leaflet-vml-shape { + width: 1px; + height: 1px; +} +.lvml { + behavior: url(#default#VML); + display: inline-block; + position: absolute; +} + + +/* control positioning */ + +.leaflet-control { + position: relative; + z-index: 800; + pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ + pointer-events: auto; +} +.leaflet-top, +.leaflet-bottom { + position: absolute; + z-index: 1000; + pointer-events: none; +} +.leaflet-top { + top: 0; +} +.leaflet-right { + right: 0; +} +.leaflet-bottom { + bottom: 0; +} +.leaflet-left { + left: 0; +} +.leaflet-control { + float: left; + clear: both; +} +.leaflet-right .leaflet-control { + float: right; +} +.leaflet-top .leaflet-control { + margin-top: 10px; +} +.leaflet-bottom .leaflet-control { + margin-bottom: 10px; +} +.leaflet-left .leaflet-control { + margin-left: 10px; +} +.leaflet-right .leaflet-control { + margin-right: 10px; +} + + +/* zoom and fade animations */ + +.leaflet-fade-anim .leaflet-tile { + will-change: opacity; +} +.leaflet-fade-anim .leaflet-popup { + opacity: 0; + -webkit-transition: opacity 0.2s linear; + -moz-transition: opacity 0.2s linear; + -o-transition: opacity 0.2s linear; + transition: opacity 0.2s linear; +} +.leaflet-fade-anim .leaflet-map-pane .leaflet-popup { + opacity: 1; +} +.leaflet-zoom-animated { + -webkit-transform-origin: 0 0; + -ms-transform-origin: 0 0; + transform-origin: 0 0; +} +.leaflet-zoom-anim .leaflet-zoom-animated { + will-change: transform; +} +.leaflet-zoom-anim .leaflet-zoom-animated { + -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1); + -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1); + -o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1); + transition: transform 0.25s cubic-bezier(0,0,0.25,1); +} +.leaflet-zoom-anim .leaflet-tile, +.leaflet-pan-anim .leaflet-tile { + -webkit-transition: none; + -moz-transition: none; + -o-transition: none; + transition: none; +} + +.leaflet-zoom-anim .leaflet-zoom-hide { + visibility: hidden; +} + + +/* cursors */ + +.leaflet-interactive { + cursor: pointer; +} +.leaflet-grab { + cursor: -webkit-grab; + cursor: -moz-grab; +} +.leaflet-crosshair, +.leaflet-crosshair .leaflet-interactive { + cursor: crosshair; +} +.leaflet-popup-pane, +.leaflet-control { + cursor: auto; +} +.leaflet-dragging .leaflet-grab, +.leaflet-dragging .leaflet-grab .leaflet-interactive, +.leaflet-dragging .leaflet-marker-draggable { + cursor: move; + cursor: -webkit-grabbing; + cursor: -moz-grabbing; +} + +/* marker & overlays interactivity */ +.leaflet-marker-icon, +.leaflet-marker-shadow, +.leaflet-image-layer, +.leaflet-pane > svg path, +.leaflet-tile-container { + pointer-events: none; +} + +.leaflet-marker-icon.leaflet-interactive, +.leaflet-image-layer.leaflet-interactive, +.leaflet-pane > svg path.leaflet-interactive { + pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ + pointer-events: auto; +} + +/* visual tweaks */ + +.leaflet-container { + background: #ddd; + outline: 0; +} +.leaflet-container a { + color: #0078A8; +} +.leaflet-container a.leaflet-active { + outline: 2px solid orange; +} +.leaflet-zoom-box { + border: 2px dotted #38f; + background: rgba(255,255,255,0.5); +} + + +/* general typography */ +.leaflet-container { + font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; +} + + +/* general toolbar styles */ + +.leaflet-bar { + box-shadow: 0 1px 5px rgba(0,0,0,0.65); + border-radius: 4px; +} +.leaflet-bar a, +.leaflet-bar a:hover { + background-color: #fff; + border-bottom: 1px solid #ccc; + width: 26px; + height: 26px; + line-height: 26px; + display: block; + text-align: center; + text-decoration: none; + color: black; +} +.leaflet-bar a, +.leaflet-control-layers-toggle { + background-position: 50% 50%; + background-repeat: no-repeat; + display: block; +} +.leaflet-bar a:hover { + background-color: #f4f4f4; +} +.leaflet-bar a:first-child { + border-top-left-radius: 4px; + border-top-right-radius: 4px; +} +.leaflet-bar a:last-child { + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + border-bottom: none; +} +.leaflet-bar a.leaflet-disabled { + cursor: default; + background-color: #f4f4f4; + color: #bbb; +} + +.leaflet-touch .leaflet-bar a { + width: 30px; + height: 30px; + line-height: 30px; +} + + +/* zoom control */ + +.leaflet-control-zoom-in, +.leaflet-control-zoom-out { + font: bold 18px 'Lucida Console', Monaco, monospace; + text-indent: 1px; +} +.leaflet-control-zoom-out { + font-size: 20px; +} + +.leaflet-touch .leaflet-control-zoom-in { + font-size: 22px; +} +.leaflet-touch .leaflet-control-zoom-out { + font-size: 24px; +} + + +/* layers control */ + +.leaflet-control-layers { + box-shadow: 0 1px 5px rgba(0,0,0,0.4); + background: #fff; + border-radius: 5px; +} +.leaflet-control-layers-toggle { + background-image: url(images/layers.png); + width: 36px; + height: 36px; +} +.leaflet-retina .leaflet-control-layers-toggle { + background-image: url(images/layers-2x.png); + background-size: 26px 26px; +} +.leaflet-touch .leaflet-control-layers-toggle { + width: 44px; + height: 44px; +} +.leaflet-control-layers .leaflet-control-layers-list, +.leaflet-control-layers-expanded .leaflet-control-layers-toggle { + display: none; +} +.leaflet-control-layers-expanded .leaflet-control-layers-list { + display: block; + position: relative; +} +.leaflet-control-layers-expanded { + padding: 6px 10px 6px 6px; + color: #333; + background: #fff; +} +.leaflet-control-layers-scrollbar { + overflow-y: scroll; + padding-right: 5px; +} +.leaflet-control-layers-selector { + margin-top: 2px; + position: relative; + top: 1px; +} +.leaflet-control-layers label { + display: block; +} +.leaflet-control-layers-separator { + height: 0; + border-top: 1px solid #ddd; + margin: 5px -10px 5px -6px; +} + +/* Default icon URLs */ +.leaflet-default-icon-path { + background-image: url(images/marker-icon.png); +} + + +/* attribution and scale controls */ + +.leaflet-container .leaflet-control-attribution { + background: #fff; + background: rgba(255, 255, 255, 0.7); + margin: 0; +} +.leaflet-control-attribution, +.leaflet-control-scale-line { + padding: 0 5px; + color: #333; +} +.leaflet-control-attribution a { + text-decoration: none; +} +.leaflet-control-attribution a:hover { + text-decoration: underline; +} +.leaflet-container .leaflet-control-attribution, +.leaflet-container .leaflet-control-scale { + font-size: 11px; +} +.leaflet-left .leaflet-control-scale { + margin-left: 5px; +} +.leaflet-bottom .leaflet-control-scale { + margin-bottom: 5px; +} +.leaflet-control-scale-line { + border: 2px solid #777; + border-top: none; + line-height: 1.1; + padding: 2px 5px 1px; + font-size: 11px; + white-space: nowrap; + overflow: hidden; + -moz-box-sizing: border-box; + box-sizing: border-box; + + background: #fff; + background: rgba(255, 255, 255, 0.5); +} +.leaflet-control-scale-line:not(:first-child) { + border-top: 2px solid #777; + border-bottom: none; + margin-top: -2px; +} +.leaflet-control-scale-line:not(:first-child):not(:last-child) { + border-bottom: 2px solid #777; +} + +.leaflet-touch .leaflet-control-attribution, +.leaflet-touch .leaflet-control-layers, +.leaflet-touch .leaflet-bar { + box-shadow: none; +} +.leaflet-touch .leaflet-control-layers, +.leaflet-touch .leaflet-bar { + border: 2px solid rgba(0,0,0,0.2); + background-clip: padding-box; +} + + +/* popup */ + +.leaflet-popup { + position: absolute; + text-align: center; + margin-bottom: 20px; +} +.leaflet-popup-content-wrapper { + padding: 1px; + text-align: left; + border-radius: 12px; +} +.leaflet-popup-content { + margin: 13px 19px; + line-height: 1.4; +} +.leaflet-popup-content p { + margin: 18px 0; +} +.leaflet-popup-tip-container { + width: 40px; + height: 20px; + position: absolute; + left: 50%; + margin-left: -20px; + overflow: hidden; + pointer-events: none; +} +.leaflet-popup-tip { + width: 17px; + height: 17px; + padding: 1px; + + margin: -10px auto 0; + + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); +} +.leaflet-popup-content-wrapper, +.leaflet-popup-tip { + background: white; + color: #333; + box-shadow: 0 3px 14px rgba(0,0,0,0.4); +} +.leaflet-container a.leaflet-popup-close-button { + position: absolute; + top: 0; + right: 0; + padding: 4px 4px 0 0; + border: none; + text-align: center; + width: 18px; + height: 14px; + font: 16px/14px Tahoma, Verdana, sans-serif; + color: #c3c3c3; + text-decoration: none; + font-weight: bold; + background: transparent; +} +.leaflet-container a.leaflet-popup-close-button:hover { + color: #999; +} +.leaflet-popup-scrolled { + overflow: auto; + border-bottom: 1px solid #ddd; + border-top: 1px solid #ddd; +} + +.leaflet-oldie .leaflet-popup-content-wrapper { + zoom: 1; +} +.leaflet-oldie .leaflet-popup-tip { + width: 24px; + margin: 0 auto; + + -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; + filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); +} +.leaflet-oldie .leaflet-popup-tip-container { + margin-top: -1px; +} + +.leaflet-oldie .leaflet-control-zoom, +.leaflet-oldie .leaflet-control-layers, +.leaflet-oldie .leaflet-popup-content-wrapper, +.leaflet-oldie .leaflet-popup-tip { + border: 1px solid #999; +} + + +/* div icon */ + +.leaflet-div-icon { + background: #fff; + border: 1px solid #666; +} + + +/* Tooltip */ +/* Base styles for the element that has a tooltip */ +.leaflet-tooltip { + position: absolute; + padding: 6px; + background-color: #fff; + border: 1px solid #fff; + border-radius: 3px; + color: #222; + white-space: nowrap; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + pointer-events: none; + box-shadow: 0 1px 3px rgba(0,0,0,0.4); +} +.leaflet-tooltip.leaflet-clickable { + cursor: pointer; + pointer-events: auto; +} +.leaflet-tooltip-top:before, +.leaflet-tooltip-bottom:before, +.leaflet-tooltip-left:before, +.leaflet-tooltip-right:before { + position: absolute; + pointer-events: none; + border: 6px solid transparent; + background: transparent; + content: ""; +} + +/* Directions */ + +.leaflet-tooltip-bottom { + margin-top: 6px; +} +.leaflet-tooltip-top { + margin-top: -6px; +} +.leaflet-tooltip-bottom:before, +.leaflet-tooltip-top:before { + left: 50%; + margin-left: -6px; +} +.leaflet-tooltip-top:before { + bottom: 0; + margin-bottom: -12px; + border-top-color: #fff; +} +.leaflet-tooltip-bottom:before { + top: 0; + margin-top: -12px; + margin-left: -6px; + border-bottom-color: #fff; +} +.leaflet-tooltip-left { + margin-left: -6px; +} +.leaflet-tooltip-right { + margin-left: 6px; +} +.leaflet-tooltip-left:before, +.leaflet-tooltip-right:before { + top: 50%; + margin-top: -6px; +} +.leaflet-tooltip-left:before { + right: 0; + margin-right: -12px; + border-left-color: #fff; +} +.leaflet-tooltip-right:before { + left: 0; + margin-left: -12px; + border-right-color: #fff; +} \ No newline at end of file diff --git a/module-map/src/main/resources/static/super-map/js/iclient-leaflet.min.js b/module-map/src/main/resources/static/super-map/js/iclient-leaflet.min.js new file mode 100644 index 00000000..7505f55e --- /dev/null +++ b/module-map/src/main/resources/static/super-map/js/iclient-leaflet.min.js @@ -0,0 +1,1658 @@ +/*! + * + * iclient-leaflet.(https://iclient.supermap.io) + * Copyright© 2000 - 2021 SuperMap Software Co.Ltd + * license: Apache-2.0 + * version: v10.2.0 + * + */!function(){var e={525:function(e){"use strict";function t(e,t){this.x=e,this.y=t}e.exports=t,t.prototype={clone:function(){return new t(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,r=e.y-this.y;return t*t+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,r=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=r,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),r=Math.sin(e),n=t*this.x-r*this.y,o=r*this.x+t*this.y;return this.x=n,this.y=o,this},_rotateAround:function(e,t){var r=Math.cos(e),n=Math.sin(e),o=t.x+r*(this.x-t.x)-n*(this.y-t.y),i=t.y+n*(this.x-t.x)+r*(this.y-t.y);return this.x=o,this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},t.convert=function(e){return e instanceof t?e:Array.isArray(e)?new t(e[0],e[1]):e}},721:function(e,t,r){e.exports.VectorTile=r(473),r(233),r(557)},473:function(e,t,r){"use strict";var n=r(557);function o(e,t,r){if(3===e){var o=new n(r,r.readVarint()+r.pos);o.length&&(t[o.name]=o)}}e.exports=function(e,t){this.layers=e.readFields(o,{},t)}},233:function(e,t,r){"use strict";var n=r(525);function o(e,t,r,n,o){this.properties={},this.extent=r,this.type=0,this._pbf=e,this._geometry=-1,this._keys=n,this._values=o,e.readFields(i,this,t)}function i(e,t,r){1==e?t.id=r.readVarint():2==e?function(e,t){var r=e.readVarint()+e.pos;for(;e.pos>3}if(i--,1===o||2===o)a+=e.readSVarint(),s+=e.readSVarint(),1===o&&(t&&l.push(t),t=[]),t.push(new n(a,s));else{if(7!==o)throw new Error("unknown command "+o);t&&t.push(t[0].clone())}}return t&&l.push(t),l},o.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,r=1,n=0,o=0,i=0,a=1/0,s=-1/0,l=1/0,u=-1/0;e.pos>3}if(n--,1===r||2===r)o+=e.readSVarint(),i+=e.readSVarint(),os&&(s=o),iu&&(u=i);else if(7!==r)throw new Error("unknown command "+r)}return[a,l,s,u]},o.prototype.toGeoJSON=function(e,t,r){var n,i,s=this.extent*Math.pow(2,r),l=this.extent*e,u=this.extent*t,c=this.loadGeometry(),f=o.types[this.type];function h(e){for(var t=0;t>3;t=1===n?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}return t}(r))}e.exports=o,o.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new n(this._pbf,t,this.extent,this._keys,this._values)}},937:function(e){!function(t){"use strict";if(t.__disableNativeFetch||!t.fetch){s.prototype.append=function(e,t){e=i(e),t=a(t);var r=this.map[e];r||(r=[],this.map[e]=r),r.push(t)},s.prototype.delete=function(e){delete this.map[i(e)]},s.prototype.get=function(e){var t=this.map[i(e)];return t?t[0]:null},s.prototype.getAll=function(e){return this.map[i(e)]||[]},s.prototype.has=function(e){return this.map.hasOwnProperty(i(e))},s.prototype.set=function(e,t){this.map[i(e)]=[a(t)]},s.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(r){this.map[r].forEach(function(n){e.call(t,n,r,this)},this)},this)};var r={blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t},n=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.clone=function(){return new h(this)},f.call(h.prototype),f.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new s(this.headers),url:this.url})},y.error=function(){var e=new y(null,{status:0,statusText:""});return e.type="error",e};var o=[301,302,303,307,308];y.redirect=function(e,t){if(-1===o.indexOf(t))throw new RangeError("Invalid status code");return new y(null,{status:t,headers:{location:e}})},t.Headers=s,t.Request=h,t.Response=y,t.fetch=function(e,t){return new Promise(function(n,o){var i;i=h.prototype.isPrototypeOf(e)&&!t?e:new h(e,t);var a=new XMLHttpRequest;var l=!1;function u(){if(4===a.readyState){var e=1223===a.status?204:a.status;if(e<100||e>599){if(l)return;return l=!0,void o(new TypeError("Network request failed"))}var t={status:e,statusText:a.statusText,headers:function(e){var t=new s;return e.getAllResponseHeaders().trim().split("\n").forEach(function(e){var r=e.trim().split(":"),n=r.shift().trim(),o=r.join(":").trim();t.append(n,o)}),t}(a),url:"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0},r="response"in a?a.response:a.responseText;l||(l=!0,n(new y(r,t)))}}a.onreadystatechange=u,a.onload=u,a.onerror=function(){l||(l=!0,o(new TypeError("Network request failed")))},a.open(i.method,i.url,!0);try{"include"===i.credentials&&("withCredentials"in a?a.withCredentials=!0:console&&console.warn&&console.warn("withCredentials is not supported, you can ignore this warning"))}catch(e){console&&console.warn&&console.warn("set withCredentials error:"+e)}"responseType"in a&&r.blob&&(a.responseType="blob"),i.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send(void 0===i._bodyInit?null:i._bodyInit)})},t.fetch.polyfill=!0,e.exports&&(e.exports=t.fetch)}function i(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function a(e){return"string"!=typeof e&&(e=String(e)),e}function s(e){this.map={},e instanceof s?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function l(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function u(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function c(e){var t=new FileReader;return t.readAsArrayBuffer(e),u(t)}function f(){return this.bodyUsed=!1,this._initBody=function(e,t){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(r.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e,this._options=t;else if(r.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(e){if(!r.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText=""},r.blob?(this.blob=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(c)},this.text=function(){var e,t,r,n,o,i,a,s=l(this);if(s)return s;if(this._bodyBlob)return e=this._bodyBlob,t=this._options,r=new FileReader,n=t.headers.map["content-type"]?t.headers.map["content-type"].toString():"",o=/charset\=[0-9a-zA-Z\-\_]*;?/,i=e.type.match(o)||n.match(o),a=[e],i&&a.push(i[0].replace(/^charset\=/,"").replace(/;$/,"")),r.readAsText.apply(r,a),u(r);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=l(this);return e||Promise.resolve(this._bodyText)},r.formData&&(this.formData=function(){return this.text().then(p)}),this.json=function(){return this.text().then(JSON.parse)},this}function h(e,t){var r,o,i=(t=t||{}).body;if(h.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new s(e.headers)),this.method=e.method,this.mode=e.mode,i||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new s(t.headers)),this.method=(r=t.method||this.method||"GET",o=r.toUpperCase(),n.indexOf(o)>-1?o:r),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i,t)}function p(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(o))}}),t}function y(e,t){t||(t={}),this._initBody(e,t),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof s?t.headers:new s(t.headers),this.url=t.url||""}}("undefined"!=typeof self?self:this)},238:function(e,t){var r,n,o;n=[t,e],void 0===(o="function"==typeof(r=function(e,t){"use strict";var r={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function n(e){try{delete window[e]}catch(t){window[e]=void 0}}function o(e){var t=document.getElementById(e);t&&document.getElementsByTagName("head")[0].removeChild(t)}t.exports=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=e,a=t.timeout||r.timeout,s=t.jsonpCallback||r.jsonpCallback,l=void 0;return new Promise(function(r,u){var c=t.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),f=s+"_"+c;window[c]=function(e){r({ok:!0,json:function(){return Promise.resolve(e)}}),l&&clearTimeout(l),o(f),n(c)},i+=-1===i.indexOf("?")?"?":"&";var h=document.createElement("script");h.setAttribute("src",""+i+s+"="+c),t.charset&&h.setAttribute("charset",t.charset),h.id=f,document.getElementsByTagName("head")[0].appendChild(h),l=setTimeout(function(){u(new Error("JSONP request to "+e+" timed out")),n(c),o(f),window[c]=function(){n(c)}},a),h.onerror=function(){u(new Error("JSONP request to "+e+" failed")),n(c),o(f),l&&clearTimeout(l)}})}})?r.apply(t,n):r)||(e.exports=o)},299:function(e,t){t.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,l=(1<>1,c=-7,f=r?o-1:0,h=r?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-c)-1,p>>=-c,c+=s;c>0;i=256*i+e[t+f],f+=h,c-=8);for(a=i&(1<<-c)-1,i>>=-c,c+=n;c>0;a=256*a+e[t+f],f+=h,c-=8);if(0===i)i=1-u;else{if(i===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),i-=u}return(p?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,s,l,u=8*i-o-1,c=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,y=n?1:-1,d=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(a++,l/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*l-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[r+p]=255&s,p+=y,s/=256,o-=8);for(a=a<0;e[r+p]=255&a,p+=y,a/=256,u-=8);e[r+p-y]|=128*d}},879:function(e,t,r){function n(e){"@babel/helpers - typeof";return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=r(99),i="&&",a="||",s="and",l="or",u="=",c="~",f="!"+u,h="!"+c,p=">",y=">=",d="<",v="<=",m="*",b=",",g=".",S="(",_=")",w="where",O={pathway:[],groups:{}},x={},P={},C=console.log;function E(e){var t=R(e,w),r=t[0],n=t[1];O.pathway=R(r,b);for(var o=0,s=O.pathway.length;ol&&-1!==l){var E="gr_"+(new Date).getTime();O.groups[E]=n.substring(l+1,P),n=n.replace(S+O.groups[E]+_,E),C=-1}C+=1}!function e(t,r){var n=T(r,i),o=T(r,a);if(n!==Number.MAX_VALUE||o!==Number.MAX_VALUE)if(n-1}function M(e,t){var r=R(t,g),n=e;for(var i in r){if(!n.hasOwnProperty(r[i]))return"";n=n[r[i]]}return n=o.isDate(n)?n.valueOf():o.isDateString(n)?o.parseDateFromString(n):n.toString()}function A(e,t){var r=!1;for(var n in e){if(r=r||(n===s?j:n===l?A:L)(e[n],t),P.trace&&C(O.step,"======((( or",e[n],r),r)return r}return r}function j(e,t){var r=!0;for(var n in e){if(r=r&&(n===s?j:n===l?A:L)(e[n],t),P.trace&&C(O.step,"======((( and",e[n],r),!r)return r}return r}function L(e,t){if(O.step+=1,e.or){var r=A(e.or,t);return P.trace&&C(O.step,"OR",e,r),r}if(e.and){r=j(e.and,t);return P.trace&&C(O.step,"AND",e,r),r}if("object"===n(e))return e.eq?M(t,e.eq[0])===e.eq[1]:e.ne?M(t,e.ne[0])!==e.ne[1]:e.req?k(M(t,e.req[0]),e.req[1]):e.nreq?!k(M(t,e.nreq[0]),e.nreq[1]):e.gt?M(t,e.gt[0])>e.gt[1]:e.ge?M(t,e.ge[0])>=e.ge[1]:e.lt?M(t,e.lt[0])0?n.map(function(e){for(var t={},r=0,n=O.pathway.length;r-1&&e%1==0&&e-1&&e%1==0&&e<=o}(e.length)&&!Y(e)}function Y(e){var t=Q(e)?P.call(e):"";return t==a||t==s}function Q(e){var t=n(e);return!!e&&("object"==t||"function"==t)}var X,K=(X=function(e){return W(e)?B(e):G(e)},function(e){var t,r,n,o=V(e);return o==l?(t=e,r=-1,n=Array(t.size),t.forEach(function(e,t){n[++r]=[t,e]}),n):o==u?function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=[e,e]}),r}(e):d(e,X(e))});e.exports=K},943:function(e,t,r){"use strict";e.exports=o;var n=r(299);function o(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}o.Varint=0,o.Fixed64=1,o.Bytes=2,o.Fixed32=5;var i="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function a(e){return e.type===o.Bytes?e.readVarint()+e.pos:e.pos+1}function s(e,t,r){return r?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function l(e,t,r){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(n);for(var o=r.pos-1;o>=e;o--)r.buf[o+n]=r.buf[o]}function u(e,t){for(var r=0;r>>8,e[r+2]=t>>>16,e[r+3]=t>>>24}function S(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}o.prototype={destroy:function(){this.buf=null},readFields:function(e,t,r){for(r=r||this.length;this.pos>3,i=this.pos;this.type=7&n,e(o,t,this),this.pos===i&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=b(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=S(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=b(this.buf,this.pos)+4294967296*b(this.buf,this.pos+4);return this.pos+=8,e},readSFixed64:function(){var e=b(this.buf,this.pos)+4294967296*S(this.buf,this.pos+4);return this.pos+=8,e},readFloat:function(){var e=n.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=n.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,r,n=this.buf;return t=127&(r=n[this.pos++]),r<128?t:(t|=(127&(r=n[this.pos++]))<<7,r<128?t:(t|=(127&(r=n[this.pos++]))<<14,r<128?t:(t|=(127&(r=n[this.pos++]))<<21,r<128?t:function(e,t,r){var n,o,i=r.buf;if(o=i[r.pos++],n=(112&o)>>4,o<128)return s(e,n,t);if(o=i[r.pos++],n|=(127&o)<<3,o<128)return s(e,n,t);if(o=i[r.pos++],n|=(127&o)<<10,o<128)return s(e,n,t);if(o=i[r.pos++],n|=(127&o)<<17,o<128)return s(e,n,t);if(o=i[r.pos++],n|=(127&o)<<24,o<128)return s(e,n,t);if(o=i[r.pos++],n|=(1&o)<<31,o<128)return s(e,n,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(r=n[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&i?function(e,t,r){return i.decode(e.subarray(t,r))}(this.buf,t,e):function(e,t,r){var n="",o=t;for(;o239?4:l>223?3:l>191?2:1;if(o+c>r)break;1===c?l<128&&(u=l):2===c?128==(192&(i=e[o+1]))&&(u=(31&l)<<6|63&i)<=127&&(u=null):3===c?(i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&((u=(15&l)<<12|(63&i)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&((u=(15&l)<<18|(63&i)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,n+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),n+=String.fromCharCode(u),o+=c}return n}(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==o.Bytes)return e.push(this.readVarint(t));var r=a(this);for(e=e||[];this.pos127;);else if(t===o.Bytes)this.pos=this.readVarint()+this.pos;else if(t===o.Fixed32)this.pos+=4;else{if(t!==o.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t268435455||e<0?function(e,t){var r,n;e>=0?(r=e%4294967296|0,n=e/4294967296|0):(n=~(-e/4294967296),4294967295^(r=~(-e%4294967296))?r=r+1|0:(r=0,n=n+1|0));if(e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),function(e,t,r){r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos]=127&e}(r,0,t),function(e,t){var r=(7&e)<<4;if(t.buf[t.pos++]|=r|((e>>>=3)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;t.buf[t.pos++]=127&e}(n,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,r){for(var n,o,i=0;i55295&&n<57344){if(!o){n>56319||i+1===t.length?(e[r++]=239,e[r++]=191,e[r++]=189):o=n;continue}if(n<56320){e[r++]=239,e[r++]=191,e[r++]=189,o=n;continue}n=o-55296<<10|n-56320|65536,o=null}else o&&(e[r++]=239,e[r++]=191,e[r++]=189,o=null);n<128?e[r++]=n:(n<2048?e[r++]=n>>6|192:(n<65536?e[r++]=n>>12|224:(e[r++]=n>>18|240,e[r++]=n>>12&63|128),e[r++]=n>>6&63|128),e[r++]=63&n|128)}return r}(this.buf,e,this.pos);var r=this.pos-t;r>=128&&l(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r},writeFloat:function(e){this.realloc(4),n.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),n.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var r=0;r=128&&l(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,r){this.writeTag(e,o.Bytes),this.writeRawMessage(t,r)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,u,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,c,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,p,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,f,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,h,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,y,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,d,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,v,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,m,t)},writeBytesField:function(e,t){this.writeTag(e,o.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,o.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,o.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,o.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,o.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,o.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,o.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,o.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,o.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,o.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}}},957:function(e,t,r){var n,o,i;function a(e){"@babel/helpers - typeof";return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}i=function(){"use strict";function e(e){var t=this.constructor;return this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){return t.reject(r)})})}function t(e){return new this(function(t,r){if(!e||void 0===e.length)return r(new TypeError(a(e)+" "+e+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var n=Array.prototype.slice.call(e);if(0===n.length)return t([]);var o=n.length;function i(e,r){if(r&&("object"===a(r)||"function"==typeof r)){var s=r.then;if("function"==typeof s)return void s.call(r,function(t){i(e,t)},function(r){n[e]={status:"rejected",reason:r},0==--o&&t(n)})}n[e]={status:"fulfilled",value:r},0==--o&&t(n)}for(var s=0;s0&&(r=parseFloat(e.toPrecision(t))),r},format:function(t,r,n,o){r=void 0!==r?r:0,n=void 0!==n?n:e.Number.thousandsSeparator,o=void 0!==o?o:e.Number.decimalSeparator,null!=r&&(t=parseFloat(t.toFixed(r)));var i=t.toString().split(".");1===i.length&&null==r&&(r=0);var a,s=i[0];if(n)for(var l=/(-?[0-9]+)([0-9]{3})/;l.test(s);)s=s.replace(l,"$1"+n+"$2");if(0==r)a=s;else{var u=i.length>1?i[1]:"0";null!=r&&(u+=new Array(r-u.length+1).join("0")),a=s+o+u}return a}};Number.prototype.limitSigDigs||(Number.prototype.limitSigDigs=function(e){return J.limitSigDigs(this,e)});var q=e.Function={bind:function(e,t){var r=Array.prototype.slice.apply(arguments,[2]);return function(){var n=r.concat(Array.prototype.slice.apply(arguments,[0]));return e.apply(t,n)}},bindAsEventListener:function(e,t){return function(r){return e.call(t,r||window.event)}},False:function(){return!1},True:function(){return!0},Void:function(){}};e.Array={filter:function(e,t,r){var n=[];if(Array.prototype.filter)n=e.filter(t,r);else{var o=e.length;if("function"!=typeof t)throw new TypeError;for(var i=0;i=0;r--)e[r]===t&&e.splice(r,1);return e},e.Util.indexOf=function(e,t){if(null==e)return-1;if("function"==typeof e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r=0&&parseFloat(s)<1?(e.style.filter="alpha(opacity="+100*s+")",e.style.opacity=s):1===parseFloat(s)&&(e.style.filter="",e.style.opacity="")},e.Util.applyDefaults=function(e,t){e=e||{};var r="function"==typeof window.Event&&t instanceof window.Event;for(var n in t)(void 0===e[n]||!r&&t.hasOwnProperty&&t.hasOwnProperty(n)&&!e.hasOwnProperty(n))&&(e[n]=t[n]);return!r&&t&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&!e.hasOwnProperty("toString")&&(e.toString=t.toString),e},e.Util.getParameterString=function(e){var t=[];for(var r in e){var n,o=e[r];if(null!=o&&"function"!=typeof o)n=Array.isArray(o)||"[object Object]"===o.toString()?encodeURIComponent(JSON.stringify(o)):encodeURIComponent(o),t.push(encodeURIComponent(r)+"="+n)}return t.join("&")},e.Util.urlAppend=function(e,t){var r=e;if(t){0===t.indexOf("?")&&(t=t.substring(1));var n=(e+" ").split(/[?&]/);r+=" "===n.pop()?t:n.length?"&"+t:"?"+t}return r},e.Util.urlPathAppend=function(e,t){var r=e;if(!t)return r;0===t.indexOf("/")&&(t=t.substring(1));var n=e.split("?");return n[0].indexOf("/",n[0].length-1)<0&&(n[0]+="/"),r="".concat(n[0]).concat(t).concat(n.length>1?"?".concat(n[1]):"")},e.Util.DEFAULT_PRECISION=14,e.Util.toFloat=function(t,r){return null==r&&(r=e.Util.DEFAULT_PRECISION),"number"!=typeof t&&(t=parseFloat(t)),0===r?t:parseFloat(t.toPrecision(r))},e.Util.rad=function(e){return e*Math.PI/180},e.Util.getParameters=function(t){t=null===t||void 0===t?window.location.href:t;var r="";if(e.String.contains(t,"?")){var n=t.indexOf("?")+1,o=e.String.contains(t,"#")?t.indexOf("#"):t.length;r=t.substring(n,o)}for(var i={},a=r.split(/[&;]/),s=0,l=a.length;s1?1/e:e},e.Util.getResolutionFromScale=function(t,r){var n;t&&(null==r&&(r="degrees"),n=1/(e.Util.normalizeScale(t)*e.INCHES_PER_UNIT[r]*e.DOTS_PER_INCH));return n},e.Util.getScaleFromResolution=function(t,r){return null==r&&(r="degrees"),t*e.INCHES_PER_UNIT[r]*e.DOTS_PER_INCH},e.IS_GECKO=-1===(Y=navigator.userAgent.toLowerCase()).indexOf("webkit")&&-1!==Y.indexOf("gecko"),e.Browser=function(){var e,t="",r="",n="pc",o=navigator.userAgent.toLowerCase();return o.indexOf("msie")>-1||o.indexOf("trident")>-1&&o.indexOf("rv")>-1?(t="msie",e=o.match(/msie ([\d.]+)/)||o.match(/rv:([\d.]+)/)):o.indexOf("chrome")>-1?(t="chrome",e=o.match(/chrome\/([\d.]+)/)):o.indexOf("firefox")>-1?(t="firefox",e=o.match(/firefox\/([\d.]+)/)):o.indexOf("opera")>-1?(t="opera",e=o.match(/version\/([\d.]+)/)):o.indexOf("safari")>-1&&(t="safari",e=o.match(/version\/([\d.]+)/)),r=e?e[1]:"",o.indexOf("ipad")>-1||o.indexOf("ipod")>-1||o.indexOf("iphone")>-1?n="apple":o.indexOf("android")>-1&&(r=(e=o.match(/version\/([\d.]+)/))?e[1]:"",n="android"),{name:t,version:r,device:n}}(),e.Util.getBrowser=function(){return e.Browser},e.Util.isSupportCanvas=(Q=!0,X=e.Util.getBrowser(),document.createElement("canvas").getContext?("firefox"===X.name&&parseFloat(X.version)<5&&(Q=!1),"safari"===X.name&&parseFloat(X.version)<4&&(Q=!1),"opera"===X.name&&parseFloat(X.version)<10&&(Q=!1),"msie"===X.name&&parseFloat(X.version)<9&&(Q=!1)):Q=!1,Q),e.Util.supportCanvas=function(){return e.Util.isSupportCanvas},e.INCHES_PER_UNIT.degree=e.INCHES_PER_UNIT.dd,e.INCHES_PER_UNIT.meter=e.INCHES_PER_UNIT.m,e.INCHES_PER_UNIT.foot=e.INCHES_PER_UNIT.ft,e.INCHES_PER_UNIT.inch=e.INCHES_PER_UNIT.inches,e.INCHES_PER_UNIT.mile=e.INCHES_PER_UNIT.mi,e.INCHES_PER_UNIT.kilometer=e.INCHES_PER_UNIT.km,e.INCHES_PER_UNIT.yard=e.INCHES_PER_UNIT.yd,e.Util.isInTheSameDomain=function(e){if(!e)return!0;var t=e.indexOf("//"),r=document.location.toString(),n=r.indexOf("//");if(-1===t)return!0;var o,i=o=e.substring(0,t),a=r.substring(n+2);n=a.indexOf("/");var s=a.indexOf(":"),l=a.substring(0,n),u=document.location.protocol;if(-1!==s||(l+=":"+("http:"===u.toLowerCase()?80:443)),u.toLowerCase()!==i.toLowerCase())return!1;var c=(i=e.substring(t+2)).indexOf(":");t=i.indexOf("/");var f,h=i.substring(0,t);return-1!==c?f=i.substring(0,c):(f=i.substring(0,t),h+=":"+("http:"===o.toLowerCase()?80:443)),f===document.domain&&h===l},e.Util.calculateDpi=function(e,t,r,n,o){if(e&&t&&r){var i,a=e.getWidth(),s=e.getHeight(),l=t.w,u=t.h;if(o=o||6378137,"degree"===(n=n||"degrees").toLowerCase()||"degrees"===n.toLowerCase()||"dd"===n.toLowerCase()){var c=a/l,f=s/u;i=254/(c>f?c:f)/r/(2*Math.PI*o/360)/1e4}else{i=254/(a/l)/r/1e4}return i}},e.Util.toJSON=function(t){var r=t;if(null==r)return null;switch(r.constructor){case String:return r=(r=(r=(r=(r=(r=(r='"'+r.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","<")).replace(">",">")).replace(/%/g,"%25")).replace(/&/g,"%26");case Array:for(var n=[],o=0,i=r.length;o0?"{"+u.join(",")+"}":"{}"}return r.toString()}},e.Util.getResolutionFromScaleDpi=function(t,r,n,o){return o=o||6378137,n=n||"",t>0&&r>0?(t=e.Util.normalizeScale(t),"degree"===n.toLowerCase()||"degrees"===n.toLowerCase()||"dd"===n.toLowerCase()?254/r/t/(2*Math.PI*o/360)/1e4:254/r/t/1e4):-1},e.Util.getScaleFromResolutionDpi=function(e,t,r,n){return n=n||6378137,r=r||"",e>0&&t>0?"degree"===r.toLowerCase()||"degrees"===r.toLowerCase()||"dd"===r.toLowerCase()?254/t/e/(2*Math.PI*n/360)/1e4:254/t/e/1e4:-1},e.Util.transformResult=function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},e.Util.copyAttributes=function(e,t){if(e=e||{},t)for(var r in t){var n=t[r];void 0!==n&&"CLASS_NAME"!==r&&"function"!=typeof n&&(e[r]=n)}return e},e.Util.copyAttributesWithClip=function(e,t,r){if(e=e||{},t)for(var n in t){var o=!1;if(r&&r.length)for(var i=0,a=r.length;i=0&&a<=1&&i<=1&&a>=0?new e.Geometry.Point(t.x+i*(r.x-t.x),t.y+i*(r.y-t.y)):"No Intersection";else if(0==l&&0==u){var f=Math.max(t.y,r.y),h=Math.min(t.y,r.y),p=Math.max(t.x,r.x),y=Math.min(t.x,r.x);s=(n.y>=h&&n.y<=f||o.y>=h&&o.y<=f)&&n.x>=y&&n.x<=p||o.x>=y&&o.x<=p?"Coincident":"Parallel"}else s="Parallel";return s},e.Util.getTextBounds=function(e,t,r){document.body.appendChild(r),r.style.width="auto",r.style.height="auto",e.fontSize&&(r.style.fontSize=e.fontSize),e.fontFamily&&(r.style.fontFamily=e.fontFamily),e.fontWeight&&(r.style.fontWeight=e.fontWeight),r.style.position="relative",r.style.visibility="hidden",r.style.display="inline-block",r.innerHTML=t;var n=r.clientWidth,o=r.clientHeight;return document.body.removeChild(r),{textWidth:n,textHeight:o}},e.Util.convertPath=function(e,t){return t?e.replace(/\{([\w-\.]+)\}/g,function(e,r){var n;return n=t.hasOwnProperty(r)?function(e){if(void 0==e||null==e)return"";if(e instanceof Date)return e.toJSON();if(function(e){if("string"!=typeof e&&"object"!==W(e))return!1;try{var t=e.toString();return"[object Object]"===t||"[object Array]"===t}catch(e){return!1}}(e))return JSON.stringify(e);return e.toString()}(t[r]):e,encodeURIComponent(n)}):e}; +/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. + * This program are made available under the terms of the Apache License, Version 2.0 + * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ +var $=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),K.isArray(t)&&(r=t[1],t=t[0]),this.lon=t?K.toFloat(t):0,this.lat=r?K.toFloat(r):0,this.CLASS_NAME="SuperMap.LonLat"}var t,r,n;return t=e,n=[{key:"fromString",value:function(t){var r=t.split(",");return new e(r[0],r[1])}},{key:"fromArray",value:function(t){var r=K.isArray(t);return new e(r&&t[0],r&&t[1])}}],(r=[{key:"toString",value:function(){return"lon="+this.lon+",lat="+this.lat}},{key:"toShortString",value:function(){return this.lon+","+this.lat}},{key:"clone",value:function(){return new e(this.lon,this.lat)}},{key:"add",value:function(t,r){if(null==t||null==r)throw new TypeError("LonLat.add cannot receive null values");return new e(this.lon+K.toFloat(t),this.lat+K.toFloat(r))}},{key:"equals",value:function(e){var t=!1;return null!=e&&(t=this.lon===e.lon&&this.lat===e.lat||isNaN(this.lon)&&isNaN(this.lat)&&isNaN(e.lon)&&isNaN(e.lat)),t}},{key:"wrapDateLine",value:function(e){var t=this.clone();if(e){for(;t.lone.right;)t.lon-=e.getWidth()}return t}},{key:"destroy",value:function(){this.lon=null,this.lat=null}}])&&Z(t.prototype,r),n&&Z(t,n),e}();function ee(e,t){for(var r=0;rthis.right)&&(this.right=r.right),(null==this.top||r.top>this.top)&&(this.top=r.top))}}},{key:"containsLonLat",value:function(e,t){"boolean"==typeof t&&(t={inclusive:t}),t=t||{};var r=this.contains(e.lon,e.lat,t.inclusive),n=t.worldBounds;if(n&&!r){var o=n.getWidth(),i=(n.left+n.right)/2,a=Math.round((e.lon-i)/o);r=this.containsLonLat({lon:e.lon-a*o,lat:e.lat},{inclusive:t.inclusive})}return r}},{key:"containsPixel",value:function(e,t){return this.contains(e.x,e.y,t)}},{key:"contains",value:function(e,t,r){if(null==r&&(r=!0),null==e||null==t)return!1;var n=!1;return n=r?e>=this.left&&e<=this.right&&t>=this.bottom&&t<=this.top:e>this.left&&ethis.bottom&&t=r.bottom&&e.bottom<=r.top||r.bottom>=e.bottom&&r.bottom<=e.top,a=e.top>=r.bottom&&e.top<=r.top||r.top>e.bottom&&r.top=r.left&&e.left<=r.right||r.left>=e.left&&r.left<=e.right,l=e.right>=r.left&&e.right<=r.right||r.right>=e.left&&r.right<=e.right;n=(i||a)&&(s||l)}if(t.worldBounds&&!n){var u=t.worldBounds,c=u.getWidth(),f=!u.containsBounds(r),h=!u.containsBounds(e);f&&!h?(e=e.add(-c,0),n=r.intersectsBounds(e,{inclusive:t.inclusive})):h&&!f&&(r=r.add(-c,0),n=e.intersectsBounds(r,{inclusive:t.inclusive}))}return n}},{key:"containsBounds",value:function(e,t,r){null==t&&(t=!1),null==r&&(r=!0);var n=this.contains(e.left,e.bottom,r),o=this.contains(e.right,e.bottom,r),i=this.contains(e.left,e.top,r),a=this.contains(e.right,e.top,r);return t?n||o||i||a:n&&o&&i&&a}},{key:"determineQuadrant",value:function(e){var t="",r=this.getCenterLonLat();return t+=e.lat=e.right&&o.right>e.right;)o=o.add(-i,0);var a=o.left+r;ae.left&&o.right-n>e.right&&(o=o.add(-i,0))}return o}},{key:"toServerJSONObject",value:function(){return{rightTop:{x:this.right,y:this.top},leftBottom:{x:this.left,y:this.bottom},left:this.left,right:this.right,top:this.top,bottom:this.bottom}}},{key:"destroy",value:function(){this.left=null,this.right=null,this.top=null,this.bottom=null,this.centerLonLat=null}}])&&ee(t.prototype,r),n&&ee(t,n),e}();function re(e,t){for(var r=0;r-1)){if(null!=t&&t=0;--r)t=this.removeComponent(e[r])||t;return t}},{key:"removeComponent",value:function(e){return K.removeItem(this.components,e),this.clearBounds(),!0}},{key:"getArea",value:function(){for(var e=0,t=0,r=this.components.length;t=1?1:m)<=-1?-1:m,c=180*Math.acos(m)/Math.PI,a=(c=o.x==r.x?t.x>r.x&&n.x>r.x||t.xh*t.x+p&&n.y>h*n.x+p||t.yr.y?n.xr.x&&(s=!1):o.xh*n.x+p&&(s=!1):o.x>r.x?n.y>r.y&&(s=!1):n.y=0?180*Math.atan(b)/Math.PI:Math.abs(180*Math.atan(b)/Math.PI)+90,S=Math.abs(t.y);r.y==S&&S==o.y&&r.x=0?b>=0?u+=l:u=180-(u-90)+l:u=b>0?u-180+l:90-u+l:_>=0?b>=0?u-=l:u=180-(u-90)-l:u=b>=0?u-180-l:90-u-l,u=u*Math.PI/180;var O=t.x+i*Math.cos(u),x=t.y+i*Math.sin(u);f.push(new Te(O,x))}f.push(o)}return f}},{key:"createLineEPS",value:function(e){var t=[],r=e.length;if(r<2)return e;for(var n=0;n2;return t&&Me(Le(i.prototype),"removeComponent",this).apply(this,arguments),t}},{key:"getSortedSegments",value:function(){for(var e,t,r=this.components.length-1,n=new Array(r),o=0;o1&&(r=parseFloat(r)*u),n.labelAlign&&"cm"!==n.labelAlign)switch(n.labelAlign){case"lt":l.x+=t/2,l.y+=r/2;break;case"lm":l.x+=t/2;break;case"lb":l.x+=t/2,l.y-=r/2;break;case"ct":l.y+=r/2;break;case"cb":l.y-=r/2;break;case"rt":l.x-=t/2,l.y+=r/2;break;case"rm":l.x-=t/2;break;case"rb":l.x-=t/2,l.y-=r/2}return this.bsInfo.h=r,this.bsInfo.w=t,o=l.x-parseFloat(t)/2,i=l.y+parseFloat(r)/2,s=l.x+parseFloat(t)/2,a=l.y-parseFloat(r)/2,new te(o,i,s,a)}},{key:"getLabelPxBoundsByText",value:function(e,t){var r,n,o,i,a=this.getLabelPxSize(t),s=K.cloneObject(e);if(t.labelAlign&&"cm"!==t.labelAlign)switch(t.labelAlign){case"lt":s.x+=a.w/2,s.y+=a.h/2;break;case"lm":s.x+=a.w/2;break;case"lb":s.x+=a.w/2,s.y-=a.h/2;break;case"ct":s.y+=a.h/2;break;case"cb":s.y-=a.h/2;break;case"rt":s.x-=a.w/2,s.y+=a.h/2;break;case"rm":s.x-=a.w/2;break;case"rb":s.x-=a.w/2,s.y-=a.h/2}return this.bsInfo.h=a.h,this.bsInfo.w=a.w,r=s.x-a.w/2,n=s.y+a.h/2,i=t.fontStyle&&"italic"===t.fontStyle?s.x+a.w/2+parseInt(parseFloat(t.fontSize)/2):s.x+a.w/2,o=s.y-a.h/2,new te(r,n,i,o)}},{key:"getLabelPxSize",value:function(e){var t,r,n,o,i=parseFloat(e.strokeWidth);t=e.label||this.text,r=e.fontSize?parseFloat(e.fontSize):parseFloat("12px");var a=t.split("\n"),s=a.length;o=s>1?r*s+s+i+.2*r:r+i+.2*r+1,n=0,this.labelWTmp&&n255?r++:n++;return t.cnC=r,t.enC=n,t.textC=e.length,t}}])&&De(t.prototype,r),n&&De(t,n),i}();function Ve(e){"@babel/helpers - typeof";return(Ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function He(e,t){for(var r=0;r3;if(t){this.components.pop(),Je(Ye(i.prototype),"removeComponent",this).apply(this,arguments);var r=this.components[0];Je(Ye(i.prototype),"addComponent",this).apply(this,[r])}return t}},{key:"getArea",value:function(){var e=0;if(this.components&&this.components.length>2){for(var t=0,r=0,n=this.components.length;r0){e+=Math.abs(this.components[0].getArea());for(var t=1,r=this.components.length;t1},isLeftClick:function(e){return e.which&&1===e.which||e.button&&1===e.button},isRightClick:function(e){return e.which&&3===e.which||e.button&&2===e.button},stop:function(e,t){t||(e.preventDefault?e.preventDefault():e.returnValue=!1),e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},findElement:function(t,r){for(var n=e.Event.element(t);n.parentNode&&(!n.tagName||n.tagName.toUpperCase()!=r.toUpperCase());)n=n.parentNode;return n},observe:function(e,t,r,n){var o=K.getElement(e);if(n=n||!1,"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||o.attachEvent)&&(t="keydown"),this.observers||(this.observers={}),!o._eventCacheID){var i="eventCacheID_";o.id&&(i=o.id+"_"+i),o._eventCacheID=K.createUniqueID(i)}var a=o._eventCacheID;this.observers[a]||(this.observers[a]=[]),this.observers[a].push({element:o,name:t,observer:r,useCapture:n}),o.addEventListener?"mousewheel"===t?o.addEventListener(t,r,{useCapture:n,passive:!1}):o.addEventListener(t,r,n):o.attachEvent&&o.attachEvent("on"+t,r)},stopObservingElement:function(t){var r=K.getElement(t)._eventCacheID;this._removeElementObservers(e.Event.observers[r])},_removeElementObservers:function(t){if(t)for(var r=t.length-1;r>=0;r--){var n=t[r],o=new Array(n.element,n.name,n.observer,n.useCapture);e.Event.stopObserving.apply(this,o)}},stopObserving:function(t,r,n,o){o=o||!1;var i=K.getElement(t),a=i._eventCacheID;"keypress"===r&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||i.detachEvent)&&(r="keydown");var s=!1,l=e.Event.observers[a];if(l)for(var u=0;!s&&u0&&r.push(","),r.push(this.writeNewline(),this.writeIndent(),t));return this.level-=1,r.push(this.writeNewline(),this.writeIndent(),"]"),r.join("")},string:function(e){var t={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return/["\\\x00-\x1f]/.test(e)?'"'+e.replace(/([\x00-\x1f\\"])/g,function(e,r){var n=t[r];return n||(n=r.charCodeAt(),"\\u00"+Math.floor(n/16).toString(16)+(n%16).toString(16))})+'"':'"'+e+'"'},number:function(e){return isFinite(e)?String(e):"null"},boolean:function(e){return String(e)},date:function(e){function t(e){return e<10?"0"+e:e}return'"'+e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())+"T"+t(e.getHours())+":"+t(e.getMinutes())+":"+t(e.getSeconds())+'"'}},t}return t=i,(r=[{key:"read",value:function(e,t){var r;if(this.nativeJSON)try{r=JSON.parse(e,t)}catch(e){}return this.keepData&&(this.data=r),r}},{key:"write",value:function(e,t){this.pretty=!!t;var r=null,n=Nt(e);if(this.serialize[n])try{r=!this.pretty&&this.nativeJSON?JSON.stringify(e):this.serialize[n].apply(this,[e])}catch(e){}return r}},{key:"writeIndent",value:function(){var e=[];if(this.pretty)for(var t=0;t0))return null;for(var a=0,s=0,l=[];a0){e+='"points":[';for(var r=0,n=this.components.length;re[i]){var a=e[i];e[i]=e[o],e[o]=a;var s=t[i];if(t[i]=t[o],t[o]=s,r&&r.length>0){var l=r[i];r[i]=r[o],r[o]=l}if(n&&n.length>0){var u=n[i];n[i]=n[o],n[o]=u}}}}],(r=[{key:"destroy",value:function(){var e=this;e.id=null,e.style=null,e.parts=null,e.partTopo=null,e.points=null,e.type=null,e.prjCoordSys=null}},{key:"toGeometry",value:function(){var e=this;switch(e.type.toUpperCase()){case o.POINT:return e.toGeoPoint();case o.LINE:return e.toGeoLine();case o.LINEM:return e.toGeoLinem();case o.REGION:return e.toGeoRegion();case o.POINTEPS:return e.toGeoPoint();case o.LINEEPS:return e.toGeoLineEPS();case o.REGIONEPS:return e.toGeoRegionEPS();case o.GEOCOMPOUND:return e.transformGeoCompound()}}},{key:"toGeoPoint",value:function(){var e=this.parts||[],t=this.points||[],r=e.length;if(r>0){if(1===r)return new Te(t[0].x,t[0].y);for(var n=[],o=0;o0){if(1===r){for(var n=[],o=0;o0){if(1===s){for(e=0,r=[];e=0;g--)if(m[b]=-1,f[g].containsBounds(f[b])){h[b]=-1*h[g],h[b]<0&&(m[b]=g);break}for(var S=0;S0?i.push(c[S]):(i[m[S]].components=i[m[S]].components.concat(c[S].components),i.push(""))}else{i=new Array;for(var _=0;_0&&i.length>0&&(i[i.length-1].components=i[i.length-1].components.concat(l),l=[]),i.push(c[_])),_==o-1){var w=i.length;if(w)i[w-1].components=i[w-1].components.concat(l);else for(var O=0,x=l.length;O=0;S--)if(b[g]=-1,h[S].containsBounds(h[g])){p[g]=-1*p[S],p[g]<0&&(b[g]=S);break}for(var _=0;_0?a.push(f[_]):(a[b[_]].components=a[b[_]].components.concat(f[_].components),a.push(""))}else{a=new Array;for(var w=0;w0&&a.length>0&&(a[a.length-1].components=a[a.length-1].components.concat(u),u=[]),a.push(f[w])),w==o-1){var O=a.length;if(O)a[O-1].components=a[O-1].components.concat(u);else for(var x=0,P=u.length;x-1||(t[n]=e[n]);return t}}])&&lr(t.prototype,r),n&&lr(t,n),i}();function yr(e){"@babel/helpers - typeof";return(yr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dr(e,t){for(var r=0;r0&&o.push(","),r=t[i].geometry,o.push(this.extractGeometry(r));return n&&o.push(")"),o.join("")}},{key:"extractGeometry",value:function(e){var t=e.CLASS_NAME.split(".")[2].toLowerCase();return this.extract[t]?("collection"===t?"GEOMETRYCOLLECTION":t.toUpperCase())+"("+this.extract[t].apply(this,[e])+")":null}}])&&dr(t.prototype,r),n&&dr(t,n),i}();function Sr(e,t){for(var r=0;r=0?t.speed:1,this.frequency=t.speed&&t.frequency>=0?t.frequency:1e3,this.startTime=t.startTime&&null!=t.startTime?t.startTime:0,this.endTime=t.endTime&&null!=t.endTime&&t.endTime>=r.startTime?t.endTime:+new Date,this.repeat=void 0===t.repeat||t.repeat,this.reverse=void 0!==t.reverse&&t.reverse,this.currentTime=null,this.oldTime=null,this.running=!1,this.EVENT_TYPES=["start","pause","stop"],r.events=new Ot(this,null,this.EVENT_TYPES),r.speed=Number(r.speed),r.frequency=Number(r.frequency),r.startTime=Number(r.startTime),r.endTime=Number(r.endTime),r.startTime=Date.parse(new Date(r.startTime)),r.endTime=Date.parse(new Date(r.endTime)),r.currentTime=r.startTime,this.CLASS_NAME="SuperMap.TimeControlBase"}var t,r,n;return t=e,(r=[{key:"updateOptions",value:function(e){var t=this;(e=e||{}).speed&&e.speed>=0&&(t.speed=e.speed,t.speed=Number(t.speed)),e.speed&&e.frequency>=0&&(t.frequency=e.frequency,t.frequency=Number(t.frequency)),e.startTime&&null!=e.startTime&&(t.startTime=e.startTime,t.startTime=Date.parse(new Date(t.startTime))),e.endTime&&null!=e.endTime&&e.endTime>=t.startTime&&(t.endTime=e.endTime,t.endTime=Date.parse(new Date(t.endTime))),null!=e.repeat&&(t.repeat=e.repeat),null!=e.reverse&&(t.reverse=e.reverse)}},{key:"start",value:function(){var e=this;e.running||(e.running=!0,e.tick(),e.events.triggerEvent("start",e.currentTime))}},{key:"pause",value:function(){this.running=!1,this.events.triggerEvent("pause",this.currentTime)}},{key:"stop",value:function(){var e=this;e.currentTime=e.startTime,e.running&&(e.running=!1),e.events.triggerEvent("stop",e.currentTime)}},{key:"toggle",value:function(){this.running?this.pause():this.start()}},{key:"setSpeed",value:function(e){return e>=0&&(this.speed=e,!0)}},{key:"getSpeed",value:function(){return this.speed}},{key:"setFrequency",value:function(e){return e>=0&&(this.frequency=e,!0)}},{key:"getFrequency",value:function(){return this.frequency}},{key:"setStartTime",value:function(e){var t=this;return!((e=Date.parse(new Date(e)))>t.endTime)&&(t.startTime=e,t.currentTime=t.endTime&&(t.currentTime=t.startTime,t.tick()),!0)}},{key:"getEndTime",value:function(){return this.endTime}},{key:"setCurrentTime",value:function(e){var t=this;return t.currentTime=Date.parse(new Date(t.currentTime)),e>=t.startTime&&e<=t.endTime&&(t.currentTime=e,t.startTime=t.currentTime,t.tick(),!0)}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"setRepeat",value:function(e){this.repeat=e}},{key:"getRepeat",value:function(){return this.repeat}},{key:"setReverse",value:function(e){this.reverse=e}},{key:"getReverse",value:function(){return this.reverse}},{key:"getRunning",value:function(){return this.running}},{key:"destroy",value:function(){var e=this;e.speed=null,e.frequency=null,e.startTime=null,e.endTime=null,e.currentTime=null,e.repeat=null,e.running=!1,e.reverse=null}},{key:"tick",value:function(){}}])&&Sr(t.prototype,r),n&&Sr(t,n),e}();function wr(e){"@babel/helpers - typeof";return(wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Or(e,t){for(var r=0;r=e.endTime&&(e.currentTime=e.endTime)}}}])&&Or(t.prototype,r),n&&Or(t,n),i}();e.TimeFlowControl=Rr; +/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. + * This program are made available under the terms of the Apache License, Version 2.0 + * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ +r(957),r(937);var kr=r(238),Mr=r.n(kr),Ar=window.fetch,jr=(e.setCORS=function(t){e.CORS=t},e.isCORS=function(){return void 0!=e.CORS?e.CORS:window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest}),Lr=(e.setRequestTimeout=function(t){return e.RequestTimeout=t},e.getRequestTimeout=function(){return e.RequestTimeout||45e3}),Nr=e.FetchRequest={commit:function(e,t,r,n){switch(e=e?e.toUpperCase():e){case"GET":return this.get(t,r,n);case"POST":return this.post(t,r,n);case"PUT":return this.put(t,r,n);case"DELETE":return this.delete(t,r,n);default:return this.get(t,r,n)}},supportDirectRequest:function(e,t){return!!K.isInTheSameDomain(e)||(void 0!=t.crossOrigin?t.crossOrigin:jr()||t.proxy)},get:function(t,r,n){n=n||{};if(t=K.urlAppend(t,this._getParameterString(r||{})),t=this._processUrl(t,n),!this.supportDirectRequest(t,n)){var o={url:t=t.replace(".json",".jsonp"),data:r};return e.Util.RequestJSONPPromise.GET(o)}return this.urlIsLong(t)?this._postSimulatie("GET",t.substring(0,t.indexOf("?")-1),r,n):this._fetch(t,r,n,"GET")},delete:function(t,r,n){n=n||{};if(t=K.urlAppend(t,this._getParameterString(r||{})),t=this._processUrl(t,n),!this.supportDirectRequest(t,n)){t=t.replace(".json",".jsonp");var o={url:t+="&_method=DELETE",data:r};return e.Util.RequestJSONPPromise.DELETE(o)}return this.urlIsLong(t)?this._postSimulatie("DELETE",t.substring(0,t.indexOf("?")-1),r,n):this._fetch(t,r,n,"DELETE")},post:function(t,r,n){if(n=n||{},!this.supportDirectRequest(t,n)){t=t.replace(".json",".jsonp");var o={url:t+="&_method=POST",data:r};return e.Util.RequestJSONPPromise.POST(o)}return this._fetch(this._processUrl(t,n),r,n,"POST")},put:function(t,r,n){if(n=n||{},t=this._processUrl(t,n),!this.supportDirectRequest(t,n)){t=t.replace(".json",".jsonp");var o={url:t+="&_method=PUT",data:r};return e.Util.RequestJSONPPromise.PUT(o)}return this._fetch(t,r,n,"PUT")},urlIsLong:function(e){for(var t=0,r=null,n=0,o=e.length;n-1?"&":"?")+"_method="+e,"string"!=typeof r&&(r=JSON.stringify(r)),this.post(t,r,n)},_processUrl:function(e,t){if(this._isMVTRequest(e))return e;if(-1===e.indexOf(".json")&&!t.withoutFormatSuffix)if(e.indexOf("?")<0)e+=".json";else{var r=e.split("?");2===r.length&&(e=r[0]+".json?"+r[1])}return t&&t.proxy&&("function"==typeof t.proxy?e=t.proxy(e):(e=decodeURIComponent(e),e=t.proxy+encodeURIComponent(e))),e},_fetch:function(e,t,r,n){return(r=r||{}).headers=r.headers||{},r.headers["Content-Type"]||FormData.prototype.isPrototypeOf(t)||(r.headers["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8"),r.timeout?this._timeout(r.timeout,Ar(e,{method:n,headers:r.headers,body:"PUT"===n||"POST"===n?t:void 0,credentials:this._getWithCredentials(r),mode:"cors",timeout:Lr()}).then(function(e){return e})):Ar(e,{method:n,body:"PUT"===n||"POST"===n?t:void 0,headers:r.headers,credentials:this._getWithCredentials(r),mode:"cors",timeout:Lr()}).then(function(e){return e})},_getWithCredentials:function(e){return!0===e.withCredentials?"include":!1===e.withCredentials?"omit":"same-origin"},_fetchJsonp:function(e,t){return t=t||{},Mr()(e,{method:"GET",timeout:t.timeout}).then(function(e){return e})},_timeout:function(e,t){return new Promise(function(r,n){setTimeout(function(){n(new Error("timeout"))},e),t.then(r,n)})},_getParameterString:function(e){var t=[];for(var r in e){var n,o=e[r];if(null!=o&&"function"!=typeof o)n=Array.isArray(o)||"[object Object]"===o.toString()?encodeURIComponent(JSON.stringify(o)):encodeURIComponent(o),t.push(encodeURIComponent(r)+"="+n)}return t.join("&")},_isMVTRequest:function(e){return e.indexOf(".mvt")>-1||e.indexOf(".pbf")>-1}};function Ir(e,t){for(var r=0;r=t.limitLength){if(0==s)return!1;o.push(a),a=n,s=0,u--}else if(a.length+t.queryKeys[u].length+2+t.queryValues[u].length>t.limitLength)for(var c=t.queryValues[u];c.length>0;){var f=t.limitLength-a.length-t.queryKeys[u].length-2;a.indexOf("?")>-1?a+="&":a+="?";var h=c.substring(0,f);"%"===h.substring(f-1,f)?(f-=1,h=c.substring(0,f)):"%"===h.substring(f-2,f-1)&&(f-=2,h=c.substring(0,f)),a+=t.queryKeys[u]+"="+h,c=c.substring(f),h.length>0&&(o.push(a),a=n,s=0)}else s++,a.indexOf("?")>-1?a+="&":a+="?",a+=t.queryKeys[u]+"="+t.queryValues[u];return o.push(a),t.send(o,"SuperMap.Util.RequestJSONPPromise.supermap_callbacks["+r+"]",e&&e.proxy),i},getUid:function(){return 1e3*(new Date).getTime()+Math.floor(1e17*Math.random())},send:function(e,t,r){var n=e.length;if(n>0)for(var o=(new Date).getTime(),i=0;i-1?a+="&":a+="?",a+="sectionCount="+n,a+="§ionIndex="+i,a+="&jsonpUserID="+o,r&&(a=decodeURIComponent(a),a=r+encodeURIComponent(a)),Mr()(a,{jsonpCallbackFunction:t,timeout:3e4})}},GET:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings(e.params),this.issue(e)},POST:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings({requestEntity:e.data}),this.issue(e)},PUT:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings({requestEntity:e.data}),this.issue(e)},DELETE:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings({requestEntity:e.data}),this.issue(e)}}; +/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. + * This program are made available under the terms of the Apache License, Version 2.0 + * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ +var Dr=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"generateToken",value:function(e,t){var r=this.servers[e];if(r)return Nr.post(r.tokenServiceUrl,JSON.stringify(t.toJSON())).then(function(e){return e.text()})}},{key:"registerServers",value:function(e){this.servers=this.servers||{},K.isArray(e)||(e=[e]);for(var t=0;t3&&void 0!==arguments[3]?arguments[3]:{headers:this.headers,crossOrigin:this.crossOrigin,withCredentials:this.withCredentials};return t=Dr.appendCredential(t),Nr.commit(e,t,r,n).then(function(e){return e.json()})}}])&&Wr(t.prototype,r),n&&Wr(t,n),e}();e.iPortalServiceBase=Yr; +/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. + * This program are made available under the terms of the Apache License, Version 2.0 + * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ +var Qr=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=t||{},this.resourceType="",this.pageSize=12,this.currentPage=1,this.orderBy="UPDATETIME",this.orderType="DESC",this.searchType="PUBLIC",this.tags=[],this.dirIds=[],this.resourceSubTypes=[],this.aggregationTypes=[],this.text="",this.groupIds=[],this.departmentIds=[],K.extend(this,t)};e.iPortalQueryParam=Qr; +/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. + * This program are made available under the terms of the Apache License, Version 2.0 + * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ +var Xr=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=t||{},this.content=[],this.total=0,this.currentPage=1,this.pageSize=12,this.aggregations=null,K.extend(this,t)};function Kr(e){"@babel/helpers - typeof";return(Kr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zr(e,t){for(var r=0;r0?(this.totalTimes--,this.ajaxPolling()):this._processFailed(e)}},{key:"ajaxPolling",value:function(){var e=this,t=e.options.url,r=/^http:\/\/([a-z]{9}|(\d+\.){3}\d+):\d{0,4}/;e.index=parseInt(Math.random()*e.length),e.url=e.urls[e.index],t=t.replace(r,r.exec(e.url)[0]),e.options.url=t,e.options.isInTheSameDomain=K.isInTheSameDomain(t),e._commit(e.options)}},{key:"calculatePollingTimes",value:function(){var e=this;e.times?e.totalTimes>e.POLLING_TIMES?e.times>e.POLLING_TIMES?e.totalTimes=e.POLLING_TIMES:e.totalTimes=e.times:e.timese.POLLING_TIMES&&(e.totalTimes=e.POLLING_TIMES),e.totalTimes--}},{key:"isServiceSupportPolling",value:function(){return!("SuperMap.REST.ThemeService"===this.CLASS_NAME||"SuperMap.REST.EditFeaturesService"===this.CLASS_NAME)}},{key:"serviceProcessCompleted",value:function(e){e=K.transformResult(e),this.events.triggerEvent("processCompleted",{result:e})}},{key:"serviceProcessFailed",value:function(e){var t=(e=K.transformResult(e)).error||e;this.events.triggerEvent("processFailed",{error:t})}},{key:"_commit",value:function(e){if("POST"===e.method||"PUT"===e.method||"PATCH"===e.method)if(e.params&&(e.url=K.urlAppend(e.url,K.getParameterString(e.params||{}))),"object"===xn(e.data))try{e.params=K.toJSON(e.data)}catch(e){console.log("不是json对象")}else e.params=e.data;Nr.commit(e.method,e.url,e.params,{headers:e.headers,withCredentials:e.withCredentials,crossOrigin:e.crossOrigin,timeout:e.async?0:null,proxy:e.proxy}).then(function(e){return e.text?e.text():e.json?e.json():e}).then(function(e){var t=e;return"string"==typeof e&&(t=(new Ut).read(e)),(!t||t.error||t.code>=300&&304!==t.code)&&(t=t&&t.error?{error:t.error}:{error:t}),t}).catch(function(t){(e.scope?q.bind(e.failure,e.scope):e.failure)(t)}).then(function(t){t.error?(e.scope?q.bind(e.failure,e.scope):e.failure)(t):(t.succeed=void 0==t.succeed||t.succeed,(e.scope?q.bind(e.success,e.scope):e.success)(t))})}}])&&Pn(t.prototype,r),n&&Pn(t,n),e}();function En(e,t){for(var r=0;r0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.numericPrecision=null,e.rangeMode=null,e.rangeCount=null,e.colorGradientType=null}}])&&ai(t.prototype,r),n&&ai(t,n),e}();function li(e,t){for(var r=0;r0&&(r+=","),r+='{"x":'+t[o].x+',"y":'+t[o].y+"}";else if(!0===e)for(var i=0;i0&&(r+=","),r+=t[i];return r+="]"}}])&&ba(t.prototype,r),n&&ba(t,n),i}();function xa(e){"@babel/helpers - typeof";return(xa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pa(e,t){for(var r=0;r=0){var t=JSON.parse(e.data);return e.filterParam=t,e.eventType="setFilterParamSucceeded",void this.events.triggerEvent("setFilterParamSucceeded",e)}var r=JSON.parse(e.data);e.featureResult=r,e.eventType="messageSucceeded",this.events.triggerEvent("messageSucceeded",e)}},{key:"_connect",value:function(e){return e=Dr.appendCredential(e),"WebSocket"in window?new WebSocket(e):"MozWebSocket"in window?new(0,window.MozWebSocket)(e):(console.log("no WebSocket"),null)}}])&&Pa(t.prototype,r),n&&Pa(t,n),i}();function Ma(e,t){for(var r=0;r0&&(r+=","),r+='{"x":'+t[o].x+',"y":'+t[o].y+"}";else if(!0===e)for(var i=0;i0&&(r+=","),r+=t[i];return r+="]"}},{key:"toGeoJSONResult",value:function(e){if(!e||!e.facilityPathList)return e;var t=new pr;return e.facilityPathList.map(function(e){return e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e}),e}}])&&Au(t.prototype,r),n&&Au(t,n),i}();function Fu(e,t){for(var r=0;r0&&(t+=","),t+=K.toJSON(e[n]);return t+="]"}},{key:"toGeoJSONResult",value:function(e){if(!e)return null;var t=new pr;return e.demandResults&&(e.demandResults=t.toGeoJSON(e.demandResults)),e.supplyResults&&(e.supplyResults=t.toGeoJSON(e.supplyResults)),e}}])&&Gu(t.prototype,r),n&&Gu(t,n),i}();function Wu(e,t){for(var r=0;r0&&(r+=","),r+='{"x":'+t[o].x+',"y":'+t[o].y+"}";else if(!0===e)for(var i=0;i0&&(r+=","),r+=t[i];return r+="]"}},{key:"toGeoJSONResult",value:function(e){if(!e||!e.pathList)return null;var t=new pr;return e.pathList.map(function(e){return e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e}),e}}])&&Xu(t.prototype,r),n&&Xu(t,n),i}();function rc(e,t){for(var r=0;r0&&(r+=","),r+='{"x":'+t[o].x+',"y":'+t[o].y+"}";else if(!0===e)for(var i=0;i0&&(r+=","),r+=t[i];return r+="]"}},{key:"toGeoJSONResult",value:function(e){if(!e||!e.pathList||e.pathList.length<1)return null;var t=new pr;return e.pathList.forEach(function(e){e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures))}),e}}])&&ic(t.prototype,r),n&&ic(t,n),i}();function fc(e,t){for(var r=0;r0&&(r+=","),r+='{"x":'+t[o].x+',"y":'+t[o].y+"}";else if(!0===e)for(var i=0;i0&&(r+=","),r+=t[i];return r+="]"}},{key:"toGeoJSONResult",value:function(e){if(!e||!e.serviceAreaList)return e;var t=new pr;return e.serviceAreaList.map(function(e){return e.serviceRegion&&(e.serviceRegion=t.toGeoJSON(e.serviceRegion)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e.routes&&(e.routes=t.toGeoJSON(e.routes)),e}),e}}])&&yc(t.prototype,r),n&&yc(t,n),i}();function Sc(e,t){for(var r=0;r0&&(t+=","),t+='{"x":'+o[r].x+',"y":'+o[r].y+"}";i+=t+="]"}else if(!0===e.isAnalyzeById){for(var a="[",s=e.nodes,l=s.length,u=0;u0&&(a+=","),a+=s[u];i+=a+="]"}return i}},{key:"toGeoJSONResult",value:function(e){if(!e||!e.tspPathList)return null;var t=new pr;return e.tspPathList.forEach(function(e){e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures))}),e}}])&&Oc(r.prototype,n),o&&Oc(r,o),a}();function Rc(e,t){for(var r=0;r=0;e--)this.points[e].destroy();this.points=null}}}])&&cf(t.prototype,r),n&&cf(t,n),i}();function mf(e){"@babel/helpers - typeof";return(mf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bf(e,t){for(var r=0;r0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}}])&&Hf(t.prototype,r),n&&Hf(t,n),i}();function Kf(e){"@babel/helpers - typeof";return(Kf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zf(e,t){for(var r=0;r=0&&r.toIndex>=0&&!n&&(r.url=K.urlAppend(r.url,"fromIndex=".concat(r.fromIndex,"&toIndex=").concat(r.toIndex))),e.returnCountOnly&&(r.url=K.urlAppend(r.url,"&returnCountOnly="+e.returnContent)),t=r.getJsonParameters(e),r.request({method:"POST",data:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}},{key:"serviceProcessCompleted",value:function(e){if(e=K.transformResult(e),this.format===t.GEOJSON&&e.features){var r=new pr;e.features=r.toGeoJSON(e.features)}this.events.triggerEvent("processCompleted",{result:e})}}])&&Zf(r.prototype,n),o&&Zf(r,o),a}();function ih(e){"@babel/helpers - typeof";return(ih="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ah(e,t){for(var r=0;r0;)e.fields.pop();e.fields=null}e.geometry&&(e.geometry.destroy(),e.geometry=null)}}])&&ph(t.prototype,r),n&&ph(t,n),i}();function Sh(e){"@babel/helpers - typeof";return(Sh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _h(e,t){for(var r=0;r0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}}])&&Th(t.prototype,r),n&&Th(t,n),i}();function Nh(e){"@babel/helpers - typeof";return(Nh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ih(e,t){for(var r=0;r0;)e.fields.pop();e.fields=null}}}])&&Vh(t.prototype,r),n&&Vh(t,n),i}();function Xh(e){"@babel/helpers - typeof";return(Xh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kh(e,t){for(var r=0;r0&&(e=e.substring(0,e.length-1)),"{"+e+"}"}return null}}])&&Ip(t.prototype,r),n&&Ip(t,n),e}();function Fp(e,t){for(var r=0;r0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.defaultStyle&&(e.defaultStyle.destroy(),e.defaultStyle=null)}},{key:"toServerJSONObject",value:function(){var e={};if((e=K.copyAttributes(e,this)).defaultStyle&&e.defaultStyle.toServerJSONObject&&(e.defaultStyle=e.defaultStyle.toServerJSONObject()),e.items){for(var t=[],r=e.items.length,n=0;n0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.rangeExpression=null,e.rangeMode=null,e.rangeParameter=null,e.colorGradientType=null}}])&&ed(t.prototype,r),n&&ed(t,n),i}();function sd(e,t){for(var r=0;r0?e[0].subLayers.layers:null)?t.length:0,this.handleLayers(r,t),this.events.triggerEvent("processCompleted",{result:e[0]})}},{key:"handleLayers",value:function(e,t){var r;if(e)for(var n=0;n0)this.handleLayers(t[n].subLayers.layers.length,t[n].subLayers.layers);else switch(t[n].ugcLayerType){case"THEME":(r=new Md).fromJson(t[n]),t[n]=r;break;case"GRID":(r=new Fd).fromJson(t[n]),t[n]=r;break;case"IMAGE":(r=new Jd).fromJson(t[n]),t[n]=r;break;case"VECTOR":(r=new Zd).fromJson(t[n]),t[n]=r}}}}])&&ev(t.prototype,r),n&&ev(t,n),i}();function sv(e,t){for(var r=0;r=200&&e.code<300||0==e.code||304===e.code,r=e.code&&t;!e.code||r?this.events&&this.events.triggerEvent("processCompleted",{result:e}):this.events.triggerEvent("processFailed",{error:e})}}])&&Rm(t.prototype,r),n&&Rm(t,n),i}();function Im(e,t){for(var r=0;r0&&(r+='"subLayers":'+e.toJSON()),r+=',"visible":true,',r+='"name":"'+this.getMapName(this.mapUrl)+'"',r+="}]",t.request({method:"PUT",data:r,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}},{key:"createTempLayerComplete",value:function(e){(e=K.transformResult(e)).succeed&&(this.lastparams.resourceID=e.newResourceID),this.processAsync(this.lastparams)}},{key:"getMapName",value:function(e){var t=e;"/"===t.charAt(t.length-1)&&(t=t.substr(0,t.length-1));var r=t.lastIndexOf("/");return t.substring(r+1,t.length)}},{key:"serviceProcessCompleted",value:function(e){null!=(e=K.transformResult(e))&&null!=this.lastparams&&(e.newResourceID=this.lastparams.resourceID),this.events.triggerEvent("processCompleted",{result:e})}}])&&xS(t.prototype,r),n&&xS(t,n),i}();function MS(e,t){for(var r=0;r0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.reverseColor=null,e.rangeMode=null,e.rangeParameter=null,e.colorGradientType=null}}])&&q_(t.prototype,r),n&&q_(t,n),i}();function $_(e,t){for(var r=0;r0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.defaultcolor&&(e.defaultcolor.destroy(),e.defaultcolor=null)}},{key:"toServerJSONObject",value:function(){var e={};if((e=K.copyAttributes(e,this)).defaultcolor&&e.defaultcolor.toServerJSONObject&&(e.defaultcolor=e.defaultcolor.toServerJSONObject()),e.items){for(var t=[],r=e.items.length,n=0;n0&&(1===o.length?r+="'displayFilter':\""+o[0]+'",':r+="'displayFilter':\""+o[a]+'",'),(i=e.displayOrderBy)&&i.length>0&&(1===i.length?r+="'displayOrderBy':'"+i[0]+"',":r+="'displayOrderBy':'"+i[a]+"',"),(t=e.fieldValuesDisplayFilter)&&(r+="'fieldValuesDisplayFilter':"+K.toJSON(t)+","),e.joinItems&&e.joinItems.length>0&&e.joinItems[a]&&(r+="'joinItems':["+K.toJSON(e.joinItems[a])+"],"),e.datasetNames&&e.dataSourceNames){var l=e.datasetNames[a]?a:e.datasetNames.length-1,u=e.dataSourceNames[a]?a:e.dataSourceNames.length-1;r+="'datasetInfo': {'name': '"+e.datasetNames[l]+"','dataSourceName': '"+e.dataSourceNames[u]+"'}},"}else r+="},"}e.themes&&e.themes.length>0&&(r=r.substring(0,r.length-1)),r+="]},";var c=this.url.split("/");return r+="'name': '"+c[c.length-2]+"'}]"}}])&&yw(r.prototype,n),o&&yw(r,o),a}();function _w(e){"@babel/helpers - typeof";return(_w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ww(e,t){for(var r=0;r3&&void 0!==arguments[3]?arguments[3]:{};return t=Dr.appendCredential(t),n.crossOrigin=this.options.crossOrigin,n.headers=this.options.headers,Nr.commit(e,t,r,n).then(function(e){return e.json()})}}])&&EP(t.prototype,r),n&&EP(t,n),e}();function RP(e){"@babel/helpers - typeof";return(RP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function kP(e,t){for(var r=0;rt.geoFence.radius&&(t.outOfGeoFence&&t.outOfGeoFence(e),t.events.triggerEvent("outOfGeoFence",{data:e})),r})}},{key:"_distance",value:function(e,t,r,n){return Math.sqrt((e-r)*(e-r)+(t-n)*(t-n))}},{key:"_getMeterPerMapUnit",value:function(e){var t;return"meter"===e?t=1:"degree"===e&&(t=2*Math.PI*6378137/360),t}}])&&qP(t.prototype,r),n&&qP(t,n),e}();function YP(e){"@babel/helpers - typeof";return(YP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function QP(e,t){for(var r=0;ri&&(i=e+s+100,n.width=i,r=!0),t+l>a&&(a=t+l+100,n.height=a,r=!0),e<-s&&(i+=s=100*Math.ceil(-e/100),n.width=i,r=!0),t<-l&&(a+=l=100*Math.ceil(-t/100),n.height=a,r=!0),r&&o.translate(s,l)}},{key:"getPixelOffset",value:function(){return{x:this._offsetX,y:this._offsetY}}},{key:"indexOf",value:function(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r1)for(var o=0,i=n-1;o1?Math.ceil(e):e}),t.indexOf("hex")>-1)return"#"+((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1);if(t.indexOf("hs")>-1){var r=this.map(e.slice(1,3),function(e){return e+"%"});e[1]=r[0],e[2]=r[1]}return t.indexOf("a")>-1?(3===e.length&&e.push(1),e[3]=this.adjust(e[3],[0,1]),t+"("+e.slice(0,4).join(",")+")"):t+"("+e.slice(0,3).join(",")+")"}}},{key:"toArray",value:function(e){(e=this.trim(e)).indexOf("rgba")<0&&(e=this.toRGBA(e));var t=[],r=0;return e.replace(/[\d.]+/g,function(e){r<3?e|=0:e=+e,t[r++]=e}),t}},{key:"convert",value:function(e,t){if(!this.isCalculableColor(e))return e;var r=this.getData(e),n=r[3];return void 0===n&&(n=1),e.indexOf("hsb")>-1?r=this._HSV_2_RGB(r):e.indexOf("hsl")>-1&&(r=this._HSL_2_RGB(r)),t.indexOf("hsb")>-1||t.indexOf("hsv")>-1?r=this._RGB_2_HSB(r):t.indexOf("hsl")>-1&&(r=this._RGB_2_HSL(r)),r[3]=n,this.toColor(r,t)}},{key:"toRGBA",value:function(e){return this.convert(e,"rgba")}},{key:"toRGB",value:function(e){return this.convert(e,"rgb")}},{key:"toHex",value:function(e){return this.convert(e,"hex")}},{key:"toHSVA",value:function(e){return this.convert(e,"hsva")}},{key:"toHSV",value:function(e){return this.convert(e,"hsv")}},{key:"toHSBA",value:function(e){return this.convert(e,"hsba")}},{key:"toHSB",value:function(e){return this.convert(e,"hsb")}},{key:"toHSLA",value:function(e){return this.convert(e,"hsla")}},{key:"toHSL",value:function(e){return this.convert(e,"hsl")}},{key:"toName",value:function(e){for(var t in this._nameColors)if(this.toHex(this._nameColors[t])===this.toHex(e))return t;return null}},{key:"trim",value:function(e){return String(e).replace(/\s+/g,"")}},{key:"normalize",value:function(e){if(this._nameColors[e]&&(e=this._nameColors[e]),e=(e=this.trim(e)).replace(/hsv/i,"hsb"),/^#[\da-f]{3}$/i.test(e)){var t=(3840&(e=parseInt(e.slice(1),16)))<<8,r=(240&e)<<4,n=15&e;e="#"+((1<<24)+(t<<4)+t+(r<<4)+r+(n<<4)+n).toString(16).slice(1)}return e}},{key:"lift",value:function(e,t){if(!this.isCalculableColor(e))return e;var r=t>0?1:-1;void 0===t&&(t=0),t=Math.abs(t)>1?1:Math.abs(t),e=this.toRGB(e);for(var n=this.getData(e),o=0;o<3;o++)n[o]=1===r?n[o]*(1-t)|0:(255-n[o])*t+n[o]|0;return"rgb("+n.join(",")+")"}},{key:"reverse",value:function(e){if(!this.isCalculableColor(e))return e;var t=this.getData(this.toRGBA(e));return t=this.map(t,function(e){return 255-e}),this.toColor(t,"rgb")}},{key:"mix",value:function(e,t,r){if(!this.isCalculableColor(e)||!this.isCalculableColor(t))return e;void 0===r&&(r=.5);for(var n=2*(r=1-this.adjust(r,[0,1]))-1,o=this.getData(this.toRGBA(e)),i=this.getData(this.toRGBA(t)),a=o[3]-i[3],s=((n*a==-1?n:(n+a)/(1+n*a))+1)/2,l=1-s,u=[],c=0;c<3;c++)u[c]=o[c]*s+i[c]*l;var f=o[3]*r+i[3]*(1-r);return f=Math.max(0,Math.min(1,f)),1===o[3]&&1===i[3]?this.toColor(u,"rgb"):(u[3]=f,this.toColor(u,"rgba"))}},{key:"random",value:function(){return"#"+Math.random().toString(16).slice(2,8)}},{key:"getData",value:function(t){var r,n,o=(t=this.normalize(t)).match(this.colorRegExp);if(null===o)throw new Error("The color format error");var i,a=[];if(o[2])i=[(r=o[2].replace("#","").split(""))[0]+r[1],r[2]+r[3],r[4]+r[5]],a=this.map(i,function(t){return e.prototype.adjust.call(this,parseInt(t,16),[0,255])});else if(o[4]){var s=o[4].split(",");n=s[3],i=s.slice(0,3),a=this.map(i,function(t){return t=Math.floor(t.indexOf("%")>0?2.55*parseInt(t,0):t),e.prototype.adjust.call(this,t,[0,255])}),void 0!==n&&a.push(this.adjust(parseFloat(n),[0,1]))}else if(o[5]||o[6]){var l=(o[5]||o[6]).split(","),u=parseInt(l[0],0)/360,c=l[1],f=l[2];n=l[3],(a=this.map([c,f],function(t){return e.prototype.adjust.call(this,parseFloat(t)/100,[0,1])})).unshift(u),void 0!==n&&a.push(this.adjust(parseFloat(n),[0,1]))}return a}},{key:"alpha",value:function(e,t){if(!this.isCalculableColor(e))return e;null===t&&(t=1);var r=this.getData(this.toRGBA(e));return r[3]=this.adjust(Number(t).toFixed(4),[0,1]),this.toColor(r,"rgba")}},{key:"map",value:function(e,t){if("function"!=typeof t)throw new TypeError;for(var r=e?e.length:0,n=0;n=t[1]&&(e=t[1]),e}},{key:"isCalculableColor",value:function(e){return e instanceof Array||"string"==typeof e}},{key:"_HSV_2_RGB",value:function(e){var t,r,n,o=e[0],i=e[1],a=e[2];if(0===i)t=255*a,r=255*a,n=255*a;else{var s=6*o;6===s&&(s=0);var l=0|s,u=a*(1-i),c=a*(1-i*(s-l)),f=a*(1-i*(1-(s-l))),h=0,p=0,y=0;0===l?(h=a,p=f,y=u):1===l?(h=c,p=a,y=u):2===l?(h=u,p=a,y=f):3===l?(h=u,p=c,y=a):4===l?(h=f,p=u,y=a):(h=a,p=u,y=c),t=255*h,r=255*p,n=255*y}return[t,r,n]}},{key:"_HSL_2_RGB",value:function(e){var t,r,n,o=e[0],i=e[1],a=e[2];if(0===i)t=255*a,r=255*a,n=255*a;else{var s,l=2*a-(s=a<.5?a*(1+i):a+i-i*a);t=255*this._HUE_2_RGB(l,s,o+1/3),r=255*this._HUE_2_RGB(l,s,o),n=255*this._HUE_2_RGB(l,s,o-1/3)}return[t,r,n]}},{key:"_HUE_2_RGB",value:function(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),6*r<1?e+6*(t-e)*r:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}},{key:"_RGB_2_HSB",value:function(e){var t,r,n=e[0]/255,o=e[1]/255,i=e[2]/255,a=Math.min(n,o,i),s=Math.max(n,o,i),l=s-a,u=s;if(0===l)t=0,r=0;else{r=l/s;var c=((s-n)/6+l/2)/l,f=((s-o)/6+l/2)/l,h=((s-i)/6+l/2)/l;n===s?t=h-f:o===s?t=1/3+c-h:i===s&&(t=2/3+f-c),t<0&&(t+=1),t>1&&(t-=1)}return[t*=360,r*=100,u*=100]}},{key:"_RGB_2_HSL",value:function(e){var t,r,n=e[0]/255,o=e[1]/255,i=e[2]/255,a=Math.min(n,o,i),s=Math.max(n,o,i),l=s-a,u=(s+a)/2;if(0===l)t=0,r=0;else{r=u<.5?l/(s+a):l/(2-s-a);var c=((s-n)/6+l/2)/l,f=((s-o)/6+l/2)/l,h=((s-i)/6+l/2)/l;n===s?t=h-f:o===s?t=1/3+c-h:i===s&&(t=2/3+f-c),t<0&&(t+=1),t>1&&(t-=1)}return[t*=360,r*=100,u*=100]}}])&&KP(t.prototype,r),n&&KP(t,n),e}();function $P(e,t){for(var r=0;r=t)if("RANGE"===r)for(o=0;o=0&&this.getSqrtInterval(e,r):"logarithm"===t?this.getMin(e)>0&&this.getGeometricProgression(e,r):void 0}},{key:"getSum",value:function(e){return this.getInstance(e).sum()}},{key:"getMax",value:function(e){return this.getInstance(e).max()}},{key:"getMin",value:function(e){return this.getInstance(e).min()}},{key:"getMean",value:function(e){return this.getInstance(e).mean()}},{key:"getMedian",value:function(e){return this.getInstance(e).median()}},{key:"getTimes",value:function(e){return e.length}},{key:"getEqInterval",value:function(e,t){return this.getInstance(e).getClassEqInterval(t)}},{key:"getJenks",value:function(e,t){return this.getInstance(e).getClassJenks(t)}},{key:"getSqrtInterval",value:function(e,t){return e=e.map(function(e){return Math.sqrt(e)}),this.getInstance(e).getClassEqInterval(t).map(function(e){return e*e})}},{key:"getGeometricProgression",value:function(e,t){return this.getInstance(e).getClassGeometricProgression(t)}}],(r=null)&&rC(t.prototype,r),n&&rC(t,n),e}();e.ArrayStatistic=nC; +/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. + * This program are made available under the terms of the Apache License, Version 2.0 + * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ +var oC=r(820),iC=r.n(oC);function aC(e){"@babel/helpers - typeof";return(aC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lC(e,t){for(var r=0;ru&&(l[o]=l[o].slice(n-u),u=n)}function d(e){var t,i,a,s;if(e instanceof Function)return e.call(c.parsers);if("string"==typeof e)t=r.charAt(n)===e?e:null,i=1,y();else{if(y(),!(t=e.exec(l[o])))return null;i=t[0].length}if(t){var f=n+=i;for(s=n+l[o].length-i;n=0&&"\n"!==n.charAt(a);a--)e.column++;return new Error([e.filename,e.line,e.column,e.message].join(";"))}return this.env=t=t||{},this.env.filename=this.env.filename||null,this.env.inputs=this.env.inputs||{},c={parse:function(i){var a,c=null;if(n=o=u=s=0,l=[],r=i.replace(/\r\n/g,"\n"),t.filename&&(f.env.inputs[t.filename]=r),l=function(e){for(var t,n,o,i,a=0,s=/(?:@\{[\w-]+\}|[^"'`\{\}\/\(\)\\])+/g,l=/\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,u=/"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'|`((?:[^`]|\\.)*)`/g,f=0,h=e[0],p=0;p0?"missing closing `}`":"missing opening `{`"}),e.map(function(e){return e.join("")})}([[]]),c)throw v(c);var h=function(e,t){var r=e.specificity,n=t.specificity;return r[0]!=n[0]?n[0]-r[0]:r[1]!=n[1]?n[1]-r[1]:r[2]!=n[2]?n[2]-r[2]:n[3]-r[3]};return(a=new e.CartoCSS.Tree.Ruleset([],d(this.parsers.primary))).root=!0,a.toList=function(e){e.error=function(t){e.errors||(e.errors=new Error("")),e.errors.message?e.errors.message+="\n"+v(t).message:e.errors.message=v(t).message},e.frames=e.frames||[];var t=this.flatten([],[],e);return t.sort(h),t},a},parsers:{primary:function(){for(var e,t=[];(e=d(this.rule)||d(this.ruleset)||d(this.comment))||d(/^[\s\n]+/)||(e=d(this.invalid));)e&&t.push(e);return t},invalid:function(){var t=d(/^[^;\n]*[;\n]/);if(t)return new e.CartoCSS.Tree.Invalid(t,a)},comment:function(){var t;if("/"===r.charAt(n))return"/"===r.charAt(n+1)?new e.CartoCSS.Tree.Comment(d(/^\/\/.*/),!0):(t=d(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))?new e.CartoCSS.Tree.Comment(t):void 0},entities:{quoted:function(){if('"'===r.charAt(n)||"'"===r.charAt(n)){var t=d(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/);return t?new e.CartoCSS.Tree.Quoted(t[1]||t[2]):void 0}},field:function(){if(d("[")){var t=d(/(^[^\]]+)/);if(d("]"))return t?new e.CartoCSS.Tree.Field(t[1]):void 0}},comparison:function(){var e=d(/^=~|=|!=|<=|>=|<|>/);if(e)return e},keyword:function(){var t=d(/^[A-Za-z\u4e00-\u9fa5-]+[A-Za-z-0-9\u4e00-\u9fa5_]*/);if(t)return new e.CartoCSS.Tree.Keyword(t)},call:function(){var t,r;if(t=/^([\w\-]+|%)\(/.exec(l[o])){if("url"===(t=t[1]))return null;n+=t.length;if(d("("),r=d(this.entities.arguments),d(")"))return t?new e.CartoCSS.Tree.Call(t,r,n):void 0}},arguments:function(){for(var e,t=[];e=d(this.expression);){t.push(e);if(!d(","))break}return t},literal:function(){return d(this.entities.dimension)||d(this.entities.keywordcolor)||d(this.entities.hexcolor)||d(this.entities.quoted)},url:function(){var t;if("u"===r.charAt(n)&&d(/^url\(/)){t=d(this.entities.quoted)||d(this.entities.variable)||d(/^[\-\w%@_match\/.&=:;#+?~]+/)||"";return d(")")?new e.CartoCSS.Tree.URL(void 0!==t.value||t instanceof e.CartoCSS.Tree.Variable?t:new e.CartoCSS.Tree.Quoted(t)):new e.CartoCSS.Tree.Invalid(t,a,"Missing closing ) in URL.")}},variable:function(){var o,i=n;if("@"===r.charAt(n)&&(o=d(/^@[\w-]+/)))return new e.CartoCSS.Tree.Variable(o,i,t.filename)},hexcolor:function(){var t;if("#"===r.charAt(n)&&(t=d(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/)))return new e.CartoCSS.Tree.Color(t[1])},keywordcolor:function(){var t=l[o].match(/^[a-z]+/);if(t&&t[0]in e.CartoCSS.Tree.Reference.data.colors)return new e.CartoCSS.Tree.Color(e.CartoCSS.Tree.Reference.data.colors[d(/^[a-z]+/)])},dimension:function(){var t=r.charCodeAt(n);if(!(t>57||t<45||47===t)){var o=d(/^(-?\d*\.?\d+(?:[eE][-+]?\d+)?)(\%|\w+)?/);return o?new e.CartoCSS.Tree.Dimension(o[1],o[2],a):void 0}}},variable:function(){var e;if("@"===r.charAt(n)&&(e=d(/^(@[\w-]+)\s*:/)))return e[1]},entity:function(){var e=d(this.entities.call)||d(this.entities.literal),t=d(this.entities.field)||d(this.entities.variable),r=d(this.entities.url)||d(this.entities.keyword);return e||t||r},end:function(){var e;return d(";")||("string"==typeof(e="}")?r.charAt(n)===e:!!e.test(l[o]))},element:function(){var t=d(/^(?:[.#][\w\u4e00-\u9fa5\-]+|\*|Map)/);if(t)return new e.CartoCSS.Tree.Element(t)},attachment:function(){var e=d(/^::([\w\-]+(?:\/[\w\-]+)*)/);if(e)return e[1]},selector:function(){for(var t,o,i,s,l,u=[],c=new e.CartoCSS.Tree.Filterset,f=[],h=0,p=0;(i=d(this.element))||(l=d(this.zoom))||(s=d(this.filter))||(t=d(this.attachment));){if(h++,i)u.push(i);else if(l)f.push(l),p++;else if(s){var y=c.add(s);if(y)throw v({message:y,index:n-1});p++}else{if(o)throw v({message:"Encountered second attachment name.",index:n-1});o=t}var m=r.charAt(n);if("{"===m||"}"===m||";"===m||","===m)break}if(h)return new e.CartoCSS.Tree.Selector(c,f,u,o,p,a)},filter:function(){h();var r,n,o;if(d("[")&&(r=d(/^[a-zA-Z0-9\-_]+/)||d(this.entities.quoted)||d(this.entities.variable)||d(this.entities.keyword)||d(this.entities.field))&&(r instanceof e.CartoCSS.Tree.Quoted&&(r=new e.CartoCSS.Tree.Field(r.toString())),(n=d(this.entities.comparison))&&(o=d(this.entities.quoted)||d(this.entities.variable)||d(this.entities.dimension)||d(this.entities.keyword)||d(this.entities.field)))){if(!d("]"))throw v({message:"Missing closing ] of filter.",index:a-1});return r.is||(r=new e.CartoCSS.Tree.Field(r)),new e.CartoCSS.Tree.Filter(r,n,o,a,t.filename)}},zoom:function(){h();var t,r;if(d(/^\[\s*zoom/g)&&(t=d(this.entities.comparison))&&(r=d(this.entities.variable)||d(this.entities.dimension))&&d("]"))return new e.CartoCSS.Tree.Zoom(t,r,a);p()},block:function(){var e;if(d("{")&&(e=d(this.primary))&&d("}"))return e},ruleset:function(){var t,r,n=[];for(h();t=d(this.selector);){for(n.push(t);d(this.comment););if(!d(","))break;for(;d(this.comment););}if(t)for(;d(this.comment););if(n.length>0&&(r=d(this.block))){if(1===n.length&&n[0].elements.length&&"Map"===n[0].elements[0].value){var o=new e.CartoCSS.Tree.Ruleset(n,r);return o.isMap=!0,o}return new e.CartoCSS.Tree.Ruleset(n,r)}p()},rule:function(){var o,i,l=r.charAt(n);if(h(),"."!==l&&"#"!==l&&(o=d(this.variable)||d(this.property))){if((i=d(this.value))&&d(this.end))return new e.CartoCSS.Tree.Rule(o,i,a,t.filename);s=n,p()}},font:function(){for(var t,r=[],n=[];t=d(this.entity);)n.push(t);if(r.push(new e.CartoCSS.Tree.Expression(n)),d(","))for(;(t=d(this.expression))&&(r.push(t),d(",")););return new e.CartoCSS.Tree.Value(r)},value:function(){for(var t,r=[];(t=d(this.expression))&&(r.push(t),d(",")););return r.length>1?new e.CartoCSS.Tree.Value(r.map(function(e){return e.value[0]})):1===r.length?new e.CartoCSS.Tree.Value(r):void 0},sub:function(){var e;if(d("(")&&(e=d(this.expression))&&d(")"))return e},multiplication:function(){var t,r,n,o;if(t=d(this.operand)){for(;(n=d("/")||d("*")||d("%"))&&(r=d(this.operand));)o=new e.CartoCSS.Tree.Operation(n,[o||t,r],a);return o||t}},addition:function(){var t,o,i,s;if(t=d(this.multiplication)){for(;(i=d(/^[-+]\s+/)||" "!=r.charAt(n-1)&&(d("+")||d("-")))&&(o=d(this.multiplication));)s=new e.CartoCSS.Tree.Operation(i,[s||t,o],a);return s||t}},operand:function(){return d(this.sub)||d(this.entity)},expression:function(){for(var t,r=[];t=d(this.addition)||d(this.entity);)r.push(t);if(r.length>0)return new e.CartoCSS.Tree.Expression(r)},property:function(){var e=d(/^(([a-z][-a-z_0-9]*\/)?\*?-?[-a-z_0-9]+)\s*:/);if(e)return e[1]}}}}},{key:"parse",value:function(e){var t=this.parser;return this.ruleSet=t.parse(e)}},{key:"toShaders",value:function(){if(this.ruleSet){var e=this.ruleSet;if(e){var t=e.toList(this.env);t.reverse();var r={},n=[];this._toShaders(r,n,t);for(var o=[],i={},a=0,s=t.length;a=0){if(!t.featureFilter){var i=o+n.length,a=r.indexOf(")",i+1),s="featureId&&(featureId"+r.substring(i,a)+")";Object.defineProperty(t,"featureFilter",{configurable:!0,enumerable:!1,value:function(e){return!!s}})}return{property:p,getValue:Function("attributes","zoom","seftFilter","var _value = null; var isExcute=typeof seftFilter=='function'?sefgFilter():seftFilter;if(isExcute){"+r+";} return _value; ")}}return{property:p,getValue:Function("attributes","zoom","var _value = null;"+r+"; return _value; ")}}(c[p],f);Object.defineProperty(f,"attachment",{configurable:!0,enumerable:!1,value:u}),Object.defineProperty(f,"elements",{configurable:!0,enumerable:!1,value:l.elements}),o.push(f),i[n[a]]=!0}Object.defineProperty(f,"zoom",{configurable:!0,enumerable:!1,value:l.zoom})}return o}}return null}},{key:"_toShaders",value:function(t,r,n){for(var o=0,i=n.length;o= minzoom - 1e-6 and scale < maxzoom + 1e-6"},maxzoom:{"default-value":"1.79769e+308",type:"float","default-meaning":"The layer will be visible at the maximum possible scale",doc:"The maximum scale denominator that this layer will be visible at. The default is the numeric limit of the C++ double type, which may vary slightly by system, but is likely a massive number like 1.79769e+308 and ensures that this layer will always be visible unless the value is reduced. A layer's visibility is determined by whether its status is true and if the Map scale >= minzoom - 1e-6 and scale < maxzoom + 1e-6"},queryable:{"default-value":!1,type:"boolean","default-meaning":"The layer will not be available for the direct querying of data values",doc:"This property was added for GetFeatureInfo/WMS compatibility and is rarely used. It is off by default meaning that in a WMS context the layer will not be able to be queried unless the property is explicitly set to true"},"clear-label-cache":{"default-value":!1,type:"boolean","default-meaning":"The renderer's collision detector cache (used for avoiding duplicate labels and overlapping markers) will not be cleared immediately before processing this layer",doc:"This property, by default off, can be enabled to allow a user to clear the collision detector cache before a given layer is processed. This may be desirable to ensure that a given layers data shows up on the map even if it normally would not because of collisions with previously rendered labels or markers"},"group-by":{"default-value":"",type:"string","default-meaning":"No special layer grouping will be used during rendering",doc:"https://github.com/mapnik/mapnik/wiki/Grouped-rendering"},"buffer-size":{"default-value":"0",type:"float","default-meaning":"No buffer will be used",doc:"Extra tolerance around the Layer extent (in pixels) used to when querying and (potentially) clipping the layer data during rendering"},"maximum-extent":{"default-value":"none",type:"bbox","default-meaning":"No clipping extent will be used",doc:"An extent to be used to limit the bounds used to query this specific layer data during rendering. Should be minx, miny, maxx, maxy in the coordinates of the Layer."}},symbolizers:{"*":{"image-filters":{css:"image-filters","default-value":"none","default-meaning":"no filters",type:"functions",functions:[["agg-stack-blur",2],["emboss",0],["blur",0],["gray",0],["sobel",0],["edge-detect",0],["x-gradient",0],["y-gradient",0],["invert",0],["sharpen",0]],doc:"A list of image filters."},"comp-op":{css:"comp-op","default-value":"src-over","default-meaning":"add the current layer on top of other layers",doc:"Composite operation. This defines how this layer should behave relative to layers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]},opacity:{css:"opacity",type:"float",doc:"An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer)","default-value":1,"default-meaning":"no separate buffer will be used and no alpha will be applied to the style after rendering"}},map:{"background-color":{css:"background-color","default-value":"none","default-meaning":"transparent",type:"color",doc:"Map Background color"},"background-image":{css:"background-image",type:"uri","default-value":"","default-meaning":"transparent",doc:"An image that is repeated below all features on a map as a background.",description:"Map Background image"},srs:{css:"srs",type:"string","default-value":"+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs","default-meaning":"The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space",doc:"Map spatial reference (proj4 string)"},"buffer-size":{css:"buffer-size","default-value":"0",type:"float","default-meaning":"No buffer will be used",doc:'Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges".'},"maximum-extent":{css:"","default-value":"none",type:"bbox","default-meaning":"No clipping extent will be used",doc:"An extent to be used to limit the bounds used to query all layers during rendering. Should be minx, miny, maxx, maxy in the coordinates of the Map."},base:{css:"base","default-value":"","default-meaning":"This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.",type:"string",doc:"Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet."},"paths-from-xml":{css:"","default-value":!0,"default-meaning":"Paths read from XML will be interpreted from the location of the XML",type:"boolean",doc:"value to control whether paths in the XML will be interpreted from the location of the XML or from the working directory of the program that calls load_map()"},"minimum-version":{css:"","default-value":"none","default-meaning":"Mapnik version will not be detected and no error will be thrown about compatibility",type:"string",doc:"The minumum Mapnik version (e.g. 0.7.2) needed to use certain functionality in the stylesheet"},"font-directory":{css:"font-directory",type:"uri","default-value":"none","default-meaning":"No map-specific fonts will be registered",doc:"Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered)."}},polygon:{fill:{css:"polygon-fill",type:"color","default-value":"rgba(128,128,128,1)","default-meaning":"gray and fully opaque (alpha = 1), same as rgb(128,128,128)",doc:"Fill color to assign to a polygon"},"fill-opacity":{css:"polygon-opacity",type:"float",doc:"The opacity of the polygon","default-value":1,"default-meaning":"opaque"},gamma:{css:"polygon-gamma",type:"float","default-value":1,"default-meaning":"fully antialiased",range:"0-1",doc:"Level of antialiasing of polygon edges"},"gamma-method":{css:"polygon-gamma-method",type:["power","linear","none","threshold","multiply"],"default-value":"power","default-meaning":"pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA",doc:"An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h"},clip:{css:"polygon-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"polygon-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"polygon-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"polygon-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},line:{stroke:{css:"line-color","default-value":"rgba(0,0,0,1)",type:"color","default-meaning":"black and fully opaque (alpha = 1), same as rgb(0,0,0)",doc:"The color of a drawn line"},"stroke-width":{css:"line-width","default-value":1,type:"float",doc:"The width of a line in pixels"},"stroke-opacity":{css:"line-opacity","default-value":1,type:"float","default-meaning":"opaque",doc:"The opacity of a line"},"stroke-linejoin":{css:"line-join","default-value":"miter",type:["miter","round","bevel"],doc:"The behavior of lines when joining"},"stroke-linecap":{css:"line-cap","default-value":"butt",type:["butt","round","square"],doc:"The display of line endings"},"stroke-gamma":{css:"line-gamma",type:"float","default-value":1,"default-meaning":"fully antialiased",range:"0-1",doc:"Level of antialiasing of stroke line"},"stroke-gamma-method":{css:"line-gamma-method",type:["power","linear","none","threshold","multiply"],"default-value":"power","default-meaning":"pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA",doc:"An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h"},"stroke-dasharray":{css:"line-dasharray",type:"numbers",doc:"A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns.","default-value":"none","default-meaning":"solid line"},"stroke-dashoffset":{css:"line-dash-offset",type:"numbers",doc:"valid parameter but not currently used in renderers (only exists for experimental svg support in Mapnik which is not yet enabled)","default-value":"none","default-meaning":"solid line"},"stroke-miterlimit":{css:"line-miterlimit",type:"float",doc:"The limit on the ratio of the miter length to the stroke-width. Used to automatically convert miter joins to bevel joins for sharp angles to avoid the miter extending beyond the thickness of the stroking path. Normally will not need to be set, but a larger value can sometimes help avoid jaggy artifacts.","default-value":4,"default-meaning":"Will auto-convert miters to bevel line joins when theta is less than 29 degrees as per the SVG spec: 'miterLength / stroke-width = 1 / sin ( theta / 2 )'"},clip:{css:"line-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"line-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},offset:{css:"line-offset",type:"float","default-value":0,"default-meaning":"no offset",doc:"Offsets a line a number of pixels parallel to its actual path. Postive values move the line left, negative values move it right (relative to the directionality of the line)."},rasterizer:{css:"line-rasterizer",type:["full","fast"],"default-value":"full",doc:"Exposes an alternate AGG rendering method that sacrifices some accuracy for speed."},"geometry-transform":{css:"line-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"line-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},markers:{file:{css:"marker-file",doc:"An SVG file that this marker shows at each placement. If no file is given, the marker will show an ellipse.","default-value":"","default-meaning":"An ellipse or circle, if width equals height",type:"uri"},opacity:{css:"marker-opacity",doc:"The overall opacity of the marker, if set, overrides both the opacity of both the fill and stroke","default-value":1,"default-meaning":"The stroke-opacity and fill-opacity will be used",type:"float"},"fill-opacity":{css:"marker-fill-opacity",doc:"The fill opacity of the marker","default-value":1,"default-meaning":"opaque",type:"float"},stroke:{css:"marker-line-color",doc:"The color of the stroke around a marker shape.","default-value":"black",type:"color"},"stroke-width":{css:"marker-line-width",doc:"The width of the stroke around a marker shape, in pixels. This is positioned on the boundary, so high values can cover the area itself.",type:"float"},"stroke-opacity":{css:"marker-line-opacity","default-value":1,"default-meaning":"opaque",doc:"The opacity of a line",type:"float"},placement:{css:"marker-placement",type:["point","line","interior"],"default-value":"point","default-meaning":"Place markers at the center point (centroid) of the geometry",doc:"Attempt to place markers on a point, in the center of a polygon, or if markers-placement:line, then multiple times along a line. 'interior' placement can be used to ensure that points placed on polygons are forced to be inside the polygon interior"},"multi-policy":{css:"marker-multi-policy",type:["each","whole","largest"],"default-value":"each","default-meaning":"If a feature contains multiple geometries and the placement type is either point or interior then a marker will be rendered for each",doc:"A special setting to allow the user to control rendering behavior for 'multi-geometries' (when a feature contains multiple geometries). This setting does not apply to markers placed along lines. The 'each' policy is default and means all geometries will get a marker. The 'whole' policy means that the aggregate centroid between all geometries will be used. The 'largest' policy means that only the largest (by bounding box areas) feature will get a rendered marker (this is how text labeling behaves by default)."},"marker-type":{css:"marker-type",type:["arrow","ellipse"],"default-value":"ellipse",doc:"The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width)"},width:{css:"marker-width","default-value":10,doc:"The width of the marker, if using one of the default types.",type:"expression"},height:{css:"marker-height","default-value":10,doc:"The height of the marker, if using one of the default types.",type:"expression"},fill:{css:"marker-fill","default-value":"blue",doc:"The color of the area of the marker.",type:"color"},"allow-overlap":{css:"marker-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping markers are shown or hidden.","default-meaning":"Do not allow makers to overlap with each other - overlapping markers will not be shown."},"ignore-placement":{css:"marker-ignore-placement",type:"boolean","default-value":!1,"default-meaning":"do not store the bbox of this geometry in the collision detector cache",doc:"value to control whether the placement of the feature will prevent the placement of other features"},spacing:{css:"marker-spacing",doc:"Space between repeated labels","default-value":100,type:"float"},"max-error":{css:"marker-max-error",type:"float","default-value":.2,doc:"The maximum difference between actual marker placement and the marker-spacing parameter. Setting a high value can allow the renderer to try to resolve placement conflicts with other symbolizers."},transform:{css:"marker-transform",type:"functions",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]],"default-value":"","default-meaning":"No transformation",doc:"SVG transformation definition"},clip:{css:"marker-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"marker-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"marker-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"marker-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},shield:{name:{css:"shield-name",type:"expression",serialization:"content",doc:'Value to use for a shield"s text label. Data columns are specified using brackets like [column_name]'},file:{css:"shield-file",required:!0,type:"uri","default-value":"none",doc:"Image file to render behind the shield text"},"face-name":{css:"shield-face-name",type:"string",validate:"font",doc:"Font name and style to use for the shield text","default-value":"",required:!0},"unlock-image":{css:"shield-unlock-image",type:"boolean",doc:"This parameter should be set to true if you are trying to position text beside rather than on top of the shield image","default-value":!1,"default-meaning":"text alignment relative to the shield image uses the center of the image as the anchor for text positioning."},size:{css:"shield-size",type:"float",doc:"The size of the shield text in pixels"},fill:{css:"shield-fill",type:"color",doc:"The color of the shield text"},placement:{css:"shield-placement",type:["point","line","vertex","interior"],"default-value":"point",doc:"How this shield should be placed. Point placement attempts to place it on top of points, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of polygons."},"avoid-edges":{css:"shield-avoid-edges",doc:"Tell positioning algorithm to avoid labeling near intersection edges.",type:"boolean","default-value":!1},"allow-overlap":{css:"shield-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping shields are shown or hidden.","default-meaning":"Do not allow shields to overlap with other map elements already placed."},"minimum-distance":{css:"shield-min-distance",type:"float","default-value":0,doc:"Minimum distance to the next shield symbol, not necessarily the same shield."},spacing:{css:"shield-spacing",type:"float","default-value":0,doc:"The spacing between repeated occurrences of the same shield on a line"},"minimum-padding":{css:"shield-min-padding","default-value":0,doc:"Determines the minimum amount of padding that a shield gets relative to other shields",type:"float"},"wrap-width":{css:"shield-wrap-width",type:"unsigned","default-value":0,doc:"Length of a chunk of text in characters before wrapping text"},"wrap-before":{css:"shield-wrap-before",type:"boolean","default-value":!1,doc:"Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width."},"wrap-character":{css:"shield-wrap-character",type:"string","default-value":" ",doc:"Use this character instead of a space to wrap long names."},"halo-fill":{css:"shield-halo-fill",type:"color","default-value":"#FFFFFF","default-meaning":"white",doc:"Specifies the color of the halo around the text."},"halo-radius":{css:"shield-halo-radius",doc:"Specify the radius of the halo in pixels","default-value":0,"default-meaning":"no halo",type:"float"},"character-spacing":{css:"shield-character-spacing",type:"unsigned","default-value":0,doc:"Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement."},"line-spacing":{css:"shield-line-spacing",doc:"Vertical spacing between lines of multiline labels (in pixels)",type:"unsigned"},dx:{css:"shield-text-dx",type:"float",doc:"Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right","default-value":0},dy:{css:"shield-text-dy",type:"float",doc:"Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down","default-value":0},"shield-dx":{css:"shield-dx",type:"float",doc:"Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right","default-value":0},"shield-dy":{css:"shield-dy",type:"float",doc:"Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down","default-value":0},opacity:{css:"shield-opacity",type:"float",doc:"(Default 1.0) - opacity of the image used for the shield","default-value":1},"text-opacity":{css:"shield-text-opacity",type:"float",doc:"(Default 1.0) - opacity of the text placed on top of the shield","default-value":1},"horizontal-alignment":{css:"shield-horizontal-alignment",type:["left","middle","right","auto"],doc:"The shield's horizontal alignment from its centerpoint","default-value":"auto"},"vertical-alignment":{css:"shield-vertical-alignment",type:["top","middle","bottom","auto"],doc:"The shield's vertical alignment from its centerpoint","default-value":"middle"},"text-transform":{css:"shield-text-transform",type:["none","uppercase","lowercase","capitalize"],doc:"Transform the case of the characters","default-value":"none"},"justify-alignment":{css:"shield-justify-alignment",type:["left","center","right","auto"],doc:"Define how text in a shield's label is justified","default-value":"auto"},clip:{css:"shield-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},"comp-op":{css:"shield-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},"line-pattern":{file:{css:"line-pattern-file",type:"uri","default-value":"none",required:!0,doc:"An image file to be repeated and warped along a line"},clip:{css:"line-pattern-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"line-pattern-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"line-pattern-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"line-pattern-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},"polygon-pattern":{file:{css:"polygon-pattern-file",type:"uri","default-value":"none",required:!0,doc:"Image to use as a repeated pattern fill within a polygon"},alignment:{css:"polygon-pattern-alignment",type:["local","global"],"default-value":"local",doc:"Specify whether to align pattern fills to the layer or to the map."},gamma:{css:"polygon-pattern-gamma",type:"float","default-value":1,"default-meaning":"fully antialiased",range:"0-1",doc:"Level of antialiasing of polygon pattern edges"},opacity:{css:"polygon-pattern-opacity",type:"float",doc:"(Default 1.0) - Apply an opacity level to the image used for the pattern","default-value":1,"default-meaning":"The image is rendered without modifications"},clip:{css:"polygon-pattern-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"polygon-pattern-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"polygon-pattern-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"polygon-pattern-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},raster:{opacity:{css:"raster-opacity","default-value":1,"default-meaning":"opaque",type:"float",doc:"The opacity of the raster symbolizer on top of other symbolizers."},"filter-factor":{css:"raster-filter-factor","default-value":-1,"default-meaning":"Allow the datasource to choose appropriate downscaling.",type:"float",doc:"This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed."},scaling:{css:"raster-scaling",type:["near","fast","bilinear","bilinear8","bicubic","spline16","spline36","hanning","hamming","hermite","kaiser","quadric","catrom","gaussian","bessel","mitchell","sinc","lanczos","blackman"],"default-value":"near",doc:"The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality."},"mesh-size":{css:"raster-mesh-size","default-value":16,"default-meaning":"Reprojection mesh will be 1/16 of the resolution of the source image",type:"unsigned",doc:"A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion."},"comp-op":{css:"raster-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},point:{file:{css:"point-file",type:"uri",required:!1,"default-value":"none",doc:"Image file to represent a point"},"allow-overlap":{css:"point-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping points are shown or hidden.","default-meaning":"Do not allow points to overlap with each other - overlapping markers will not be shown."},"ignore-placement":{css:"point-ignore-placement",type:"boolean","default-value":!1,"default-meaning":"do not store the bbox of this geometry in the collision detector cache",doc:"value to control whether the placement of the feature will prevent the placement of other features"},opacity:{css:"point-opacity",type:"float","default-value":1,"default-meaning":"Fully opaque",doc:"A value from 0 to 1 to control the opacity of the point"},placement:{css:"point-placement",type:["centroid","interior"],doc:"How this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon.","default-value":"centroid"},transform:{css:"point-transform",type:"functions",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]],"default-value":"","default-meaning":"No transformation",doc:"SVG transformation definition"},"comp-op":{css:"point-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},text:{name:{css:"text-name",type:"expression",required:!0,"default-value":"",serialization:"content",doc:"Value to use for a text label. Data columns are specified using brackets like [column_name]"},"face-name":{css:"text-face-name",type:"string",validate:"font",doc:"Font name and style to render a label in",required:!0},size:{css:"text-size",type:"float","default-value":10,doc:"Text size in pixels"},"text-ratio":{css:"text-ratio",doc:"Define the amount of text (of the total) present on successive lines when wrapping occurs","default-value":0,type:"unsigned"},"wrap-width":{css:"text-wrap-width",doc:"Length of a chunk of text in characters before wrapping text","default-value":0,type:"unsigned"},"wrap-before":{css:"text-wrap-before",type:"boolean","default-value":!1,doc:"Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width."},"wrap-character":{css:"text-wrap-character",type:"string","default-value":" ",doc:"Use this character instead of a space to wrap long text."},spacing:{css:"text-spacing",type:"unsigned",doc:"Distance between repeated text labels on a line (aka. label-spacing)"},"character-spacing":{css:"text-character-spacing",type:"float","default-value":0,doc:"Horizontal spacing adjustment between characters in pixels"},"line-spacing":{css:"text-line-spacing","default-value":0,type:"unsigned",doc:"Vertical spacing adjustment between lines in pixels"},"label-position-tolerance":{css:"text-label-position-tolerance","default-value":0,type:"unsigned",doc:"Allows the label to be displaced from its ideal position by a number of pixels (only works with placement:line)"},"max-char-angle-delta":{css:"text-max-char-angle-delta",type:"float","default-value":"22.5",doc:"The maximum angle change, in degrees, allowed between adjacent characters in a label. This value internally is converted to radians to the default is 22.5*math.pi/180.0. The higher the value the fewer labels will be placed around around sharp corners."},fill:{css:"text-fill",doc:"Specifies the color for the text","default-value":"#000000",type:"color"},opacity:{css:"text-opacity",doc:"A number from 0 to 1 specifying the opacity for the text","default-value":1,"default-meaning":"Fully opaque",type:"float"},"halo-fill":{css:"text-halo-fill",type:"color","default-value":"#FFFFFF","default-meaning":"white",doc:"Specifies the color of the halo around the text."},"halo-radius":{css:"text-halo-radius",doc:"Specify the radius of the halo in pixels","default-value":0,"default-meaning":"no halo",type:"float"},dx:{css:"text-dx",type:"float",doc:"Displace text by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right","default-value":0},dy:{css:"text-dy",type:"float",doc:"Displace text by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down","default-value":0},"vertical-alignment":{css:"text-vertical-alignment",type:["top","middle","bottom","auto"],doc:"Position of label relative to point position.","default-value":"auto","default-meaning":'Default affected by value of dy; "bottom" for dy>0, "top" for dy<0.'},"avoid-edges":{css:"text-avoid-edges",doc:"Tell positioning algorithm to avoid labeling near intersection edges.","default-value":!1,type:"boolean"},"minimum-distance":{css:"text-min-distance",doc:"Minimum permitted distance to the next text symbolizer.",type:"float"},"minimum-padding":{css:"text-min-padding",doc:"Determines the minimum amount of padding that a text symbolizer gets relative to other text",type:"float"},"minimum-path-length":{css:"text-min-path-length",type:"float","default-value":0,"default-meaning":"place labels on all paths",doc:"Place labels only on paths longer than this value."},"allow-overlap":{css:"text-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping text is shown or hidden.","default-meaning":"Do not allow text to overlap with other text - overlapping markers will not be shown."},orientation:{css:"text-orientation",type:"expression",doc:"Rotate the text."},placement:{css:"text-placement",type:["point","line","vertex","interior"],"default-value":"point",doc:"Control the style of placement of a point versus the geometry it is attached to."},"placement-type":{css:"text-placement-type",doc:'Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off.',type:["dummy","simple"],"default-value":"dummy"},placements:{css:"text-placements",type:"string","default-value":"",doc:'If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is `text-placements: "E,NE,SE,W,NW,SW";` '},"text-transform":{css:"text-transform",type:["none","uppercase","lowercase","capitalize"],doc:"Transform the case of the characters","default-value":"none"},"horizontal-alignment":{css:"text-horizontal-alignment",type:["left","middle","right","auto"],doc:"The text's horizontal alignment from its centerpoint","default-value":"auto"},"justify-alignment":{css:"text-align",type:["left","right","center","auto"],doc:"Define how text is justified","default-value":"auto","default-meaning":"Auto alignment means that text will be centered by default except when using the `placement-type` parameter - in that case either right or left justification will be used automatically depending on where the text could be fit given the `text-placements` directives"},clip:{css:"text-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},"comp-op":{css:"text-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},building:{fill:{css:"building-fill","default-value":"#FFFFFF",doc:"The color of the buildings walls.",type:"color"},"fill-opacity":{css:"building-fill-opacity",type:"float",doc:"The opacity of the building as a whole, including all walls.","default-value":1},height:{css:"building-height",doc:"The height of the building in pixels.",type:"expression","default-value":"0"}}},colors:{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],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],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],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],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],transparent:[0,0,0,0]},filter:{value:["true","false","null","point","linestring","polygon","collection"]}},cC.mapnik_reference={version:{latest:e._mapnik_reference_latest,"2.1.1":e._mapnik_reference_latest}},e.CartoCSS=cC,e.CartoCSS.Tree={},e.CartoCSS.Tree.operate=function(e,t,r){switch(e){case"+":return t+r;case"-":return t-r;case"*":return t*r;case"%":return t%r;case"/":return t/r}},e.CartoCSS.Tree.functions={rgb:function(e,t,r){return this.rgba(e,t,r,1)},rgba:function(t,r,n,o){var i=this,a=[t,r,n].map(function(e){return i.number(e)});return o=i.number(o),a.some(isNaN)||isNaN(o)?null:new e.CartoCSS.Tree.Color(a,o)},stop:function(e){var t,r;return arguments.length>1&&(t=arguments[1]),arguments.length>2&&(r=arguments[2]),{is:"tag",val:e,color:t,mode:r,toString:function(n){return'\n\t"}}},hsl:function(e,t,r){return this.hsla(e,t,r,1)},hsla:function(e,t,r,n){if([e=this.number(e)%360/360,t=this.number(t),r=this.number(r),n=this.number(n)].some(isNaN))return null;var o=r<=.5?r*(t+1):r+t-r*t,i=2*r-o;return this.rgba(255*a(e+1/3),255*a(e),255*a(e-1/3),n);function a(e){return 6*(e=e<0?e+1:e>1?e-1:e)<1?i+(o-i)*e*6:2*e<1?o:3*e<2?i+(o-i)*(2/3-e)*6:i}},hue:function(t){return"toHSL"in t?new e.CartoCSS.Tree.Dimension(Math.round(t.toHSL().h)):null},saturation:function(t){return"toHSL"in t?new e.CartoCSS.Tree.Dimension(Math.round(100*t.toHSL().s),"%"):null},lightness:function(t){return"toHSL"in t?new e.CartoCSS.Tree.Dimension(Math.round(100*t.toHSL().l),"%"):null},alpha:function(t){return"toHSL"in t?new e.CartoCSS.Tree.Dimension(t.toHSL().a):null},saturate:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.s+=t.value/100,r.s=this.clamp(r.s),this.hsla_simple(r)},desaturate:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.s-=t.value/100,r.s=this.clamp(r.s),this.hsla_simple(r)},lighten:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.l+=t.value/100,r.l=this.clamp(r.l),this.hsla_simple(r)},darken:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.l-=t.value/100,r.l=this.clamp(r.l),this.hsla_simple(r)},fadein:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.a+=t.value/100,r.a=this.clamp(r.a),this.hsla_simple(r)},fadeout:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.a-=t.value/100,r.a=this.clamp(r.a),this.hsla_simple(r)},spin:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL(),n=(r.h+t.value)%360;return r.h=n<0?360+n:n,this.hsla_simple(r)},replace:function(e,t,r){return"field"===e.is?e.toString+".replace("+t.toString()+", "+r.toString()+")":e.replace(t,r)},mix:function(t,r,n){var o=n.value/100,i=2*o-1,a=t.toHSL().a-r.toHSL().a,s=((i*a==-1?i:(i+a)/(1+i*a))+1)/2,l=1-s,u=[t.rgb[0]*s+r.rgb[0]*l,t.rgb[1]*s+r.rgb[1]*l,t.rgb[2]*s+r.rgb[2]*l],c=t.alpha*o+r.alpha*(1-o);return new e.CartoCSS.Tree.Color(u,c)},greyscale:function(t){return this.desaturate(t,new e.CartoCSS.Tree.Dimension(100))},"%":function(t){for(var r=Array.prototype.slice.call(arguments,1),n=t.value,o=0;o.5?u/(2-a-s):u/(a+s),a){case r:e=(n-o)/u+(n=0){if(!e.ppi)return e.error({message:"ppi is not set, so metric units can't be used",index:this.index}),{is:"undefined",value:"undefined"};this.value=this.value/this.densities[this.unit]*e.ppi,this.unit="px"}return this}},{key:"toColor",value:function(){return new e.CartoCSS.Tree.Color([this.value,this.value,this.value])}},{key:"round",value:function(){return this.value=Math.round(this.value),this}},{key:"toString",value:function(){return this.value.toString()}},{key:"operate",value:function(t,r,n){return"%"===this.unit&&"%"!==n.unit?(t.error({message:"If two operands differ, the first must not be %",index:this.index}),{is:"undefined",value:"undefined"}):"%"!==this.unit&&"%"===n.unit?"*"===r||"/"===r||"%"===r?(t.error({message:"Percent values can only be added or subtracted from other values",index:this.index}),{is:"undefined",value:"undefined"}):new e.CartoCSS.Tree.Dimension(e.CartoCSS.Tree.operate(r,this.value,this.value*n.value*.01),this.unit):new e.CartoCSS.Tree.Dimension(e.CartoCSS.Tree.operate(r,this.value,n.value),this.unit||n.unit)}}]),t}(),e.CartoCSS.Tree.Element=function(){function e(t){sC(this,e),this.value=t.trim(),"#"===this.value[0]&&(this.type="id",this.clean=this.value.replace(/^#/,"")),"."===this.value[0]&&(this.type="class",this.clean=this.value.replace(/^\./,"")),-1!==this.value.indexOf("*")&&(this.type="wildcard")}return uC(e,[{key:"specificity",value:function(){return["id"===this.type?1:0,"class"===this.type?1:0]}},{key:"toString",value:function(){return this.value}}]),e}(),e.CartoCSS.Tree.Expression=function(){function t(e){sC(this,t),this.is="expression",this.value=e}return uC(t,[{key:"ev",value:function(t){return this.value.length>1?new e.CartoCSS.Tree.Expression(this.value.map(function(e){return e.ev(t)})):this.value[0].ev(t)}},{key:"toString",value:function(e){return this.value.map(function(t){return t.toString(e)}).join(" ")}}]),t}(),e.CartoCSS.Tree.Field=function(){function e(t){sC(this,e),this.is="field",this.value=t||""}return uC(e,[{key:"toString",value:function(){return'["'+this.value.toUpperCase()+'"]'}},{key:"ev",value:function(){return this}}]),e}(),e.CartoCSS.Tree.Filter=function(){function e(t,r,n,o,i){sC(this,e),this.ops={"<":[" < ","numeric"],">":[" > ","numeric"],"=":[" = ","both"],"!=":[" != ","both"],"<=":[" <= ","numeric"],">=":[" >= ","numeric"],"=~":[".match(","string",")"]},this.key=t,this.op=r,this.val=n,this.index=o,this.filename=i,this.id=this.key+this.op+this.val}return uC(e,[{key:"ev",value:function(e){return this.key=this.key.ev(e),this.val=this.val.ev(e),this}},{key:"toString",value:function(){return"["+this.id+"]"}}]),e}(),e.CartoCSS.Tree.Filterset=function(){function t(){sC(this,t),this.filters={}}return uC(t,[{key:"toJS",value:function(e){function t(e){var t=e.op;"="===t&&(t="==");var r=e.val;void 0!==e._val&&(r=e._val.toString(!0)),e.key&&"scale"===e.key.value?r=+r:"string"!=typeof r&&"object"!==aC(r)||(r="'"+r+"'");var n="attributes";return n+"&&"+n+e.key+"&&"+n+e.key+" "+t+r}var r=[];for(var n in this.filters)r.push(t(this.filters[n]));return r.join(" && ")}},{key:"toString",value:function(){var e=[];for(var t in this.filters)e.push(this.filters[t].id);return e.sort().join("\t")}},{key:"ev",value:function(e){for(var t in this.filters)this.filters[t].ev(e);return this}},{key:"clone",value:function(){var t=new e.CartoCSS.Tree.Filterset;for(var r in this.filters)t.filters[r]=this.filters[r];return t}},{key:"cloneWith",value:function(t){var r=[];for(var n in t.filters){var o=this.addable(t.filters[n]);if(!1===o)return!1;!0===o&&r.push(t.filters[n])}if(!r.length)return null;var i=new e.CartoCSS.Tree.Filterset;for(n in this.filters)i.filters[n]=this.filters[n];for(;n=r.shift();)i.add(n);return i}},{key:"addable",value:function(e){var t=e.key.toString(),r=e.val.toString();switch(r.match(/^[0-9]+(\.[0-9]*)?_match/)&&(r=parseFloat(r)),e.op){case"=":return void 0!==this.filters[t+"="]?this.filters[t+"="].val.toString()==r&&null:void 0===this.filters[t+"!="+r]&&(!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=r)&&(!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>r)&&!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val"]&&this.filters[t+">"].val>=r?null:void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r?null:void 0!==this.filters[t+">="]&&this.filters[t+">="].val>r?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val":return t+"="in this.filters?!(this.filters[t+"="].val<=r)&&null:!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r)&&(!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<=r)&&(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=r?null:!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>r)||null));case">=":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val"]&&this.filters[t+">"].val>=r?null:!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>=r)||null));case"<":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val>=r)&&null:!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=r)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>=r)&&(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].valr)&&null:!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=r)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>r)&&(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<=r)||null))}}},{key:"conflict",value:function(e){var t=e.key.toString(),r=e.val.toString();return isNaN(parseFloat(r))||(r=parseFloat(r)),("="===e.op&&void 0!==this.filters[t+"="]&&r!=this.filters[t+"="].val.toString()||"!="===e.op&&void 0!==this.filters[t+"="]&&r==this.filters[t+"="].val.toString()||"="===e.op&&void 0!==this.filters[t+"!="]&&r===this.filters[t+"!="].val.toString())&&e.toString()+" added to "+this.toString()+" produces an invalid filter"}},{key:"add",value:function(e,t){var r,n=e.key.toString(),o=e.op,i=this.conflict(e);if(i)return i;if("="===o){for(var a in this.filters)this.filters[a].key===n&&delete this.filters[a];this.filters[n+"="]=e}else if("!="===o)this.filters[n+"!="+e.val]=e;else if("=~"===o)this.filters[n+"=~"+e.val]=e;else if(">"===o){for(var s in this.filters)this.filters[s].key===n&&this.filters[s].val<=e.val&&delete this.filters[s];this.filters[n+">"]=e}else if(">="===o){for(var l in this.filters)r=+this.filters[l].val.toString(),this.filters[l].key===n&&r",this.filters[n+">"]=e):this.filters[n+">="]=e}else if("<"===o){for(var u in this.filters)r=+this.filters[u].val.toString(),this.filters[u].key===n&&r>=e.val&&delete this.filters[u];this.filters[n+"<"]=e}else if("<="===o){for(var c in this.filters)r=+this.filters[c].val.toString(),this.filters[c].key===n&&r>e.val&&delete this.filters[c];void 0!==this.filters[n+"!="+e.val]?(delete this.filters[n+"!="+e.val],e.op="<",this.filters[n+"<"]=e):this.filters[n+"<="]=e}}}]),t}(),e.CartoCSS.Tree.Fontset=function e(t,r){sC(this,e),this.fonts=r,this.name="fontset-"+t.effects.length},e.CartoCSS.Tree.Invalid=function(){function e(t,r,n){sC(this,e),this.is="invalid",this.chunk=t,this.index=r,this.type="syntax",this.message=n||"Invalid code: "+this.chunk}return uC(e,[{key:"ev",value:function(e){return e.error({chunk:this.chunk,index:this.index,type:"syntax",message:this.message||"Invalid code: "+this.chunk}),{is:"undefined"}}}]),e}(),e.CartoCSS.Tree.Keyword=function(){function e(t){sC(this,e),this.value=t;var r={transparent:"color",true:"boolean",false:"boolean"};this.is=r[t]?r[t]:"keyword"}return uC(e,[{key:"ev",value:function(){return this}},{key:"toString",value:function(){return this.value}}]),e}(),e.CartoCSS.Tree.Literal=function(){function e(t){sC(this,e),this.value=t||"",this.is="field"}return uC(e,[{key:"toString",value:function(){return this.value}},{key:"ev",value:function(){return this}}]),e}(),e.CartoCSS.Tree.Operation=function(){function t(e,r,n){sC(this,t),this.is="operation",this.op=e.trim(),this.operands=r,this.index=n}return uC(t,[{key:"ev",value:function(t){var r,n=this.operands[0].ev(t),o=this.operands[1].ev(t);return"undefined"===n.is||"undefined"===o.is?{is:"undefined",value:"undefined"}:(n instanceof e.CartoCSS.Tree.Dimension&&o instanceof e.CartoCSS.Tree.Color&&("*"===this.op||"+"===this.op?(r=o,o=n,n=r):t.error({name:"OperationError",message:"Can't substract or divide a color from a number",index:this.index})),n instanceof e.CartoCSS.Tree.Quoted&&o instanceof e.CartoCSS.Tree.Quoted&&"+"!==this.op?(t.error({message:"Can't subtract, divide, or multiply strings.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):n instanceof e.CartoCSS.Tree.Field||o instanceof e.CartoCSS.Tree.Field||n instanceof e.CartoCSS.Tree.Literal||o instanceof e.CartoCSS.Tree.Literal?"color"===n.is||"color"===o.is?(t.error({message:"Can't subtract, divide, or multiply colors in expressions.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):new e.CartoCSS.Tree.Literal(n.ev(t).toString(!0)+this.op+o.ev(t).toString(!0)):void 0===n.operate?(t.error({message:"Cannot do math with type "+n.is+".",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):n.operate(t,this.op,o))}}]),t}(),e.CartoCSS.Tree.Quoted=function(){function t(e){sC(this,t),this.is="string",this.value=e||""}return uC(t,[{key:"toString",value:function(e){var t=this.value.replace(/&/g,"&"),r=t.replace(/\'/g,"\\'").replace(/\"/g,""").replace(//g,">");return!0===e?"'"+r+"'":t}},{key:"ev",value:function(){return this}},{key:"operate",value:function(t,r,n){return new e.CartoCSS.Tree.Quoted(e.CartoCSS.Tree.operate(r,this.toString(),n.toString(this.contains_field)))}}]),t}(),e.CartoCSS.Tree.Reference={_validateValue:{font:function(e,t){return!e.validation_data||!e.validation_data.fonts||-1!=e.validation_data.fonts.indexOf(t)}},setData:function(e){this.data=e,this.selector_cache=function(e){var t={};for(var r in e.symbolizers)for(var n in e.symbolizers[r])e.symbolizers[r][n].hasOwnProperty("css")&&(t[e.symbolizers[r][n].css]=[e.symbolizers[r][n],r,n]);return t}(e),this.mapnikFunctions=function(e){var t={};for(var r in e.symbolizers)for(var n in e.symbolizers[r])if("functions"===e.symbolizers[r][n].type)for(var o=0;o1?Array.prototype.push.apply(n,o.find(new e.CartoCSS.Tree.Selector(null,null,t.elements.slice(1)),r)):n.push(o);break}}),this._lookups[o]=n)}},{key:"evZooms",value:function(t){for(var r=0;re.CartoCSS.Tree.Zoom.maxZoom||r<0)&&t.error({message:"Only zoom levels between 0 and "+e.CartoCSS.Tree.Zoom.maxZoom+" supported.",index:this.index}),this.op){case"=":return this.zoom="zoom && zoom === "+r,this;case">":this.zoom="zoom && zoom > "+r;break;case">=":this.zoom="zoom && zoom >= "+r;break;case"<":this.zoom="zoom && zoom < "+r;break;case"<=":this.zoom="zoom && zoom <= "+r}return this}},{key:"toString",value:function(){for(var t="",r=0;r<=e.CartoCSS.Tree.Zoom.maxZoom;r++)t+=this.zoom&1<3&&(t=Array.prototype.slice.call(t,1));for(var n=this._handlers[e],o=n.length,i=0;i4&&(t=Array.prototype.slice.call(t,1,t.length-1));for(var n=t[t.length-1],o=this._handlers[e],i=o.length,a=0;a-this.EPSILON&&ethis.EPSILON||e<-this.EPSILON}},{key:"cubicAt",value:function(e,t,r,n,o){var i=1-o;return i*i*(i*e+3*o*t)+o*o*(o*n+3*i*r)}},{key:"cubicDerivativeAt",value:function(e,t,r,n,o){var i=1-o;return 3*(((t-e)*i+2*(r-t)*o)*i+(n-r)*o*o)}},{key:"cubicRootAt",value:function(e,t,r,n,o,i){var a=n+3*(t-r)-e,s=3*(r-2*t+e),l=3*(t-e),u=e-o,c=s*s-3*a*l,f=s*l-9*a*u,h=l*l-3*s*u,p=0;if(this.isAroundZero(c)&&this.isAroundZero(f))if(this.isAroundZero(s))i[0]=0;else{var y=-l/s;y>=0&&y<=1&&(i[p++]=y)}else{var d=f*f-4*c*h;if(this.isAroundZero(d)){var v=f/c,m=-s/a+v,b=-v/2;m>=0&&m<=1&&(i[p++]=m),b>=0&&b<=1&&(i[p++]=b)}else if(d>0){var g=Math.sqrt(d),S=c*s+1.5*a*(-f+g),_=c*s+1.5*a*(-f-g),w=(-s-((S=S<0?-Math.pow(-S,this.ONE_THIRD):Math.pow(S,this.ONE_THIRD))+(_=_<0?-Math.pow(-_,this.ONE_THIRD):Math.pow(_,this.ONE_THIRD))))/(3*a);w>=0&&w<=1&&(i[p++]=w)}else{var O=(2*c*s-3*a*f)/(2*Math.sqrt(c*c*c)),x=Math.acos(O)/3,P=Math.sqrt(c),C=Math.cos(x),E=(-s-2*P*C)/(3*a),T=(-s+P*(C+this.THREE_SQRT*Math.sin(x)))/(3*a),R=(-s+P*(C-this.THREE_SQRT*Math.sin(x)))/(3*a);E>=0&&E<=1&&(i[p++]=E),T>=0&&T<=1&&(i[p++]=T),R>=0&&R<=1&&(i[p++]=R)}}return p}},{key:"cubicExtrema",value:function(e,t,r,n,o){var i=6*r-12*t+6*e,a=9*t+3*n-3*e-9*r,s=3*t-3*e,l=0;if(this.isAroundZero(a)){if(this.isNotAroundZero(i)){var u=-s/i;u>=0&&u<=1&&(o[l++]=u)}}else{var c=i*i-4*a*s;if(this.isAroundZero(c))o[0]=-i/(2*a);else if(c>0){var f=Math.sqrt(c),h=(-i+f)/(2*a),p=(-i-f)/(2*a);h>=0&&h<=1&&(o[l++]=h),p>=0&&p<=1&&(o[l++]=p)}}return l}},{key:"cubicSubdivide",value:function(e,t,r,n,o,i){var a=(t-e)*o+e,s=(r-t)*o+t,l=(n-r)*o+r,u=(s-a)*o+a,c=(l-s)*o+s,f=(c-u)*o+u;i[0]=e,i[1]=a,i[2]=u,i[3]=f,i[4]=f,i[5]=c,i[6]=l,i[7]=n}},{key:"cubicProjectPoint",value:function(e,t,r,n,o,i,a,s,l,u,c){var f,h=this.vector.create(),p=this.vector.create(),y=this.vector.create(),d=.005,v=1/0;h[0]=l,h[1]=u;for(var m=0;m<1;m+=.05){p[0]=this.cubicAt(e,r,o,a,m),p[1]=this.cubicAt(t,n,i,s,m);var b=this.vector.distSquare(h,p);b=0&&w=0&&u<=1&&(o[l++]=u)}}else{var c=a*a-4*i*s;if(this.isAroundZero(c)){var f=-a/(2*i);f>=0&&f<=1&&(o[l++]=f)}else if(c>0){var h=Math.sqrt(c),p=(-a+h)/(2*i),y=(-a-h)/(2*i);p>=0&&p<=1&&(o[l++]=p),y>=0&&y<=1&&(o[l++]=y)}}return l}},{key:"quadraticExtremum",value:function(e,t,r){var n=e+r-2*t;return 0===n?.5:(e-t)/n}},{key:"quadraticProjectPoint",value:function(e,t,r,n,o,i,a,s,l){var u,c=this.vector.create(),f=this.vector.create(),h=this.vector.create(),p=.005,y=1/0;c[0]=a,c[1]=s;for(var d=0;d<1;d+=.05){f[0]=this.quadraticAt(e,r,o,d),f[1]=this.quadraticAt(t,n,i,d);var v=this.vector.distSquare(c,f);v=0&&S0){for(var b=this.isInsidePolygon(t.pointList,v,m),g=e.holePolygonPointLists,S=!1,_=0,w=g.length;_t+s&&a>n+s||ae+s&&i>r+s||it+f&&c>n+f&&c>i+f&&c>s+f||ce+f&&u>r+f&&u>o+f&&u>a+f||ut+u&&l>n+u&&l>i+u||le+u&&s>r+u&&s>o+u||sr||f+c=u)return!0;if(i){var h=n;n=this.normalizeRadian(o),o=this.normalizeRadian(h)}else n=this.normalizeRadian(n),o=this.normalizeRadian(o);n>o&&(o+=u);var p=Math.atan2(l,s);return p<0&&(p+=u),p>=n&&p<=o||p+u>=n&&p+u<=o}},{key:"isInsideBrokenLine",value:function(e,t,r,n){for(var o=Math.max(t,10),i=0,a=e.length-1;ir*r}},{key:"isInsideRect",value:function(e,t,r,n,o,i){return o>=e&&o<=e+r&&i>=t&&i<=t+n}},{key:"isInsideCircle",value:function(e,t,r,n,o){return(n-e)*(n-e)+(o-t)*(o-t)t&&i>n||io?nt&&u>n&&u>i&&u>s||u1&&this.swapExtrema(),y=c.cubicAt(t,n,i,s,h[0]),m>1&&(d=c.cubicAt(t,n,i,s,h[1]))),2==m?gt&&s>n&&s>i||s=0&&f<=1){for(var h=0,p=l.quadraticAt(t,n,i,f),y=0;ya||(u[y]a?0:ir||s<-r)return 0;var c=Math.sqrt(r*r-s*s);if(l[0]=-c,l[1]=c,Math.abs(n-o)>=u){n=0,o=u;var f=i?1:-1;return a>=l[0]+e&&a<=l[1]+e?f:0}if(i){var h=n;n=this.normalizeRadian(o),o=this.normalizeRadian(h)}else n=this.normalizeRadian(n),o=this.normalizeRadian(o);n>o&&(o+=u);for(var p=0,y=0;y<2;y++){var d=l[y];if(d+e>a){var v=Math.atan2(s,d),m=i?1:-1;v<0&&(v=u+v),(v>=n&&v<=o||v+u>=n&&v+u<=o)&&(v>Math.PI/2&&v<1.5*Math.PI&&(m=-m),p+=m)}}return p}},{key:"isInsidePath",value:function(e,t,r,n,o){for(var i=0,a=0,s=0,l=0,u=0,c=!0,f=!0,h="stroke"===(r=r||"fill")||"both"===r,p="fill"===r||"both"===r,y=0;y0&&(p&&(i+=this.windingLine(a,s,l,u,n,o)),0!==i))return!0;l=v[v.length-2],u=v[v.length-1],c=!1,f&&"A"!==d.command&&(f=!1,a=l,s=u)}switch(d.command){case"M":a=v[0],s=v[1];break;case"L":if(h&&this.isInsideLine(a,s,v[0],v[1],t,n,o))return!0;p&&(i+=this.windingLine(a,s,v[0],v[1],n,o)),a=v[0],s=v[1];break;case"C":if(h&&this.isInsideCubicStroke(a,s,v[0],v[1],v[2],v[3],v[4],v[5],t,n,o))return!0;p&&(i+=this.windingCubic(a,s,v[0],v[1],v[2],v[3],v[4],v[5],n,o)),a=v[4],s=v[5];break;case"Q":if(h&&this.isInsideQuadraticStroke(a,s,v[0],v[1],v[2],v[3],t,n,o))return!0;p&&(i+=this.windingQuadratic(a,s,v[0],v[1],v[2],v[3],n,o)),a=v[2],s=v[3];break;case"A":var m=v[0],b=v[1],g=v[2],S=v[3],_=v[4],w=v[5],O=Math.cos(_)*g+m,x=Math.sin(_)*S+b;f?(f=!1,l=O,u=x):i+=this.windingLine(a,s,O,x);var P=(n-m)*S/g+m;if(h&&this.isInsideArcStroke(m,b,S,_,_+w,1-v[7],t,P,o))return!0;p&&(i+=this.windingArc(m,b,S,_,_+w,1-v[7],P,o)),a=Math.cos(_+w)*g+m,s=Math.sin(_+w)*S+b;break;case"z":if(h&&this.isInsideLine(a,s,l,u,t,n,o))return!0;c=!0}}return p&&(i+=this.windingLine(a,s,l,u,n,o)),0!==i}},{key:"getTextWidth",value:function(e,t){var r=e+":"+t;if(this._textWidthCache[r])return this._textWidthCache[r];this._ctx=this._ctx||this.util.getContext(),this._ctx.save(),t&&(this._ctx.font=t);for(var n=0,o=0,i=(e=(e+"").split("\n")).length;othis.TEXT_CACHE_MAX&&(this._textWidthCacheCounter=0,this._textWidthCache={}),n}},{key:"getTextHeight",value:function(e,t){var r=e+":"+t;if(this._textHeightCache[r])return this._textHeightCache[r];this._ctx=this._ctx||this.util.getContext(),this._ctx.save(),t&&(this._ctx.font=t),e=(e+"").split("\n");var n=(this._ctx.measureText("ZH").width+2)*e.length;return this._ctx.restore(),this._textHeightCache[r]=n,++this._textHeightCacheCounter>this.TEXT_CACHE_MAX&&(this._textHeightCacheCounter=0,this._textHeightCache={}),n}}])&&wE(t.prototype,r),n&&wE(t,n),e}();function xE(e,t){for(var r=0;ro&&(o=l[0]),l[1]a&&(a=l[1])}t[0]=n,t[1]=i,r[0]=o,r[1]=a}}},{key:"cubeBezier",value:function(e,t,r,n,o,i){var a=new _E,s=[];a.cubicExtrema(e[0],t[0],r[0],n[0],s);for(var l=0;lo&&!i?o+=2*Math.PI:nn&&(f[0]=Math.cos(p)*r+e,f[1]=Math.sin(p)*r+t,l.min(a,f,a),l.max(s,f,s))}}])&&xE(t.prototype,r),n&&xE(t,n),e}();function CE(e,t){for(var r=0;r=200&&o.status<300||304===o.status?t&&t(o.responseText):r&&r(),o.onreadystatechange=new Function,o=null)},o.send(null)}}])&&ME(t.prototype,r),n&&ME(t,n),e}(); +/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. + * This program are made available under the terms of the Apache License, Version 2.0 + * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ +var jE=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)};function LE(e,t){for(var r=0;r1)for(var t in arguments)console.log(arguments[t])}}var t,r,n;return t=e,(r=[{key:"destory",value:function(){return!0}}])&&LE(t.prototype,r),n&&LE(t,n),e}();function IE(e,t){for(var r=0;ra-2?a-1:p+1][0]+i[0],t[p>a-2?a-1:p+1][1]+i[1]],b=[t[p>a-3?a-1:p+2][0]+i[0],t[p>a-3?a-1:p+2][1]+i[1]]);var g=y*y,S=y*g;s.push([_(d[0],v[0],m[0],b[0],y,g,S),_(d[1],v[1],m[1],b[1],y,g,S)])}return s;function _(e,t,r,n,o,i,a){var s=.5*(r-e),l=.5*(n-t);return(2*(t-r)+s+l)*a+(-3*(t-r)-2*s-l)*i+s*o+t}}},{key:"SUtil_dashedLineTo",value:function(e,t,r,n,o,i,a){var s=[5,5];if(i="number"!=typeof i?5:i,e.setLineDash)return s[0]=i,s[1]=i,a&&a instanceof Array?e.setLineDash(a):e.setLineDash(s),e.moveTo(t,r),void e.lineTo(n,o);var l=n-t,u=o-r,c=Math.floor(Math.sqrt(l*l+u*u)/i);l/=c,u/=c;for(var f=!0,h=0;h-5e-5&&e<5e-5}GE.Util_vector.sub(t,e,this.position),n(t[0])&&n(t[1])||(GE.Util_vector.normalize(t,t),r[2]=t[0]*this.scale[1],r[3]=t[1]*this.scale[1],r[0]=t[1]*this.scale[0],r[1]=-t[0]*this.scale[0],r[4]=this.position[0],r[5]=this.position[1],this.decomposeTransform())})}var t,r,n;return t=e,(r=[{key:"destroy",value:function(){this.position=null,this.rotation=null,this.scale=null,this.needLocalTransform=null,this.needTransform=null}},{key:"updateNeedTransform",value:function(){function e(e){return e>5e-5||e<-5e-5}this.needLocalTransform=e(this.rotation[0])||e(this.position[0])||e(this.position[1])||e(this.scale[0]-1)||e(this.scale[1]-1)}},{key:"updateTransform",value:function(){if(this.updateNeedTransform(),this.parent?this.needTransform=this.needLocalTransform||this.parent.needTransform:this.needTransform=this.needLocalTransform,this.needTransform){var e=[0,0],t=this.transform||GE.Util_matrix.create();if(GE.Util_matrix.identity(t),this.needLocalTransform){if(o(this.scale[0])||o(this.scale[1])){e[0]=-this.scale[2]||0,e[1]=-this.scale[3]||0;var r=o(e[0])||o(e[1]);r&&GE.Util_matrix.translate(t,t,e),GE.Util_matrix.scale(t,t,this.scale),r&&(e[0]=-e[0],e[1]=-e[1],GE.Util_matrix.translate(t,t,e))}if(this.rotation instanceof Array){if(0!==this.rotation[0]){e[0]=-this.rotation[1]||0,e[1]=-this.rotation[2]||0;var n=o(e[0])||o(e[1]);n&&GE.Util_matrix.translate(t,t,e),GE.Util_matrix.rotate(t,t,this.rotation[0]),n&&(e[0]=-e[0],e[1]=-e[1],GE.Util_matrix.translate(t,t,e))}}else 0!=+this.rotation&&GE.Util_matrix.rotate(t,t,this.rotation);(o(this.position[0])||o(this.position[1]))&&GE.Util_matrix.translate(t,t,this.position)}this.transform=t,this.parent&&this.parent.needTransform&&(this.needLocalTransform?GE.Util_matrix.mul(this.transform,this.parent.transform,this.transform):GE.Util_matrix.copy(this.transform,this.parent.transform))}function o(e){return e>5e-5||e<-5e-5}}},{key:"setTransform",value:function(e){if(this.needTransform){var t=this.transform;e.transform(t[0],t[1],t[2],t[3],t[4],t[5])}}},{key:"decomposeTransform",value:function(){if(this.transform){var e=this.transform,t=e[0]*e[0]+e[1]*e[1],r=this.position,n=this.scale,o=this.rotation;a(t-1)&&(t=Math.sqrt(t));var i=e[2]*e[2]+e[3]*e[3];a(i-1)&&(i=Math.sqrt(i)),r[0]=e[4],r[1]=e[5],n[0]=t,n[1]=i,n[2]=n[3]=0,o[0]=Math.atan2(-e[1]/i,e[0]/t),o[1]=o[2]=0}function a(e){return e>5e-5||e<-5e-5}}}])&&zE(t.prototype,r),n&&zE(t,n),e}();function HE(e){"@babel/helpers - typeof";return(HE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function JE(e,t){for(var r=0;r0&&(this.setCtxGlobalAlpha(e,"stroke",r),e.stroke()),this.setCtxGlobalAlpha(e,"reset",r);break;case"stroke":this.setCtxGlobalAlpha(e,"stroke",r),r.lineWidth>0&&e.stroke(),this.setCtxGlobalAlpha(e,"reset",r);break;default:this.setCtxGlobalAlpha(e,"fill",r),e.fill(),this.setCtxGlobalAlpha(e,"reset",r)}this.drawText(e,r,this.style),this.afterBrush(e)}},{key:"beforeBrush",value:function(e,t){var r=this.style;return this.brushTypeOnly&&(r.brushType=this.brushTypeOnly),t&&(r=this.getHighlightStyle(r,this.highlightStyle||{},this.brushTypeOnly)),"stroke"==this.brushTypeOnly&&(r.strokeColor=r.strokeColor||r.color),e.save(),this.doClip(e),this.setContext(e,r),this.setTransform(e),r}},{key:"afterBrush",value:function(e){e.restore()}},{key:"setContext",value:function(e,t){for(var r=[["color","fillStyle"],["strokeColor","strokeStyle"],["opacity","globalAlpha"],["lineCap","lineCap"],["lineJoin","lineJoin"],["miterLimit","miterLimit"],["lineWidth","lineWidth"],["shadowBlur","shadowBlur"],["shadowColor","shadowColor"],["shadowOffsetX","shadowOffsetX"],["shadowOffsetY","shadowOffsetY"]],n=0,o=r.length;n=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height&&GE.Util_area.isInside(this,this.style,e,t)}},{key:"drawText",value:function(e,t,r){if(void 0!==t.text&&!1!==t.text){var n=t.textColor||t.color||t.strokeColor;e.fillStyle=n;var o,i,s,l,u=10,c=t.textPosition||this.textPosition||"top",f=[];switch(f=this.refOriginalPosition&&2===this.refOriginalPosition.length?this.refOriginalPosition:[0,0],c){case"inside":case"top":case"bottom":case"left":case"right":if(this.getRect){var h=(r||t).__rect||this.getRect(r||t);switch(c){case"inside":s=h.x+h.width/2,l=h.y+h.height/2,o="center",i="middle","stroke"!=t.brushType&&n==t.color&&(e.fillStyle="#fff");break;case"left":s=h.x-u,l=h.y+h.height/2,o="end",i="middle";break;case"right":s=h.x+h.width+u,l=h.y+h.height/2,o="start",i="middle";break;case"top":s=h.x+h.width/2,l=h.y-u,o="center",i="bottom";break;case"bottom":s=h.x+h.width/2,l=h.y+h.height+u,o="center",i="top"}}break;case"start":case"end":var p=0,y=0,d=0,v=0;if(void 0!==t.pointList){var m=t.pointList;if(m.length<2)return;var b=m.length;switch(c){case"start":p=m[0][0]+f[0],y=m[1][0]+f[0],d=m[0][1]+f[1],v=m[1][1]+f[1];break;case"end":p=m[b-2][0]+f[0],y=m[b-1][0]+f[0],d=m[b-2][1]+f[1],v=m[b-1][1]+f[1]}}else p=t.xStart+f[0]||0,y=t.xEnd+f[0]||0,d=t.yStart+f[1]||0,v=t.yEnd+f[1]||0;switch(c){case"start":o=pn&&(n=l[0]),l[1]o&&(o=l[1]))}return e.__rect={x:t,y:r,width:n-t,height:o-r},e.__rect}},{key:"getRectNoRotation",value:function(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,r=this.refOriginalPosition,n=GE.Util_area.getTextHeight("ZH",e.textFont),o=GE.Util_area.getTextWidth(e.text,e.textFont),i=GE.Util_area.getTextHeight(e.text,e.textFont),a=e.x+r[0];"end"==e.textAlign||"right"==e.textAlign?a-=o:"center"==e.textAlign&&(a-=o/2),t="top"==e.textBaseline?e.y+r[1]:"bottom"==e.textBaseline?e.y+r[1]-i:e.y+r[1]-i/2;var s,l=!1;if(e.maxWidth){var u=parseInt(e.maxWidth);u-1&&(o+=!0===l?n/3*(o/s):n/3));return{x:a,y:t,width:o,height:i}}},{key:"getTextBackground",value:function(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition;if(!t&&e.__textBackground)return e.__textBackground;var n=this.getRectNoRotation(e),o=e.x+r[0],i=e.y+r[1],a=[];if(e.textRotation&&0!==e.textRotation){var s=e.textRotation,l=this.getRotatedLocation(n.x,n.y,o,i,s),u=this.getRotatedLocation(n.x+n.width,n.y,o,i,s),c=this.getRotatedLocation(n.x+n.width,n.y+n.height,o,i,s),f=this.getRotatedLocation(n.x,n.y+n.height,o,i,s);a.push(l),a.push(u),a.push(c),a.push(f)}else{var h=[n.x,n.y],p=[n.x+n.width,n.y],y=[n.x+n.width,n.y+n.height],d=[n.x,n.y+n.height];a.push(h),a.push(p),a.push(y),a.push(d)}return e.__textBackground=a,e.__textBackground}},{key:"getRotatedLocation",value:function(e,t,r,n,o){var i,a,s=new Array;return t=-t,n=-n,o=-o,i=(e-r)*Math.cos(o/180*Math.PI)-(t-n)*Math.sin(o/180*Math.PI)+r,a=(e-r)*Math.sin(o/180*Math.PI)+(t-n)*Math.cos(o/180*Math.PI)+n,s[0]=i,s[1]=-a,s}}])&&aT(t.prototype,r),n&&aT(t,n),i}();function hT(e){"@babel/helpers - typeof";return(hT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pT(e,t){for(var r=0;r0&&("stroke"==r.brushType||"both"==r.brushType)&&(n||(e.beginPath(),this.buildPath(e,r)),this.setCtxGlobalAlpha(e,"stroke",r),e.stroke(),this.setCtxGlobalAlpha(e,"reset",r)),this.drawText(e,r,this.style);var o=K.cloneObject(r);if(o.pointList&&this.holePolygonPointLists&&this.holePolygonPointLists.length>0)for(var i=this.holePolygonPointLists,a=i.length,s=0;s0&&("stroke"==o.brushType||"both"==o.brushType)?(n||(e.beginPath(),this.buildPath(e,o)),e.globalCompositeOperation="source-over",this.setCtxGlobalAlpha(e,"stroke",o),e.stroke(),this.setCtxGlobalAlpha(e,"reset",o)):e.globalCompositeOperation="source-over"}e.restore()}},{key:"buildPath",value:function(e,t){t.showShadow&&(e.shadowBlur=t.shadowBlur,e.shadowColor=t.shadowColor,e.shadowOffsetX=t.shadowOffsetX,e.shadowOffsetY=t.shadowOffsetY),this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition,n=t.pointList;if(!(n.length<2))if(t.smooth&&"spline"!==t.smooth){var o,i,a,s=GE.SUtil_smoothBezier(n,t.smooth,!0,t.smoothConstraint,r);e.moveTo(n[0][0]+r[0],n[0][1]+r[1]);for(var l=n.length,u=0;ui&&(i=l[u][0]+r[0]),l[u][1]+r[1]s&&(s=l[u][1]+r[1]);return n="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(o-n/2),y:Math.round(a-n/2),width:i-o+n,height:s-a+n},e.__rect}}])&&ST(t.prototype,r),n&&ST(t,n),i}();function CT(e){"@babel/helpers - typeof";return(CT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ET(e,t){for(var r=0;rc&&(r*=c/(a=r+n),n*=c/a),o+i>c&&(o*=c/(a=o+i),i*=c/a),n+o>f&&(n*=f/(a=n+o),o*=f/a),r+i>f&&(r*=f/(a=r+i),i*=f/a),e.moveTo(l+r,u),e.lineTo(l+c-n,u),0!==n&&e.quadraticCurveTo(l+c,u,l+c,u+n),e.lineTo(l+c,u+f-o),0!==o&&e.quadraticCurveTo(l+c,u+f,l+c-o,u+f),e.lineTo(l+i,u+f),0!==i&&e.quadraticCurveTo(l,u+f,l,u+f-i),e.lineTo(l,u+r),0!==r&&e.quadraticCurveTo(l,u,l+r,u)}},{key:"buildPath",value:function(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition;t.radius?this._buildRadiusPath(e,t):(e.moveTo(t.x+r[0],t.y+r[1]),e.lineTo(t.x+r[0]+t.width,t.y+r[1]),e.lineTo(t.x+r[0]+t.width,t.y+r[1]+t.height),e.lineTo(t.x+r[0],t.y+r[1]+t.height),e.lineTo(t.x+r[0],t.y+r[1])),e.closePath()}},{key:"getRect",value:function(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,r=this.refOriginalPosition;return e.__rect?e.__rect:(t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(e.x+r[0]-t/2),y:Math.round(e.y+r[1]-t/2),width:e.width+t,height:e.height+t},e.__rect)}}])&>(t.prototype,r),n&>(t,n),i}();function WT(e){"@babel/helpers - typeof";return(WT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function YT(e,t){for(var r=0;r1?GE.Util_computeBoundingBox.arc(a,s,l,c,f,!h,r,o):(r[0]=o[0]=a,r[1]=o[1]=s),GE.Util_computeBoundingBox.arc(a,s,u,c,f,!h,n,i),GE.Util_vector.min(r,r,n),GE.Util_vector.max(o,o,i),e.__rect={x:r[0],y:r[1],width:o[0]-r[0],height:o[1]-r[1]},e.__rect}}])&&YT(t.prototype,r),n&&YT(t,n),i}();function eR(e,t){for(var r=0;r=15){var h=parseInt(i.axis3DParameter),p=[o[0]-h,o[1]+h];i.axisUseArrow?(c.push([p[0]+1.5,p[1]-7.5]),c.push([p[0]-1,p[1]+1]),c.push([p[0]+7.5,p[1]-1.5]),f.push([p[0],p[1]])):f.push([p[0],p[1]]),f.push([o[0],o[1]])}f.push([o[2]+5,o[1]])}else{var y=Math.abs(o[1]-o[3])/u,d=o[3];f.push([o[0],d-5]);for(var v=0;v=15){var b=parseInt(i.axis3DParameter),g=[o[0]-b,o[1]+b];i.axisUseArrow?(c.push([g[0]+1.5,g[1]-7.5]),c.push([g[0]-1,g[1]+1]),c.push([g[0]+7.5,g[1]-1.5]),f.push([g[0],g[1]])):f.push([g[0],g[1]]),f.push([o[0],o[1]])}f.push([o[2]+5,o[1]])}if(i.axisUseArrow){var S=[[o[2]+5,o[1]+4],[o[2]+13,o[1]],[o[2]+5,o[1]-4]],_=[[o[0]-4,o[3]-5],[o[0],o[3]-13],[o[0]+4,o[3]-5]],w=new LC(S);w.style={fillColor:"#008acd"},K.copyAttributesWithClip(w.style,i.axisStyle),s.push(e.createShape(w));var O=new LC(_);if(O.style={fillColor:"#008acd"},K.copyAttributesWithClip(O.style,i.axisStyle),s.push(e.createShape(O)),i.axis3DParameter&&!isNaN(i.axis3DParameter)&&i.axis3DParameter>=15){var x=new LC(c);x.style={fillColor:"#008acd"},K.copyAttributesWithClip(x.style,i.axisStyle),s.push(e.createShape(x))}}var P=new EC(f);P.style={strokeLinecap:"butt",strokeLineJoin:"round",strokeColor:"#008acd",strokeWidth:1},i.axisStyle&&K.copyAttributesWithClip(P.style,i.axisStyle),P.clickable=!1,P.hoverable=!1;var C=[e.createShape(P)],E=[];if(i.axisYLabels&&i.axisYLabels.length&&i.axisYLabels.length>0){var T=i.axisYLabels,R=T.length,k=[0,0];if(i.axisYLabelsOffset&&i.axisYLabelsOffset.length&&(k=i.axisYLabelsOffset),1==R){var M=new tE(o[0]-5+k[0],o[3]+k[1],T[0]);M.style={labelAlign:"right"},i.axisYLabelsStyle&&K.copyAttributesWithClip(M.style,i.axisYLabelsStyle),M.clickable=!1,M.hoverable=!1,E.push(e.createShape(M))}else for(var A=o[3],j=Math.abs(o[1]-o[3])/(R-1),L=0;L0){var D=i.axisXLabels,F=D.length,B=[0,0];if(i.axisXLabelsOffset&&i.axisXLabelsOffset.length&&(B=i.axisXLabelsOffset),n&&n.xPositions&&n.xPositions.length&&n.xPositions.length==F)for(var U=n.xPositions,G=0;G=0&&r[o]&&K.copyAttributesWithClip(a,r[o]),n&&n.length&&void 0!==i)for(var s=n,l=s.length,u=parseFloat(i),c=0;c=u[2]||u[1]<=u[3])&&(this.DVBOrigonPoint=[u[0],u[3]],this.DVBWidth=Math.abs(u[2]-u[0]),this.DVBHeight=Math.abs(u[1]-u[3]),this.DVBCenterPoint=[this.DVBOrigonPoint[0]+this.DVBWidth/2,this.DVBOrigonPoint[1]+this.DVBHeight/2],this.origonPointOffset=[this.DVBOrigonPoint[0]-a[0],this.DVBOrigonPoint[1]-a[1]],!0)}},{key:"resetLocation",value:function(e){e&&(this.lonlat=e);var t=this.getLocalXY(this.lonlat);t[0]+=this.XOffset,t[1]+=this.YOffset,this.location=t;var r=this.width,n=this.height,o=this.location;return this.chartBounds=new te(o[0]-r/2,o[1]+n/2,o[0]+r/2,o[1]-n/2),this.resetLinearGradient(),o}},{key:"resetLinearGradient",value:function(){}},{key:"shapesConvertToRelativeCoordinate",value:function(){for(var e=this.shapes,t=this.location,r=0,n=e.length;r=0?n.push(parseFloat(o[a].toString()).toFixed(r)):n.push(parseFloat(o[a].toString()))}catch(e){throw new Error("not a number")}return n.length===t.length&&n},e.Feature.Theme.Graph=cR;var mR=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yR(e,t)}(i,cR);var t,r,n,o=dR(i);function i(e,t,r,n,a){var s;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(s=o.call(this,e,t,r,n,a)).CLASS_NAME="SuperMap.Feature.Theme.Bar",s}return t=i,(r=[{key:"destroy",value:function(){pR(vR(i.prototype),"destroy",this).call(this)}},{key:"assembleShapes",value:function(){var e={showShadow:!0,shadowBlur:8,shadowColor:"rgba(100,100,100,0.8)",shadowOffsetX:2,shadowOffsetY:2},t=this.setting;if(t.barLinearGradient||(t.barLinearGradient=[["#00FF00","#00CD00"],["#00CCFF","#5E87A2"],["#00FF66","#669985"],["#CCFF00","#94A25E"],["#FF9900","#A2945E"]]),t.dataViewBoxParameter||(void 0===t.useAxis||t.useAxis?t.dataViewBoxParameter=[45,15,15,15]:t.dataViewBoxParameter=[5,5,5,5]),this.initBaseParameter()){var r=this.DVBCodomain;this.DVBUnitValue=(r[1]-r[0])/this.DVBHeight;var n=this.dataViewBox,o=this.dataValues;if(!(o.length<1)){for(var i=0,a=o.length;ir[1])return;var s=this.calculateXShapeInfo();if(s){var l=s.xPositions,u=s.width;(void 0===t.useBackground||t.useBackground)&&this.shapes.push(tR.Background(this.shapeFactory,this.chartBox,t)),(void 0===t.useAxis||t.useAxis)&&(this.shapes=this.shapes.concat(tR.GraphAxis(this.shapeFactory,n,t,s)));for(var c=0;c=t.length&&(r%=t.length);var l=t[r][0],u=t[r][1],c=(new ZP).getLinearGradient(a,0,s,0,[[0,l],[1,u]]);o.style.color=c}}}}])&&hR(t.prototype,r),n&&hR(t,n),i}();function bR(e){"@babel/helpers - typeof";return(bR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gR(e,t){for(var r=0;rt[1])return;var a=this.calculateXShapeInfo();if(a){var s=a.xPositions,l=a.width;(void 0===e.useBackground||e.useBackground)&&this.shapes.push(tR.Background(this.shapeFactory,this.chartBox,e)),(!e.axis3DParameter||isNaN(e.axis3DParameter)||e.axis3DParameter<15)&&(e.axis3DParameter=20),(void 0===e.useAxis||e.useAxis)&&(this.shapes=this.shapes.concat(tR.GraphAxis(this.shapeFactory,r,e,a)));for(var u=e.bar3DParameter&&!isNaN(e.bar3DParameter)?e.bar3DParameter:10,c=0;c=s[2]||s[1]<=s[3])&&(this.DVBOrigonPoint=[s[0],s[3]],this.DVBWidth=Math.abs(s[2]-s[0]),this.DVBHeight=Math.abs(s[1]-s[3]),this.DVBCenterPoint=[this.DVBOrigonPoint[0]+this.DVBWidth/2,this.DVBOrigonPoint[1]+this.DVBHeight/2],this.origonPointOffset=[this.DVBOrigonPoint[0]-o[0],this.DVBOrigonPoint[1]-o[1]],!0)}}])&&CR(t.prototype,r),n&&CR(t,n),i}();function AR(e){"@babel/helpers - typeof";return(AR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jR(e,t){for(var r=0;r0?this.DVBUnitValue=e.maxR/(o[1]-o[0]):this.DVBUnitValue=e.maxR;var i=this.DVBUnitValue,a=n[0]*i+e.minR;if(this.width=2*a,this.height=2*a,this.initBaseParameter()&&(!o||!(n[0]o[1]))){var s=this.DVBCenterPoint,l=new dE(s[0],s[1],a);l.style=tR.ShapeStyleTool(null,e.circleStyle,null,null,0),void 0!==e.fillColor?l.style.fillColor=e.fillColor:l.style.fillColor="#ff9277",l.highlightStyle=tR.ShapeStyleTool(null,e.circleHoverStyle),void 0!==e.circleHoverAble&&(l.hoverable=e.circleHoverAble),void 0!==e.circleClickAble&&(l.clickable=e.circleClickAble),l.refDataID=this.data.id,l.dataInfo={field:this.fields[0],r:a,value:n[0]},this.shapes.push(this.shapeFactory.createShape(l)),this.shapesConvertToRelativeCoordinate()}}}])&&jR(t.prototype,r),n&&jR(t,n),i}();function BR(e){"@babel/helpers - typeof";return(BR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function UR(e,t){for(var r=0;rr[1])return null;a=l[f],s=t[1]-(o[f]-r[0])/n;var p=new SC(a,s);p.style=tR.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,f,o[f]),p.highlightStyle=tR.ShapeStyleTool(null,e.pointHoverStyle),void 0!==e.pointHoverAble&&(p.hoverable=e.pointHoverAble),void 0!==e.pointClickAble&&(p.clickable=e.pointClickAble),p.refDataID=this.data.id,p.dataInfo={field:this.fields[f],value:o[f]},c.push(this.shapeFactory.createShape(p));var y=[a,s];u.push(y)}var d=new EC(u);d.style=tR.ShapeStyleTool({strokeColor:"#ee9900"},e.lineStyle),d.clickable=!1,d.hoverable=!1;var v=this.shapeFactory.createShape(d);this.shapes.push(v),this.shapes=this.shapes.concat(c),this.shapesConvertToRelativeCoordinate()}}}}},{key:"calculateXShapeInfo",value:function(){var e,t=this.dataViewBox,r=this.setting,n=this.dataValues.length;if(n<1)return null;var o=[],i=this.DVBWidth,a=0;if(r.xShapeBlank&&r.xShapeBlank.length&&2==r.xShapeBlank.length){var s=i-((e=r.xShapeBlank)[0]+e[1]);if(s<=n)return null;a=s/(n-1)}else e=[a=i/(n+1),a,a];for(var l=0,u=0;un[1])return;for(var i=0,a=0;a=360&&(c=359.9999999);var d=new YC(l[0],l[1],h,u,c);if(void 0===e.sectorStyleByFields){var v=p%t.length;d.style=tR.ShapeStyleTool(null,e.sectorStyle,t,null,v)}else d.style=tR.ShapeStyleTool(null,e.sectorStyle,e.sectorStyleByFields,e.sectorStyleByCodomain,p,r[p]);d.highlightStyle=tR.ShapeStyleTool(null,e.sectorHoverStyle),void 0!==e.sectorHoverAble&&(d.hoverable=e.sectorHoverAble),void 0!==e.sectorClickAble&&(d.clickable=e.sectorClickAble),d.refDataID=this.data.id,d.dataInfo={field:this.fields[p],value:r[p]},this.shapes.push(this.shapeFactory.createShape(d)),u=c}this.shapesConvertToRelativeCoordinate()}}}}])&&WR(t.prototype,r),n&&WR(t,n),i}();function $R(e){"@babel/helpers - typeof";return($R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ek(e,t){for(var r=0;rr[1])return null;a=l[u],s=t[1]-(o[u]-r[0])/n;var f=new SC(a,s);f.style=tR.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,u,o[u]),f.highlightStyle=tR.ShapeStyleTool(null,e.pointHoverStyle),void 0!==e.pointHoverAble&&(f.hoverable=e.pointHoverAble),void 0!==e.pointClickAble&&(f.clickable=e.pointClickAble),f.refDataID=this.data.id,f.dataInfo={field:this.fields[u],value:o[u]},this.shapes.push(this.shapeFactory.createShape(f))}this.shapesConvertToRelativeCoordinate()}}}},{key:"calculateXShapeInfo",value:function(){var e,t=this.dataViewBox,r=this.setting,n=this.dataValues.length;if(n<1)return null;var o=[],i=this.DVBWidth,a=0;if(r.xShapeBlank&&r.xShapeBlank.length&&2==r.xShapeBlank.length){var s=i-((e=r.xShapeBlank)[0]+e[1]);if(s<=n)return null;a=s/(n-1)}else e=[a=i/(n+1),a,a];for(var l=0,u=0;un[1])return;for(var i=0,a=0;a=0&&t.innerRingRadius0){var u=i[i.length-1];if(Math.abs(u[0]-n[0])<=a&&Math.abs(u[1]-n[1])<=a)continue}i.push(n)}if(i.length<2)return null;var c=new Object;(c=K.copyAttributesWithClip(c,this.style,["pointList"])).pointList=i;var f=new AT({style:c,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(f.highlightStyle=this.highlightStyle),f.refOriginalPosition=this.location,f.refDataID=this.data.id,f.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&K.copyAttributesWithClip(f,this.shapeOptions),this.shapes.push(f)}},{key:"multiPointToTF",value:function(e){for(var t=e.components,r=[],n=[],o=this.location,i=[],a=this.nodesClipPixel,s=0;s0){var u=i[i.length-1];if(Math.abs(u[0]-n[0])<=a&&Math.abs(u[1]-n[1])<=a)continue}i.push(n);var c=new Object;c.r=6,(c=K.copyAttributesWithClip(c,this.style)).x=n[0],c.y=n[1];var f=new oT({style:c,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(f.highlightStyle=this.highlightStyle),f.refOriginalPosition=o,f.refDataID=this.data.id,f.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&K.copyAttributesWithClip(f,this.shapeOptions),this.shapes.push(f)}}},{key:"multiLineStringToTF",value:function(e){for(var t=e.components,r=0;r0){var h=i[i.length-1];if(Math.abs(h[0]-n[0])<=l&&Math.abs(h[1]-n[1])<=l)continue}i.push(n)}}else{a=[];for(var p=0;p0){var y=a[a.length-1];if(Math.abs(y[0]-n[0])<=l&&Math.abs(y[1]-n[1])<=l)continue}a.push(n)}}a.length<2||s.push(a)}if(!(i.length<2)){var d={};(d=K.copyAttributesWithClip(d,this.style,["pointList"])).pointList=i;var v=new PT({style:d,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(v.highlightStyle=this.highlightStyle),v.refOriginalPosition=this.location,v.refDataID=this.data.id,v.isHoverByRefDataID=this.isMultiHover,s.length>0&&(v.holePolygonPointLists=s),this.shapeOptions&&K.copyAttributesWithClip(v,this.shapeOptions),this.shapes.push(v)}}},{key:"rectangleToTF",value:function(e){var t=this.location,r=new $(e.x,e.y),n=this.layer.map.getResolution(),o=this.getLocalXY(r),i=new Object;i.r=6,(i=K.copyAttributesWithClip(i,this.style)).x=o[0]-t[0],i.y=o[1]-t[1]-2*e.width/n,i.width=e.width/n,i.height=e.height/n;var a=new qT({style:i,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(a.highlightStyle=this.highlightStyle),a.refOriginalPosition=t,a.refDataID=this.data.id,a.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&K.copyAttributesWithClip(a,this.shapeOptions),this.shapes.push(a)}},{key:"geoTextToTF",value:function(e){var t=this.location,r=this.getLocalXY(e),n=new Object;n.r=6,(n=K.copyAttributesWithClip(n,this.style,["x","y","text"])).x=r[0]-t[0],n.y=r[1]-t[1],n.text=e.text;var o=new fT({style:n,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(o.highlightStyle=this.highlightStyle),o.refOriginalPosition=t,o.refDataID=this.data.id,o.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&K.copyAttributesWithClip(o,this.shapeOptions),this.shapes.push(o)}},{key:"updateAndAddShapes",value:function(){var e=this.getLocalXY(this.lonlat);this.location=e;for(var t=this.layer.renderer,r=0,n=this.shapes.length;r0}},{key:"addRoot",value:function(e){e instanceof Rk&&e.addChildrenToStorage(this),this.addToMap(e),this._roots.push(e)}},{key:"delRoot",value:function(e){if(void 0===e){for(var t=0;t=0&&(this.delFromMap(i.id),this._roots.splice(a,1),i instanceof Rk&&i.delChildrenFromStorage(this))}}},{key:"addToMap",value:function(e){return e instanceof Rk&&(e._storage=this),e.modSelf(),this._elements[e.id]=e,this}},{key:"get",value:function(e){return this._elements[e]}},{key:"delFromMap",value:function(e){var t=this._elements[e];return t&&(delete this._elements[e],t instanceof Rk&&(t._storage=null)),this}},{key:"dispose",value:function(){this._elements=null,this._roots=null,this._hoverElements=null}}])&&kk(t.prototype,r),n&&kk(t,n),e}();function Ak(e){"@babel/helpers - typeof";return(Ak="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jk(e,t){return(jk=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Lk(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,n=Nk(e);if(t){var o=Nk(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===Ak(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function Nk(e){return(Nk=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ik(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dk(e,t){for(var r=0;r0&&e>this._zlevelList[0]){for(o=0;oe);o++);n=this._layers[this._zlevelList[o]]}this._zlevelList.splice(o+1,0,e),t=new Uk(K.createUniqueID("_levelLayer_"+e),this);var i=n?n.dom:this._bgDom;i.nextSibling?i.parentNode.insertBefore(t.dom,i.nextSibling):i.parentNode.appendChild(t.dom),t.initContext(),this._layers[e]=t,this._layerConfig[e]&&(new XP).merge(t,this._layerConfig[e],!0),t.updateTransform()}return t}},{key:"getLayers",value:function(){return this._layers}},{key:"_updateLayerStatus",value:function(e){var t=this._layers,r={};for(var n in t)"hover"!==n&&(r[n]=t[n].elCount,t[n].elCount=0);for(var o=0;o0?1.1:1/1.1,r=this.painter.getLayers(),n=!1;for(var o in r)if("hover"!==o){var i=r[o],a=i.position;if(i.zoomable){i.__zoom=i.__zoom||1;var s=i.__zoom;s*=t,t=(s=Math.max(Math.min(i.maxZoom,s),i.minZoom))/i.__zoom,i.__zoom=s,a[0]-=(this._mouseX-a[0])*(t-1),a[1]-=(this._mouseY-a[1])*(t-1),i.scale[0]*=t,i.scale[1]*=t,i.dirty=!0,n=!0}}n&&this.painter.refresh(),this._dispatchAgency(this._lastHover,jE.EVENT.MOUSEWHEEL,e),this._mousemoveHandler(e)},mousemove:function(e){this._clickThreshold++,e=this._zrenderEventFixed(e),this._lastX=this._mouseX,this._lastY=this._mouseY,this._mouseX=GE.Util_event.getX(e),this._mouseY=GE.Util_event.getY(e);var t=this._mouseX-this._lastX,r=this._mouseY-this._lastY;this._processDragStart(e),this._hasfound=0,this._event=e,this._iterateAndFindHover(),this._hasfound||((!this._draggingTarget||this._lastHover&&this._lastHover!=this._draggingTarget)&&(this._processOutShape(e),this._processDragLeave(e)),this._lastHover=null,this.storage.delHover(),this.painter.clearHover());var n="";if(this._draggingTarget)this.storage.drift(this._draggingTarget.id,t,r),this._draggingTarget.modSelf(),this.storage.addHover(this._draggingTarget);else if(this._isMouseDown){var o=this.painter.getLayers(),i=!1;for(var a in o)if("hover"!==a){var s=o[a];s.panable&&(n="move",s.position[0]+=t,s.position[1]+=r,i=!0,s.dirty=!0)}i&&this.painter.refresh()}this._draggingTarget||this._hasfound&&this._lastHover.draggable?n="move":this._hasfound&&this._lastHover.clickable&&(n="pointer"),this.root.style.cursor=n,this._dispatchAgency(this._lastHover,jE.EVENT.MOUSEMOVE,e),(this._draggingTarget||this._hasfound||this.storage.hasHoverShape())&&this.painter.refreshHover()},mouseout:function(e){var t=(e=this._zrenderEventFixed(e)).toElement||e.relatedTarget;if(t!=this.root)for(;t&&9!=t.nodeType;){if(t==this.root)return void this._mousemoveHandler(e);t=t.parentNode}e.zrenderX=this._lastX,e.zrenderY=this._lastY,this.root.style.cursor="",this._isMouseDown=0,this._processOutShape(e),this._processDrop(e),this._processDragEnd(e),this.painter.refreshHover(),this.dispatch(jE.EVENT.GLOBALOUT,e)},mousedown:function(e){if(this._clickThreshold=0,2==this._lastDownButton)return this._lastDownButton=e.button,void(this._mouseDownTarget=null);this._lastMouseDownMoment=new Date,e=this._zrenderEventFixed(e),this._isMouseDown=1,this._mouseDownTarget=this._lastHover,this._dispatchAgency(this._lastHover,jE.EVENT.MOUSEDOWN,e),this._lastDownButton=e.button},mouseup:function(e){e=this._zrenderEventFixed(e),this.root.style.cursor="",this._isMouseDown=0,this._mouseDownTarget=null,this._dispatchAgency(this._lastHover,jE.EVENT.MOUSEUP,e),this._processDrop(e),this._processDragEnd(e)},touchstart:function(e){e=this._zrenderEventFixed(e,!0),this._lastTouchMoment=new Date,this._mobildFindFixed(e),this._mousedownHandler(e)},touchmove:function(e){e=this._zrenderEventFixed(e,!0),this._mousemoveHandler(e),this._isDragging&&GE.Util_event.stop(e)},touchend:function(e){e=this._zrenderEventFixed(e,!0),this._mouseupHandler(e);var t=new Date;t-this._lastTouchMoment=0;o--){var i=r[o];if(void 0!==i.zlevel&&(e=this.painter.getLayer(i.zlevel,e),n[0]=this._mouseX,n[1]=this._mouseY,e.needTransform&&(GE.Util_matrix.invert(t,e.transform),GE.Util_vector.applyTransform(n,n,t))),this._findHover(i,n[0],n[1]))break}}},{key:"_mobildFindFixed",value:function(e){var t=[{x:10},{x:-20},{x:10,y:10},{y:-20}];this._lastHover=null,this._mouseX=e.zrenderX,this._mouseY=e.zrenderY,this._event=e,this._iterateAndFindHover();for(var r=0;!this._lastHover&&r=0&&this._clips.splice(t,1)}},{key:"_update",value:function(){for(var e=(new Date).getTime(),t=e-this._time,r=this._clips,n=r.length,o=[],i=[],a=0;a=0&&!(d[S]<=a);S--);S=Math.min(S,u-2)}else{for(S=C;Sa);S++);S=Math.min(S-1,u-2)}C=S,E=a;var s=d[S+1]-d[S];if(0!==s){var c,y;for(_=(a-d[S])/s,i?(O=v[S],w=v[0===S?S:S-1],x=v[S>u-2?u-1:S+1],P=v[S>u-3?u-1:S+2],f?aM._catmullRomInterpolateArray(w,O,x,P,_,_*_,_*_*_,n(e,l),p):(c=h?aM.rgba2String(T):aM._catmullRomInterpolate(w,O,x,P,_,_*_,_*_*_),r(e,l,c))):f?aM._interpolateArray(v[S],v[S+1],_,n(e,l),p):(h?(aM._interpolateArray(v[S],v[S+1],_,T,1),y=aM.rgba2String(T)):y=aM._interpolateNumber(v[S],v[S+1],_),r(e,l,y)),S=0;S1&&void 0!==arguments[1]?arguments[1]:"warring";"success"===t?(this.icon.setAttribute("class","supermapol-icons-message-success"),this.messageBoxContainer.setAttribute("class","component-messageboxcontainer component-border-bottom-green")):"failure"===t?(this.icon.setAttribute("class","supermapol-icons-message-failure"),this.messageBoxContainer.setAttribute("class","component-messageboxcontainer component-border-bottom-red")):"warring"===t&&(this.icon.setAttribute("class","supermapol-icons-message-warning"),this.messageBoxContainer.setAttribute("class","component-messageboxcontainer component-border-bottom-orange")),this.messageBox.innerHTML=e,this.messageBoxContainer.hidden=!1}}])&&vM(t.prototype,r),n&&vM(t,n),e}();e.Components.MessageBox=mM;var bM=function(){try{return echarts}catch(e){return{}}}(),gM=r.n(bM),SM={code:null,defaultCode:"en-US",getCode:function(){return e.Lang.code||e.Lang.setCode(),e.Lang.code},setCode:function(){var t=this.getLanguageFromCookie();t?e.Lang.code=t:(t=e.Lang.defaultCode,0===(t="Netscape"===navigator.appName?navigator.language:navigator.browserLanguage).indexOf("zh")&&(t="zh-CN"),0===t.indexOf("en")&&(t="en-US"),e.Lang.code=t)},getLanguageFromCookie:function(){for(var e=document.cookie.split(";"),t=0;t0){var a=i.SheetNames[0],s=wM().utils.sheet_to_csv(i.Sheets[a]);t&&t.call(n,s)}}catch(e){r&&r.call(n,e)}},o.onerror=function(e){r&&r.call(n,e)},this.rABF&&o.readAsArrayBuffer(e.file)},processDataToGeoJson:function(e,t,r,n,o){var i=null;if("EXCEL"===e||"CSV"===e)i=this.processExcelDataToGeoJson(t),r&&r.call(o,i);else if("JSON"===e||"GEOJSON"===e){var a=t;"string"==typeof a&&(a=JSON.parse(a)),"ISERVER"===a.type?i=a.data.recordsets[0].features:"FeatureCollection"===a.type?i=a:n&&n.call(o,SM.i18n("msg_dataInWrongGeoJSONFormat")),r&&r.call(o,i)}else n&&n.call(o,SM.i18n("msg_dataInWrongFormat"))},processExcelDataToGeoJson:function(e){for(var t=this.string2Csv(e),r=t.colTitles,n=-1,o=-1,i=0,a=r.length;i0?(n.dataItemServices.forEach(function(n){if("RESTDATA"===n.serviceType&&"PUBLISHED"===n.serviceStatus)o=n;else{if("RESTMAP"!==n.serviceType||"PUBLISHED"!==n.serviceStatus)return void r.getDatafromContent(e,t);o=n}}),o&&r.getDatafromRest(o.serviceType,o.address,t)):r.getDatafromContent(e,t):r._fireFailedEvent(n)}).catch(function(e){console.log(e),r._fireFailedEvent(e)})}},{key:"getDatafromContent",value:function(e,t){var r=this,n={result:{}},o=this;e+="/content.json?pageSize=9999999¤tPage=1",Nr.get(e,null,{withCredentials:this.datasets.withCredentials}).then(function(e){return e.json()}).then(function(e){if(!1!==e.succeed){if(e.type){if("JSON"===e.type||"GEOJSON"===e.type){if(e.content=JSON.parse(e.content.trim()),!e.content.features)return void console.log(SM.i18n("msg_jsonResolveFiled"));var i=r._formatGeoJSON(e.content);n.result.features={type:e.content.type,features:i}}else if("EXCEL"===e.type||"CSV"===e.type){var a=r._excelData2Feature(e.content);n.result.features={type:"FeatureCollection",features:a}}t(n,"content")}}else o._fireFailedEvent(e)},this).catch(function(e){console.log(e),o._fireFailedEvent(e)})}},{key:"getDatafromRest",value:function(e,t,r){var n=this,o=this.datasets.withCredentials;if("RESTDATA"===e){var i,a,s="".concat(t,"/data/datasources");Nr.get(s,null,{withCredentials:o}).then(function(e){return e.json()}).then(function(e){i=e.datasourceNames[0],s="".concat(t,"/data/datasources/").concat(i,"/datasets"),Nr.get(s,null,{withCredentials:o}).then(function(e){return e.json()}).then(function(e){return a=e.datasetNames[0],n.getDatafromRestData("".concat(t,"/data"),[i+":"+a],r),[i+":"+a]}).catch(function(e){n._fireFailedEvent(e)})}).catch(function(e){n._fireFailedEvent(e)})}else{var l,u,c,f="".concat(t,"/maps");Nr.get(f,null,{withCredentials:o}).then(function(e){return e.json()}).then(function(e){l=e[0].name,c=e[0].path,f=f="".concat(t,"/maps/").concat(l,"/layers"),Nr.get(f,null,{withCredentials:o}).then(function(e){return e.json()}).then(function(e){return u=e[0].subLayers.layers[0].caption,n.getDatafromRestMap(u,c,r),u}).catch(function(e){n._fireFailedEvent(e)})}).catch(function(e){n._fireFailedEvent(e)})}}},{key:"getDatafromRestData",value:function(e,t,r){var n=this;this.datasets.queryInfo.attributeFilter=this.datasets.queryInfo.attributeFilter||"SmID>0",this._getFeatureBySQL(e,t,this.datasets.queryInfo,function(e){r(e,"RESTDATA")},function(e){console.log(e),n._fireFailedEvent(e)})}},{key:"getDatafromRestMap",value:function(e,t,r){var n=this;this.datasets.queryInfo.attributeFilter=this.datasets.queryInfo.attributeFilter||"smid=1",this._queryFeatureBySQL(t,e,this.datasets.queryInfo,null,null,function(e){r(e,"RESTMAP")},function(e){console.log(e),n._fireFailedEvent(e)})}},{key:"_getFeatureBySQL",value:function(e,t,r,n,o){var i,a,s={name:t.join().replace(":","@")};Object.assign(s,r),i=new jo(s),a=new cp({queryParameter:i,datasetNames:t,fromIndex:0,toIndex:1e5,returnContent:!0}),new mp(e,{eventListeners:{processCompleted:function(e){n&&n(e)},processFailed:function(e){o&&o(e)}}}).processAsync(a)}},{key:"_queryFeatureBySQL",value:function(e,t,r,n,o,a,s,l,u,c){var f,h,p={name:t};Object.assign(p,r),f=new jo(p),n&&(f.fields=n);var y={queryParams:[f]};c&&(y.queryOption=i.ATTRIBUTE),l&&(y.startRecord=l),u&&(y.expectCount=u),o&&(y.prjCoordSys={epsgCode:o}),h=new Pg(y),this._queryBySQL(e,h,function(e){"processCompleted"===e.type?a(e):s(e)})}},{key:"_queryBySQL",value:function(e,t,r,n){new Ag(e,{eventListeners:{scope:this,processCompleted:r,processFailed:r},format:this._processFormat(n)}).processAsync(t)}},{key:"_processFormat",value:function(e){return e||t.GEOJSON}},{key:"_formatGeoJSON",value:function(e){var t=e.features;return t.forEach(function(e,t){e.properties.index=t}),t}},{key:"_excelData2Feature",value:function(e){for(var t=e.colTitles,r=-1,n=-1,o=0,i=t.length;o=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function EM(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&e.forEach(function(e){e.xAxis&&t.xField.push({field:e.xAxis.field,name:e.xAxis.name}),e.yAxis&&t.yField.push({field:e.yAxis.field,name:e.yAxis.name})})}},{key:"getDatasetInfo",value:function(e){var t=this;this.createChart=e,this.datasets&&this._checkUrl(this.datasets.url)&&(this.chartModel=new PM(this.datasets),"iServer"===this.datasets.type?this.chartModel.getDatasetInfo(this._getDatasetInfoSuccess.bind(this)):"iPortal"===this.datasets.type&&this.chartModel.getDataInfoByIptl(this._getDataInfoSuccess.bind(this)),this.chartModel.events.on({getdatafailed:function(e){t.events.triggerEvent("getdatafailed",e)}}))}},{key:"_getDatasetInfoSuccess",value:function(e){var t=this.datasets.url,r=t.indexOf("rest");if(r>0){var n=t.indexOf("/",r+5),o=t.substring(r+5,n),i=t.substring(0,r+4)+"/data";if("maps"===o){var a=t.indexOf("/",n+1),s=t.substring(n+1,a);i=t.substring(0,r+4)+"/maps/"+s,e.result.dataUrl=i,this._getLayerFeatures(e)}else"data"===o&&(e.result.dataUrl=i,this._getDataFeatures(e))}}},{key:"_getDataInfoSuccess",value:function(e,t){"RESTMAP"===t?this._getChartDatasFromLayer(e):this._getChartDatas(e)}},{key:"_getDataFeatures",value:function(e){this.chartModel.getDataFeatures(e,this._getChartDatas.bind(this))}},{key:"_getLayerFeatures",value:function(e){this.chartModel.getLayerFeatures(e,this._getChartDatasFromLayer.bind(this))}},{key:"_getChartDatas",value:function(e){if(e){this.features=e.result.features;var t=this.features.features,r={};if(t.length){var n=t[0],o=[],i=[];for(var a in n.properties)o.push(a),i.push(this._getDataType(n.properties[a]));for(var s in r={features:t,fieldCaptions:o,fieldTypes:i,fieldValues:[]},i){var l=[];for(var u in t){var c=t[u],f=r.fieldCaptions[s],h=c.properties[f];l.push(h)}r.fieldValues.push(l)}this.createChart(r)}}}},{key:"_getChartDatasFromLayer",value:function(e){if(e.result.recordsets){var t=e.result.recordsets[0],r=t.features.features;this.features=t.features;var n={};if(r.length){for(var o in(n={features:t.features,fieldCaptions:t.fieldCaptions,fieldTypes:t.fieldTypes,fieldValues:[]}).fieldCaptions){var i=[];for(var a in r){var s=r[a],l=n.fieldCaptions[o],u=s.properties[l];i.push(u)}n.fieldValues.push(i)}this.createChart(n)}}}},{key:"_createChartOptions",value:function(e){return this.calculatedData=this._createChartDatas(e),this.updateChartOptions(this.chartType)}},{key:"changeType",value:function(e){if(e!==this.chartType)return this.chartType=e,this.updateChartOptions(this.chartType)}},{key:"updateData",value:function(e,t,r){this.updateChart=r,this.xField=[],this.yField=[],this._initXYField(t),e.type=e.type||"iServer",e.withCredentials=e.withCredentials||!1,this.datasets=e,this.getDatasetInfo(this._updateDataSuccess.bind(this))}},{key:"_updateDataSuccess",value:function(e){var t=this._createChartOptions(e);this.updateChart(t)}},{key:"updateChartOptions",value:function(e,t){if(this.calculatedData){var r=this.grid,n=this._createChartSeries(this.calculatedData,e),o=[];for(var i in this.calculatedData.XData)o.push({value:this.calculatedData.XData[i].fieldsData});var a={type:"category",name:this.xField[0].name||"X",data:o,nameTextStyle:{color:"#fff",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#eee"}}},s={type:"value",name:this.yFieldName||"Y",data:{},nameTextStyle:{color:"#fff",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#eee"}}},l={formatter:"{b0}: {c0}"},u="#404a59";return t&&(t.grid&&(r=t.grid),t.tooltip&&(l=t.tooltip),t.backgroundColor&&(u=t.backgroundColor)),{backgroundColor:u,grid:r,series:n,xAxis:a,yAxis:s,tooltip:l}}}},{key:"_createChartDatas",value:function(e){var t=0,r=[],n=e.fieldCaptions,o=this;n.forEach(function(e,r){o.xField[0]&&e===o.xField[0].field&&(t=r)}),this.yFieldName="",this.yField.forEach(function(e,t){0!==t&&(o.yFieldName=o.yFieldName+","),o.yFieldName=o.yFieldName+e.name,n.forEach(function(t,n){t===e.field&&r.push(n)})});var i=this._getAttrData(e,t),a=[];if(r.length>0)r.forEach(function(t){var r=[];for(var n in e.fieldValues[t])r.push({value:e.fieldValues[t][n]});a.push(r)});else{for(var s=[],l=[],u=i.length,c=0;c0;e--)this.header.removeChild(this.header.children[e]),this.content.removeChild(this.content.children[e])}},{key:"_changeTabsPage",value:function(e){for(var t=e.target.index,r=0;r0;t--)this.content.removeChild(this.content.children[t-1]);var r=this.config[e];for(var n in r)this._createCityItem(n,r[n])}},{key:"_createCityItem",value:function(e,t){var r=document.createElement("div"),n=document.createElement("div");n.setAttribute("class","component-citytabpag__py-key"),n.innerHTML=e,r.appendChild(n);var o=document.createElement("div");o.setAttribute("class","component-citytabpag__content");for(var i=0;i0&&this.appendTabs(e),this.rootContainer=t}},{key:"setTabs",value:function(e){this.removeAllTabs(),this.appendTabs(e)}},{key:"appendTabs",value:function(e){for(var t=0;t0;e--)this.navTabsTitle.removeChild(this.navTabsTitle.children[e]),this.navTabsContent.removeChild(this.navTabsContent.children[e])}},{key:"_changeTabsPage",value:function(e){for(var t=e.target.index,r=0;r=0;e--)this.content.removeChild(this.content.children[e])}},{key:"setPageLink",value:function(e){this.pageNumberLis=[],this.currentPageNumberLis=[],this.clearPageLink(),this._createPageLi(e),this._appendPageLink()}},{key:"_createPageLi",value:function(e){for(var t=0;t1;e--)this.link.removeChild(this.link.children[e])}},{key:"_createLink",value:function(e){for(var t=0;t<4;t++){var r=document.createElement("li");r.setAttribute("class","disable");var n=document.createElement("span");r.appendChild(n),0===t?(n.id="first",n.setAttribute("class","supermapol-icons-first")):1===t?(n.id="prev",n.setAttribute("class","supermapol-icons-prev")):2===t?(n.id="next",n.setAttribute("class","supermapol-icons-next")):3===t&&(n.id="last",n.setAttribute("class","supermapol-icons-last")),e.appendChild(r)}}},{key:"_changePageEvent",value:function(e){var t=e.target;if("disable"!==t.parentElement.classList[0]){var r;if(t.id)r=t.id;else{if(!Number(t.innerHTML))return;r=Number(t.innerHTML)}this._prePageNum(r),this.clearPageLink(),this._appendPageLink()}}},{key:"_changeDisableState",value:function(){this.link.children[0].setAttribute("class",""),this.link.children[1].setAttribute("class",""),this.link.children[this.link.children.length-1].setAttribute("class",""),this.link.children[this.link.children.length-2].setAttribute("class",""),1===this.currentPage&&(this.link.children[0].setAttribute("class","disable"),this.link.children[1].setAttribute("class","disable")),this.currentPage===this.pageNumberLis.length&&(this.link.children[this.link.children.length-1].setAttribute("class","disable"),this.link.children[this.link.children.length-2].setAttribute("class","disable"))}},{key:"_prePageNum",value:function(e){var t=[];if(this.currentPage="first"===e?1:"last"===e?this.pageNumberLis.length:"prev"===e?this.currentPage-1:"next"===e?this.currentPage+1:e,this.pageNumberLis.length<=5)for(var r=0;r=this.pageNumberLis.length-3)for(var o=this.pageNumberLis.length-5;o0&&(this.currentPageNumberLis=t)}}])&&RA(t.prototype,r),n&&RA(t,n),i}();e.Components.PaginationContainer=jA; +/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. + * This program are made available under the terms of the Apache License, Version 2.0 + * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ +var LA={getFileType:function(e){return/^.*\.(?:xls|xlsx)$/i.test(e)?hM.EXCEL:/^.*\.(?:csv)$/i.test(e)?hM.CSV:/^.*\.(?:geojson|json)$/i.test(e)?hM.GEOJSON:null}};e.Lang["en-US"]={title_dataFlowService:"Data Flow Service",title_distributedAnalysis:"Distributed Analysis",title_clientComputing:"Client Computing",title_dataServiceQuery:"Data Service Query",title_searchCity:"Search city",title_searchLayer:" Search layer",text_input_value_inputDataFlowUrl:"Please enter the data stream service address such as: ws://{serviceRoot}/{dataFlowName}/dataflow/subscribe",text_displayFeaturesInfo:"Display feature information",text_subscribe:"subscribe",text_cancelSubscribe:"unsubscribe",text_densityAnalysis:"Density Analysis",text_CalculateTheValuePerUnitArea:"Calculate the value per unit area within the neighborhood shape",text_option_selectDataset:"Please select a dataset",text_label_dataset:"Dataset",text_option_simplePointDensityAnalysis:"Simple point density analysis",text_option_nuclearDensityAnalysis:"Nuclear density analysis",text_label_analyticalMethod:"Analytical method",text_option_quadrilateral:"Quadrilateral",text_option_hexagon:"hexagon",text_label_meshType:"Mesh type",text_option_notSet:"Not set",text_label_weightField:"Weight field",text_label_gridSizeInMeters:"Grid size",text_label_searchRadius:"Search radius",text_label_queryRange:"Scope of analysis",text_label_areaUnit:"Area unit",text_option_equidistantSegmentation:"Equidistant segmentation",text_option_logarithm:"Logarithm",text_option_equalCountingSegment:"Equal counting segment",text_option_squareRootSegmentation:"Square root segmentation",text_label_thematicMapSegmentationMode:"Thematic map segmentation mode",text_label_thematicMapSegmentationParameters:"Thematic map segmentation parameters",text_option_greenOrangePurpleGradient:"Green orange purple gradient",text_option_greenOrangeRedGradient:"Green orange red gradient",text_option_rainbowGradient:"Rainbow gradient",text_option_spectralGradient:"Spectral gradient",text_option_terrainGradient:"Terrain gradient",text_label_thematicMapColorGradientMode:"Thematic map color gradient mode",text_label_resultLayerName:"Result layer name",text_chooseFile:"Open File",text_isoline:"Isoline",text_extractDiscreteValue:"Extract discrete value generation curve",text_buffer:"Buffer",text_specifyTheDistance:"Specify the distance to create the surrounding area",text_label_analysisLayer:"Analysis layer",text_label_extractField:"Extract field",text_label_extractedValue:"Extracted value",text_label_distanceAttenuation:"Distance attenuation",text_label_gridSize:"gridSize",text_label_bufferRadius:"Buffer radius",text_label_defaultkilometers:"Default 10 kilometers",text_label_kilometer:"kilometer",text_label_unit:"unit",text_retainOriginal:"Retain original object field",text_mergeBuffer:"Merge buffer",text_label_color:"Color",text_label_buffer:"[Buffer]",text_label_isolines:"[Isolines]",text_label_queryRangeTips:"The default is the full range of input data. Example: -74.050, 40.650, -73.850, 40.850",text_label_queryModel:"Query mode",text_label_IDArrayOfFeatures:"ID array of features",text_label_maxFeatures:"The maximum number of features that can be returned",text_label_bufferDistance:"Buffer distance",text_label_queryRange1:"Query range",text_label_spatialQueryMode:"Spatial query mode",text_label_featureFilter:"Feature filter",text_label_geometricObject:"Geometric object",text_label_queryMode:"Query mode",text_label_searchTips:"Search for city locations or layer features",text_label_chooseSearchLayers:"Select a query layer",text_loadSearchCriteria:"Load search criteria",text_saveSearchCriteria:"Save search criteria",btn_analyze:"Analyze",btn_analyzing:"Analyzing",btn_emptyTheAnalysisLayer:"Empty the analysis layer",btn_cancelAnalysis:"Cancel",btn_query:"Query",btn_querying:"Querying",btn_emptyTheRresultLayer:"Clear all result layers","msg_dataReturnedIsEmpty.":"The request is successful and the data returned by the query is empty.",msg_dataFlowServiceHasBeenSubscribed:"The data stream service has been subscribed to.",msg_inputDataFlowUrlFirst:"Please enter the data stream service address first.",msg_datasetOrMethodUnsupport:"This dataset does not support this analysis type. Please reselect the dataset.",msg_selectDataset:"Please select a data set!",msg_setTheWeightField:"Please set the weight field!",msg_theFieldNotSupportAnalysis:"The field you currently select does not support analysis!",msg_resultIsEmpty:"The result of the analysis is empty!",msg_openFileFail:"Failed to open file!",msg_fileTypeUnsupported:"File format is not supported!",msg_fileSizeExceeded:"File size exceeded! The file size should not exceed 10M!",msg_dataInWrongGeoJSONFormat:"Wrong data format! Non standard GEOJSON format data!",msg_dataInWrongFormat:"Wrong data format! Non standard EXCEL, CSV or GEOJSON format data!",msg_searchKeywords:"Search keywords cannot be empty. Please enter your search criteria.",msg_searchGeocodeField:"Did not match the address matching service data!",msg_cityGeocodeField:"The address matching service of the current city is not configured.",msg_getFeatureField:"No related vector features found!",msg_dataflowservicesubscribed:"The data stream service has been subscribed to.",msg_subscribesucceeded:"The data stream service subscription was successful.",msg_crsunsupport:"Does not support the coordinate system of the current map",msg_tilematrixsetunsupport:"Incoming TileMatrixSet is not supported",msg_jsonResolveFiled:"JSON format parsing failure!",msg_requestContentFiled:"Failed to request data through iportal!",msg_getdatafailed:"Failed to get data!"};e.Lang["zh-CN"]={title_dataFlowService:"数据流服务",title_distributedAnalysis:"分布式分析",title_clientComputing:"客户端计算",title_dataServiceQuery:"数据服务查询",title_searchCity:"搜索城市",title_searchLayer:"搜索图层",text_input_value_inputDataFlowUrl:"请输入数据流服务地址如:ws://{serviceRoot}/{dataFlowName}/dataflow/subscribe",text_displayFeaturesInfo:"显示要素信息",text_subscribe:"订阅",text_cancelSubscribe:"取消订阅",text_densityAnalysis:"密度分析",text_CalculateTheValuePerUnitArea:"计算点指定邻域形状内的每单位面积量值",text_option_selectDataset:"请选择数据集",text_label_dataset:"数据集",text_option_simplePointDensityAnalysis:"简单点密度分析",text_option_nuclearDensityAnalysis:"核密度分析",text_label_analyticalMethod:"分析方法",text_option_quadrilateral:"四边形",text_option_hexagon:"六边形",text_label_meshType:"网格面类型",text_option_notSet:"未设置",text_label_weightField:"权重字段",text_label_gridSizeInMeters:"网格大小",text_label_searchRadius:"搜索半径",text_label_queryRange:"分析范围",text_label_areaUnit:"面积单位",text_option_equidistantSegmentation:"等距离分段",text_option_logarithm:"对数",text_option_equalCountingSegment:"等计数分段",text_option_squareRootSegmentation:"平方根分段",text_label_thematicMapSegmentationMode:"专题图分段模式",text_label_thematicMapSegmentationParameters:"专题图分段参数",text_option_greenOrangePurpleGradient:"绿橙紫渐变",text_option_greenOrangeRedGradient:"绿橙红渐变",text_option_rainbowGradient:"彩虹渐变",text_option_spectralGradient:"光谱渐变",text_option_terrainGradient:"地形渐变",text_label_thematicMapColorGradientMode:"专题图颜色渐变模式",text_label_resultLayerName:"结果图层名称",text_chooseFile:"选择文件",text_isoline:"等值线",text_extractDiscreteValue:"提取离散值生成曲线",text_buffer:"缓冲区",text_specifyTheDistance:"指定距离创建周边区域",text_label_analysisLayer:"分析图层",text_label_extractField:"提取字段",text_label_extractedValue:"提取值",text_label_distanceAttenuation:"距离衰减",text_label_gridSize:"栅格大小",text_label_bufferRadius:"缓冲半径",text_label_defaultkilometers:"默认10千米",text_option_kilometer:"千米",text_label_unit:"单位",text_retainOriginal:"保留原对象字段属性",text_mergeBuffer:"合并缓冲区",text_label_color:"颜色",text_label_buffer:"[缓冲区]",text_label_isolines:"[等值线]",text_label_queryRangeTips:"默认为输入数据的全幅范围。范例:-74.050,40.650,-73.850,40.850",text_label_IDArrayOfFeatures:"要素 ID 数组",text_label_maxFeatures:"最多可返回的要素数量",text_label_bufferDistance:"缓冲区距离",text_label_queryRange1:"查询范围",text_label_spatialQueryMode:"空间查询模式",text_label_featureFilter:"要素过滤器",text_label_geometricObject:"几何对象",text_label_queryMode:"查询模式",text_label_searchTips:"搜索城市地点或图层要素",text_label_chooseSearchLayers:"选择查询图层",text_loadSearchCriteria:"加载搜索条件",text_saveSearchCriteria:"保存搜索条件",btn_analyze:"分析",btn_analyzing:"分析中",btn_emptyTheAnalysisLayer:"清空分析图层",btn_cancelAnalysis:"取消",btn_query:"查询",btn_querying:"查询中",btn_emptyTheRresultLayer:"清除所有结果图层",msg_dataFlowServiceHasBeenSubscribed:"已订阅该数据流服务。",msg_inputDataFlowUrlFirst:"请先输入数据流服务地址。",msg_datasetOrMethodUnsupport:"该数据集不支持本分析类型,请重新选择数据集",msg_selectDataset:"请选择数据集!",msg_setTheWeightField:"请设置权重字段!",msg_theFieldNotSupportAnalysis:"您当前选择的字段不支持分析!",msg_resultIsEmpty:"分析的结果为空!",msg_dataReturnedIsEmpty:"请求成功,查询返回的数据为空。",msg_openFileFail:"打开文件失败!",msg_fileTypeUnsupported:"不支持该文件格式!",msg_fileSizeExceeded:"文件大小超限!文件大小不得超过 10M!",msg_dataInWrongGeoJSONFormat:"数据格式错误!非标准的 GEOJSON 格式数据!",msg_dataInWrongFormat:"数据格式错误!非标准的 EXCEL, CSV 或 GEOJSON 格式数据!",msg_searchKeywords:"搜索关键字不能为空,请输入搜索条件。",msg_searchGeocodeField:"未匹配到地址匹配服务数据!",msg_cityGeocodeField:"未配置当前城市的地址匹配服务。",msg_getFeatureField:"未查找到相关矢量要素!",msg_dataflowservicesubscribed:"已订阅该数据流服务。",msg_subscribesucceeded:"数据流服务订阅成功。",msg_crsunsupport:"不支持当前地图的坐标系",msg_tilematrixsetunsupport:"不支持传入的TileMatrixSet",msg_jsonResolveFiled:"json格式解析失败!",msg_requestContentFiled:"通过iportal请求数据失败!",msg_getdatafailed:"获取数据失败!"};var NA=L,IA=r.n(NA); +/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. + * This program are made available under the terms of the Apache License, Version 2.0 + * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ +IA().Projection={};var DA=IA().Class.extend({initialize:function(e){this.bounds=e},project:function(e){return new(IA().Point)(e.lng,e.lat)},unproject:function(e){return new(IA().LatLng)(e.y,e.x)}}),FA=IA().Class.extend({includes:IA().CRS,initialize:function(e){e.origin&&(this.transformation=new(IA().Transformation)(1,-e.origin.x,-1,e.origin.y)),this.projection=IA().Projection.NonProjection(e.bounds),this.bounds=e.bounds,this.origin=e.origin,this.resolutions=e.resolutions},scale:function(e){return this.resolutions&&0!==this.resolutions.length?this.resolutions[e]?1/this.resolutions[e]:1/this.resolutions[0]*Math.pow(2,e):1/(Math.max(this.bounds.getSize().x,this.bounds.getSize().y)/256)*Math.pow(2,e)},zoom:function(e){var t;if(!this.resolutions||0===this.resolutions.length)return t=1/(Math.max(this.bounds.getSize().x,this.bounds.getSize().y)/256),Math.log(e/t)/Math.LN2;var r=this.resolutions.indexOf(1/e);return r>-1?r:Math.log(e/(1/this.resolutions[0]))/Math.LN2},distance:function(e,t){var r=t.lng-e.lng,n=t.lat-e.lat;return Math.sqrt(r*r+n*n)},infinite:!1});IA().Projection.NonProjection=function(e){return new DA(e)},IA().CRS.NonEarthCRS=function(e){return new FA(e)};var BA=1,UA=2,GA=3,zA=4,VA=5,HA=6378137,JA=6356752.314,qA=.0066943799901413165,WA=484813681109536e-20,YA=Math.PI/2,QA=.16666666666666666,XA=.04722222222222222,KA=.022156084656084655,ZA=1e-10,$A=.017453292519943295,ej=57.29577951308232,tj=Math.PI/4,rj=2*Math.PI,nj=3.14159265359,oj={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},ij={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},aj=/[\s_\-\/\(\)]/g;function sj(e,t){if(e[t])return e[t];for(var r,n=Object.keys(e),o=t.toLowerCase().replace(aj,""),i=-1;++i=this.text.length)return;e=this.text[this.place++]}switch(this.state){case cj:return this.neutral(e);case 2:return this.keyword(e);case 4:return this.quoted(e);case 5:return this.afterquote(e);case 3:return this.number(e);case-1:return}},vj.prototype.afterquote=function(e){if('"'===e)return this.word+='"',void(this.state=4);if(yj.test(e))return this.word=this.word.trim(),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in afterquote yet, index '+this.place)},vj.prototype.afterItem=function(e){return","===e?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=cj)):"]"===e?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=cj,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},vj.prototype.number=function(e){if(!dj.test(e)){if(yj.test(e))return this.word=parseFloat(this.word),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in number yet, index '+this.place)}this.word+=e},vj.prototype.quoted=function(e){'"'!==e?this.word+=e:this.state=5},vj.prototype.keyword=function(e){if(pj.test(e))this.word+=e;else{if("["===e){var t=[];return t.push(this.word),this.level++,null===this.root?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,void(this.state=cj)}if(!yj.test(e))throw new Error("havn't handled \""+e+'" in keyword yet, index '+this.place);this.afterItem(e)}},vj.prototype.neutral=function(e){if(hj.test(e))return this.word=e,void(this.state=2);if('"'===e)return this.word="",void(this.state=4);if(dj.test(e))return this.word=e,void(this.state=3);if(!yj.test(e))throw new Error("havn't handled \""+e+'" in neutral yet, index '+this.place);this.afterItem(e)},vj.prototype.output=function(){for(;this.place0?90:-90),e.lat_ts=e.lat1)}(o),o}function Oj(e){var t=this;if(2===arguments.length){var r=arguments[1];"string"==typeof r?"+"===r.charAt(0)?Oj[e]=lj(arguments[1]):Oj[e]=wj(arguments[1]):Oj[e]=r}else if(1===arguments.length){if(Array.isArray(e))return e.map(function(e){Array.isArray(e)?Oj.apply(t,e):Oj(e)});if("string"==typeof e){if(e in Oj)return Oj[e]}else"EPSG"in e?Oj["EPSG:"+e.EPSG]=e:"ESRI"in e?Oj["ESRI:"+e.ESRI]=e:"IAU2000"in e?Oj["IAU2000:"+e.IAU2000]=e:console.log(e);return}}!function(e){e("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),e("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),e("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),e.WGS84=e["EPSG:4326"],e["EPSG:3785"]=e["EPSG:3857"],e.GOOGLE=e["EPSG:3857"],e["EPSG:900913"]=e["EPSG:3857"],e["EPSG:102113"]=e["EPSG:3857"]}(Oj);var xj=Oj;var Pj=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];var Cj=["3857","900913","3785","102113"];var Ej=function(e){if(!function(e){return"string"==typeof e}(e))return e;if(function(e){return e in xj}(e))return xj[e];if(function(e){return Pj.some(function(t){return e.indexOf(t)>-1})}(e)){var t=wj(e);if(function(e){var t=sj(e,"authority");if(t){var r=sj(t,"epsg");return r&&Cj.indexOf(r)>-1}}(t))return xj["EPSG:3857"];var r=function(e){var t=sj(e,"extension");if(t)return sj(t,"proj4")}(t);return r?lj(r):t}return function(e){return"+"===e[0]}(e)?lj(e):void 0};function Tj(e,t){var r,n;if(e=e||{},!t)return e;for(n in t)void 0!==(r=t[n])&&(e[n]=r);return e}function Rj(e,t,r){var n=e*t;return r/Math.sqrt(1-n*n)}function kj(e){return e<0?-1:1}function Mj(e){return Math.abs(e)<=nj?e:e-kj(e)*rj}function Aj(e,t,r){var n=e*r,o=.5*e;return n=Math.pow((1-n)/(1+n),o),Math.tan(.5*(YA-t))/n}function jj(e,t){for(var r,n,o=.5*e,i=YA-2*Math.atan(t),a=0;a<=15;a++)if(r=e*Math.sin(i),i+=n=YA-2*Math.atan(t*Math.pow((1-r)/(1+r),o))-i,Math.abs(n)<=1e-10)return i;return-9999}function Lj(e){return e}var Nj=[{init:function(){var e=this.b/this.a;this.es=1-e*e,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=Rj(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(e){var t,r,n=e.x,o=e.y;if(o*ej>90&&o*ej<-90&&n*ej>180&&n*ej<-180)return null;if(Math.abs(Math.abs(o)-YA)<=ZA)return null;if(this.sphere)t=this.x0+this.a*this.k0*Mj(n-this.long0),r=this.y0+this.a*this.k0*Math.log(Math.tan(tj+.5*o));else{var i=Math.sin(o),a=Aj(this.e,o,i);t=this.x0+this.a*this.k0*Mj(n-this.long0),r=this.y0-this.a*this.k0*Math.log(a)}return e.x=t,e.y=r,e},inverse:function(e){var t,r,n=e.x-this.x0,o=e.y-this.y0;if(this.sphere)r=YA-2*Math.atan(Math.exp(-o/(this.a*this.k0)));else{var i=Math.exp(-o/(this.a*this.k0));if(-9999===(r=jj(this.e,i)))return null}return t=Mj(this.long0+n/(this.a*this.k0)),e.x=t,e.y=r,e},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:Lj,inverse:Lj,names:["longlat","identity"]}],Ij={},Dj=[];function Fj(e,t){var r=Dj.length;return e.names?(Dj[r]=e,e.names.forEach(function(e){Ij[e.toLowerCase()]=r}),this):(console.log(t),!0)}var Bj={start:function(){Nj.forEach(Fj)},add:Fj,get:function(e){if(!e)return!1;var t=e.toLowerCase();return void 0!==Ij[t]&&Dj[Ij[t]]?Dj[Ij[t]]:void 0}},Uj={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},Gj=Uj.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};Uj.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var zj={};zj.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},zj.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},zj.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},zj.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},zj.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},zj.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},zj.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},zj.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},zj.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},zj.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},zj.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},zj.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},zj.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},zj.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},zj.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},zj.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},zj.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};var Vj=function(e,t,r,n,o,i,a){var s={};return s.datum_type=void 0===e||"none"===e?VA:zA,t&&(s.datum_params=t.map(parseFloat),0===s.datum_params[0]&&0===s.datum_params[1]&&0===s.datum_params[2]||(s.datum_type=BA),s.datum_params.length>3&&(0===s.datum_params[3]&&0===s.datum_params[4]&&0===s.datum_params[5]&&0===s.datum_params[6]||(s.datum_type=UA,s.datum_params[3]*=WA,s.datum_params[4]*=WA,s.datum_params[5]*=WA,s.datum_params[6]=s.datum_params[6]/1e6+1))),a&&(s.datum_type=GA,s.grids=a),s.a=r,s.b=n,s.es=o,s.ep2=i,s},Hj={};function Jj(e){if(0===e.length)return null;var t="@"===e[0];return t&&(e=e.slice(1)),"null"===e?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:e,mandatory:!t,grid:Hj[e]||null,isNull:!1}}function qj(e){return e/3600*Math.PI/180}function Wj(e,t,r){return String.fromCharCode.apply(null,new Uint8Array(e.buffer.slice(t,r)))}function Yj(e){return e.map(function(e){return[qj(e.longitudeShift),qj(e.latitudeShift)]})}function Qj(e,t,r){return{name:Wj(e,t+8,t+16).trim(),parent:Wj(e,t+24,t+24+8).trim(),lowerLatitude:e.getFloat64(t+72,r),upperLatitude:e.getFloat64(t+88,r),lowerLongitude:e.getFloat64(t+104,r),upperLongitude:e.getFloat64(t+120,r),latitudeInterval:e.getFloat64(t+136,r),longitudeInterval:e.getFloat64(t+152,r),gridNodeCount:e.getInt32(t+168,r)}}function Xj(e,t,r,n){for(var o=t+176,i=[],a=0;a-1.001*YA)l=-YA;else if(l>YA&&l<1.001*YA)l=YA;else{if(l<-YA)return{x:-1/0,y:-1/0,z:e.z};if(l>YA)return{x:1/0,y:1/0,z:e.z}}return s>Math.PI&&(s-=2*Math.PI),o=Math.sin(l),a=Math.cos(l),i=o*o,{x:((n=r/Math.sqrt(1-t*i))+u)*a*Math.cos(s),y:(n+u)*a*Math.sin(s),z:(n*(1-t)+u)*o}}function tL(e,t,r,n){var o,i,a,s,l,u,c,f,h,p,y,d,v,m,b,g=e.x,S=e.y,_=e.z?e.z:0;if(o=Math.sqrt(g*g+S*S),i=Math.sqrt(g*g+S*S+_*_),o/r<1e-12){if(m=0,i/r<1e-12)return YA,b=-n,{x:e.x,y:e.y,z:e.z}}else m=Math.atan2(S,g);a=_/i,f=(s=o/i)*(1-t)*(l=1/Math.sqrt(1-t*(2-t)*s*s)),h=a*l,v=0;do{v++,u=t*(c=r/Math.sqrt(1-t*h*h))/(c+(b=o*f+_*h-c*(1-t*h*h))),d=(y=a*(l=1/Math.sqrt(1-u*(2-u)*s*s)))*f-(p=s*(1-u)*l)*h,f=p,h=y}while(d*d>1e-24&&v<30);return{x:m,y:Math.atan(y/Math.abs(p)),z:b}}function rL(e){return e===BA||e===UA}function nL(e,t,r){if(function(e,t){return e.datum_type===t.datum_type&&!(e.a!==t.a||Math.abs(e.es-t.es)>5e-11)&&(e.datum_type===BA?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]:e.datum_type!==UA||e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]&&e.datum_params[3]===t.datum_params[3]&&e.datum_params[4]===t.datum_params[4]&&e.datum_params[5]===t.datum_params[5]&&e.datum_params[6]===t.datum_params[6])}(e,t))return r;if(e.datum_type===VA||t.datum_type===VA)return r;var n=e.a,o=e.es;if(e.datum_type===GA){if(0!==oL(e,!1,r))return;n=HA,o=qA}var i=t.a,a=t.b,s=t.es;if(t.datum_type===GA&&(i=HA,a=JA,s=qA),o===s&&n===i&&!rL(e.datum_type)&&!rL(t.datum_type))return r;if((r=eL(r,o,n),rL(e.datum_type)&&(r=function(e,t,r){if(t===BA)return{x:e.x+r[0],y:e.y+r[1],z:e.z+r[2]};if(t===UA){var n=r[0],o=r[1],i=r[2],a=r[3],s=r[4],l=r[5],u=r[6];return{x:u*(e.x-l*e.y+s*e.z)+n,y:u*(l*e.x+e.y-a*e.z)+o,z:u*(-s*e.x+a*e.y+e.z)+i}}}(r,e.datum_type,e.datum_params)),rL(t.datum_type)&&(r=function(e,t,r){if(t===BA)return{x:e.x-r[0],y:e.y-r[1],z:e.z-r[2]};if(t===UA){var n=r[0],o=r[1],i=r[2],a=r[3],s=r[4],l=r[5],u=r[6],c=(e.x-n)/u,f=(e.y-o)/u,h=(e.z-i)/u;return{x:c+l*f-s*h,y:-l*c+f+a*h,z:s*c-a*f+h}}}(r,t.datum_type,t.datum_params)),r=tL(r,s,i,a),t.datum_type===GA)&&0!==oL(t,!0,r))return;return r}function oL(e,t,r){if(null===e.grids||0===e.grids.length)return console.log("Grid shift grids not found"),-1;for(var n={x:-r.x,y:r.y},o={x:Number.NaN,y:Number.NaN},i=[],a=0;an.y||c>n.x||p1e-12&&Math.abs(a.y)>1e-12);if(l<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=Mj(i.x+r.ll[0]),n.y=i.y+r.ll[1]}else isNaN(i.x)||(n.x=e.x+i.x,n.y=e.y+i.y);return n}function aL(e,t){var r,n={x:e.x/t.del[0],y:e.y/t.del[1]},o=Math.floor(n.x),i=Math.floor(n.y),a=n.x-1*o,s=n.y-1*i,l={x:Number.NaN,y:Number.NaN};if(o<0||o>=t.lim[0])return l;if(i<0||i>=t.lim[1])return l;r=i*t.lim[0]+o;var u=t.cvs[r][0],c=t.cvs[r][1];r++;var f=t.cvs[r][0],h=t.cvs[r][1];r+=t.lim[0];var p=t.cvs[r][0],y=t.cvs[r][1];r--;var d=t.cvs[r][0],v=t.cvs[r][1],m=a*s,b=a*(1-s),g=(1-a)*(1-s),S=(1-a)*s;return l.x=g*u+b*f+S*d+m*p,l.y=g*c+b*h+S*v+m*y,l}function sL(e,t,r){var n,o,i,a=r.x,s=r.y,l=r.z||0,u={};for(i=0;i<3;i++)if(!t||2!==i||void 0!==r.z)switch(0===i?(n=a,o=-1!=="ew".indexOf(e.axis[i])?"x":"y"):1===i?(n=s,o=-1!=="ns".indexOf(e.axis[i])?"y":"x"):(n=l,o="z"),e.axis[i]){case"e":u[o]=n;break;case"w":u[o]=-n;break;case"n":u[o]=n;break;case"s":u[o]=-n;break;case"u":void 0!==r[o]&&(u.z=n);break;case"d":void 0!==r[o]&&(u.z=-n);break;default:return null}return u}function lL(e){var t={x:e[0],y:e[1]};return e.length>2&&(t.z=e[2]),e.length>3&&(t.m=e[3]),t}function uL(e){if("function"==typeof Number.isFinite){if(Number.isFinite(e))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof e||e!=e||!isFinite(e))throw new TypeError("coordinates must be finite numbers")}function cL(e,t,r,n){var o;if(Array.isArray(r)&&(r=lL(r)),function(e){uL(e.x),uL(e.y)}(r),e.datum&&t.datum&&function(e,t){return(e.datum.datum_type===BA||e.datum.datum_type===UA)&&"WGS84"!==t.datumCode||(t.datum.datum_type===BA||t.datum.datum_type===UA)&&"WGS84"!==e.datumCode}(e,t)&&(r=cL(e,o=new $j("WGS84"),r,n),e=o),n&&"enu"!==e.axis&&(r=sL(e,!1,r)),"longlat"===e.projName)r={x:r.x*$A,y:r.y*$A,z:r.z||0};else if(e.to_meter&&(r={x:r.x*e.to_meter,y:r.y*e.to_meter,z:r.z||0}),!(r=e.inverse(r)))return;if(e.from_greenwich&&(r.x+=e.from_greenwich),r=nL(e.datum,t.datum,r))return t.from_greenwich&&(r={x:r.x-t.from_greenwich,y:r.y,z:r.z||0}),"longlat"===t.projName?r={x:r.x*ej,y:r.y*ej,z:r.z||0}:(r=t.forward(r),t.to_meter&&(r={x:r.x/t.to_meter,y:r.y/t.to_meter,z:r.z||0})),n&&"enu"!==t.axis?sL(t,!0,r):r}var fL=$j("WGS84");function hL(e,t,r,n){var o,i,a;return Array.isArray(r)?(o=cL(e,t,r,n)||{x:NaN,y:NaN},r.length>2?void 0!==e.name&&"geocent"===e.name||void 0!==t.name&&"geocent"===t.name?"number"==typeof o.z?[o.x,o.y,o.z].concat(r.splice(3)):[o.x,o.y,r[2]].concat(r.splice(3)):[o.x,o.y].concat(r.splice(2)):[o.x,o.y]):(i=cL(e,t,r,n),2===(a=Object.keys(r)).length?i:(a.forEach(function(n){if(void 0!==e.name&&"geocent"===e.name||void 0!==t.name&&"geocent"===t.name){if("x"===n||"y"===n||"z"===n)return}else if("x"===n||"y"===n)return;i[n]=r[n]}),i))}function pL(e){return e instanceof $j?e:e.oProj?e.oProj:$j(e)}var yL=function(e,t,r){e=pL(e);var n,o=!1;return void 0===t?(t=e,e=fL,o=!0):(void 0!==t.x||Array.isArray(t))&&(r=t,t=e,e=fL,o=!0),t=pL(t),r?hL(e,t,r):(n={forward:function(r,n){return hL(e,t,r,n)},inverse:function(r,n){return hL(t,e,r,n)}},o&&(n.oProj=t),n)},dL=6,vL="AJSAJS",mL="AFAFAF",bL=65,gL=73,SL=79,_L=86,wL=90,OL={forward:xL,inverse:function(e){var t=TL(kL(e.toUpperCase()));if(t.lat&&t.lon)return[t.lon,t.lat,t.lon,t.lat];return[t.left,t.bottom,t.right,t.top]},toPoint:PL};function xL(e,t){return t=t||5,function(e,t){var r="00000"+e.easting,n="00000"+e.northing;return e.zoneNumber+e.zoneLetter+(p=e.easting,y=e.northing,d=e.zoneNumber,v=RL(d),m=Math.floor(p/1e5),b=Math.floor(y/1e5)%20,o=m,i=b,a=v,s=a-1,l=vL.charCodeAt(s),u=mL.charCodeAt(s),c=l+o-1,f=u+i,h=!1,c>wL&&(c=c-wL+bL-1,h=!0),(c===gL||lgL||(c>gL||lSL||(c>SL||lwL&&(c=c-wL+bL-1),f>_L?(f=f-_L+bL-1,h=!0):h=!1,(f===gL||ugL||(f>gL||uSL||(f>SL||u_L&&(f=f-_L+bL-1),String.fromCharCode(c)+String.fromCharCode(f))+r.substr(r.length-5,t)+n.substr(n.length-5,t);var o,i,a,s,l,u,c,f,h;var p,y,d,v,m,b}(function(e){var t,r,n,o,i,a,s,l=e.lat,u=e.lon,c=6378137,f=CL(l),h=CL(u);s=Math.floor((u+180)/6)+1,180===u&&(s=60);l>=56&&l<64&&u>=3&&u<12&&(s=32);l>=72&&l<84&&(u>=0&&u<9?s=31:u>=9&&u<21?s=33:u>=21&&u<33?s=35:u>=33&&u<42&&(s=37));a=CL(6*(s-1)-180+3),.006739496752268451,t=c/Math.sqrt(1-.00669438*Math.sin(f)*Math.sin(f)),r=Math.tan(f)*Math.tan(f),n=.006739496752268451*Math.cos(f)*Math.cos(f),o=Math.cos(f)*(h-a),i=c*(.9983242984503243*f-.002514607064228144*Math.sin(2*f)+2639046602129982e-21*Math.sin(4*f)-3.418046101696858e-9*Math.sin(6*f));var p=.9996*t*(o+(1-r+n)*o*o*o/6+(5-18*r+r*r+72*n-.39089081163157013)*o*o*o*o*o/120)+5e5,y=.9996*(i+t*Math.tan(f)*(o*o/2+(5-r+9*n+4*n*n)*o*o*o*o/24+(61-58*r+r*r+600*n-2.2240339282485886)*o*o*o*o*o*o/720));l<0&&(y+=1e7);return{northing:Math.round(y),easting:Math.round(p),zoneNumber:s,zoneLetter:function(e){var t="Z";84>=e&&e>=72?t="X":72>e&&e>=64?t="W":64>e&&e>=56?t="V":56>e&&e>=48?t="U":48>e&&e>=40?t="T":40>e&&e>=32?t="S":32>e&&e>=24?t="R":24>e&&e>=16?t="Q":16>e&&e>=8?t="P":8>e&&e>=0?t="N":0>e&&e>=-8?t="M":-8>e&&e>=-16?t="L":-16>e&&e>=-24?t="K":-24>e&&e>=-32?t="J":-32>e&&e>=-40?t="H":-40>e&&e>=-48?t="G":-48>e&&e>=-56?t="F":-56>e&&e>=-64?t="E":-64>e&&e>=-72?t="D":-72>e&&e>=-80&&(t="C");return t}(l)}}({lat:e[1],lon:e[0]}),t)}function PL(e){var t=TL(kL(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function CL(e){return e*(Math.PI/180)}function EL(e){return e/Math.PI*180}function TL(e){var t=e.northing,r=e.easting,n=e.zoneLetter,o=e.zoneNumber;if(o<0||o>60)return null;var i,a,s,l,u,c,f,h,p=6378137,y=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),d=r-5e5,v=t;n<"N"&&(v-=1e7),c=6*(o-1)-180+3,h=(f=v/.9996/6367449.145945056)+(3*y/2-27*y*y*y/32)*Math.sin(2*f)+(21*y*y/16-55*y*y*y*y/32)*Math.sin(4*f)+151*y*y*y/96*Math.sin(6*f),i=p/Math.sqrt(1-.00669438*Math.sin(h)*Math.sin(h)),a=Math.tan(h)*Math.tan(h),s=.006739496752268451*Math.cos(h)*Math.cos(h),l=.99330562*p/Math.pow(1-.00669438*Math.sin(h)*Math.sin(h),1.5),u=d/(.9996*i);var m=h-i*Math.tan(h)/l*(u*u/2-(5+3*a+10*s-4*s*s-.06065547077041606)*u*u*u*u/24+(61+90*a+298*s+45*a*a-1.6983531815716497-3*s*s)*u*u*u*u*u*u/720);m=EL(m);var b,g=(u-(1+2*a+s)*u*u*u/6+(5-2*s+28*a-3*s*s+.05391597401814761+24*a*a)*u*u*u*u*u/120)/Math.cos(h);if(g=c+EL(g),e.accuracy){var S=TL({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});b={top:S.lat,right:S.lon,bottom:m,left:g}}else b={lat:m,lon:g};return b}function RL(e){var t=e%dL;return 0===t&&(t=dL),t}function kL(e){if(e&&0===e.length)throw"MGRSPoint coverting from nothing";for(var t,r=e.length,n=null,o="",i=0;!/[A-Z]/.test(t=e.charAt(i));){if(i>=2)throw"MGRSPoint bad conversion from: "+e;o+=t,i++}var a=parseInt(o,10);if(0===i||i+3>r)throw"MGRSPoint bad conversion from: "+e;var s=e.charAt(i++);if(s<="A"||"B"===s||"Y"===s||s>="Z"||"I"===s||"O"===s)throw"MGRSPoint zone letter "+s+" not handled: "+e;n=e.substring(i,i+=2);for(var l=RL(a),u=function(e,t){var r=vL.charCodeAt(t-1),n=1e5,o=!1;for(;r!==e.charCodeAt(0);){if(++r===gL&&r++,r===SL&&r++,r>wL){if(o)throw"Bad character: "+e;r=bL,o=!0}n+=1e5}return n}(n.charAt(0),l),c=function(e,t){if(e>"V")throw"MGRSPoint given invalid Northing "+e;var r=mL.charCodeAt(t-1),n=0,o=!1;for(;r!==e.charCodeAt(0);){if(++r===gL&&r++,r===SL&&r++,r>_L){if(o)throw"Bad character: "+e;r=bL,o=!0}n+=1e5}return n}(n.charAt(1),l);c0&&(h=1e5/Math.pow(10,d),p=e.substring(i,i+d),v=parseFloat(p)*h,y=e.substring(i+d),m=parseFloat(y)*h),{easting:v+u,northing:m+c,zoneLetter:s,zoneNumber:a,accuracy:h}}function ML(e){var t;switch(e){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+e}function AL(e){"@babel/helpers - typeof";return(AL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jL(e,t,r){if(!(this instanceof jL))return new jL(e,t,r);if(Array.isArray(e))this.x=e[0],this.y=e[1],this.z=e[2]||0;else if("object"===AL(e))this.x=e.x,this.y=e.y,this.z=e.z||0;else if("string"==typeof e&&void 0===t){var n=e.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=e,this.y=t,this.z=r||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}jL.fromMGRS=function(e){return new jL(PL(e))},jL.prototype.toMGRS=function(e){return xL([this.x,this.y],e)};var LL=jL,NL=1,IL=.25,DL=.046875,FL=.01953125,BL=.01068115234375,UL=.75,GL=.46875,zL=.013020833333333334,VL=.007120768229166667,HL=.3645833333333333,JL=.005696614583333333,qL=.3076171875;function WL(e){var t=[];t[0]=NL-e*(IL+e*(DL+e*(FL+e*BL))),t[1]=e*(UL-e*(DL+e*(FL+e*BL)));var r=e*e;return t[2]=r*(GL-e*(zL+e*VL)),r*=e,t[3]=r*(HL-e*JL),t[4]=r*e*qL,t}function YL(e,t,r,n){return r*=t,t*=t,n[0]*e-r*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))}var QL=20;function XL(e,t,r){for(var n=1/(1-t),o=e,i=QL;i;--i){var a=Math.sin(o),s=1-t*a*a;if(o-=s=(YL(o,a,Math.cos(o),r)-e)*(s*Math.sqrt(s))*n,Math.abs(s)ZA?Math.tan(i):0,y=Math.pow(p,2),d=Math.pow(y,2);t=1-this.es*Math.pow(s,2),u/=Math.sqrt(t);var v=YL(i,s,l,this.en);r=this.a*(this.k0*u*(1+c/6*(1-y+f+c/20*(5-18*y+d+14*f-58*y*f+c/42*(61+179*d-d*y-479*y)))))+this.x0,n=this.a*(this.k0*(v-this.ml0+s*a*u/2*(1+c/12*(5-y+9*f+4*h+c/30*(61+d-58*y+270*f-330*y*f+c/56*(1385+543*d-d*y-3111*y))))))+this.y0}else{var m=l*Math.sin(a);if(Math.abs(Math.abs(m)-1)=1){if(m-1>ZA)return 93;n=0}else n=Math.acos(n);i<0&&(n=-n),n=this.a*this.k0*(n-this.lat0)+this.y0}return e.x=r,e.y=n,e},inverse:function(e){var t,r,n,o,i=(e.x-this.x0)*(1/this.a),a=(e.y-this.y0)*(1/this.a);if(this.es)if(r=XL(t=this.ml0+a/this.k0,this.es,this.en),Math.abs(r)ZA?Math.tan(r):0,c=this.ep2*Math.pow(l,2),f=Math.pow(c,2),h=Math.pow(u,2),p=Math.pow(h,2);t=1-this.es*Math.pow(s,2);var y=i*Math.sqrt(t)/this.k0,d=Math.pow(y,2);n=r-(t*=u)*d/(1-this.es)*.5*(1-d/12*(5+3*h-9*c*h+c-4*f-d/30*(61+90*h-252*c*h+45*p+46*c-d/56*(1385+3633*h+4095*p+1574*p*h)))),o=Mj(this.long0+y*(1-d/6*(1+2*h+c-d/20*(5+28*h+24*p+8*c*h+6*c-d/42*(61+662*h+1320*p+720*p*h))))/l)}else n=YA*kj(a),o=0;else{var v=Math.exp(i/this.k0),m=.5*(v-1/v),b=this.lat0+a/this.k0,g=Math.cos(b);t=Math.sqrt((1-Math.pow(g,2))/(1+Math.pow(m,2))),n=Math.asin(t),a<0&&(n=-n),o=0===m&&0===g?0:Mj(Math.atan2(m,g)+this.long0)}return e.x=o,e.y=n,e},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function ZL(e){var t=Math.exp(e);return t=(t-1/t)/2}function $L(e,t){e=Math.abs(e),t=Math.abs(t);var r=Math.max(e,t),n=Math.min(e,t)/(r||1);return r*Math.sqrt(1+Math.pow(n,2))}function eN(e){var t=Math.abs(e);return t=function(e){var t=1+e,r=t-1;return 0===r?e:e*Math.log(t)/r}(t*(1+t/($L(1,t)+1))),e<0?-t:t}function tN(e,t){for(var r,n=2*Math.cos(2*t),o=e.length-1,i=e[o],a=0;--o>=0;)r=n*i-a+e[o],a=i,i=r;return t+r*Math.sin(2*t)}function rN(e,t,r){for(var n,o,i=Math.sin(t),a=Math.cos(t),s=ZL(r),l=function(e){var t=Math.exp(e);return t=(t+1/t)/2}(r),u=2*a*l,c=-2*i*s,f=e.length-1,h=e[f],p=0,y=0,d=0;--f>=0;)n=y,o=p,h=u*(y=h)-n-c*(p=d)+e[f],d=c*y-o+u*p;return[(u=i*l)*h-(c=a*s)*d,u*d+c*h]}var nN={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(KL.init.apply(this),this.forward=KL.forward,this.inverse=KL.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var e=this.es/(1+Math.sqrt(1-this.es)),t=e/(2-e),r=t;this.cgb[0]=t*(2+t*(-2/3+t*(t*(116/45+t*(26/45+t*(-2854/675)))-2))),this.cbg[0]=t*(t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))-2),r*=t,this.cgb[1]=r*(7/3+t*(t*(-227/45+t*(2704/315+t*(2323/945)))-1.6)),this.cbg[1]=r*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),r*=t,this.cgb[2]=r*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=r*(-26/15+t*(34/21+t*(1.6+t*(-12686/2835)))),r*=t,this.cgb[3]=r*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=r*(1237/630+t*(t*(-24832/14175)-2.4)),r*=t,this.cgb[4]=r*(4174/315+t*(-144838/6237)),this.cbg[4]=r*(-734/315+t*(109598/31185)),r*=t,this.cgb[5]=r*(601676/22275),this.cbg[5]=r*(444337/155925),r=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+r*(.25+r*(1/64+r/256))),this.utg[0]=t*(t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))-.5),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=r*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=r*(13/48+t*(t*(557/1440+t*(281/630+t*(-1983433/1935360)))-.6)),r*=t,this.utg[2]=r*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=r*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),r*=t,this.utg[3]=r*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=r*(49561/161280+t*(-179/168+t*(6601661/7257600))),r*=t,this.utg[4]=r*(-4583/161280+t*(108847/3991680)),this.gtu[4]=r*(34729/80640+t*(-3418889/1995840)),r*=t,this.utg[5]=-.03233083094085698*r,this.gtu[5]=.6650675310896665*r;var n=tN(this.cbg,this.lat0);this.Zb=-this.Qn*(n+function(e,t){for(var r,n=2*Math.cos(t),o=e.length-1,i=e[o],a=0;--o>=0;)r=n*i-a+e[o],a=i,i=r;return Math.sin(t)*r}(this.gtu,2*n))},forward:function(e){var t=Mj(e.x-this.long0),r=e.y;r=tN(this.cbg,r);var n=Math.sin(r),o=Math.cos(r),i=Math.sin(t),a=Math.cos(t);r=Math.atan2(n,a*o),t=Math.atan2(i*o,$L(n,o*a)),t=eN(Math.tan(t));var s,l,u=rN(this.gtu,2*r,2*t);return r+=u[0],t+=u[1],Math.abs(t)<=2.623395162778?(s=this.a*(this.Qn*t)+this.x0,l=this.a*(this.Qn*r+this.Zb)+this.y0):(s=1/0,l=1/0),e.x=s,e.y=l,e},inverse:function(e){var t,r,n=(e.x-this.x0)*(1/this.a),o=(e.y-this.y0)*(1/this.a);if(o=(o-this.Zb)/this.Qn,n/=this.Qn,Math.abs(n)<=2.623395162778){var i=rN(this.utg,2*o,2*n);o+=i[0],n+=i[1],n=Math.atan(ZL(n));var a=Math.sin(o),s=Math.cos(o),l=Math.sin(n),u=Math.cos(n);o=Math.atan2(a*u,$L(l,u*s)),t=Mj((n=Math.atan2(l,u*s))+this.long0),r=tN(this.cgb,o)}else t=1/0,r=1/0;return e.x=t,e.y=r,e},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"]};var oN={init:function(){var e=function(e,t){if(void 0===e){if((e=Math.floor(30*(Mj(t)+Math.PI)/Math.PI)+1)<0)return 0;if(e>60)return 60}return e}(this.zone,this.long0);if(void 0===e)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(e)-183)*$A,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,nN.init.apply(this),this.forward=nN.forward,this.inverse=nN.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function iN(e,t){return Math.pow((1-e)/(1+e),t)}var aN=20;var sN={init:function(){var e=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*e*e),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(e/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+tj)/(Math.pow(Math.tan(.5*this.lat0+tj),this.C)*iN(this.e*e,this.ratexp))},forward:function(e){var t=e.x,r=e.y;return e.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*r+tj),this.C)*iN(this.e*Math.sin(r),this.ratexp))-YA,e.x=this.C*t,e},inverse:function(e){for(var t=e.x/this.C,r=e.y,n=Math.pow(Math.tan(.5*r+tj)/this.K,1/this.C),o=aN;o>0&&(r=2*Math.atan(n*iN(this.e*Math.sin(e.y),-.5*this.e))-YA,!(Math.abs(r-e.y)<1e-14));--o)e.y=r;return o?(e.x=t,e.y=r,e):null},names:["gauss"]};var lN={init:function(){sN.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(e){var t,r,n,o;return e.x=Mj(e.x-this.long0),sN.forward.apply(this,[e]),t=Math.sin(e.y),r=Math.cos(e.y),n=Math.cos(e.x),o=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*r*n),e.x=o*r*Math.sin(e.x),e.y=o*(this.cosc0*t-this.sinc0*r*n),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e},inverse:function(e){var t,r,n,o,i;if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,i=Math.sqrt(e.x*e.x+e.y*e.y)){var a=2*Math.atan2(i,this.R2);t=Math.sin(a),r=Math.cos(a),o=Math.asin(r*this.sinc0+e.y*t*this.cosc0/i),n=Math.atan2(e.x*t,i*this.cosc0*r-e.y*this.sinc0*t)}else o=this.phic0,n=0;return e.x=n,e.y=o,sN.inverse.apply(this,[e]),e.x=Mj(e.x+this.long0),e},names:["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};var uN={init:function(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=ZA&&(this.k0=.5*(1+kj(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=ZA&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=ZA&&(this.k0=.5*this.cons*Rj(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Aj(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=Rj(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-YA,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(e){var t,r,n,o,i,a,s=e.x,l=e.y,u=Math.sin(l),c=Math.cos(l),f=Mj(s-this.long0);return Math.abs(Math.abs(s-this.long0)-Math.PI)<=ZA&&Math.abs(l+this.lat0)<=ZA?(e.x=NaN,e.y=NaN,e):this.sphere?(t=2*this.k0/(1+this.sinlat0*u+this.coslat0*c*Math.cos(f)),e.x=this.a*t*c*Math.sin(f)+this.x0,e.y=this.a*t*(this.coslat0*u-this.sinlat0*c*Math.cos(f))+this.y0,e):(r=2*Math.atan(this.ssfn_(l,u,this.e))-YA,o=Math.cos(r),n=Math.sin(r),Math.abs(this.coslat0)<=ZA?(i=Aj(this.e,l*this.con,this.con*u),a=2*this.a*this.k0*i/this.cons,e.x=this.x0+a*Math.sin(s-this.long0),e.y=this.y0-this.con*a*Math.cos(s-this.long0),e):(Math.abs(this.sinlat0)0?Mj(this.long0+Math.atan2(e.x,-1*e.y)):Mj(this.long0+Math.atan2(e.x,e.y)):Mj(this.long0+Math.atan2(e.x*Math.sin(s),a*this.coslat0*Math.cos(s)-e.y*this.sinlat0*Math.sin(s))),e.x=t,e.y=r,e)}if(Math.abs(this.coslat0)<=ZA){if(a<=ZA)return r=this.lat0,t=this.long0,e.x=t,e.y=r,e;e.x*=this.con,e.y*=this.con,n=a*this.cons/(2*this.a*this.k0),r=this.con*jj(this.e,n),t=this.con*Mj(this.con*this.long0+Math.atan2(e.x,-1*e.y))}else o=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,a<=ZA?i=this.X0:(i=Math.asin(Math.cos(o)*this.sinX0+e.y*Math.sin(o)*this.cosX0/a),t=Mj(this.long0+Math.atan2(e.x*Math.sin(o),a*this.cosX0*Math.cos(o)-e.y*this.sinX0*Math.sin(o)))),r=-1*jj(this.e,Math.tan(.5*(YA+i)));return e.x=t,e.y=r,e},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],ssfn_:function(e,t,r){return t*=r,Math.tan(.5*(YA+e))*Math.pow((1-t)/(1+t),.5*r)}};var cN={init:function(){var e=this.lat0;this.lambda0=this.long0;var t=Math.sin(e),r=this.a,n=1/this.rf,o=2*n-Math.pow(n,2),i=this.e=Math.sqrt(o);this.R=this.k0*r*Math.sqrt(1-o)/(1-o*Math.pow(t,2)),this.alpha=Math.sqrt(1+o/(1-o)*Math.pow(Math.cos(e),4)),this.b0=Math.asin(t/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),s=Math.log(Math.tan(Math.PI/4+e/2)),l=Math.log((1+i*t)/(1-i*t));this.K=a-this.alpha*s+this.alpha*i/2*l},forward:function(e){var t=Math.log(Math.tan(Math.PI/4-e.y/2)),r=this.e/2*Math.log((1+this.e*Math.sin(e.y))/(1-this.e*Math.sin(e.y))),n=-this.alpha*(t+r)+this.K,o=2*(Math.atan(Math.exp(n))-Math.PI/4),i=this.alpha*(e.x-this.lambda0),a=Math.atan(Math.sin(i)/(Math.sin(this.b0)*Math.tan(o)+Math.cos(this.b0)*Math.cos(i))),s=Math.asin(Math.cos(this.b0)*Math.sin(o)-Math.sin(this.b0)*Math.cos(o)*Math.cos(i));return e.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,e.x=this.R*a+this.x0,e},inverse:function(e){for(var t=e.x-this.x0,r=e.y-this.y0,n=t/this.R,o=2*(Math.atan(Math.exp(r/this.R))-Math.PI/4),i=Math.asin(Math.cos(this.b0)*Math.sin(o)+Math.sin(this.b0)*Math.cos(o)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(o))),s=this.lambda0+a/this.alpha,l=0,u=i,c=-1e3,f=0;Math.abs(u-c)>1e-7;){if(++f>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+i/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(u))/2)),c=u,u=2*Math.atan(Math.exp(l))-Math.PI/2}return e.x=s,e.y=u,e},names:["somerc"]};function fN(e){"@babel/helpers - typeof";return(fN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var hN=1e-7;var pN={init:function(){var e,t,r,n,o,i,a,s,l,u,c,f,h,p=0,y=0,d=0,v=0,m=0,b=0,g=0;this.no_off=(h="object"===fN((f=this).PROJECTION)?Object.keys(f.PROJECTION)[0]:f.PROJECTION,"no_uoff"in f||"no_off"in f||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(h)),this.no_rot="no_rot"in this;var S=!1;"alpha"in this&&(S=!0);var _=!1;if("rectified_grid_angle"in this&&(_=!0),S&&(g=this.alpha),_&&(p=this.rectified_grid_angle*$A),S||_)y=this.longc;else if(d=this.long1,m=this.lat1,v=this.long2,b=this.lat2,Math.abs(m-b)<=hN||(e=Math.abs(m))<=hN||Math.abs(e-YA)<=hN||Math.abs(Math.abs(this.lat0)-YA)<=hN||Math.abs(Math.abs(b)-YA)<=hN)throw new Error;var w=1-this.es;t=Math.sqrt(w),Math.abs(this.lat0)>ZA?(s=Math.sin(this.lat0),r=Math.cos(this.lat0),e=1-this.es*s*s,this.B=r*r,this.B=Math.sqrt(1+this.es*this.B*this.B/w),this.A=this.B*this.k0*t/e,(o=(n=this.B*t/(r*Math.sqrt(e)))*n-1)<=0?o=0:(o=Math.sqrt(o),this.lat0<0&&(o=-o)),this.E=o+=n,this.E*=Math.pow(Aj(this.e,this.lat0,s),this.B)):(this.B=1/t,this.A=this.k0,this.E=n=o=1),S||_?(S?(c=Math.asin(Math.sin(g)/n),_||(p=g)):(c=p,g=Math.asin(n*Math.sin(c))),this.lam0=y-Math.asin(.5*(o-1/o)*Math.tan(c))/this.B):(i=Math.pow(Aj(this.e,m,Math.sin(m)),this.B),a=Math.pow(Aj(this.e,b,Math.sin(b)),this.B),o=this.E/i,l=(a-i)/(a+i),u=((u=this.E*this.E)-a*i)/(u+a*i),(e=d-v)<-Math.pi?v-=rj:e>Math.pi&&(v+=rj),this.lam0=Mj(.5*(d+v)-Math.atan(u*Math.tan(.5*this.B*(d-v))/l)/this.B),c=Math.atan(2*Math.sin(this.B*Mj(d-this.lam0))/(o-1/o)),p=g=Math.asin(n*Math.sin(c))),this.singam=Math.sin(c),this.cosgam=Math.cos(c),this.sinrot=Math.sin(p),this.cosrot=Math.cos(p),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A,this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(g))),this.lat0<0&&(this.u_0=-this.u_0)),o=.5*c,this.v_pole_n=this.ArB*Math.log(Math.tan(tj-o)),this.v_pole_s=this.ArB*Math.log(Math.tan(tj+o))},forward:function(e){var t,r,n,o,i,a,s,l,u={};if(e.x=e.x-this.lam0,Math.abs(Math.abs(e.y)-YA)>ZA){if(t=.5*((i=this.E/Math.pow(Aj(this.e,e.y,Math.sin(e.y)),this.B))-(a=1/i)),r=.5*(i+a),o=Math.sin(this.B*e.x),n=(t*this.singam-o*this.cosgam)/r,Math.abs(Math.abs(n)-1)0?this.v_pole_n:this.v_pole_s,s=this.ArB*e.y;return this.no_rot?(u.x=s,u.y=l):(s-=this.u_0,u.x=l*this.cosrot+s*this.sinrot,u.y=s*this.cosrot-l*this.sinrot),u.x=this.a*u.x+this.x0,u.y=this.a*u.y+this.y0,u},inverse:function(e){var t,r,n,o,i,a,s,l={};if(e.x=(e.x-this.x0)*(1/this.a),e.y=(e.y-this.y0)*(1/this.a),this.no_rot?(r=e.y,t=e.x):(r=e.x*this.cosrot-e.y*this.sinrot,t=e.y*this.cosrot+e.x*this.sinrot+this.u_0),o=.5*((n=Math.exp(-this.BrA*r))-1/n),i=.5*(n+1/n),s=((a=Math.sin(this.BrA*t))*this.cosgam+o*this.singam)/i,Math.abs(Math.abs(s)-1)ZA?this.ns=Math.log(n/s)/Math.log(o/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(o,this.ns)),this.rh=this.a*this.f0*Math.pow(u,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(e){var t=e.x,r=e.y;Math.abs(2*Math.abs(r)-Math.PI)<=ZA&&(r=kj(r)*(YA-2*ZA));var n,o,i=Math.abs(Math.abs(r)-YA);if(i>ZA)n=Aj(this.e,r,Math.sin(r)),o=this.a*this.f0*Math.pow(n,this.ns);else{if((i=r*this.ns)<=0)return null;o=0}var a=this.ns*Mj(t-this.long0);return e.x=this.k0*(o*Math.sin(a))+this.x0,e.y=this.k0*(this.rh-o*Math.cos(a))+this.y0,e},inverse:function(e){var t,r,n,o,i,a=(e.x-this.x0)/this.k0,s=this.rh-(e.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(a*a+s*s),r=1):(t=-Math.sqrt(a*a+s*s),r=-1);var l=0;if(0!==t&&(l=Math.atan2(r*a,r*s)),0!==t||this.ns>0){if(r=1/this.ns,n=Math.pow(t/(this.a*this.f0),r),-9999===(o=jj(this.e,n)))return null}else o=-YA;return i=Mj(l/this.ns+this.long0),e.x=i,e.y=o,e},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc"]};var dN={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(e){var t,r,n,o,i,a,s,l=e.x,u=e.y,c=Mj(l-this.long0);return t=Math.pow((1+this.e*Math.sin(u))/(1-this.e*Math.sin(u)),this.alfa*this.e/2),r=2*(Math.atan(this.k*Math.pow(Math.tan(u/2+this.s45),this.alfa)/t)-this.s45),n=-c*this.alfa,o=Math.asin(Math.cos(this.ad)*Math.sin(r)+Math.sin(this.ad)*Math.cos(r)*Math.cos(n)),i=Math.asin(Math.cos(r)*Math.sin(n)/Math.cos(o)),a=this.n*i,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(o/2+this.s45),this.n),e.y=s*Math.cos(a)/1,e.x=s*Math.sin(a)/1,this.czech||(e.y*=-1,e.x*=-1),e},inverse:function(e){var t,r,n,o,i,a,s,l=e.x;e.x=e.y,e.y=l,this.czech||(e.y*=-1,e.x*=-1),i=Math.sqrt(e.x*e.x+e.y*e.y),o=Math.atan2(e.y,e.x)/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/i,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(o)),r=Math.asin(Math.cos(n)*Math.sin(o)/Math.cos(t)),e.x=this.long0-r/this.alfa,a=t,s=0;var u=0;do{e.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-e.y)<1e-10&&(s=1),a=e.y,u+=1}while(0===s&&u<15);return u>=15?null:e},names:["Krovak","krovak"]};function vN(e,t,r,n,o){return e*o-t*Math.sin(2*o)+r*Math.sin(4*o)-n*Math.sin(6*o)}function mN(e){return 1-.25*e*(1+e/16*(3+1.25*e))}function bN(e){return.375*e*(1+.25*e*(1+.46875*e))}function gN(e){return.05859375*e*e*(1+.75*e)}function SN(e){return e*e*e*(35/3072)}function _N(e,t,r){var n=t*r;return e/Math.sqrt(1-n*n)}function wN(e){return Math.abs(e)1e-7?(1-e*e)*(t/(1-(r=e*t)*r)-.5/e*Math.log((1-r)/(1+r))):2*t}var CN=.3333333333333333,EN=.17222222222222222,TN=.10257936507936508,RN=.06388888888888888,kN=.0664021164021164,MN=.016415012942191543;var AN={init:function(){var e,t=Math.abs(this.lat0);if(Math.abs(t-YA)0)switch(this.qp=PN(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(e){var t,r=[];return r[0]=e*CN,t=e*e,r[0]+=t*EN,r[1]=t*RN,t*=e,r[0]+=t*TN,r[1]+=t*kN,r[2]=t*MN,r}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),e=Math.sin(this.lat0),this.sinb1=PN(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(e){var t,r,n,o,i,a,s,l,u,c,f=e.x,h=e.y;if(f=Mj(f-this.long0),this.sphere){if(i=Math.sin(h),c=Math.cos(h),n=Math.cos(f),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((r=this.mode===this.EQUIT?1+c*n:1+this.sinph0*i+this.cosph0*c*n)<=ZA)return null;t=(r=Math.sqrt(2/r))*c*Math.sin(f),r*=this.mode===this.EQUIT?i:this.cosph0*i-this.sinph0*c*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(h+this.lat0)=0?(t=(u=Math.sqrt(a))*o,r=n*(this.mode===this.S_POLE?u:-u)):t=r=0}}return e.x=this.a*t+this.x0,e.y=this.a*r+this.y0,e},inverse:function(e){e.x-=this.x0,e.y-=this.y0;var t,r,n,o,i,a,s,l,u,c,f=e.x/this.a,h=e.y/this.a;if(this.sphere){var p,y=0,d=0;if((r=.5*(p=Math.sqrt(f*f+h*h)))>1)return null;switch(r=2*Math.asin(r),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(d=Math.sin(r),y=Math.cos(r)),this.mode){case this.EQUIT:r=Math.abs(p)<=ZA?0:Math.asin(h*d/p),f*=d,h=y*p;break;case this.OBLIQ:r=Math.abs(p)<=ZA?this.lat0:Math.asin(y*this.sinph0+h*d*this.cosph0/p),f*=d*this.cosph0,h=(y-Math.sin(r)*this.sinph0)*p;break;case this.N_POLE:h=-h,r=YA-r;break;case this.S_POLE:r-=YA}t=0!==h||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(f,h):0}else{if(s=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(f/=this.dd,h*=this.dd,(a=Math.sqrt(f*f+h*h))1&&(e=e>1?1:-1),Math.asin(e)}var LN={init:function(){Math.abs(this.lat1+this.lat2)ZA?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(e){var t=e.x,r=e.y;this.sin_phi=Math.sin(r),this.cos_phi=Math.cos(r);var n=PN(this.e3,this.sin_phi,this.cos_phi),o=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,i=this.ns0*Mj(t-this.long0),a=o*Math.sin(i)+this.x0,s=this.rh-o*Math.cos(i)+this.y0;return e.x=a,e.y=s,e},inverse:function(e){var t,r,n,o,i,a;return e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns0>=0?(t=Math.sqrt(e.x*e.x+e.y*e.y),n=1):(t=-Math.sqrt(e.x*e.x+e.y*e.y),n=-1),o=0,0!==t&&(o=Math.atan2(n*e.x,n*e.y)),n=t*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(r=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,r)),i=Mj(o/this.ns0+this.long0),e.x=i,e.y=a,e},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(e,t){var r,n,o,i,a,s=jN(.5*t);if(e0||Math.abs(i)<=ZA?(a=this.x0+1*this.a*r*Math.sin(n)/i,s=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*r*o)/i):(a=this.x0+this.infinity_dist*r*Math.sin(n),s=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*r*o)),e.x=a,e.y=s,e},inverse:function(e){var t,r,n,o,i,a;return e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,(t=Math.sqrt(e.x*e.x+e.y*e.y))?(o=Math.atan2(t,this.rc),r=Math.sin(o),a=jN((n=Math.cos(o))*this.sin_p14+e.y*r*this.cos_p14/t),i=Math.atan2(e.x*r,t*this.cos_p14*n-e.y*this.sin_p14*r),i=Mj(this.long0+i)):(a=this.phic0,i=0),e.x=i,e.y=a,e},names:["gnom"]};var IN={init:function(){this.sphere||(this.k0=Rj(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(e){var t,r,n=e.x,o=e.y,i=Mj(n-this.long0);if(this.sphere)t=this.x0+this.a*i*Math.cos(this.lat_ts),r=this.y0+this.a*Math.sin(o)/Math.cos(this.lat_ts);else{var a=PN(this.e,Math.sin(o));t=this.x0+this.a*this.k0*i,r=this.y0+this.a*a*.5/this.k0}return e.x=t,e.y=r,e},inverse:function(e){var t,r;return e.x-=this.x0,e.y-=this.y0,this.sphere?(t=Mj(this.long0+e.x/this.a/Math.cos(this.lat_ts)),r=Math.asin(e.y/this.a*Math.cos(this.lat_ts))):(r=function(e,t){var r=1-(1-e*e)/(2*e)*Math.log((1-e)/(1+e));if(Math.abs(Math.abs(t)-r)<1e-6)return t<0?-1*YA:YA;for(var n,o,i,a,s=Math.asin(.5*t),l=0;l<30;l++)if(o=Math.sin(s),i=Math.cos(s),a=e*o,s+=n=Math.pow(1-a*a,2)/(2*i)*(t/(1-e*e)-o/(1-a*a)+.5/e*Math.log((1-a)/(1+a))),Math.abs(n)<=1e-10)return s;return NaN}(this.e,2*e.y*this.k0/this.a),t=Mj(this.long0+e.x/(this.a*this.k0))),e.x=t,e.y=r,e},names:["cea"]};var DN={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(e){var t=e.x,r=e.y,n=Mj(t-this.long0),o=wN(r-this.lat0);return e.x=this.x0+this.a*n*this.rc,e.y=this.y0+this.a*o,e},inverse:function(e){var t=e.x,r=e.y;return e.x=Mj(this.long0+(t-this.x0)/(this.a*this.rc)),e.y=wN(this.lat0+(r-this.y0)/this.a),e},names:["Equirectangular","Equidistant_Cylindrical","eqc"]},FN=20;var BN={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=mN(this.es),this.e1=bN(this.es),this.e2=gN(this.es),this.e3=SN(this.es),this.ml0=this.a*vN(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(e){var t,r,n,o=e.x,i=e.y,a=Mj(o-this.long0);if(n=a*Math.sin(i),this.sphere)Math.abs(i)<=ZA?(t=this.a*a,r=-1*this.a*this.lat0):(t=this.a*Math.sin(n)/Math.tan(i),r=this.a*(wN(i-this.lat0)+(1-Math.cos(n))/Math.tan(i)));else if(Math.abs(i)<=ZA)t=this.a*a,r=-1*this.ml0;else{var s=_N(this.a,this.e,Math.sin(i))/Math.tan(i);t=s*Math.sin(n),r=this.a*vN(this.e0,this.e1,this.e2,this.e3,i)-this.ml0+s*(1-Math.cos(n))}return e.x=t+this.x0,e.y=r+this.y0,e},inverse:function(e){var t,r,n,o,i,a,s,l,u;if(n=e.x-this.x0,o=e.y-this.y0,this.sphere)if(Math.abs(o+this.a*this.lat0)<=ZA)t=Mj(n/this.a+this.long0),r=0;else{var c;for(a=this.lat0+o/this.a,s=n*n/this.a/this.a+a*a,l=a,i=FN;i;--i)if(l+=u=-1*(a*(l*(c=Math.tan(l))+1)-l-.5*(l*l+s)*c)/((l-a)/c-1),Math.abs(u)<=ZA){r=l;break}t=Mj(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(r))}else if(Math.abs(o+this.ml0)<=ZA)r=0,t=Mj(this.long0+n/this.a);else{var f,h,p,y,d;for(a=(this.ml0+o)/this.a,s=n*n/this.a/this.a+a*a,l=a,i=FN;i;--i)if(d=this.e*Math.sin(l),f=Math.sqrt(1-d*d)*Math.tan(l),h=this.a*vN(this.e0,this.e1,this.e2,this.e3,l),p=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),l-=u=(a*(f*(y=h/this.a)+1)-y-.5*f*(y*y+s))/(this.es*Math.sin(2*l)*(y*y+s-2*a*y)/(4*f)+(a-y)*(f*p-2/Math.sin(2*l))-p),Math.abs(u)<=ZA){r=l;break}f=Math.sqrt(1-this.es*Math.pow(Math.sin(r),2))*Math.tan(r),t=Mj(this.long0+Math.asin(n*f/this.a)/Math.sin(r))}return e.x=t,e.y=r,e},names:["Polyconic","poly"]};var UN={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(e){var t,r=e.x,n=e.y-this.lat0,o=r-this.long0,i=n/WA*1e-5,a=o,s=1,l=0;for(t=1;t<=10;t++)s*=i,l+=this.A[t]*s;var u,c=l,f=a,h=1,p=0,y=0,d=0;for(t=1;t<=6;t++)u=p*c+h*f,h=h*c-p*f,p=u,y=y+this.B_re[t]*h-this.B_im[t]*p,d=d+this.B_im[t]*h+this.B_re[t]*p;return e.x=d*this.a+this.x0,e.y=y*this.a+this.y0,e},inverse:function(e){var t,r,n=e.x,o=e.y,i=n-this.x0,a=(o-this.y0)/this.a,s=i/this.a,l=1,u=0,c=0,f=0;for(t=1;t<=6;t++)r=u*a+l*s,l=l*a-u*s,u=r,c=c+this.C_re[t]*l-this.C_im[t]*u,f=f+this.C_im[t]*l+this.C_re[t]*u;for(var h=0;h.999999999999&&(r=.999999999999),t=Math.asin(r);var n=Mj(this.long0+e.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),r=(2*t+Math.sin(2*t))/Math.PI,Math.abs(r)>1&&(r=1);var o=Math.asin(r);return e.x=n,e.y=o,e},names:["Mollweide","moll"]};var JN={init:function(){Math.abs(this.lat1+this.lat2)=0?(r=Math.sqrt(e.x*e.x+e.y*e.y),t=1):(r=-Math.sqrt(e.x*e.x+e.y*e.y),t=-1);var i=0;return 0!==r&&(i=Math.atan2(t*e.x,t*e.y)),this.sphere?(o=Mj(this.long0+i/this.ns),n=wN(this.g-r/this.a),e.x=o,e.y=n,e):(n=ON(this.g-r/this.a,this.e0,this.e1,this.e2,this.e3),o=Mj(this.long0+i/this.ns),e.x=o,e.y=n,e)},names:["Equidistant_Conic","eqdc"]};var qN={init:function(){this.R=this.a},forward:function(e){var t,r,n=e.x,o=e.y,i=Mj(n-this.long0);Math.abs(o)<=ZA&&(t=this.x0+this.R*i,r=this.y0);var a=jN(2*Math.abs(o/Math.PI));(Math.abs(i)<=ZA||Math.abs(Math.abs(o)-YA)<=ZA)&&(t=this.x0,r=o>=0?this.y0+Math.PI*this.R*Math.tan(.5*a):this.y0+Math.PI*this.R*-Math.tan(.5*a));var s=.5*Math.abs(Math.PI/i-i/Math.PI),l=s*s,u=Math.sin(a),c=Math.cos(a),f=c/(u+c-1),h=f*f,p=f*(2/u-1),y=p*p,d=Math.PI*this.R*(s*(f-y)+Math.sqrt(l*(f-y)*(f-y)-(y+l)*(h-y)))/(y+l);i<0&&(d=-d),t=this.x0+d;var v=l+f;return d=Math.PI*this.R*(p*v-s*Math.sqrt((y+l)*(l+1)-v*v))/(y+l),r=o>=0?this.y0+d:this.y0-d,e.x=t,e.y=r,e},inverse:function(e){var t,r,n,o,i,a,s,l,u,c,f,h;return e.x-=this.x0,e.y-=this.y0,f=Math.PI*this.R,i=(n=e.x/f)*n+(o=e.y/f)*o,f=3*(o*o/(l=-2*(a=-Math.abs(o)*(1+i))+1+2*o*o+i*i)+(2*(s=a-2*o*o+n*n)*s*s/l/l/l-9*a*s/l/l)/27)/(u=(a-s*s/3/l)/l)/(c=2*Math.sqrt(-u/3)),Math.abs(f)>1&&(f=f>=0?1:-1),h=Math.acos(f)/3,r=e.y>=0?(-c*Math.cos(h+Math.PI/3)-s/3/l)*Math.PI:-(-c*Math.cos(h+Math.PI/3)-s/3/l)*Math.PI,t=Math.abs(n)2*YA*this.a)return;return r=t/this.a,n=Math.sin(r),o=Math.cos(r),i=this.long0,Math.abs(t)<=ZA?a=this.lat0:(a=jN(o*this.sin_p12+e.y*n*this.cos_p12/t),s=Math.abs(this.lat0)-YA,i=Math.abs(s)<=ZA?this.lat0>=0?Mj(this.long0+Math.atan2(e.x,-e.y)):Mj(this.long0-Math.atan2(-e.x,e.y)):Mj(this.long0+Math.atan2(e.x*n,t*this.cos_p12*o-e.y*this.sin_p12*n))),e.x=i,e.y=a,e}return l=mN(this.es),u=bN(this.es),c=gN(this.es),f=SN(this.es),Math.abs(this.sin_p12-1)<=ZA?(a=ON(((h=this.a*vN(l,u,c,f,YA))-(t=Math.sqrt(e.x*e.x+e.y*e.y)))/this.a,l,u,c,f),i=Mj(this.long0+Math.atan2(e.x,-1*e.y)),e.x=i,e.y=a,e):Math.abs(this.sin_p12+1)<=ZA?(h=this.a*vN(l,u,c,f,YA),a=ON(((t=Math.sqrt(e.x*e.x+e.y*e.y))-h)/this.a,l,u,c,f),i=Mj(this.long0+Math.atan2(e.x,e.y)),e.x=i,e.y=a,e):(t=Math.sqrt(e.x*e.x+e.y*e.y),d=Math.atan2(e.x,e.y),p=_N(this.a,this.e,this.sin_p12),v=Math.cos(d),b=-(m=this.e*this.cos_p12*v)*m/(1-this.es),g=3*this.es*(1-b)*this.sin_p12*this.cos_p12*v/(1-this.es),w=1-b*(_=(S=t/p)-b*(1+b)*Math.pow(S,3)/6-g*(1+3*b)*Math.pow(S,4)/24)*_/2-S*_*_*_/6,y=Math.asin(this.sin_p12*Math.cos(_)+this.cos_p12*Math.sin(_)*v),i=Mj(this.long0+Math.asin(Math.sin(d)*Math.sin(_)/Math.cos(y))),O=Math.sin(y),a=Math.atan2((O-this.es*w*this.sin_p12)*Math.tan(y),O*(1-this.es)),e.x=i,e.y=a,e)},names:["Azimuthal_Equidistant","aeqd"]};var YN={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(e){var t,r,n,o,i,a,s,l=e.x,u=e.y;return n=Mj(l-this.long0),t=Math.sin(u),r=Math.cos(u),o=Math.cos(n),((i=this.sin_p14*t+this.cos_p14*r*o)>0||Math.abs(i)<=ZA)&&(a=1*this.a*r*Math.sin(n),s=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*r*o)),e.x=a,e.y=s,e},inverse:function(e){var t,r,n,o,i,a,s;return e.x-=this.x0,e.y-=this.y0,r=jN((t=Math.sqrt(e.x*e.x+e.y*e.y))/this.a),n=Math.sin(r),o=Math.cos(r),a=this.long0,Math.abs(t)<=ZA?(s=this.lat0,e.x=a,e.y=s,e):(s=jN(o*this.sin_p14+e.y*n*this.cos_p14/t),i=Math.abs(this.lat0)-YA,Math.abs(i)<=ZA?(a=this.lat0>=0?Mj(this.long0+Math.atan2(e.x,-e.y)):Mj(this.long0-Math.atan2(-e.x,e.y)),e.x=a,e.y=s,e):(a=Mj(this.long0+Math.atan2(e.x*n,t*this.cos_p14*o-e.y*this.sin_p14*n)),e.x=a,e.y=s,e))},names:["ortho"]},QN={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},XN={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function KN(e,t,r,n){var o;return etj&&o<=YA+tj?(n.value=XN.AREA_1,o-=YA):o>YA+tj||o<=-(YA+tj)?(n.value=XN.AREA_2,o=o>=0?o-nj:o+nj):(n.value=XN.AREA_3,o+=YA)),o}function ZN(e,t){var r=e+t;return r<-nj?r+=rj:r>+nj&&(r-=rj),r}var $N={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=YA-tj/2?this.face=QN.TOP:this.lat0<=-(YA-tj/2)?this.face=QN.BOTTOM:Math.abs(this.long0)<=tj?this.face=QN.FRONT:Math.abs(this.long0)<=YA+tj?this.face=this.long0>0?QN.RIGHT:QN.LEFT:this.face=QN.BACK,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(e){var t,r,n,o,i,a,s={x:0,y:0},l={value:0};if(e.x-=this.long0,t=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(e.y)):e.y,r=e.x,this.face===QN.TOP)o=YA-t,r>=tj&&r<=YA+tj?(l.value=XN.AREA_0,n=r-YA):r>YA+tj||r<=-(YA+tj)?(l.value=XN.AREA_1,n=r>0?r-nj:r+nj):r>-(YA+tj)&&r<=-tj?(l.value=XN.AREA_2,n=r+YA):(l.value=XN.AREA_3,n=r);else if(this.face===QN.BOTTOM)o=YA+t,r>=tj&&r<=YA+tj?(l.value=XN.AREA_0,n=-r+YA):r=-tj?(l.value=XN.AREA_1,n=-r):r<-tj&&r>=-(YA+tj)?(l.value=XN.AREA_2,n=-r-YA):(l.value=XN.AREA_3,n=r>0?-r+nj:-r-nj);else{var u,c,f,h,p,y;this.face===QN.RIGHT?r=ZN(r,+YA):this.face===QN.BACK?r=ZN(r,+nj):this.face===QN.LEFT&&(r=ZN(r,-YA)),h=Math.sin(t),p=Math.cos(t),y=Math.sin(r),u=p*Math.cos(r),c=p*y,f=h,this.face===QN.FRONT?n=KN(o=Math.acos(u),f,c,l):this.face===QN.RIGHT?n=KN(o=Math.acos(c),f,-u,l):this.face===QN.BACK?n=KN(o=Math.acos(-u),f,-c,l):this.face===QN.LEFT?n=KN(o=Math.acos(-c),f,u,l):(o=n=0,l.value=XN.AREA_0)}return a=Math.atan(12/nj*(n+Math.acos(Math.sin(n)*Math.cos(tj))-YA)),i=Math.sqrt((1-Math.cos(o))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(n))))),l.value===XN.AREA_1?a+=YA:l.value===XN.AREA_2?a+=nj:l.value===XN.AREA_3&&(a+=1.5*nj),s.x=i*Math.cos(a),s.y=i*Math.sin(a),s.x=s.x*this.a+this.x0,s.y=s.y*this.a+this.y0,e.x=s.x,e.y=s.y,e},inverse:function(e){var t,r,n,o,i,a,s,l,u,c,f,h,p={lam:0,phi:0},y={value:0};if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,r=Math.atan(Math.sqrt(e.x*e.x+e.y*e.y)),t=Math.atan2(e.y,e.x),e.x>=0&&e.x>=Math.abs(e.y)?y.value=XN.AREA_0:e.y>=0&&e.y>=Math.abs(e.x)?(y.value=XN.AREA_1,t-=YA):e.x<0&&-e.x>=Math.abs(e.y)?(y.value=XN.AREA_2,t=t<0?t+nj:t-nj):(y.value=XN.AREA_3,t+=YA),u=nj/12*Math.tan(t),i=Math.sin(u)/(Math.cos(u)-1/Math.sqrt(2)),a=Math.atan(i),(s=1-(n=Math.cos(t))*n*(o=Math.tan(r))*o*(1-Math.cos(Math.atan(1/Math.cos(a)))))<-1?s=-1:s>1&&(s=1),this.face===QN.TOP)l=Math.acos(s),p.phi=YA-l,y.value===XN.AREA_0?p.lam=a+YA:y.value===XN.AREA_1?p.lam=a<0?a+nj:a-nj:y.value===XN.AREA_2?p.lam=a-YA:p.lam=a;else if(this.face===QN.BOTTOM)l=Math.acos(s),p.phi=l-YA,y.value===XN.AREA_0?p.lam=-a+YA:y.value===XN.AREA_1?p.lam=-a:y.value===XN.AREA_2?p.lam=-a-YA:p.lam=a<0?-a-nj:-a+nj;else{var d,v,m;u=(d=s)*d,v=(u+=(m=u>=1?0:Math.sqrt(1-u)*Math.sin(a))*m)>=1?0:Math.sqrt(1-u),y.value===XN.AREA_1?(u=v,v=-m,m=u):y.value===XN.AREA_2?(v=-v,m=-m):y.value===XN.AREA_3&&(u=v,v=m,m=-u),this.face===QN.RIGHT?(u=d,d=-v,v=u):this.face===QN.BACK?(d=-d,v=-v):this.face===QN.LEFT&&(u=d,d=v,v=-u),p.phi=Math.acos(-m)-YA,p.lam=Math.atan2(v,d),this.face===QN.RIGHT?p.lam=ZN(p.lam,-YA):this.face===QN.BACK?p.lam=ZN(p.lam,-nj):this.face===QN.LEFT&&(p.lam=ZN(p.lam,+YA))}return 0!==this.es&&(c=p.phi<0?1:0,f=Math.tan(p.phi),h=this.b/Math.sqrt(f*f+this.one_minus_f_squared),p.phi=Math.atan(Math.sqrt(this.a*this.a-h*h)/(this.one_minus_f*h)),c&&(p.phi=-p.phi)),p.lam+=this.long0,e.x=p.lam,e.y=p.phi,e},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},eI=[[1,2.2199e-17,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],tI=[[-5.20417e-18,.0124,1.21431e-18,-8.45284e-11],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],rI=.8487,nI=1.3523,oI=ej/5,iI=1/oI,aI=18,sI=function(e,t){return e[0]+t*(e[1]+t*(e[2]+t*e[3]))},lI=function(e,t){return e[1]+t*(2*e[2]+3*t*e[3])};var uI={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(e){var t=Mj(e.x-this.long0),r=Math.abs(e.y),n=Math.floor(r*oI);n<0?n=0:n>=aI&&(n=aI-1),r=ej*(r-iI*n);var o={x:sI(eI[n],r)*t,y:sI(tI[n],r)};return e.y<0&&(o.y=-o.y),o.x=o.x*this.a*rI+this.x0,o.y=o.y*this.a*nI+this.y0,o},inverse:function(e){var t={x:(e.x-this.x0)/(this.a*rI),y:Math.abs(e.y-this.y0)/(this.a*nI)};if(t.y>=1)t.x/=eI[aI][0],t.y=e.y<0?-YA:YA;else{var r=Math.floor(t.y*aI);for(r<0?r=0:r>=aI&&(r=aI-1);;)if(tI[r][0]>t.y)--r;else{if(!(tI[r+1][0]<=t.y))break;++r}var n=tI[r],o=5*(t.y-n[0])/(tI[r+1][0]-n[0]);o=function(e,t,r,n){for(var o=t;n;--n){var i=e(o);if(o-=i,Math.abs(i)1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var i={header:o,subgrids:function(e,t,r){for(var n=[],o=0;othis.bounds.max.x?this.bounds.max.x:e.x,e.y=e.ythis.bounds.max.y?this.bounds.max.y:e.y);var r=this._proj.inverse([e.x,e.y]);return new(IA().LatLng)(r[1],r[0],t)},_projFromCodeDef:function(e,t){if(t)yI.defs(e,t);else if(void 0===yI.defs[e]){var r=e.split(":");if(r.length>3&&(e=r[r.length-3]+":"+r[r.length-1]),void 0===yI.defs[e])throw"No projection definition for code "+e}return yI(e)},getUnits:function(){return this._proj.oProj.units||"degrees"}});var dI=IA().Class.extend({includes:IA().CRS,options:{transformation:new(IA().Transformation)(1,0,-1,0)},initialize:function(e,t){var r,n,o;if(IA().Proj._isProj4Obj(e)?(r=(n=e).srsCode,t=t||{},this.projection=new(IA().Proj.Projection)(n,t.bounds,t.wrapLng)):(r=e,o=(t=t||{}).def||"",this.projection=new(IA().Proj.Projection)(r,o,t.bounds,t.wrapLng)),IA().Util.setOptions(this,t),this.options.wrapLng&&(this.wrapLng=this.options.wrapLng),this.code=r,this.transformation=this.options.transformation,this.options.dpi=this.options.dpi||96,this.options.bounds&&(this.options.bounds=IA().bounds(this.options.bounds)),!this.options.origin&&this.options.bounds&&(this.options.origin=[this.options.bounds.min.x,this.options.bounds.max.y]),this.options.origin&&(this.options.origin instanceof IA().Point&&(this.options.origin=[this.options.origin.x,this.options.origin.y]),this.transformation=new(IA().Transformation)(1,-this.options.origin[0],-1,this.options.origin[1])),this.options.scales&&this.options.scales.length>0)this.scales=this.options.scales,this._scales=this._toProj4Scales(this.options.scales,this.options.dpi);else if(this.options.scaleDenominators&&this.options.scaleDenominators.length>0){this.scales=[];for(var i=0;i0){this._scales=[];for(var a=this.options.resolutions.length-1;a>=0;a--)this.options.resolutions[a]&&(this._scales[a]=1/this.options.resolutions[a])}else this.options.bounds&&(this._scales=this._getDefaultProj4ScalesByBounds(this.options.bounds));this._rectify(),this.infinite=!this.options.bounds},_rectify:function(){if(this._scales&&(this.resolutions||(this.resolutions=[],this.resolutions=this._proj4ScalesToResolutions(this._scales)),!this.scales)){this.scales=[];for(var e=0;eLeaflet\n with © SuperMap iClient",Common:{attribution:"Map Data © SuperMap iServer"},Online:{attribution:"Map Data © SuperMap Online"},ECharts:{attribution:"© 2018 百度 ECharts"},MapV:{attribution:"© 2018 百度 MapV "},Turf:{attribution:"© turfjs"},Baidu:{attribution:"Map Data © 2018 Baidu - GS(2016)2089号 - Data © 长地万方"},Cloud:{attribution:"Map Data ©2014 SuperMap - GS(2014)6070号-data©Navinfo"},Tianditu:{attribution:"Map Data "}}; +/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. + * This program are made available under the terms of the Apache License, Version 2.0 + * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ +IA().supermap=IA().supermap||{},IA().supermap.control=IA().supermap.control||{},IA().supermap.components=IA().supermap.components||{},IA().Control.Attribution.include({options:{position:"bottomright",prefix:CI.Prefix}}),IA().Map.include({latLngToAccurateContainerPoint:function(e){var t=this.project(IA().latLng(e))._subtract(this.getPixelOrigin());return IA().point(t).add(this._getMapPanePos())}}),[IA().Polyline,IA().Polygon,IA().Marker,IA().CircleMarker,IA().Circle,IA().LayerGroup].map(function(e){return e.defaultFunction=e.prototype.toGeoJSON,e.include({toGeoJSON:function(t){return e.defaultFunction.call(this,t||10)}}),e}); +/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. + * This program are made available under the terms of the Apache License, Version 2.0 + * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ +var EI=IA().Evented.extend({options:{url:null,proxy:null,withCredentials:!1,crossOrigin:null},initialize:function(e,t){e&&(e=e.indexOf("/")!==e.length-1?e:e.substr(0,e.length-1)),this.url=e,IA().setOptions(this,t),this.fire("initialized",this)},destroy:function(){this.fire("destroy",this)}});IA().supermap.ServiceBase=EI; +/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. + * This program are made available under the terms of the Apache License, Version 2.0 + * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ +var TI=EI.extend({options:{projection:null},initialize:function(e,t){t=t||{},IA().setOptions(this,t),t.projection&&(this.options.projection=t.projection),EI.prototype.initialize.call(this,e,t)},getMapInfo:function(e){var t=this;new Nm(t.url,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,eventListeners:{scope:t,processCompleted:e,processFailed:e},projection:t.options.projection}).processAsync()},getTilesets:function(e){var t=this;new Vw(t.url,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,eventListeners:{scope:t,processCompleted:e,processFailed:e}}).processAsync()}});IA().supermap.mapService=function(e,t){return new TI(e,t)}; +/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. + * This program are made available under the terms of the Apache License, Version 2.0 + * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ +var RI=IA().Control.extend({options:{layer:null,position:"topleft",title:"switch tile version",tooltip:"top",collapsed:!0,nextText:"+",lastText:"-",ico:"V",orientation:"horizontal",switch:!0},onAdd:function(){"vertical"!==this.options.orientation&&(this.options.orientation="horizontal");var e=this._initLayout();return this.options.layer&&this.setLayer(this.options.layer),e},setContent:function(e){var t=IA().Util.extend({},e);this.setVersionName(t.desc).setToolTip(t.desc)},setVersionName:function(e){var t=e;return e||(t=this.getValue()),this._sliderValue.innerHTML=t,this},setToolTip:function(e){return this.tooltip.innerHTML=e,this},updateLength:function(e){e>0&&(this.length=e,this.max=this.length-1,this.slider.setAttribute("max",this.max))},setLayer:function(e){e&&(this.options.layer=e);var t=this,r=t.options.layer;r.on("tilesetsinfoloaded",function(e){var r=e&&e.tileVersions;t.update(r)}),r.on("tileversionschanged",function(e){var r=e&&e.tileVersion;t.setContent(r)}),t.getTileSetsInfo()},update:function(e){this.tileVersions=e||[],this.updateLength(this.tileVersions.length)},getTileSetsInfo:function(){var e=this;e.options.layer&&new TI(e.options.layer._url).getTilesets(function(t){e.options.layer.setTileSetsInfo(t.result)})},removeLayer:function(){this.options.layer=null},nextTilesVersion:function(){return this.firstLoad?(this.options.layer.nextTilesVersion(),this.firstLoad=!1,this):parseInt(this.slider.value)>this.max-1?this:(this.slider.value=parseInt(this.slider.value)+1,this.options.layer.nextTilesVersion(),this)},lastTilesVersion:function(){return parseInt(this.slider.value)"+r+"",e}});IA().Map.mergeOptions({logoControl:!0}),IA().Map.addInitHook(function(){!this._logoAdded&&this.options.logoControl&&(!0===this.options.logoControl?this.logoControl=new kI:this.options.logoControl instanceof IA().Control&&(this.logoControl=this.options.logoControl),this.logoControl&&(this.addControl(this.logoControl),this._logoAdded=!0))});function MI(e,t){for(var r=0;r1&&(o=[],t.map(function(e){return o.push(e.geometry),e}))),o&&o.geometry?o.geometry:o},NI=function(e){var t;if(e===l.METER)t=1;else if(e===l.DEGREE)t=2*Math.PI*6378137/360;else if(e===l.KILOMETER)t=.001;else if(e===l.INCH)t=1/.025399999918;else{if(e!==l.FOOT)return t;t=.3048}return t},II=function(e,t,r){var n=e*t*(1/.0254)*NI(r);return n=1/n};IA().Util.toGeoJSON=jI,IA().Util.toSuperMapGeometry=LI,IA().Util.resolutionToScale=II,IA().Util.scaleToResolution=function(e,t,r){var n=e*t*(1/.0254)*NI(r);return n=1/n},IA().Util.getMeterPerMapUnit=NI,IA().Util.GetResolutionFromScaleDpi=function(e,t,r,n){return n=n||6378137,r=r||"",e>0&&t>0?(e=IA().Util.NormalizeScale(e),"degree"===r.toLowerCase()||"degrees"===r.toLowerCase()||"dd"===r.toLowerCase()?254/t/e/(2*Math.PI*n/360)/1e4:254/t/e/1e4):-1},IA().Util.NormalizeScale=function(e){return e>1?1/e:e};IA().Util.transform=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:IA().CRS.EPSG4326,r=arguments.length>2?arguments[2]:void 0,n=null,o=null;if(-1===["FeatureCollection","Feature","Geometry"].indexOf(e.type))if(e.toGeoJSON)e=e.toGeoJSON();else if(e instanceof IA().LatLngBounds)e=IA().rectangle(e).toGeoJSON();else{if(!(e instanceof IA().Bounds))throw new Error("This tool only supports data conversion in geojson format or Vector Layers of Leaflet.");e=IA().rectangle([[e.getTopLeft().x,e.getTopLeft().y],[e.getBottomRight().x,e.getBottomRight().y]]).toGeoJSON()}var i={point:function(e){return o(e)},multipoint:function(e){return i.linestring.apply(this,[e])},linestring:function(e){for(var t=[],r=null,n=0,o=e.length;n(this._map.options.maxZoom||18)||e<(this._map.options.minZoom||0))this._currentImage&&(this._currentImage._map.removeLayer(this._currentImage),this._currentImage=null);else{var r=this._getImageParams();r?this._requestImage(r,t):this._currentImage&&(this._currentImage._map.removeLayer(this._currentImage),this._currentImage=null)}}},_calculateBounds:function(){var e=this._map.getPixelBounds(),t=this._map.unproject(e.getBottomLeft()),r=this._map.unproject(e.getTopRight()),n=this._map.options.crs.project(r),o=this._map.options.crs.project(t);return IA().bounds(n,o)},_compriseBounds:function(e){var t={leftBottom:{x:e.getBottomLeft().x,y:e.getTopRight().y},rightTop:{x:e.getTopRight().x,y:e.getBottomLeft().y}};return JSON.stringify(t)},_calculateImageSize:function(){var e=this._map,t=e.getPixelBounds(),r=e.getSize(),n=e.unproject(t.getBottomLeft()),o=e.unproject(t.getTopRight()),i=e.latLngToLayerPoint(o).y,a=e.latLngToLayerPoint(n).y;return(i>0||ar.max.x)||!t.wrapLat&&(e.yr.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(e);return IA().latLngBounds(this.options.bounds).overlaps(n)}});IA().supermap.tiandituTileLayer=function(e){return new HI(e)}; +/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. + * This program are made available under the terms of the Apache License, Version 2.0 + * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ +var JI=IA().TileLayer.extend({options:{layersID:null,redirect:!1,transparent:!0,cacheEnabled:!0,clipRegionEnabled:!1,clipRegion:null,prjCoordSys:null,overlapDisplayed:!1,overlapDisplayedOptions:null,tileversion:null,crs:null,format:"png",tileProxy:null,attribution:CI.Common.attribution,subdomains:null},initialize:function(e,t){this._url=e,IA().TileLayer.prototype.initialize.apply(this,arguments),IA().setOptions(this,t),IA().stamp(this),this.tileSetsIndex=-1,this.tempIndex=-1},onAdd:function(e){this._crs=this.options.crs||e.options.crs,IA().TileLayer.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this.getScaleFromCoords(e),r=this._getLayerUrl()+"&scale="+t+"&x="+e.x+"&y="+e.y;return this.options.tileProxy&&(r=this.options.tileProxy+encodeURIComponent(r)),this.options.cacheEnabled||(r+="&_t="+(new Date).getTime()),this.options.subdomains&&(r=IA().Util.template(r,{s:this._getSubdomain(e)})),r},getScale:function(e){var t=e||this._map.getZoom();return this.scales[t]},getScaleFromCoords:function(e){var t,r=this;return r.scales&&r.scales[e.z]?r.scales[e.z]:(r.scales=r.scales||{},t=r.getDefaultScale(e),r.scales[e.z]=t,t)},getDefaultScale:function(e){var t=this._crs;if(t.scales)return t.scales[e.z];var r=this._tileCoordsToBounds(e),n=t.project(r.getNorthEast()),o=t.project(r.getSouthWest()),i=this.options.tileSize,a=Math.max(Math.abs(n.x-o.x)/i,Math.abs(n.y-o.y)/i),s=l.METER;if(t.code){var u=t.code.split(":");if(u&&u.length>1){var c=parseInt(u[1]);s=c&&c>=4e3&&c<=5e3?l.DEGREE:l.METER}}return II(a,96,s)},setTileSetsInfo:function(e){this.tileSets=e,IA().Util.isArray(this.tileSets)&&(this.tileSets=this.tileSets[0]),this.tileSets&&(this.fire("tilesetsinfoloaded",{tileVersions:this.tileSets.tileVersions}),this.changeTilesVersion())},lastTilesVersion:function(){this.tempIndex=this.tileSetsIndex-1,this.changeTilesVersion()},nextTilesVersion:function(){this.tempIndex=this.tileSetsIndex+1,this.changeTilesVersion()},changeTilesVersion:function(){var e=this;if(null!=e.tileSets&&!(e.tempIndex===e.tileSetsIndex||this.tempIndex<0)){var t=e.tileSets.tileVersions;if(t&&e.tempIndex=0){var r=t[e.tempIndex].name;e.mergeTileVersionParam(r)&&(e.tileSetsIndex=e.tempIndex,e.fire("tileversionschanged",{tileVersion:t[e.tempIndex]}))}}},updateCurrentTileSetsIndex:function(e){this.tempIndex=e},mergeTileVersionParam:function(e){return!!e&&(this.requestParams.tileversion=e,this._paramsChanged=!0,this.redraw(),this._paramsChanged=!1,!0)},_getLayerUrl:function(){return this._paramsChanged&&(this._layerUrl=this._createLayerUrl()),this._layerUrl||this._createLayerUrl()},_createLayerUrl:function(){var e=K.urlPathAppend(this._url,"tileImage.".concat(this.options.format));return this.requestParams=this.requestParams||this._getAllRequestParams(),e=K.urlAppend(e,NA.Util.getParamString(this.requestParams)),e=Dr.appendCredential(e),this._layerUrl=e,e},_getAllRequestParams:function(){var e=this.options||{},t={},r=this.options.tileSize;r instanceof IA().Point||(r=IA().point(r,r)),t.width=r.x,t.height=r.y,t.redirect=!0===e.redirect,t.transparent=!0===e.transparent,t.cacheEnabled=!(!1===e.cacheEnabled),e.prjCoordSys&&(t.prjCoordSys=JSON.stringify(e.prjCoordSys)),e.layersID&&(t.layersID=e.layersID.toString()),e.clipRegionEnabled&&e.clipRegion&&(e.clipRegion=ar.fromGeometry(LI(e.clipRegion)),t.clipRegionEnabled=e.clipRegionEnabled,t.clipRegion=JSON.stringify(e.clipRegion));var n=this._crs;if(n.options&&n.options.origin)t.origin=JSON.stringify({x:n.options.origin[0],y:n.options.origin[1]});else if(n.projection&&n.projection.bounds){var o=n.projection.bounds,i=IA().point(o.min.x,o.max.y);t.origin=JSON.stringify({x:i.x,y:i.y})}return!1===e.overlapDisplayed?(t.overlapDisplayed=!1,e.overlapDisplayedOptions&&(t.overlapDisplayedOptions=this.overlapDisplayedOptions.toString())):t.overlapDisplayed=!0,!0===t.cacheEnabled&&e.tileversion&&(t.tileversion=e.tileversion.toString()),e.rasterfunction&&(t.rasterfunction=JSON.stringify(e.rasterfunction)),t}}),qI=function(e,t){return new JI(e,t)};IA().supermap.tiledMapLayer=qI;var WI=r(879),YI=r.n(WI),QI={TEXT:{fontSize:"14px",fontFamily:"Arial Unicode MS Regular,Microsoft YaHei",textAlign:"left",color:"rgba(255,255,255,0)",fillColor:"rgba(80,80,80,1)",weight:1,globalAlpha:1},POINT:{fillColor:"#ffcc00",color:"#cc3333",weight:1,radius:3,opacity:1},LINE:{color:"rgba(0,0,0,0)",weight:1,lineCap:"butt",lineJoin:"round",dashOffset:0,dashArray:[],opacity:1},REGION:{color:"rgba(0,0,0,0)",fillColor:"rgba(0,0,0,0)",weight:1,lineCap:"butt",lineJoin:"round",dashOffset:0,opacity:1,fillOpacity:1,dashArray:[]}};IA().supermap.DefaultStyle=QI; +/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. + * This program are made available under the terms of the Apache License, Version 2.0 + * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ +var XI={TEXT:{"text-size":"fontSize","text-face-name":"fontFamily","text-align":"textAlign","text-name":"textName","text-weight":"fontWeight","text-halo-color":"color","text-fill":"fillColor","text-comp-op":"globalCompositeOperation"},POINT:{"point-file":"iconUrl","point-fill":"fillColor","point-radius":"radius","point-halo-color":"color","point-comp-op":"globalCompositeOperation"},LINE:{"line-color":"color","line-width":"weight","line-cap":"lineCap","line-join":"lineJoin","line-dash-offset":"dashOffset","line-opacity":"opacity","line-dasharray":"dashArray","line-comp-op":"globalCompositeOperation"},REGION:{"line-color":"color","line-width":"weight","line-cap":"lineCap","line-join":"lineJoin","line-dash-offset":"dashOffset","line-opacity":"opacity","line-dasharray":"dashArray","polygon-fill":"fillColor","polygon-opacity":"fillOpacity","polygon-comp-op":"globalCompositeOperation"}},KI={lineWidth:{leafletStyle:"weight",type:"number",unit:"mm",defaultValue:.1},fillForeColor:{leafletStyle:"fillColor",type:"color",defaultValue:"rgba(0,0,0,0)"},foreColor:{leafletStyle:"color",type:"color",defaultValue:"rgba(0,0,0,0)"},markerSize:{leafletStyle:"markerSize",type:"number",unit:"mm",defaultValue:2.4},lineColor:{leafletStyle:"color",type:"color",defaultValue:"#000000"}},ZI={clear:"",src:"",dst:"","src-over":"source-over","dst-over":"destination-over","src-in":"source-in","dst-in":"destination-in","src-out":"source-out","dst-out":"destination-out","src-atop":"source-atop","dst-atop":"destination-atop",xor:"xor",plus:"lighter",minus:"",multiply:"",screen:"",overlay:"",darken:"",lighten:"lighter","color-dodge":"","color-burn":"","hard-light":"","soft-light":"",difference:"",exclusion:"",contrast:"",invert:"","invert-rgb":"","grain-merge":"","grain-extract":"",hue:"",saturation:"",color:"",value:""};function $I(e,t){for(var r=0;r-1;a--)if(e.indexOf(i[a])>-1){o=e.replace(i[a],r[i[a]]);break}o=o.replace(/[#]/gi,"#"),r[e]=n,t=t.replace(new RegExp(o,"g"),n)}),t=(t=t.replace(/[#]/gi,"\n#")).replace(/\[zoom/gi,"[scale")}}},{key:"pickShader",value:function(e){if(!this.cartoCSS)return null;var t=e.replace(/[@#\s]/gi,"___");return this.cartoCSS[t]}},{key:"getDefaultStyle",value:function(e){var t={},r=QI[e];for(var n in r){var o=r[n];t[n]=o}return t}},{key:"getStyleFromiPortalMarker",value:function(e){return 0==e.indexOf("./")?null:(0==e.indexOf("http://support.supermap.com.cn:8092/static/portal")&&(e=e.replace("http://support.supermap.com.cn:8092/static/portal","http://support.supermap.com.cn:8092/apps/viewer/static")),IA().icon({iconUrl:e,iconSize:IA().point(48,43),iconAnchor:IA().point(24,43),popupAnchor:IA().point(0,-43)}))}},{key:"getStyleFromiPortalStyle",value:function(e,t,r){var n=r?JSON.parse(r):null,o={};if("Point"===t||"MultiPoint"===t){var i=n||e.pointStyle;return i.externalGraphic?0==i.externalGraphic.indexOf("./")?null:(0==i.externalGraphic.indexOf("http://support.supermap.com.cn:8092/static/portal")&&(i.externalGraphic=i.externalGraphic.replace("http://support.supermap.com.cn:8092/static/portal","http://support.supermap.com.cn:8092/apps/viewer/static")),IA().icon({iconUrl:i.externalGraphic,iconSize:IA().point(i.graphicWidth,i.graphicHeight),iconAnchor:IA().point(-i.graphicXOffset,-i.graphicYOffset),popupAnchor:IA().point(0,-i.graphicHeight)})):(o.radius=i.pointRadius,o.color=i.strokeColor,o.opacity=i.strokeOpacity,o.lineCap=i.strokeLineCap,o.weight=i.strokeWidth,o.fillColor=i.fillColor,o.fillOpacity=i.fillOpacity,o.dashArray=this.dashStyle(i,1),o)}if("LineString"===t||"MultiLineString"===t||"Box"===t){var a=n||e.lineStyle;return o.color=a.strokeColor,o.opacity=a.strokeOpacity,o.fillOpacity=a.fillOpacity,o.lineCap=a.strokeLineCap,o.weight=a.strokeWidth,o.dashArray=this.dashStyle(a,1),o}if("Polygon"===t||"MultiPolygon"===t){var s=n||e.polygonStyle;return o.color=s.strokeColor,o.opacity=s.strokeOpacity,o.lineCap=s.strokeLineCap,o.weight=s.strokeWidth,o.fillColor=s.fillColor,o.fillOpacity=s.fillOpacity,o.dashArray=this.dashStyle(s,1),o}}},{key:"dashStyle",value:function(e,t){if(!e)return[];var r=e.strokeWidth*t,n=e.strokeDashstyle;switch(n){case"solid":return[];case"dot":return[1,4*r];case"dash":return[4*r,4*r];case"dashdot":return[4*r,4*r,1,4*r];case"longdash":return[8*r,4*r];case"longdashdot":return[8*r,4*r,1,4*r];default:return n?K.isArray(n)?n:(n=H.trim(n).replace(/\s+/g,",")).replace(/\[|\]/gi,"").split(","):[]}}},{key:"getValidStyleFromCarto",value:function(e,t,r,n,o){if(!r)return null;var i=n.type,a=n.properties.attributes||{},s=this.getDefaultStyle(i);o=void 0===o||o,a.FEATUREID=n.properties.id,a.SCALE=t;for(var l,u,c=XI[i],f=0,h=r.length;f7?0:i.fillSymbolID,f=i.lineSymbolID>5?0:i.lineSymbolID;for(var h in i){var p=KI[h];if(p){var y=p.leafletStyle;switch(p.type){case"number":var d=i[h];p.unit&&(d=d*e.DOTS_PER_INCH*e.INCHES_PER_UNIT[p.unit]*2.5),o[y]=d;break;case"color":var v=i[h],m=void 0,b=1;if("fillColor"===y)0!==c&&1!==c||(b=1-c,m="rgba("+v.red+","+v.green+","+v.blue+","+b+")");else if("color"===y){if(0===f||5===f)b=0===f?1:0;else{var g=[1,0];switch(f){case 1:g=[9.7,3.7];break;case 2:g=[3.7,3.7];break;case 3:g=[9.7,3.7,2.3,3.7];break;case 4:g=[9.7,3.7,2.3,3.7,2.3,3.7]}o.lineDasharray=g}m="rgba("+v.red+","+v.green+","+v.blue+","+b+")"}o[y]=m}}}return r.textField&&(o.textAlign="LEFT"),o}}])&&$I(r.prototype,n),o&&$I(r,o),t}();IA().supermap.CartoCSSToLeaflet=eD; +/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. + * This program are made available under the terms of the Apache License, Version 2.0 + * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ +var tD=IA().Class.extend({initialize:function(e){var t=(e=e||{}).latLng||e._latLng;this._latLng=IA().latLng(t.lat,t.lng),this._style=e.style||e._canvas,this.attributes=e.attributes,this.id=e.id?e.id:null},getId:function(){return this.id},setId:function(e){this.id=e},setLatLng:function(e){this._latLng=e},setCanvas:function(e){this._style=e},setAttributes:function(e){this.attributes=e},getLatLng:function(){return this._latLng},getCanvas:function(){return this._style},getAttributes:function(){return this.attributes},setStyle:function(e){this._style=e},getStyle:function(){return this._style}});IA().supermap.graphic=function(e){return new tD(e)}; +/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. + * This program are made available under the terms of the Apache License, Version 2.0 + * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ +var rD=IA().Class.extend({initialize:function(e,t){this.geometry=e,this.attributes=t},toFeature:function(){var e=this.geometry;if(e.toGeoJSON){var t=e.toGeoJSON();return t.properties=this.attributes,(new pr).read(t)[0]}if(3===e.length)e=new ze(e[1],e[0],e[2]);else if(2===e.length)e=new Te(e[0],e[1]);else if(e instanceof IA().LatLng)e=new Te(e.lng,e.lat);else if(e instanceof IA().Point)e=new Te(e.x,e.y);else if(e instanceof IA().CircleMarker){var r=e.getLatLng();e=new Te(r.lng,r.lat)}return new At(e,this.attributes)},reverseLatLngs:function(e){IA().Util.isArray(e)||(e=[e]);for(var t=0;t0&&t._reset(),t.addTFEvents(),t.mouseMoveHandler=function(e){var r=e.layerPoint;t.currentMousePosition=IA().point(r.x+t.movingOffset[0],r.y+t.movingOffset[1])},e.on("mousemove",t.mouseMoveHandler),t.update(e.getBounds())}else e.removeLayer(t)},addFeatures:function(e){},redrawThematicFeatures:function(e){},destroyFeatures:function(e){if(void 0===e&&(e=this.features),e){this.removeFeatures(e);for(var t=e.length-1;t>=0;t--)e[t].destroy()}},removeFeatures:function(e){var t=this;if(e&&0!==e.length){if(e===t.features)return t.removeAllFeatures();IA().Util.isArray(e)||(e=[e]);for(var r=[],n=e.length-1;n>=0;n--){var o=e[n],i=IA().Util.indexOf(t.features,o);-1!==i?t.features.splice(i,1):r.push(o)}for(var a=[],s=0,l=t.features.length;su)){var v=s[0];s.splice(0,1),delete a[v]}}}}if(t.renderer.render(),n&&t.options.isHoverAble&&t.options.isMultiHover){var m=this.getShapesByFeatureID(n);this.renderer.updateHoverShapes(m)}},createThematicFeature:function(e){var t=this,r=t.getStyleByData(e);e.style&&t.isAllowFeatureStyle&&(r=K.copyAttributesWithClip(e.style));var n={};n.nodesClipPixel=t.options.nodesClipPixel,n.isHoverAble=t.options.isHoverAble,n.isMultiHover=t.options.isMultiHover,n.isClickAble=t.options.isClickAble,n.highlightStyle=tR.transformStyle(t.highlightStyle);for(var o=new _k(e,t,tR.transformStyle(r),n),i=0;i0;if(t.themeField&&s&&r.attributes){var l=t.themeField,u=r.attributes;for(var c in u)if(l===c){i=!0,a=u[c];break}}if(i)for(var f=0,h=o.length;f0;if(t.themeField&&s&&r.attributes){var l=t.themeField,u=r.attributes;for(var c in u)if(l===c){i=!0,a=u[c];break}}if(i)for(var f=0,h=o.length;f=o[f].start&&a<=o[f].end:a>=o[f].start&&a0&&0==this.labelFeatures.length)for(var t=this.setLabelsStyle(this.features),r=0,n=t.length;r=0&&p.x<=u.x&&p.y>=0&&p.y<=u.y){if(r.style.minZoomLevel>-1&&c<=r.style.minZoomLevel)continue;if(r.style.maxZoomLevel>-1&&c>r.style.maxZoomLevel)continue;var y=null;r.isStyleChange?(r.isStyleChange=null,y=this.calculateLabelBounds(r,p)):y=r.geometry.bsInfo.w&&r.geometry.bsInfo.h?this.calculateLabelBounds2(r,p):this.calculateLabelBounds(r,p);var d=new te(0,u.y,u.x,0),v=y.length;if(this.options.isAvoid){var m=this.getAvoidInfo(d,y);if(m){if("left"===m.aspectW){r.style.labelXOffset+=m.offsetX;for(var b=0;b=o[l].start&&a=o[l].start&&as&&(s=r,l="top")}if(t.y>e.bottom){var n=Math.abs(t.y-e.bottom);n>s&&(s=n,l="bottom")}if(t.xa&&(a=o,u="left")}if(t.x>e.right){var i=Math.abs(t.x-e.right);i>a&&(a=i,u="right")}}}},isQuadrilateralOverLap:function(e,t){var r=e.length,n=t.length;if(5!==r||5!==n)return null;for(var o=!1,i=0;i=0&&e.options.fontOpacity<1&&(r.globalAlpha=e.options.fontOpacity),r.fillText){r.font=n,r.textAlign=e.options.textAlign,r.textBaseline=e.options.textBaseline;var s=e.options.vfactor,l=r.measureText("Mg").height||r.measureText("xx").width;t.y+=l*s*(a-1);for(var u=0;u0;){var o=t.pop(),i=o.type,a=o.layerType=o.layerType||"BASE_LAYER";"OVERLAY_LAYER"!==a&&(i=a),this.createLayer(i,o)}this.fire("maploaded",{map:this._map})}},createCRS:function(e,t,r,n,o){return e<0?new FA({bounds:o,origin:n,resolutions:r}):910112===e||910102===e?IA().CRS.BaiduCRS:(910111===e&&(e=3857),910101===e&&(e=4326),IA().Proj.CRS("EPSG:"+e,{origin:n,resolutions:r,bounds:o}))},createMap:function(e){var t=e.crs||IA().CRS.EPSG3857,r=IA().latLngBounds(t.unproject(e.bounds.min),t.unproject(e.bounds.max));this._map=IA().map(this.options.map,{center:r.getCenter(),maxZoom:e.maxZoom||22,minZoom:e.minZoom||0,zoom:e.zoom||0,crs:t,renderer:IA().canvas()}),t instanceof FA?this._map.setZoom(e.zoom?e.zoom+2:2,{maxZoom:e.maxZoom||22}):this._map.fitBounds(r,{maxZoom:e.maxZoom||22})},getResolutionsFromScales:function(e,t,r,n){for(var o=[],i=0;i 0"},datasetNames:[t+":"+r],fromIndex:0,toIndex:1e5});uD(e).getFeaturesBySQL(a,i,o)},createThemeLayer:function(e){var t,r=this,n=e.themeSettings&&JSON.parse(e.themeSettings),o=n.type;if(e.themeSettings=n,(t="HEAT"===o?this.createHeatLayer(e,n):"UNIQUE"===o?this.createUniqueLayer(e,n):"RANGE"===o?this.createRangeLayer(e,n):this.createBaseThemeLayer(e,n))&&(this.addFeature2ThemeLayer(e,t),t.on("add",function(e){r.registerThemeEvent(e.target)})),n&&n.labelField){var i=this.createLabelLayer(e,n);i.on("add",function(e){r.registerThemeEvent(e.target)}),t.labelLayer=i}return t},createBaseThemeLayer:function(e,t){var r=e.style,n=e.opacity,o=t.vectorType,i=r.pointStyle;i.fill="LINE"!==o;var a={};a.radius=i.pointRadius,a.color=i.strokeColor,a.opacity=i.strokeOpacity,a.lineCap=i.strokeLineCap,a.weight=i.strokeWidth,a.fillColor=i.fillColor,a.fillOpacity=i.fillOpacity;var s=function(e,t){return IA().circleMarker(t,a)};return i.unicode&&(s=function(e,t){return new cD(t,i)}),IA().geoJSON({type:"GeometryCollection",geometries:[]},{pointToLayer:s,opacity:n})},createUniqueLayer:function(e,t){for(var r=e.title,n=t.field,o=[],i=t.settings,a=e.isVisible,s=e.opacity,l=t.vectorType,u=0;u0?{fillColor:"#ffffff"}:i[0].style;var s=IA().Util.extend(new fC,r);s.fontWeight="bold",s.fontSize="14px",s.labelRect=!0,s.strokeColor=s.fillColor,s.fontColor=t.labelColor,t.labelFont&&(s.fontFamily=t.labelFont);var l=new sD(n,{visibility:a,opacity:.7});return this.registerThemeEvent(l),l.style=s,l.themeField=o,l.styleGroups=[],l},createHeatLayer:function(e,t){for(var r,n=t.colors||["blue","cyan","lime","yellow","red"],o={},i=0,a=n.length,s=1;i0&&i.push(n[a]);else for(var u=0,c=(n=o.parseFeatureFromJson(t.content)).length;u0&&i.push(n[u]);var f=e.prjCoordSys&&e.prjCoordSys.epsgCode;s?o.changeFeatureLayerEpsgCode(f,"4326",r,i,function(e){R(e)}):R(i)},function(){});else{for(var b=[],g=e.features,S=0,_=g.length;S<_;S++){var w=g[S];if(YI()({attr:w.attributes},m).length>0){var O=w.geometry.points[0].x,x=w.geometry.points[0].y,P=new Te(O,x),C=new At(P,w.attributes,w.style);b.push(C)}}R(b)}}else if(i){var E=e.datasourceName;f=(c=(u=e.subLayers&&JSON.parse(e.subLayers)).length&&u.length>0?u[0]:u)&&c.name,this.getFeaturesBySQL(e.url,E,f,y.filter,t.ISERVER,function(t){var o,i,a=t.result,l=[];if(a&&a.features){for(var u=0,c=(o=a.features).length;u0?u[0]:u)&&c.name;var T=e.prjCoordSys&&e.prjCoordSys.epsgCode;this.getFeaturesBySQL(h,p,f,d,t.ISERVER,function(e){s?o.changeFeatureLayerEpsgCode(T,"4326",r,e,function(e){R(e)}):R(e)})}}function R(t){if(r&&r.labelLayer instanceof sD&&o.addFeature2LabelLayer(r.labelLayer,t,e),IA().HeatLayer&&r instanceof IA().HeatLayer){for(var n=[],i=0,a=t.length;i0){for(i=0,a=n.length;i==/g,">=").replace(/<==/g,"<="))+")":" * where (1==1||1>=0)"},getAttributesObjFromTable:function(e,t){if(0!==e.length&&0!==t.length){for(var r=[],n=0;n-1?(r=(e=JSON.parse(e)).needTransform,t=e.isAddFile):"needTransform"===e?(r=!0,t=!1):t="true"===e,{isAddFile:t,needTransform:r}},registerThemeEvent:function(e){var t=this;e.on("click",function(r){var n;e.map&&(t.selectedFeature&&(t.fire("featureunselected",{feature:t.selectedFeature}),t.selectedFeature=null),r.target&&r.target.refDataID&&(n=e.getFeatureById(r.target.refDataID)),n&&(t.selectedFeature=n,t.fire("featureselected",{feature:n})))}),e.on("mousemove",function(r){var n;e.map&&(r.target&&r.target.refDataID&&(r.target&&r.target.refDataID&&(n=e.getFeatureById(r.target.refDataID)),n&&t.fire("featuremousemove",{feature:n})))})},SERVER_TYPE_MAP:{"EPSG:4326":"WGS84","EPSG:3857":"MERCATOR","EPSG:900913":"MERCATOR","EPSG:102113":"MERCATOR","EPSG:910101":"GCJ02","EPSG:910111":"GCJ02MERCATOR","EPSG:910102":"BD","EPSG:910112":"BDMERCATOR"}});IA().supermap.webmap=function(e,t){return new fD(e,t)}; +/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. + * This program are made available under the terms of the Apache License, Version 2.0 + * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ +var hD=IA().TileLayer.extend({options:{collectionId:null,sqlFilter:null,ids:null,names:null,renderingRule:null,format:"png",zoomOffset:1,transparent:!0,cacheEnabled:!0,tileProxy:null,attribution:CI.Common.attribution,subdomains:null},initialize:function(e,t){this._url=e,IA().TileLayer.prototype.initialize.apply(this,arguments),IA().setOptions(this,t),IA().stamp(this)},onAdd:function(e){IA().TileLayer.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this._getLayerUrl()+"&z="+this._getZoomForUrl()+"&x="+e.x+"&y="+e.y;return this.options.tileProxy&&(t=this.options.tileProxy+encodeURIComponent(t)),this.options.cacheEnabled||(t+="&_t="+(new Date).getTime()),this.options.subdomains&&(t=IA().Util.template(t,{s:this._getSubdomain(e)})),t},_getLayerUrl:function(){return this._layerUrl||this._createLayerUrl()},_createLayerUrl:function(){var e=K.urlPathAppend(this._url,"/collections/".concat(this.options.collectionId,"/tile.").concat(this.options.format));return this.requestParams=this.requestParams||this._getAllRequestParams(),e=K.urlAppend(e,NA.Util.getParamString(this.requestParams)),e=Dr.appendCredential(e),this._layerUrl=e,e},_getAllRequestParams:function(){var e=this.options||{},t={};return t.transparent=!0===e.transparent,t.cacheEnabled=!(!1===e.cacheEnabled),e.sqlFilter&&(t.sqlFilter=e.sqlFilter),e.renderingRule&&(t.renderingRule=JSON.stringify(e.renderingRule)),e.ids&&(t.ids=e.ids.join(",")),e.names&&(t.names=e.names.join(",")),t}});IA().supermap.imageTileLayer=function(e,t){return new hD(e,t)}; +/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. + * This program are made available under the terms of the Apache License, Version 2.0 + * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ +var pD=EI.extend({options:{geometry:null,prjCoordSys:null,excludeField:null},initialize:function(e,t){t=t||{},IA().setOptions(this,t),t.projection&&(this.options.prjCoordSys=t.projection),EI.prototype.initialize.call(this,e,t),this.dataFlow=new ka(e,t),this.dataFlow.events.on({broadcastSocketConnected:this._defaultEvent,broadcastSocketError:this._defaultEvent,broadcastFailed:this._defaultEvent,broadcastSucceeded:this._defaultEvent,subscribeSocketConnected:this._defaultEvent,subscribeSocketError:this._defaultEvent,messageSucceeded:this._defaultEvent,setFilterParamSucceeded:this._defaultEvent,scope:this})},initBroadcast:function(){return this.dataFlow.initBroadcast(),this},broadcast:function(e){this.dataFlow.broadcast(e)},initSubscribe:function(){return this.dataFlow.initSubscribe(),this},setExcludeField:function(e){return this.dataFlow.setExcludeField(e),this.options.excludeField=e,this},setGeometry:function(e){return this.dataFlow.setGeometry(e),this.options.geometry=e,this},unSubscribe:function(){this.dataFlow.unSubscribe()},unBroadcast:function(){this.dataFlow.unBroadcast()},_defaultEvent:function(e){this.fire(e.eventType||e.type,e)}});IA().supermap.dataFlowService=function(e,t){return new pD(e,t)};var yD=function(){try{return mapv}catch(e){return{}}}();function dD(e){"@babel/helpers - typeof";return(dD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vD(e,t){for(var r=0;rt.options.maxZoom)){var a=o.getBounds(),s=a.getEast()-a.getWest(),l=a.getNorth()-a.getSouth(),u=o.getSize(),c=s/u.x,f=l/u.y,h=NI("DEGREE")*c,p=this.canvasLayer.getTopLeft(),y=o.latLngToAccurateContainerPoint(p),d={transferCoordinate:function(e){var r,n={x:(r="2d"===t.context?o.latLngToAccurateContainerPoint(IA().latLng(e[1],e[0])):{x:(e[0]-p.lng)/c,y:(p.lat-e[1])/f}).x-y.x,y:r.y-y.y};return[n.x,n.y]}};void 0!==e&&(d.filter=function(t){var n=r.trails||10;return e&&t.time>e-n&&t.time200&&(this._last=new Date,this.update({data:this.data,options:this.mapVOptions}))},_toMapvStyle:function(e){var t={draw:"simple"};return t.strokeStyle=e.color,t.lineWidth=e.width,t.globalAlpha=e.fillOpacity||e.opacity,t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.fillStyle=e.fillColor,t.size=e.radius,t}}),ED=IA().GeoJSON.extend({initialize:function(e,t){(t=t||{}).style&&!t.pointToLayer&&(t.pointToLayer=function(e,r){return IA().circleMarker(r,t.style())}),IA().Util.setOptions(this,t),this._layers={},IA().stamp(this),this.url=e,this.idCache={}},onMessageSuccessed:function(e){var t=e.featureResult,r=e.featureResult.properties[this.options.idField],n=null;void 0!==r&&this.idCache[r]?(n=this.getLayer(this.idCache[r]),this._updateLayerData(n,t)):((n=IA().GeoJSON.geometryToLayer(t,this.options)).feature=IA().GeoJSON.asFeature(t),this.addLayer(n),void 0!==r&&(this.idCache[r]=this.getLayerId(n))),this.options.onEachFeature&&this.options.onEachFeature(t,n)},_updateLayerData:function(e,t){t.properties&&(e.feature.properties=t.properties);var r=[];switch(t.geometry.type){case"Point":r=IA().GeoJSON.coordsToLatLng(t.geometry.coordinates),e.setLatLng(r);break;case"LineString":r=IA().GeoJSON.coordsToLatLngs(t.geometry.coordinates,0),e.setLatLngs(r);break;case"MultiLineString":case"Polygon":r=IA().GeoJSON.coordsToLatLngs(t.geometry.coordinates,1),e.setLatLngs(r);break;case"MultiPolygon":r=IA().GeoJSON.coordsToLatLngs(t.geometry.coordinates,2),e.setLatLngs(r)}}}),TD=IA().LayerGroup.extend({options:{geometry:null,prjCoordSys:null,excludeField:null,idField:"id",render:"normal"},initialize:function(e,t){t=t||{},IA().Util.setOptions(this,t),this.url=e,this._layers={},this.dataService=new pD(this.url,{geometry:this.options.geometry,prjCoordSys:this.options.prjCoordSys,excludeField:this.options.excludeField})},onAdd:function(e){var t=this;this.dataService.initSubscribe(),this.dataService.on("subscribeSocketConnected",function(e){return t.fire("subscribesucceeded",e)}),this.dataService.on("subscribeSocketError",function(e){return t.fire("subscribefailed",e)}),this.dataService.on("messageSucceeded",function(e){return t._onMessageSuccessed(e)}),this.dataService.on("setFilterParamSucceeded",function(e){return t.fire("setfilterparamsucceeded",e)}),"mapv"===this.options.render?this.addLayer(new CD(this.url,this.options)):this.addLayer(new ED(this.url,this.options)),IA().LayerGroup.prototype.onAdd.call(this,e)},onRemove:function(e){IA().LayerGroup.prototype.onRemove.call(this,e),this.dataService&&this.dataService.unSubscribe()},setExcludeField:function(e){return this.dataService.setExcludeField(e),this.options.excludeField=e,this},setGeometry:function(e){return this.dataService.setGeometry(e),this.options.geometry=e,this},_onMessageSuccessed:function(e){var t=this;this.getLayers().map(function(r){return r.onMessageSuccessed&&(r.onMessageSuccessed(e),t.fire("dataupdated",{layer:r,data:e.featureResult})),r})}});IA().supermap.dataFlowLayer=function(e,t){return new TD(e,t)}; +/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. + * This program are made available under the terms of the Apache License, Version 2.0 + * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ +var RD=IA().Layer.extend({includes:[],_echartsContainer:null,_map:null,_ec:null,_echartsOptions:null,options:{attribution:CI.ECharts.attribution,loadWhileAnimating:!1},initialize:function(e,t){IA().Util.setOptions(this,t),this.setOption(e)},setOption:function(e,t,r){var n=e.baseOption||e;n.LeafletMap=n.LeafletMap||{roam:!0},n.animation=!0===n.animation,this._echartsOptions=e,this._ec&&this._ec.setOption(e,t,r)},getEcharts:function(){return this._ec},_disableEchartsContainer:function(){this._echartsContainer.style.visibility="hidden"},_enableEchartsContainer:function(){this._echartsContainer.style.visibility="visible"},onAdd:function(e){this._map=e,this._initEchartsContainer(),this._ec=gM().init(this._echartsContainer),this._ec.leafletMap=e;var t=this;e.on("zoomstart",function(){t._disableEchartsContainer()}),!t.options.loadWhileAnimating&&e.on("movestart",function(){t._disableEchartsContainer()}),gM().registerAction({type:"LeafletMapLayout",event:"LeafletMapLayout",update:"updateLayout"},function(e){}),gM().registerCoordinateSystem("leaflet",kD),gM().extendComponentModel({type:"LeafletMap",getBMap:function(){return this.__LeafletMap},defaultOption:{roam:!1}}),gM().extendComponentView({type:"LeafletMap",render:function(e,r,n){var o=!0,i=r.scheduler.ecInstance.leafletMap,a=n.getZr().painter.getViewportRoot(),s=i.options.zoomAnimation&&IA().Browser.any3d;a.className=" leaflet-layer leaflet-zoom-"+(s?"animated":"hide")+" echarts-layer";var l=IA().DomUtil.testProp(["transformOrigin","WebkitTransformOrigin","msTransformOrigin"]);a.style[l]="50% 50%";var u=e.coordinateSystem,c=n.getZr().painter.getLayers(),f=function(){if(!o){var r,i=t._map.containerPointToLayerPoint([0,0]),s=[i.x||0,i.y||0];if(a.style.left=s[0]+"px",a.style.top=s[1]+"px",!t.options.loadWhileAnimating){for(var l in c)c.hasOwnProperty(l)&&c[l]&&(r=c[l].ctx)&&r.clearRect&&r.clearRect(0,0,r.canvas.width,r.canvas.height);t._enableEchartsContainer()}u.setMapOffset(s),e.__mapOffset=s,n.dispatchAction({type:"LeafletMapLayout"})}};function h(){o||(n.dispatchAction({type:"LeafletMapLayout"}),t._enableEchartsContainer())}t._oldMoveHandler&&i.off(t.options.loadWhileAnimating?"move":"moveend",t._oldMoveHandler),t._oldZoomEndHandler&&i.off("zoomend",t._oldZoomEndHandler),i.on(t.options.loadWhileAnimating?"move":"moveend",f),i.on("zoomend",h),t._oldMoveHandler=f,t._oldZoomEndHandler=h,o=!1}}),this._ec.setOption(this._echartsOptions)},onRemove:function(){this._ec.clear(),this._ec.dispose(),delete this._ec,IA().DomUtil.remove(this._echartsContainer),this._oldZoomEndHandler&&(this._map.off("zoomend",this._oldZoomEndHandler),this._oldZoomEndHandler=null),this._oldMoveHandler&&(this._map.off(this.options.loadWhileAnimating?"move":"moveend",this._oldMoveHandler),this._oldMoveHandler=null),this._resizeHandler&&(this._map.off("resize",this._resizeHandler),this._resizeHandler=null),delete this._map},_initEchartsContainer:function(){var e=this._map.getSize(),t=document.createElement("div");t.style.position="absolute",t.style.height=e.y+"px",t.style.width=e.x+"px",t.style.zIndex=10,this._echartsContainer=t,this.getPane().appendChild(this._echartsContainer);var r=this;function n(e){var t=e.newSize;r._echartsContainer.style.width=t.x+"px",r._echartsContainer.style.height=t.y+"px",r._ec.resize()}this._map.on("resize",n),this._resizeHandler=n}});function kD(e){this._LeafletMap=e,this.dimensions=["lng","lat"],this._mapOffset=[0,0]}kD.prototype.dimensions=["lng","lat"],kD.prototype.setMapOffset=function(e){this._mapOffset=e},kD.prototype.getBMap=function(){return this._LeafletMap},kD.prototype.prepareCustoms=function(){var e=gM().util,t=this.getViewRect();return{coordSys:{type:"leaflet",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:e.bind(this.dataToPoint,this),size:e.bind(function(t,r){return r=r||[0,0],e.map([0,1],function(e){var n=r[e],o=t[e]/2,i=[],a=[];return i[e]=n-o,a[e]=n+o,i[1-e]=a[1-e]=r[1-e],Math.abs(this.dataToPoint(i)[e]-this.dataToPoint(a)[e])},this)},this)}}},kD.prototype.dataToPoint=function(e){null===e[1]&&(e[1]=IA().CRS.EPSG3857.projection.MAX_LATITUDE);var t=this._LeafletMap.latLngToLayerPoint([e[1],e[0]]),r=this._mapOffset;return[t.x-r[0],t.y-r[1]]},kD.prototype.fixLat=function(e){return e>=90?89.99999999999999:e<=-90?-89.99999999999999:e},kD.prototype.pointToData=function(e){var t=this._mapOffset,r=this._LeafletMap.layerPointToLatLng([e[0]+t[0],e[1]+t[1]]);return[r.lng,r.lat]},kD.prototype.getViewRect=function(){var e=this._LeafletMap.getSize();return new(gM().graphic.BoundingRect)(0,0,e.x,e.y)},kD.prototype.getRoamTransform=function(){return gM().matrix.create()},kD.dimensions=kD.prototype.dimensions,kD.create=function(e){var t,r=e.scheduler.ecInstance.leafletMap;e.eachComponent("LeafletMap",function(e){t||(t=new kD(r)),e.coordinateSystem=t,e.coordinateSystem.setMapOffset(e.__mapOffset||[0,0])}),e.eachSeries(function(e){e.get("coordinateSystem")&&"leaflet"!==e.get("coordinateSystem")||(t||(t=new kD(r)),e.coordinateSystem=t,e.animation=!0===e.animation)})};function MD(e,t){for(var r=0;r=0;o--){var i=void 0,a=void 0,s=r.latLngToLayerPoint(n[o].getLatLng()),l=n[o].getStyle();if(!l&&this.defaultStyle&&(l=this.defaultStyle),l.img){var u=l.img.width,c=l.img.height;l.size&&l.size[0]&&l.size[1]&&(u=l.size[0],c=l.size[1]);var f=l.anchor||[u/2,c/2];i=IA().point(s.x-f[0],s.y-f[1]),a=IA().point(i.x+u,i.y+c)}else i=IA().point(s.x-l.width/2,s.y-l.height/2),a=IA().point(s.x+l.width/2,s.y+l.height/2);if(IA().bounds(i,a).contains(e))return n[o]}return null},containsPoint:function(e){return!!this._getGraphicAtPoint(e)},_handleClick:function(e){e.target=null;var t=this.layer,r=t._map,n=this._getGraphicAtPoint(r.latLngToLayerPoint(e.latlng));if(n)return this.layer._renderer._ctx.canvas.style.cursor="pointer",e.target=n,void("click"===e.type&&t.options.onClick&&t.options.onClick.call(t,n,e));this.layer._renderer._ctx.canvas.style.cursor="auto"},_clearBuffer:DD});IA().Canvas.include({drawGraphics:function(e,t){var r=this;r._drawing&&e.forEach(function(e){var n=e.getStyle();!n&&t&&(n=t),n.img?r._drawImage.call(r,r._ctx,n,e.getLatLng()):r._drawCanvas.call(r,r._ctx,n,e.getLatLng())})},_drawCanvas:function(e,t,r){var n=t,o=this._map.latLngToLayerPoint(r),i=o.x-n.width/2,a=o.y-n.height/2,s=n.width,l=n.height;e.drawImage(n,i,a,s,l)},_drawImage:function(e,t,r){var n,o;if(t.size){var i=t.size;n=i[0],o=i[1]}else n=t.img.width,o=t.img.height;var a=this._coordinateToPoint(r),s=IA().point(a),l=IA().point(t.anchor||[n/2,o/2]);a=[s.x-l.x,s.y-l.y],e.drawImage(t.img,a[0],a[1],n,o)},_coordinateToPoint:function(e){if(!this._map)return e;var t=e;IA().Util.isArray(e)?t=IA().latLng(e[0],e[1]):e instanceof IA().LatLng&&(t=IA().latLng(e.lat,e.lng));var r=this._map.latLngToLayerPoint(t);return[r.x,r.y]}}); +/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. + * This program are made available under the terms of the Apache License, Version 2.0 + * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ +var BD=IA().Util.falseFn,UD=function(){for(var e=document.createElement("div"),t=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],r=0;r-1&&(this._data=e),this._renderLayer.setChangeFlags({dataChanged:!0,propsChanged:!0,viewportChanged:!0,updateTriggersChanged:!0}),this._refreshData();var t=this._getLayerState();t.data=this._data||[],this._layerDefaultStyleCache=null,this._renderLayer.setNeedsRedraw(!0),this._renderLayer.setState(t)},drawGraphics:function(e){this._clearBuffer();var t=this.layer._map.getSize();this._container.width!==t.x&&(this._container.width=t.x),this._container.height!==t.y&&(this._container.height=t.y);var r=this.layer._map.getPanes().mapPane._leaflet_pos;this._container.style[UD]="translate("+-Math.round(r.x)+"px,"+-Math.round(r.y)+"px)",this._data=e||[],this._renderLayer||this._createInnerRender(),this._draw()},_initContainer:function(){this._container=this._createCanvas(this.options.width,this.options.height),this._layerContainer=this.options.container,this._wrapper=IA().DomUtil.create("div","deck-wrapper",this._layerContainer),this._wrapper.appendChild(this._container)},_createCanvas:function(e,t){var r=IA().DomUtil.create("canvas","graphicLayer leaflet-layer leaflet-zoom-hide");return r.oncontextmenu=IA().Util.falseFn,r.width=e,r.height=t,r.style.width=e+"px",r.style.height=t+"px",r},_pixelToMeter:function(e){var t=this.layer._map.getBounds();return e*((t.getEast()-t.getWest())/this.layer._map.getSize().x*(6378137*Math.PI/180))},_createInnerRender:function(){var e=this,t=this._getLayerState(),r=t.color,n=t.radius,o=t.opacity,i=t.highlightColor,a=t.radiusScale,s=t.radiusMinPixels,l=t.radiusMaxPixels,u=t.strokeWidth,c=t.outline,f={id:"scatter-plot",data:e._data,pickable:Boolean(this.options.onClick)||Boolean(this.options.onHover),autoHighlight:!0,color:r,opacity:o,radius:n,radiusScale:a,highlightColor:i,radiusMinPixels:s,radiusMaxPixels:l,strokeWidth:u,coordinateSystem:this._isWGS84()?window.DeckGL.COORDINATE_SYSTEM.LNGLAT_OFFSETS:window.DeckGL.COORDINATE_SYSTEM.LNGLAT,isGeographicCoordinateSystem:this._isWGS84(),outline:c,getPosition:function(e){if(!e)return[0,0,0];var t=e.getLatLng();return t&&[t.lng,t.lat,0]},getColor:function(t){var r=e._getLayerDefaultStyle(),n=t&&t.options;return n&&n.color||r.color},getRadius:function(t){var r=e._getLayerDefaultStyle(),n=t&&t.getStyle();return n&&n.radius||r.radius},updateTriggers:{getColor:[r],getRadius:[n]}},h=this;this.options.onClick&&(f.onClick=function(){h._container.style.cursor="pointer",h.options.onClick.apply(h,arguments)}),this.options.onHover&&(f.onHover=function(){h._container.style.cursor="pointer",h.options.onHover.apply(h,arguments)}),e._renderLayer=new window.DeckGL.ScatterplotLayer(f)},_getLayerDefaultStyle:function(){if(this._layerDefaultStyleCache)return this._layerDefaultStyleCache;var e=this.layer.options,t=e.color,r=e.opacity,n=e.radius,o=e.radiusScale,i=e.radiusMinPixels,a=e.radiusMaxPixels,s=e.strokeWidth,l=e.outline;return n=this._pixelToMeter(n),this._layerDefaultStyleCache={color:t,opacity:r,radius:n,radiusScale:o,radiusMinPixels:i,radiusMaxPixels:a,strokeWidth:s,outline:l},this._layerDefaultStyleCache},_getLayerState:function(){var e=this.layer.getState();return e.zoom=e.zoom-1,e},_draw:function(){var e=this._getLayerState();this._refreshData(),e.data=this._data||[];var t={};for(var r in e)t[r]=e[r];this._layerDefaultStyleCache=null,this._renderLayer.setNeedsRedraw(!0),t.layers=[this._renderLayer],t.canvas=this._container,t.onBeforeRender=this._onBeforeRender.bind(this),t.onAfterRender=this._onAfterRender.bind(this),t.coordinateSystem=this._isWGS84()?window.DeckGL.COORDINATE_SYSTEM.LNGLAT_OFFSETS:window.DeckGL.COORDINATE_SYSTEM.LNGLAT,t.isGeographicCoordinateSystem=this._isWGS84(),this.deckGL?this.deckGL.setProps(t):this.deckGL=new window.DeckGL.experimental.DeckGLJS(t)},_clearBuffer:function(){if(this.deckGL){var e=this.deckGL.layerManager;e&&e.context.gl.clear(e.context.gl.COLOR_BUFFER_BIT)}return this},_refreshData:function(){var e=this._data||[],t=IA().Util.isArray(e)?[].concat(e):[e];this._renderLayer.props.data||(this._renderLayer.props.data=[]),this._renderLayer.props.data.length=0;for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:null;if(!e||0===e.length||e===this.graphics)return this.graphics.length=0,void this.update();K.isArray(e)||(e=[e]);for(var t=e.length-1;t>=0;t--){var r=e[t],n=K.indexOf(this.graphics,r);-1!==n&&this.graphics.splice(n,1)}this.update()},setStyle:function(e){var t=this.options,r={color:t.color,radius:t.radius,opacity:t.opacity,highlightColor:t.highlightColor,radiusScale:t.radiusScale,radiusMinPixels:t.radiusMinPixels,radiusMaxPixels:t.radiusMaxPixels,strokeWidth:t.strokeWidth,outline:t.outline};this.options=IA().Util.extend(this.options,r,e),this.defaultStyle=this._getDefaultStyle(this.options),this.update()},update:function(){this._layerRenderer.update(this.graphics)},clear:function(){this.removeGraphics()},getRenderer:function(){return this._renderer},getState:function(){var e=this._map,t=e.getSize().x,r=e.getSize().y,n=e.getCenter(),o=n.lng,i=n.lat,a=JD[this._crs.code]||0;HD[this._crs.code]&&this._crs.resolutions&&this._crs.resolutions.length>0&&(a=Math.round(Math.log2(HD[this._crs.code]/this._crs.resolutions[0])));var s={longitude:o,latitude:i,zoom:e.getZoom()+a,maxZoom:e.getMaxZoom()+a,pitch:0,bearing:0},l={};for(var u in s)l[u]=s[u];l.width=t,l.height=r;var c=this.options;return l.color=c.color,l.radius=c.radius,l.opacity=c.opacity,l.highlightColor=c.highlightColor,l.radiusScale=c.radiusScale,l.radiusMinPixels=c.radiusMinPixels,l.radiusMaxPixels=c.radiusMaxPixels,l.strokeWidth=c.strokeWidth,l.outline=c.outline,l},_resize:function(){var e=this._map.getSize();this._container.width=e.x,this._container.height=e.y,this._container.style.width=e.x+"px",this._container.style.height=e.y+"px";var t=this._map.containerPointToLayerPoint([0,0]);IA().DomUtil.setPosition(this._container,t),this._update()},_moveEnd:function(){this._layerRenderer instanceof GD&&this._update()},_createRenderer:function(){var e,t=this._map,r=t.getSize().x,n=t.getSize().y;if(this.options.render===zD[0])e=new FD(this,{width:r,height:n,renderer:t.getRenderer(this)});else{var o=IA().Util.setOptions({},VD),i=IA().Util.setOptions({options:o},this.options);(i=IA().Util.setOptions(this,i)).container=t.getPane("overlayPane"),i.width=r,i.height=n,e=new GD(this,i)}return e.defaultStyle=this.defaultStyle,this._layerRenderer=e,this._layerRenderer.getRenderer()},_update:function(){this._map&&this._updatePath()},_updatePath:function(){var e=this._getGraphicsInBounds();this._renderer.drawGraphics(e,this.defaultStyle)},_project:function(){var e=this;e._getGraphicsInBounds().map(function(t){var r=e._map.latLngToLayerPoint(t.getLatLng()),n=e._clickTolerance(),o=[t._anchor+n,t._anchor+n];return t._pxBounds=new(IA().Bounds)(r.subtract(o),r.add(o)),t}),e._pxBounds=IA().bounds(IA().point(0,0),IA().point(this._container.width,this._container.height))},_getDefaultStyle:function(e){var t={};if(e.color){t.fill=!0;var r=this.toRGBA(e.color);t.color=r,t.fillColor=r}return e.opacity&&(t.opacity=e.opacity,t.fillOpacity=e.opacity),e.radius&&(t.radius=e.radius),e.strokeWidth&&(t.weight=e.strokeWidth),e.outline&&(t.stroke=e.outline),new ND(t).getStyle()},toRGBA:function(e){return"rgba(".concat(e[0],",").concat(e[1],",").concat(e[2],",").concat((e[3]||255)/255,")")},_getGraphicsInBounds:function(){var e=[],t=this._map.getBounds();return this.graphics.map(function(r){return t.contains(r.getLatLng())&&e.push(r),r}),e},_handleClick:function(e){this._layerRenderer._handleClick(e)},beforeAdd:IA().Util.falseFn,_containsPoint:function(e){return this._layerRenderer.containsPoint(e)}});IA().supermap.graphicLayer=function(e,t){return new qD(e,t)}; +/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. + * This program are made available under the terms of the Apache License, Version 2.0 + * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ +var WD=nD.extend({options:{isOverLay:!0},initialize:function(e,t,r){var n=[];n.push(e),n.push(r),nD.prototype.initialize.apply(this,n),this.chartsType=t,this.themeFields=r&&r.themeFields?r.themeFields:null,this.charts=r&&r.charts?r.charts:[],this.cache=r&&r.cache?r.cache:{},this.chartsSetting=r&&r.chartsSetting?r.chartsSetting:{}},setChartsType:function(e){this.chartsType=e,this.redraw()},addFeatures:function(e){var t=this;t.fire("beforefeaturesadded",{features:e}),this.features=this.toiClientFeature(e),t.renderer&&(t._map?t.redrawThematicFeatures(t._map.getBounds()):t.redrawThematicFeatures())},redrawThematicFeatures:function(e){var t=this;t.renderer.clearAll();var r=t.features;if(this.options.alwaysMapCRS&&e&&e instanceof IA().LatLngBounds){var n=this._map.options.crs;e=IA().bounds(n.project(e.getSouthWest()),n.project(e.getNorthEast()))}e=AI.toSuperMapBounds(e);for(var o=0,i=r.length;o=r.left&&a.x<=r.right&&a.y>=r.top&&a.y<=r.bottom){n=!0;break}}return n},clearCache:function(){this.cache={},this.charts=[]},removeFeatures:function(e){this.clearCache(),nD.prototype.removeFeatures.apply(this,arguments)},removeAllFeatures:function(){this.clearCache(),nD.prototype.removeAllFeatures.apply(this,arguments)},redraw:function(){return this.clearCache(),nD.prototype.redraw.apply(this,arguments)},clear:function(){var e=this;e.renderer&&(e.renderer.clearAll(),e.renderer.refresh()),e.removeAllFeatures(),e.clearCache()},getWeightFieldValue:function(e,t,r){if((void 0===r||isNaN(r))&&(r=0),!e.attributes)return r;var n=e.attributes[t];return(void 0===n||isNaN(n))&&(n=r),n},_sortChart:function(){this.charts&&this.charts.sort(function(e,t){return void 0===e.__overlayWeight&&void 0===t.__overlayWeight?0:void 0!==e.__overlayWeight&&void 0===t.__overlayWeight?-1:void 0===e.__overlayWeight&&void 0!==t.__overlayWeight?1:void 0!==e.__overlayWeight&&void 0!==t.__overlayWeight?parseFloat(e.__overlayWeight)1?r.weight/10:r.weight)):t.setAttribute("stroke","none"),r.fill?(t.setAttribute("fill",r.fillColor||r.color),t.setAttribute("fill-opacity",r.fillOpacity)):t.setAttribute("fill","none")}});var aF=IA().CircleMarker.extend({includes:rF.prototype,statics:{iconCache:{}},initialize:function(e,t){rF.prototype.initialize.call(this,e),this._makeFeatureParts(e,t)},getLatLng:void 0,render:function(e,t){rF.prototype.render.call(this,e,t),this._radius=t.radius||IA().CircleMarker.prototype.options.radius,this._updatePath()},_makeFeatureParts:function(e,t){t=t||{x:1,y:1};var r=e.geometry[0];"object"===iF(r[0])&&"x"in r[0]?(this._point=IA().point(r[0]).scaleBy(t),this._empty=IA().Util.falseFn):(this._point=IA().point(r).scaleBy(t),this._empty=IA().Util.falseFn)},makeInteractive:function(){this._updateBounds()},updateStyle:function(e,t){return this._radius=t.radius||this._radius,this._updateBounds(),rF.prototype.updateStyle.call(this,e,t)},_updateBounds:function(){if(this.options.iconUrl&&this.options.iconSize){var e=IA().point(this.options.iconSize),t=e&&e.divideBy(2,!0),r=this._point.subtract(t);this._pxBounds=new(IA().Bounds)(r,r.add(e))}else IA().CircleMarker.prototype._updateBounds.call(this)},_updatePath:function(){this.options.iconUrl?this._renderer._updateIcon(this):IA().CircleMarker.prototype._updatePath.call(this)},_getImage:function(){if(!this.options.iconUrl)return null;var e=this.options.iconUrl,t=aF.iconCache[e];if(!t){var r=this.options.iconSize||[50,50];t=aF.iconCache[e]=this._createIcon(e,r)}return t},_createIcon:function(e,t){var r=e;if(!r)throw new Error("iconUrl not set in Icon options (see the docs).");var n=document.createElement("img");n.src=r,n.className="leaflet-marker-icon "+(this.layerName||"");var o=t;if("number"==typeof o&&(o=[o,o]),o){var i=IA().point(o),a=IA().point(i&&i.divideBy(2,!0));i&&(n.style.width=i.x+"px",n.style.height=i.y+"px"),a&&(n.style.marginLeft=-a.x+"px",n.style.marginTop=-a.y+"px")}return n.onload=function(){o||(n.style.width=this.width+"px",n.style.height=this.height+"px")},n},_containsPoint:function(e){return this.options.iconUrl?this._pxBounds.contains(e):IA().CircleMarker.prototype._containsPoint.call(this,e)}}),sF={_makeFeatureParts:function(e,t){t=t||{x:1,y:1};var r,n=e.geometry;this._parts=[];for(var o=0;o-1?new pF(n):new yF(n)).getTile().then(function(t){e.render(t,r)})},render:function(e,t){if(e){for(var r=this,n=r.renderer,o=r.layer,i=0;i0&&a[a.length-1]}t.properties.textField=i}r.vectorTileLayerStyles=r.vectorTileLayerStyles||{};var s=r.vectorTileLayerStyles[n];if(s)return t=this._mergeFeatureTextField(t,s),s;var l=this.getScaleFromCoords(e),u=this.cartoCSSToLeaflet.pickShader(n)||[];for(var c in s=[],u)for(var f=u[c],h=0;h1){var c=parseInt(u[1]);s=c&&c>=4e3&&c<=5e3?l.DEGREE:l.METER}}return II(a,96,s)},_mergeFeatureTextField:function(e,t){if(!this.options.serverCartoCSSStyle||!t||"TEXT"!==e.type)return e;var r=t;IA().Util.isArray(t)||(r=[t]);for(var n=0;n0?this.convertFastToPixelPoints(e):this.canvasContext.clearRect(0,0,this.maxWidth,this.maxWidth)},convertFastToPixelPoints:function(e){var t,r,n,o,i,a,s,l=[],u=e.getEast()-e.getWest(),c=e.getNorth()-e.getSouth(),f=this._map.getSize();o=u/f.x>c/f.y?u/f.x:c/f.y,this.useRadius=this.useGeoUnit?parseInt(this.radius/o):this.radius;for(var h=0;h0&&this.maxWidth>0))return!1;var r=this.canvasContext;this.canvasContext.clearRect(0,0,this.maxWidth,this.maxHeight),this.drawCircle(this.useRadius),this.createGradient();for(var n=0;nthis.fileModel.FileConfig.fileMaxSize)return this.fire("filesizeexceed",{messageType:"warring",message:SM.i18n("msg_fileSizeExceeded")}),!1;var n=t.value,o=r.name,i=LA.getFileType(o);if(!i)return this.fire("errorfileformat",{messageType:"failure",message:SM.i18n("msg_fileTypeUnsupported")}),!1;""!==o&&(this.fileModel.set("loadFileObject",{file:r,filePath:n,fileName:o,fileType:i}),this._readData())},_readData:function(){var e=this,t=this,r=this.fileModel.loadFileObject.fileType;OM.readFile(r,{file:this.fileModel.loadFileObject.file,path:this.fileModel.loadFileObject.filePath},function(n){OM.processDataToGeoJson(r,n,function(t){t&&e.fire("openfilesucceeded",{result:t,layerName:e.fileModel.loadFileObject.fileName.split(".")[0]})},function(e){t.fire("openfilefailed",{messageType:"failure",message:e})},e)},function(){t.fire("openfilefailed",{messageType:"failure",message:SM.i18n("msg_openFileFail")})},this)}});IA().supermap.components.openFileViewModel=function(e){return new VF(e)},IA().supermap.components.util=LA; +/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. + * This program are made available under the terms of the Apache License, Version 2.0 + * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ +var HF=zF.extend({options:{layer:null},initialize:function(e){zF.prototype.initialize.apply(this,[e]),this.viewModel=new VF},setViewStyle:function(e,t){this.rootContainer.style[e]=t},_initView:function(){var e=this,t=IA().DomUtil.create("div","component-openfile");return t.id="openFile",this.fileSelect=IA().DomUtil.create("div","",t),this.label=IA().DomUtil.create("label","component-openfile__span--select",this.fileSelect),this.label.htmlFor="input_file",IA().DomUtil.create("div","supermapol-icons-upload",this.label),IA().DomUtil.create("span","component-openfile__span",this.label).appendChild(document.createTextNode(SM.i18n("text_chooseFile"))),this.fileInput=IA().DomUtil.create("input","component-openfile__input",this.fileSelect),this.fileInput.id="input_file",this.fileInput.type="file",this.fileInput.accept=".json,.geojson,.csv,.xls,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel",this.fileInput.onchange=function(t){e.messageBox.closeView(),e.viewModel.readFile(t)},this.messageBox=new mM,this.viewModel.on("filesizeexceed",function(t){e.messageBox.showView(t.message,t.messageType)}),this.viewModel.on("errorfileformat",function(t){e.messageBox.showView(t.message,t.messageType)}),this.viewModel.on("openfilefailed",function(t){e.messageBox.showView(t.message,t.messageType),e._event.fire("openfilefailed",t)}),this.viewModel.on("readdatafail",function(t){e.messageBox.showView(t.message,t.messageType)}),this.viewModel.on("openfilesucceeded",function(t){e._event.fire("openfilesucceeded",t)}),this._preventMapEvent(t,this.map),t}});IA().supermap.components.openFile=function(e){return new HF(e)};function JF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qF(e,t){for(var r=0;r0&&this.addLayers(t),this.currentLayerDataModel=null}return WF(e,[{key:"addLayers",value:function(e,t,r,n){for(var o=0;o0?n.operatingAttributeNames:n.attributeNames).length;a0?this.fire("searchlayersucceeded",{result:r}):this.fire("searchfailed",{searchType:"searchLayersField"})}},searchFromCityLocalSearchService:function(e){if(this.searchCache[e])this.fire("geocodesucceeded",{result:this.searchCache[e]});else{this.geoCodeParam.keyWords=e||this.geoCodeParam.city;var t=this,r=this._getSearchUrl(this.geoCodeParam);Nr.get(r).then(function(e){return e.json()}).then(function(e){if(e.error||0===e.poiInfos.length)t.fire("searchfailed",{searchType:"searchGeocodeField"});else if(e.poiInfos){var r=t._dataToGeoJson(e.poiInfos,t.geoCodeParam);t.fire("geocodesucceeded",{result:r})}})}},addSearchLayers:function(e){var t=this;this.dataModel.addLayers(e,function(e){t.fire("newlayeradded",{layerName:e.layerName})},null,this)},panToLayer:function(e){this.dataModel.layers[e]&&this.map.flyToBounds(this.dataModel.layers[e].layer.getBounds())},panToCity:function(e){this.geoCodeParam.keyWords=e,this.geoCodeParam.city=e;var t=this,r=this._getSearchUrl(this.geoCodeParam);Nr.get(r).then(function(e){return e.json()}).then(function(e){if(e.poiInfos.length>0){var r=IA().latLng(e.poiInfos[0].location.y,e.poiInfos[0].location.x);t.map.setView(r,8)}else t.fire("searchfailed",{searchType:"cityGeocodeField"})})},_dataToGeoJson:function(e,t){for(var r=[],n=0;n0&&document.getElementsByClassName("component-single-checked-img")[0].setAttribute("class","component-single-default-img"),r.firstChild.setAttribute("class","component-single-checked-img"),t.currentSearchLayerName=r.lastChild.innerText,t.isSearchLayer=!0,i.removeChild(i.firstChild),i.insertBefore(document.createTextNode(t.currentSearchLayerName),i.firstChild),t.viewModel.panToLayer(t.currentSearchLayerName),t.messageBox.closeView()},r.appendChild(f),e}(),c=[];s&&c.push({title:SM.i18n("title_searchCity"),content:s}),c.push({title:SM.i18n("title_searchLayer"),content:u});var f=new EA({tabs:c}),h=f.getElement();f.closeView(),n.appendChild(h),o.onclick=function(){h.hidden?f.showView():f.closeView()},n.appendChild(o),i.innerText||i.appendChild(document.createTextNode(SM.i18n("text_label_chooseSearchLayers")));var p=document.createElement("div");p.setAttribute("class","component-search__input");var y=document.createElement("input");y.type="text",y.placeholder=SM.i18n("text_label_searchTips"),p.appendChild(y),this.poiInput=y;var d=document.createElement("span");d.setAttribute("class","supermapol-icons-close"),d.hidden=!0,p.appendChild(d),n.appendChild(p);var v=document.createElement("div");v.setAttribute("class","component-search-icon supermapol-icons-search");var m=new jA;this._resultDomObj=m,v.onclick=function(){m.closeView(),e.clearSearchResult(),e.messageBox.closeView(),f.closeView();var t=e.poiInput.value.trim();""!==t?e.isSearchLayer?e.viewModel.search(t,e.currentSearchLayerName):e.viewModel.search(t):e.messageBox.showView(SM.i18n("msg_searchKeywords"))},y.onkeypress=function(e){if(13==e.which){var t=document.createEvent("HTMLEvents");t.initEvent("click",!1,!0),v.dispatchEvent(t)}},n.appendChild(v);var b=function(){var e=m.getElement();return e.style.position="absolute",e.style.top="44px",e.style.right="0",m.closeView(),m.content.onclick=function(e){var r=null;if("component-search-result-info"===e.target.parentNode.className)r=e.target.parentNode.parentNode;else if("component-search__resultitme"===e.target.parentNode.className)r=e.target.parentNode;else{if("component-search__resultitme"!==e.target.className)return;r=e.target}document.getElementsByClassName("component-search__resultitme-selected").length>0&&document.getElementsByClassName("component-search__resultitme-selected")[0].classList.remove("component-search__resultitme-selected"),r.firstChild.classList.add("component-search__resultitme-selected");var n=r.children[1].firstChild.innerText;t._linkageFeature(n)},e}();return n.appendChild(b),d.onclick=function(t){e.clearSearchResult(),y.value="",t.target.hidden=!0,m.closeView()},y.oninput=function(){d.hidden=!1},this.messageBox=new mM,this._addViewModelListener(),r.appendChild(n),this._preventMapEvent(r,this.map),r},_createSearchLayerItem:function(e){var t=document.createElement("div");t.setAttribute("class","component-search__layers__itme");var r=document.createElement("div");r.setAttribute("class","component-search__layers__itme__singleselect");var n=document.createElement("div");n.setAttribute("class","component-single-default-img"),r.appendChild(n);var o=document.createElement("span");o.setAttribute("class","single-label"),o.innerHTML=e,r.appendChild(o),t.appendChild(r),document.getElementsByClassName("component-search__layers__body")[0].appendChild(t)},_createResultItem:function(e,t){var r=document.createElement("div");r.setAttribute("class","component-search__resultitme");var n=document.createElement("div");"Point"===e||"MultiPoint"===e?n.setAttribute("class","supermapol-icons-marker-layer component-search-result-icon"):"LineString"===e||"MultiLineString "===e?n.setAttribute("class","supermapol-icons-line-layer component-search-result-icon"):"Polygon"===e||"MultiPolygon"===e?n.setAttribute("class","supermapol-icons-polygon-layer component-search-result-icon"):n.setAttribute("class","supermapol-icons-point-layer component-search-result-icon"),r.appendChild(n);var o=document.createElement("div");o.setAttribute("class","component-search-result-info");var i=document.createElement("div");o.appendChild(i);var a=document.createElement("div");return t.name?(i.innerHTML=t.name,a.innerHTML=t.address,o.appendChild(a)):i.innerHTML=t.filterAttributeName+": "+t.filterAttributeValue,r.appendChild(o),document.createElement("div").setAttribute("class","component-checkbox component-checkbox-default-img"),r},_addViewModelListener:function(){var e=this;this.viewModel.on("searchlayerschanged",function(t){for(var r=0;rt.length?(n=this.perPageDataNum*(e-1),r=t.length-1):(n=this.perPageDataNum*(e-1),r=e*this.perPageDataNum-1);for(var o=document.createElement("div"),i=n;i<=r;i++){var a=void 0,s="Point";t[i].filterAttribute?(s=t[i].feature.geometry.type,a=t[i].filterAttribute):a=t[i].properties,o.appendChild(this._createResultItem(s,a))}this._resultDomObj.setContent(o),this._resultDomObj.showView(),o.firstChild.getElementsByClassName("component-search-result-icon")[0].classList.add("component-search__resultitme-selected");var l=o.firstChild.getElementsByClassName("component-search-result-info")[0].firstChild.innerText;!this._selectMarkerFeature&&this._linkageFeature(l)},_flyToBounds:function(e){var t=e.getSouthWest(),r=e.getNorthEast();t.lat===r.lat&&t.lng===r.lng?this.map.flyTo(t):this.map.fitBounds(e)},_linkageFeature:function(e){var t=this,r="";r=this.isSearchLayer?e.split(":")[1].trim():e,this._selectFeature&&this._selectFeature.addTo(this.map),this.searchResultLayer.eachLayer(function(e){(!r||e.filterAttribute&&e.filterAttribute.filterAttributeValue===r||e.feature.properties&&e.feature.properties.name===r)&&(e.remove(),t._setSelectedLayerStyle(e))})},clearSearchResult:function(){this.searchResultLayer&&(this.map.closePopup(),!this.isSearchLayer&&this.map.removeLayer(this.searchResultLayer),this._selectMarkerFeature&&this.map.removeLayer(this._selectMarkerFeature),this._selectFeaturethis&&this.map.removeLayer(this._selectFeature),this._selectMarkerFeature=null,this._selectFeature=null,this.searchResultLayer=null,this.currentResult=null)},_featureOnclickEvent:function(e,t){var r=this;t.on("click",function(){var n,o,i=document.getElementsByClassName("component-pagination__link")[0];r._resultDomObj._changePageEvent({target:i.children[0].children[0]}),r._selectFeature&&r._selectFeature.addTo(r.map),t.remove();for(var a=0;a1)for(var l=1;l0&&document.getElementsByClassName("component-search__resultitme-selected")[0].classList.remove("component-search__resultitme-selected"),h.firstChild.classList.add("component-search__resultitme-selected"),r._setSelectedLayerStyle(t)}},this)},_setSelectedLayerStyle:function(e){var t;this._selectMarkerFeature&&this._selectMarkerFeature.remove(),this._selectMarkerFeature=null,this._selectFeature=e,this._selectMarkerFeature=IA().geoJSON(e.toGeoJSON(),{pointToLayer:function(e,t){return IA().marker(t,{icon:IA().divIcon({className:"component-select-marker-icon",iconAnchor:[15,0]})})},style:{fillColor:"red",weight:1,opacity:1,color:"red",fillOpacity:.2}}).addTo(this.map),this._selectMarkerFeature.bindPopup(function(){return new uA({attributes:e.feature.properties}).getElement()},{closeOnClick:!1}).openPopup().addTo(this.map),this._flyToBounds(this.searchResultLayer.getBounds()),e.getLatLng?t=e.getLatLng():e.getCenter&&(t=e.getCenter()),this.map.setView(t)}});IA().supermap.components.search=function(e){return new KF(e)}; +/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. + * This program are made available under the terms of the Apache License, Version 2.0 + * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ +var ZF=IA().Evented.extend({options:{_defaultLayerOptions:{style:null,onEachFeature:function(e,t){var r="属性信息如下:
";for(var n in e.properties)r+=n+": "+e.properties[n]+"
";t.bindPopup(r)}}},initialize:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e)return new Error("Cannot find map, fileModel.map cannot be null.");this.map=e,IA().Util.extend(this.options._defaultLayerOptions,t),this.options._defaultLayerOptions.pointToLayer=this.options._defaultLayerOptions.style,this.popupsStatus=!0,this.dataFlowStatus=!1,this.dataFlowUrl="",this.currentFeatures=[],this.dataFlowLayer=null},subscribe:function(e){var t=this;if(this.dataFlowUrl===e){if(this.dataFlowStatus)return void this.fire("dataflowservicesubscribed")}else this.dataFlowUrl=e;this.dataFlowStatus=!0,this.dataFlowLayer&&(this.dataFlowLayer.remove(),this.dataFlowLayer=null);var r=new TD(e,this.options._defaultLayerOptions);r.on("subscribesucceeded",function(e){t.fire("subscribesucceeded",{result:e})}),r.on("subscribefailed",function(e){t.fire("subscribefailed",{result:e})}),r.on("dataupdated",function(e){t.fire("dataupdated",{result:e});var r=e.layer.getBounds(),n=AI.toSuperMapBounds(t.map.getBounds()),o=AI.toSuperMapBounds(r);n.intersectsBounds(o)||(o.left===o.right&&o.top===o.bottom?t.map.setView(r.getCenter()):t.map.flyToBounds(r)),t.popupsStatus&&t.openPopups()}),r.addTo(this.map),this.dataFlowLayer=r},cancelSubscribe:function(){this.dataFlowLayer&&(this.dataFlowStatus=!1,this.dataFlowLayer.dataService.unSubscribe(),this.dataFlowLayer.remove(),this.dataFlowLayer=null)},openPopups:function(){if(this.popupsStatus=!0,this.dataFlowLayer)for(var e=this.dataFlowLayer.getLayers(),t=0;t\n \n \n \n \n ',IA().DomUtil.create("span","",Z).innerHTML=SM.i18n("btn_analyzing");var ee=IA().DomUtil.create("button","component-analysis__analysisbtn--cancel",K);ee.innerHTML=SM.i18n("btn_cancelAnalysis");var te=IA().DomUtil.create("button","component-analysis__analysisbtn--analysis component-analysis__analysisbtn--deletelayers",Q);te.innerHTML=SM.i18n("btn_emptyTheAnalysisLayer");for(var re=function(t){a.children[t].onclick=function(){i.innerHTML=a.children[t].outerHTML,i.children[0].id="dropDownTop";var r=document.getElementById("layersSelect"),o=document.getElementById("layerSelectName"),s=a.children[t].getAttribute("data-value"),l={};switch(s){case"buffer":d.classList.add("hidden"),M.classList.remove("hidden"),n.style.height="422px",W.value=SM.i18n("text_label_buffer")+o.title,l=e.fillData.point;break;case"isolines":d.classList.remove("hidden"),M.classList.add("hidden"),n.style.height="712px",W.value=SM.i18n("text_label_isolines")+o.title,l=e.fillData.point}if(e.currentFillData!==l){if(r.innerHTML="","{}"==JSON.stringify(l))return W.value="",o.title="",void(o.innerHTML="");var u=[];for(var c in l)u.push(c);o.title=u[0],o.innerHTML=u[0],e._createOptions(r,u),e.layerSelectObj.optionClickEvent(r,o,e.layersSelectOnchange),"buffer"===s?W.value=SM.i18n("text_label_buffer")+u[0]:"isolines"===s&&(W.value=SM.i18n("text_label_isolines")+u[0]),e.currentData=l[o.title],e.currentFillData=l}}},ne=0;ne\n \n \n \n \n ',IA().DomUtil.create("span","",ne).innerHTML=SM.i18n("btn_analyzing");var oe=IA().DomUtil.create("button","component-analysis__analysisbtn--analysis component-analysis__analysisbtn--deletelayers",ee);function ie(e){if(this.messageBox.closeView(),this.dataHash){T.innerHTML="";var t=this.dataHash[e.title],r=this;this.viewModel.on("datasetinfoloaded",function(e){E.title=SM.i18n("text_option_notSet"),E.innerHTML=SM.i18n("text_option_notSet"),T.innerHTML="";var t=i.getAttribute("data-value"),n=e.result.type,o=e.result.fields;"density"===t&&("REGION"===n||"LINE"===n?r.messageBox.showView(SM.i18n("msg_datasetOrMethodUnsupport"),"failure"):(r.messageBox.closeView(),r._createOptions(T,o),r.weightFieldsSelectObj.optionClickEvent(T,E)))}),this.viewModel.getDatasetInfo(t)}}return oe.id="deleteLayersBtn",oe.innerHTML=SM.i18n("btn_emptyTheAnalysisLayer"),this.messageBox=new mM,this.datasetSelectOnchange=ie.bind(this),te.onclick=function(){e.messageBox.closeView();var t=function(){var e,t,r=i.getAttribute("data-value"),n=O.getAttribute("data-value"),o=P.getAttribute("data-value"),a=M.value,s=N.title,l=B.title,u=z.title,c=X.getAttribute("data-value"),f=J.getAttribute("data-value"),h=new Date,y=Z.value||h.getTime();e="NOTSET"===f?"":{rangeMode:f,rangeCount:W.value,colorGradientType:c};"density"===r&&(t=new Xv({datasetName:p.title,method:n,meshType:o,resolution:L.value,fields:E.title,radius:F.value,meshSizeUnit:s,radiusUnit:l,areaUnit:u,query:a,mappingParameters:new si({rangeMode:e.rangeMode,rangeCount:e.rangeCount,colorGradientType:e.colorGradientType})}));return{analysisParam:t,resultLayerName:y}}();p.title===SM.i18n("text_option_selectDataset")?e.messageBox.showView(SM.i18n("msg_selectDataset"),"failure"):E.title===SM.i18n("text_option_notSet")?e.messageBox.showView(SM.i18n("msg_setTheWeightField"),"failure"):(e.messageBox.closeView(),re.style.display="block",te.style.display="none",e.viewModel.on("layerloaded",function(t){re.style.display="none",te.style.display="block",e._event.fire("analysissucceeded",{layer:t.layer,name:t.name})}),e.viewModel.on("analysisfailed",function(t){e.messageBox.showView(SM.i18n("msg_theFieldNotSupportAnalysis"),"failure"),re.style.display="none",te.style.display="block",e._event.fire("analysisfailed",{error:t.error})}),e.viewModel.analysis(t,e.map))},oe.onclick=function(){e.viewModel.on("layersremoved",function(t){e._event.fire("layersremoved",{layers:t.layers})}),e.viewModel.clearLayers()},this._preventMapEvent(t,this.map),t},_createOptions:function(e,t){for(var r in t){var n=document.createElement("div");n.className="component-selecttool__option",n.title=t[r],n.innerHTML=t[r],n.setAttribute("data-value",t[r]),e.appendChild(n)}},_creatInputBox:function(e,t){var r=IA().DomUtil.create("div","",t);IA().DomUtil.create("span","",r).innerHTML=e.spanName;var n=IA().DomUtil.create("input","",r);return n.value=e.value,n.className="component-distributeanalysis__input",r},_creatUnitSelectBox:function(e,t){var r=IA().DomUtil.create("div","component-clientcomputation__buffer--radius",t);IA().DomUtil.create("span","",r).innerHTML=e.labelName;var n=IA().DomUtil.create("div","",r);IA().DomUtil.create("input","buffer-radius-input",n);var o=IA().DomUtil.create("div","component-clientcomputation__buffer--unit",n),i=e.selectOptions,a=new JM(i).getElement();return o.appendChild(a),r},_setEleAtribute:function(e,t,r){for(var n=0;n1){var n={optionsArr:e,labelName:SM.i18n("text_label_queryMode"),optionsClickCb:this.queryModeltOnchange},o=new JM(n).getElement();t.appendChild(o),r=o.children[1].children[0],o.children[1].classList.add("dataservice-select");var i=o.children[1];i.classList.add("dataservice-select"),i.classList.add("querymodel-select")}else{var a=IA().DomUtil.create("span","",l);a.innerHTML=SM.i18n("text_label_queryMode"),r=IA().DomUtil.create("div","component-servicequery__querymode-selectname",l);var s=IA().DomUtil.create("span","",r);e instanceof Array?s.innerHTML=e[0]:s.innerHTML=e,r.title=s.innerHTML,this.queryModeltOnchange(r)}return r.id="queryModelSelectName",r}.bind(this),this.queryModeltOnchange=W.bind(this),this.creatQueryModeSelect(n,u);var c=IA().DomUtil.create("div","component-analysis__container component-textarea--dataservice__container",a),f=IA().DomUtil.create("span","textarea-name",c);f.innerHTML=SM.i18n("text_label_IDArrayOfFeatures");var h=IA().DomUtil.create("div","component-textarea component-textarea--dataservice",c);h.id="getfeaturesIdArr";var p=IA().DomUtil.create("div","scrollarea",h),y=IA().DomUtil.create("div","component-scrollarea-content",p);y.setAttribute("tabindex","1");var d=IA().DomUtil.create("textarea","component-textarea__content",y);d.value="[1,2,3]",d.id="getValueTextArea";var v=IA().DomUtil.create("div","component-servicequery__maxfeatures-container hidden",a),m={spanName:SM.i18n("text_label_maxFeatures"),value:"1000"},b=this._creatInputBox(m,v).children[1];b.classList.add("max-features-input");var g=IA().DomUtil.create("div","component-servicequery__distance-container hidden",a),S={spanName:SM.i18n("text_label_bufferDistance"),value:"10"},_=this._creatInputBox(S,g).children[1],w=IA().DomUtil.create("div","component-analysis__container component-textarea--dataservice__container hidden",a),O=IA().DomUtil.create("span","textarea-name",w),x=IA().DomUtil.create("div","",w),P=IA().DomUtil.create("div","component-servicequery__rangeicon-container",x);O.innerHTML=SM.i18n("text_label_queryRange1");var C=IA().DomUtil.create("div","component-servicequery__rangeicon supermapol-icons-polygon-layer bounds",P),E=IA().DomUtil.create("div","component-servicequery__rangeicon supermapol-icons-line-layer hidden",P),T=IA().DomUtil.create("div","component-servicequery__rangeicon supermapol-icons-point-layer hidden",P),R=IA().DomUtil.create("div","component-textarea component-textarea--rangequery",x);R.id="getfeaturesIdArr";var k=IA().DomUtil.create("div","",R),M=IA().DomUtil.create("div","component-scrollarea-content",k);M.setAttribute("tabindex","1");var A=IA().DomUtil.create("textarea","component-textarea__content component-textarea--rangequery__content",M);A.value='{"leftBottom":{"x":-5,"y":-5},"rightTop":{"x":5,"y":5}}';var j=IA().DomUtil.create("div","component-servicequery__spatialquerymode-container hidden",a),L={optionsArr:["CONTAIN","CROSS","DISJOINT","IDENTITY","INTERSECT","NONE","OVERLAP","TOUCH","WITHIN"],labelName:SM.i18n("text_label_spatialQueryMode")},N=IA().DomUtil.create("div","component-analysis__selecttool",j),I=new JM(L).getElement();I.children[1].classList.add("dataservice-select"),N.appendChild(I);var D=I.children[1].children[0];D.id="spatialQueryModeSelectName",I.children[1].children[2].classList.add("component-servicequery__spatialquerymode__selectcontent");var F=IA().DomUtil.create("div","component-analysis__container__analysisbtn",a),B=IA().DomUtil.create("div","component-analysis__analysisbtn",F),U=IA().DomUtil.create("button","component-analysis__analysisbtn--analysis",B);U.innerHTML=SM.i18n("btn_query");var G=IA().DomUtil.create("div","component-analysis__analysisbtn--analysing-container hidden",B),z=IA().DomUtil.create("div","component-analysis__analysisbtn--analysising component-servicequery__querybtn--querying",G);IA().DomUtil.create("div","component-analysis__svg-container",z).innerHTML='\n \n \n \n \n ',IA().DomUtil.create("span","",z).innerHTML=SM.i18n("btn_querying");var V=IA().DomUtil.create("button","component-analysis__analysisbtn--analysis component-analysis__analysisbtn--deletelayers",B);V.innerHTML=SM.i18n("btn_emptyTheRresultLayer"),W(n[0]);var H,J,q=this;function W(e){var t;switch(t=e.title?e.title:e,v.classList.add("hidden"),w.classList.add("hidden"),g.classList.add("hidden"),E.classList.add("hidden"),T.classList.add("hidden"),C.classList.remove("bounds"),j.classList.add("hidden"),f.innerHTML=SM.i18n("text_label_featureFilter"),d.value="SMID<10","BUFFER"!==t&&"SPATIAL"!==t||(w.classList.remove("hidden"),O.innerHTML=SM.i18n("text_label_geometricObject"),A.value='{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[84.90234375,40.25390625]}}',E.classList.remove("hidden"),T.classList.remove("hidden")),t){case"ID":f.innerHTML=SM.i18n("text_label_IDArrayOfFeatures"),d.value="[1,2,3]";break;case"SQL":v.classList.remove("hidden");break;case"BOUNDS":w.classList.remove("hidden"),O.innerHTML=SM.i18n("text_label_queryRange"),A.value='{"leftBottom":{"x":-5,"y":-5},"rightTop":{"x":5,"y":5}}',C.classList.add("bounds");break;case"BUFFER":g.classList.remove("hidden");break;case"SPATIAL":j.classList.remove("hidden")}}return U.onclick=function(){e.messageBox.closeView(),G.style.display="block",U.style.display="none";var t=function(){var e,t=q.dataSetNames,r=document.getElementById("queryModelSelectName").title,n=d.value;if("ID"===r){var o=d.value,i=o.substring(1,o.length-1).split(",");e=new Qh({IDs:i,datasetNames:t})}else if("SQL"===r){var a=b.value;e=new cp({queryParameter:{attributeFilter:n},datasetNames:t,maxFeatures:a})}else if("BOUNDS"===r){if(!H){var s=JSON.parse(A.value);H=IA().bounds([s.leftBottom.x,s.leftBottom.y],[s.rightTop.x,s.rightTop.y])}e=new Xf({attributeFilter:n,datasetNames:t,bounds:H})}else if("BUFFER"===r){var l=_.value,u=JSON.parse(A.value),c=J||u;e=new gh({attributeFilter:n,datasetNames:t,bufferDistance:l,geometry:c})}else if("SPATIAL"===r){var f=D.title,h=JSON.parse(A.value),p=J||h;e=new Lh({attributeFilter:n,datasetNames:t,spatialQueryMode:f,geometry:p})}return e}();e.viewModel.on("getfeaturessucceeded",function(t){G.style.display="none",U.style.display="block",0===t.result.features.length&&e.messageBox.showView(SM.i18n("msg_dataReturnedIsEmpty"),"success"),e._event.fire("getfeaturessucceeded",{result:t.result})}),e.viewModel.on("getfeaturesfailed",function(t){G.style.display="none",U.style.display="block",e.messageBox.showView(t.error.errorMsg,"failure"),e._event.fire("getfeaturesfailed",{error:t.error})}),e.viewModel.getFeatures(t,e.map)},C.onclick=function(t){var r=document.getElementById("queryModelSelectName").title;J&&J.remove(),"BOUNDS"===r?e.map.pm.enableDraw("Rectangle"):e.map.pm.enableDraw("Poly"),t.stopPropagation(),t.preventDefault()},E.onclick=function(t){J&&J.remove(),e.map.pm.enableDraw("Line"),t.stopPropagation(),t.preventDefault()},T.onclick=function(t){J&&J.remove(),e.map.pm.enableDraw("Marker"),t.stopPropagation(),t.preventDefault()},this.map.on("pm:create",function(t){if("Rectangle"===t.shape){var r=(J=t.layer).getBounds();H=IA().bounds([r._southWest.lng,r._southWest.lat],[r._northEast.lng,r._northEast.lat]);var n={leftBottom:{x:r._southWest.lng,y:r._southWest.lat},rightTop:{x:r._northEast.lng,y:r._northEast.lat}};A.value=JSON.stringify(n)}"Marker"===t.shape&&(J=t.layer,A.value=JSON.stringify(t.layer.toGeoJSON()),e.map.pm.disableDraw("Marker")),"Line"===t.shape&&(J=t.layer,A.value=JSON.stringify(t.layer.toGeoJSON())),"Polygon"===t.shape&&(J=t.layer,A.value=JSON.stringify(t.layer.toGeoJSON()))}),V.onclick=function(){e.viewModel.clearLayers()},this._preventMapEvent(t,this.map),t},_creatInputBox:function(e,t){var r=IA().DomUtil.create("div","",t);return IA().DomUtil.create("span","",r).innerHTML=e.spanName,IA().DomUtil.create("input","",r).value=e.value,r}});IA().supermap.components.dataServiceQuery=function(e,t,r){return new TB(e,t,r)}}(),function(){"use strict"; +/* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. + * This program are made available under the terms of the Apache License, Version 2.0 + * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/}()}(); \ No newline at end of file diff --git a/module-map/src/main/resources/static/super-map/js/leaflet-geoman.min.js b/module-map/src/main/resources/static/super-map/js/leaflet-geoman.min.js new file mode 100644 index 00000000..559aa9d1 --- /dev/null +++ b/module-map/src/main/resources/static/super-map/js/leaflet-geoman.min.js @@ -0,0 +1,9 @@ +!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=68)}([function(t,e,n){var r=n(136);t.exports=function(t,e,n){var i=null==t?undefined:r(t,e);return i===undefined?n:i}},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(7),a=n(10),o=r(n(146)),s=n(16),l=r(n(147));function h(t,e){var n=a.getCoords(t),r=a.getCoords(e);if(2!==n.length)throw new Error(" line1 must only contain 2 coordinates");if(2!==r.length)throw new Error(" line2 must only contain 2 coordinates");var o=n[0][0],s=n[0][1],l=n[1][0],h=n[1][1],u=r[0][0],c=r[0][1],f=r[1][0],p=r[1][1],d=(p-c)*(l-o)-(f-u)*(h-s),g=(f-u)*(s-c)-(p-c)*(o-u),m=(l-o)*(s-c)-(h-s)*(o-u);if(0===d)return null;var _=g/d,y=m/d;if(_>=0&&_<=1&&y>=0&&y<=1){var v=o+_*(l-o),b=s+_*(h-s);return i.point([v,b])}return null}e["default"]=function(t,e){var n={},r=[];if("LineString"===t.type&&(t=i.feature(t)),"LineString"===e.type&&(e=i.feature(e)),"Feature"===t.type&&"Feature"===e.type&&null!==t.geometry&&null!==e.geometry&&"LineString"===t.geometry.type&&"LineString"===e.geometry.type&&2===t.geometry.coordinates.length&&2===e.geometry.coordinates.length){var u=h(t,e);return u&&r.push(u),i.featureCollection(r)}var c=l["default"]();return c.load(o["default"](e)),s.featureEach(o["default"](t),(function(t){s.featureEach(c.search(t),(function(e){var i=h(t,e);if(i){var o=a.getCoords(i).join(",");n[o]||(n[o]=!0,r.push(i))}}))})),i.featureCollection(r)}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(70),i=n(127)((function(t,e,n){r(t,e,n)}));t.exports=i},function(t,e,n){var r=n(29),i="object"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function("return this")();t.exports=a},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){"use strict";function r(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function i(t,e,n){return void 0===n&&(n={}),r({type:"Point",coordinates:t},e,n)}function a(t,e,n){void 0===n&&(n={});for(var i=0,a=t;i=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(t*n)/n},e.radiansToLength=c,e.lengthToRadians=f,e.lengthToDegrees=function(t,e){return p(f(t,e))},e.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},e.radiansToDegrees=p,e.degreesToRadians=function(t){return t%360*Math.PI/180},e.convertLength=function(t,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return c(f(t,e),n)},e.convertArea=function(t,n,r){if(void 0===n&&(n="meters"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[n];if(!i)throw new Error("invalid original units");var a=e.areaFactors[r];if(!a)throw new Error("invalid final units");return t/i*a},e.isNumber=d,e.isObject=function(t){return!!t&&t.constructor===Object},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!d(t))throw new Error("bbox must only contain numbers")}))},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")},e.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},e.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},e.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},e.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},e.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},e.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},e.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7);function i(t,e,n,r,i,a,o,s){var l,h,u,c,f={x:null,y:null,onLine1:!1,onLine2:!1};return 0===(l=(s-a)*(n-t)-(o-i)*(r-e))?null!==f.x&&null!==f.y&&f:(c=(n-t)*(h=e-a)-(r-e)*(u=t-i),h=((o-i)*h-(s-a)*u)/l,u=c/l,f.x=t+h*(n-t),f.y=e+h*(r-e),h>=0&&h<=1&&(f.onLine1=!0),u>=0&&u<=1&&(f.onLine2=!0),!(!f.onLine1||!f.onLine2)&&[f.x,f.y])}e["default"]=function(t){var e,n,a={type:"FeatureCollection",features:[]};if("LineString"===(n="Feature"===t.type?t.geometry:t).type)e=[n.coordinates];else if("MultiLineString"===n.type)e=n.coordinates;else if("MultiPolygon"===n.type)e=[].concat.apply([],n.coordinates);else{if("Polygon"!==n.type)throw new Error("Input must be a LineString, MultiLineString, Polygon, or MultiPolygon Feature or Geometry");e=n.coordinates}return e.forEach((function(t){e.forEach((function(e){for(var n=0;n=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")},e.getCoords=function(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")},e.containsNumber=function i(t){if(t.length>1&&r.isNumber(t[0])&&r.isNumber(t[1]))return!0;if(Array.isArray(t[0])&&t[0].length)return i(t[0]);throw new Error("coordinates must only contain numbers")},e.geojsonType=function(t,e,n){if(!e||!n)throw new Error("type and name required");if(!t||t.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.type)},e.featureOf=function(t,e,n){if(!t)throw new Error("No feature passed");if(!n)throw new Error(".featureOf() requires a name");if(!t||"Feature"!==t.type||!t.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.geometry.type)},e.collectionOf=function(t,e,n){if(!t)throw new Error("No featureCollection passed");if(!n)throw new Error(".collectionOf() requires a name");if(!t||"FeatureCollection"!==t.type)throw new Error("Invalid input to "+n+", FeatureCollection required");for(var r=0,i=t.features;rh||p>u||d>c)return l=i,h=n,u=p,c=d,void(o=0);var g=r.lineString([l,i],t.properties);if(!1===e(g,n,a,d,o))return!1;o++,l=i}))&&void 0}}}))}function u(t,e){if(!t)throw new Error("geojson is required");l(t,(function(t,n,i){if(null!==t.geometry){var a=t.geometry.type,o=t.geometry.coordinates;switch(a){case"LineString":if(!1===e(t,n,i,0,0))return!1;break;case"Polygon":for(var s=0;s-1&&t%1==0&&t<=9007199254740991}},function(t,e){var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&n.test(t))&&t>-1&&t%1==0&&t + * @license MIT + * @preserve + */var i=function Y(e,n){t(this,Y),this.next=null,this.key=e,this.data=n,this.left=null,this.right=null};function a(t,e){return t>e?1:t0))break;if(null===e.right)break;if(n(t,e.right.key)>0){var h=e.right;if(e.right=h.left,h.left=e,null===(e=h).right)break}a.right=e,a=e,e=e.right}}return a.right=e.left,o.left=e.right,e.left=r.right,e.right=r.left,e}function s(t,e,n,r){var a=new i(t,e);if(null===n)return a.left=a.right=null,a;var s=r(t,(n=o(t,n,r)).key);return s<0?(a.left=n.left,a.right=n,n.left=null):s>=0&&(a.right=n.right,a.left=n,n.right=null),a}function l(t,e,n){var r=null,i=null;if(e){var a=n((e=o(t,e,n)).key,t);0===a?(r=e.left,i=e.right):a<0?(i=e.right,e.right=null,r=e):(r=e.left,e.left=null,i=e)}return{left:r,right:i}}function h(t,e,n,r,i){if(t){r("".concat(e).concat(n?"└── ":"├── ").concat(i(t),"\n"));var a=e+(n?" ":"│ ");t.left&&h(t.left,a,!1,r,i),t.right&&h(t.right,a,!0,r,i)}}var u=function(){function e(){var n=arguments.length>0&&arguments[0]!==undefined?arguments[0]:a;t(this,e),this._root=null,this._size=0,this._comparator=n}return r(e,[{key:"insert",value:function(t,e){return this._size++,this._root=s(t,e,this._root,this._comparator)}},{key:"add",value:function(t,e){var n=new i(t,e);null===this._root&&(n.left=n.right=null,this._size++,this._root=n);var r=this._comparator,a=o(t,this._root,r),s=r(t,a.key);return 0===s?this._root=a:(s<0?(n.left=a.left,n.right=a,a.left=null):s>0&&(n.right=a.right,n.left=a,a.right=null),this._size++,this._root=n),this._root}},{key:"remove",value:function(t){this._root=this._remove(t,this._root,this._comparator)}},{key:"_remove",value:function(t,e,n){var r;return null===e?null:0===n(t,(e=o(t,e,n)).key)?(null===e.left?r=e.right:(r=o(t,e.left,n)).right=e.right,this._size--,r):e}},{key:"pop",value:function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=o(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null}},{key:"findStatic",value:function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(0===r)return e;e=r<0?e.left:e.right}return null}},{key:"find",value:function(t){return this._root&&(this._root=o(t,this._root,this._comparator),0!==this._comparator(t,this._root.key))?null:this._root}},{key:"contains",value:function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(0===r)return!0;e=r<0?e.left:e.right}return!1}},{key:"forEach",value:function(t,e){for(var n=this._root,r=[],i=!1;!i;)null!==n?(r.push(n),n=n.left):0!==r.length?(n=r.pop(),t.call(e,n),n=n.right):i=!0;return this}},{key:"range",value:function(t,e,n,r){for(var i=[],a=this._comparator,o=this._root;0!==i.length||o;)if(o)i.push(o),o=o.left;else{if(a((o=i.pop()).key,e)>0)break;if(a(o.key,t)>=0&&n.call(r,o))return this;o=o.right}return this}},{key:"keys",value:function(){var t=[];return this.forEach((function(e){var n=e.key;return t.push(n)})),t}},{key:"values",value:function(){var t=[];return this.forEach((function(e){var n=e.data;return t.push(n)})),t}},{key:"min",value:function(){return this._root?this.minNode(this._root).key:null}},{key:"max",value:function(){return this._root?this.maxNode(this._root).key:null}},{key:"minNode",value:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this._root;if(t)for(;t.left;)t=t.left;return t}},{key:"maxNode",value:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this._root;if(t)for(;t.right;)t=t.right;return t}},{key:"at",value:function(t){for(var e=this._root,n=!1,r=0,i=[];!n;)if(e)i.push(e),e=e.left;else if(i.length>0){if(e=i.pop(),r===t)return e;r++,e=e.right}else n=!0;return null}},{key:"next",value:function(t){var e=this._root,n=null;if(t.right){for(n=t.right;n.left;)n=n.left;return n}for(var r=this._comparator;e;){var i=r(t.key,e.key);if(0===i)break;i<0?(n=e,e=e.left):e=e.right}return n}},{key:"prev",value:function(t){var e=this._root,n=null;if(null!==t.left){for(n=t.left;n.right;)n=n.right;return n}for(var r=this._comparator;e;){var i=r(t.key,e.key);if(0===i)break;i<0?e=e.left:(n=e,e=e.right)}return n}},{key:"clear",value:function(){return this._root=null,this._size=0,this}},{key:"toList",value:function(){return function(t){for(var e=t,n=[],r=!1,a=new i(null,null),o=a;!r;)e?(n.push(e),e=e.left):n.length>0?e=(e=o=o.next=n.pop()).right:r=!0;return o.next=null,a.next}(this._root)}},{key:"load",value:function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],n=arguments.length>2&&arguments[2]!==undefined&&arguments[2],r=t.length,i=this._comparator;if(n&&g(t,e,0,r-1,i),null===this._root)this._root=c(t,e,0,r),this._size=r;else{var a=d(this.toList(),f(t,e),i);r=this._size+r,this._root=p({head:a},0,r)}return this}},{key:"isEmpty",value:function(){return null===this._root}},{key:"toString",value:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:function(t){return String(t.key)},e=[];return h(this._root,"",!0,(function(t){return e.push(t)}),t),e.join("")}},{key:"update",value:function(t,e,n){var r=this._comparator,i=l(t,this._root,r),a=i.left,h=i.right;r(t,e)<0?h=s(e,n,h,r):a=s(e,n,a,r),this._root=function(t,e,n){return null===e?t:(null===t||((e=o(t.key,e,n)).left=t),e)}(a,h,r)}},{key:"split",value:function(t){return l(t,this._root,this._comparator)}},{key:"size",get:function(){return this._size}},{key:"root",get:function(){return this._root}}]),e}();function c(t,e,n,r){var a=r-n;if(a>0){var o=n+Math.floor(a/2),s=t[o],l=e[o],h=new i(s,l);return h.left=c(t,e,n,o),h.right=c(t,e,o+1,r),h}return null}function f(t,e){for(var n=new i(null,null),r=n,a=0;a0){var i=e+Math.floor(r/2),a=p(t,e,i),o=t.head;return o.left=a,t.head=t.head.next,o.right=p(t,i+1,n),o}return null}function d(t,e,n){for(var r=new i(null,null),a=r,o=t,s=e;null!==o&&null!==s;)n(o.key,s.key)<0?(a.next=o,o=o.next):(a.next=s,s=s.next),a=a.next;return null!==o?a.next=o:null!==s&&(a.next=s),r.next}function g(t,e,n,r,i){if(!(n>=r)){for(var a=t[n+r>>1],o=n-1,s=r+1;;){do{o++}while(i(t[o],a)<0);do{s--}while(i(t[s],a)>0);if(o>=s)break;var l=t[o];t[o]=t[s],t[s]=l,l=e[o],e[o]=e[s],e[s]=l}g(t,e,n,s,i),g(t,e,s+1,r,i)}}var m=function(t,e){return t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y},_=function(t,e){if(e.ur.xe.x?1:t.ye.y?1:0}}]),r(e,[{key:"link",value:function(t){if(t.point===this.point)throw new Error("Tried to link already linked events");for(var e=t.point.events,n=0,r=e.length;n=0&&l>=0?oh?-1:0:a<0&&l<0?oh?1:0:la?1:0}}}]),e}(),R=0,D=function(){function e(n,r,i,a){t(this,e),this.id=++R,this.leftSE=n,n.segment=this,n.otherSE=r,this.rightSE=r,r.segment=this,r.otherSE=n,this.rings=i,this.windings=a}return r(e,null,[{key:"compare",value:function(t,e){var n=t.leftSE.point.x,r=e.leftSE.point.x,i=t.rightSE.point.x,a=e.rightSE.point.x;if(ao&&s>l)return-1;var u=t.comparePoint(e.leftSE.point);if(u<0)return 1;if(u>0)return-1;var c=e.comparePoint(t.rightSE.point);return 0!==c?c:-1}if(n>r){if(os&&o>h)return 1;var f=e.comparePoint(t.leftSE.point);if(0!==f)return f;var p=t.comparePoint(e.rightSE.point);return p<0?1:p>0?-1:1}if(os)return 1;if(ia){var g=t.comparePoint(e.rightSE.point);if(g<0)return 1;if(g>0)return-1}if(i!==a){var m=l-o,_=i-n,y=h-s,v=a-r;if(m>_&&yv)return-1}return i>a?1:ih?1:t.ide.id?1:0}}]),r(e,[{key:"replaceRightSE",value:function(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:te?t:e}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}},{key:"comparePoint",value:function(t){if(this.isAnEndpoint(t))return 0;var e=this.leftSE.point,n=this.rightSE.point,r=this.vector();if(e.x===n.x)return t.x===e.x?0:t.x0&&s.swapEvents(),B.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.checkForConsuming(),a.checkForConsuming()),n}},{key:"swapEvents",value:function(){var t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var e=0,n=this.windings.length;e0){var a=n;n=r,r=a}if(n.prev===r){var o=n;n=r,r=o}for(var s=0,l=r.rings.length;s0))throw new Error("Tried to create degenerate segment at [".concat(t.x,", ").concat(t.y,"]"));i=n,a=t,o=-1}return new e(new B(i,!0),new B(a,!1),[r],[o])}}]),e}(),I=function(){function e(n,r,i){if(t(this,e),!Array.isArray(n)||0===n.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=r,this.isExterior=i,this.segments=[],"number"!=typeof n[0][0]||"number"!=typeof n[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var a=M.round(n[0][0],n[0][1]);this.bbox={ll:{x:a.x,y:a.y},ur:{x:a.x,y:a.y}};for(var o=a,s=1,l=n.length;sthis.bbox.ur.x&&(this.bbox.ur.x=h.x),h.y>this.bbox.ur.y&&(this.bbox.ur.y=h.y),o=h)}a.x===o.x&&a.y===o.y||this.segments.push(D.fromRing(o,a,this))}return r(e,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,n=this.segments.length;ethis.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.interiorRings.push(o)}this.multiPoly=r}return r(e,[{key:"getSweepEvents",value:function(){for(var t=this.exteriorRing.getSweepEvents(),e=0,n=this.interiorRings.length;ethis.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.polys.push(o)}this.isSubject=r}return r(e,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,n=this.polys.length;e0&&(t=r)}for(var i=t.segment.prevInResult(),a=i?i.prevInResult():null;;){if(!i)return null;if(!a)return i.ringOut;if(a.ringOut!==i.ringOut)return a.ringOut.enclosingRing()!==i.ringOut?i.ringOut:i.ringOut.enclosingRing();i=a.prevInResult(),a=i?i.prevInResult():null}}}]),e}(),G=function(){function e(n){t(this,e),this.exteriorRing=n,n.poly=this,this.interiorRings=[]}return r(e,[{key:"addInterior",value:function(t){this.interiorRings.push(t),t.poly=this}},{key:"getGeom",value:function(){var t=[this.exteriorRing.getGeom()];if(null===t[0])return null;for(var e=0,n=this.interiorRings.length;e1&&arguments[1]!==undefined?arguments[1]:D.compare;t(this,e),this.queue=n,this.tree=new u(r),this.segments=[]}return r(e,[{key:"process",value:function(t){var e=t.segment,n=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),n;var r=t.isLeft?this.tree.insert(e):this.tree.find(e);if(!r)throw new Error("Unable to find segment #".concat(e.id," ")+"[".concat(e.leftSE.point.x,", ").concat(e.leftSE.point.y,"] -> ")+"[".concat(e.rightSE.point.x,", ").concat(e.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var i=r,a=r,o=undefined,s=undefined;o===undefined;)null===(i=this.tree.prev(i))?o=null:i.key.consumedBy===undefined&&(o=i.key);for(;s===undefined;)null===(a=this.tree.next(a))?s=null:a.key.consumedBy===undefined&&(s=a.key);if(t.isLeft){var l=null;if(o){var h=o.getIntersection(e);if(null!==h&&(e.isAnEndpoint(h)||(l=h),!o.isAnEndpoint(h)))for(var u=this._splitSafely(o,h),c=0,f=u.length;c0?(this.tree.remove(e),n.push(t)):(this.segments.push(e),e.prev=o)}else{if(o&&s){var k=o.getIntersection(s);if(null!==k){if(!o.isAnEndpoint(k))for(var M=this._splitSafely(o,k),x=0,w=M.length;xF)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var L=new z(d),k=d.size,x=d.pop();x;){var w=x.key;if(d.size===k){var P=w.segment;throw new Error("Unable to pop() ".concat(w.isLeft?"left":"right"," SweepEvent ")+"[".concat(w.point.x,", ").concat(w.point.y,"] from segment #").concat(P.id," ")+"[".concat(P.leftSE.point.x,", ").concat(P.leftSE.point.y,"] -> ")+"[".concat(P.rightSE.point.x,", ").concat(P.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(d.size>F)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(L.segments.length>V)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var C=L.process(w),E=0,S=C.length;E1?e-1:0),r=1;r1?e-1:0),r=1;r1?e-1:0),r=1;r1?e-1:0),r=1;rt[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]e[0])&&(!(t[2]e[1])&&!(t[3]>>0,r=arguments[1],i=0;i>>0,r=arguments[1],i=0;i>>0;if(0===r)return!1;var i,a,o=0|e,s=Math.max(o>=0?o:r-Math.abs(o),0);for(;s-1}},function(t,e,n){var r=n(12);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e,n){var r=n(11);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e["delete"](t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(11),i=n(28),a=n(30);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new a(o)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(18),i=n(86),a=n(2),o=n(88),s=/^\[object .+?Constructor\]$/,l=Function.prototype,h=Object.prototype,u=l.toString,c=h.hasOwnProperty,f=RegExp("^"+u.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!a(t)||i(t))&&(r(t)?f:s).test(o(t))}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(19),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r?r.toStringTag:undefined;t.exports=function(t){var e=a.call(t,s),n=t[s];try{t[s]=undefined;var r=!0}catch(l){}var i=o.call(t);return r&&(e?t[s]=n:delete t[s]),i}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r,i=n(87),a=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!a&&a in t}},function(t,e,n){var r=n(4)["__core-js_shared__"];t.exports=r},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(e){}try{return t+""}catch(e){}}return""}},function(t,e){t.exports=function(t,e){return null==t?undefined:t[e]}},function(t,e,n){var r=n(91),i=n(11),a=n(28);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||i),string:new r}}},function(t,e,n){var r=n(92),i=n(93),a=n(94),o=n(95),s=n(96);function l(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e1?n[a-1]:undefined,s=a>2?n[2]:undefined;for(o=t.length>3&&"function"==typeof o?(a--,o):undefined,s&&i(n[0],n[1],s)&&(o=a<3?undefined:o,a=1),e=Object(e);++r0){if(++e>=800)return arguments[0]}else e=0;return t.apply(undefined,arguments)}}},function(t,e,n){var r=n(13),i=n(23),a=n(25),o=n(2);t.exports=function(t,e,n){if(!o(n))return!1;var s=typeof e;return!!("number"==s?i(n)&&a(e,n.length):"string"==s&&e in n)&&r(n[e],t)}},function(t,e,n){var r=n(40),i=n(41);t.exports=function(t,e){for(var n=0,a=(e=r(e,t)).length;null!=t&&nh?s:h,l>u?l:u]),n.push(c),i})),n})(n,t.properties).forEach((function(t){t.id=e.length,e.push(t)}))}))}}(t,e)})),r.featureCollection(e)}},function(t,e,n){var r=n(148),i=n(7),a=n(16),o=n(42)["default"],s=a.featureEach,l=(a.coordEach,i.polygon,i.featureCollection);function h(t){var e=r(t);return e.insert=function(t){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:o(t),r.prototype.insert.call(this,t)},e.load=function(t){var e=[];return Array.isArray(t)?t.forEach((function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:o(t),e.push(t)})):s(t,(function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:o(t),e.push(t)})),r.prototype.load.call(this,e)},e.remove=function(t,e){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:o(t),r.prototype.remove.call(this,t,e)},e.clear=function(){return r.prototype.clear.call(this)},e.search=function(t){var e=r.prototype.search.call(this,this.toBBox(t));return l(e)},e.collides=function(t){return r.prototype.collides.call(this,this.toBBox(t))},e.all=function(){var t=r.prototype.all.call(this);return l(t)},e.toJSON=function(){return r.prototype.toJSON.call(this)},e.fromJSON=function(t){return r.prototype.fromJSON.call(this,t)},e.toBBox=function(t){var e;if(t.bbox)e=t.bbox;else if(Array.isArray(t)&&4===t.length)e=t;else if(Array.isArray(t)&&6===t.length)e=[t[0],t[1],t[3],t[4]];else if("Feature"===t.type)e=o(t);else{if("FeatureCollection"!==t.type)throw new Error("invalid geojson");e=o(t)}return{minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}},e}t.exports=h,t.exports["default"]=h},function(t,e,n){"use strict";t.exports=i,t.exports["default"]=i;var r=n(149);function i(t,e){if(!(this instanceof i))return new i(t,e);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),this.clear()}function a(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:Infinity,minY:Infinity,maxX:-Infinity,maxY:-Infinity}}function m(t,e,n,i,a){for(var o,s=[e,n];s.length;)(n=s.pop())-(e=s.pop())<=i||(o=e+Math.ceil((n-e)/i/2)*i,r(t,o,e,n,a),s.push(e,o,o,n))}i.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,n=[],r=this.toBBox;if(!d(t,e))return n;for(var i,a,o,s,l=[];e;){for(i=0,a=e.children.length;i=0&&a[e].children.length>this._maxEntries;)this._split(a,e),e--;this._adjustParentBBoxes(i,a,e)},_split:function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var a=this._chooseSplitIndex(n,i,r),s=g(n.children.splice(a,n.children.length-a));s.height=n.height,s.leaf=n.leaf,o(n,this.toBBox),o(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(n,s)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,n){var r,i,a,o,l,h,u,f,p,d,g,m,_,y;for(h=u=Infinity,r=e;r<=n-e;r++)i=s(t,0,r,this.toBBox),a=s(t,r,n,this.toBBox),p=i,d=a,g=void 0,m=void 0,_=void 0,y=void 0,g=Math.max(p.minX,d.minX),m=Math.max(p.minY,d.minY),_=Math.min(p.maxX,d.maxX),y=Math.min(p.maxY,d.maxY),o=Math.max(0,_-g)*Math.max(0,y-m),l=c(i)+c(a),o=e;i--)a=t.children[i],l(u,t.leaf?o(a):a),c+=f(u);return c},_adjustParentBBoxes:function(t,e,n){for(var r=n;r>=0;r--)l(e[r],t)},_condense:function(t){for(var e,n=t.length-1;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children).splice(e.indexOf(t[n]),1):this.clear():o(t[n],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}},function(t,e,n){t.exports=function(){"use strict";function t(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function e(t,e){return te?1:0}return function(n,r,i,a,o){!function s(e,n,r,i,a){for(;i>r;){if(i-r>600){var o=i-r+1,l=n-r+1,h=Math.log(o),u=.5*Math.exp(2*h/3),c=.5*Math.sqrt(h*u*(o-u)/o)*(l-o/2<0?-1:1),f=Math.max(r,Math.floor(n-l*u/o+c)),p=Math.min(i,Math.floor(n+(o-l)*u/o+c));s(e,n,f,p,a)}var d=e[n],g=r,m=i;for(t(e,r,n),a(e[i],d)>0&&t(e,r,i);g0;)m--}0===a(e[r],d)?t(e,r,m):(m++,t(e,m,i)),m<=n&&(r=m+1),n<=m&&(i=m-1)}}(n,r,i||0,a||n.length-1,o||e)}}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10);function i(t,e,n){var r=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var i=0,a=e.length-1;it[1]!=h>t[1]&&t[0]<(l-o)*(t[1]-s)/(h-s)+o&&(r=!r)}return r}e["default"]=function(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var a=r.getCoord(t),o=r.getGeom(e),s=o.type,l=e.bbox,h=o.coordinates;if(l&&!1===function(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}(a,l))return!1;"Polygon"===s&&(h=[h]);for(var u=!1,c=0;c=Math.abs(c)?u>0?o0?s=Math.abs(c)?u>0?o<=i&&i0?s<=a&&a=Math.abs(c)?u>0?o0?s=Math.abs(c)?u>0?o<=i&&i<=l:l<=i&&i<=o:c>0?s<=a&&a<=h:h<=a&&a<=s)}e["default"]=function(t,e,n){void 0===n&&(n={});for(var a=r.getCoord(t),o=r.getCoords(e),s=0;s1)for(var n=1;n0&&arguments[0]!==undefined?arguments[0]:this.globalOptions;this.globalEditModeEnabled()?this.disableGlobalEditMode():this.enableGlobalEditMode(t)},handleLayerAdditionInGlobalEditMode:function(){var t=this,e=this._addedLayers;this._addedLayers=[],e.forEach((function(e){!!e.pm&&!e._pmTempLayer&&t.globalEditModeEnabled()&&e.pm.enable(function(t){for(var e=1;e0&&arguments[0]!==undefined?arguments[0]:"Draw",e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this.__fire(this._map,"pm:drawstart",{shape:this._shape,workingLayer:this._layer},t,e)},_fireDrawEnd:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"Draw",e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this.__fire(this._map,"pm:drawend",{shape:this._shape},t,e)},_fireCreate:function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"Draw",n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};this.__fire(this._map,"pm:create",{shape:this._shape,marker:t,layer:t},e,n)},_fireCenterPlaced:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"Draw",e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n="Draw"===t?this._layer:undefined,r="Draw"!==t?this._layer:undefined;this.__fire(this._layer,"pm:centerplaced",{shape:this._shape,workingLayer:n,layer:r,latlng:this._layer.getLatLng()},t,e)},_fireCut:function(t,e,n){var r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:"Draw",i=arguments.length>4&&arguments[4]!==undefined?arguments[4]:{};this.__fire(t,"pm:cut",{shape:this._shape,layer:e,originalLayer:n},r,i)},_fireEdit:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this._layer,e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"Edit",n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};this.__fire(t,"pm:edit",{layer:this._layer,shape:this.getShape()},e,n)},_fireEnable:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"Edit",e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this.__fire(this._layer,"pm:enable",{layer:this._layer,shape:this.getShape()},t,e)},_fireDisable:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"Edit",e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this.__fire(this._layer,"pm:disable",{layer:this._layer,shape:this.getShape()},t,e)},_fireUpdate:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"Edit",e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this.__fire(this._layer,"pm:update",{layer:this._layer,shape:this.getShape()},t,e)},_fireMarkerDragStart:function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:undefined,n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"Edit",r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};this.__fire(this._layer,"pm:markerdragstart",{layer:this._layer,markerEvent:t,shape:this.getShape(),indexPath:e},n,r)},_fireMarkerDrag:function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:undefined,n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"Edit",r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};this.__fire(this._layer,"pm:markerdrag",{layer:this._layer,markerEvent:t,shape:this.getShape(),indexPath:e},n,r)},_fireMarkerDragEnd:function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:undefined,n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:undefined,r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:"Edit",i=arguments.length>4&&arguments[4]!==undefined?arguments[4]:{};this.__fire(this._layer,"pm:markerdragend",{layer:this._layer,markerEvent:t,shape:this.getShape(),indexPath:e,intersectionReset:n},r,i)},_fireDragStart:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"Edit",e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this.__fire(this._layer,"pm:dragstart",{layer:this._layer,shape:this.getShape()},t,e)},_fireDrag:function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"Edit",n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};this.__fire(this._layer,"pm:drag",P(P({},t),{},{shape:this.getShape()}),e,n)},_fireDragEnd:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"Edit",e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this.__fire(this._layer,"pm:dragend",{layer:this._layer,shape:this.getShape()},t,e)},_fireRemove:function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:t,n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"Edit",r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};this.__fire(t,"pm:remove",{layer:e,shape:this.getShape()},n,r)},_fireVertexAdded:function(t,e,n){var r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:"Edit",i=arguments.length>4&&arguments[4]!==undefined?arguments[4]:{};this.__fire(this._layer,"pm:vertexadded",{layer:this._layer,workingLayer:this._layer,marker:t,indexPath:e,latlng:n,shape:this.getShape()},r,i)},_fireVertexRemoved:function(t,e){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"Edit",r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};this.__fire(this._layer,"pm:vertexremoved",{layer:this._layer,marker:t,indexPath:e,shape:this.getShape()},n,r)},_fireVertexClick:function(t,e){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"Edit",r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};this.__fire(this._layer,"pm:vertexclick",{layer:this._layer,markerEvent:t,indexPath:e,shape:this.getShape()},n,r)},_fireIntersect:function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"Edit",n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};this.__fire(this._layer,"pm:intersect",{layer:this._layer,intersection:t,shape:this.getShape()},e,n)},_fireLayerReset:function(t,e){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"Edit",r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};this.__fire(this._layer,"pm:layerreset",{layer:this._layer,markerEvent:t,indexPath:e,shape:this.getShape()},n,r)},_fireSnapDrag:function(t,e){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"Snapping",r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};this.__fire(t,"pm:snapdrag",e,n,r)},_fireSnap:function(t,e){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"Snapping",r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};this.__fire(t,"pm:snap",e,n,r)},_fireUnsnap:function(t,e){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"Snapping",r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};this.__fire(t,"pm:unsnap",e,n,r)},_fireRotationEnable:function(t,e){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"Rotation",r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};this.__fire(t,"pm:rotateenable",{layer:this._layer,helpLayer:this._rotatePoly},n,r)},_fireRotationDisable:function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"Rotation",n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};this.__fire(t,"pm:rotatedisable",{layer:this._layer},e,n)},_fireRotationStart:function(t,e){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"Rotation",r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};this.__fire(t,"pm:rotatestart",{layer:this._rotationLayer,helpLayer:this._layer,startAngle:this._startAngle,originLatLngs:e},n,r)},_fireRotation:function(t,e,n){var r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:"Rotation",i=arguments.length>4&&arguments[4]!==undefined?arguments[4]:{};this.__fire(t,"pm:rotate",{layer:this._rotationLayer,helpLayer:this._layer,startAngle:this._startAngle,angle:this._rotationLayer.pm.getAngle(),angleDiff:e,oldLatLngs:n,newLatLngs:this._rotationLayer.getLatLngs()},r,i)},_fireRotationEnd:function(t,e,n){var r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:"Rotation",i=arguments.length>4&&arguments[4]!==undefined?arguments[4]:{};this.__fire(t,"pm:rotateend",{layer:this._rotationLayer,helpLayer:this._layer,startAngle:e,angle:this._rotationLayer.pm.getAngle(),originLatLngs:n,newLatLngs:this._rotationLayer.getLatLngs()},r,i)},_fireActionClick:function(t,e,n){var r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:"Toolbar",i=arguments.length>4&&arguments[4]!==undefined?arguments[4]:{};this.__fire(this._map,"pm:actionclick",{text:t.text,action:t,btnName:e,button:n},r,i)},_fireButtonClick:function(t,e){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"Toolbar",r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};this.__fire(this._map,"pm:buttonclick",{btnName:t,button:e},n,r)},_fireLangChange:function(t,e,n,r){var i=arguments.length>4&&arguments[4]!==undefined?arguments[4]:"Global",a=arguments.length>5&&arguments[5]!==undefined?arguments[5]:{};this.__fire(this.map,"pm:langchange",{oldLang:t,activeLang:e,fallback:n,translations:r},i,a)},_fireGlobalDragModeToggled:function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"Global",n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};this.__fire(this.map,"pm:globaldragmodetoggled",{enabled:t,map:this.map},e,n)},_fireGlobalEditModeToggled:function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"Global",n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};this.__fire(this.map,"pm:globaleditmodetoggled",{enabled:t,map:this.map},e,n)},_fireGlobalRemovalModeToggled:function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"Global",n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};this.__fire(this.map,"pm:globalremovalmodetoggled",{enabled:t,map:this.map},e,n)},_fireGlobalCutModeToggled:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"Global",e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this.__fire(this._map,"pm:globalcutmodetoggled",{enabled:!!this._enabled,map:this._map},t,e)},_fireGlobalDrawModeToggled:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"Global",e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this.__fire(this._map,"pm:globaldrawmodetoggled",{enabled:this._enabled,shape:this._shape,map:this._map},t,e)},_fireGlobalRotateModeToggled:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"Global",e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this.__fire(this.map,"pm:globalrotatemodetoggled",{enabled:this.globalRotateModeEnabled(),map:this.map},t,e)},_fireRemoveLayerGroup:function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:t,n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"Edit",r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};this.__fire(t,"pm:remove",{layer:e,shape:undefined},n,r)},_fireKeyeventEvent:function(t,e,n){var r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:"Global",i=arguments.length>4&&arguments[4]!==undefined?arguments[4]:{};this.__fire(this.map,"pm:keyevent",{event:t,eventType:e,focusOn:n},r,i)},__fire:function(t,e,n,r){var i=arguments.length>4&&arguments[4]!==undefined?arguments[4]:{};n=a()(n,i,{source:r}),L.PM.Utils._fireEvent(t,e,n)}},S={_lastEvents:{keydown:undefined,keyup:undefined,current:undefined},_initKeyListener:function(t){this.map=t,L.DomEvent.on(document,"keydown keyup",this._onKeyListener,this),L.DomEvent.on(document,"blur",this._onKeyListener,this)},_onKeyListener:function(t){var e="document";this.map.getContainer().contains(t.target)&&(e="map");var n={event:t,eventType:t.type,focusOn:e};this._lastEvents[t.type]=n,this._lastEvents.current=n,this.map.pm._fireKeyeventEvent(t,t.type,e)},getLastKeyEvent:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"current";return this._lastEvents[t]},isShiftKeyPressed:function(){var t;return null===(t=this._lastEvents.current)||void 0===t?void 0:t.event.shiftKey},isAltKeyPressed:function(){var t;return null===(t=this._lastEvents.current)||void 0===t?void 0:t.event.altKey},isCtrlKeyPressed:function(){var t;return null===(t=this._lastEvents.current)||void 0===t?void 0:t.event.ctrlKey},isMetaKeyPressed:function(){var t;return null===(t=this._lastEvents.current)||void 0===t?void 0:t.event.metaKey},getPressedKey:function(){var t;return null===(t=this._lastEvents.current)||void 0===t?void 0:t.event.key}},O=L.Class.extend({includes:[b,k,M,x,E],initialize:function(t){this.map=t,this.Draw=new L.PM.Draw(t),this.Toolbar=new L.PM.Toolbar(t),this.Keyboard=S,this.globalOptions={snappable:!0,layerGroup:undefined,snappingOrder:["Marker","CircleMarker","Circle","Line","Polygon","Rectangle"],panes:{vertexPane:"markerPane",layerPane:"overlayPane",markerPane:"markerPane"}},this.Keyboard._initKeyListener(t)},setLang:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"en",e=arguments.length>1?arguments[1]:undefined,n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"en",r=L.PM.activeLang;e&&(_[t]=a()(_[n],e)),L.PM.activeLang=t,this.map.pm.Toolbar.reinit(),this._fireLangChange(r,t,n,_[t])},addControls:function(t){this.Toolbar.addControls(t)},removeControls:function(){this.Toolbar.removeControls()},toggleControls:function(){this.Toolbar.toggleControls()},controlsVisible:function(){return this.Toolbar.isVisible},enableDraw:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"Polygon",e=arguments.length>1?arguments[1]:undefined;"Poly"===t&&(t="Polygon"),this.Draw.enable(t,e)},disableDraw:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"Polygon";"Poly"===t&&(t="Polygon"),this.Draw.disable(t)},setPathOptions:function(t){var e=this,n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},r=n.ignoreShapes||[],i=n.merge||!1;this.map.pm.Draw.shapes.forEach((function(n){-1===r.indexOf(n)&&e.map.pm.Draw[n].setPathOptions(t,i)}))},getGlobalOptions:function(){return this.globalOptions},setGlobalOptions:function(t){var e=this,n=a()(this.globalOptions,t),r=!1;this.map.pm.Draw.CircleMarker.enabled()&&this.map.pm.Draw.CircleMarker.options.editable!==n.editable&&(this.map.pm.Draw.CircleMarker.disable(),r=!0),this.map.pm.Draw.shapes.forEach((function(t){e.map.pm.Draw[t].setOptions(n)})),r&&this.map.pm.Draw.CircleMarker.enable(),L.PM.Utils.findLayers(this.map).forEach((function(t){t.pm.setOptions(n)})),this.applyGlobalOptions(),this.globalOptions=n},applyGlobalOptions:function(){L.PM.Utils.findLayers(this.map).forEach((function(t){t.pm.enabled()&&t.pm.applyOptions()}))},globalDrawModeEnabled:function(){return!!this.Draw.getActiveShape()},globalCutModeEnabled:function(){return!!this.Draw.Cut.enabled()},enableGlobalCutMode:function(t){return this.Draw.Cut.enable(t)},toggleGlobalCutMode:function(t){return this.Draw.Cut.toggle(t)},disableGlobalCutMode:function(){return this.Draw.Cut.disable()},getGeomanLayers:function(){var t=arguments.length>0&&arguments[0]!==undefined&&arguments[0],e=L.PM.Utils.findLayers(this.map);if(!t)return e;var n=L.featureGroup();return n._pmTempLayer=!0,e.forEach((function(t){n.addLayer(t)})),n},getGeomanDrawLayers:function(){var t=arguments.length>0&&arguments[0]!==undefined&&arguments[0],e=L.PM.Utils.findLayers(this.map).filter((function(t){return!0===t._drawnByGeoman}));if(!t)return e;var n=L.featureGroup();return n._pmTempLayer=!0,e.forEach((function(t){n.addLayer(t)})),n},_getContainingLayer:function(){return this.globalOptions.layerGroup&&this.globalOptions.layerGroup instanceof L.LayerGroup?this.globalOptions.layerGroup:this.map},_isCRSSimple:function(){return this.map.options.crs===L.CRS.Simple}}),B=n(0),R=n.n(B),D=n(66),I=n.n(D);function T(t){var e=L.PM.activeLang;return I()(_,e)||(e="en"),R()(_[e],t)}function j(t){return!function e(t){return t.filter((function(t){return![null,"",undefined].includes(t)})).reduce((function(t,n){return t.concat(Array.isArray(n)?e(n):n)}),[])}(t).length}function A(t){return t.reduce((function(t,e){return 0!==e.length&&t.push(Array.isArray(e)?A(e):e),t}),[])}function G(t,e,n){for(var r,i,a,o=6378137,s=6356752.3142,l=1/298.257223563,h=t.lng,u=t.lat,c=n,f=Math.PI,p=e*f/180,d=Math.sin(p),g=Math.cos(p),m=(1-l)*Math.tan(u*f/180),_=1/Math.sqrt(1+m*m),y=m*_,v=Math.atan2(m,g),b=_*d,k=1-b*b,M=k*(o*o-s*s)/(s*s),x=1+M/16384*(4096+M*(M*(320-175*M)-768)),w=M/1024*(256+M*(M*(74-47*M)-128)),P=c/(s*x),C=2*Math.PI;Math.abs(P-C)>1e-12;){r=Math.cos(2*v+P),C=P,P=c/(s*x)+w*(i=Math.sin(P))*(r+w/4*((a=Math.cos(P))*(2*r*r-1)-w/6*r*(4*i*i-3)*(4*r*r-3)))}var E=y*i-_*a*g,S=Math.atan2(y*a+_*i*g,(1-l)*Math.sqrt(b*b+E*E)),O=l/16*k*(4+l*(4-3*k)),B=h+180*(Math.atan2(i*d,_*a-y*i*g)-(1-O)*l*b*(P+O*i*(r+O*a*(2*r*r-1))))/f,R=180*S/f;return L.latLng(B,R)}function N(t,e,n,r){for(var i,a,o=!(arguments.length>4&&arguments[4]!==undefined)||arguments[4],s=[],l=0;l180?d-360:d<-180?d+360:d,L.latLng([p*i,d])}(e,function(t,e,n){var r=t.latLngToContainerPoint(e),i=t.latLngToContainerPoint(n),a=180*Math.atan2(i.y-r.y,i.x-r.x)/Math.PI+90;return a+=a<0?360:0}(t,e,n),r)}function F(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:t.getLatLngs();return t instanceof L.Polygon?L.polygon(e).getLatLngs():L.polyline(e).getLatLngs()}function V(t,e){var n,r;if(null===(n=e.options.crs)||void 0===n||null===(r=n.projection)||void 0===r?void 0:r.MAX_LATITUDE){var i,a,o=null===(i=e.options.crs)||void 0===i||null===(a=i.projection)||void 0===a?void 0:a.MAX_LATITUDE;t.lat=Math.max(Math.min(o,t.lat),-o)}return t}function U(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Y(t){for(var e=1;e-1?"pos-right":"",r=L.DomUtil.create("div","button-container ".concat(n),this._container),i=L.DomUtil.create("a","leaflet-buttons-control-button",r);i.setAttribute("role","button"),i.setAttribute("tabindex","0"),i.href="#";var a=L.DomUtil.create("div","leaflet-pm-actions-container ".concat(n),r),o=t.actions,s={cancel:{text:T("actions.cancel"),onClick:function(){this._triggerClick()}},finishMode:{text:T("actions.finish"),onClick:function(){this._triggerClick()}},removeLastVertex:{text:T("actions.removeLastVertex"),onClick:function(){this._map.pm.Draw[t.jsClass]._removeLastVertex()}},finish:{text:T("actions.finish"),onClick:function(e){this._map.pm.Draw[t.jsClass]._finishShape(e)}}};o.forEach((function(r){var i,o="string"==typeof r?r:r.name;if(s[o])i=s[o];else{if(!r.text)return;i=r}var l=L.DomUtil.create("a","leaflet-pm-action ".concat(n," action-").concat(o),a);if(l.setAttribute("role","button"),l.setAttribute("tabindex","0"),l.href="#",l.innerHTML=i.text,!t.disabled&&i.onClick){L.DomEvent.addListener(l,"click",(function(n){n.preventDefault();var r="",a=e._map.pm.Toolbar.buttons;for(var o in a)if(a[o]._button===t){r=o;break}e._fireActionClick(i,r,t)}),e),L.DomEvent.addListener(l,"click",i.onClick,e)}L.DomEvent.disableClickPropagation(l)})),t.toggleStatus&&L.DomUtil.addClass(r,"active");var l=L.DomUtil.create("div","control-icon",i);return t.title&&l.setAttribute("title",t.title),t.iconUrl&&l.setAttribute("src",t.iconUrl),t.className&&L.DomUtil.addClass(l,t.className),t.disabled||(L.DomEvent.addListener(i,"click",(function(){e._button.disableOtherButtons&&e._map.pm.Toolbar.triggerClickOnToggledButtons(e);var n="",r=e._map.pm.Toolbar.buttons;for(var i in r)if(r[i]._button===t){n=i;break}e._fireButtonClick(n,t)})),L.DomEvent.addListener(i,"click",this._triggerClick,this)),t.disabled&&(L.DomUtil.addClass(i,"pm-disabled"),L.DomUtil.addClass(l,"pm-disabled")),L.DomEvent.disableClickPropagation(i),r},_applyStyleClasses:function(){this._container&&(this._button.toggleStatus&&!1!==this._button.cssToggle?(L.DomUtil.addClass(this.buttonsDomNode,"active"),L.DomUtil.addClass(this._container,"activeChild")):(L.DomUtil.removeClass(this.buttonsDomNode,"active"),L.DomUtil.removeClass(this._container,"activeChild")))},_clicked:function(){this._button.doToggle&&this.toggle()}});function K(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function H(t){for(var e=1;e0&&arguments[0]!==undefined?arguments[0]:this.options;"undefined"!=typeof t.editPolygon&&(t.editMode=t.editPolygon),"undefined"!=typeof t.deleteLayer&&(t.removalMode=t.deleteLayer),L.Util.setOptions(this,t),this.applyIconStyle(),this.isVisible=!0,this._showHideButtons()},applyIconStyle:function(){var t=this.getButtons(),e={geomanIcons:{drawMarker:"control-icon leaflet-pm-icon-marker",drawPolyline:"control-icon leaflet-pm-icon-polyline",drawRectangle:"control-icon leaflet-pm-icon-rectangle",drawPolygon:"control-icon leaflet-pm-icon-polygon",drawCircle:"control-icon leaflet-pm-icon-circle",drawCircleMarker:"control-icon leaflet-pm-icon-circle-marker",editMode:"control-icon leaflet-pm-icon-edit",dragMode:"control-icon leaflet-pm-icon-drag",cutPolygon:"control-icon leaflet-pm-icon-cut",removalMode:"control-icon leaflet-pm-icon-delete"}};for(var n in t){var r=t[n];L.Util.setOptions(r,{className:e.geomanIcons[n]})}},removeControls:function(){var t=this.getButtons();for(var e in t)t[e].remove();this.isVisible=!1},toggleControls:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.options;this.isVisible?this.removeControls():this.addControls(t)},_addButton:function(t,e){return this.buttons[t]=e,this.options[t]=this.options[t]||!1,this.buttons[t]},triggerClickOnToggledButtons:function(t){var e=["snappingOption"];for(var n in this.buttons)!e.includes(n)&&this.buttons[n]!==t&&this.buttons[n].toggled()&&this.buttons[n]._triggerClick()},toggleButton:function(t,e){var n=!(arguments.length>2&&arguments[2]!==undefined)||arguments[2];return"editPolygon"===t&&(t="editMode"),"deleteLayer"===t&&(t="removalMode"),n&&this.triggerClickOnToggledButtons(this.buttons[t]),!!this.buttons[t]&&this.buttons[t].toggle(e)},_defineButtons:function(){var t=this,e={className:"control-icon leaflet-pm-icon-marker",title:T("buttonTitles.drawMarkerButton"),jsClass:"Marker",onClick:function(){},afterClick:function(e,n){t.map.pm.Draw[n.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},n={title:T("buttonTitles.drawPolyButton"),className:"control-icon leaflet-pm-icon-polygon",jsClass:"Polygon",onClick:function(){},afterClick:function(e,n){t.map.pm.Draw[n.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["finish","removeLastVertex","cancel"]},r={className:"control-icon leaflet-pm-icon-polyline",title:T("buttonTitles.drawLineButton"),jsClass:"Line",onClick:function(){},afterClick:function(e,n){t.map.pm.Draw[n.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["finish","removeLastVertex","cancel"]},i={title:T("buttonTitles.drawCircleButton"),className:"control-icon leaflet-pm-icon-circle",jsClass:"Circle",onClick:function(){},afterClick:function(e,n){t.map.pm.Draw[n.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},a={title:T("buttonTitles.drawCircleMarkerButton"),className:"control-icon leaflet-pm-icon-circle-marker",jsClass:"CircleMarker",onClick:function(){},afterClick:function(e,n){t.map.pm.Draw[n.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},o={title:T("buttonTitles.drawRectButton"),className:"control-icon leaflet-pm-icon-rectangle",jsClass:"Rectangle",onClick:function(){},afterClick:function(e,n){t.map.pm.Draw[n.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},s={title:T("buttonTitles.editButton"),className:"control-icon leaflet-pm-icon-edit",onClick:function(){},afterClick:function(){t.map.pm.toggleGlobalEditMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},l={title:T("buttonTitles.dragButton"),className:"control-icon leaflet-pm-icon-drag",onClick:function(){},afterClick:function(){t.map.pm.toggleGlobalDragMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},h={title:T("buttonTitles.cutButton"),className:"control-icon leaflet-pm-icon-cut",jsClass:"Cut",onClick:function(){},afterClick:function(e,n){t.map.pm.Draw[n.button._button.jsClass].toggle({snappable:!0,cursorMarker:!0,allowSelfIntersection:!1})},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finish","removeLastVertex","cancel"]},u={title:T("buttonTitles.deleteButton"),className:"control-icon leaflet-pm-icon-delete",onClick:function(){},afterClick:function(){t.map.pm.toggleGlobalRemovalMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},c={title:T("buttonTitles.rotateButton"),className:"control-icon leaflet-pm-icon-rotate",onClick:function(){},afterClick:function(){t.map.pm.toggleGlobalRotateMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]};this._addButton("drawMarker",new L.Control.PMButton(e)),this._addButton("drawPolyline",new L.Control.PMButton(r)),this._addButton("drawRectangle",new L.Control.PMButton(o)),this._addButton("drawPolygon",new L.Control.PMButton(n)),this._addButton("drawCircle",new L.Control.PMButton(i)),this._addButton("drawCircleMarker",new L.Control.PMButton(a)),this._addButton("editMode",new L.Control.PMButton(s)),this._addButton("dragMode",new L.Control.PMButton(l)),this._addButton("cutPolygon",new L.Control.PMButton(h)),this._addButton("removalMode",new L.Control.PMButton(u)),this._addButton("rotateMode",new L.Control.PMButton(c))},_showHideButtons:function(){if(this.isVisible){this.removeControls(),this.isVisible=!0;var t=this.getButtons(),e=[];for(var n in!1===this.options.drawControls&&(e=e.concat(Object.keys(t).filter((function(e){return!t[e]._button.tool})))),!1===this.options.editControls&&(e=e.concat(Object.keys(t).filter((function(e){return"edit"===t[e]._button.tool})))),!1===this.options.optionsControls&&(e=e.concat(Object.keys(t).filter((function(e){return"options"===t[e]._button.tool})))),!1===this.options.customControls&&(e=e.concat(Object.keys(t).filter((function(e){return"custom"===t[e]._button.tool})))),t)if(this.options[n]&&-1===e.indexOf(n)){var r=t[n]._button.tool;r||(r="draw"),t[n].setPosition(this._getBtnPosition(r)),t[n].addTo(this.map)}}},_getBtnPosition:function(t){return this.options.positions&&this.options.positions[t]?this.options.positions[t]:this.options.position},setBlockPosition:function(t,e){this.options.positions[t]=e,this._showHideButtons(),this.changeControlOrder()},getBlockPositions:function(){return this.options.positions},copyDrawControl:function(t,e){if(!e)throw new TypeError("Button has no name");"object"!==Z(e)&&(e={name:e});var n=this._btnNameMapping(t);if(!e.name)throw new TypeError("Button has no name");if(this.buttons[e.name])throw new TypeError("Button with this name already exists");var r=this.map.pm.Draw.createNewDrawInstance(e.name,n);return e=H(H({},this.buttons[n]._button),e),{drawInstance:r,control:this.createCustomControl(e)}},createCustomControl:function(t){if(!t.name)throw new TypeError("Button has no name");if(this.buttons[t.name])throw new TypeError("Button with this name already exists");t.onClick||(t.onClick=function(){}),t.afterClick||(t.afterClick=function(){}),!1!==t.toggle&&(t.toggle=!0),t.block&&(t.block=t.block.toLowerCase()),t.block&&"draw"!==t.block||(t.block=""),t.className?-1===t.className.indexOf("control-icon")&&(t.className="control-icon ".concat(t.className)):t.className="control-icon";var e={tool:t.block,className:t.className,title:t.title||"",jsClass:t.name,onClick:t.onClick,afterClick:t.afterClick,doToggle:t.toggle,toggleStatus:!1,disableOtherButtons:!0,cssToggle:t.toggle,position:this.options.position,actions:t.actions||[],disabled:!!t.disabled};!1!==this.options[t.name]&&(this.options[t.name]=!0);var n=this._addButton(t.name,new L.Control.PMButton(e));return this.changeControlOrder(),n},changeControlOrder:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],e=this._shapeMapping(),n=[];t.forEach((function(t){e[t]?n.push(e[t]):n.push(t)}));var r=this.getButtons(),i={};n.forEach((function(t){r[t]&&(i[t]=r[t])}));var a=Object.keys(r).filter((function(t){return!r[t]._button.tool}));a.forEach((function(t){-1===n.indexOf(t)&&(i[t]=r[t])}));var o=Object.keys(r).filter((function(t){return"edit"===r[t]._button.tool}));o.forEach((function(t){-1===n.indexOf(t)&&(i[t]=r[t])}));var s=Object.keys(r).filter((function(t){return"options"===r[t]._button.tool}));s.forEach((function(t){-1===n.indexOf(t)&&(i[t]=r[t])}));var l=Object.keys(r).filter((function(t){return"custom"===r[t]._button.tool}));l.forEach((function(t){-1===n.indexOf(t)&&(i[t]=r[t])})),Object.keys(r).forEach((function(t){-1===n.indexOf(t)&&(i[t]=r[t])})),this.map.pm.Toolbar.buttons=i,this._showHideButtons()},getControlOrder:function(){var t=this.getButtons(),e=[];for(var n in t)e.push(n);return e},changeActionsOfControl:function(t,e){var n=this._btnNameMapping(t);if(!n)throw new TypeError("No name passed");if(!e)throw new TypeError("No actions passed");if(!this.buttons[n])throw new TypeError("Button with this name not exists");this.buttons[n]._button.actions=e,this.changeControlOrder()},setButtonDisabled:function(t,e){var n=this._btnNameMapping(t);this.buttons[n]._button.disabled=!!e,this._showHideButtons()},_shapeMapping:function(){return{Marker:"drawMarker",Circle:"drawCircle",Polygon:"drawPolygon",Rectangle:"drawRectangle",Polyline:"drawPolyline",Line:"drawPolyline",CircleMarker:"drawCircleMarker",Edit:"editMode",Drag:"dragMode",Cut:"cutPolygon",Removal:"removalMode",Rotate:"rotateMode"}},_btnNameMapping:function(t){var e=this._shapeMapping();return e[t]?e[t]:t}});function W(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Q(t){for(var e=1;e2&&arguments[2]!==undefined?arguments[2]:"asc";if(!e||0===Object.keys(e).length)return function(t,e){return t-e};for(var r,i=Object.keys(e),a=i.length,o={};a--;)r=i[a],o[r.toLowerCase()]=e[r];function s(t){return t instanceof L.Marker?"Marker":t instanceof L.Circle?"Circle":t instanceof L.CircleMarker?"CircleMarker":t instanceof L.Rectangle?"Rectangle":t instanceof L.Polygon?"Polygon":t instanceof L.Polyline?"Line":undefined}return function(e,r){var i,a;if("instanceofShape"===t){if(i=s(e.layer).toLowerCase(),a=s(r.layer).toLowerCase(),!i||!a)return 0}else{if(!e.hasOwnProperty(t)||!r.hasOwnProperty(t))return 0;i=e[t].toLowerCase(),a=r[t].toLowerCase()}var l=i in o?o[i]:Number.MAX_SAFE_INTEGER,h=a in o?o[a]:Number.MAX_SAFE_INTEGER,u=0;return lh&&(u=1),"desc"===n?-1*u:u}}("instanceofShape",r)),t[0]||{}},_checkPrioritiySnapping:function(t){var e=this._map,n=t.segment[0],r=t.segment[1],i=t.latlng,a=this._getDistance(e,n,i),o=this._getDistance(e,r,i),s=a1&&arguments[1]!==undefined&&arguments[1];this.options.pathOptions=e?a()(this.options.pathOptions,t):t},getShapes:function(){return this.shapes},getShape:function(){return this._shape},enable:function(t,e){if(!t)throw new Error("Error: Please pass a shape as a parameter. Possible shapes are: ".concat(this.getShapes().join(",")));this.disable(),this[t].enable(e)},disable:function(){var t=this;this.shapes.forEach((function(e){t[e].disable()}))},addControls:function(){var t=this;this.shapes.forEach((function(e){t[e].addButton()}))},getActiveShape:function(){var t,e=this;return this.shapes.forEach((function(n){e[n]._enabled&&(t=n)})),t},_setGlobalDrawMode:function(){"Cut"===this._shape?this._fireGlobalCutModeToggled():this._fireGlobalDrawModeToggled();var t=L.PM.Utils.findLayers(this._map);this._enabled?t.forEach((function(t){L.PM.Utils.disablePopup(t)})):t.forEach((function(t){L.PM.Utils.enablePopup(t)}))},createNewDrawInstance:function(t,e){var n=this._getShapeFromBtnName(e);if(this[t])throw new TypeError("Draw Type already exists");if(!L.PM.Draw[n])throw new TypeError("There is no class L.PM.Draw.".concat(n));return this[t]=new L.PM.Draw[n](this._map),this[t].toolbarButtonName=t,this[t]._shape=t,this.shapes.push(t),this[e]&&this[t].setOptions(this[e].options),this[t].setOptions(this[t].options),this[t]},_getShapeFromBtnName:function(t){var e={drawMarker:"Marker",drawCircle:"Circle",drawPolygon:"Polygon",drawPolyline:"Line",drawRectangle:"Rectangle",drawCircleMarker:"CircleMarker",editMode:"Edit",dragMode:"Drag",cutPolygon:"Cut",removalMode:"Removal",rotateMode:"Rotate"};return e[t]?e[t]:this[t]?this[t]._shape:t},_finishLayer:function(t){t.pm&&(t.pm.setOptions(this.options),t.pm._shape=this._shape,t.pm._map=this._map),this._addDrawnLayerProp(t)},_addDrawnLayerProp:function(t){t._drawnByGeoman=!0},_setPane:function(t,e){"layerPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.layerPane||"overlayPane":"vertexPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.vertexPane||"markerPane":"markerPane"===e&&(t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.markerPane||"markerPane")},_isFirstLayer:function(){return 0===(this._map||this._layer._map).pm.getGeomanLayers().length}});nt.Marker=nt.extend({initialize:function(t){this._map=t,this._shape="Marker",this.toolbarButtonName="drawMarker"},enable:function(t){var e=this;L.Util.setOptions(this,t),this._enabled=!0,this._map.on("click",this._createMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._hintMarker=L.marker([0,0],this.options.markerStyle),this._setPane(this._hintMarker,"markerPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this.options.tooltips&&this._hintMarker.bindTooltip(T("tooltips.placeMarker"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._layer=this._hintMarker,this._map.on("mousemove",this._syncHintMarker,this),this.options.markerEditable&&this._map.eachLayer((function(t){e.isRelevantMarker(t)&&t.pm.enable()})),this._fireDrawStart(),this._setGlobalDrawMode()},disable:function(){var t=this;this._enabled&&(this._enabled=!1,this._map.off("click",this._createMarker,this),this._hintMarker.remove(),this._map.off("mousemove",this._syncHintMarker,this),this._map.eachLayer((function(e){t.isRelevantMarker(e)&&e.pm.disable()})),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled:function(){return this._enabled},toggle:function(t){this.enabled()?this.disable():this.enable(t)},isRelevantMarker:function(t){return t instanceof L.Marker&&t.pm&&!t._pmTempLayer},_syncHintMarker:function(t){if(this._hintMarker.setLatLng(t.latlng),this.options.snappable){var e=t;e.target=this._hintMarker,this._handleSnapping(e)}},_createMarker:function(t){if(t.latlng&&(!this.options.requireSnapToFinish||this._hintMarker._snapped||this._isFirstLayer())){this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);var e=this._hintMarker.getLatLng(),n=new L.Marker(e,this.options.markerStyle);this._setPane(n,"markerPane"),this._finishLayer(n),n.pm||(n.options.draggable=!1),n.addTo(this._map.pm._getContainingLayer()),n.pm&&this.options.markerEditable?n.pm.enable():n.dragging&&n.dragging.disable(),this._fireCreate(n),this._cleanupSnapping(),this.options.continueDrawing||this.disable()}}});var rt=n(8),it=n.n(rt);function at(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ot(t){for(var e=1;e0){var e=t[t.length-1];this._hintline.setLatLngs([e,this._hintMarker.getLatLng()])}},_syncHintMarker:function(t){if(this._hintMarker.setLatLng(t.latlng),this.options.snappable){var e=t;e.target=this._hintMarker,this._handleSnapping(e)}this.options.allowSelfIntersection||this._handleSelfIntersection(!0,t.latlng)},hasSelfIntersection:function(){return it()(this._layer.toGeoJSON(15)).features.length>0},_handleSelfIntersection:function(t,e){var n=L.polyline(this._layer.getLatLngs());t&&(e||(e=this._hintMarker.getLatLng()),n.addLatLng(e));var r=it()(n.toGeoJSON(15));this._doesSelfIntersect=r.features.length>0,this._doesSelfIntersect?this._hintline.setStyle({color:"#f00000ff"}):this._hintline.isEmpty()||this._hintline.setStyle(this.options.hintlineStyle)},_createVertex:function(t){if(this.options.allowSelfIntersection||(this._handleSelfIntersection(!0,t.latlng),!this._doesSelfIntersect)){this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);var e=this._hintMarker.getLatLng();if(e.equals(this._layer.getLatLngs()[0]))this._finishShape(t);else{this._layer._latlngInfo=this._layer._latlngInfo||[],this._layer._latlngInfo.push({latlng:e,snapInfo:this._hintMarker._snapInfo}),this._layer.addLatLng(e);var n=this._createMarker(e);this._setTooltipText(),this._hintline.setLatLngs([e,e]),this._fireVertexAdded(n,undefined,e,"Draw"),"snap"===this.options.finishOn&&this._hintMarker._snapped&&this._finishShape(t)}}},_removeLastVertex:function(){var t=this._layer.getLatLngs(),e=t.pop();if(t.length<1)this.disable();else{var n=this._layerGroup.getLayers().filter((function(t){return t instanceof L.Marker})).filter((function(t){return!L.DomUtil.hasClass(t._icon,"cursor-marker")})).find((function(t){return t.getLatLng()===e}));this._layerGroup.removeLayer(n),this._layer.setLatLngs(t),this._syncHintLine(),this._setTooltipText()}},_finishShape:function(){if((this.options.allowSelfIntersection||(this._handleSelfIntersection(!1),!this._doesSelfIntersect))&&(!this.options.requireSnapToFinish||this._hintMarker._snapped||this._isFirstLayer())){var t=this._layer.getLatLngs();if(!(t.length<=1)){var e=L.polyline(t,this.options.pathOptions);this._setPane(e,"layerPane"),this._finishLayer(e),e.addTo(this._map.pm._getContainingLayer()),this._fireCreate(e),this.options.snappable&&this._cleanupSnapping(),this.disable(),this.options.continueDrawing&&this.enable()}}},_createMarker:function(t){var e=new L.Marker(t,{draggable:!1,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._pmTempLayer=!0,this._layerGroup.addLayer(e),e.on("click",this._finishShape,this),e},_setTooltipText:function(){var t="";t=T(this._layer.getLatLngs().flat().length<=1?"tooltips.continueLine":"tooltips.finishLine"),this._hintMarker.setTooltipContent(t)}}),nt.Polygon=nt.Line.extend({initialize:function(t){this._map=t,this._shape="Polygon",this.toolbarButtonName="drawPolygon"},_createMarker:function(t){var e=new L.Marker(t,{draggable:!1,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._pmTempLayer=!0,this._layerGroup.addLayer(e),1===this._layer.getLatLngs().flat().length?(e.on("click",this._finishShape,this),this._tempSnapLayerIndex=this._otherSnapLayers.push(e)-1,this.options.snappable&&this._cleanupSnapping()):e.on("click",(function(){return 1})),e},_setTooltipText:function(){var t="";t=T(this._layer.getLatLngs().flat().length<=2?"tooltips.continueLine":"tooltips.finishPoly"),this._hintMarker.setTooltipContent(t)},_finishShape:function(t){if((this.options.allowSelfIntersection||(this._handleSelfIntersection(!0,this._layer.getLatLngs()[0]),!this._doesSelfIntersect))&&(!this.options.requireSnapToFinish||this._hintMarker._snapped||this._isFirstLayer())){var e=this._layer.getLatLngs();if(!(e.length<=2)){var n=L.polygon(e,this.options.pathOptions);this._setPane(n,"layerPane"),this._finishLayer(n),n.addTo(this._map.pm._getContainingLayer()),this._fireCreate(n),this._cleanupSnapping(),this._otherSnapLayers.splice(this._tempSnapLayerIndex,1),delete this._tempSnapLayerIndex,this.disable(),this.options.continueDrawing&&this.enable()}}}}),nt.Rectangle=nt.extend({initialize:function(t){this._map=t,this._shape="Rectangle",this.toolbarButtonName="drawRectangle"},enable:function(t){if(L.Util.setOptions(this,t),this._enabled=!0,this._layerGroup=new L.LayerGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=L.rectangle([[0,0],[0,0]],this.options.pathOptions),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._startMarker=L.marker([0,0],{icon:L.divIcon({className:"marker-icon rect-start-marker"}),draggable:!1,zIndexOffset:-100,opacity:this.options.cursorMarker?1:0}),this._setPane(this._startMarker,"vertexPane"),this._startMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._startMarker),this._hintMarker=L.marker([0,0],{zIndexOffset:150,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.tooltips&&this._hintMarker.bindTooltip(T("tooltips.firstVertex"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this.options.cursorMarker){L.DomUtil.addClass(this._hintMarker._icon,"visible"),this._styleMarkers=[];for(var e=0;e<2;e+=1){var n=L.marker([0,0],{icon:L.divIcon({className:"marker-icon rect-style-marker"}),draggable:!1,zIndexOffset:100});this._setPane(n,"vertexPane"),n._pmTempLayer=!0,this._layerGroup.addLayer(n),this._styleMarkers.push(n)}}this._map._container.style.cursor="crosshair",this._map.on("click",this._placeStartingMarkers,this),this._map.on("mousemove",this._syncHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._otherSnapLayers=[],this._fireDrawStart(),this._setGlobalDrawMode()},disable:function(){this._enabled&&(this._enabled=!1,this._map._container.style.cursor="",this._map.off("click",this._finishShape,this),this._map.off("click",this._placeStartingMarkers,this),this._map.off("mousemove",this._syncHintMarker,this),this._map.removeLayer(this._layerGroup),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled:function(){return this._enabled},toggle:function(t){this.enabled()?this.disable():this.enable(t)},_placeStartingMarkers:function(t){this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);var e=this._hintMarker.getLatLng();L.DomUtil.addClass(this._startMarker._icon,"visible"),this._startMarker.setLatLng(e),this.options.cursorMarker&&this._styleMarkers&&this._styleMarkers.forEach((function(t){L.DomUtil.addClass(t._icon,"visible"),t.setLatLng(e)})),this._map.off("click",this._placeStartingMarkers,this),this._map.on("click",this._finishShape,this),this._hintMarker.setTooltipContent(T("tooltips.finishRect")),this._setRectangleOrigin()},_setRectangleOrigin:function(){var t=this._startMarker.getLatLng();t&&(this._layerGroup.addLayer(this._layer),this._layer.setLatLngs([t,t]),this._hintMarker.on("move",this._syncRectangleSize,this))},_syncHintMarker:function(t){if(this._hintMarker.setLatLng(t.latlng),this.options.snappable){var e=t;e.target=this._hintMarker,this._handleSnapping(e)}},_syncRectangleSize:function(){var t=this,e=V(this._startMarker.getLatLng(),this._map),n=V(this._hintMarker.getLatLng(),this._map),r=L.PM.Utils._getRotatedRectangle(e,n,this.options.rectangleAngle||0,this._map);if(this._layer.setLatLngs(r),this.options.cursorMarker&&this._styleMarkers){var i=[];r.forEach((function(t){t.equals(e,1e-8)||t.equals(n,1e-8)||i.push(t)})),i.forEach((function(e,n){try{t._styleMarkers[n].setLatLng(e)}catch(r){}}))}},_findCorners:function(){var t=this._layer.getBounds();return[t.getNorthWest(),t.getNorthEast(),t.getSouthEast(),t.getSouthWest()]},_finishShape:function(t){this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);var e=this._hintMarker.getLatLng(),n=this._startMarker.getLatLng();if(!this.options.requireSnapToFinish||this._hintMarker._snapped||this._isFirstLayer()){var r=L.rectangle([n,e],this.options.pathOptions);if(this.options.rectangleAngle){var i=L.PM.Utils._getRotatedRectangle(n,e,this.options.rectangleAngle||0,this._map);r.setLatLngs(i),r.pm&&r.pm._setAngle(this.options.rectangleAngle||0)}this._setPane(r,"layerPane"),this._finishLayer(r),r.addTo(this._map.pm._getContainingLayer()),this._fireCreate(r),this.disable(),this.options.continueDrawing&&this.enable()}}}),nt.Circle=nt.extend({initialize:function(t){this._map=t,this._shape="Circle",this.toolbarButtonName="drawCircle"},enable:function(t){L.Util.setOptions(this,t),this.options.radius=0,this._enabled=!0,this._layerGroup=new L.LayerGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=L.circle([0,0],ot(ot({},this.options.templineStyle),{},{radius:0})),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._centerMarker=L.marker([0,0],{icon:L.divIcon({className:"marker-icon"}),draggable:!1,zIndexOffset:100}),this._setPane(this._centerMarker,"vertexPane"),this._centerMarker._pmTempLayer=!0,this._hintMarker=L.marker([0,0],{zIndexOffset:110,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(T("tooltips.startCircle"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._hintline=L.polyline([],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._layerGroup.addLayer(this._hintline),this._map._container.style.cursor="crosshair",this._map.on("click",this._placeCenterMarker,this),this._map.on("mousemove",this._syncHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._otherSnapLayers=[],this._fireDrawStart(),this._setGlobalDrawMode()},disable:function(){this._enabled&&(this._enabled=!1,this._map._container.style.cursor="",this._map.off("click",this._finishShape,this),this._map.off("click",this._placeCenterMarker,this),this._map.off("mousemove",this._syncHintMarker,this),this._map.removeLayer(this._layerGroup),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled:function(){return this._enabled},toggle:function(t){this.enabled()?this.disable():this.enable(t)},_syncHintLine:function(){var t=this._centerMarker.getLatLng(),e=this._getNewDestinationOfHintMarker();this._hintline.setLatLngs([t,e])},_syncCircleRadius:function(){var t,e=this._centerMarker.getLatLng(),n=this._hintMarker.getLatLng();t=this._map.options.crs===L.CRS.Simple?this._map.distance(e,n):e.distanceTo(n),this.options.minRadiusCircle&&tthis.options.maxRadiusCircle?this._layer.setRadius(this.options.maxRadiusCircle):this._layer.setRadius(t)},_syncHintMarker:function(t){if(this._hintMarker.setLatLng(t.latlng),this._hintMarker.setLatLng(this._getNewDestinationOfHintMarker()),this.options.snappable){var e=t;e.target=this._hintMarker,this._handleSnapping(e)}this._handleHintMarkerSnapping()},_placeCenterMarker:function(t){this._layerGroup.addLayer(this._layer),this._layerGroup.addLayer(this._centerMarker),this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);var e=this._hintMarker.getLatLng();this._layerGroup.addLayer(this._layer),this._centerMarker.setLatLng(e),this._map.off("click",this._placeCenterMarker,this),this._map.on("click",this._finishShape,this),this._placeCircleCenter()},_placeCircleCenter:function(){var t=this._centerMarker.getLatLng();t&&(this._layer.setLatLng(t),this._hintMarker.on("move",this._syncHintLine,this),this._hintMarker.on("move",this._syncCircleRadius,this),this._hintMarker.setTooltipContent(T("tooltips.finishCircle")),this._fireCenterPlaced())},_finishShape:function(t){if(!this.options.requireSnapToFinish||this._hintMarker._snapped||this._isFirstLayer()){this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);var e,n=this._centerMarker.getLatLng(),r=this._hintMarker.getLatLng();e=this._map.options.crs===L.CRS.Simple?this._map.distance(n,r):n.distanceTo(r),this.options.minRadiusCircle&&ethis.options.maxRadiusCircle&&(e=this.options.maxRadiusCircle);var i=ot(ot({},this.options.pathOptions),{},{radius:e}),a=L.circle(n,i);this._setPane(a,"layerPane"),this._finishLayer(a),a.addTo(this._map.pm._getContainingLayer()),a.pm&&a.pm._updateHiddenPolyCircle(),this._fireCreate(a),this.disable(),this.options.continueDrawing&&this.enable()}},_getNewDestinationOfHintMarker:function(){var t=this._centerMarker.getLatLng(),e=this._hintMarker.getLatLng(),n=t.distanceTo(e);return t.equals(L.latLng([0,0]))||(this.options.minRadiusCircle&&nthis.options.maxRadiusCircle&&(e=z(this._map,t,e,this.options.maxRadiusCircle))),e},_handleHintMarkerSnapping:function(){if(this._hintMarker._snapped){var t=this._centerMarker.getLatLng(),e=this._hintMarker.getLatLng(),n=t.distanceTo(e);(this.options.minRadiusCircle&&nthis.options.maxRadiusCircle)&&this._hintMarker.setLatLng(this._hintMarker._orgLatLng)}this._hintMarker.setLatLng(this._getNewDestinationOfHintMarker())}}),nt.CircleMarker=nt.Marker.extend({initialize:function(t){this._map=t,this._shape="CircleMarker",this.toolbarButtonName="drawCircleMarker",this._layerIsDragging=!1},enable:function(t){var e=this;L.Util.setOptions(this,t),this._enabled=!0,this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this.options.editable?(this._layerGroup=new L.LayerGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=L.circleMarker([0,0],this.options.templineStyle),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._centerMarker=L.marker([0,0],{icon:L.divIcon({className:"marker-icon"}),draggable:!1,zIndexOffset:100}),this._setPane(this._centerMarker,"vertexPane"),this._centerMarker._pmTempLayer=!0,this._hintMarker=L.marker([0,0],{zIndexOffset:110,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(T("tooltips.startCircle"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._hintline=L.polyline([],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._layerGroup.addLayer(this._hintline),this._map.on("click",this._placeCenterMarker,this),this._map._container.style.cursor="crosshair"):(this._map.on("click",this._createMarker,this),this._hintMarker=L.circleMarker([0,0],this.options.templineStyle),this._setPane(this._hintMarker,"layerPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this._layer=this._hintMarker,this.options.tooltips&&this._hintMarker.bindTooltip(T("tooltips.placeCircleMarker"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip()),this._map.on("mousemove",this._syncHintMarker,this),!this.options.editable&&this.options.markerEditable&&this._map.eachLayer((function(t){e.isRelevantMarker(t)&&t.pm.enable()})),this._layer.bringToBack(),this._fireDrawStart(),this._setGlobalDrawMode()},disable:function(){var t=this;this._enabled&&(this._enabled=!1,this.options.editable?(this._map._container.style.cursor="",this._map.off("click",this._finishShape,this),this._map.off("click",this._placeCenterMarker,this),this._map.removeLayer(this._layerGroup)):(this._map.off("click",this._createMarker,this),this._map.eachLayer((function(e){t.isRelevantMarker(e)&&e.pm.disable()})),this._hintMarker.remove()),this._map.off("mousemove",this._syncHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},_placeCenterMarker:function(t){this._layerGroup.addLayer(this._layer),this._layerGroup.addLayer(this._centerMarker),this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);var e=this._hintMarker.getLatLng();this._layerGroup.addLayer(this._layer),this._centerMarker.setLatLng(e),this._map.off("click",this._placeCenterMarker,this),this._map.on("click",this._finishShape,this),this._placeCircleCenter()},_placeCircleCenter:function(){var t=this._centerMarker.getLatLng();t&&(this._layer.setLatLng(t),this._hintMarker.on("move",this._syncHintLine,this),this._hintMarker.on("move",this._syncCircleRadius,this),this._hintMarker.setTooltipContent(T("tooltips.finishCircle")),this._fireCenterPlaced())},_syncHintLine:function(){var t=this._centerMarker.getLatLng(),e=this._getNewDestinationOfHintMarker();this._hintline.setLatLngs([t,e])},_syncCircleRadius:function(){var t=this._centerMarker.getLatLng(),e=this._hintMarker.getLatLng(),n=this._map.project(t).distanceTo(this._map.project(e));this.options.minRadiusCircleMarker&&nthis.options.maxRadiusCircleMarker?this._layer.setRadius(this.options.maxRadiusCircleMarker):this._layer.setRadius(n)},_syncHintMarker:function(t){if(this._hintMarker.setLatLng(t.latlng),this._hintMarker.setLatLng(this._getNewDestinationOfHintMarker()),this.options.snappable){var e=t;e.target=this._hintMarker,this._handleSnapping(e)}this._handleHintMarkerSnapping()},isRelevantMarker:function(t){return t instanceof L.CircleMarker&&!(t instanceof L.Circle)&&t.pm&&!t._pmTempLayer},_createMarker:function(t){if((!this.options.requireSnapToFinish||this._hintMarker._snapped||this._isFirstLayer())&&t.latlng&&!this._layerIsDragging){this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);var e=this._hintMarker.getLatLng(),n=L.circleMarker(e,this.options.pathOptions);this._setPane(n,"layerPane"),this._finishLayer(n),n.addTo(this._map.pm._getContainingLayer()),n.pm&&this.options.markerEditable&&n.pm.enable(),this._fireCreate(n),this._cleanupSnapping(),this.options.continueDrawing||this.disable()}},_finishShape:function(t){if(!this.options.requireSnapToFinish||this._hintMarker._snapped||this._isFirstLayer()){this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);var e=this._centerMarker.getLatLng(),n=this._hintMarker.getLatLng(),r=this._map.project(e).distanceTo(this._map.project(n));this.options.editable&&(this.options.minRadiusCircleMarker&&rthis.options.maxRadiusCircleMarker&&(r=this.options.maxRadiusCircleMarker));var i=ht(ht({},this.options.pathOptions),{},{radius:r}),a=L.circleMarker(e,i);this._setPane(a,"layerPane"),this._finishLayer(a),a.addTo(this._map.pm._getContainingLayer()),a.pm&&a.pm._updateHiddenPolyCircle(),this._fireCreate(a),this.disable(),this.options.continueDrawing&&this.enable()}},_getNewDestinationOfHintMarker:function(){var t=this._hintMarker.getLatLng();if(this.options.editable){var e=this._centerMarker.getLatLng();if(e.equals(L.latLng([0,0])))return t;var n=this._map.project(e).distanceTo(this._map.project(t));this.options.minRadiusCircleMarker&&nthis.options.maxRadiusCircleMarker&&(t=z(this._map,e,t,this._pxRadiusToMeter(this.options.maxRadiusCircleMarker)))}return t},_handleHintMarkerSnapping:function(){if(this.options.editable){if(this._hintMarker._snapped){var t=this._centerMarker.getLatLng(),e=this._hintMarker.getLatLng(),n=this._map.project(t).distanceTo(this._map.project(e));(this.options.minRadiusCircleMarker&&nthis.options.maxRadiusCircleMarker)&&this._hintMarker.setLatLng(this._hintMarker._orgLatLng)}this._hintMarker.setLatLng(this._getNewDestinationOfHintMarker())}},_pxRadiusToMeter:function(t){var e=this._centerMarker.getLatLng(),n=this._map.project(e),r=L.point(n.x+t,n.y);return this._map.unproject(r).distanceTo(e)}});var ct=n(1),ft=n.n(ct);function pt(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function dt(t,e){return te?1:0}var gt=function(t,e,n,r,i){!function a(t,e,n,r,i){for(;r>n;){if(r-n>600){var o=r-n+1,s=e-n+1,l=Math.log(o),h=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*h*(o-h)/o)*(s-o/2<0?-1:1),c=Math.max(n,Math.floor(e-s*h/o+u)),f=Math.min(r,Math.floor(e+(o-s)*h/o+u));a(t,e,c,f,i)}var p=t[e],d=n,g=r;for(pt(t,n,e),i(t[r],p)>0&&pt(t,n,r);d0;)g--}0===i(t[n],p)?pt(t,n,g):(g++,pt(t,g,r)),g<=e&&(n=g+1),e<=g&&(r=g-1)}}(t,e,n||0,r||t.length-1,i||dt)};function mt(t,e){if(!(this instanceof mt))return new mt(t,e);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),this.clear()}function _t(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r=t.minX&&e.maxY>=t.minY}function Ct(t){return{children:t,height:1,leaf:!0,minX:Infinity,minY:Infinity,maxX:-Infinity,maxY:-Infinity}}function Et(t,e,n,r,i){for(var a,o=[e,n];o.length;)(n=o.pop())-(e=o.pop())<=r||(a=e+Math.ceil((n-e)/r/2)*r,gt(t,a,e,n,i),o.push(e,a,a,n))}mt.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,n=[],r=this.toBBox;if(!Pt(t,e))return n;for(var i,a,o,s,l=[];e;){for(i=0,a=e.children.length;i=0&&a[e].children.length>this._maxEntries;)this._split(a,e),e--;this._adjustParentBBoxes(i,a,e)},_split:function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var a=this._chooseSplitIndex(n,i,r),o=Ct(n.children.splice(a,n.children.length-a));o.height=n.height,o.leaf=n.leaf,yt(n,this.toBBox),yt(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(n,o)},_splitRoot:function(t,e){this.data=Ct([t,e]),this.data.height=t.height+1,this.data.leaf=!1,yt(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,n){var r,i,a,o,s,l,h,u,c,f,p,d,g,m;for(l=h=Infinity,r=e;r<=n-e;r++)i=vt(t,0,r,this.toBBox),a=vt(t,r,n,this.toBBox),c=i,f=a,p=void 0,d=void 0,g=void 0,m=void 0,p=Math.max(c.minX,f.minX),d=Math.max(c.minY,f.minY),g=Math.min(c.maxX,f.maxX),m=Math.min(c.maxY,f.maxY),o=Math.max(0,g-p)*Math.max(0,m-d),s=Mt(i)+Mt(a),o=e;i--)a=t.children[i],bt(l,t.leaf?o(a):a),h+=xt(l);return h},_adjustParentBBoxes:function(t,e,n){for(var r=n;r>=0;r--)bt(e[r],t)},_condense:function(t){for(var e,n=t.length-1;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children).splice(e.indexOf(t[n]),1):this.clear():yt(t[n],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}};var St=mt;function Ot(t,e,n){if(!Tt(n=n||{}))throw new Error("options is invalid");var r=n.bbox,i=n.id;if(t===undefined)throw new Error("geometry is required");if(e&&e.constructor!==Object)throw new Error("properties must be an Object");r&&jt(r),i&&At(i);var a={type:"Feature"};return i&&(a.id=i),r&&(a.bbox=r),a.properties=e||{},a.geometry=t,a}function Bt(t,e,n){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!It(t[0])||!It(t[1]))throw new Error("coordinates must contain numbers");return Ot({type:"Point",coordinates:t},e,n)}function Rt(t,e,n){if(!t)throw new Error("coordinates is required");if(t.length<2)throw new Error("coordinates must be an array of two or more positions");if(!It(t[0][1])||!It(t[0][1]))throw new Error("coordinates must contain numbers");return Ot({type:"LineString",coordinates:t},e,n)}function Dt(t,e){if(!Tt(e=e||{}))throw new Error("options is invalid");var n=e.bbox,r=e.id;if(!t)throw new Error("No features passed");if(!Array.isArray(t))throw new Error("features must be an Array");n&&jt(n),r&&At(r);var i={type:"FeatureCollection"};return r&&(i.id=r),n&&(i.bbox=n),i.features=t,i}function It(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function Tt(t){return!!t&&t.constructor===Object}function jt(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!It(t))throw new Error("bbox must only contain numbers")}))}function At(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}function Gt(t,e,n){if(null!==t)for(var r,i,a,o,s,l,h,u,c=0,f=0,p=t.type,d="FeatureCollection"===p,g="Feature"===p,m=d?t.features.length:1,_=0;_t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]=2&&t[0].length===undefined&&t[1].length===undefined)return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}var Zt=function(t,e,n){if(!Ht(n=n||{}))throw new Error("options is invalid");var r=n.units,i=Jt(t),a=Jt(e),o=Kt(a[1]-i[1]),s=Kt(a[0]-i[0]),l=Kt(i[1]),h=Kt(a[1]),u=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(s/2),2)*Math.cos(l)*Math.cos(h);return qt(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),r)};var $t=function(t){var e=t[0],n=t[1],r=t[2],i=t[3];if(Zt(t.slice(0,2),[r,n])>=Zt(t.slice(0,2),[e,i])){var a=(n+i)/2;return[e,a-(r-e)/2,r,a+(r-e)/2]}var o=(e+r)/2;return[o-(i-n)/2,n,o+(i-n)/2,i]};var Wt=function(t){var e=[Infinity,Infinity,-Infinity,-Infinity];return Gt(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2] is required");if("number"!=typeof n)throw new Error(" must be a number");if("number"!=typeof r)throw new Error(" must be a number");!1!==i&&i!==undefined||(t=JSON.parse(JSON.stringify(t)));var a=Math.pow(10,n);return te(t,(function(t){!function(t,e,n){t.length>n&&t.splice(n,t.length);for(var r=0;r=2&&t[0].length===undefined&&t[1].length===undefined)return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function re(t){if(!t)throw new Error("coords is required");if("Feature"===t.type&&null!==t.geometry)return t.geometry.coordinates;if(t.coordinates)return t.coordinates;if(Array.isArray(t))return t;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function ie(t,e){if(!t)throw new Error((e||"geojson")+" is required");if(t.geometry&&t.geometry.type)return t.geometry.type;if(t.type)return t.type;throw new Error((e||"geojson")+" is invalid")}var ae=function(t){if(!t)throw new Error("geojson is required");var e=[];return Ft(t,(function(t){!function(t,e){var n=[],r=t.geometry;switch(r.type){case"Polygon":n=re(r);break;case"LineString":n=[re(r)]}n.forEach((function(n){(function(t,e){var n=[];return t.reduce((function(t,r){var i,a,o,s,l,h,u=Rt([t,r],e);return u.bbox=(a=r,o=(i=t)[0],s=i[1],l=a[0],h=a[1],[ol?o:l,s>h?s:h]),n.push(u),r})),n})(n,t.properties).forEach((function(t){t.id=e.length,e.push(t)}))}))}(t,e)})),Dt(e)};function oe(t,e){var n=re(t),r=re(e);if(2!==n.length)throw new Error(" line1 must only contain 2 coordinates");if(2!==r.length)throw new Error(" line2 must only contain 2 coordinates");var i=n[0][0],a=n[0][1],o=n[1][0],s=n[1][1],l=r[0][0],h=r[0][1],u=r[1][0],c=r[1][1],f=(c-h)*(o-i)-(u-l)*(s-a),p=(u-l)*(a-h)-(c-h)*(i-l),d=(o-i)*(a-h)-(s-a)*(i-l);if(0===f)return null;var g=p/f,m=d/f;return g>=0&&g<=1&&m>=0&&m<=1?Bt([i+g*(o-i),a+g*(s-a)]):null}var se=function(t,e){var n={},r=[];if("LineString"===t.type&&(t=Ot(t)),"LineString"===e.type&&(e=Ot(e)),"Feature"===t.type&&"Feature"===e.type&&"LineString"===t.geometry.type&&"LineString"===e.geometry.type&&2===t.geometry.coordinates.length&&2===e.geometry.coordinates.length){var i=oe(t,e);return i&&r.push(i),Dt(r)}var a=Yt();return a.load(ae(e)),Nt(ae(t),(function(t){Nt(a.search(t),(function(e){var i=oe(t,e);if(i){var a=re(i).join(",");n[a]||(n[a]=!0,r.push(i))}}))})),Dt(r)};function le(t){if(null===t||t===undefined)throw new Error("radians is required");return 180*(t%(2*Math.PI))/Math.PI}function he(t){if(null===t||t===undefined)throw new Error("degrees is required");return t%360*Math.PI/180}function ue(t){return!!t&&t.constructor===Object}function ce(t){if(!t)throw new Error("coord is required");if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)return t.coordinates;if(Array.isArray(t)&&t.length>=2&&t[0].length===undefined&&t[1].length===undefined)return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function fe(t,e,n){if(!ue(n=n||{}))throw new Error("options is invalid");if(!0===n.final)return function(t,e){var n=fe(e,t);return n=(n+180)%360}(t,e);var r=ce(t),i=ce(e),a=he(r[0]),o=he(i[0]),s=he(r[1]),l=he(i[1]),h=Math.sin(o-a)*Math.cos(l),u=Math.cos(s)*Math.sin(l)-Math.sin(s)*Math.cos(l)*Math.cos(o-a);return le(Math.atan2(h,u))}var pe=fe,de={meters:6371008.8,metres:6371008.8,millimeters:6371008800,millimetres:6371008800,centimeters:637100880,centimetres:637100880,kilometers:6371.0088,kilometres:6371.0088,miles:3958.761333810546,nauticalmiles:6371008.8/1852,inches:6371008.8*39.37,yards:6371008.8/1.0936,feet:20902260.511392,radians:1,degrees:6371008.8/111325};function ge(t,e,n){if(!Le(n=n||{}))throw new Error("options is invalid");var r=n.bbox,i=n.id;if(t===undefined)throw new Error("geometry is required");if(e&&e.constructor!==Object)throw new Error("properties must be an Object");r&&ke(r),i&&Me(i);var a={type:"Feature"};return i&&(a.id=i),r&&(a.bbox=r),a.properties=e||{},a.geometry=t,a}function me(t,e,n){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!be(t[0])||!be(t[1]))throw new Error("coordinates must contain numbers");return ge({type:"Point",coordinates:t},e,n)}function _e(t,e){if(t===undefined||null===t)throw new Error("distance is required");if(e&&"string"!=typeof e)throw new Error("units must be a string");var n=de[e||"kilometers"];if(!n)throw new Error(e+" units is invalid");return t/n}function ye(t){if(null===t||t===undefined)throw new Error("radians is required");return 180*(t%(2*Math.PI))/Math.PI}function ve(t){if(null===t||t===undefined)throw new Error("degrees is required");return t%360*Math.PI/180}function be(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function Le(t){return!!t&&t.constructor===Object}function ke(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!be(t))throw new Error("bbox must only contain numbers")}))}function Me(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}var xe=function(t,e,n,r){if(!Le(r=r||{}))throw new Error("options is invalid");var i=r.units,a=r.properties,o=function(t){if(!t)throw new Error("coord is required");if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)return t.coordinates;if(Array.isArray(t)&&t.length>=2&&t[0].length===undefined&&t[1].length===undefined)return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}(t),s=ve(o[0]),l=ve(o[1]),h=ve(n),u=_e(e,i),c=Math.asin(Math.sin(l)*Math.cos(u)+Math.cos(l)*Math.sin(u)*Math.cos(h));return me([ye(s+Math.atan2(Math.sin(h)*Math.sin(u)*Math.cos(l),Math.cos(u)-Math.sin(l)*Math.sin(c))),ye(c)],a)};function we(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Pe(t,e){return te?1:0}var Ce=function(t,e,n,r,i){!function a(t,e,n,r,i){for(;r>n;){if(r-n>600){var o=r-n+1,s=e-n+1,l=Math.log(o),h=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*h*(o-h)/o)*(s-o/2<0?-1:1),c=Math.max(n,Math.floor(e-s*h/o+u)),f=Math.min(r,Math.floor(e+(o-s)*h/o+u));a(t,e,c,f,i)}var p=t[e],d=n,g=r;for(we(t,n,e),i(t[r],p)>0&&we(t,n,r);d0;)g--}0===i(t[n],p)?we(t,n,g):(g++,we(t,g,r)),g<=e&&(n=g+1),e<=g&&(r=g-1)}}(t,e,n||0,r||t.length-1,i||Pe)};function Ee(t,e){if(!(this instanceof Ee))return new Ee(t,e);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),this.clear()}function Se(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r=t.minX&&e.maxY>=t.minY}function Ne(t){return{children:t,height:1,leaf:!0,minX:Infinity,minY:Infinity,maxX:-Infinity,maxY:-Infinity}}function ze(t,e,n,r,i){for(var a,o=[e,n];o.length;)(n=o.pop())-(e=o.pop())<=r||(a=e+Math.ceil((n-e)/r/2)*r,Ce(t,a,e,n,i),o.push(e,a,a,n))}Ee.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,n=[],r=this.toBBox;if(!Ge(t,e))return n;for(var i,a,o,s,l=[];e;){for(i=0,a=e.children.length;i=0&&a[e].children.length>this._maxEntries;)this._split(a,e),e--;this._adjustParentBBoxes(i,a,e)},_split:function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var a=this._chooseSplitIndex(n,i,r),o=Ne(n.children.splice(a,n.children.length-a));o.height=n.height,o.leaf=n.leaf,Oe(n,this.toBBox),Oe(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(n,o)},_splitRoot:function(t,e){this.data=Ne([t,e]),this.data.height=t.height+1,this.data.leaf=!1,Oe(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,n){var r,i,a,o,s,l,h,u,c,f,p,d,g,m;for(l=h=Infinity,r=e;r<=n-e;r++)i=Be(t,0,r,this.toBBox),a=Be(t,r,n,this.toBBox),c=i,f=a,p=void 0,d=void 0,g=void 0,m=void 0,p=Math.max(c.minX,f.minX),d=Math.max(c.minY,f.minY),g=Math.min(c.maxX,f.maxX),m=Math.min(c.maxY,f.maxY),o=Math.max(0,g-p)*Math.max(0,m-d),s=Te(i)+Te(a),o=e;i--)a=t.children[i],Re(l,t.leaf?o(a):a),h+=je(l);return h},_adjustParentBBoxes:function(t,e,n){for(var r=n;r>=0;r--)Re(e[r],t)},_condense:function(t){for(var e,n=t.length-1;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children).splice(e.indexOf(t[n]),1):this.clear():Oe(t[n],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}};var Fe=Ee;function Ve(t,e,n){if(!Ke(n=n||{}))throw new Error("options is invalid");var r=n.bbox,i=n.id;if(t===undefined)throw new Error("geometry is required");if(e&&e.constructor!==Object)throw new Error("properties must be an Object");r&&He(r),i&&Je(i);var a={type:"Feature"};return i&&(a.id=i),r&&(a.bbox=r),a.properties=e||{},a.geometry=t,a}function Ue(t,e,n){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!qe(t[0])||!qe(t[1]))throw new Error("coordinates must contain numbers");return Ve({type:"Point",coordinates:t},e,n)}function Ye(t,e,n){if(!t)throw new Error("coordinates is required");if(t.length<2)throw new Error("coordinates must be an array of two or more positions");if(!qe(t[0][1])||!qe(t[0][1]))throw new Error("coordinates must contain numbers");return Ve({type:"LineString",coordinates:t},e,n)}function Xe(t,e){if(!Ke(e=e||{}))throw new Error("options is invalid");var n=e.bbox,r=e.id;if(!t)throw new Error("No features passed");if(!Array.isArray(t))throw new Error("features must be an Array");n&&He(n),r&&Je(r);var i={type:"FeatureCollection"};return r&&(i.id=r),n&&(i.bbox=n),i.features=t,i}function qe(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function Ke(t){return!!t&&t.constructor===Object}function He(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!qe(t))throw new Error("bbox must only contain numbers")}))}function Je(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}function Ze(t,e,n){if(null!==t)for(var r,i,a,o,s,l,h,u,c=0,f=0,p=t.type,d="FeatureCollection"===p,g="Feature"===p,m=d?t.features.length:1,_=0;_t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]l?o:l,s>h?s:h]),n.push(u),r})),n})(n,t.properties).forEach((function(t){t.id=e.length,e.push(t)}))}))}(t,e)})),Xe(e)};function on(t,e){var n=rn(t),r=rn(e);if(2!==n.length)throw new Error(" line1 must only contain 2 coordinates");if(2!==r.length)throw new Error(" line2 must only contain 2 coordinates");var i=n[0][0],a=n[0][1],o=n[1][0],s=n[1][1],l=r[0][0],h=r[0][1],u=r[1][0],c=r[1][1],f=(c-h)*(o-i)-(u-l)*(s-a),p=(u-l)*(a-h)-(c-h)*(i-l),d=(o-i)*(a-h)-(s-a)*(i-l);if(0===f)return null;var g=p/f,m=d/f;return g>=0&&g<=1&&m>=0&&m<=1?Ue([i+g*(o-i),a+g*(s-a)]):null}var sn=function(t,e){var n={},r=[];if("LineString"===t.type&&(t=Ve(t)),"LineString"===e.type&&(e=Ve(e)),"Feature"===t.type&&"Feature"===e.type&&"LineString"===t.geometry.type&&"LineString"===e.geometry.type&&2===t.geometry.coordinates.length&&2===e.geometry.coordinates.length){var i=on(t,e);return i&&r.push(i),Xe(r)}var a=nn();return a.load(an(e)),$e(an(t),(function(t){$e(a.search(t),(function(e){var i=on(t,e);if(i){var a=rn(i).join(",");n[a]||(n[a]=!0,r.push(i))}}))})),Xe(r)};var ln=function(t,e,n){if(!Ke(n=n||{}))throw new Error("options is invalid");var r=t.geometry?t.geometry.type:t.type;if("LineString"!==r&&"MultiLineString"!==r)throw new Error("lines must be LineString or MultiLineString");var i=Ue([Infinity,Infinity],{dist:Infinity}),a=0;return Qe(t,(function(t){for(var r=rn(t),o=0;o0&&((g=d.features[0]).properties.dist=Zt(e,g,n),g.properties.location=a+Zt(s,g,n)),s.properties.dist1&&n.push(Rt(h)),Dt(n)}function cn(t,e){if(!e.features.length)throw new Error("lines must contain features");if(1===e.features.length)return e.features[0];var n,r=Infinity;return Nt(e,(function(e){var i=ln(e,t).properties.dist;i1?e.forEach((function(t){r.push(function(t){return yn({type:"LineString",coordinates:t})}(t))})):r.push(t),r}function xn(t){var e=[];return t.eachLayer((function(t){e.push(bn(t.toGeoJSON(15)))})),function(t){return yn({type:"MultiLineString",coordinates:t})}(e)}function wn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,a=undefined;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!e||n.length!==e);r=!0);}catch(l){i=!0,a=l}finally{try{r||null==s["return"]||s["return"]()}finally{if(i)throw a}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Pn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pn(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0)||e.options.layersToCut.indexOf(t)>-1})).filter((function(t){return!e._layerGroup.hasLayer(t)})).filter((function(e){try{var n=!!ft()(t.toGeoJSON(15),e.toGeoJSON(15)).features.length>0;return n||e instanceof L.Polyline&&!(e instanceof L.Polygon)?n:(r=t.toGeoJSON(15),i=e.toGeoJSON(15),a=vn(r),o=vn(i),!(0===(s=_n.a.intersection(a.coordinates,o.coordinates)).length||!(1===s.length?Ln(s[0]):kn(s))))}catch(l){return e instanceof L.Polygon&&console.error("You can't cut polygons with self-intersections"),!1}var r,i,a,o,s})).forEach((function(n){var i;if(n instanceof L.Polygon){var a=(i=L.polygon(n.getLatLngs())).getLatLngs();r.forEach((function(t){if(t&&t.snapInfo){var n=t.latlng,r=e._calcClosestLayer(n,[i]);if(r&&r.segment&&r.distance1?R()(a,h):a).splice(u,0,n)}}}}))}else i=n;var o=e._cutLayer(t,i),s=L.geoJSON(o,n.options);if(1===s.getLayers().length){var l=s.getLayers();s=wn(l,1)[0]}e._setPane(s,"layerPane");var h=s.addTo(e._map.pm._getContainingLayer());if(h.pm.enable(n.pm.options),h.pm.disable(),n._pmTempLayer=!0,t._pmTempLayer=!0,n.remove(),n.removeFrom(e._map.pm._getContainingLayer()),t.remove(),t.removeFrom(e._map.pm._getContainingLayer()),h.getLayers&&0===h.getLayers().length&&e._map.pm.removeLayer({target:h}),h instanceof L.LayerGroup?(h.eachLayer((function(t){e._addDrawnLayerProp(t)})),e._addDrawnLayerProp(h)):e._addDrawnLayerProp(h),e.options.layersToCut&&L.Util.isArray(e.options.layersToCut)&&e.options.layersToCut.length>0){var u=e.options.layersToCut.indexOf(n);u>-1&&e.options.layersToCut.splice(u,1)}e._editedLayers.push({layer:h,originalLayer:n})}))},_cutLayer:function(t,e){var n,r,i,a,o,s,l=L.geoJSON();if(e instanceof L.Polygon)r=e.toGeoJSON(15),i=t.toGeoJSON(15),a=vn(r),o=vn(i),n=0===(s=_n.a.difference(a.coordinates,o.coordinates)).length?null:1===s.length?Ln(s[0]):kn(s);else{var h=Mn(e);h.forEach((function(e){var n=pn(e,t.toGeoJSON(15));(n&&n.features.length>0?L.geoJSON(n):L.geoJSON(e)).getLayers().forEach((function(e){gn()(t.toGeoJSON(15),e.toGeoJSON(15))||e.addTo(l)}))})),n=h.length>1?xn(l):l.toGeoJSON(15)}return n}});var Cn={enableLayerDrag:function(){var t;if(this.options.draggable){this.disable(),this._layerDragEnabled=!0,this._map||(this._map=this._layer._map),(this._layer instanceof L.Marker||this._layer instanceof L.ImageOverlay)&&L.DomEvent.on(this._getDOMElem(),"dragstart",this._stopDOMImageDrag),this._layer.dragging&&this._layer.dragging.disable(),this._tempDragCoord=null,(null===(t=this._layer._map)||void 0===t?void 0:t.options.preferCanvas)?(this._layer.on("mouseout",this.removeDraggingClass,this),this._layer.on("mouseover",this.addDraggingClass,this)):this.addDraggingClass(),this._originalMapDragState=this._layer._map.dragging._enabled,this._safeToCacheDragState=!0;var e=this._layer instanceof L.Marker?this._layer._icon:this._layer._path;e&&L.DomEvent.on(e,"touchstart mousedown",this._simulateMouseDownEvent,this)}},disableLayerDrag:function(){var t;this._layerDragEnabled=!1,(null===(t=this._layer._map)||void 0===t?void 0:t.options.preferCanvas)?(this._layer.off("mouseout",this.removeDraggingClass,this),this._layer.off("mouseover",this.addDraggingClass,this)):this.removeDraggingClass(),this._safeToCacheDragState=!1,this._layer.dragging&&this._layer.dragging.disable();var e=this._layer instanceof L.Marker?this._layer._icon:this._layer._path;e&&L.DomEvent.off(e,"touchstart mousedown",this._simulateMouseDownEvent,this)},dragging:function(){return this._dragging},layerDragEnabled:function(){return!!this._layerDragEnabled},_simulateMouseDownEvent:function(t){var e={originalEvent:t,target:this._layer};return e.containerPoint=this._map.mouseEventToContainerPoint(t),e.latlng=this._map.containerPointToLatLng(e.containerPoint),this._dragMixinOnMouseDown(e),!1},_simulateMouseMoveEvent:function(t){var e={originalEvent:t,target:this._layer};return e.containerPoint=this._map.mouseEventToContainerPoint(t),e.latlng=this._map.containerPointToLatLng(e.containerPoint),this._dragMixinOnMouseMove(e),!1},_simulateMouseUpEvent:function(t){var e={originalEvent:t,target:this._layer};return e.containerPoint=this._map.mouseEventToContainerPoint(t),e.latlng=this._map.containerPointToLatLng(e.containerPoint),this._dragMixinOnMouseUp(e),!1},_dragMixinOnMouseDown:function(t){if(!(t.originalEvent.button>0)){this._overwriteEventIfItComesFromMarker(t);var e=t._fromLayerSync,n=this._syncLayers("_dragMixinOnMouseDown",t);this._layer instanceof L.Marker&&(!this.options.snappable||e||n?this._disableSnapping():this._initSnappableMarkers()),this._layer instanceof L.CircleMarker&&!(this._layer instanceof L.Circle)&&(!this.options.snappable||e||n?this._layer.pm.options.editable?this._layer.pm._disableSnapping():this._layer.pm._disableSnappingDrag():this._layer.pm.options.editable||this._initSnappableMarkersDrag()),this._safeToCacheDragState&&(this._originalMapDragState=this._layer._map.dragging._enabled,this._safeToCacheDragState=!1),this._tempDragCoord=t.latlng,L.DomEvent.on(this._map.getContainer(),"touchend mouseup",this._simulateMouseUpEvent,this),L.DomEvent.on(this._map.getContainer(),"touchmove mousemove",this._simulateMouseMoveEvent,this)}},_dragMixinOnMouseMove:function(t){this._overwriteEventIfItComesFromMarker(t);var e=this._getDOMElem();this._syncLayers("_dragMixinOnMouseMove",t),this._dragging||(this._dragging=!0,L.DomUtil.addClass(e,"leaflet-pm-dragging"),this._layer instanceof L.Marker||this._layer.bringToFront(),this._originalMapDragState&&this._layer._map.dragging.disable(),this._fireDragStart()),this._onLayerDrag(t),this._layer instanceof L.CircleMarker&&this._layer.pm._updateHiddenPolyCircle()},_dragMixinOnMouseUp:function(t){var e=this,n=this._getDOMElem();return this._syncLayers("_dragMixinOnMouseUp",t),this._originalMapDragState&&this._layer._map.dragging.enable(),this._safeToCacheDragState=!0,L.DomEvent.off(this._map.getContainer(),"touchmove mousemove",this._simulateMouseMoveEvent,this),L.DomEvent.off(this._map.getContainer(),"touchend mouseup",this._simulateMouseUpEvent,this),!!this._dragging&&(this._layer instanceof L.CircleMarker&&this._layer.pm._updateHiddenPolyCircle(),window.setTimeout((function(){e._dragging=!1,L.DomUtil.removeClass(n,"leaflet-pm-dragging"),e._fireDragEnd(),e._fireEdit(),e._layerEdited=!0}),10),!0)},_onLayerDrag:function(t){var e=t.latlng,n=e.lat-this._tempDragCoord.lat,r=e.lng-this._tempDragCoord.lng,i=function u(t){return t.map((function(t){return Array.isArray(t)?u(t):{lat:t.lat+n,lng:t.lng+r}}))};if(this._layer instanceof L.Circle||this._layer instanceof L.CircleMarker&&this._layer.options.editable){var a=i([this._layer.getLatLng()]);this._layer.setLatLng(a[0])}else if(this._layer instanceof L.CircleMarker||this._layer instanceof L.Marker){var o=this._layer.getLatLng();this._layer._snapped&&(o=this._layer._orgLatLng);var s=i([o]);this._layer.setLatLng(s[0])}else if(this._layer instanceof L.ImageOverlay){var l=i([this._layer.getBounds().getNorthWest(),this._layer.getBounds().getSouthEast()]);this._layer.setBounds(l)}else{var h=i(this._layer.getLatLngs());this._layer.setLatLngs(h)}this._tempDragCoord=e,t.layer=this._layer,this._fireDrag(t)},addDraggingClass:function(){var t=this._getDOMElem();t&&L.DomUtil.addClass(t,"leaflet-pm-draggable")},removeDraggingClass:function(){var t=this._getDOMElem();t&&L.DomUtil.removeClass(t,"leaflet-pm-draggable")},_getDOMElem:function(){var t=null;return this._layer._path?t=this._layer._path:this._layer._renderer&&this._layer._renderer._container?t=this._layer._renderer._container:this._layer._image?t=this._layer._image:this._layer._icon&&(t=this._layer._icon),t},_overwriteEventIfItComesFromMarker:function(t){t.target.getLatLng&&(!t.target._radius||t.target._radius<=10)&&(t.containerPoint=this._map.mouseEventToContainerPoint(t.originalEvent),t.latlng=this._map.containerPointToLatLng(t.containerPoint))},_syncLayers:function(t,e){var n=this;if(this.enabled())return!1;if(!e._fromLayerSync&&this._layer===e.target&&this.options.syncLayersOnDrag){e._fromLayerSync=!0;var r=[];if(L.Util.isArray(this.options.syncLayersOnDrag))r=this.options.syncLayersOnDrag,this.options.syncLayersOnDrag.forEach((function(t){t instanceof L.LayerGroup&&(r=r.concat(t.pm.getLayers(!0)))}));else if(!0===this.options.syncLayersOnDrag&&this._parentLayerGroup)for(var i in this._parentLayerGroup){var a=this._parentLayerGroup[i];a.pm&&(r=a.pm.getLayers(!0))}return L.Util.isArray(r)&&r.length>0&&(r=r.filter((function(t){return!!t.pm})).filter((function(t){return!!t.pm.options.draggable}))).forEach((function(r){r!==n._layer&&r.pm[t]&&(r._snapped=!1,r.pm[t](e))})),r.length>0}return!1},_stopDOMImageDrag:function(t){return t.preventDefault(),!1}};function En(t,e){e instanceof L.Layer&&(e=e.getLatLng());var n=t.getMaxZoom();return n===Infinity&&(n=t.getZoom()),t.project(e,n)}function Sn(t,e){var n=t.getMaxZoom();return n===Infinity&&(n=t.getZoom()),t.unproject(e,n)}var On={_onRotateStart:function(t){this._preventRenderingMarkers(!0),this._rotationOriginLatLng=this._getRotationCenter().clone(),this._rotationOriginPoint=En(this._map,this._rotationOriginLatLng),this._rotationStartPoint=En(this._map,t.target.getLatLng()),this._initialRotateLatLng=F(this._layer),this._startAngle=this.getAngle();var e=F(this._rotationLayer,this._rotationLayer.pm._rotateOrgLatLng);this._fireRotationStart(this._rotationLayer,e),this._fireRotationStart(this._map,e)},_onRotate:function(t){var e=En(this._map,t.target.getLatLng()),n=this._rotationStartPoint,r=this._rotationOriginPoint,i=Math.atan2(e.y-r.y,e.x-r.x)-Math.atan2(n.y-r.y,n.x-r.x);this._layer.setLatLngs(this._rotateLayer(i,this._initialRotateLatLng,this._rotationOriginLatLng,L.PM.Matrix.init(),this._map));var a=this;!function h(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:-1;if(n>-1&&e.push(n),L.Util.isArray(t[0]))t.forEach((function(t,n){return h(t,e.slice(),n)}));else{var r=R()(a._markers,e);t.forEach((function(t,e){r[e].setLatLng(t)}))}}(this._layer.getLatLngs());var o=F(this._rotationLayer);this._rotationLayer.setLatLngs(this._rotateLayer(i,this._rotationLayer.pm._rotateOrgLatLng,this._rotationOriginLatLng,L.PM.Matrix.init(),this._map));var s=180*i/Math.PI,l=(s=s<0?s+360:s)+this._startAngle;this._setAngle(l),this._rotationLayer.pm._setAngle(l),this._fireRotation(this._rotationLayer,s,o),this._fireRotation(this._map,s,o)},_onRotateEnd:function(){var t=this._startAngle;delete this._rotationOriginLatLng,delete this._rotationOriginPoint,delete this._rotationStartPoint,delete this._initialRotateLatLng,delete this._startAngle;var e=F(this._rotationLayer,this._rotationLayer.pm._rotateOrgLatLng);this._rotationLayer.pm._rotateOrgLatLng=F(this._rotationLayer),this._fireRotationEnd(this._rotationLayer,t,e),this._fireRotationEnd(this._map,t,e),this._rotationLayer.pm._fireEdit(this._rotationLayer,"Rotation"),this._preventRenderingMarkers(!1)},_rotateLayer:function(t,e,n,r,i){var a=En(i,n);return this._matrix=r.clone().rotate(t,a).flip(),function o(t,e,n){var r=n.getMaxZoom();if(r===Infinity&&(r=n.getZoom()),L.Util.isArray(t)){var i=[];return t.forEach((function(t){i.push(o(t,e,n))})),i}return t instanceof L.LatLng?function(t,e,n,r){return n.unproject(e.transform(n.project(t,r)),r)}(t,e,n,r):null}(e,this._matrix,i)},_setAngle:function(t){t=t<0?t+360:t,this._angle=t%360},_getRotationCenter:function(){var t=L.polygon(this._layer.getLatLngs(),{stroke:!1,fill:!1,pmIgnore:!0}).addTo(this._layer._map),e=t.getCenter();return t.removeFrom(this._layer._map),e},enableRotate:function(){if(this.options.allowRotation){this._rotatePoly=L.polygon(this._layer.getLatLngs(),{fill:!1,stroke:!1,pmIgnore:!1,snapIgnore:!0}).addTo(this._layer._map),this._rotatePoly.pm._setAngle(this.getAngle()),this._rotatePoly.pm.setOptions(this._layer._map.pm.getGlobalOptions()),this._rotatePoly.pm.setOptions({rotate:!0,snappable:!1,hideMiddleMarkers:!0}),this._rotatePoly.pm._rotationLayer=this._layer,this._rotatePoly.pm.enable(),this._rotateOrgLatLng=F(this._layer),this._rotateEnabled=!0,this._layer.on("remove",this.disableRotate,this),this._fireRotationEnable(this._layer),this._fireRotationEnable(this._layer._map)}else this.disableRotate()},disableRotate:function(){this.rotateEnabled()&&(this._rotatePoly.pm.disable(),this._rotatePoly.remove(),this._rotatePoly.pm.setOptions({rotate:!1}),this._rotatePoly=undefined,this._rotateOrgLatLng=undefined,this._layer.off("remove",this.disableRotate,this),this._rotateEnabled=!1,this._fireRotationDisable(this._layer),this._fireRotationDisable(this._layer._map))},rotateEnabled:function(){return this._rotateEnabled},rotateLayer:function(t){var e=t*(Math.PI/180);this._layer.setLatLngs(this._rotateLayer(e,this._layer.getLatLngs(),this._getRotationCenter(),L.PM.Matrix.init(),this._layer._map)),this._rotateOrgLatLng=L.polygon(this._layer.getLatLngs()).getLatLngs(),this._setAngle(this.getAngle()+t),this.rotateEnabled()&&this._rotatePoly&&this._rotatePoly.pm.enabled()&&(this._rotatePoly.setLatLngs(this._rotateLayer(e,this._rotatePoly.getLatLngs(),this._getRotationCenter(),L.PM.Matrix.init(),this._rotatePoly._map)),this._rotatePoly.pm._initMarkers())},rotateLayerToAngle:function(t){var e=t-this.getAngle();this.rotateLayer(e)},getAngle:function(){return this._angle||0}},Bn=L.Class.extend({includes:[Cn,et,On,E],options:{snappable:!0,snapDistance:20,allowSelfIntersection:!0,allowSelfIntersectionEdit:!1,preventMarkerRemoval:!1,removeLayerBelowMinVertexCount:!0,limitMarkersToCount:-1,hideMiddleMarkers:!1,snapSegment:!0,syncLayersOnDrag:!1,draggable:!0,allowEditing:!0,allowRemoval:!0,allowCutting:!0,allowRotation:!0,addVertexOn:"click",removeVertexOn:"contextmenu",removeVertexValidation:undefined,addVertexValidation:undefined,moveVertexValidation:undefined},setOptions:function(t){L.Util.setOptions(this,t)},getOptions:function(){return this.options},applyOptions:function(){},isPolygon:function(){return this._layer instanceof L.Polygon},getShape:function(){return this._shape},_setPane:function(t,e){"layerPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.layerPane||"overlayPane":"vertexPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.vertexPane||"markerPane":"markerPane"===e&&(t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.markerPane||"markerPane")},remove:function(){(this._map||this._layer._map).pm.removeLayer({target:this._layer})},_vertexValidation:function(t,e){var n=e.target,r={layer:this._layer,marker:n,event:e},i="";return"move"===t?i="moveVertexValidation":"add"===t?i="addVertexValidation":"remove"===t&&(i="removeVertexValidation"),this.options[i]&&"function"==typeof this.options[i]&&!this.options[i](r)?("move"===t&&(n._cancelDragEventChain=n.getLatLng()),!1):(n._cancelDragEventChain=null,!0)},_vertexValidationDrag:function(t){return!t._cancelDragEventChain||(t._latlng=t._cancelDragEventChain,t.update(),!1)},_vertexValidationDragEnd:function(t){return!t._cancelDragEventChain||(t._cancelDragEventChain=null,!1)}});function Rn(t){return function(t){if(Array.isArray(t))return Dn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Dn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dn(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&e._getMap()&&e._getMap().pm.globalEditModeEnabled()&&e.enabled()&&e.enable(e.getOptions())}}),100,this),this),this._layerGroup.on("layerremove",(function(t){e._removeLayerFromGroup(t.target)}),this);this._layerGroup.on("layerremove",L.Util.throttle((function(t){t.target._pmTempLayer||(e._layers=e.getLayers())}),100,this),this)},enable:function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];0===e.length&&(this._layers=this.getLayers()),this._options=t,this._layers.forEach((function(n){n instanceof L.LayerGroup?-1===e.indexOf(n._leaflet_id)&&(e.push(n._leaflet_id),n.pm.enable(t,e)):n.pm.enable(t)}))},disable:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];0===t.length&&(this._layers=this.getLayers()),this._layers.forEach((function(e){e instanceof L.LayerGroup?-1===t.indexOf(e._leaflet_id)&&(t.push(e._leaflet_id),e.pm.disable(t)):e.pm.disable()}))},enabled:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];0===t.length&&(this._layers=this.getLayers());var e=this._layers.find((function(e){return e instanceof L.LayerGroup?-1===t.indexOf(e._leaflet_id)&&(t.push(e._leaflet_id),e.pm.enabled(t)):e.pm.enabled()}));return!!e},toggleEdit:function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];0===e.length&&(this._layers=this.getLayers()),this._options=t,this._layers.forEach((function(n){n instanceof L.LayerGroup?-1===e.indexOf(n._leaflet_id)&&(e.push(n._leaflet_id),n.pm.toggleEdit(t,e)):n.pm.toggleEdit(t)}))},_initLayer:function(t){var e=L.Util.stamp(this._layerGroup);t.pm._parentLayerGroup||(t.pm._parentLayerGroup={}),t.pm._parentLayerGroup[e]=this._layerGroup},_removeLayerFromGroup:function(t){if(t.pm&&t.pm._layerGroup){var e=L.Util.stamp(this._layerGroup);delete t.pm._layerGroup[e]}},dragging:function(){if(this._layers=this.getLayers(),this._layers){var t=this._layers.find((function(t){return t.pm.dragging()}));return!!t}return!1},getOptions:function(){return this.options},_getMap:function(){var t;return this._map||(null===(t=this._layers.find((function(t){return!!t._map})))||void 0===t?void 0:t._map)||null},getLayers:function(){var t=arguments.length>0&&arguments[0]!==undefined&&arguments[0],e=!(arguments.length>1&&arguments[1]!==undefined)||arguments[1],n=!(arguments.length>2&&arguments[2]!==undefined)||arguments[2],r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:[],i=[];return t?this._layerGroup.getLayers().forEach((function(t){i.push(t),t instanceof L.LayerGroup&&-1===r.indexOf(t._leaflet_id)&&(r.push(t._leaflet_id),i=i.concat(t.pm.getLayers(!0,!0,!0,r)))})):i=this._layerGroup.getLayers(),n&&(i=i.filter((function(t){return!(t instanceof L.LayerGroup)}))),e&&(i=(i=(i=i.filter((function(t){return!!t.pm}))).filter((function(t){return!t._pmTempLayer}))).filter((function(t){return!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore}))),i},setOptions:function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];0===e.length&&(this._layers=this.getLayers()),this.options=t,this._layers.forEach((function(n){n.pm&&(n instanceof L.LayerGroup?-1===e.indexOf(n._leaflet_id)&&(e.push(n._leaflet_id),n.pm.setOptions(t,e)):n.pm.setOptions(t))}))}}),Bn.Marker=Bn.extend({_shape:"Marker",initialize:function(t){this._layer=t,this._enabled=!1,this._layer.on("dragend",this._onDragEnd,this)},enable:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{draggable:!0};L.Util.setOptions(this,t),this._map=this._layer._map,this.options.allowEditing?this.enabled()||(this.applyOptions(),this._enabled=!0,this._fireEnable()):this.disable()},disable:function(){this._enabled=!1,this.disableLayerDrag(),this._layer.off("contextmenu",this._removeMarker,this),this.enabled()&&(this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable())},enabled:function(){return this._enabled},toggleEdit:function(t){this.enabled()?this.disable():this.enable(t)},applyOptions:function(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping(),this.options.draggable?this.enableLayerDrag():this.disableLayerDrag(),this.options.preventMarkerRemoval||this._layer.on("contextmenu",this._removeMarker,this)},_removeMarker:function(t){var e=t.target;e.remove(),this._fireRemove(e),this._fireRemove(this._map,e)},_onDragEnd:function(){this._fireEdit(),this._layerEdited=!0},_initSnappableMarkers:function(){var t=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=this.options.snapSegment===undefined||this.options.snapSegment,t.off("pm:drag",this._handleSnapping,this),t.on("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.on("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this),t.on("pm:dragstart",this._unsnap,this)},_disableSnapping:function(){var t=this._layer;t.off("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this)}});var In={filterMarkerGroup:function(){this.markerCache=[],this.createCache(),this._layer.on("pm:edit",this.createCache,this),this.applyLimitFilters({}),this._layer.on("pm:disable",this._removeMarkerLimitEvents,this),this.options.limitMarkersToCount>-1&&(this._layer.on("pm:vertexremoved",this._initMarkers,this),this._map.on("mousemove",this.applyLimitFilters,this))},_removeMarkerLimitEvents:function(){this._map.off("mousemove",this.applyLimitFilters,this),this._layer.off("pm:edit",this.createCache,this),this._layer.off("pm:disable",this._removeMarkerLimitEvents,this),this._layer.off("pm:vertexremoved",this._initMarkers,this)},createCache:function(){var t=[].concat(Rn(this._markerGroup.getLayers()),Rn(this.markerCache));this.markerCache=t.filter((function(t,e,n){return n.indexOf(t)===e}))},renderLimits:function(t){var e=this;this.markerCache.forEach((function(n){t.includes(n)?e._markerGroup.addLayer(n):e._markerGroup.removeLayer(n)}))},applyLimitFilters:function(t){var e=t.latlng,n=void 0===e?{lat:0,lng:0}:e;if(!this._preventRenderMarkers){var r=Rn(this._filterClosestMarkers(n));this.renderLimits(r)}},_filterClosestMarkers:function(t){var e=Rn(this.markerCache),n=this.options.limitMarkersToCount;return e.sort((function(e,n){return e._latlng.distanceTo(t)-n._latlng.distanceTo(t)})),e.filter((function(t,e){return!(n>-1)||et.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&arguments[0]!==undefined?arguments[0]:this._layer;if(!this.enabled())return!1;if(t.pm._dragging)return!1;t.pm._enabled=!1,t.pm._markerGroup.clearLayers(),t.pm._markerGroup.removeFrom(this._map),this._layer.off("remove",this._onLayerRemove,this),this.options.allowSelfIntersection||this._layer.off("pm:vertexremoved",this._handleSelfIntersectionOnVertexRemoval,this);var e=t._path?t._path:this._layer._renderer._container;return L.DomUtil.removeClass(e,"leaflet-pm-draggable"),this.hasSelfIntersection()&&L.DomUtil.removeClass(e,"leaflet-pm-invalid"),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),!0},enabled:function(){return this._enabled},toggleEdit:function(t){return this.enabled()?this.disable():this.enable(t),this.enabled()},applyOptions:function(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping()},_onLayerRemove:function(t){this.disable(t.target)},_initMarkers:function(){var t=this,e=this._map,n=this._layer.getLatLngs();this._markerGroup&&this._markerGroup.clearLayers(),this._markerGroup=new L.LayerGroup,this._markerGroup._pmTempLayer=!0;this._markers=function r(e){if(Array.isArray(e[0]))return e.map(r,t);var n=e.map(t._createMarker,t);return!0!==t.options.hideMiddleMarkers&&e.map((function(r,i){var a=t.isPolygon()?(i+1)%e.length:i+1;return t._createMiddleMarker(n[i],n[a])})),n}(n),this.filterMarkerGroup(),e.addLayer(this._markerGroup)},_createMarker:function(t){var e=new L.Marker(t,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._pmTempLayer=!0,this.options.rotate?(e.on("dragstart",this._onRotateStart,this),e.on("drag",this._onRotate,this),e.on("dragend",this._onRotateEnd,this)):(e.on("click",this._onVertexClick,this),e.on("dragstart",this._onMarkerDragStart,this),e.on("move",this._onMarkerDrag,this),e.on("dragend",this._onMarkerDragEnd,this),this.options.preventMarkerRemoval||e.on(this.options.removeVertexOn,this._removeMarker,this)),this._markerGroup.addLayer(e),e},_createMiddleMarker:function(t,e){if(!t||!e)return!1;var n=L.PM.Utils.calcMiddleLatLng(this._map,t.getLatLng(),e.getLatLng()),r=this._createMarker(n),i=L.divIcon({className:"marker-icon marker-icon-middle"});return r.setIcon(i),r.leftM=t,r.rightM=e,t._middleMarkerNext=r,e._middleMarkerPrev=r,r.on(this.options.addVertexOn,this._onMiddleMarkerClick,this),r.on("movestart",this._onMiddleMarkerMoveStart,this),r},_onMiddleMarkerClick:function(t){var e=t.target;if(this._vertexValidation("add",t)){var n=L.divIcon({className:"marker-icon"});e.setIcon(n),this._addMarker(e,e.leftM,e.rightM)}},_onMiddleMarkerMoveStart:function(t){var e=t.target;e.on("moveend",this._onMiddleMarkerMoveEnd,this),this._vertexValidation("add",t)?(e._dragging=!0,this._addMarker(e,e.leftM,e.rightM)):e.on("move",this._onMiddleMarkerMovePrevent,this)},_onMiddleMarkerMovePrevent:function(t){var e=t.target;this._vertexValidationDrag(e)},_onMiddleMarkerMoveEnd:function(t){var e=t.target;if(e.off("move",this._onMiddleMarkerMovePrevent,this),e.off("moveend",this._onMiddleMarkerMoveEnd,this),this._vertexValidationDragEnd(e)){var n=L.divIcon({className:"marker-icon"});e.setIcon(n),setTimeout((function(){delete e._dragging}),100)}},_addMarker:function(t,e,n){t.off("movestart",this._onMiddleMarkerMoveStart,this),t.off(this.options.addVertexOn,this._onMiddleMarkerClick,this);var r=t.getLatLng(),i=this._layer._latlngs;delete t.leftM,delete t.rightM;var a=this.findDeepMarkerIndex(this._markers,e),o=a.indexPath,s=a.index,l=a.parentPath,h=o.length>1?R()(i,l):i,u=o.length>1?R()(this._markers,l):this._markers;h.splice(s+1,0,r),u.splice(s+1,0,t),this._layer.setLatLngs(i),!0!==this.options.hideMiddleMarkers&&(this._createMiddleMarker(e,t),this._createMiddleMarker(t,n)),this._fireEdit(),this._layerEdited=!0,this._fireVertexAdded(t,this.findDeepMarkerIndex(this._markers,t).indexPath,r),this.options.snappable&&this._initSnappableMarkers()},hasSelfIntersection:function(){return it()(this._layer.toGeoJSON(15)).features.length>0},_handleSelfIntersectionOnVertexRemoval:function(){this._handleLayerStyle(!0),this.hasSelfIntersection()&&(this._layer.setLatLngs(this._coordsBeforeEdit),this._coordsBeforeEdit=null,this._initMarkers())},_handleLayerStyle:function(t){var e=this._layer;if(this.hasSelfIntersection()){if(!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._updateDisabledMarkerStyle(this._markers,!0),this.isRed)return;t?this._flashLayer():(e.setStyle({color:"#f00000ff"}),this.isRed=!0),this._fireIntersect(it()(this._layer.toGeoJSON(15)))}else e.setStyle({color:this.cachedColor}),this.isRed=!1,!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._updateDisabledMarkerStyle(this._markers,!1)},_flashLayer:function(){var t=this;this.cachedColor||(this.cachedColor=this._layer.options.color),this._layer.setStyle({color:"#f00000ff"}),this.isRed=!0,window.setTimeout((function(){t._layer.setStyle({color:t.cachedColor}),t.isRed=!1}),200)},_updateDisabledMarkerStyle:function(t,e){var n=this;t.forEach((function(t){if(Array.isArray(t))return n._updateDisabledMarkerStyle(t,e);t._icon&&(e&&!n._checkMarkerAllowedToDrag(t)?L.DomUtil.addClass(t._icon,"vertexmarker-disabled"):L.DomUtil.removeClass(t._icon,"vertexmarker-disabled"))}))},_removeMarker:function(t){var e=t.target;if(this._vertexValidation("remove",t)){if(!this.options.allowSelfIntersection){var n=this._layer.getLatLngs();this._coordsBeforeEdit=JSON.parse(JSON.stringify(n))}var r=this._layer.getLatLngs(),i=this.findDeepMarkerIndex(this._markers,e),a=i.indexPath,o=i.index,s=i.parentPath;if(a){var l=a.length>1?R()(r,s):r,h=a.length>1?R()(this._markers,s):this._markers;if(this.options.removeLayerBelowMinVertexCount||!(l.length<=2||this.isPolygon()&&l.length<=3)){l.splice(o,1),this._layer.setLatLngs(r),this.isPolygon()&&l.length<=2&&l.splice(0,l.length);var u=!1;if(l.length<=1&&(l.splice(0,l.length),this._layer.setLatLngs(r),this.disable(),this.enable(this.options),u=!0),j(r)&&this._layer.remove(),r=A(r),this._layer.setLatLngs(r),this._markers=A(this._markers),!u&&(h=a.length>1?R()(this._markers,s):this._markers,e._middleMarkerPrev&&this._markerGroup.removeLayer(e._middleMarkerPrev),e._middleMarkerNext&&this._markerGroup.removeLayer(e._middleMarkerNext),this._markerGroup.removeLayer(e),h)){var c,f;if(this.isPolygon()?(c=(o+1)%h.length,f=(o+(h.length-1))%h.length):(f=o-1<0?undefined:o-1,c=o+1>=h.length?undefined:o+1),c!==f){var p=h[f],d=h[c];!0!==this.options.hideMiddleMarkers&&this._createMiddleMarker(p,d)}h.splice(o,1)}this._fireEdit(),this._layerEdited=!0,this._fireVertexRemoved(e,a)}else this._flashLayer()}}},findDeepMarkerIndex:function(t,e){var n;t.some(function i(t){return function(r,a){var o=t.concat(a);return r._leaflet_id===e._leaflet_id?(n=o,!0):Array.isArray(r)&&r.some(i(o))}}([]));var r={};return n&&(r={indexPath:n,index:n[n.length-1],parentPath:n.slice(0,n.length-1)}),r},updatePolygonCoordsFromMarkerDrag:function(t){var e=this._layer.getLatLngs(),n=t.getLatLng(),r=this.findDeepMarkerIndex(this._markers,t),i=r.indexPath,a=r.index,o=r.parentPath;(i.length>1?R()(e,o):e).splice(a,1,n),this._layer.setLatLngs(e)},_getNeighborMarkers:function(t){var e=this.findDeepMarkerIndex(this._markers,t),n=e.indexPath,r=e.index,i=e.parentPath,a=n.length>1?R()(this._markers,i):this._markers,o=(r+1)%a.length;return{prevMarker:a[(r+(a.length-1))%a.length],nextMarker:a[o]}},_checkMarkerAllowedToDrag:function(t){var e=this._getNeighborMarkers(t),n=e.prevMarker,r=e.nextMarker,i=L.polyline([n.getLatLng(),t.getLatLng()]),a=L.polyline([t.getLatLng(),r.getLatLng()]),o=ft()(this._layer.toGeoJSON(15),i.toGeoJSON(15)).features.length,s=ft()(this._layer.toGeoJSON(15),a.toGeoJSON(15)).features.length;return t.getLatLng()===this._markers[0][0].getLatLng()?s+=1:t.getLatLng()===this._markers[0][this._markers[0].length-1].getLatLng()&&(o+=1),!(o<=2&&s<=2)},_onMarkerDragStart:function(t){var e=t.target;if(this.cachedColor||(this.cachedColor=this._layer.options.color),this._vertexValidation("move",t)){var n=this.findDeepMarkerIndex(this._markers,e).indexPath;this._fireMarkerDragStart(t,n),this.options.allowSelfIntersection||(this._coordsBeforeEdit=this._layer.getLatLngs()),!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this.hasSelfIntersection()?this._markerAllowedToDrag=this._checkMarkerAllowedToDrag(e):this._markerAllowedToDrag=null}},_onMarkerDrag:function(t){var e=t.target;if(this._vertexValidationDrag(e)){var n=this.findDeepMarkerIndex(this._markers,e),r=n.indexPath,i=n.index,a=n.parentPath;if(r){if(!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this.hasSelfIntersection()&&!1===this._markerAllowedToDrag)return this._layer.setLatLngs(this._coordsBeforeEdit),this._initMarkers(),void this._handleLayerStyle();this.updatePolygonCoordsFromMarkerDrag(e);var o=r.length>1?R()(this._markers,a):this._markers,s=(i+1)%o.length,l=(i+(o.length-1))%o.length,h=e.getLatLng(),u=o[l].getLatLng(),c=o[s].getLatLng();if(e._middleMarkerNext){var f=L.PM.Utils.calcMiddleLatLng(this._map,h,c);e._middleMarkerNext.setLatLng(f)}if(e._middleMarkerPrev){var p=L.PM.Utils.calcMiddleLatLng(this._map,h,u);e._middleMarkerPrev.setLatLng(p)}this.options.allowSelfIntersection||this._handleLayerStyle(),this._fireMarkerDrag(t,r)}}},_onMarkerDragEnd:function(t){var e=t.target;if(this._vertexValidationDragEnd(e)){var n=this.findDeepMarkerIndex(this._markers,e).indexPath,r=this.hasSelfIntersection();r&&this.options.allowSelfIntersectionEdit&&this._markerAllowedToDrag&&(r=!1);var i=!this.options.allowSelfIntersection&&r;if(this._fireMarkerDragEnd(t,n,i),i)return this._layer.setLatLngs(this._coordsBeforeEdit),this._coordsBeforeEdit=null,this._initMarkers(),this.options.snappable&&this._initSnappableMarkers(),this._handleLayerStyle(),void this._fireLayerReset(t,n);!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._handleLayerStyle(),this._fireEdit(),this._layerEdited=!0}},_onVertexClick:function(t){var e=t.target;if(!e._dragging){var n=this.findDeepMarkerIndex(this._markers,e).indexPath;this._fireVertexClick(t,n)}}}),Bn.Polygon=Bn.Line.extend({_shape:"Polygon",_checkMarkerAllowedToDrag:function(t){var e=this._getNeighborMarkers(t),n=e.prevMarker,r=e.nextMarker,i=L.polyline([n.getLatLng(),t.getLatLng()]),a=L.polyline([t.getLatLng(),r.getLatLng()]),o=ft()(this._layer.toGeoJSON(15),i.toGeoJSON(15)).features.length,s=ft()(this._layer.toGeoJSON(15),a.toGeoJSON(15)).features.length;return!(o<=2&&s<=2)}}),Bn.Rectangle=Bn.Polygon.extend({_shape:"Rectangle",_initMarkers:function(){var t=this,e=this._map,n=this._findCorners();this._markerGroup&&this._markerGroup.clearLayers(),this._markerGroup=new L.LayerGroup,this._markerGroup._pmTempLayer=!0,e.addLayer(this._markerGroup),this._markers=[],this._markers[0]=n.map(this._createMarker,this);var r=Tn(this._markers,1);this._cornerMarkers=r[0],this._layer.getLatLngs()[0].forEach((function(e,n){var r=t._cornerMarkers.find((function(t){return t._index===n}));r&&r.setLatLng(e)}))},applyOptions:function(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping(),this._addMarkerEvents()},_createMarker:function(t,e){var n=new L.Marker(t,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(n,"vertexPane"),n._origLatLng=t,n._index=e,n._pmTempLayer=!0,this._markerGroup.addLayer(n),n},_addMarkerEvents:function(){var t=this;this._markers[0].forEach((function(e){e.on("dragstart",t._onMarkerDragStart,t),e.on("drag",t._onMarkerDrag,t),e.on("dragend",t._onMarkerDragEnd,t),t.options.preventMarkerRemoval||e.on("contextmenu",t._removeMarker,t)}))},_removeMarker:function(){return null},_onMarkerDragStart:function(t){if(this._vertexValidation("move",t)){var e=t.target,n=this._cornerMarkers;e._oppositeCornerLatLng=n.find((function(t){return t._index===(e._index+2)%4})).getLatLng(),e._snapped=!1,this._fireMarkerDragStart(t)}},_onMarkerDrag:function(t){var e=t.target;this._vertexValidationDrag(e)&&e._index!==undefined&&(this._adjustRectangleForMarkerMove(e),this._fireMarkerDrag(t))},_onMarkerDragEnd:function(t){var e=t.target;this._vertexValidationDragEnd(e)&&(this._cornerMarkers.forEach((function(t){delete t._oppositeCornerLatLng})),this._fireMarkerDragEnd(t),this._fireEdit(),this._layerEdited=!0)},_adjustRectangleForMarkerMove:function(t){L.extend(t._origLatLng,t._latlng);var e=L.PM.Utils._getRotatedRectangle(t.getLatLng(),t._oppositeCornerLatLng,this._angle||0,this._map);this._layer.setLatLngs(e),this._adjustAllMarkers(),this._layer.redraw()},_adjustAllMarkers:function(){var t=this,e=this._layer.getLatLngs()[0];e&&4!==e.length&&e.length>0?(e.forEach((function(e,n){t._cornerMarkers[n].setLatLng(e)})),this._cornerMarkers.slice(e.length).forEach((function(t){t.setLatLng(e[0])}))):e&&e.length?this._cornerMarkers.forEach((function(t){t.setLatLng(e[t._index])})):console.error("The layer has no LatLngs")},_findCorners:function(){this._layer.getBounds();var t=this._layer.getLatLngs()[0];return L.PM.Utils._getRotatedRectangle(t[0],t[2],this._angle||0,this._map)}}),Bn.Circle=Bn.extend({_shape:"Circle",initialize:function(t){this._layer=t,this._enabled=!1,this._updateHiddenPolyCircle()},enable:function(t){var e=this;L.Util.setOptions(this,t),this._map=this._layer._map,this.options.allowEditing?(this.enabled()||this.disable(),this._enabled=!0,this._initMarkers(),this.applyOptions(),this._layer.on("remove",(function(t){e.disable(t.target)})),this._updateHiddenPolyCircle(),this._fireEnable()):this.disable()},disable:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this._layer;if(!this.enabled())return!1;if(t.pm._dragging)return!1;this._centerMarker.off("dragstart",this._onCircleDragStart,this),this._centerMarker.off("drag",this._onCircleDrag,this),this._centerMarker.off("dragend",this._onCircleDragEnd,this),this._outerMarker.off("drag",this._handleOuterMarkerSnapping,this),t.pm._enabled=!1,t.pm._helperLayers.clearLayers();var e=t._path?t._path:this._layer._renderer._container;return L.DomUtil.removeClass(e,"leaflet-pm-draggable"),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),!0},enabled:function(){return this._enabled},toggleEdit:function(t){this.enabled()?this.disable():this.enable(t)},_initMarkers:function(){var t=this._map;this._helperLayers&&this._helperLayers.clearLayers(),this._helperLayers=new L.LayerGroup,this._helperLayers._pmTempLayer=!0,this._helperLayers.addTo(t);var e=this._layer.getLatLng(),n=this._layer._radius,r=this._getLatLngOnCircle(e,n);this._centerMarker=this._createCenterMarker(e),this._outerMarker=this._createOuterMarker(r),this._markers=[this._centerMarker,this._outerMarker],this._createHintLine(this._centerMarker,this._outerMarker)},applyOptions:function(){this.options.snappable?(this._initSnappableMarkers(),this._outerMarker.on("drag",this._handleOuterMarkerSnapping,this),this._outerMarker.on("move",this._syncHintLine,this),this._outerMarker.on("move",this._syncCircleRadius,this),this._centerMarker.on("move",this._moveCircle,this)):this._disableSnapping()},_createHintLine:function(t,e){var n=t.getLatLng(),r=e.getLatLng();this._hintline=L.polyline([n,r],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._helperLayers.addLayer(this._hintline)},_createCenterMarker:function(t){var e=this._createMarker(t);return L.DomUtil.addClass(e._icon,"leaflet-pm-draggable"),e.on("drag",this._moveCircle,this),e.on("dragstart",this._onCircleDragStart,this),e.on("drag",this._onCircleDrag,this),e.on("dragend",this._onCircleDragEnd,this),e},_createOuterMarker:function(t){var e=this._createMarker(t);return e.on("drag",this._resizeCircle,this),e},_createMarker:function(t){var e=new L.Marker(t,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._origLatLng=t,e._pmTempLayer=!0,e.on("dragstart",this._onMarkerDragStart,this),e.on("drag",this._onMarkerDrag,this),e.on("dragend",this._onMarkerDragEnd,this),this._helperLayers.addLayer(e),e},_resizeCircle:function(){this._outerMarker.setLatLng(this._getNewDestinationOfOuterMarker()),this._syncHintLine(),this._syncCircleRadius()},_moveCircle:function(t){if(!t.target._cancelDragEventChain){var e=t.latlng;this._layer.setLatLng(e);var n=this._layer._radius,r=this._getLatLngOnCircle(e,n);this._outerMarker._latlng=r,this._outerMarker.update(),this._syncHintLine(),this._updateHiddenPolyCircle(),this._fireCenterPlaced("Edit")}},_syncCircleRadius:function(){var t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng(),n=this._map.distance(t,e);this.options.minRadiusCircle&&nthis.options.maxRadiusCircle?this._layer.setRadius(this.options.maxRadiusCircle):this._layer.setRadius(n),this._updateHiddenPolyCircle()},_syncHintLine:function(){var t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng();this._hintline.setLatLngs([t,e])},_disableSnapping:function(){var t=this;this._markers.forEach((function(e){e.off("move",t._syncHintLine,t),e.off("move",t._syncCircleRadius,t),e.off("drag",t._handleSnapping,t),e.off("dragend",t._cleanupSnapping,t)})),this._layer.off("pm:dragstart",this._unsnap,this)},_onMarkerDragStart:function(t){this._vertexValidation("move",t)&&this._fireMarkerDragStart(t)},_onMarkerDrag:function(t){var e=t.target;this._vertexValidationDrag(e)&&this._fireMarkerDrag(t)},_onMarkerDragEnd:function(t){var e=t.target;this._vertexValidationDragEnd(e)&&(this._fireEdit(),this._layerEdited=!0,this._fireMarkerDragEnd(t))},_onCircleDragStart:function(t){this._vertexValidationDrag(t.target)?(delete this._vertexValidationReset,this._fireDragStart(t)):this._vertexValidationReset=!0},_onCircleDrag:function(t){this._vertexValidationReset||this._fireDrag(t)},_onCircleDragEnd:function(){this._vertexValidationReset?delete this._vertexValidationReset:this._fireDragEnd()},_updateHiddenPolyCircle:function(){var t=this._map&&this._map.pm._isCRSSimple();this._hiddenPolyCircle?this._hiddenPolyCircle.setLatLngs(L.PM.Utils.circleToPolygon(this._layer,200,!t).getLatLngs()):this._hiddenPolyCircle=L.PM.Utils.circleToPolygon(this._layer,200,!t),this._hiddenPolyCircle._parentCopy||(this._hiddenPolyCircle._parentCopy=this._layer)},_getLatLngOnCircle:function(t,e){var n=this._map.project(t),r=L.point(n.x+e,n.y);return this._map.unproject(r)},_getNewDestinationOfOuterMarker:function(){var t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng(),n=this._map.distance(t,e);return this.options.minRadiusCircle&&nthis.options.maxRadiusCircle&&(e=z(this._map,t,e,this.options.maxRadiusCircle)),e},_handleOuterMarkerSnapping:function(){if(this._outerMarker._snapped){var t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng(),n=this._map.distance(t,e);(this.options.minRadiusCircle&&nthis.options.maxRadiusCircle)&&this._outerMarker.setLatLng(this._outerMarker._orgLatLng)}this._outerMarker.setLatLng(this._getNewDestinationOfOuterMarker())}}),Bn.CircleMarker=Bn.extend({_shape:"CircleMarker",initialize:function(t){this._layer=t,this._enabled=!1,this._updateHiddenPolyCircle()},enable:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{draggable:!0,snappable:!0};L.Util.setOptions(this,t),this._map=this._layer._map,this._map&&(this.options.allowEditing?(this.enabled()&&this.disable(),this.applyOptions(),this._enabled=!0,this._layer.on("pm:dragstart",this._onDragStart,this),this._layer.on("pm:drag",this._onMarkerDrag,this),this._layer.on("pm:dragend",this._onMarkerDragEnd,this),this._updateHiddenPolyCircle(),this._fireEnable()):this.disable())},disable:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this._layer;return!t.pm._dragging&&(t.pm._helperLayers&&t.pm._helperLayers.clearLayers(),this._map||(this._map=this._layer._map),this.options.editable?(this._map.off("move",this._syncMarkers,this),this._outerMarker&&this._outerMarker.on("drag",this._handleOuterMarkerSnapping,this)):this._map.off("move",this._updateHiddenPolyCircle,this),this.disableLayerDrag(),this._layer.off("contextmenu",this._removeMarker,this),this.enabled()&&(this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable()),t.pm._enabled=!1,!0)},enabled:function(){return this._enabled},toggleEdit:function(t){this.enabled()?this.disable():this.enable(t)},applyOptions:function(){!this.options.editable&&this.options.draggable?this.enableLayerDrag():this.disableLayerDrag(),this.options.editable?(this._initMarkers(),this._map.on("move",this._syncMarkers,this)):this._map.on("move",this._updateHiddenPolyCircle,this),this.options.snappable?this.options.editable?(this._initSnappableMarkers(),this._centerMarker.on("drag",this._moveCircle,this),this.options.editable&&this._outerMarker.on("drag",this._handleOuterMarkerSnapping,this),this._outerMarker.on("move",this._syncHintLine,this),this._outerMarker.on("move",this._syncCircleRadius,this)):this._initSnappableMarkersDrag():this.options.editable?this._disableSnapping():this._disableSnappingDrag(),this.options.preventMarkerRemoval||this._layer.on("contextmenu",this._removeMarker,this)},_initMarkers:function(){var t=this._map;this._helperLayers&&this._helperLayers.clearLayers(),this._helperLayers=new L.LayerGroup,this._helperLayers._pmTempLayer=!0,this._helperLayers.addTo(t);var e=this._layer.getLatLng(),n=this._layer._radius,r=this._getLatLngOnCircle(e,n);this._centerMarker=this._createCenterMarker(e),this._outerMarker=this._createOuterMarker(r),this._markers=[this._centerMarker,this._outerMarker],this._createHintLine(this._centerMarker,this._outerMarker)},_getLatLngOnCircle:function(t,e){var n=this._map.project(t),r=L.point(n.x+e,n.y);return this._map.unproject(r)},_createHintLine:function(t,e){var n=t.getLatLng(),r=e.getLatLng();this._hintline=L.polyline([n,r],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._helperLayers.addLayer(this._hintline)},_createCenterMarker:function(t){var e=this._createMarker(t);return this.options.draggable?L.DomUtil.addClass(e._icon,"leaflet-pm-draggable"):e.dragging.disable(),e},_createOuterMarker:function(t){var e=this._createMarker(t);return e.on("drag",this._resizeCircle,this),e},_createMarker:function(t){var e=new L.Marker(t,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._origLatLng=t,e._pmTempLayer=!0,e.on("dragstart",this._onMarkerDragStart,this),e.on("drag",this._onMarkerDrag,this),e.on("dragend",this._onMarkerDragEnd,this),this._helperLayers.addLayer(e),e},_moveCircle:function(){var t=this._centerMarker.getLatLng();this._layer.setLatLng(t);var e=this._layer._radius,n=this._getLatLngOnCircle(t,e);this._outerMarker._latlng=n,this._outerMarker.update(),this._syncHintLine(),this._updateHiddenPolyCircle(),this._fireCenterPlaced("Edit")},_syncMarkers:function(){var t=this._layer.getLatLng(),e=this._layer._radius,n=this._getLatLngOnCircle(t,e);this._outerMarker.setLatLng(n),this._centerMarker.setLatLng(t),this._syncHintLine(),this._updateHiddenPolyCircle()},_resizeCircle:function(){this._outerMarker.setLatLng(this._getNewDestinationOfOuterMarker()),this._syncHintLine(),this._syncCircleRadius()},_syncCircleRadius:function(){var t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng(),n=this._map.project(t).distanceTo(this._map.project(e));this.options.minRadiusCircleMarker&&nthis.options.maxRadiusCircleMarker?this._layer.setRadius(this.options.maxRadiusCircleMarker):this._layer.setRadius(n),this._updateHiddenPolyCircle()},_syncHintLine:function(){var t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng();this._hintline.setLatLngs([t,e])},_removeMarker:function(){this.options.editable&&this.disable(),this._layer.remove(),this._fireRemove(this._layer),this._fireRemove(this._map,this._layer)},_onDragStart:function(t){this._map.pm.Draw.CircleMarker._layerIsDragging=!0,this._vertexValidation("move",t)},_onMarkerDragStart:function(t){this._vertexValidation("move",t)&&this._fireMarkerDragStart(t)},_onMarkerDrag:function(t){var e=t.target;e instanceof L.Marker&&!this._vertexValidationDrag(e)||this._fireMarkerDrag(t)},_onMarkerDragEnd:function(t){this._map.pm.Draw.CircleMarker._layerIsDragging=!1;var e=t.target;this._vertexValidationDragEnd(e)&&(this.options.editable&&(this._fireEdit(),this._layerEdited=!0),this._fireMarkerDragEnd(t))},_initSnappableMarkersDrag:function(){var t=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=this.options.snapSegment===undefined||this.options.snapSegment,t.off("pm:drag",this._handleSnapping,this),t.on("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.on("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this),t.on("pm:dragstart",this._unsnap,this)},_disableSnappingDrag:function(){var t=this._layer;t.off("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this)},_updateHiddenPolyCircle:function(){var t=this._layer._map||this._map;if(t){var e=L.PM.Utils.pxRadiusToMeterRadius(this._layer.getRadius(),t,this._layer.getLatLng()),n=L.circle(this._layer.getLatLng(),this._layer.options);n.setRadius(e);var r=t&&t.pm._isCRSSimple();this._hiddenPolyCircle?this._hiddenPolyCircle.setLatLngs(L.PM.Utils.circleToPolygon(n,200,!r).getLatLngs()):this._hiddenPolyCircle=L.PM.Utils.circleToPolygon(n,200,!r),this._hiddenPolyCircle._parentCopy||(this._hiddenPolyCircle._parentCopy=this._layer)}},_getNewDestinationOfOuterMarker:function(){var t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng(),n=this._map.project(t).distanceTo(this._map.project(e));return this.options.minRadiusCircleMarker&&nthis.options.maxRadiusCircleMarker&&(e=z(this._map,t,e,L.PM.Utils.pxRadiusToMeterRadius(this.options.maxRadiusCircleMarker,this._map,t))),e},_handleOuterMarkerSnapping:function(){if(this._outerMarker._snapped){var t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng(),n=this._map.project(t).distanceTo(this._map.project(e));(this.options.minRadiusCircleMarker&&nthis.options.maxRadiusCircleMarker)&&this._outerMarker.setLatLng(this._outerMarker._orgLatLng)}this._outerMarker.setLatLng(this._getNewDestinationOfOuterMarker())}}),Bn.ImageOverlay=Bn.extend({_shape:"ImageOverlay",initialize:function(t){this._layer=t,this._enabled=!1},toggleEdit:function(t){this.enabled()?this.disable():this.enable(t)},enabled:function(){return this._enabled},enable:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{draggable:!0,snappable:!0};L.Util.setOptions(this,t),this._map=this._layer._map,this._map&&(this.options.allowEditing?(this.enabled()||this.disable(),this.enableLayerDrag(),this._enabled=!0,this._otherSnapLayers=this._findCorners(),this._fireEnable()):this.disable())},disable:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this._layer;return!t.pm._dragging&&(this._map||(this._map=this._layer._map),this.disableLayerDrag(),this.enabled()||(this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable()),t.pm._enabled=!1,!0)},_findCorners:function(){var t=this._layer.getBounds();return[t.getNorthWest(),t.getNorthEast(),t.getSouthEast(),t.getSouthWest()]}});n(153),n(154);var An=function(t,e,n,r,i,a){this._matrix=[t,e,n,r,i,a]};An.init=function(){return new L.PM.Matrix(1,0,0,1,0,0)},An.prototype={transform:function(t){return this._transform(t.clone())},_transform:function(t){var e=this._matrix,n=t.x,r=t.y;return t.x=e[0]*n+e[1]*r+e[4],t.y=e[2]*n+e[3]*r+e[5],t},untransform:function(t){var e=this._matrix;return new L.Point((t.x/e[0]-e[4])/e[0],(t.y/e[2]-e[5])/e[2])},clone:function(){var t=this._matrix;return new L.PM.Matrix(t[0],t[1],t[2],t[3],t[4],t[5])},translate:function(t){return t===undefined?new L.Point(this._matrix[4],this._matrix[5]):("number"==typeof t?(e=t,n=t):(e=t.x,n=t.y),this._add(1,0,0,1,e,n));var e,n},scale:function(t,e){return t===undefined?new L.Point(this._matrix[0],this._matrix[3]):(e=e||L.point(0,0),"number"==typeof t?(n=t,r=t):(n=t.x,r=t.y),this._add(n,0,0,r,e.x,e.y)._add(1,0,0,1,-e.x,-e.y));var n,r},rotate:function(t,e){var n=Math.cos(t),r=Math.sin(t);return e=e||new L.Point(0,0),this._add(n,r,-r,n,e.x,e.y)._add(1,0,0,1,-e.x,-e.y)},flip:function(){return this._matrix[1]*=-1,this._matrix[2]*=-1,this},_add:function(t,e,n,r,i,a){var o,s=[[],[],[]],l=this._matrix,h=[[l[0],l[2],l[4]],[l[1],l[3],l[5]],[0,0,1]],u=[[t,n,i],[e,r,a],[0,0,1]];t&&t instanceof L.PM.Matrix&&(u=[[(l=t._matrix)[0],l[2],l[4]],[l[1],l[3],l[5]],[0,0,1]]);for(var c=0;c<3;c+=1)for(var f=0;f<3;f+=1){o=0;for(var p=0;p<3;p+=1)o+=h[c][p]*u[p][f];s[c][f]=o}return this._matrix=[s[0][0],s[1][0],s[0][1],s[1][1],s[0][2],s[1][2]],this}};var Gn=An,Nn={calcMiddleLatLng:function(t,e,n){var r=t.project(e),i=t.project(n);return t.unproject(r._add(i)._divideBy(2))},findLayers:function(t){var e=[];return t.eachLayer((function(t){(t instanceof L.Polyline||t instanceof L.Marker||t instanceof L.Circle||t instanceof L.CircleMarker||t instanceof L.ImageOverlay)&&e.push(t)})),e=(e=(e=e.filter((function(t){return!!t.pm}))).filter((function(t){return!t._pmTempLayer}))).filter((function(t){return!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore}))},circleToPolygon:function(t){for(var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:60,n=!(arguments.length>2&&arguments[2]!==undefined)||arguments[2],r=t.getLatLng(),i=t.getRadius(),a=N(r,i,e,0,n),o=[],s=0;s3&&arguments[3]!==undefined&&arguments[3];t.fire(e,n,r);var i=this.getAllParentGroups(t),a=i.groups;a.forEach((function(t){t.fire(e,n,r)}))},getAllParentGroups:function(t){var e=[],n=[];return!t._pmLastGroupFetch||!t._pmLastGroupFetch.time||(new Date).getTime()-t._pmLastGroupFetch.time>1e3?(function r(t){for(var i in t._eventParents)if(-1===e.indexOf(i)){e.push(i);var a=t._eventParents[i];n.push(a),r(a)}}(t),t._pmLastGroupFetch={time:(new Date).getTime(),groups:n,groupIds:e},{groupIds:e,groups:n}):{groups:t._pmLastGroupFetch.groups,groupIds:t._pmLastGroupFetch.groupIds}},createGeodesicPolygon:N,getTranslation:T,findDeepCoordIndex:function(t,e){var n;t.some(function i(t){return function(r,a){var o=t.concat(a);return r.lat&&r.lat===e.lat&&r.lng===e.lng?(n=o,!0):Array.isArray(r)&&r.some(i(o))}}([]));var r={};return n&&(r={indexPath:n,index:n[n.length-1],parentPath:n.slice(0,n.length-1)}),r},_getIndexFromSegment:function(t,e){if(e&&2===e.length){var n=this.findDeepCoordIndex(t,e[0]),r=this.findDeepCoordIndex(t,e[1]),i=Math.max(n.index,r.index);return 0!==n.index&&0!==r.index||1===i||(i+=1),{indexA:n,indexB:r,newIndex:i,indexPath:n.indexPath,parentPath:n.parentPath}}return null},_getRotatedRectangle:function(t,e,n,r){var i=En(r,t),a=En(r,e),o=n*Math.PI/180,s=Math.cos(o),l=Math.sin(o),h=(a.x-i.x)*s+(a.y-i.y)*l,u=(a.y-i.y)*s-(a.x-i.x)*l,c=h*s+i.x,f=h*l+i.y,p=-u*l+i.x,d=u*s+i.y;return[Sn(r,i),Sn(r,{x:c,y:f}),Sn(r,a),Sn(r,{x:p,y:d})]},pxRadiusToMeterRadius:function(t,e,n){var r=e.project(n),i=L.point(r.x+t,r.y);return e.distance(e.unproject(i),n)}};L.PM=L.PM||{version:r.version,Map:O,Toolbar:$,Draw:nt,Edit:Bn,Utils:Nn,Matrix:Gn,activeLang:"en",optIn:!1,initialize:function(t){this.addInitHooks(t)},setOptIn:function(t){this.optIn=!!t},addInitHooks:function(){arguments.length>0&&undefined;function t(){this.pm=undefined,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Map(this)):this.options.pmIgnore||(this.pm=new L.PM.Map(this))}function e(){this.pm=undefined,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.LayerGroup(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.LayerGroup(this))}function n(){this.pm=undefined,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Marker(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Marker(this))}function r(){this.pm=undefined,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.CircleMarker(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.CircleMarker(this))}function i(){this.pm=undefined,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Line(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Line(this))}function a(){this.pm=undefined,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Polygon(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Polygon(this))}function o(){this.pm=undefined,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Rectangle(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Rectangle(this))}function s(){this.pm=undefined,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Circle(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Circle(this))}function l(){this.pm=undefined,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.ImageOverlay(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.ImageOverlay(this))}L.Map.addInitHook(t),L.LayerGroup.addInitHook(e),L.Marker.addInitHook(n),L.CircleMarker.addInitHook(r),L.Polyline.addInitHook(i),L.Polygon.addInitHook(a),L.Rectangle.addInitHook(o),L.Circle.addInitHook(s),L.ImageOverlay.addInitHook(l)},reInitLayer:function(t){var e=this;t instanceof L.LayerGroup&&t.eachLayer((function(t){e.reInitLayer(t)})),t.pm||L.PM.optIn&&!1!==t.options.pmIgnore||t.options.pmIgnore||(t instanceof L.Map?t.pm=new L.PM.Map(t):t instanceof L.Marker?t.pm=new L.PM.Edit.Marker(t):t instanceof L.Circle?t.pm=new L.PM.Edit.Circle(t):t instanceof L.CircleMarker?t.pm=new L.PM.Edit.CircleMarker(t):t instanceof L.Rectangle?t.pm=new L.PM.Edit.Rectangle(t):t instanceof L.Polygon?t.pm=new L.PM.Edit.Polygon(t):t instanceof L.Polyline?t.pm=new L.PM.Edit.Line(t):t instanceof L.LayerGroup?t.pm=new L.PM.Edit.LayerGroup(t):t instanceof L.ImageOverlay&&(t.pm=new L.PM.Edit.ImageOverlay(t)))}},L.PM.initialize()}]); \ No newline at end of file diff --git a/module-map/src/main/resources/static/super-map/js/leaflet.min.js b/module-map/src/main/resources/static/super-map/js/leaflet.min.js new file mode 100644 index 00000000..a41e0eee --- /dev/null +++ b/module-map/src/main/resources/static/super-map/js/leaflet.min.js @@ -0,0 +1,9 @@ +/* + Leaflet 1.0.3, a JS library for interactive maps. http://leafletjs.com + (c) 2010-2016 Vladimir Agafonkin, (c) 2010-2011 CloudMade +*/ +!function(t,e,i){function n(){var e=t.L;o.noConflict=function(){return t.L=e,this},t.L=o}var o={version:"1.0.3"};"object"==typeof module&&"object"==typeof module.exports?module.exports=o:"function"==typeof define&&define.amd&&define(o),"undefined"!=typeof t&&n(),o.Util={extend:function(t){var e,i,n,o;for(i=1,n=arguments.length;i1}}(),o.Point=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e},o.Point.prototype={clone:function(){return new o.Point(this.x,this.y)},add:function(t){return this.clone()._add(o.point(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(o.point(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new o.Point(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new o.Point(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},distanceTo:function(t){t=o.point(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=o.point(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=o.point(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+o.Util.formatNum(this.x)+", "+o.Util.formatNum(this.y)+")"}},o.point=function(t,e,n){return t instanceof o.Point?t:o.Util.isArray(t)?new o.Point(t[0],t[1]):t===i||null===t?t:"object"==typeof t&&"x"in t&&"y"in t?new o.Point(t.x,t.y):new o.Point(t,e,n)},o.Bounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=o.bounds(t);var e=this.min,i=this.max,n=t.min,s=t.max,r=s.x>=e.x&&n.x<=i.x,a=s.y>=e.y&&n.y<=i.y;return r&&a},overlaps:function(t){t=o.bounds(t);var e=this.min,i=this.max,n=t.min,s=t.max,r=s.x>e.x&&n.xe.y&&n.y0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)},addClass:function(t,e){if(t.classList!==i)for(var n=o.Util.splitWords(e),s=0,r=n.length;s=n.lat&&i.lat<=s.lat&&e.lng>=n.lng&&i.lng<=s.lng},intersects:function(t){t=o.latLngBounds(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),r=s.lat>=e.lat&&n.lat<=i.lat,a=s.lng>=e.lng&&n.lng<=i.lng;return r&&a},overlaps:function(t){t=o.latLngBounds(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),r=s.lat>e.lat&&n.late.lng&&n.lngthis.options.maxZoom?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,o.latLngBounds(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},invalidateSize:function(t){if(!this._loaded)return this;t=o.extend({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),s=i.divideBy(2).round(),r=n.subtract(s);return r.x||r.y?(t.animate&&t.pan?this.panBy(r):(t.pan&&this._rawPanBy(r),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=o.extend({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o.bind(this._handleGeolocationResponse,this),i=o.bind(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,i=t.coords.longitude,n=new o.LatLng(e,i),s=n.toBounds(t.coords.accuracy),r=this._locateOptions;if(r.setView){var a=this.getBoundsZoom(s);this.setView(n,r.maxZoom?Math.min(a,r.maxZoom):a)}var h={latlng:n,bounds:s,timestamp:t.timestamp};for(var l in t.coords)"number"==typeof t.coords[l]&&(h[l]=t.coords[l]);this.fire("locationfound",h)},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=i,this._containerId=i}o.DomUtil.remove(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this._loaded&&this.fire("unload");for(var t in this._layers)this._layers[t].remove();return this},createPane:function(t,e){var i="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),n=o.DomUtil.create("div",i,e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new o.LatLngBounds(e,i)},getMinZoom:function(){return this.options.minZoom===i?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===i?this._layersMaxZoom===i?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=o.latLngBounds(t),i=o.point(i||[0,0]);var n=this.getZoom()||0,s=this.getMinZoom(),r=this.getMaxZoom(),a=t.getNorthWest(),h=t.getSouthEast(),l=this.getSize().subtract(i),u=o.bounds(this.project(h,n),this.project(a,n)).getSize(),c=o.Browser.any3d?this.options.zoomSnap:1,d=Math.min(l.x/u.x,l.y/u.y);return n=this.getScaleZoom(d,n),c&&(n=Math.round(n/(c/100))*(c/100),n=e?Math.ceil(n/c)*c:Math.floor(n/c)*c),Math.max(s,Math.min(r,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new o.Point(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new o.Bounds(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===i?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=e===i?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=e===i?this._zoom:e;var o=n.zoom(t*n.scale(e));return isNaN(o)?1/0:o},project:function(t,e){return e=e===i?this._zoom:e,this.options.crs.latLngToPoint(o.latLng(t),e)},unproject:function(t,e){return e=e===i?this._zoom:e,this.options.crs.pointToLatLng(o.point(t),e)},layerPointToLatLng:function(t){var e=o.point(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(o.latLng(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(o.latLng(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(o.latLngBounds(t))},distance:function(t,e){return this.options.crs.distance(o.latLng(t),o.latLng(e))},containerPointToLayerPoint:function(t){return o.point(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return o.point(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(o.point(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(o.latLng(t)))},mouseEventToContainerPoint:function(t){return o.DomEvent.getMousePosition(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=o.DomUtil.get(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");o.DomEvent.addListener(e,"scroll",this._onScroll,this),this._containerId=o.Util.stamp(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&o.Browser.any3d,o.DomUtil.addClass(t,"leaflet-container"+(o.Browser.touch?" leaflet-touch":"")+(o.Browser.retina?" leaflet-retina":"")+(o.Browser.ielt9?" leaflet-oldie":"")+(o.Browser.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":"")); + var e=o.DomUtil.getStyle(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),o.DomUtil.setPosition(this._mapPane,new o.Point(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(o.DomUtil.addClass(t.markerPane,"leaflet-zoom-hide"),o.DomUtil.addClass(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){o.DomUtil.setPosition(this._mapPane,new o.Point(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var n=this._zoom!==e;this._moveStart(n)._move(t,e)._moveEnd(n),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t){return t&&this.fire("zoomstart"),this.fire("movestart")},_move:function(t,e,n){e===i&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(o||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return o.Util.cancelAnimFrame(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){o.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){if(o.DomEvent){this._targets={},this._targets[o.stamp(this._container)]=this;var i=e?"off":"on";o.DomEvent[i](this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this._handleDOMEvent,this),this.options.trackResize&&o.DomEvent[i](t,"resize",this._onResize,this),o.Browser.any3d&&this.options.transform3DLimit&&this[i]("moveend",this._onMoveEnd)}},_onResize:function(){o.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=o.Util.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],s="mouseout"===e||"mouseover"===e,r=t.target||t.srcElement,a=!1;r;){if(i=this._targets[o.stamp(r)],i&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(i)){a=!0;break}if(i&&i.listens(e,!0)){if(s&&!o.DomEvent._isExternalTarget(r,t))break;if(n.push(i),s)break}if(r===this._container)break;r=r.parentNode}return n.length||a||s||!o.DomEvent._isExternalTarget(r,t)||(n=[this]),n},_handleDOMEvent:function(t){if(this._loaded&&!o.DomEvent._skipped(t)){var e="keypress"===t.type&&13===t.keyCode?"click":t.type;"mousedown"===e&&o.DomUtil.preventOutline(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_fireDOMEvent:function(t,e,i){if("click"===t.type){var n=o.Util.extend({},t);n.type="preclick",this._fireDOMEvent(n,n.type,i)}if(!t._stopped&&(i=(i||[]).concat(this._findEventTargets(t,e)),i.length)){var s=i[0];"contextmenu"===e&&s.listens(e,!0)&&o.DomEvent.preventDefault(t);var r={originalEvent:t};if("keypress"!==t.type){var a=s instanceof o.Marker;r.containerPoint=a?this.latLngToContainerPoint(s.getLatLng()):this.mouseEventToContainerPoint(t),r.layerPoint=this.containerPointToLayerPoint(r.containerPoint),r.latlng=a?s.getLatLng():this.layerPointToLatLng(r.layerPoint)}for(var h=0;h0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=o.Browser.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){o.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._floor();return!((e&&e.animate)!==!0&&!this.getSize().contains(i))&&(this.panBy(i,e),!0)},_createAnimProxy:function(){var t=this._proxy=o.DomUtil.create("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(e){var i=o.DomUtil.TRANSFORM,n=t.style[i];o.DomUtil.setTransform(t,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===t.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",function(){var e=this.getCenter(),i=this.getZoom();o.DomUtil.setTransform(t,this.project(e,i),this.getZoomScale(i,1))},this)},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),s=this._getCenterOffset(t)._divideBy(1-1/n);return!(i.animate!==!0&&!this.getSize().contains(s))&&(o.Util.requestAnimFrame(function(){this._moveStart(!0)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,i,n){i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,o.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),setTimeout(o.bind(this._onZoomTransitionEnd,this),250)},_onZoomTransitionEnd:function(){this._animatingZoom&&(o.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),o.Util.requestAnimFrame(function(){this._moveEnd(!0)},this))}}),o.map=function(t,e){return new o.Map(t,e)},o.Layer=o.Evented.extend({options:{pane:"overlayPane",nonBubblingEvents:[],attribution:null},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[o.stamp(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[o.stamp(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}}),o.Map.include({addLayer:function(t){var e=o.stamp(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=o.stamp(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&o.stamp(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){t=t?o.Util.isArray(t)?t:[t]:[];for(var e=0,i=t.length;ethis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===i&&this._layersMinZoom&&this.getZoom()100&&n<500||t.target._simulatedClick&&!t._simulated?void o.DomEvent.stop(t):(o.DomEvent._lastClick=i,void e(t))}},o.DomEvent.addListener=o.DomEvent.on,o.DomEvent.removeListener=o.DomEvent.off,o.PosAnimation=o.Evented.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=o.DomUtil.getPosition(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=o.Util.requestAnimFrame(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e1e-7;l++)e=r*Math.sin(h),e=Math.pow((1-e)/(1+e),r/2),u=Math.PI/2-2*Math.atan(a*e)-h,h+=u;return new o.LatLng(h*i,t.x*i/n)}},o.CRS.EPSG3395=o.extend({},o.CRS.Earth,{code:"EPSG:3395",projection:o.Projection.Mercator,transformation:function(){var t=.5/(Math.PI*o.Projection.Mercator.R);return new o.Transformation(t,.5,-t,.5)}()}),o.GridLayer=o.Layer.extend({options:{tileSize:256,opacity:1,updateWhenIdle:o.Browser.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:i,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){o.setOptions(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),o.DomUtil.remove(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=null},bringToFront:function(){return this._map&&(o.DomUtil.toFront(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(o.DomUtil.toBack(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=o.Util.throttle(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return e.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof o.Point?t:new o.Point(t,t)},_updateZIndex:function(){this._container&&this.options.zIndex!==i&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,n=-t(-(1/0),1/0),o=0,s=i.length;othis.options.maxZoom||in&&this._retainParent(s,r,a,n))},_retainChildren:function(t,e,i,n){for(var s=2*t;s<2*t+2;s++)for(var r=2*e;r<2*e+2;r++){var a=new o.Point(s,r);a.z=i+1;var h=this._tileCoordsToKey(a),l=this._tiles[h];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),i+1this.options.maxZoom||this.options.minZoom!==i&&s1)return void this._setView(t,s);for(var m=a.min.y;m<=a.max.y;m++)for(var p=a.min.x;p<=a.max.x;p++){var f=new o.Point(p,m);if(f.z=this._tileZoom,this._isValidTile(f)){var g=this._tiles[this._tileCoordsToKey(f)];g?g.current=!0:l.push(f)}}if(l.sort(function(t,e){return t.distanceTo(h)-e.distanceTo(h)}),0!==l.length){this._loading||(this._loading=!0,this.fire("loading"));var v=e.createDocumentFragment();for(p=0;pi.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return o.latLngBounds(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToBounds:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),s=n.add(i),r=e.unproject(n,t.z),a=e.unproject(s,t.z),h=new o.LatLngBounds(r,a);return this.options.noWrap||e.wrapLatLngBounds(h),h},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new o.Point(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(o.DomUtil.remove(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){o.DomUtil.addClass(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=o.Util.falseFn,t.onmousemove=o.Util.falseFn,o.Browser.ielt9&&this.options.opacity<1&&o.DomUtil.setOpacity(t,this.options.opacity),o.Browser.android&&!o.Browser.android23&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),s=this.createTile(this._wrapCoords(t),o.bind(this._tileReady,this,t));this._initTile(s),this.createTile.length<2&&o.Util.requestAnimFrame(o.bind(this._tileReady,this,t,null,s)),o.DomUtil.setPosition(s,i),this._tiles[n]={el:s,coords:t,current:!0},e.appendChild(s),this.fire("tileloadstart",{tile:s,coords:t})},_tileReady:function(t,e,i){if(this._map){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);i=this._tiles[n],i&&(i.loaded=+new Date,this._map._fadeAnimated?(o.DomUtil.setOpacity(i.el,0),o.Util.cancelAnimFrame(this._fadeFrame),this._fadeFrame=o.Util.requestAnimFrame(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(o.DomUtil.addClass(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),o.Browser.ielt9||!this._map._fadeAnimated?o.Util.requestAnimFrame(this._pruneTiles,this):setTimeout(o.bind(this._pruneTiles,this),250)))}},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new o.Point(this._wrapX?o.Util.wrapNum(t.x,this._wrapX):t.x,this._wrapY?o.Util.wrapNum(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new o.Bounds(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),o.gridLayer=function(t){return new o.GridLayer(t)},o.TileLayer=o.GridLayer.extend({options:{minZoom:0,maxZoom:18,maxNativeZoom:null,minNativeZoom:null,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,e=o.setOptions(this,e),e.detectRetina&&o.Browser.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),o.Browser.android||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},createTile:function(t,i){var n=e.createElement("img");return o.DomEvent.on(n,"load",o.bind(this._tileOnLoad,this,i,n)),o.DomEvent.on(n,"error",o.bind(this._tileOnError,this,i,n)),this.options.crossOrigin&&(n.crossOrigin=""),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:o.Browser.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return o.Util.template(this._url,o.extend(e,this.options))},_tileOnLoad:function(t,e){o.Browser.ielt9?setTimeout(o.bind(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.src!==n&&(e.src=n),t(i,e)},getTileSize:function(){var t=this._map,e=o.GridLayer.prototype.getTileSize.call(this),i=this._tileZoom+this.options.zoomOffset,n=this.options.minNativeZoom,s=this.options.maxNativeZoom;return null!==n&&is?e.divideBy(t.getZoomScale(s,i)).round():e},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset,o=this.options.minNativeZoom,s=this.options.maxNativeZoom;return i&&(t=e-t),t+=n,null!==o&&ts?s:t},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=o.Util.falseFn,e.onerror=o.Util.falseFn,e.complete||(e.src=o.Util.emptyImageUrl,o.DomUtil.remove(e)))}}),o.tileLayer=function(t,e){return new o.TileLayer(t,e)},o.TileLayer.WMS=o.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=o.extend({},this.defaultWmsParams);for(var n in e)n in this.options||(i[n]=e[n]);e=o.setOptions(this,e),i.width=i.height=e.tileSize*(e.detectRetina&&o.Browser.retina?2:1),this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,o.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToBounds(t),i=this._crs.project(e.getNorthWest()),n=this._crs.project(e.getSouthEast()),s=(this._wmsVersion>=1.3&&this._crs===o.CRS.EPSG4326?[n.y,i.x,i.y,n.x]:[i.x,n.y,n.x,i.y]).join(","),r=o.TileLayer.prototype.getTileUrl.call(this,t);return r+o.Util.getParamString(this.wmsParams,r,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+s},setParams:function(t,e){return o.extend(this.wmsParams,t),e||this.redraw(),this}}),o.tileLayer.wms=function(t,e){return new o.TileLayer.WMS(t,e)},o.ImageOverlay=o.Layer.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1},initialize:function(t,e,i){this._url=t,this._bounds=o.latLngBounds(e),o.setOptions(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(o.DomUtil.addClass(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){o.DomUtil.remove(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&o.DomUtil.toFront(this._image),this},bringToBack:function(){return this._map&&o.DomUtil.toBack(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=t,this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._image=o.DomUtil.create("img","leaflet-image-layer "+(this._zoomAnimated?"leaflet-zoom-animated":""));t.onselectstart=o.Util.falseFn,t.onmousemove=o.Util.falseFn,t.onload=o.bind(this.fire,this,"load"),this.options.crossOrigin&&(t.crossOrigin=""),t.src=this._url,t.alt=this.options.alt},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;o.DomUtil.setTransform(this._image,i,e)},_reset:function(){var t=this._image,e=new o.Bounds(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize(); + o.DomUtil.setPosition(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){o.DomUtil.setOpacity(this._image,this.options.opacity)}}),o.imageOverlay=function(t,e,i){return new o.ImageOverlay(t,e,i)},o.Icon=o.Class.extend({initialize:function(t){o.setOptions(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];"number"==typeof n&&(n=[n,n]);var s=o.point(n),r=o.point("shadow"===e&&i.shadowAnchor||i.iconAnchor||s&&s.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),r&&(t.style.marginLeft=-r.x+"px",t.style.marginTop=-r.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,i){return i=i||e.createElement("img"),i.src=t,i},_getIconUrl:function(t){return o.Browser.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),o.icon=function(t){return new o.Icon(t)},o.Icon.Default=o.Icon.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return o.Icon.Default.imagePath||(o.Icon.Default.imagePath=this._detectIconPath()),(this.options.imagePath||o.Icon.Default.imagePath)+o.Icon.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=o.DomUtil.create("div","leaflet-default-icon-path",e.body),i=o.DomUtil.getStyle(t,"background-image")||o.DomUtil.getStyle(t,"backgroundImage");return e.body.removeChild(t),0===i.indexOf("url")?i.replace(/^url\([\"\']?/,"").replace(/marker-icon\.png[\"\']?\)$/,""):""}}),o.Marker=o.Layer.extend({options:{icon:new o.Icon.Default,interactive:!0,draggable:!1,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",nonBubblingEvents:["click","dblclick","mouseover","mouseout","contextmenu"]},initialize:function(t,e){o.setOptions(this,e),this._latlng=o.latLng(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=o.latLng(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),t.alt&&(i.alt=t.alt)),o.DomUtil.addClass(i,e),t.keyboard&&(i.tabIndex="0"),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var s=t.icon.createShadow(this._shadow),r=!1;s!==this._shadow&&(this._removeShadow(),r=!0),s&&(o.DomUtil.addClass(s,e),s.alt=""),this._shadow=s,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),s&&r&&this.getPane("shadowPane").appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),o.DomUtil.remove(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&o.DomUtil.remove(this._shadow),this._shadow=null},_setPos:function(t){o.DomUtil.setPosition(this._icon,t),this._shadow&&o.DomUtil.setPosition(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(o.DomUtil.addClass(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),o.Handler.MarkerDrag)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new o.Handler.MarkerDrag(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;o.DomUtil.setOpacity(this._icon,t),this._shadow&&o.DomUtil.setOpacity(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor||[0,0]},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor||[0,0]}}),o.marker=function(t,e){return new o.Marker(t,e)},o.DivIcon=o.Icon.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var i=t&&"DIV"===t.tagName?t:e.createElement("div"),n=this.options;if(i.innerHTML=n.html!==!1?n.html:"",n.bgPos){var s=o.point(n.bgPos);i.style.backgroundPosition=-s.x+"px "+-s.y+"px"}return this._setIconStyles(i,"icon"),i},createShadow:function(){return null}}),o.divIcon=function(t){return new o.DivIcon(t)},o.DivOverlay=o.Layer.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){o.setOptions(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&o.DomUtil.setOpacity(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&o.DomUtil.setOpacity(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(o.DomUtil.setOpacity(this._container,0),this._removeTimeout=setTimeout(o.bind(o.DomUtil.remove,o.DomUtil,this._container),200)):o.DomUtil.remove(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=o.latLng(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&o.DomUtil.toFront(this._container),this},bringToBack:function(){return this._map&&o.DomUtil.toBack(this._container),this},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=o.point(this.options.offset),i=this._getAnchor();this._zoomAnimated?o.DomUtil.setPosition(this._container,t.add(i)):e=e.add(t).add(i);var n=this._containerBottom=-e.y,s=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=n+"px",this._container.style.left=s+"px"}},_getAnchor:function(){return[0,0]}}),o.Popup=o.DivOverlay.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){o.DivOverlay.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof o.Path||this._source.on("preclick",o.DomEvent.stopPropagation))},onRemove:function(t){o.DivOverlay.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof o.Path||this._source.off("preclick",o.DomEvent.stopPropagation))},getEvents:function(){var t=o.DivOverlay.prototype.getEvents.call(this);return("closeOnClick"in this.options?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=o.DomUtil.create("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated");if(this.options.closeButton){var i=this._closeButton=o.DomUtil.create("a",t+"-close-button",e);i.href="#close",i.innerHTML="×",o.DomEvent.on(i,"click",this._onCloseButtonClick,this)}var n=this._wrapper=o.DomUtil.create("div",t+"-content-wrapper",e);this._contentNode=o.DomUtil.create("div",t+"-content",n),o.DomEvent.disableClickPropagation(n).disableScrollPropagation(this._contentNode).on(n,"contextmenu",o.DomEvent.stopPropagation),this._tipContainer=o.DomUtil.create("div",t+"-tip-container",e),this._tip=o.DomUtil.create("div",t+"-tip",this._tipContainer)},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,s=this.options.maxHeight,r="leaflet-popup-scrolled";s&&n>s?(e.height=s+"px",o.DomUtil.addClass(t,r)):o.DomUtil.removeClass(t,r),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();o.DomUtil.setPosition(this._container,e.add(i))},_adjustPan:function(){if(!(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress)){var t=this._map,e=parseInt(o.DomUtil.getStyle(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,s=new o.Point(this._containerLeft,-i-this._containerBottom);s._add(o.DomUtil.getPosition(this._container));var r=t.layerPointToContainerPoint(s),a=o.point(this.options.autoPanPadding),h=o.point(this.options.autoPanPaddingTopLeft||a),l=o.point(this.options.autoPanPaddingBottomRight||a),u=t.getSize(),c=0,d=0;r.x+n+l.x>u.x&&(c=r.x+n-u.x+l.x),r.x-c-h.x<0&&(c=r.x-h.x),r.y+i+l.y>u.y&&(d=r.y+i-u.y+l.y),r.y-d-h.y<0&&(d=r.y-h.y),(c||d)&&t.fire("autopanstart").panBy([c,d])}},_onCloseButtonClick:function(t){this._close(),o.DomEvent.stop(t)},_getAnchor:function(){return o.point(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),o.popup=function(t,e){return new o.Popup(t,e)},o.Map.mergeOptions({closePopupOnClick:!0}),o.Map.include({openPopup:function(t,e,i){return t instanceof o.Popup||(t=new o.Popup(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),o.Layer.include({bindPopup:function(t,e){return t instanceof o.Popup?(o.setOptions(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new o.Popup(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){if(t instanceof o.Layer||(e=t,t=this),t instanceof o.FeatureGroup)for(var i in this._layers){t=this._layers[i];break}return e||(e=t.getCenter?t.getCenter():t.getLatLng()),this._popup&&this._map&&(this._popup._source=t,this._popup.update(),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;if(this._popup&&this._map)return o.DomEvent.stop(t),e instanceof o.Path?void this.openPopup(t.layer||t.target,t.latlng):void(this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)}}),o.Tooltip=o.DivOverlay.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){o.DivOverlay.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){o.DivOverlay.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=o.DivOverlay.prototype.getEvents.call(this);return o.Browser.touch&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip",e=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=o.DomUtil.create("div",e)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,i=this._container,n=e.latLngToContainerPoint(e.getCenter()),s=e.layerPointToContainerPoint(t),r=this.options.direction,a=i.offsetWidth,h=i.offsetHeight,l=o.point(this.options.offset),u=this._getAnchor();"top"===r?t=t.add(o.point(-a/2+l.x,-h+l.y+u.y,!0)):"bottom"===r?t=t.subtract(o.point(a/2-l.x,-l.y,!0)):"center"===r?t=t.subtract(o.point(a/2+l.x,h/2-u.y+l.y,!0)):"right"===r||"auto"===r&&s.xh&&(s=r,h=a);h>i&&(e[s]=1,this._simplifyDPStep(t,e,i,n,s),this._simplifyDPStep(t,e,i,s,o))},_reducePoints:function(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;ne&&(i.push(t[n]),o=n);return oe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},_sqClosestPointOnSegment:function(t,e,i,n){var s,r=e.x,a=e.y,h=i.x-r,l=i.y-a,u=h*h+l*l;return u>0&&(s=((t.x-r)*h+(t.y-a)*l)/u,s>1?(r=i.x,a=i.y):s>0&&(r+=h*s,a+=l*s)),h=t.x-r,l=t.y-a,n?h*h+l*l:new o.Point(r,a)}},o.Polyline=o.Path.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){o.setOptions(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,i,n=1/0,s=null,r=o.LineUtil._sqClosestPointOnSegment,a=0,h=this._parts.length;ae)return r=(n-e)/i,this._map.layerPointToLatLng([s.x-r*(s.x-o.x),s.y-r*(s.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=o.latLng(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new o.LatLngBounds,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return o.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=o.Polyline._flat(t),n=0,s=t.length;n=2&&e[0]instanceof o.LatLng&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){o.Polyline.prototype._setLatLngs.call(this,t),o.Polyline._flat(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return o.Polyline._flat(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new o.Point(e,e);if(t=new o.Bounds(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t)){if(this.options.noClip)return void(this._parts=this._rings);for(var n,s=0,r=this._rings.length;s';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(t){return!1}}(),o.SVG.include(o.Browser.vml?{_initContainer:function(){this._container=o.DomUtil.create("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(o.Renderer.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=o.SVG.create("shape");o.DomUtil.addClass(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=o.SVG.create("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[o.stamp(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;o.DomUtil.remove(e),t.removeInteractiveTarget(e),delete this._layers[o.stamp(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,s=t._container;s.stroked=!!n.stroke,s.filled=!!n.fill,n.stroke?(e||(e=t._stroke=o.SVG.create("stroke")),s.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=o.Util.isArray(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(s.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=o.SVG.create("fill")),s.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(s.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){o.DomUtil.toFront(t._container)},_bringToBack:function(t){o.DomUtil.toBack(t._container)}}:{}),o.Browser.vml&&(o.SVG.create=function(){try{return e.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return e.createElement("')}}catch(t){return function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}()),o.Canvas=o.Renderer.extend({getEvents:function(){var t=o.Renderer.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){o.Renderer.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=e.createElement("canvas");o.DomEvent.on(t,"mousemove",o.Util.throttle(this._onMouseMove,32,this),this).on(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this).on(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var e in this._layers)t=this._layers[e],t._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){this._drawnLayers={},o.Renderer.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=o.Browser.retina?2:1;o.DomUtil.setPosition(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",o.Browser.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){o.Renderer.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[o.stamp(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[o.stamp(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(t.options.dashArray){var e,i=t.options.dashArray.split(","),n=[];for(e=0;et.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(u=!u);return u||o.Polyline.prototype._containsPoint.call(this,t,!0)},o.CircleMarker.prototype._containsPoint=function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()},o.GeoJSON=o.FeatureGroup.extend({initialize:function(t,e){o.setOptions(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,s=o.Util.isArray(t)?t:t.features;if(s){for(e=0,i=s.length;e1)return void(this._moved=!0);var n=i.touches&&1===i.touches.length?i.touches[0]:i,s=new o.Point(n.clientX,n.clientY),r=s.subtract(this._startPoint);(r.x||r.y)&&(Math.abs(r.x)+Math.abs(r.y)50&&(this._positions.shift(),this._times.shift())}this._map.fire("move",t).fire("drag",t)},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.xe.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,r=Math.abs(o+i)0?s:-s))-e;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}}),o.Map.addInitHook("addHandler","scrollWheelZoom",o.Map.ScrollWheelZoom),o.extend(o.DomEvent,{_touchstart:o.Browser.msPointer?"MSPointerDown":o.Browser.pointer?"pointerdown":"touchstart",_touchend:o.Browser.msPointer?"MSPointerUp":o.Browser.pointer?"pointerup":"touchend",addDoubleTapListener:function(t,e,i){function n(t){var e;if(o.Browser.pointer){if(!o.Browser.edge||"mouse"===t.pointerType)return;e=o.DomEvent._pointersCount}else e=t.touches.length;if(!(e>1)){var i=Date.now(),n=i-(r||i);a=t.touches?t.touches[0]:t,h=n>0&&n<=l,r=i}}function s(t){if(h&&!a.cancelBubble){if(o.Browser.pointer){if(!o.Browser.edge||"mouse"===t.pointerType)return;var i,n,s={};for(n in a)i=a[n],s[n]=i&&i.bind?i.bind(a):i;a=s}a.type="dblclick",e(a),r=null}}var r,a,h=!1,l=250,u="_leaflet_",c=this._touchstart,d=this._touchend;return t[u+c+i]=n,t[u+d+i]=s,t[u+"dblclick"+i]=e,t.addEventListener(c,n,!1),t.addEventListener(d,s,!1),t.addEventListener("dblclick",e,!1),this},removeDoubleTapListener:function(t,e){var i="_leaflet_",n=t[i+this._touchstart+e],s=t[i+this._touchend+e],r=t[i+"dblclick"+e];return t.removeEventListener(this._touchstart,n,!1),t.removeEventListener(this._touchend,s,!1),o.Browser.edge||t.removeEventListener("dblclick",r,!1),this}}),o.extend(o.DomEvent,{POINTER_DOWN:o.Browser.msPointer?"MSPointerDown":"pointerdown",POINTER_MOVE:o.Browser.msPointer?"MSPointerMove":"pointermove",POINTER_UP:o.Browser.msPointer?"MSPointerUp":"pointerup",POINTER_CANCEL:o.Browser.msPointer?"MSPointerCancel":"pointercancel",TAG_WHITE_LIST:["INPUT","SELECT","OPTION"],_pointers:{},_pointersCount:0,addPointerListener:function(t,e,i,n){return"touchstart"===e?this._addPointerStart(t,i,n):"touchmove"===e?this._addPointerMove(t,i,n):"touchend"===e&&this._addPointerEnd(t,i,n),this},removePointerListener:function(t,e,i){var n=t["_leaflet_"+e+i];return"touchstart"===e?t.removeEventListener(this.POINTER_DOWN,n,!1):"touchmove"===e?t.removeEventListener(this.POINTER_MOVE,n,!1):"touchend"===e&&(t.removeEventListener(this.POINTER_UP,n,!1),t.removeEventListener(this.POINTER_CANCEL,n,!1)),this},_addPointerStart:function(t,i,n){var s=o.bind(function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(this.TAG_WHITE_LIST.indexOf(t.target.tagName)<0))return;o.DomEvent.preventDefault(t)}this._handlePointer(t,i)},this);if(t["_leaflet_touchstart"+n]=s,t.addEventListener(this.POINTER_DOWN,s,!1),!this._pointerDocListener){var r=o.bind(this._globalPointerUp,this);e.documentElement.addEventListener(this.POINTER_DOWN,o.bind(this._globalPointerDown,this),!0),e.documentElement.addEventListener(this.POINTER_MOVE,o.bind(this._globalPointerMove,this),!0),e.documentElement.addEventListener(this.POINTER_UP,r,!0),e.documentElement.addEventListener(this.POINTER_CANCEL,r,!0),this._pointerDocListener=!0}},_globalPointerDown:function(t){this._pointers[t.pointerId]=t,this._pointersCount++},_globalPointerMove:function(t){this._pointers[t.pointerId]&&(this._pointers[t.pointerId]=t)},_globalPointerUp:function(t){delete this._pointers[t.pointerId],this._pointersCount--},_handlePointer:function(t,e){t.touches=[];for(var i in this._pointers)t.touches.push(this._pointers[i]);t.changedTouches=[t],e(t)},_addPointerMove:function(t,e,i){var n=o.bind(function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&this._handlePointer(t,e)},this);t["_leaflet_touchmove"+i]=n,t.addEventListener(this.POINTER_MOVE,n,!1)},_addPointerEnd:function(t,e,i){var n=o.bind(function(t){this._handlePointer(t,e)},this);t["_leaflet_touchend"+i]=n,t.addEventListener(this.POINTER_UP,n,!1),t.addEventListener(this.POINTER_CANCEL,n,!1)}}),o.Map.mergeOptions({touchZoom:o.Browser.touch&&!o.Browser.android23,bounceAtZoomLimits:!0}),o.Map.TouchZoom=o.Handler.extend({addHooks:function(){o.DomUtil.addClass(this._map._container,"leaflet-touch-zoom"),o.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){o.DomUtil.removeClass(this._map._container,"leaflet-touch-zoom"),o.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){var n=i.mouseEventToContainerPoint(t.touches[0]),s=i.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=i.getSize()._divideBy(2),this._startLatLng=i.containerPointToLatLng(this._centerPoint),"center"!==i.options.touchZoom&&(this._pinchStartLatLng=i.containerPointToLatLng(n.add(s)._divideBy(2))),this._startDist=n.distanceTo(s),this._startZoom=i.getZoom(),this._moved=!1,this._zooming=!0,i._stop(),o.DomEvent.on(e,"touchmove",this._onTouchMove,this).on(e,"touchend",this._onTouchEnd,this),o.DomEvent.preventDefault(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),s=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(s,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoome.getMaxZoom()&&s>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===s)return}else{var r=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1===s&&0===r.x&&0===r.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(e._moveStart(!0),this._moved=!0),o.Util.cancelAnimFrame(this._animRequest);var a=o.bind(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=o.Util.requestAnimFrame(a,this,!0),o.DomEvent.preventDefault(t)}},_onTouchEnd:function(){return this._moved&&this._zooming?(this._zooming=!1,o.Util.cancelAnimFrame(this._animRequest),o.DomEvent.off(e,"touchmove",this._onTouchMove).off(e,"touchend",this._onTouchEnd),void(this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom)))):void(this._zooming=!1)}}),o.Map.addInitHook("addHandler","touchZoom",o.Map.TouchZoom),o.Map.mergeOptions({tap:!0,tapTolerance:15}),o.Map.Tap=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(o.DomEvent.preventDefault(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var i=t.touches[0],n=i.target;this._startPos=this._newPos=new o.Point(i.clientX,i.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.addClass(n,"leaflet-active"),this._holdTimeout=setTimeout(o.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3),this._simulateEvent("mousedown",i),o.DomEvent.on(e,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),o.DomEvent.off(e,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var i=t.changedTouches[0],n=i.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.removeClass(n,"leaflet-active"),this._simulateEvent("mouseup",i),this._isTapValid()&&this._simulateEvent("click",i)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new o.Point(e.clientX,e.clientY), + this._simulateEvent("mousemove",e)},_simulateEvent:function(i,n){var o=e.createEvent("MouseEvents");o._simulated=!0,n.target._simulatedClick=!0,o.initMouseEvent(i,!0,!0,t,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),n.target.dispatchEvent(o)}}),o.Browser.touch&&!o.Browser.pointer&&o.Map.addInitHook("addHandler","tap",o.Map.Tap),o.Map.mergeOptions({boxZoom:!0}),o.Map.BoxZoom=o.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},addHooks:function(){o.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){o.DomEvent.off(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_resetState:function(){this._moved=!1},_onMouseDown:function(t){return!(!t.shiftKey||1!==t.which&&1!==t.button)&&(this._resetState(),o.DomUtil.disableTextSelection(),o.DomUtil.disableImageDrag(),this._startPoint=this._map.mouseEventToContainerPoint(t),void o.DomEvent.on(e,{contextmenu:o.DomEvent.stop,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this))},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=o.DomUtil.create("div","leaflet-zoom-box",this._container),o.DomUtil.addClass(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new o.Bounds(this._point,this._startPoint),i=e.getSize();o.DomUtil.setPosition(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(o.DomUtil.remove(this._box),o.DomUtil.removeClass(this._container,"leaflet-crosshair")),o.DomUtil.enableTextSelection(),o.DomUtil.enableImageDrag(),o.DomEvent.off(e,{contextmenu:o.DomEvent.stop,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){setTimeout(o.bind(this._resetState,this),0);var e=new o.LatLngBounds(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}}),o.Map.addInitHook("addHandler","boxZoom",o.Map.BoxZoom),o.Map.mergeOptions({keyboard:!0,keyboardPanDelta:80}),o.Map.Keyboard=o.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),o.DomEvent.on(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),o.DomEvent.off(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var i=e.body,n=e.documentElement,o=i.scrollTop||n.scrollTop,s=i.scrollLeft||n.scrollLeft;this._map._container.focus(),t.scrollTo(s,o)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;e0&&t.screenY>0&&this._map.getContainer().focus()}}),o.control=function(t){return new o.Control(t)},o.Map.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){function t(t,s){var r=i+t+" "+i+s;e[t+s]=o.DomUtil.create("div",r,n)}var e=this._controlCorners={},i="leaflet-",n=this._controlContainer=o.DomUtil.create("div",i+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){o.DomUtil.remove(this._controlContainer)}}),o.Control.Zoom=o.Control.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=o.DomUtil.create("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,s){var r=o.DomUtil.create("a",i,n);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),o.DomEvent.on(r,"mousedown dblclick",o.DomEvent.stopPropagation).on(r,"click",o.DomEvent.stop).on(r,"click",s,this).on(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";o.DomUtil.removeClass(this._zoomInButton,e),o.DomUtil.removeClass(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&o.DomUtil.addClass(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&o.DomUtil.addClass(this._zoomInButton,e)}}),o.Map.mergeOptions({zoomControl:!0}),o.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new o.Control.Zoom,this.addControl(this.zoomControl))}),o.control.zoom=function(t){return new o.Control.Zoom(t)},o.Control.Attribution=o.Control.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(t){o.setOptions(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=o.DomUtil.create("div","leaflet-control-attribution"),o.DomEvent&&o.DomEvent.disableClickPropagation(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}}}),o.Map.mergeOptions({attributionControl:!0}),o.Map.addInitHook(function(){this.options.attributionControl&&(new o.Control.Attribution).addTo(this)}),o.control.attribution=function(t){return new o.Control.Attribution(t)},o.Control.Scale=o.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=o.DomUtil.create("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=o.DomUtil.create("div",e,i)),t.imperial&&(this._iScale=o.DomUtil.create("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e,i,n,o=3.2808399*t;o>5280?(e=o/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(n=this._getRoundNum(o),this._updateScale(this._iScale,n+" ft",n/o))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),o.control.scale=function(t){return new o.Control.Scale(t)},o.Control.Layers=o.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(o.stamp(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,i){var n='",o=e.createElement("div");return o.innerHTML=n,o.firstChild},_addItem:function(t){var i,n=e.createElement("label"),s=this._map.hasLayer(t.layer);t.overlay?(i=e.createElement("input"),i.type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=s):i=this._createRadioElement("leaflet-base-layers",s),i.layerId=o.stamp(t.layer),o.DomEvent.on(i,"click",this._onInputClick,this);var r=e.createElement("span");r.innerHTML=" "+t.name;var a=e.createElement("div");n.appendChild(a),a.appendChild(i),a.appendChild(r);var h=t.overlay?this._overlaysList:this._baseLayersList;return h.appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,i,n=this._form.getElementsByTagName("input"),o=[],s=[];this._handlingClick=!0;for(var r=n.length-1;r>=0;r--)t=n[r],e=this._getLayer(t.layerId).layer,i=this._map.hasLayer(e),t.checked&&!i?o.push(e):!t.checked&&i&&s.push(e);for(r=0;r=0;s--)t=n[s],e=this._getLayer(t.layerId).layer,t.disabled=e.options.minZoom!==i&&oe.options.maxZoom},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),o.control.layers=function(t,e,i){return new o.Control.Layers(t,e,i)}}(window,document); \ No newline at end of file diff --git a/module-map/src/main/resources/static/super-map/js/super-map-1.0.0.min.js b/module-map/src/main/resources/static/super-map/js/super-map-1.0.0.min.js new file mode 100644 index 00000000..092d04f9 --- /dev/null +++ b/module-map/src/main/resources/static/super-map/js/super-map-1.0.0.min.js @@ -0,0 +1,399 @@ +(function () { + + function SuperMap(mapContainerId, mapBox, options) { + this.mapBox = mapBox; + this.map = L.map(mapContainerId, { + crs: options.crs ? options.crs : L.CRS.EPSG3857, + center: options.center ? options.center : {lat: 0, lon: 0}, + maxZoom: options.maxZoom ? options.maxZoom : 18, + zoom: options.zoom ? options.zoom : 6, + boxZoom: options.boxZoom ? options.boxZoom : false, + scrollWheelZoom: options.scrollWheelZoom ? options.scrollWheelZoom : true, + dragging: options.dragging ? options.dragging : true, + doubleClickZoom: options.doubleClickZoom ? options.doubleClickZoom : false, + zoomControl: options.zoomControl ? options.zoomControl : false + }); + this.gridLayer = null; + this.gridBGLayer = null; + this.gridColor = '#000000'; + this.colorOption = { + isEditColor: false, + edit: {r: 0, g: 0, b: 0}, + const: { + COLOR_BOX_ID: 'B_COLOR_BOX', + COLOR_SHOW_BOX_ID: 'B_SHOW_COLOR_BOX', + COLOR_R: 'B_COLOR_R', + COLOR_G: 'B_COLOR_G', + COLOR_B: 'B_COLOR_B', + } + }; + } + + /** + * 初始化 + * @param baseLayerUrl + */ + SuperMap.prototype.init = function (baseLayerUrl) { + var map = this.map; + L.control.zoom().addTo(map); + L.control.scale().addTo(map); + L.supermap.tiledMapLayer(baseLayerUrl, {noWrap: true}).addTo(map); + } + + /** + * 初始化绘制面 + */ + SuperMap.prototype.initDrawPolygon = function () { + var self = this; + self.gridLayer = L.featureGroup([]).addTo(self.map); + self.gridBGLayer = L.layerGroup([]).addTo(self.map); + self.map.pm.setLang('zh'); + self.map.pm.addControls({ + positions: { + draw: 'topleft', + edit: 'topleft', + custom: '', + options: '' + }, + drawCircle: false, + drawMarker: false, + drawCircleMarker: false, + drawPolyline: false, + drawRectangle: false, + drawPolygon: true, + + editMode: true, + dragMode: true, + cutPolygon: false, + removalMode: true, + rotateMode: true, + // 工具栏是否一个块 + oneBlock: false, + drawControls: true, + editControls: false, + customControls: false, + optionsControls: false, + pinningOption: false, + snappingOption: false, + splitMode: true, + scaleMode: true + }); + self.map.pm.Toolbar.createCustomControl({ + name: '修改颜色', + block: 'custom', + title: '修改颜色', + className: '', + onClick: function (e) { + var colorBox = document.getElementById(self.colorOption.const.COLOR_BOX_ID); + colorBox.style.left = '50px'; + colorBox.style.top = '225px'; + if (!self.colorOption.isEditColor) { + colorBox.style.display = 'block'; + } else { + colorBox.style.display = 'none'; + } + self.colorOption.isEditColor = !self.colorOption.isEditColor; + }, + toggle: true + }); + self.map.pm.setPathOptions({ + color: '#000000', + fillColor: '#000000', + fillOpacity: 0.4, + }); + self.map.on('pm:create', function (e) { + self.map.pm.addControls({ + drawControls: false, + editControls: true, + customControls: true + }); + self.gridLayer.addLayer(e.layer); + e.layer.on('pm:edit', function (e) { + }); + }); + self.map.on('pm:remove', function (e) { + self.map.pm.addControls({ + drawControls: true, + editControls: false, + customControls: false + }); + }) + } + + /** + * 初始化网格背景 + * @param gridArray + */ + SuperMap.prototype.initGridBG = function (gridArray) { + for (var i = 0, item; item = gridArray[i++];) { + this.gridBGLayer.addLayer(this.drawPolygon(item.pointArray, item.fillColor, null)); + } + } + + /** + * 初始化网格 + * @param polygonArray + * @param color + * @param popup + */ + SuperMap.prototype.initEditGrid = function (gridArray) { + for (var i = 0, item; item = gridArray[i++];) { + var pointArray = []; + for (var j = 0, jItem; jItem = item.pointArray[j++];) { + pointArray.push([jItem.lat, jItem.lng]); + } + this.gridLayer.addLayer(this.drawPolygon(pointArray, item.fillColor, null)); + } + if (gridArray.length == 0) { + return; + } + // 标记编辑 + this.map.pm.addControls({ + drawControls: false, + editControls: true, + customControls: true + }); + } + + /** + * 获取编辑网格层 + * @returns 网格点数组 + */ + SuperMap.prototype.getEditGridLayer = function () { + return this.gridLayer.getLayers(); + } + + /** + * 设置编辑网格颜色 + * @param color + */ + SuperMap.prototype.setEditGridLayerColor = function (color) { + this.gridColor = color; + var layers = this.getEditGridLayer(); + for (var i = 0, layer; layer = layers[i++];) { + layer.setStyle({ + color: color, + fillColor: color, + }); + } + } + + /** + * 获取编辑网格颜色 + * @returns {string} + */ + SuperMap.prototype.getGridColor = function () { + return this.gridColor; + } + + /** + * 清空网格背景 + */ + SuperMap.prototype.removeGridBG = function () { + this.gridBGLayer.clearLayers(); + } + + /** + * 获取map + * @returns {*} + */ + SuperMap.prototype.getMap = function () { + return this.map; + } + + /** + * 绘制面 + * @param polygonArray [{lat, lng}] + * @param color 颜色 + * @param popup 点击显示内容 + * @returns polygonLayer + */ + SuperMap.prototype.drawPolygon = function (polygonArray, color, popup) { + if (!popup) { + return L.polygon([polygonArray], {color: color}).addTo(this.map); + } + return L.polygon([polygonArray], {color: color}).bindPopup(popup).addTo(this.map); + } + + /** + * 绘制标记 + * @param point {lat, lng} + * @param popup 点击显示内容 + * @returns markerLayer + */ + SuperMap.prototype.drawMarker = function (point, popup) { + if (!popup) { + return L.marker([point]).addTo(this.map); + } + return L.marker([point]).bindPopup(popup).addTo(this.map); + } + + /** + * 绘制图标标记 + * @param point {lat, lng} + * @param icon {url, width, height} + * @param popup 点击显示内容 + * @returns markerLayer + */ + SuperMap.prototype.drawIconMarker = function (point, icon, popup) { + var iconWidth = icon.width ? icon.width : 64; + var iconHeight = icon.height ? icon.height : 64; + var icon = L.icon({ + iconUrl: icon.url, + iconSize: [iconWidth, iconHeight], + iconAnchor: [iconWidth / 2, iconHeight], + popupAnchor: [0, -iconHeight], + }); + if (!popup) { + return L.marker([point], {icon: icon}).addTo(this.map); + } + return L.marker([point], {icon: icon}).bindPopup(popup).addTo(this.map); + } + + /** + * 绘制线 + * @param pointArray 轨迹数组 + * @param color 颜色 + * @returns polylineLayer + */ + SuperMap.prototype.drawPolyline = function (pointArray, color) { + return L.polyline(pointArray, {color: color}).addTo(this.map); + } + + /** + * 颜色RGB转16进制 + * @param r + * @param g + * @param b + * @returns {string} + */ + SuperMap.prototype.colorRGBToHex = function (r, g, b) { + var red = parseInt(r, 10).toString(16); + red = red.length < 2 ? '0' + red : red; + var green = parseInt(g, 10).toString(16); + green = green.length < 2 ? '0' + green : green; + var blue = parseInt(b, 10).toString(16); + blue = blue.length < 2 ? '0' + blue : blue; + return "#" + red + green + blue; + } + + /** + * 颜色16进制转RGB + * @param hex + * @returns {{r: number, b: number, g: number}} + */ + SuperMap.prototype.colorHexToRGB = function (hex) { + if (!hex) { + return {r: 0, g: 0, b: 0}; + } + if (hex.indexOf('#') == 0) { + hex = hex.substring(1); + } + return { + r: parseInt(hex.substring(0, 2), 16), + g: parseInt(hex.substring(2, 4), 16), + b: parseInt(hex.substring(4, 6), 16) + } + } + + // 颜色选择器 + SuperMap.prototype.setShowColor = function () { + var self = this; + var colorShowBox = document.getElementById(self.colorOption.const.COLOR_SHOW_BOX_ID); + var hexColor = self.colorRGBToHex(self.colorOption.edit.r, self.colorOption.edit.g, self.colorOption.edit.b); + colorShowBox.style.backgroundColor = hexColor; + self.setEditGridLayerColor(hexColor); + } + // 设置颜色Input值 + SuperMap.prototype.setColorInputValue = function (color) { + var self = this; + self.colorOption.edit = self.colorHexToRGB(color); + document.getElementById(self.colorOption.const.COLOR_R).value = self.colorOption.edit.r; + document.getElementById(self.colorOption.const.COLOR_G).value = self.colorOption.edit.g; + document.getElementById(self.colorOption.const.COLOR_B).value = self.colorOption.edit.b; + var colorShowBox = document.getElementById(self.colorOption.const.COLOR_SHOW_BOX_ID); + colorShowBox.style.backgroundColor = color; + } + + /** + * 初始化颜色选择 + */ + SuperMap.prototype.initColorOption = function () { + var self = this; + + // 获取颜色选择器 + function getColorInput(inputId, title, value) { + var colorInput = document.createElement('div'); + colorInput.style.width = '100%'; + colorInput.style.textAlign = 'center'; + + var colorInputInput = document.createElement('input'); + colorInputInput.setAttribute('id', inputId); + colorInputInput.setAttribute('type', 'range'); + colorInputInput.setAttribute('min', 0); + colorInputInput.setAttribute('max', 255); + colorInputInput.setAttribute('value', value); + colorInputInput.style.width = '100px'; + colorInputInput.addEventListener('mousemove', function (event) { + self.colorOption.edit = { + r: document.getElementById(self.colorOption.const.COLOR_R).value, + g: document.getElementById(self.colorOption.const.COLOR_G).value, + b: document.getElementById(self.colorOption.const.COLOR_B).value + } + // 修改区域颜色 + self.setShowColor(); + }); + var titleSpan = document.createElement('span'); + titleSpan.appendChild(document.createTextNode(title)); + colorInput.appendChild(titleSpan); + colorInput.appendChild(colorInputInput); + return colorInput; + } + + // 颜色选BOX + function getColorInputBox() { + var colorInputBox = document.createElement('div'); + colorInputBox.style.display = 'inline-block'; + colorInputBox.style.width = '124px'; + colorInputBox.style.verticalAlign = 'top'; + + var firstColorInput = getColorInput(self.colorOption.const.COLOR_R, '红', self.colorOption.edit.r); + firstColorInput.style.marginTop = '2px'; + colorInputBox.appendChild(firstColorInput); + colorInputBox.appendChild(getColorInput(self.colorOption.const.COLOR_G, '绿', self.colorOption.edit.g)); + colorInputBox.appendChild(getColorInput(self.colorOption.const.COLOR_B, '蓝', self.colorOption.edit.b)); + return colorInputBox; + } + + // 颜色BOX + function getColorBox(colorOptionBox) { + var colorBox = document.createElement('div'); + colorBox.setAttribute('id', self.colorOption.const.COLOR_SHOW_BOX_ID); + colorBox.style.display = 'inline-block'; + colorBox.style.width = '70px'; + colorBox.style.height = '100%'; + colorBox.style.borderRight = '1px solid silver'; + colorBox.style.backgroundColor = self.colorRGBToHex(self.colorOption.edit.r, self.colorOption.edit.g, self.colorOption.edit.b); + return colorBox; + } + + var colorOptionBox = document.createElement('div'); + colorOptionBox.setAttribute('id', self.colorOption.const.COLOR_BOX_ID); + colorOptionBox.style.backgroundColor = '#FFFFFF'; + colorOptionBox.style.display = 'none'; + colorOptionBox.style.width = '210px'; + colorOptionBox.style.height = '70px'; + colorOptionBox.style.border = '1px solid silver'; + colorOptionBox.style.position = 'absolute'; + colorOptionBox.style.top = '0'; + colorOptionBox.style.left = '0'; + colorOptionBox.style.zIndex = 1000; + colorOptionBox.appendChild(getColorBox()); + colorOptionBox.appendChild(getColorInputBox()); + var mapContainer = document.getElementById(this.mapBox); + mapContainer.appendChild(colorOptionBox); + } + + window.SuperMap = SuperMap; + +})(); \ No newline at end of file diff --git a/module-map/src/main/resources/templates/grid/grid/get.html b/module-map/src/main/resources/templates/grid/grid/default/get.html similarity index 100% rename from module-map/src/main/resources/templates/grid/grid/get.html rename to module-map/src/main/resources/templates/grid/grid/default/get.html diff --git a/module-map/src/main/resources/templates/grid/grid/list-select.html b/module-map/src/main/resources/templates/grid/grid/default/list-select.html similarity index 100% rename from module-map/src/main/resources/templates/grid/grid/list-select.html rename to module-map/src/main/resources/templates/grid/grid/default/list-select.html diff --git a/module-map/src/main/resources/templates/grid/grid/list.html b/module-map/src/main/resources/templates/grid/grid/default/list.html similarity index 100% rename from module-map/src/main/resources/templates/grid/grid/list.html rename to module-map/src/main/resources/templates/grid/grid/default/list.html diff --git a/module-map/src/main/resources/templates/grid/grid/save.html b/module-map/src/main/resources/templates/grid/grid/default/save.html similarity index 100% rename from module-map/src/main/resources/templates/grid/grid/save.html rename to module-map/src/main/resources/templates/grid/grid/default/save.html diff --git a/module-map/src/main/resources/templates/grid/grid/update.html b/module-map/src/main/resources/templates/grid/grid/default/update.html similarity index 100% rename from module-map/src/main/resources/templates/grid/grid/update.html rename to module-map/src/main/resources/templates/grid/grid/default/update.html diff --git a/module-map/src/main/resources/templates/grid/grid/user/list.html b/module-map/src/main/resources/templates/grid/grid/default/user/list.html similarity index 100% rename from module-map/src/main/resources/templates/grid/grid/user/list.html rename to module-map/src/main/resources/templates/grid/grid/default/user/list.html diff --git a/module-map/src/main/resources/templates/grid/grid/super-map/get.html b/module-map/src/main/resources/templates/grid/grid/super-map/get.html new file mode 100644 index 00000000..0dd7fe05 --- /dev/null +++ b/module-map/src/main/resources/templates/grid/grid/super-map/get.html @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/module-map/src/main/resources/templates/grid/grid/super-map/list-select.html b/module-map/src/main/resources/templates/grid/grid/super-map/list-select.html new file mode 100644 index 00000000..3a5f9864 --- /dev/null +++ b/module-map/src/main/resources/templates/grid/grid/super-map/list-select.html @@ -0,0 +1,318 @@ + + + + + + + + + + + + + +
+
+
+
+
+
+
+ +
+ + +
+
+
+
+
+
+
+ + + + \ No newline at end of file diff --git a/module-map/src/main/resources/templates/grid/grid/super-map/list.html b/module-map/src/main/resources/templates/grid/grid/super-map/list.html new file mode 100644 index 00000000..edb17709 --- /dev/null +++ b/module-map/src/main/resources/templates/grid/grid/super-map/list.html @@ -0,0 +1,322 @@ + + + + + + + + + + + + + +
+
+
+
+
+
+
+ +
+ +
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/module-map/src/main/resources/templates/grid/grid/super-map/save.html b/module-map/src/main/resources/templates/grid/grid/super-map/save.html new file mode 100644 index 00000000..16d4d254 --- /dev/null +++ b/module-map/src/main/resources/templates/grid/grid/super-map/save.html @@ -0,0 +1,355 @@ + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/module-map/src/main/resources/templates/grid/grid/super-map/update.html b/module-map/src/main/resources/templates/grid/grid/super-map/update.html new file mode 100644 index 00000000..976106a6 --- /dev/null +++ b/module-map/src/main/resources/templates/grid/grid/super-map/update.html @@ -0,0 +1,308 @@ + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/module-map/src/main/resources/templates/grid/grid/super-map/user/list.html b/module-map/src/main/resources/templates/grid/grid/super-map/user/list.html new file mode 100644 index 00000000..c8135d98 --- /dev/null +++ b/module-map/src/main/resources/templates/grid/grid/super-map/user/list.html @@ -0,0 +1,241 @@ + + + + + + + + + + + + + + +
+
+
+
+
+
+ + +
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 772b5144..f115ec0f 100644 --- a/pom.xml +++ b/pom.xml @@ -96,6 +96,7 @@ 3.2.5 2.5.5 2.3.31 + 2.8.5 @@ -545,6 +546,13 @@ + + + com.google.code.gson + gson + ${gson.version} + +