@mapcreator/sdk 0.0.5 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,15 @@
1
+ import { Map as MapLibre } from '@mapcreator/maplibre-gl';
2
+ import { Env, JobObjectAugmented, Mode } from './types';
3
+ declare class MCMapClass {
4
+ map: MapLibre;
5
+ constructor(map: MapLibre);
6
+ }
7
+ export type MCMap = InstanceType<typeof MCMapClass>;
8
+ export declare function init(options: {
9
+ container: HTMLElement | string;
10
+ job: JobObjectAugmented | string;
11
+ accessToken: string;
12
+ mode?: Mode | undefined;
13
+ env?: Env | undefined;
14
+ }): Promise<MCMap>;
15
+ export {};
package/dist/index.d.ts CHANGED
@@ -1,16 +1,2 @@
1
- import { Map as MapLibre } from '@mapcreator/maplibre-gl';
2
- import { Env, JobObjectAugmented, Mode } from './types';
3
- type Options = {
4
- container: HTMLElement | string;
5
- job: JobObjectAugmented | string;
6
- accessToken: string;
7
- mode?: Mode | undefined;
8
- env?: Env | undefined;
9
- };
10
- type MCMap = InstanceType<typeof MCMapClass>;
11
- declare class MCMapClass {
12
- map: MapLibre;
13
- constructor(map: MapLibre);
14
- }
15
- declare function init(options: Options): Promise<MCMap>;
1
+ import { init, MCMap } from './MCMap';
16
2
  export { init, type MCMap };
@@ -34643,8 +34643,8 @@ function $r(e, t) {
34643
34643
  `;
34644
34644
  }
34645
34645
  //#endregion
34646
- //#region src/images/plus.svg
34647
- var ei = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='currentColor'%3e%3cpath%20d='M5.5%201h1v10h-1z'/%3e%3cpath%20d='M1%206.5v-1h10v1z'/%3e%3c/svg%3e", ti = "data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='currentColor'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11%206.144H1v-1h10v1Z'/%3e%3c/svg%3e";
34646
+ //#region src/images/plus.svg?raw
34647
+ var ei = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentColor\"><path d=\"M5.5 1h1v10h-1z\"/><path d=\"M1 6.5v-1h10v1z\"/></svg>\n", ti = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11 6.144H1v-1h10v1Z\"/></svg>\n";
34648
34648
  //#endregion
34649
34649
  //#region src/controls/controls.ts
34650
34650
  function ni(e) {
@@ -34670,8 +34670,8 @@ function ii(e) {
34670
34670
  });
34671
34671
  }
34672
34672
  //#endregion
34673
- //#region src/images/full-screen.svg
34674
- var ai = "data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='currentColor'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.774%206.44a.556.556%200%200%201%20.832.734l-.047.052L2.897%209.89h1.436a.555.555%200%200%201%20.065%201.107L4.333%2011H1.556a.556.556%200%200%201-.552-.49L1%2010.443V7.667a.556.556%200%200%201%201.107-.065l.004.065v1.436l2.663-2.662ZM10.444%201a.555.555%200%200%201%20.552.49l.004.066v2.777a.556.556%200%200%201-1.107.065l-.004-.065V2.897L7.226%205.559a.556.556%200%200%201-.832-.733l.047-.052L9.103%202.11H7.667a.556.556%200%200%201-.065-1.107L7.667%201h2.777Z'/%3e%3c/svg%3e";
34673
+ //#region src/images/full-screen.svg?raw
34674
+ var ai = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M4.774 6.44a.556.556 0 0 1 .832.734l-.047.052L2.897 9.89h1.436a.555.555 0 0 1 .065 1.107L4.333 11H1.556a.556.556 0 0 1-.552-.49L1 10.443V7.667a.556.556 0 0 1 1.107-.065l.004.065v1.436l2.663-2.662ZM10.444 1a.555.555 0 0 1 .552.49l.004.066v2.777a.556.556 0 0 1-1.107.065l-.004-.065V2.897L7.226 5.559a.556.556 0 0 1-.832-.733l.047-.052L9.103 2.11H7.667a.556.556 0 0 1-.065-1.107L7.667 1h2.777Z\"/></svg>\n";
34675
34675
  //#endregion
34676
34676
  //#region src/utils/fullscreen.ts
34677
34677
  function oi() {
@@ -34704,8 +34704,8 @@ function ui(e) {
34704
34704
  });
34705
34705
  }
34706
34706
  //#endregion
34707
- //#region src/images/geolocation.svg
34708
- var di = "data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='currentColor'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M5.571.875V0h.858v.875a5.143%205.143%200%200%201%204.696%204.696H12v.858h-.875a5.143%205.143%200%200%201-4.696%204.696V12H5.57v-.875A5.143%205.143%200%200%201%20.875%206.429H0V5.57h.875A5.143%205.143%200%200%201%205.571.875Zm0%20.86a4.286%204.286%200%200%200-3.835%203.836h.835v.858h-.835a4.286%204.286%200%200%200%203.835%203.835V9.43h.858v.835a4.285%204.285%200%200%200%203.835-3.835H9.43v-.86h.835A4.285%204.285%200%200%200%206.43%201.736v.835h-.86v-.835Zm-.177%203.659a.857.857%200%201%201%201.212%201.212.857.857%200%200%201-1.212-1.212Z'/%3e%3c/svg%3e", fi = "data:image/svg+xml,%3csvg%20width='34'%20viewBox='5%205%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23a)'%20fill='%23343A40'%3e%3cpath%20d='M15.016%2022.656a5.797%205.797%200%200%201-1.016-.46c-2.858-1.65-3.846-5.338-2.196-8.196%201.65-2.858%205.338-3.846%208.196-2.196%202.858%201.65%203.846%205.338%202.196%208.196-.2.346-.434.673-.694.962l2.933%202.72A10.1%2010.1%200%200%200%2025.66%2022c2.75-4.763%201.103-10.91-3.66-13.66S11.09%207.237%208.34%2012%207.237%2022.91%2012%2025.66a9.61%209.61%200%200%200%201.635.748l1.381-3.752Z'/%3e%3cpath%20d='m11.01%2017.183-3.999.06a10.051%2010.051%200%200%200%206.427%209.097l1.484-3.714a6.025%206.025%200%200%201-3.913-5.443Zm13.284%205.183%201-1.732-2.598-1.5-1%201.732%202.598%201.5Zm-3.428-10.062%201.5-2.598-1.732-1-1.5%202.598%201.732%201Zm-9.562%202.562%201-1.732-2.598-1.5-1%201.732%202.598%201.5Z'/%3e%3cpath%20d='m13.366%2025.294%201.5-2.598-1.732-1-1.5%202.598%201.732%201Z'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='%23fff'%20d='m33.393%2012.607-12%2020.784-20.785-12%2012-20.784z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", pi = "data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20filter='url(%23a)'%3e%3ccircle%20cx='16'%20cy='16'%20r='10'%20fill='%23349CF2'/%3e%3ccircle%20cx='16'%20cy='16'%20r='9'%20stroke='%23fff'%20stroke-width='2'/%3e%3c/g%3e%3cdefs%3e%3cfilter%20id='a'%20x='0'%20y='0'%20width='32'%20height='32'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dy='4'/%3e%3cfeGaussianBlur%20stdDeviation='2'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.25%200'/%3e%3cfeBlend%20in2='BackgroundImageFix'%20result='effect1_dropShadow_15_3175'/%3e%3cfeBlend%20in='SourceGraphic'%20in2='effect1_dropShadow_15_3175'%20result='shape'/%3e%3c/filter%3e%3c/defs%3e%3c/svg%3e", mi = (e) => {
34707
+ //#region src/images/geolocation.svg?raw
34708
+ var di = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M5.571.875V0h.858v.875a5.143 5.143 0 0 1 4.696 4.696H12v.858h-.875a5.143 5.143 0 0 1-4.696 4.696V12H5.57v-.875A5.143 5.143 0 0 1 .875 6.429H0V5.57h.875A5.143 5.143 0 0 1 5.571.875Zm0 .86a4.286 4.286 0 0 0-3.835 3.836h.835v.858h-.835a4.286 4.286 0 0 0 3.835 3.835V9.43h.858v.835a4.285 4.285 0 0 0 3.835-3.835H9.43v-.86h.835A4.285 4.285 0 0 0 6.43 1.736v.835h-.86v-.835Zm-.177 3.659a.857.857 0 1 1 1.212 1.212.857.857 0 0 1-1.212-1.212Z\"/></svg>\n", fi = "<svg width=\"34\" viewBox=\"5 5 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#a)\" fill=\"#343A40\"><path d=\"M15.016 22.656a5.797 5.797 0 0 1-1.016-.46c-2.858-1.65-3.846-5.338-2.196-8.196 1.65-2.858 5.338-3.846 8.196-2.196 2.858 1.65 3.846 5.338 2.196 8.196-.2.346-.434.673-.694.962l2.933 2.72A10.1 10.1 0 0 0 25.66 22c2.75-4.763 1.103-10.91-3.66-13.66S11.09 7.237 8.34 12 7.237 22.91 12 25.66a9.61 9.61 0 0 0 1.635.748l1.381-3.752Z\"/><path d=\"m11.01 17.183-3.999.06a10.051 10.051 0 0 0 6.427 9.097l1.484-3.714a6.025 6.025 0 0 1-3.913-5.443Zm13.284 5.183 1-1.732-2.598-1.5-1 1.732 2.598 1.5Zm-3.428-10.062 1.5-2.598-1.732-1-1.5 2.598 1.732 1Zm-9.562 2.562 1-1.732-2.598-1.5-1 1.732 2.598 1.5Z\"/><path d=\"m13.366 25.294 1.5-2.598-1.732-1-1.5 2.598 1.732 1Z\"/></g><defs><clipPath id=\"a\"><path fill=\"#fff\" d=\"m33.393 12.607-12 20.784-20.785-12 12-20.784z\"/></clipPath></defs></svg>\n", pi = "<svg width=\"32\" height=\"32\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><g filter=\"url(#a)\"><circle cx=\"16\" cy=\"16\" r=\"10\" fill=\"#349CF2\"/><circle cx=\"16\" cy=\"16\" r=\"9\" stroke=\"#fff\" stroke-width=\"2\"/></g><defs><filter id=\"a\" x=\"0\" y=\"0\" width=\"32\" height=\"32\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/><feColorMatrix in=\"SourceAlpha\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/><feOffset dy=\"4\"/><feGaussianBlur stdDeviation=\"2\"/><feComposite in2=\"hardAlpha\" operator=\"out\"/><feColorMatrix values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"/><feBlend in2=\"BackgroundImageFix\" result=\"effect1_dropShadow_15_3175\"/><feBlend in=\"SourceGraphic\" in2=\"effect1_dropShadow_15_3175\" result=\"shape\"/></filter></defs></svg>\n", mi = (e) => {
34709
34709
  let t = 2 * window.devicePixelRatio, n = new Er(e).getMapLibreImageKey(pi, t);
34710
34710
  e.setLayoutProperty("location-dot", "icon-image", n);
34711
34711
  }, hi = (e) => {
@@ -34818,8 +34818,8 @@ function yi(e) {
34818
34818
  });
34819
34819
  }
34820
34820
  //#endregion
34821
- //#region src/images/refresh.svg
34822
- var bi = "data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='currentColor'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.155%201.146A.546.546%200%200%201%206.53%201c.14%200%20.275.053.375.146l1.588%201.5c.1.094.155.221.155.354%200%20.132-.056.26-.155.353l-1.588%201.5a.546.546%200%200%201-.373.14.545.545%200%200%201-.37-.146.487.487%200%200%201-.154-.349.486.486%200%200%201%20.148-.352L6.84%203.5H6c-1.878%200-3.441%201.476-3.441%203.25S4.122%2010%206%2010s3.441-1.476%203.441-3.25c0-.133.056-.26.155-.354a.546.546%200%200%201%20.375-.146c.14%200%20.275.053.374.146.1.094.155.221.155.354C10.5%209.076%208.463%2011%206%2011S1.5%209.076%201.5%206.75%203.537%202.5%206%202.5h.84l-.685-.647A.486.486%200%200%201%206%201.5c0-.133.056-.26.155-.354Z'/%3e%3c/svg%3e";
34821
+ //#region src/images/refresh.svg?raw
34822
+ var bi = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6.155 1.146A.546.546 0 0 1 6.53 1c.14 0 .275.053.375.146l1.588 1.5c.1.094.155.221.155.354 0 .132-.056.26-.155.353l-1.588 1.5a.546.546 0 0 1-.373.14.545.545 0 0 1-.37-.146.487.487 0 0 1-.154-.349.486.486 0 0 1 .148-.352L6.84 3.5H6c-1.878 0-3.441 1.476-3.441 3.25S4.122 10 6 10s3.441-1.476 3.441-3.25c0-.133.056-.26.155-.354a.546.546 0 0 1 .375-.146c.14 0 .275.053.374.146.1.094.155.221.155.354C10.5 9.076 8.463 11 6 11S1.5 9.076 1.5 6.75 3.537 2.5 6 2.5h.84l-.685-.647A.486.486 0 0 1 6 1.5c0-.133.056-.26.155-.354Z\"/></svg>\n";
34823
34823
  //#endregion
34824
34824
  //#region src/controls/refreshMapControls.ts
34825
34825
  function xi(e, t) {
@@ -34843,8 +34843,8 @@ function xi(e, t) {
34843
34843
  });
34844
34844
  }
34845
34845
  //#endregion
34846
- //#region src/images/search.svg
34847
- var Si = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='currentColor'%3e%3cpath%20d='M5.374.952a4.546%204.546%200%200%201%204.656%204.175%204.55%204.55%200%200%201-.958%203.184l1.824%201.81a.55.55%200%200%201%200%20.765.55.55%200%200%201-.602.121.6.6%200%200%201-.179-.12l-1.807-1.81A4.544%204.544%200%200%201%20.953%205.376%204.553%204.553%200%200%201%205.374.952m1.454%201.37a3.447%203.447%200%200%200-4.505%204.51%203.45%203.45%200%200%200%203.186%202.13A3.45%203.45%200%200%200%208.957%205.51a3.455%203.455%200%200%200-2.129-3.187'/%3e%3c/svg%3e", Ci = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='currentColor'%3e%3cpath%20d='m7.038%205.96%203.03%203.03L13.1%205.958l1.01%201.01L11.078%2010l3.031%203.032-1.01%201.01-3.031-3.031-3.03%203.028-1.01-1.01L9.059%2010l-3.03-3.03z'/%3e%3c/svg%3e", wi = {
34846
+ //#region src/images/search.svg?raw
34847
+ var Si = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentColor\"><path d=\"M5.374.952a4.546 4.546 0 0 1 4.656 4.175 4.55 4.55 0 0 1-.958 3.184l1.824 1.81a.55.55 0 0 1 0 .765.55.55 0 0 1-.602.121.6.6 0 0 1-.179-.12l-1.807-1.81A4.544 4.544 0 0 1 .953 5.376 4.553 4.553 0 0 1 5.374.952m1.454 1.37a3.447 3.447 0 0 0-4.505 4.51 3.45 3.45 0 0 0 3.186 2.13A3.45 3.45 0 0 0 8.957 5.51a3.455 3.455 0 0 0-2.129-3.187\"/></svg>\n", Ci = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"currentColor\"><path d=\"m7.038 5.96 3.03 3.03L13.1 5.958l1.01 1.01L11.078 10l3.031 3.032-1.01 1.01-3.031-3.031-3.03 3.028-1.01-1.01L9.059 10l-3.03-3.03z\"/></svg>\n", wi = {
34848
34848
  da_DK: {
34849
34849
  search: "Search",
34850
34850
  videoAlert: "The video will only work when you publish the map",
@@ -38681,8 +38681,8 @@ async function ll(e, t, n) {
38681
38681
  }
38682
38682
  }
38683
38683
  //#endregion
38684
- //#region src/images/popup-previous.svg
38685
- var ul = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='6'%20height='10'%20viewBox='0%200%206%2010'%20fill='currentColor'%3e%3cpath%20d='m0%204.647%204.282%204.4a.814.814%200%200%200%201.166-1.134L2.27%204.647l3.178-3.266A.814.814%200%201%200%204.282.246z'/%3e%3c/svg%3e", dl = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='10'%20height='11'%20viewBox='0%200%2010%2011'%20fill='currentColor'%3e%3cpath%20d='M.21.71a.714.714%200%200%201%201.011%200l3.78%203.78L8.778.71a.715.715%200%200%201%201.013%201.01L6.01%205.501l3.78%203.778a.715.715%200%200%201-1.01%201.012L5%206.51l-3.779%203.78A.716.716%200%200%201%20.21%209.28L3.99%205.5.21%201.721A.714.714%200%200%201%20.21.71'/%3e%3c/svg%3e", fl = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='6'%20height='10'%20viewBox='0%200%206%2010'%20fill='currentColor'%3e%3cpath%20d='m5.678%204.647-4.282%204.4A.814.814%200%201%201%20.23%207.914l3.177-3.266L.23%201.381A.814.814%200%201%201%201.396.246z'/%3e%3c/svg%3e", pl = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2040%2040'%20stroke='currentColor'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20%204.167%201.667%2035.834h36.667z'%20stroke-width='2'%20stroke-linejoin='round'/%3e%3cpath%20d='M20%2029.167v.834m0-14.167.007%208.333'%20stroke-width='2'%20stroke-linecap='round'/%3e%3c/svg%3e";
38684
+ //#region src/images/popup-previous.svg?raw
38685
+ var ul = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"6\" height=\"10\" viewBox=\"0 0 6 10\" fill=\"currentColor\"><path d=\"m0 4.647 4.282 4.4a.814.814 0 0 0 1.166-1.134L2.27 4.647l3.178-3.266A.814.814 0 1 0 4.282.246z\"/></svg>\n", dl = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"11\" viewBox=\"0 0 10 11\" fill=\"currentColor\"><path d=\"M.21.71a.714.714 0 0 1 1.011 0l3.78 3.78L8.778.71a.715.715 0 0 1 1.013 1.01L6.01 5.501l3.78 3.778a.715.715 0 0 1-1.01 1.012L5 6.51l-3.779 3.78A.716.716 0 0 1 .21 9.28L3.99 5.5.21 1.721A.714.714 0 0 1 .21.71\"/></svg>\n", fl = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"6\" height=\"10\" viewBox=\"0 0 6 10\" fill=\"currentColor\"><path d=\"m5.678 4.647-4.282 4.4A.814.814 0 1 1 .23 7.914l3.177-3.266L.23 1.381A.814.814 0 1 1 1.396.246z\"/></svg>\n", pl = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 40 40\" stroke=\"currentColor\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M20 4.167 1.667 35.834h36.667z\" stroke-width=\"2\" stroke-linejoin=\"round\"/><path d=\"M20 29.167v.834m0-14.167.007 8.333\" stroke-width=\"2\" stroke-linecap=\"round\"/></svg>\n";
38686
38686
  //#endregion
38687
38687
  //#region src/utils/youtube.ts
38688
38688
  function ml(e, t) {
@@ -39456,7 +39456,7 @@ function Nl(e, t) {
39456
39456
  };
39457
39457
  }
39458
39458
  //#endregion
39459
- //#region src/index.ts
39459
+ //#region src/MCMap.ts
39460
39460
  var Pl = class {
39461
39461
  map;
39462
39462
  constructor(e) {
@@ -904,10 +904,19 @@ vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matr
904
904
  </g>
905
905
  </g>
906
906
  </svg>
907
- `}var ti=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='currentColor'%3e%3cpath%20d='M5.5%201h1v10h-1z'/%3e%3cpath%20d='M1%206.5v-1h10v1z'/%3e%3c/svg%3e`,ni=`data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='currentColor'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11%206.144H1v-1h10v1Z'/%3e%3c/svg%3e`;function ri(e){let t=document.createElement(`button`);return t.className=e.className,t.innerHTML=`${e.content}`,t.addEventListener(`click`,e.onClick),t}function ii(e){return ri({type:`button`,className:`control-button zoom-in-button`,content:ti,onClick:()=>e.zoomIn()})}function ai(e){return ri({type:`button`,className:`control-button zoom-out-button`,content:ni,onClick:()=>e.zoomOut()})}var oi=`data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='currentColor'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.774%206.44a.556.556%200%200%201%20.832.734l-.047.052L2.897%209.89h1.436a.555.555%200%200%201%20.065%201.107L4.333%2011H1.556a.556.556%200%200%201-.552-.49L1%2010.443V7.667a.556.556%200%200%201%201.107-.065l.004.065v1.436l2.663-2.662ZM10.444%201a.555.555%200%200%201%20.552.49l.004.066v2.777a.556.556%200%200%201-1.107.065l-.004-.065V2.897L7.226%205.559a.556.556%200%200%201-.832-.733l.047-.052L9.103%202.11H7.667a.556.556%200%200%201-.065-1.107L7.667%201h2.777Z'/%3e%3c/svg%3e`;function si(){return!!(document.fullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled)}function ci(e){return document.fullscreenElement===e||document.webkitFullscreenElement===e||document.mozFullScreenElement===e||document.msFullscreenElement===e}function li(e){e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen?e.msRequestFullscreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()}function ui(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()}function di(e){return ri({type:`button`,className:`control-button fullscreen-control-button`,content:oi,onClick:()=>{let t=e.getContainer();if(si())ci(t)?ui():li(t);else{let e=document.location.href;e+=e.includes(`?`)?`&`:`?`,e+=`close-tab`,window.open(e,`_blank`)}}})}var fi=`data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='currentColor'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M5.571.875V0h.858v.875a5.143%205.143%200%200%201%204.696%204.696H12v.858h-.875a5.143%205.143%200%200%201-4.696%204.696V12H5.57v-.875A5.143%205.143%200%200%201%20.875%206.429H0V5.57h.875A5.143%205.143%200%200%201%205.571.875Zm0%20.86a4.286%204.286%200%200%200-3.835%203.836h.835v.858h-.835a4.286%204.286%200%200%200%203.835%203.835V9.43h.858v.835a4.285%204.285%200%200%200%203.835-3.835H9.43v-.86h.835A4.285%204.285%200%200%200%206.43%201.736v.835h-.86v-.835Zm-.177%203.659a.857.857%200%201%201%201.212%201.212.857.857%200%200%201-1.212-1.212Z'/%3e%3c/svg%3e`,pi=`data:image/svg+xml,%3csvg%20width='34'%20viewBox='5%205%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23a)'%20fill='%23343A40'%3e%3cpath%20d='M15.016%2022.656a5.797%205.797%200%200%201-1.016-.46c-2.858-1.65-3.846-5.338-2.196-8.196%201.65-2.858%205.338-3.846%208.196-2.196%202.858%201.65%203.846%205.338%202.196%208.196-.2.346-.434.673-.694.962l2.933%202.72A10.1%2010.1%200%200%200%2025.66%2022c2.75-4.763%201.103-10.91-3.66-13.66S11.09%207.237%208.34%2012%207.237%2022.91%2012%2025.66a9.61%209.61%200%200%200%201.635.748l1.381-3.752Z'/%3e%3cpath%20d='m11.01%2017.183-3.999.06a10.051%2010.051%200%200%200%206.427%209.097l1.484-3.714a6.025%206.025%200%200%201-3.913-5.443Zm13.284%205.183%201-1.732-2.598-1.5-1%201.732%202.598%201.5Zm-3.428-10.062%201.5-2.598-1.732-1-1.5%202.598%201.732%201Zm-9.562%202.562%201-1.732-2.598-1.5-1%201.732%202.598%201.5Z'/%3e%3cpath%20d='m13.366%2025.294%201.5-2.598-1.732-1-1.5%202.598%201.732%201Z'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='%23fff'%20d='m33.393%2012.607-12%2020.784-20.785-12%2012-20.784z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e`,mi=`data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20filter='url(%23a)'%3e%3ccircle%20cx='16'%20cy='16'%20r='10'%20fill='%23349CF2'/%3e%3ccircle%20cx='16'%20cy='16'%20r='9'%20stroke='%23fff'%20stroke-width='2'/%3e%3c/g%3e%3cdefs%3e%3cfilter%20id='a'%20x='0'%20y='0'%20width='32'%20height='32'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dy='4'/%3e%3cfeGaussianBlur%20stdDeviation='2'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.25%200'/%3e%3cfeBlend%20in2='BackgroundImageFix'%20result='effect1_dropShadow_15_3175'/%3e%3cfeBlend%20in='SourceGraphic'%20in2='effect1_dropShadow_15_3175'%20result='shape'/%3e%3c/filter%3e%3c/defs%3e%3c/svg%3e`,hi=e=>{let t=2*window.devicePixelRatio,n=new Dr(e).getMapLibreImageKey(mi,t);e.setLayoutProperty(`location-dot`,`icon-image`,n)},gi=e=>{e.getSource(`location-circle`)||e.addSource(`location-circle`,{type:`geojson`,data:{type:`FeatureCollection`,features:[]}}),e.getSource(`location-dot`)||e.addSource(`location-dot`,{type:`geojson`,data:{type:`Feature`,geometry:{type:`Point`,coordinates:[]},properties:{}}}),e.getLayer(`location-circle`)||e.addLayer({id:`location-circle`,type:`fill`,source:`location-circle`,layout:{},paint:{"fill-color":`#349CF2`,"fill-opacity":.15,"fill-outline-color":`#005196`}},`mc-before-names`),e.getLayer(`location-dot`)||e.addLayer({id:`location-dot`,type:`symbol`,source:`location-dot`,layout:{"icon-padding":0},paint:{"icon-opacity":1},metadata:{"mc-name":`location dot`,"mc-skip-load":!0}},`mc-before-names`),hi(e)},_i=(e,t,n)=>{let r=e.getSource(`location-dot`);r&&r.setData({type:`Feature`,geometry:{type:`Point`,coordinates:[t,n]},properties:{}})},vi=(e,t,n)=>{let r=n/1e3,i=[],a=r/(111.32*Math.cos(t*Math.PI/180)),o=r/110.574;for(let n=0;n<64;n++){let r=n/64*(2*Math.PI),s=a*Math.cos(r),c=o*Math.sin(r);i.push([e+s,t+c])}return i.push(i[0]),{type:`FeatureCollection`,features:[{type:`Feature`,geometry:{type:`Polygon`,coordinates:[i]}}]}},yi=()=>{let e=document.querySelector(`.map`),t=document.createElement(`div`);t.classList.add(`location-notification`),t.textContent=`Geolocation is not available`,e?.appendChild(t),setTimeout(()=>{e?.removeChild(t)},3e3)};function bi(e){let t=!1,n=e=>{let n=document.querySelector(`.geolocation-button`),r=n?.querySelector(`.geolocation-icon`),i=n?.querySelector(`.locating-icon`);r&&i&&(r.classList.toggle(`active`,!e),i.classList.toggle(`active`,e)),t=e},r=t=>{let{longitude:r,latitude:i,accuracy:a}=t.coords,o=[r,i];e.easeTo?e.easeTo({center:o,zoom:19,duration:1e3}):e.setCenter&&e.setCenter(o);let s=e.getSource(`location-circle`);s&&s.setData(vi(r,i,a/2)),_i(e,r,i),e.once(`moveend`,()=>n(!1))},i=e=>{console.error(`Geolocation error:`,e),n(!1)};return ri({type:`button`,className:`control-button geolocation-button`,content:`
907
+ `}var ti=`<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="currentColor"><path d="M5.5 1h1v10h-1z"/><path d="M1 6.5v-1h10v1z"/></svg>
908
+ `,ni=`<svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M11 6.144H1v-1h10v1Z"/></svg>
909
+ `;function ri(e){let t=document.createElement(`button`);return t.className=e.className,t.innerHTML=`${e.content}`,t.addEventListener(`click`,e.onClick),t}function ii(e){return ri({type:`button`,className:`control-button zoom-in-button`,content:ti,onClick:()=>e.zoomIn()})}function ai(e){return ri({type:`button`,className:`control-button zoom-out-button`,content:ni,onClick:()=>e.zoomOut()})}var oi=`<svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M4.774 6.44a.556.556 0 0 1 .832.734l-.047.052L2.897 9.89h1.436a.555.555 0 0 1 .065 1.107L4.333 11H1.556a.556.556 0 0 1-.552-.49L1 10.443V7.667a.556.556 0 0 1 1.107-.065l.004.065v1.436l2.663-2.662ZM10.444 1a.555.555 0 0 1 .552.49l.004.066v2.777a.556.556 0 0 1-1.107.065l-.004-.065V2.897L7.226 5.559a.556.556 0 0 1-.832-.733l.047-.052L9.103 2.11H7.667a.556.556 0 0 1-.065-1.107L7.667 1h2.777Z"/></svg>
910
+ `;function si(){return!!(document.fullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled)}function ci(e){return document.fullscreenElement===e||document.webkitFullscreenElement===e||document.mozFullScreenElement===e||document.msFullscreenElement===e}function li(e){e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen?e.msRequestFullscreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()}function ui(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()}function di(e){return ri({type:`button`,className:`control-button fullscreen-control-button`,content:oi,onClick:()=>{let t=e.getContainer();if(si())ci(t)?ui():li(t);else{let e=document.location.href;e+=e.includes(`?`)?`&`:`?`,e+=`close-tab`,window.open(e,`_blank`)}}})}var fi=`<svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M5.571.875V0h.858v.875a5.143 5.143 0 0 1 4.696 4.696H12v.858h-.875a5.143 5.143 0 0 1-4.696 4.696V12H5.57v-.875A5.143 5.143 0 0 1 .875 6.429H0V5.57h.875A5.143 5.143 0 0 1 5.571.875Zm0 .86a4.286 4.286 0 0 0-3.835 3.836h.835v.858h-.835a4.286 4.286 0 0 0 3.835 3.835V9.43h.858v.835a4.285 4.285 0 0 0 3.835-3.835H9.43v-.86h.835A4.285 4.285 0 0 0 6.43 1.736v.835h-.86v-.835Zm-.177 3.659a.857.857 0 1 1 1.212 1.212.857.857 0 0 1-1.212-1.212Z"/></svg>
911
+ `,pi=`<svg width="34" viewBox="5 5 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#a)" fill="#343A40"><path d="M15.016 22.656a5.797 5.797 0 0 1-1.016-.46c-2.858-1.65-3.846-5.338-2.196-8.196 1.65-2.858 5.338-3.846 8.196-2.196 2.858 1.65 3.846 5.338 2.196 8.196-.2.346-.434.673-.694.962l2.933 2.72A10.1 10.1 0 0 0 25.66 22c2.75-4.763 1.103-10.91-3.66-13.66S11.09 7.237 8.34 12 7.237 22.91 12 25.66a9.61 9.61 0 0 0 1.635.748l1.381-3.752Z"/><path d="m11.01 17.183-3.999.06a10.051 10.051 0 0 0 6.427 9.097l1.484-3.714a6.025 6.025 0 0 1-3.913-5.443Zm13.284 5.183 1-1.732-2.598-1.5-1 1.732 2.598 1.5Zm-3.428-10.062 1.5-2.598-1.732-1-1.5 2.598 1.732 1Zm-9.562 2.562 1-1.732-2.598-1.5-1 1.732 2.598 1.5Z"/><path d="m13.366 25.294 1.5-2.598-1.732-1-1.5 2.598 1.732 1Z"/></g><defs><clipPath id="a"><path fill="#fff" d="m33.393 12.607-12 20.784-20.785-12 12-20.784z"/></clipPath></defs></svg>
912
+ `,mi=`<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><g filter="url(#a)"><circle cx="16" cy="16" r="10" fill="#349CF2"/><circle cx="16" cy="16" r="9" stroke="#fff" stroke-width="2"/></g><defs><filter id="a" x="0" y="0" width="32" height="32" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dy="4"/><feGaussianBlur stdDeviation="2"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_15_3175"/><feBlend in="SourceGraphic" in2="effect1_dropShadow_15_3175" result="shape"/></filter></defs></svg>
913
+ `,hi=e=>{let t=2*window.devicePixelRatio,n=new Dr(e).getMapLibreImageKey(mi,t);e.setLayoutProperty(`location-dot`,`icon-image`,n)},gi=e=>{e.getSource(`location-circle`)||e.addSource(`location-circle`,{type:`geojson`,data:{type:`FeatureCollection`,features:[]}}),e.getSource(`location-dot`)||e.addSource(`location-dot`,{type:`geojson`,data:{type:`Feature`,geometry:{type:`Point`,coordinates:[]},properties:{}}}),e.getLayer(`location-circle`)||e.addLayer({id:`location-circle`,type:`fill`,source:`location-circle`,layout:{},paint:{"fill-color":`#349CF2`,"fill-opacity":.15,"fill-outline-color":`#005196`}},`mc-before-names`),e.getLayer(`location-dot`)||e.addLayer({id:`location-dot`,type:`symbol`,source:`location-dot`,layout:{"icon-padding":0},paint:{"icon-opacity":1},metadata:{"mc-name":`location dot`,"mc-skip-load":!0}},`mc-before-names`),hi(e)},_i=(e,t,n)=>{let r=e.getSource(`location-dot`);r&&r.setData({type:`Feature`,geometry:{type:`Point`,coordinates:[t,n]},properties:{}})},vi=(e,t,n)=>{let r=n/1e3,i=[],a=r/(111.32*Math.cos(t*Math.PI/180)),o=r/110.574;for(let n=0;n<64;n++){let r=n/64*(2*Math.PI),s=a*Math.cos(r),c=o*Math.sin(r);i.push([e+s,t+c])}return i.push(i[0]),{type:`FeatureCollection`,features:[{type:`Feature`,geometry:{type:`Polygon`,coordinates:[i]}}]}},yi=()=>{let e=document.querySelector(`.map`),t=document.createElement(`div`);t.classList.add(`location-notification`),t.textContent=`Geolocation is not available`,e?.appendChild(t),setTimeout(()=>{e?.removeChild(t)},3e3)};function bi(e){let t=!1,n=e=>{let n=document.querySelector(`.geolocation-button`),r=n?.querySelector(`.geolocation-icon`),i=n?.querySelector(`.locating-icon`);r&&i&&(r.classList.toggle(`active`,!e),i.classList.toggle(`active`,e)),t=e},r=t=>{let{longitude:r,latitude:i,accuracy:a}=t.coords,o=[r,i];e.easeTo?e.easeTo({center:o,zoom:19,duration:1e3}):e.setCenter&&e.setCenter(o);let s=e.getSource(`location-circle`);s&&s.setData(vi(r,i,a/2)),_i(e,r,i),e.once(`moveend`,()=>n(!1))},i=e=>{console.error(`Geolocation error:`,e),n(!1)};return ri({type:`button`,className:`control-button geolocation-button`,content:`
908
914
  <div class="location-icon geolocation-icon active">${fi}</div>
909
915
  <div class="location-icon locating-icon">${pi}</div>
910
- `,onClick:()=>{if(!t){if(e.getSource(`location-circle`)||gi(e),n(!0),!navigator.geolocation){yi(),n(!1);return}navigator.geolocation.getCurrentPosition(r,i,{maximumAge:6e4,timeout:5e3})}}})}var xi=`data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='currentColor'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.155%201.146A.546.546%200%200%201%206.53%201c.14%200%20.275.053.375.146l1.588%201.5c.1.094.155.221.155.354%200%20.132-.056.26-.155.353l-1.588%201.5a.546.546%200%200%201-.373.14.545.545%200%200%201-.37-.146.487.487%200%200%201-.154-.349.486.486%200%200%201%20.148-.352L6.84%203.5H6c-1.878%200-3.441%201.476-3.441%203.25S4.122%2010%206%2010s3.441-1.476%203.441-3.25c0-.133.056-.26.155-.354a.546.546%200%200%201%20.375-.146c.14%200%20.275.053.374.146.1.094.155.221.155.354C10.5%209.076%208.463%2011%206%2011S1.5%209.076%201.5%206.75%203.537%202.5%206%202.5h.84l-.685-.647A.486.486%200%200%201%206%201.5c0-.133.056-.26.155-.354Z'/%3e%3c/svg%3e`;function Si(e,t){return ri({type:`button`,className:`control-button refresh-button`,content:xi,onClick:()=>{let n=e.getContainer(),r=0;if(n.clientWidth>0&&n.clientHeight>0){let e=Math.min(n.clientWidth/t.width,n.clientHeight/t.height);r=Math.log(e)/Math.LN2}e.easeTo({center:t.center,zoom:t.zoom-t.detailLevel+r,pitch:t.pitch,bearing:t.rotation})}})}var Ci=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='currentColor'%3e%3cpath%20d='M5.374.952a4.546%204.546%200%200%201%204.656%204.175%204.55%204.55%200%200%201-.958%203.184l1.824%201.81a.55.55%200%200%201%200%20.765.55.55%200%200%201-.602.121.6.6%200%200%201-.179-.12l-1.807-1.81A4.544%204.544%200%200%201%20.953%205.376%204.553%204.553%200%200%201%205.374.952m1.454%201.37a3.447%203.447%200%200%200-4.505%204.51%203.45%203.45%200%200%200%203.186%202.13A3.45%203.45%200%200%200%208.957%205.51a3.455%203.455%200%200%200-2.129-3.187'/%3e%3c/svg%3e`,wi=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='currentColor'%3e%3cpath%20d='m7.038%205.96%203.03%203.03L13.1%205.958l1.01%201.01L11.078%2010l3.031%203.032-1.01%201.01-3.031-3.031-3.03%203.028-1.01-1.01L9.059%2010l-3.03-3.03z'/%3e%3c/svg%3e`,Ti={da_DK:{search:`Search`,videoAlert:`The video will only work when you publish the map`,mobileHelpText:`Use two fingers to move the map`,windowsHelpText:`Use Ctrl + scroll to zoom the map`,macHelpText:`Use ⌘ + scroll to zoom the map`},de_DE:{search:`Suche`,videoAlert:`Das Video ist in der veröffentlichten Karte sichtbar.`,mobileHelpText:`Verwenden Sie zwei Finger um die Karte zu bewegen`,windowsHelpText:`Verwenden Sie Strg + Scroll um in der Karte zu zoomen`,macHelpText:`Verwenden Sie ⌘ + Scroll um in der Karte zu zoomen`},en_GB:{search:`Search`,videoAlert:`The video will only work when you publish the map`,mobileHelpText:`Use two fingers to move the map`,windowsHelpText:`Use Ctrl + scroll to zoom the map`,macHelpText:`Use ⌘ + scroll to zoom the map`},es_ES:{search:`Buscar`,videoAlert:`The video will only work when you publish the map`,mobileHelpText:`Use dos dedos para mover el mapa`,windowsHelpText:`Use Ctrl + desplazamiento para hacer zoom en el mapa`,macHelpText:`Use ⌘ + desplazamiento para hacer zoom en el mapa`},fr_FR:{search:`Rechercher`,videoAlert:`Votre vidéo sera diffusée sur la carte publiée`,mobileHelpText:`Utilisez deux doigts pour déplacer la carte`,windowsHelpText:`Utilisez Ctrl + défilement pour zoomer sur la carte`,macHelpText:`Utilisez ⌘ + défilement pour zoomer sur la carte`},it_IT:{search:`Cercare`,videoAlert:`The video will only work when you publish the map`,mobileHelpText:`Usa due dita per muovere la mappa`,windowsHelpText:`Usa Ctrl + Scroll per ingrandire la mappa`,macHelpText:`Usa ⌘ + Scroll per ingrandire la mappa`},nl_NL:{search:`Zoeken`,videoAlert:`The video will only work when you publish the map`,mobileHelpText:`Gebruik twee vingers om de kaart te bewegen`,windowsHelpText:`Gebruik Ctrl + Scroll om de kaart te zoomen`,macHelpText:`Gebruik ⌘ + Scroll om de kaart te zoomen`}};function Ei(){let e=navigator.language.replace(`-`,`_`),t=Object.keys(Ti);return t.find(t=>t===e)??t.find(t=>t.split(`_`)[0]===e.split(`_`)[0])??`en_GB`}var Di=Ei();function Oi(e){return Ti[Di][e]??e}var ki=class{async getLocationInBounds(e,t,n=10){try{let r=await this._callGraphHopper({limit:n,q:e,point:`${t.lat},${t.lng}`});return this._mapResults(r.hits)}catch(e){return console.warn(`Geocoding failed: `,e),[]}}async _callGraphHopper(e){let t=new URLSearchParams(e);t.append(`key`,`c5c40ac9-ed73-4e20-aed6-cfe495604ca8`),t.append(`locale`,Di.slice(0,2));let n={headers:{Accept:`application/json`}},r=`https://graphhopper.com/api/1/geocode?${t}`;return await(await fetch(r,n)).json()}_mapResults(e){return e.map(e=>({id:e.osm_id.toString(),labelTitle:e.name,position:{lng:e.point.lng,lat:e.point.lat},bbox:e.extent?[{lng:e.extent[0],lat:e.extent[1]},{lng:e.extent[2],lat:e.extent[3]}]:null,subtitle:[e.osm_value,e.city,e.state,e.country].filter(Boolean).join(`, `)}))}},Ai=class{map;mapContainer;container;control;input;dropdown;inputWrapper;button;isOpen=!1;geocoder=new ki;suggestions=[];items=[];index=0;debounce;constructor(e){this.map=e,this.container=document.createElement(`div`),this.control=document.createElement(`div`),this.input=document.createElement(`input`),this.dropdown=document.createElement(`div`),this.inputWrapper=document.createElement(`div`),this.button=document.createElement(`button`),this.mapContainer=this.map.getContainer()}init(){this.container.className=`geocoder-container`,this.control.className=`geocoder-control`,this.input.className=`geocoder-input`,this.dropdown.className=`geocoder-dropdown`,this.inputWrapper.className=`geocoder-input-wrapper`,this.button.className=`control-button`,this.input.type=`text`,this.input.placeholder=Oi(`search`),this.button.innerHTML=Ci;let e=document.createElement(`button`);e.className=`geocoder-clear`,e.innerHTML=wi;let t=document.createElement(`div`);return t.className=`geocoder-scrollwrapper`,t.append(this.dropdown),this.inputWrapper.append(this.input,e),this.control.append(this.button,this.inputWrapper,t),e.addEventListener(`click`,()=>this.clearAll()),this.button.addEventListener(`click`,()=>this.toggle()),this.input.addEventListener(`input`,()=>this.onInput()),this.input.addEventListener(`keydown`,e=>this.onKeyDown(e)),this.dropdown.addEventListener(`mousemove`,e=>this.onMouseMove(e)),this.mapContainer.addEventListener(`mousedown`,e=>this.clickOutside(e)),window.addEventListener(`resize`,()=>this.setMaxSizes()),this.setMaxSizes(),this.updateVisibility(),this.container.append(this.control),this.container}clickOutside(e){e.target instanceof Node&&!this.control.contains(e.target)&&this.hide()}setMaxSizes(){let{width:e,height:t}=this.mapContainer.getBoundingClientRect();this.control.style.maxWidth=`${e-40}px`,this.dropdown.style.maxHeight=`${Math.min(310,t-63)}px`}toggle(){this.isOpen=!this.isOpen,this.button.classList.toggle(`open`),this.updateVisibility(),this.isOpen&&this.input.focus()}hide(){this.isOpen&&(this.isOpen=!1,this.button.classList.remove(`open`),this.updateVisibility())}clearDropdown(){this.suggestions=[],this.items=[],this.dropdown.innerHTML=``}clearAll(){this.input.value=``,this.clearDropdown()}updateVisibility(){let e=this.isOpen;this.inputWrapper.style.display=e?`flex`:`none`,e||this.clearAll()}onInput(){let e=this.input.value.trim();if(this.debounce&&clearTimeout(this.debounce),e.length<2){this.dropdown.innerHTML=``;return}this.debounce=window.setTimeout(async()=>{this.suggestions=await this.geocoder.getLocationInBounds(e,this.map.getCenter(),20),this.items=[],this.renderSuggestions()},200)}renderSuggestions(){this.dropdown.innerHTML=``,this.items=[],this.index=0,this.suggestions.forEach(e=>{let t=document.createElement(`div`),n=document.createElement(`div`),r=document.createElement(`div`);t.className=`geocoder-suggestion`,n.className=`title`,r.className=`subtitle`,n.textContent=e.labelTitle,r.textContent=e.subtitle,t.append(n,r),t.addEventListener(`mousedown`,t=>{t.stopPropagation(),this.goToSelection(e)}),this.dropdown.appendChild(t),this.items.push({data:e,el:t})}),this.updateHighlight()}updateHighlight(){this.items.forEach((e,t)=>{e.el.classList.toggle(`highlight`,t===this.index)})}onKeyDown(e){if(e.key===`ArrowUp`)e.preventDefault(),this.index--,this.index<0&&(this.index=this.items.length-1),this.adjustScroll();else if(e.key===`ArrowDown`)e.preventDefault(),this.index++,this.index>this.items.length-1&&(this.index=0),this.adjustScroll();else if(e.key===`Enter`){e.preventDefault();let t=this.items[this.index];t&&this.goToSelection(t.data)}else e.key===`Escape`&&(e.preventDefault(),this.hide());this.updateHighlight()}onMouseMove(e){let t=e.target.closest(`.geocoder-suggestion`);this.index=this.items.findIndex(e=>e.el===t),this.updateHighlight()}goToSelection(e){e.bbox?this.map.fitBounds(e.bbox,{duration:0,animate:!1}):this.map.jumpTo({center:e.position,zoom:16}),this.input.value=e.labelTitle,this.clearDropdown()}adjustScroll(){let e=this.items[this.index].el,t=this.dropdown,n=t.getBoundingClientRect(),r=e.getBoundingClientRect();r.bottom>n.bottom?t.scrollTop+=r.bottom-n.bottom:r.top<n.top&&(t.scrollTop+=r.top-n.top)}};function ji(e,t,n){let r=document.createElement(`div`);r.classList.add(`web-control`,`adornment`);let i=e.buttons.flatMap(e=>e===`zoom`?[`zoomIn`,`zoomOut`]:e);return(pr()?i.filter(e=>e!==`zoomIn`&&e!==`zoomOut`):i).forEach(e=>{let i;if(e===`zoomIn`)i=ii(t);else if(e===`zoomOut`)i=ai(t);else if(e===`fullscreen`)i=di(t);else if(e===`geolocation`)i=bi(t);else if(e===`refresh`)i=Si(t,n);else if(e===`search`)i=new Ai(t).init();else return;r.appendChild(i)}),r}function Mi(e){return Mn(e,(e,t)=>e+Ni(t),0)}function Ni(e){let t=0,n;switch(e.type){case`Polygon`:return Pi(e.coordinates);case`MultiPolygon`:for(n=0;n<e.coordinates.length;n++)t+=Pi(e.coordinates[n]);return t;case`Point`:case`MultiPoint`:case`LineString`:case`MultiLineString`:return 0}return 0}function Pi(e){let t=0;if(e&&e.length>0){t+=Math.abs(Li(e[0]));for(let n=1;n<e.length;n++)t-=Math.abs(Li(e[n]))}return t}var Fi=Cn*Cn/2,Ii=Math.PI/180;function Li(e){let t=e.length-1;if(t<=2)return 0;let n=0,r=0;for(;r<t;){let i=e[r],a=e[r+1===t?0:r+1],o=e[r+2>=t?(r+2)%t:r+2],s=i[0]*Ii,c=a[1]*Ii,l=o[0]*Ii;n+=(l-s)*Math.sin(c),r++}return n*Fi}function Ri(e){return e}function zi(e){if(e==null)return Ri;var t,n,r=e.scale[0],i=e.scale[1],a=e.translate[0],o=e.translate[1];return function(e,s){s||(t=n=0);var c=2,l=e.length,u=Array(l);for(u[0]=(t+=e[0])*r+a,u[1]=(n+=e[1])*i+o;c<l;)u[c]=e[c],++c;return u}}function Bi(e,t){for(var n,r=e.length,i=r-t;i<--r;)n=e[i],e[i++]=e[r],e[r]=n}function Vi(e,t){return typeof t==`string`&&(t=e.objects[t]),t.type===`GeometryCollection`?{type:`FeatureCollection`,features:t.geometries.map(function(t){return Hi(e,t)})}:Hi(e,t)}function Hi(e,t){var n=t.id,r=t.bbox,i=t.properties==null?{}:t.properties,a=Ui(e,t);return n==null&&r==null?{type:`Feature`,properties:i,geometry:a}:r==null?{type:`Feature`,id:n,properties:i,geometry:a}:{type:`Feature`,id:n,bbox:r,properties:i,geometry:a}}function Ui(e,t){var n=zi(e.transform),r=e.arcs;function i(e,t){t.length&&t.pop();for(var i=r[e<0?~e:e],a=0,o=i.length;a<o;++a)t.push(n(i[a],a));e<0&&Bi(t,o)}function a(e){return n(e)}function o(e){for(var t=[],n=0,r=e.length;n<r;++n)i(e[n],t);return t.length<2&&t.push(t[0]),t}function s(e){for(var t=o(e);t.length<4;)t.push(t[0]);return t}function c(e){return e.map(s)}function l(e){var t=e.type,n;switch(t){case`GeometryCollection`:return{type:t,geometries:e.geometries.map(l)};case`Point`:n=a(e.coordinates);break;case`MultiPoint`:n=e.coordinates.map(a);break;case`LineString`:n=o(e.arcs);break;case`MultiLineString`:n=e.arcs.map(o);break;case`Polygon`:n=c(e.arcs);break;case`MultiPolygon`:n=e.arcs.map(c);break;default:return null}return{type:t,coordinates:n}}return l(t)}var Wi=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Gi=Math.ceil,Ki=Math.floor,qi=`[BigNumber Error] `,Ji=qi+`Number primitive has more than 15 significant digits: `,Yi=0x5af3107a4000,J=14,Xi=9007199254740991,Zi=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,0xe8d4a51000,0x9184e72a000],Qi=1e7,$i=1e9;function ea(e){var t,n,r,i=v.prototype={constructor:v,toString:null,valueOf:null},a=new v(1),o=20,s=4,c=-7,l=21,u=-1e7,d=1e7,f=!1,p=1,m=0,h={prefix:``,groupSize:3,secondaryGroupSize:0,groupSeparator:`,`,decimalSeparator:`.`,fractionGroupSize:0,fractionGroupSeparator:`\xA0`,suffix:``},g=`0123456789abcdefghijklmnopqrstuvwxyz`,_=!0;function v(e,t){var i,a,c,l,f,p,m,h,y=this;if(!(y instanceof v))return new v(e,t);if(t==null){if(e&&e._isBigNumber===!0){y.s=e.s,!e.c||e.e>d?y.c=y.e=null:e.e<u?y.c=[y.e=0]:(y.e=e.e,y.c=e.c.slice());return}if((p=typeof e==`number`)&&e*0==0){if(y.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,f=e;f>=10;f/=10,l++);l>d?y.c=y.e=null:(y.e=l,y.c=[e]);return}h=String(e)}else{if(!Wi.test(h=String(e)))return r(y,h,p);y.s=h.charCodeAt(0)==45?(h=h.slice(1),-1):1}(l=h.indexOf(`.`))>-1&&(h=h.replace(`.`,``)),(f=h.search(/e/i))>0?(l<0&&(l=f),l+=+h.slice(f+1),h=h.substring(0,f)):l<0&&(l=h.length)}else{if(ia(t,2,g.length,`Base`),t==10&&_)return y=new v(e),S(y,o+y.e+1,s);if(h=String(e),p=typeof e==`number`){if(e*0!=0)return r(y,h,p,t);if(y.s=1/e<0?(h=h.slice(1),-1):1,v.DEBUG&&h.replace(/^0\.0*|\./,``).length>15)throw Error(Ji+e)}else y.s=h.charCodeAt(0)===45?(h=h.slice(1),-1):1;for(i=g.slice(0,t),l=f=0,m=h.length;f<m;f++)if(i.indexOf(a=h.charAt(f))<0){if(a==`.`){if(f>l){l=m;continue}}else if(!c&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){c=!0,f=-1,l=0;continue}return r(y,String(e),p,t)}p=!1,h=n(h,t,10,y.s),(l=h.indexOf(`.`))>-1?h=h.replace(`.`,``):l=h.length}for(f=0;h.charCodeAt(f)===48;f++);for(m=h.length;h.charCodeAt(--m)===48;);if(h=h.slice(f,++m)){if(m-=f,p&&v.DEBUG&&m>15&&(e>Xi||e!==Ki(e)))throw Error(Ji+y.s*e);if((l=l-f-1)>d)y.c=y.e=null;else if(l<u)y.c=[y.e=0];else{if(y.e=l,y.c=[],f=(l+1)%J,l<0&&(f+=J),f<m){for(f&&y.c.push(+h.slice(0,f)),m-=J;f<m;)y.c.push(+h.slice(f,f+=J));f=J-(h=h.slice(f)).length}else f-=m;for(;f--;h+=`0`);y.c.push(+h)}}else y.c=[y.e=0]}v.clone=ea,v.ROUND_UP=0,v.ROUND_DOWN=1,v.ROUND_CEIL=2,v.ROUND_FLOOR=3,v.ROUND_HALF_UP=4,v.ROUND_HALF_DOWN=5,v.ROUND_HALF_EVEN=6,v.ROUND_HALF_CEIL=7,v.ROUND_HALF_FLOOR=8,v.EUCLID=9,v.config=v.set=function(e){var t,n;if(e!=null)if(typeof e==`object`){if(e.hasOwnProperty(t=`DECIMAL_PLACES`)&&(n=e[t],ia(n,0,$i,t),o=n),e.hasOwnProperty(t=`ROUNDING_MODE`)&&(n=e[t],ia(n,0,8,t),s=n),e.hasOwnProperty(t=`EXPONENTIAL_AT`)&&(n=e[t],n&&n.pop?(ia(n[0],-$i,0,t),ia(n[1],0,$i,t),c=n[0],l=n[1]):(ia(n,-$i,$i,t),c=-(l=n<0?-n:n))),e.hasOwnProperty(t=`RANGE`))if(n=e[t],n&&n.pop)ia(n[0],-$i,-1,t),ia(n[1],1,$i,t),u=n[0],d=n[1];else if(ia(n,-$i,$i,t),n)u=-(d=n<0?-n:n);else throw Error(qi+t+` cannot be zero: `+n);if(e.hasOwnProperty(t=`CRYPTO`))if(n=e[t],n===!!n)if(n)if(typeof crypto<`u`&&crypto&&(crypto.getRandomValues||crypto.randomBytes))f=n;else throw f=!n,Error(qi+`crypto unavailable`);else f=n;else throw Error(qi+t+` not true or false: `+n);if(e.hasOwnProperty(t=`MODULO_MODE`)&&(n=e[t],ia(n,0,9,t),p=n),e.hasOwnProperty(t=`POW_PRECISION`)&&(n=e[t],ia(n,0,$i,t),m=n),e.hasOwnProperty(t=`FORMAT`))if(n=e[t],typeof n==`object`)h=n;else throw Error(qi+t+` not an object: `+n);if(e.hasOwnProperty(t=`ALPHABET`))if(n=e[t],typeof n==`string`&&!/^.?$|[+\-.\s]|(.).*\1/.test(n))_=n.slice(0,10)==`0123456789`,g=n;else throw Error(qi+t+` invalid: `+n)}else throw Error(qi+`Object expected: `+e);return{DECIMAL_PLACES:o,ROUNDING_MODE:s,EXPONENTIAL_AT:[c,l],RANGE:[u,d],CRYPTO:f,MODULO_MODE:p,POW_PRECISION:m,FORMAT:h,ALPHABET:g}},v.isBigNumber=function(e){if(!e||e._isBigNumber!==!0)return!1;if(!v.DEBUG)return!0;var t,n,r=e.c,i=e.e,a=e.s;out:if({}.toString.call(r)==`[object Array]`){if((a===1||a===-1)&&i>=-$i&&i<=$i&&i===Ki(i)){if(r[0]===0){if(i===0&&r.length===1)return!0;break out}if(t=(i+1)%J,t<1&&(t+=J),String(r[0]).length==t){for(t=0;t<r.length;t++)if(n=r[t],n<0||n>=Yi||n!==Ki(n))break out;if(n!==0)return!0}}}else if(r===null&&i===null&&(a===null||a===1||a===-1))return!0;throw Error(qi+`Invalid BigNumber: `+e)},v.maximum=v.max=function(){return b(arguments,-1)},v.minimum=v.min=function(){return b(arguments,1)},v.random=(function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return Ki(Math.random()*e)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(e){var n,r,i,s,c,l=0,u=[],d=new v(a);if(e==null?e=o:ia(e,0,$i),s=Gi(e/J),f)if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(s*=2));l<s;)c=n[l]*131072+(n[l+1]>>>11),c>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),n[l]=r[0],n[l+1]=r[1]):(u.push(c%0x5af3107a4000),l+=2);l=s/2}else if(crypto.randomBytes){for(n=crypto.randomBytes(s*=7);l<s;)c=(n[l]&31)*281474976710656+n[l+1]*1099511627776+n[l+2]*4294967296+n[l+3]*16777216+(n[l+4]<<16)+(n[l+5]<<8)+n[l+6],c>=9e15?crypto.randomBytes(7).copy(n,l):(u.push(c%0x5af3107a4000),l+=7);l=s/7}else throw f=!1,Error(qi+`crypto unavailable`);if(!f)for(;l<s;)c=t(),c<9e15&&(u[l++]=c%0x5af3107a4000);for(s=u[--l],e%=J,s&&e&&(c=Zi[J-e],u[l]=Ki(s/c)*c);u[l]===0;u.pop(),l--);if(l<0)u=[i=0];else{for(i=-1;u[0]===0;u.splice(0,1),i-=J);for(l=1,c=u[0];c>=10;c/=10,l++);l<J&&(i-=J-l)}return d.e=i,d.c=u,d}})(),v.sum=function(){for(var e=1,t=arguments,n=new v(t[0]);e<t.length;)n=n.plus(t[e++]);return n},n=(function(){var e=`0123456789`;function n(e,t,n,r){for(var i,a=[0],o,s=0,c=e.length;s<c;){for(o=a.length;o--;a[o]*=t);for(a[0]+=r.indexOf(e.charAt(s++)),i=0;i<a.length;i++)a[i]>n-1&&(a[i+1]??(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}return function(r,i,a,c,l){var u,d,f,p,h,_,y,b,x=r.indexOf(`.`),S=o,C=s;for(x>=0&&(p=m,m=0,r=r.replace(`.`,``),b=new v(i),_=b.pow(r.length-x),m=p,b.c=n(sa(na(_.c),_.e,`0`),10,a,e),b.e=b.c.length),y=n(r,i,a,l?(u=g,e):(u=e,g)),f=p=y.length;y[--p]==0;y.pop());if(!y[0])return u.charAt(0);if(x<0?--f:(_.c=y,_.e=f,_.s=c,_=t(_,b,S,C,a),y=_.c,h=_.r,f=_.e),d=f+S+1,x=y[d],p=a/2,h=h||d<0||y[d+1]!=null,h=C<4?(x!=null||h)&&(C==0||C==(_.s<0?3:2)):x>p||x==p&&(C==4||h||C==6&&y[d-1]&1||C==(_.s<0?8:7)),d<1||!y[0])r=h?sa(u.charAt(1),-S,u.charAt(0)):u.charAt(0);else{if(y.length=d,h)for(--a;++y[--d]>a;)y[d]=0,d||(++f,y=[1].concat(y));for(p=y.length;!y[--p];);for(x=0,r=``;x<=p;r+=u.charAt(y[x++]));r=sa(r,f,u.charAt(0))}return r}})(),t=(function(){function e(e,t,n){var r,i,a,o,s=0,c=e.length,l=t%Qi,u=t/Qi|0;for(e=e.slice();c--;)a=e[c]%Qi,o=e[c]/Qi|0,r=u*a+o*l,i=l*a+r%Qi*Qi+s,s=(i/n|0)+(r/Qi|0)+u*o,e[c]=i%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,a,o,s){var c,l,u,d,f,p,m,h,g,_,y,b,x,C,w,T,E,D=r.s==i.s?1:-1,O=r.c,k=i.c;if(!O||!O[0]||!k||!k[0])return new v(!r.s||!i.s||(O?k&&O[0]==k[0]:!k)?NaN:O&&O[0]==0||!k?D*0:D/0);for(h=new v(D),g=h.c=[],l=r.e-i.e,D=a+l+1,s||(s=Yi,l=ta(r.e/J)-ta(i.e/J),D=D/J|0),u=0;k[u]==(O[u]||0);u++);if(k[u]>(O[u]||0)&&l--,D<0)g.push(1),d=!0;else{for(C=O.length,T=k.length,u=0,D+=2,f=Ki(s/(k[0]+1)),f>1&&(k=e(k,f,s),O=e(O,f,s),T=k.length,C=O.length),x=T,_=O.slice(0,T),y=_.length;y<T;_[y++]=0);E=k.slice(),E=[0].concat(E),w=k[0],k[1]>=s/2&&w++;do{if(f=0,c=t(k,_,T,y),c<0){if(b=_[0],T!=y&&(b=b*s+(_[1]||0)),f=Ki(b/w),f>1)for(f>=s&&(f=s-1),p=e(k,f,s),m=p.length,y=_.length;t(p,_,m,y)==1;)f--,n(p,T<m?E:k,m,s),m=p.length,c=1;else f==0&&(c=f=1),p=k.slice(),m=p.length;if(m<y&&(p=[0].concat(p)),n(_,p,y,s),y=_.length,c==-1)for(;t(k,_,T,y)<1;)f++,n(_,T<y?E:k,y,s),y=_.length}else c===0&&(f++,_=[0]);g[u++]=f,_[0]?_[y++]=O[x]||0:(_=[O[x]],y=1)}while((x++<C||_[0]!=null)&&D--);d=_[0]!=null,g[0]||g.splice(0,1)}if(s==Yi){for(u=1,D=g[0];D>=10;D/=10,u++);S(h,a+(h.e=u+l*J-1)+1,o,d)}else h.e=l,h.r=+d;return h}})();function y(e,t,n,r){var i,a,o,u,d;if(n==null?n=s:ia(n,0,8),!e.c)return e.toString();if(i=e.c[0],o=e.e,t==null)d=na(e.c),d=r==1||r==2&&(o<=c||o>=l)?oa(d,o):sa(d,o,`0`);else if(e=S(new v(e),t,n),a=e.e,d=na(e.c),u=d.length,r==1||r==2&&(t<=a||a<=c)){for(;u<t;d+=`0`,u++);d=oa(d,a)}else if(t-=o+(r===2&&a>o),d=sa(d,a,`0`),a+1>u){if(--t>0)for(d+=`.`;t--;d+=`0`);}else if(t+=a-u,t>0)for(a+1==u&&(d+=`.`);t--;d+=`0`);return e.s<0&&i?`-`+d:d}function b(e,t){for(var n,r,i=1,a=new v(e[0]);i<e.length;i++)r=new v(e[i]),(!r.s||(n=ra(a,r))===t||n===0&&a.s===t)&&(a=r);return a}function x(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*J-1)>d?e.c=e.e=null:n<u?e.c=[e.e=0]:(e.e=n,e.c=t),e}r=(function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,n=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(a,o,s,c){var l,u=s?o:o.replace(i,``);if(r.test(u))a.s=isNaN(u)?null:u<0?-1:1;else{if(!s&&(u=u.replace(e,function(e,t,n){return l=(n=n.toLowerCase())==`x`?16:n==`b`?2:8,!c||c==l?t:e}),c&&(l=c,u=u.replace(t,`$1`).replace(n,`0.$1`)),o!=u))return new v(u,l);if(v.DEBUG)throw Error(qi+`Not a`+(c?` base `+c:``)+` number: `+o);a.s=null}a.c=a.e=null}})();function S(e,t,n,r){var i,a,o,s,c,l,f,p=e.c,m=Zi;if(p){out:{for(i=1,s=p[0];s>=10;s/=10,i++);if(a=t-i,a<0)a+=J,o=t,c=p[l=0],f=Ki(c/m[i-o-1]%10);else if(l=Gi((a+1)/J),l>=p.length)if(r){for(;p.length<=l;p.push(0));c=f=0,i=1,a%=J,o=a-J+1}else break out;else{for(c=s=p[l],i=1;s>=10;s/=10,i++);a%=J,o=a-J+i,f=o<0?0:Ki(c/m[i-o-1]%10)}if(r=r||t<0||p[l+1]!=null||(o<0?c:c%m[i-o-1]),r=n<4?(f||r)&&(n==0||n==(e.s<0?3:2)):f>5||f==5&&(n==4||r||n==6&&(a>0?o>0?c/m[i-o]:0:p[l-1])%10&1||n==(e.s<0?8:7)),t<1||!p[0])return p.length=0,r?(t-=e.e+1,p[0]=m[(J-t%J)%J],e.e=-t||0):p[0]=e.e=0,e;if(a==0?(p.length=l,s=1,l--):(p.length=l+1,s=m[J-a],p[l]=o>0?Ki(c/m[i-o]%m[o])*s:0),r)for(;;)if(l==0){for(a=1,o=p[0];o>=10;o/=10,a++);for(o=p[0]+=s,s=1;o>=10;o/=10,s++);a!=s&&(e.e++,p[0]==Yi&&(p[0]=1));break}else{if(p[l]+=s,p[l]!=Yi)break;p[l--]=0,s=1}for(a=p.length;p[--a]===0;p.pop());}e.e>d?e.c=e.e=null:e.e<u&&(e.c=[e.e=0])}return e}function C(e){var t,n=e.e;return n===null?e.toString():(t=na(e.c),t=n<=c||n>=l?oa(t,n):sa(t,n,`0`),e.s<0?`-`+t:t)}return i.absoluteValue=i.abs=function(){var e=new v(this);return e.s<0&&(e.s=1),e},i.comparedTo=function(e,t){return ra(this,new v(e,t))},i.decimalPlaces=i.dp=function(e,t){var n,r,i,a=this;if(e!=null)return ia(e,0,$i),t==null?t=s:ia(t,0,8),S(new v(a),e+a.e+1,t);if(!(n=a.c))return null;if(r=((i=n.length-1)-ta(this.e/J))*J,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},i.dividedBy=i.div=function(e,n){return t(this,new v(e,n),o,s)},i.dividedToIntegerBy=i.idiv=function(e,n){return t(this,new v(e,n),0,1)},i.exponentiatedBy=i.pow=function(e,t){var n,r,i,o,c,l,u,d,f,p=this;if(e=new v(e),e.c&&!e.isInteger())throw Error(qi+`Exponent not an integer: `+C(e));if(t!=null&&(t=new v(t)),l=e.e>14,!p.c||!p.c[0]||p.c[0]==1&&!p.e&&p.c.length==1||!e.c||!e.c[0])return f=new v(C(p)**(l?e.s*(2-aa(e)):+C(e))),t?f.mod(t):f;if(u=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new v(NaN);r=!u&&p.isInteger()&&t.isInteger(),r&&(p=p.mod(t))}else if(e.e>9&&(p.e>0||p.e<-1||(p.e==0?p.c[0]>1||l&&p.c[1]>=24e7:p.c[0]<8e13||l&&p.c[0]<=9999975e7)))return o=p.s<0&&aa(e)?-0:0,p.e>-1&&(o=1/o),new v(u?1/o:o);else m&&(o=Gi(m/J+2));for(l?(n=new v(.5),u&&(e.s=1),d=aa(e)):(i=Math.abs(+C(e)),d=i%2),f=new v(a);;){if(d){if(f=f.times(p),!f.c)break;o?f.c.length>o&&(f.c.length=o):r&&(f=f.mod(t))}if(i){if(i=Ki(i/2),i===0)break;d=i%2}else if(e=e.times(n),S(e,e.e+1,1),e.e>14)d=aa(e);else{if(i=+C(e),i===0)break;d=i%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):r&&(p=p.mod(t))}return r?f:(u&&(f=a.div(f)),t?f.mod(t):o?S(f,m,s,c):f)},i.integerValue=function(e){var t=new v(this);return e==null?e=s:ia(e,0,8),S(t,t.e+1,e)},i.isEqualTo=i.eq=function(e,t){return ra(this,new v(e,t))===0},i.isFinite=function(){return!!this.c},i.isGreaterThan=i.gt=function(e,t){return ra(this,new v(e,t))>0},i.isGreaterThanOrEqualTo=i.gte=function(e,t){return(t=ra(this,new v(e,t)))===1||t===0},i.isInteger=function(){return!!this.c&&ta(this.e/J)>this.c.length-2},i.isLessThan=i.lt=function(e,t){return ra(this,new v(e,t))<0},i.isLessThanOrEqualTo=i.lte=function(e,t){return(t=ra(this,new v(e,t)))===-1||t===0},i.isNaN=function(){return!this.s},i.isNegative=function(){return this.s<0},i.isPositive=function(){return this.s>0},i.isZero=function(){return!!this.c&&this.c[0]==0},i.minus=function(e,t){var n,r,i,a,o=this,c=o.s;if(e=new v(e,t),t=e.s,!c||!t)return new v(NaN);if(c!=t)return e.s=-t,o.plus(e);var l=o.e/J,u=e.e/J,d=o.c,f=e.c;if(!l||!u){if(!d||!f)return d?(e.s=-t,e):new v(f?o:NaN);if(!d[0]||!f[0])return f[0]?(e.s=-t,e):new v(d[0]?o:s==3?-0:0)}if(l=ta(l),u=ta(u),d=d.slice(),c=l-u){for((a=c<0)?(c=-c,i=d):(u=l,i=f),i.reverse(),t=c;t--;i.push(0));i.reverse()}else for(r=(a=(c=d.length)<(t=f.length))?c:t,c=t=0;t<r;t++)if(d[t]!=f[t]){a=d[t]<f[t];break}if(a&&(i=d,d=f,f=i,e.s=-e.s),t=(r=f.length)-(n=d.length),t>0)for(;t--;d[n++]=0);for(t=Yi-1;r>c;){if(d[--r]<f[r]){for(n=r;n&&!d[--n];d[n]=t);--d[n],d[r]+=Yi}d[r]-=f[r]}for(;d[0]==0;d.splice(0,1),--u);return d[0]?x(e,d,u):(e.s=s==3?-1:1,e.c=[e.e=0],e)},i.modulo=i.mod=function(e,n){var r,i,a=this;return e=new v(e,n),!a.c||!e.s||e.c&&!e.c[0]?new v(NaN):!e.c||a.c&&!a.c[0]?new v(a):(p==9?(i=e.s,e.s=1,r=t(a,e,0,3),e.s=i,r.s*=i):r=t(a,e,0,p),e=a.minus(r.times(e)),!e.c[0]&&p==1&&(e.s=a.s),e)},i.multipliedBy=i.times=function(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_=this,y=_.c,b=(e=new v(e,t)).c;if(!y||!b||!y[0]||!b[0])return!_.s||!e.s||y&&!y[0]&&!b||b&&!b[0]&&!y?e.c=e.e=e.s=null:(e.s*=_.s,!y||!b?e.c=e.e=null:(e.c=[0],e.e=0)),e;for(r=ta(_.e/J)+ta(e.e/J),e.s*=_.s,c=y.length,d=b.length,c<d&&(m=y,y=b,b=m,i=c,c=d,d=i),i=c+d,m=[];i--;m.push(0));for(h=Yi,g=Qi,i=d;--i>=0;){for(n=0,f=b[i]%g,p=b[i]/g|0,o=c,a=i+o;a>i;)l=y[--o]%g,u=y[o]/g|0,s=p*l+u*f,l=f*l+s%g*g+m[a]+n,n=(l/h|0)+(s/g|0)+p*u,m[a--]=l%h;m[a]=n}return n?++r:m.splice(0,1),x(e,m,r)},i.negated=function(){var e=new v(this);return e.s=-e.s||null,e},i.plus=function(e,t){var n,r=this,i=r.s;if(e=new v(e,t),t=e.s,!i||!t)return new v(NaN);if(i!=t)return e.s=-t,r.minus(e);var a=r.e/J,o=e.e/J,s=r.c,c=e.c;if(!a||!o){if(!s||!c)return new v(i/0);if(!s[0]||!c[0])return c[0]?e:new v(s[0]?r:i*0)}if(a=ta(a),o=ta(o),s=s.slice(),i=a-o){for(i>0?(o=a,n=c):(i=-i,n=s),n.reverse();i--;n.push(0));n.reverse()}for(i=s.length,t=c.length,i-t<0&&(n=c,c=s,s=n,t=i),i=0;t;)i=(s[--t]=s[t]+c[t]+i)/Yi|0,s[t]=Yi===s[t]?0:s[t]%Yi;return i&&(s=[i].concat(s),++o),x(e,s,o)},i.precision=i.sd=function(e,t){var n,r,i,a=this;if(e!=null&&e!==!!e)return ia(e,1,$i),t==null?t=s:ia(t,0,8),S(new v(a),e,t);if(!(n=a.c))return null;if(i=n.length-1,r=i*J+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&a.e+1>r&&(r=a.e+1),r},i.shiftedBy=function(e){return ia(e,-Xi,Xi),this.times(`1e`+e)},i.squareRoot=i.sqrt=function(){var e,n,r,i,a,c=this,l=c.c,u=c.s,d=c.e,f=o+4,p=new v(`0.5`);if(u!==1||!l||!l[0])return new v(!u||u<0&&(!l||l[0])?NaN:l?c:1/0);if(u=Math.sqrt(+C(c)),u==0||u==1/0?(n=na(l),(n.length+d)%2==0&&(n+=`0`),u=Math.sqrt(+n),d=ta((d+1)/2)-(d<0||d%2),u==1/0?n=`5e`+d:(n=u.toExponential(),n=n.slice(0,n.indexOf(`e`)+1)+d),r=new v(n)):r=new v(u+``),r.c[0]){for(d=r.e,u=d+f,u<3&&(u=0);;)if(a=r,r=p.times(a.plus(t(c,a,f,1))),na(a.c).slice(0,u)===(n=na(r.c)).slice(0,u))if(r.e<d&&--u,n=n.slice(u-3,u+1),n==`9999`||!i&&n==`4999`){if(!i&&(S(a,a.e+o+2,0),a.times(a).eq(c))){r=a;break}f+=4,u+=4,i=1}else{(!+n||!+n.slice(1)&&n.charAt(0)==`5`)&&(S(r,r.e+o+2,1),e=!r.times(r).eq(c));break}}return S(r,r.e+o+1,s,e)},i.toExponential=function(e,t){return e!=null&&(ia(e,0,$i),e++),y(this,e,t,1)},i.toFixed=function(e,t){return e!=null&&(ia(e,0,$i),e=e+this.e+1),y(this,e,t)},i.toFormat=function(e,t,n){var r,i=this;if(n==null)e!=null&&t&&typeof t==`object`?(n=t,t=null):e&&typeof e==`object`?(n=e,e=t=null):n=h;else if(typeof n!=`object`)throw Error(qi+`Argument not an object: `+n);if(r=i.toFixed(e,t),i.c){var a,o=r.split(`.`),s=+n.groupSize,c=+n.secondaryGroupSize,l=n.groupSeparator||``,u=o[0],d=o[1],f=i.s<0,p=f?u.slice(1):u,m=p.length;if(c&&(a=s,s=c,c=a,m-=a),s>0&&m>0){for(a=m%s||s,u=p.substr(0,a);a<m;a+=s)u+=l+p.substr(a,s);c>0&&(u+=l+p.slice(a)),f&&(u=`-`+u)}r=d?u+(n.decimalSeparator||``)+((c=+n.fractionGroupSize)?d.replace(RegExp(`\\d{`+c+`}\\B`,`g`),`$&`+(n.fractionGroupSeparator||``)):d):u}return(n.prefix||``)+r+(n.suffix||``)},i.toFraction=function(e){var n,r,i,o,c,l,u,f,p,m,h,g,_=this,y=_.c;if(e!=null&&(u=new v(e),!u.isInteger()&&(u.c||u.s!==1)||u.lt(a)))throw Error(qi+`Argument `+(u.isInteger()?`out of range: `:`not an integer: `)+C(u));if(!y)return new v(_);for(n=new v(a),p=r=new v(a),i=f=new v(a),g=na(y),c=n.e=g.length-_.e-1,n.c[0]=Zi[(l=c%J)<0?J+l:l],e=!e||u.comparedTo(n)>0?c>0?n:p:u,l=d,d=1/0,u=new v(g),f.c[0]=0;m=t(u,n,0,1),o=r.plus(m.times(i)),o.comparedTo(e)!=1;)r=i,i=o,p=f.plus(m.times(o=p)),f=o,n=u.minus(m.times(o=n)),u=o;return o=t(e.minus(r),i,0,1),f=f.plus(o.times(p)),r=r.plus(o.times(i)),f.s=p.s=_.s,c*=2,h=t(p,i,c,s).minus(_).abs().comparedTo(t(f,r,c,s).minus(_).abs())<1?[p,i]:[f,r],d=l,h},i.toNumber=function(){return+C(this)},i.toPrecision=function(e,t){return e!=null&&ia(e,1,$i),y(this,e,t,2)},i.toString=function(e){var t,r=this,i=r.s,a=r.e;return a===null?i?(t=`Infinity`,i<0&&(t=`-`+t)):t=`NaN`:(e==null?t=a<=c||a>=l?oa(na(r.c),a):sa(na(r.c),a,`0`):e===10&&_?(r=S(new v(r),o+a+1,s),t=sa(na(r.c),r.e,`0`)):(ia(e,2,g.length,`Base`),t=n(sa(na(r.c),a,`0`),10,e,i,!0)),i<0&&r.c[0]&&(t=`-`+t)),t},i.valueOf=i.toJSON=function(){return C(this)},i._isBigNumber=!0,i[Symbol.toStringTag]=`BigNumber`,i[Symbol.for(`nodejs.util.inspect.custom`)]=i.valueOf,e!=null&&v.set(e),v}function ta(e){var t=e|0;return e>0||e===t?t:t-1}function na(e){for(var t,n,r=1,i=e.length,a=e[0]+``;r<i;){for(t=e[r++]+``,n=J-t.length;n--;t=`0`+t);a+=t}for(i=a.length;a.charCodeAt(--i)===48;);return a.slice(0,i+1||1)}function ra(e,t){var n,r,i=e.c,a=t.c,o=e.s,s=t.s,c=e.e,l=t.e;if(!o||!s)return null;if(n=i&&!i[0],r=a&&!a[0],n||r)return n?r?0:-s:o;if(o!=s)return o;if(n=o<0,r=c==l,!i||!a)return r?0:!i^n?1:-1;if(!r)return c>l^n?1:-1;for(s=(c=i.length)<(l=a.length)?c:l,o=0;o<s;o++)if(i[o]!=a[o])return i[o]>a[o]^n?1:-1;return c==l?0:c>l^n?1:-1}function ia(e,t,n,r){if(e<t||e>n||e!==Ki(e))throw Error(qi+(r||`Argument`)+(typeof e==`number`?e<t||e>n?` out of range: `:` not an integer: `:` not a primitive number: `)+String(e))}function aa(e){var t=e.c.length-1;return ta(e.e/J)==t&&e.c[t]%2!=0}function oa(e,t){return(e.length>1?e.charAt(0)+`.`+e.slice(1):e)+(t<0?`e`:`e+`)+t}function sa(e,t,n){var r,i;if(t<0){for(i=n+`.`;++t;i+=n);e=i+e}else if(r=e.length,++t>r){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+`.`+e.slice(t));return e}var Y=ea(),ca=class{key;left=null;right=null;constructor(e){this.key=e}},la=class extends ca{constructor(e){super(e)}},ua=class{size=0;modificationCount=0;splayCount=0;splay(e){let t=this.root;if(t==null)return this.compare(e,e),-1;let n=null,r=null,i=null,a=null,o=t,s=this.compare,c;for(;;)if(c=s(o.key,e),c>0){let t=o.left;if(t==null||(c=s(t.key,e),c>0&&(o.left=t.right,t.right=o,o=t,t=o.left,t==null)))break;n==null?r=o:n.left=o,n=o,o=t}else if(c<0){let t=o.right;if(t==null||(c=s(t.key,e),c<0&&(o.right=t.left,t.left=o,o=t,t=o.right,t==null)))break;i==null?a=o:i.right=o,i=o,o=t}else break;return i!=null&&(i.right=o.left,o.left=a),n!=null&&(n.left=o.right,o.right=r),this.root!==o&&(this.root=o,this.splayCount++),c}splayMin(e){let t=e,n=t.left;for(;n!=null;){let e=n;t.left=e.right,e.right=t,t=e,n=t.left}return t}splayMax(e){let t=e,n=t.right;for(;n!=null;){let e=n;t.right=e.left,e.left=t,t=e,n=t.right}return t}_delete(e){if(this.root==null||this.splay(e)!=0)return null;let t=this.root,n=t,r=t.left;if(this.size--,r==null)this.root=t.right;else{let e=t.right;t=this.splayMax(r),t.right=e,this.root=t}return this.modificationCount++,n}addNewRoot(e,t){this.size++,this.modificationCount++;let n=this.root;if(n==null){this.root=e;return}t<0?(e.left=n,e.right=n.right,n.right=null):(e.right=n,e.left=n.left,n.left=null),this.root=e}_first(){let e=this.root;return e==null?null:(this.root=this.splayMin(e),this.root)}_last(){let e=this.root;return e==null?null:(this.root=this.splayMax(e),this.root)}clear(){this.root=null,this.size=0,this.modificationCount++}has(e){return this.validKey(e)&&this.splay(e)==0}defaultCompare(){return(e,t)=>e<t?-1:e>t?1:0}wrap(){return{getRoot:()=>this.root,setRoot:e=>{this.root=e},getSize:()=>this.size,getModificationCount:()=>this.modificationCount,getSplayCount:()=>this.splayCount,setSplayCount:e=>{this.splayCount=e},splay:e=>this.splay(e),has:e=>this.has(e)}}},da=class e extends ua{root=null;compare;validKey;constructor(e,t){super(),this.compare=e??this.defaultCompare(),this.validKey=t??(e=>e!=null&&e!=null)}delete(e){return this.validKey(e)?this._delete(e)!=null:!1}deleteAll(e){for(let t of e)this.delete(t)}forEach(e){let t=this[Symbol.iterator](),n;for(;n=t.next(),!n.done;)e(n.value,n.value,this)}add(e){let t=this.splay(e);return t!=0&&this.addNewRoot(new la(e),t),this}addAndReturn(e){let t=this.splay(e);return t!=0&&this.addNewRoot(new la(e),t),this.root.key}addAll(e){for(let t of e)this.add(t)}isEmpty(){return this.root==null}isNotEmpty(){return this.root!=null}single(){if(this.size==0)throw`Bad state: No element`;if(this.size>1)throw`Bad state: Too many element`;return this.root.key}first(){if(this.size==0)throw`Bad state: No element`;return this._first().key}last(){if(this.size==0)throw`Bad state: No element`;return this._last().key}lastBefore(e){if(e==null)throw`Invalid arguments(s)`;if(this.root==null)return null;if(this.splay(e)<0)return this.root.key;let t=this.root.left;if(t==null)return null;let n=t.right;for(;n!=null;)t=n,n=t.right;return t.key}firstAfter(e){if(e==null)throw`Invalid arguments(s)`;if(this.root==null)return null;if(this.splay(e)>0)return this.root.key;let t=this.root.right;if(t==null)return null;let n=t.left;for(;n!=null;)t=n,n=t.left;return t.key}retainAll(t){let n=new e(this.compare,this.validKey),r=this.modificationCount;for(let e of t){if(r!=this.modificationCount)throw`Concurrent modification during iteration.`;this.validKey(e)&&this.splay(e)==0&&n.add(this.root.key)}n.size!=this.size&&(this.root=n.root,this.size=n.size,this.modificationCount++)}lookup(e){return!this.validKey(e)||this.splay(e)!=0?null:this.root.key}intersection(t){let n=new e(this.compare,this.validKey);for(let e of this)t.has(e)&&n.add(e);return n}difference(t){let n=new e(this.compare,this.validKey);for(let e of this)t.has(e)||n.add(e);return n}union(e){let t=this.clone();return t.addAll(e),t}clone(){let t=new e(this.compare,this.validKey);return t.size=this.size,t.root=this.copyNode(this.root),t}copyNode(e){if(e==null)return null;function t(e,n){let r,i;do{if(r=e.left,i=e.right,r!=null){let e=new la(r.key);n.left=e,t(r,e)}if(i!=null){let t=new la(i.key);n.right=t,e=i,n=t}}while(i!=null)}let n=new la(e.key);return t(e,n),n}toSet(){return this.clone()}entries(){return new X(this.wrap())}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}[Symbol.iterator](){return new pa(this.wrap())}[Symbol.toStringTag]=`[object Set]`},fa=class{tree;path=[];modificationCount=null;splayCount;constructor(e){this.tree=e,this.splayCount=e.getSplayCount()}[Symbol.iterator](){return this}next(){return this.moveNext()?{done:!1,value:this.current()}:{done:!0,value:null}}current(){if(!this.path.length)return null;let e=this.path[this.path.length-1];return this.getValue(e)}rebuildPath(e){this.path.splice(0,this.path.length),this.tree.splay(e),this.path.push(this.tree.getRoot()),this.splayCount=this.tree.getSplayCount()}findLeftMostDescendent(e){for(;e!=null;)this.path.push(e),e=e.left}moveNext(){if(this.modificationCount!=this.tree.getModificationCount()){if(this.modificationCount==null){this.modificationCount=this.tree.getModificationCount();let e=this.tree.getRoot();for(;e!=null;)this.path.push(e),e=e.left;return this.path.length>0}throw`Concurrent modification during iteration.`}if(!this.path.length)return!1;this.splayCount!=this.tree.getSplayCount()&&this.rebuildPath(this.path[this.path.length-1].key);let e=this.path[this.path.length-1],t=e.right;if(t!=null){for(;t!=null;)this.path.push(t),t=t.left;return!0}for(this.path.pop();this.path.length&&this.path[this.path.length-1].right===e;)e=this.path.pop();return this.path.length>0}},pa=class extends fa{getValue(e){return e.key}},X=class extends fa{getValue(e){return[e.key,e.key]}},ma=e=>()=>e,ha=e=>{let t=e?(t,n)=>n.minus(t).abs().isLessThanOrEqualTo(e):ma(!1);return(e,n)=>t(e,n)?0:e.comparedTo(n)};function ga(e){let t=e?(t,n,r,i,a)=>t.exponentiatedBy(2).isLessThanOrEqualTo(i.minus(n).exponentiatedBy(2).plus(a.minus(r).exponentiatedBy(2)).times(e)):ma(!1);return(e,n,r)=>{let i=e.x,a=e.y,o=r.x,s=r.y,c=a.minus(s).times(n.x.minus(o)).minus(i.minus(o).times(n.y.minus(s)));return t(c,i,a,o,s)?0:c.comparedTo(0)}}var _a=e=>e,va=e=>{if(e){let t=new da(ha(e)),n=new da(ha(e)),r=(e,t)=>t.addAndReturn(e),i=e=>({x:r(e.x,t),y:r(e.y,n)});return i({x:new Y(0),y:new Y(0)}),i}return _a},ya=e=>({set:e=>{ba=ya(e)},reset:()=>ya(e),compare:ha(e),snap:va(e),orient:ga(e)}),ba=ya(),xa=(e,t)=>e.ll.x.isLessThanOrEqualTo(t.x)&&t.x.isLessThanOrEqualTo(e.ur.x)&&e.ll.y.isLessThanOrEqualTo(t.y)&&t.y.isLessThanOrEqualTo(e.ur.y),Sa=(e,t)=>{if(t.ur.x.isLessThan(e.ll.x)||e.ur.x.isLessThan(t.ll.x)||t.ur.y.isLessThan(e.ll.y)||e.ur.y.isLessThan(t.ll.y))return null;let n=e.ll.x.isLessThan(t.ll.x)?t.ll.x:e.ll.x,r=e.ur.x.isLessThan(t.ur.x)?e.ur.x:t.ur.x,i=e.ll.y.isLessThan(t.ll.y)?t.ll.y:e.ll.y,a=e.ur.y.isLessThan(t.ur.y)?e.ur.y:t.ur.y;return{ll:{x:n,y:i},ur:{x:r,y:a}}},Ca=(e,t)=>e.x.times(t.y).minus(e.y.times(t.x)),wa=(e,t)=>e.x.times(t.x).plus(e.y.times(t.y)),Ta=e=>wa(e,e).sqrt(),Ea=(e,t,n)=>{let r={x:t.x.minus(e.x),y:t.y.minus(e.y)},i={x:n.x.minus(e.x),y:n.y.minus(e.y)};return Ca(i,r).div(Ta(i)).div(Ta(r))},Da=(e,t,n)=>{let r={x:t.x.minus(e.x),y:t.y.minus(e.y)},i={x:n.x.minus(e.x),y:n.y.minus(e.y)};return wa(i,r).div(Ta(i)).div(Ta(r))},Oa=(e,t,n)=>t.y.isZero()?null:{x:e.x.plus(t.x.div(t.y).times(n.minus(e.y))),y:n},ka=(e,t,n)=>t.x.isZero()?null:{x:n,y:e.y.plus(t.y.div(t.x).times(n.minus(e.x)))},Aa=(e,t,n,r)=>{if(t.x.isZero())return ka(n,r,e.x);if(r.x.isZero())return ka(e,t,n.x);if(t.y.isZero())return Oa(n,r,e.y);if(r.y.isZero())return Oa(e,t,n.y);let i=Ca(t,r);if(i.isZero())return null;let a={x:n.x.minus(e.x),y:n.y.minus(e.y)},o=Ca(a,t).div(i),s=Ca(a,r).div(i),c=e.x.plus(s.times(t.x)),l=n.x.plus(o.times(r.x)),u=e.y.plus(s.times(t.y)),d=n.y.plus(o.times(r.y));return{x:c.plus(l).div(2),y:u.plus(d).div(2)}},ja=class e{point;isLeft;segment;otherSE;consumedBy;static compare(t,n){let r=e.comparePoints(t.point,n.point);return r===0?(t.point!==n.point&&t.link(n),t.isLeft===n.isLeft?La.compare(t.segment,n.segment):t.isLeft?1:-1):r}static comparePoints(e,t){return e.x.isLessThan(t.x)?-1:e.x.isGreaterThan(t.x)?1:e.y.isLessThan(t.y)?-1:e.y.isGreaterThan(t.y)?1:0}constructor(e,t){e.events===void 0?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=t}link(e){if(e.point===this.point)throw Error(`Tried to link already linked events`);let t=e.point.events;for(let e=0,n=t.length;e<n;e++){let n=t[e];this.point.events.push(n),n.point=this.point}this.checkForConsuming()}checkForConsuming(){let e=this.point.events.length;for(let t=0;t<e;t++){let n=this.point.events[t];if(n.segment.consumedBy===void 0)for(let r=t+1;r<e;r++){let e=this.point.events[r];e.consumedBy===void 0&&n.otherSE.point.events===e.otherSE.point.events&&n.segment.consume(e.segment)}}}getAvailableLinkedEvents(){let e=[];for(let t=0,n=this.point.events.length;t<n;t++){let n=this.point.events[t];n!==this&&!n.segment.ringOut&&n.segment.isInResult()&&e.push(n)}return e}getLeftmostComparator(e){let t=new Map,n=n=>{let r=n.otherSE;t.set(n,{sine:Ea(this.point,e.point,r.point),cosine:Da(this.point,e.point,r.point)})};return(e,r)=>{t.has(e)||n(e),t.has(r)||n(r);let{sine:i,cosine:a}=t.get(e),{sine:o,cosine:s}=t.get(r);return i.isGreaterThanOrEqualTo(0)&&o.isGreaterThanOrEqualTo(0)?a.isLessThan(s)?1:a.isGreaterThan(s)?-1:0:i.isLessThan(0)&&o.isLessThan(0)?a.isLessThan(s)?-1:a.isGreaterThan(s)?1:0:o.isLessThan(i)?-1:o.isGreaterThan(i)?1:0}}},Ma=class e{events;poly;_isExteriorRing;_enclosingRing;static factory(t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];if(!i.isInResult()||i.ringOut)continue;let a=null,o=i.leftSE,s=i.rightSE,c=[o],l=o.point,u=[];for(;a=o,o=s,c.push(o),o.point!==l;)for(;;){let t=o.getAvailableLinkedEvents();if(t.length===0){let e=c[0].point,t=c[c.length-1].point;throw Error(`Unable to complete output ring starting at [${e.x}, ${e.y}]. Last matching segment found ends at [${t.x}, ${t.y}].`)}if(t.length===1){s=t[0].otherSE;break}let r=null;for(let e=0,t=u.length;e<t;e++)if(u[e].point===o.point){r=e;break}if(r!==null){let t=u.splice(r)[0],i=c.splice(t.index);i.unshift(i[0].otherSE),n.push(new e(i.reverse()));continue}u.push({index:c.length,point:o.point});let i=o.getLeftmostComparator(a);s=t.sort(i)[0].otherSE;break}n.push(new e(c))}return n}constructor(e){this.events=e;for(let t=0,n=e.length;t<n;t++)e[t].segment.ringOut=this;this.poly=null}getGeom(){let e=this.events[0].point,t=[e];for(let n=1,r=this.events.length-1;n<r;n++){let r=this.events[n].point,i=this.events[n+1].point;ba.orient(r,e,i)!==0&&(t.push(r),e=r)}if(t.length===1)return null;let n=t[0],r=t[1];ba.orient(n,e,r)===0&&t.shift(),t.push(t[0]);let i=this.isExteriorRing()?1:-1,a=this.isExteriorRing()?0:t.length-1,o=this.isExteriorRing()?t.length:-1,s=[];for(let e=a;e!=o;e+=i)s.push([t[e].x.toNumber(),t[e].y.toNumber()]);return s}isExteriorRing(){if(this._isExteriorRing===void 0){let e=this.enclosingRing();this._isExteriorRing=e?!e.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let e=this.events[0];for(let t=1,n=this.events.length;t<n;t++){let n=this.events[t];ja.compare(e,n)>0&&(e=n)}let t=e.segment.prevInResult(),n=t?t.prevInResult():null;for(;;){if(!t)return null;if(!n)return t.ringOut;if(n.ringOut!==t.ringOut)return n.ringOut?.enclosingRing()===t.ringOut?t.ringOut?.enclosingRing():t.ringOut;t=n.prevInResult(),n=t?t.prevInResult():null}}},Na=class{exteriorRing;interiorRings;constructor(e){this.exteriorRing=e,e.poly=this,this.interiorRings=[]}addInterior(e){this.interiorRings.push(e),e.poly=this}getGeom(){let e=this.exteriorRing.getGeom();if(e===null)return null;let t=[e];for(let e=0,n=this.interiorRings.length;e<n;e++){let n=this.interiorRings[e].getGeom();n!==null&&t.push(n)}return t}},Pa=class{rings;polys;constructor(e){this.rings=e,this.polys=this._composePolys(e)}getGeom(){let e=[];for(let t=0,n=this.polys.length;t<n;t++){let n=this.polys[t].getGeom();n!==null&&e.push(n)}return e}_composePolys(e){let t=[];for(let n=0,r=e.length;n<r;n++){let r=e[n];if(!r.poly)if(r.isExteriorRing())t.push(new Na(r));else{let e=r.enclosingRing();e?.poly||t.push(new Na(e)),e?.poly?.addInterior(r)}}return t}},Fa=class{queue;tree;segments;constructor(e,t=La.compare){this.queue=e,this.tree=new da(t),this.segments=[]}process(e){let t=e.segment,n=[];if(e.consumedBy)return e.isLeft?this.queue.delete(e.otherSE):this.tree.delete(t),n;e.isLeft&&this.tree.add(t);let r=t,i=t;do r=this.tree.lastBefore(r);while(r!=null&&r.consumedBy!=null);do i=this.tree.firstAfter(i);while(i!=null&&i.consumedBy!=null);if(e.isLeft){let a=null;if(r){let e=r.getIntersection(t);if(e!==null&&(t.isAnEndpoint(e)||(a=e),!r.isAnEndpoint(e))){let t=this._splitSafely(r,e);for(let e=0,r=t.length;e<r;e++)n.push(t[e])}}let o=null;if(i){let e=i.getIntersection(t);if(e!==null&&(t.isAnEndpoint(e)||(o=e),!i.isAnEndpoint(e))){let t=this._splitSafely(i,e);for(let e=0,r=t.length;e<r;e++)n.push(t[e])}}if(a!==null||o!==null){let e=null;e=a===null?o:o===null||ja.comparePoints(a,o)<=0?a:o,this.queue.delete(t.rightSE),n.push(t.rightSE);let r=t.split(e);for(let e=0,t=r.length;e<t;e++)n.push(r[e])}n.length>0?(this.tree.delete(t),n.push(e)):(this.segments.push(t),t.prev=r)}else{if(r&&i){let e=r.getIntersection(i);if(e!==null){if(!r.isAnEndpoint(e)){let t=this._splitSafely(r,e);for(let e=0,r=t.length;e<r;e++)n.push(t[e])}if(!i.isAnEndpoint(e)){let t=this._splitSafely(i,e);for(let e=0,r=t.length;e<r;e++)n.push(t[e])}}}this.tree.delete(t)}return n}_splitSafely(e,t){this.tree.delete(e);let n=e.rightSE;this.queue.delete(n);let r=e.split(t);return r.push(n),e.consumedBy===void 0&&this.tree.add(e),r}},Z=new class{type;numMultiPolys;run(e,t,n){Z.type=e;let r=[new Ba(t,!0)];for(let e=0,t=n.length;e<t;e++)r.push(new Ba(n[e],!1));if(Z.numMultiPolys=r.length,Z.type===`difference`){let e=r[0],t=1;for(;t<r.length;)Sa(r[t].bbox,e.bbox)===null?r.splice(t,1):t++}if(Z.type===`intersection`)for(let e=0,t=r.length;e<t;e++){let t=r[e];for(let n=e+1,i=r.length;n<i;n++)if(Sa(t.bbox,r[n].bbox)===null)return[]}let i=new da(ja.compare);for(let e=0,t=r.length;e<t;e++){let t=r[e].getSweepEvents();for(let e=0,n=t.length;e<n;e++)i.add(t[e])}let a=new Fa(i),o=null;for(i.size!=0&&(o=i.first(),i.delete(o));o;){let e=a.process(o);for(let t=0,n=e.length;t<n;t++){let n=e[t];n.consumedBy===void 0&&i.add(n)}i.size==0?o=null:(o=i.first(),i.delete(o))}return ba.reset(),new Pa(Ma.factory(a.segments)).getGeom()}},Q=Z,Ia=0,La=class e{id;leftSE;rightSE;rings;windings;ringOut;consumedBy;prev;_prevInResult;_beforeState;_afterState;_isInResult;static compare(e,t){let n=e.leftSE.point.x,r=t.leftSE.point.x,i=e.rightSE.point.x,a=t.rightSE.point.x;if(a.isLessThan(n))return 1;if(i.isLessThan(r))return-1;let o=e.leftSE.point.y,s=t.leftSE.point.y,c=e.rightSE.point.y,l=t.rightSE.point.y;if(n.isLessThan(r)){if(s.isLessThan(o)&&s.isLessThan(c))return 1;if(s.isGreaterThan(o)&&s.isGreaterThan(c))return-1;let n=e.comparePoint(t.leftSE.point);if(n<0)return 1;if(n>0)return-1;let r=t.comparePoint(e.rightSE.point);return r===0?-1:r}if(n.isGreaterThan(r)){if(o.isLessThan(s)&&o.isLessThan(l))return-1;if(o.isGreaterThan(s)&&o.isGreaterThan(l))return 1;let n=t.comparePoint(e.leftSE.point);if(n!==0)return n;let r=e.comparePoint(t.rightSE.point);return r<0?1:r>0?-1:1}if(o.isLessThan(s))return-1;if(o.isGreaterThan(s))return 1;if(i.isLessThan(a)){let n=t.comparePoint(e.rightSE.point);if(n!==0)return n}if(i.isGreaterThan(a)){let n=e.comparePoint(t.rightSE.point);if(n<0)return 1;if(n>0)return-1}if(!i.eq(a)){let e=c.minus(o),t=i.minus(n),u=l.minus(s),d=a.minus(r);if(e.isGreaterThan(t)&&u.isLessThan(d))return 1;if(e.isLessThan(t)&&u.isGreaterThan(d))return-1}return i.isGreaterThan(a)?1:i.isLessThan(a)||c.isLessThan(l)?-1:c.isGreaterThan(l)?1:e.id<t.id?-1:e.id>t.id?1:0}constructor(e,t,n,r){this.id=++Ia,this.leftSE=e,e.segment=this,e.otherSE=t,this.rightSE=t,t.segment=this,t.otherSE=e,this.rings=n,this.windings=r}static fromRing(t,n,r){let i,a,o,s=ja.comparePoints(t,n);if(s<0)i=t,a=n,o=1;else if(s>0)i=n,a=t,o=-1;else throw Error(`Tried to create degenerate segment at [${t.x}, ${t.y}]`);return new e(new ja(i,!0),new ja(a,!1),[r],[o])}replaceRightSE(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){let e=this.leftSE.point.y,t=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e.isLessThan(t)?e:t},ur:{x:this.rightSE.point.x,y:e.isGreaterThan(t)?e:t}}}vector(){return{x:this.rightSE.point.x.minus(this.leftSE.point.x),y:this.rightSE.point.y.minus(this.leftSE.point.y)}}isAnEndpoint(e){return e.x.eq(this.leftSE.point.x)&&e.y.eq(this.leftSE.point.y)||e.x.eq(this.rightSE.point.x)&&e.y.eq(this.rightSE.point.y)}comparePoint(e){return ba.orient(this.leftSE.point,e,this.rightSE.point)}getIntersection(e){let t=this.bbox(),n=e.bbox(),r=Sa(t,n);if(r===null)return null;let i=this.leftSE.point,a=this.rightSE.point,o=e.leftSE.point,s=e.rightSE.point,c=xa(t,o)&&this.comparePoint(o)===0,l=xa(n,i)&&e.comparePoint(i)===0,u=xa(t,s)&&this.comparePoint(s)===0,d=xa(n,a)&&e.comparePoint(a)===0;if(l&&c)return d&&!u?a:!d&&u?s:null;if(l)return u&&i.x.eq(s.x)&&i.y.eq(s.y)?null:i;if(c)return d&&a.x.eq(o.x)&&a.y.eq(o.y)?null:o;if(d&&u)return null;if(d)return a;if(u)return s;let f=Aa(i,this.vector(),o,e.vector());return f===null||!xa(r,f)?null:ba.snap(f)}split(t){let n=[],r=t.events!==void 0,i=new ja(t,!0),a=new ja(t,!1),o=this.rightSE;this.replaceRightSE(a),n.push(a),n.push(i);let s=new e(i,o,this.rings.slice(),this.windings.slice());return ja.comparePoints(s.leftSE.point,s.rightSE.point)>0&&s.swapEvents(),ja.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.checkForConsuming(),a.checkForConsuming()),n}swapEvents(){let e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let e=0,t=this.windings.length;e<t;e++)this.windings[e]*=-1}consume(t){let n=this,r=t;for(;n.consumedBy;)n=n.consumedBy;for(;r.consumedBy;)r=r.consumedBy;let i=e.compare(n,r);if(i!==0){if(i>0){let e=n;n=r,r=e}if(n.prev===r){let e=n;n=r,r=e}for(let e=0,t=r.rings.length;e<t;e++){let t=r.rings[e],i=r.windings[e],a=n.rings.indexOf(t);a===-1?(n.rings.push(t),n.windings.push(i)):n.windings[a]+=i}r.rings=null,r.windings=null,r.consumedBy=n,r.leftSE.consumedBy=n.leftSE,r.rightSE.consumedBy=n.rightSE}}prevInResult(){return this._prevInResult===void 0&&(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null),this._prevInResult}beforeState(){return this._beforeState===void 0&&(this.prev?this._beforeState=(this.prev.consumedBy||this.prev).afterState():this._beforeState={rings:[],windings:[],multiPolys:[]}),this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;let e=this.beforeState();this._afterState={rings:e.rings.slice(0),windings:e.windings.slice(0),multiPolys:[]};let t=this._afterState.rings,n=this._afterState.windings,r=this._afterState.multiPolys;for(let e=0,r=this.rings.length;e<r;e++){let r=this.rings[e],i=this.windings[e],a=t.indexOf(r);a===-1?(t.push(r),n.push(i)):n[a]+=i}let i=[],a=[];for(let e=0,r=t.length;e<r;e++){if(n[e]===0)continue;let r=t[e],o=r.poly;if(a.indexOf(o)===-1)if(r.isExterior)i.push(o);else{a.indexOf(o)===-1&&a.push(o);let e=i.indexOf(r.poly);e!==-1&&i.splice(e,1)}}for(let e=0,t=i.length;e<t;e++){let t=i[e].multiPoly;r.indexOf(t)===-1&&r.push(t)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;let e=this.beforeState().multiPolys,t=this.afterState().multiPolys;switch(Q.type){case`union`:this._isInResult=e.length===0!=(t.length===0);break;case`intersection`:{let n,r;e.length<t.length?(n=e.length,r=t.length):(n=t.length,r=e.length),this._isInResult=r===Q.numMultiPolys&&n<r;break}case`xor`:this._isInResult=Math.abs(e.length-t.length)%2==1;break;case`difference`:{let n=e=>e.length===1&&e[0].isSubject;this._isInResult=n(e)!==n(t);break}}return this._isInResult}},Ra=class{poly;isExterior;segments;bbox;constructor(e,t,n){if(!Array.isArray(e)||e.length===0||(this.poly=t,this.isExterior=n,this.segments=[],typeof e[0][0]!=`number`||typeof e[0][1]!=`number`))throw Error(`Input geometry is not a valid Polygon or MultiPolygon`);let r=ba.snap({x:new Y(e[0][0]),y:new Y(e[0][1])});this.bbox={ll:{x:r.x,y:r.y},ur:{x:r.x,y:r.y}};let i=r;for(let t=1,n=e.length;t<n;t++){if(typeof e[t][0]!=`number`||typeof e[t][1]!=`number`)throw Error(`Input geometry is not a valid Polygon or MultiPolygon`);let n=ba.snap({x:new Y(e[t][0]),y:new Y(e[t][1])});n.x.eq(i.x)&&n.y.eq(i.y)||(this.segments.push(La.fromRing(i,n,this)),n.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=n.x),n.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=n.y),n.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=n.x),n.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=n.y),i=n)}(!r.x.eq(i.x)||!r.y.eq(i.y))&&this.segments.push(La.fromRing(i,r,this))}getSweepEvents(){let e=[];for(let t=0,n=this.segments.length;t<n;t++){let n=this.segments[t];e.push(n.leftSE),e.push(n.rightSE)}return e}},za=class{multiPoly;exteriorRing;interiorRings;bbox;constructor(e,t){if(!Array.isArray(e))throw Error(`Input geometry is not a valid Polygon or MultiPolygon`);this.exteriorRing=new Ra(e[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let t=1,n=e.length;t<n;t++){let n=new Ra(e[t],this,!1);n.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=n.bbox.ll.x),n.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=n.bbox.ll.y),n.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=n.bbox.ur.x),n.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=n.bbox.ur.y),this.interiorRings.push(n)}this.multiPoly=t}getSweepEvents(){let e=this.exteriorRing.getSweepEvents();for(let t=0,n=this.interiorRings.length;t<n;t++){let n=this.interiorRings[t].getSweepEvents();for(let t=0,r=n.length;t<r;t++)e.push(n[t])}return e}},Ba=class{isSubject;polys;bbox;constructor(e,t){if(!Array.isArray(e))throw Error(`Input geometry is not a valid Polygon or MultiPolygon`);try{typeof e[0][0][0]==`number`&&(e=[e])}catch{}this.polys=[],this.bbox={ll:{x:new Y(1/0),y:new Y(1/0)},ur:{x:new Y(-1/0),y:new Y(-1/0)}};for(let t=0,n=e.length;t<n;t++){let n=new za(e[t],this);n.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=n.bbox.ll.x),n.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=n.bbox.ll.y),n.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=n.bbox.ur.x),n.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=n.bbox.ur.y),this.polys.push(n)}this.isSubject=t}getSweepEvents(){let e=[];for(let t=0,n=this.polys.length;t<n;t++){let n=this.polys[t].getSweepEvents();for(let t=0,r=n.length;t<r;t++)e.push(n[t])}return e}},Va=(e,...t)=>Q.run(`intersection`,e,t);ba.set;function Ha(e,t={}){let n=[];if(jn(e,e=>{n.push(e.coordinates)}),n.length<2)throw Error(`Must specify at least 2 geometries`);let r=Va(n[0],...n.slice(1));return r.length===0?null:r.length===1?Tn(r[0],t.properties):kn(r,t.properties)}var Ua=1e-6,$=Math.PI,Wa=$/2,Ga=$/4,Ka=$*2,qa=180/$,Ja=$/180,Ya=Math.abs,Xa=Math.atan,Za=Math.atan2,Qa=Math.cos,$a=Math.ceil,eo=Math.exp,to=Math.log,no=Math.sin,ro=Math.sign||function(e){return e>0?1:e<0?-1:0},io=Math.sqrt,ao=Math.tan;function oo(e){return e>1?0:e<-1?$:Math.acos(e)}function so(e){return e>1?Wa:e<-1?-Wa:Math.asin(e)}function co(){}function lo(e,t){e&&fo.hasOwnProperty(e.type)&&fo[e.type](e,t)}var uo={Feature:function(e,t){lo(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)lo(n[r].geometry,t)}},fo={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){po(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)po(n[r],t,0)},Polygon:function(e,t){mo(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)mo(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)lo(n[r],t)}};function po(e,t,n){var r=-1,i=e.length-n,a;for(t.lineStart();++r<i;)a=e[r],t.point(a[0],a[1],a[2]);t.lineEnd()}function mo(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)po(e[n],t,1);t.polygonEnd()}function ho(e,t){e&&uo.hasOwnProperty(e.type)?uo[e.type](e,t):lo(e,t)}function go(e){return[Za(e[1],e[0]),so(e[2])]}function _o(e){var t=e[0],n=e[1],r=Qa(n);return[r*Qa(t),r*no(t),no(n)]}function vo(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function yo(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function bo(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function xo(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function So(e){var t=io(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function Co(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return n=t.invert(n,r),n&&e.invert(n[0],n[1])}),n}function wo(e,t){return Ya(e)>$&&(e-=Math.round(e/Ka)*Ka),[e,t]}wo.invert=wo;function To(e,t,n){return(e%=Ka)?t||n?Co(Do(e),Oo(t,n)):Do(e):t||n?Oo(t,n):wo}function Eo(e){return function(t,n){return t+=e,Ya(t)>$&&(t-=Math.round(t/Ka)*Ka),[t,n]}}function Do(e){var t=Eo(e);return t.invert=Eo(-e),t}function Oo(e,t){var n=Qa(e),r=no(e),i=Qa(t),a=no(t);function o(e,t){var o=Qa(t),s=Qa(e)*o,c=no(e)*o,l=no(t),u=l*n+s*r;return[Za(c*i-u*a,s*n-l*r),so(u*i+c*a)]}return o.invert=function(e,t){var o=Qa(t),s=Qa(e)*o,c=no(e)*o,l=no(t),u=l*i-c*a;return[Za(c*i+l*a,s*n+u*r),so(u*n-s*r)]},o}function ko(e){e=To(e[0]*Ja,e[1]*Ja,e.length>2?e[2]*Ja:0);function t(t){return t=e(t[0]*Ja,t[1]*Ja),t[0]*=qa,t[1]*=qa,t}return t.invert=function(t){return t=e.invert(t[0]*Ja,t[1]*Ja),t[0]*=qa,t[1]*=qa,t},t}function Ao(e,t,n,r,i,a){if(n){var o=Qa(t),s=no(t),c=r*n;i==null?(i=t+r*Ka,a=t-c/2):(i=jo(o,i),a=jo(o,a),(r>0?i<a:i>a)&&(i+=r*Ka));for(var l,u=i;r>0?u>a:u<a;u-=c)l=go([o,-s*Qa(u),-s*no(u)]),e.point(l[0],l[1])}}function jo(e,t){t=_o(t),t[0]-=e,So(t);var n=oo(-t[1]);return((-t[2]<0?-n:n)+Ka-Ua)%Ka}function Mo(){var e=[],t;return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:co,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function No(e,t){return Ya(e[0]-t[0])<1e-6&&Ya(e[1]-t[1])<1e-6}function Po(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Fo(e,t,n,r,i){var a=[],o=[],s,c;if(e.forEach(function(e){if(!((t=e.length-1)<=0)){var t,n=e[0],r=e[t],c;if(No(n,r)){if(!n[2]&&!r[2]){for(i.lineStart(),s=0;s<t;++s)i.point((n=e[s])[0],n[1]);i.lineEnd();return}r[0]+=2*Ua}a.push(c=new Po(n,e,null,!0)),o.push(c.o=new Po(n,null,c,!1)),a.push(c=new Po(r,e,null,!1)),o.push(c.o=new Po(r,null,c,!0))}}),a.length){for(o.sort(t),Io(a),Io(o),s=0,c=o.length;s<c;++s)o[s].e=n=!n;for(var l=a[0],u,d;;){for(var f=l,p=!0;f.v;)if((f=f.n)===l)return;u=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(p)for(s=0,c=u.length;s<c;++s)i.point((d=u[s])[0],d[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(p)for(u=f.p.z,s=u.length-1;s>=0;--s)i.point((d=u[s])[0],d[1]);else r(f.x,f.p.x,-1,i);f=f.p}f=f.o,u=f.z,p=!p}while(!f.v);i.lineEnd()}}}function Io(e){if(t=e.length){for(var t,n=0,r=e[0],i;++n<t;)r.n=i=e[n],i.p=r,r=i;r.n=i=e[0],i.p=r}}function Lo(e){return Ya(e[0])<=$?e[0]:ro(e[0])*((Ya(e[0])+$)%Ka-$)}function Ro(e,t){var n=Lo(t),r=t[1],i=no(r),a=[no(n),-Qa(n),0],o=0,s=0,c=new bt;i===1?r=Wa+Ua:i===-1&&(r=-Wa-Ua);for(var l=0,u=e.length;l<u;++l)if(f=(d=e[l]).length)for(var d,f,p=d[f-1],m=Lo(p),h=p[1]/2+Ga,g=no(h),_=Qa(h),v=0;v<f;++v,m=b,g=S,_=C,p=y){var y=d[v],b=Lo(y),x=y[1]/2+Ga,S=no(x),C=Qa(x),w=b-m,T=w>=0?1:-1,E=T*w,D=E>$,O=g*S;if(c.add(Za(O*T*no(E),_*C+O*Qa(E))),o+=D?w+T*Ka:w,D^m>=n^b>=n){var k=yo(_o(p),_o(y));So(k);var A=yo(a,k);So(A);var j=(D^w>=0?-1:1)*so(A[2]);(r>j||r===j&&(k[0]||k[1]))&&(s+=D^w>=0?1:-1)}}return(o<-1e-6||o<1e-6&&c<-1e-12)^s&1}function zo(e,t,n,r){return function(i){var a=t(i),o=Mo(),s=t(o),c=!1,l,u,d,f={point:p,lineStart:h,lineEnd:g,polygonStart:function(){f.point=_,f.lineStart=v,f.lineEnd=y,u=[],l=[]},polygonEnd:function(){f.point=p,f.lineStart=h,f.lineEnd=g,u=Ft(u);var e=Ro(l,r);u.length?(c||=(i.polygonStart(),!0),Fo(u,Vo,e,n,i)):e&&(c||=(i.polygonStart(),!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),c&&=(i.polygonEnd(),!1),u=l=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(t,n){e(t,n)&&i.point(t,n)}function m(e,t){a.point(e,t)}function h(){f.point=m,a.lineStart()}function g(){f.point=p,a.lineEnd()}function _(e,t){d.push([e,t]),s.point(e,t)}function v(){s.lineStart(),d=[]}function y(){_(d[0][0],d[0][1]),s.lineEnd();var e=s.clean(),t=o.result(),n,r=t.length,a,f,p;if(d.pop(),l.push(d),d=null,r){if(e&1){if(f=t[0],(a=f.length-1)>0){for(c||=(i.polygonStart(),!0),i.lineStart(),n=0;n<a;++n)i.point((p=f[n])[0],p[1]);i.lineEnd()}return}r>1&&e&2&&t.push(t.pop().concat(t.shift())),u.push(t.filter(Bo))}}return f}}function Bo(e){return e.length>1}function Vo(e,t){return((e=e.x)[0]<0?e[1]-Wa-Ua:Wa-e[1])-((t=t.x)[0]<0?t[1]-Wa-Ua:Wa-t[1])}var Ho=zo(function(){return!0},Uo,Go,[-$,-Wa]);function Uo(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(a,o){var s=a>0?$:-$,c=Ya(a-t);Ya(c-$)<1e-6?(e.point(t,n=(n+o)/2>0?Wa:-Wa),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),e.point(a,n),i=0):r!==s&&c>=$&&(Ya(t-r)<1e-6&&(t-=r*Ua),Ya(a-s)<1e-6&&(a-=s*Ua),n=Wo(t,n,a,o),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),i=0),e.point(t=a,n=o),r=s},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}}function Wo(e,t,n,r){var i,a,o=no(e-n);return Ya(o)>1e-6?Xa((no(t)*(a=Qa(r))*no(n)-no(r)*(i=Qa(t))*no(e))/(i*a*o)):(t+r)/2}function Go(e,t,n,r){var i;if(e==null)i=n*Wa,r.point(-$,i),r.point(0,i),r.point($,i),r.point($,0),r.point($,-i),r.point(0,-i),r.point(-$,-i),r.point(-$,0),r.point(-$,i);else if(Ya(e[0]-t[0])>1e-6){var a=e[0]<t[0]?$:-$;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(t[0],t[1])}function Ko(e){var t=Qa(e),n=2*Ja,r=t>0,i=Ya(t)>Ua;function a(t,r,i,a){Ao(a,e,n,i,t,r)}function o(e,n){return Qa(e)*Qa(n)>t}function s(e){var t,n,a,s,u;return{lineStart:function(){s=a=!1,u=1},point:function(d,f){var p=[d,f],m,h=o(d,f),g=r?h?0:l(d,f):h?l(d+(d<0?$:-$),f):0;if(!t&&(s=a=h)&&e.lineStart(),h!==a&&(m=c(t,p),(!m||No(t,m)||No(p,m))&&(p[2]=1)),h!==a)u=0,h?(e.lineStart(),m=c(p,t),e.point(m[0],m[1])):(m=c(t,p),e.point(m[0],m[1],2),e.lineEnd()),t=m;else if(i&&t&&r^h){var _;!(g&n)&&(_=c(p,t,!0))&&(u=0,r?(e.lineStart(),e.point(_[0][0],_[0][1]),e.point(_[1][0],_[1][1]),e.lineEnd()):(e.point(_[1][0],_[1][1]),e.lineEnd(),e.lineStart(),e.point(_[0][0],_[0][1],3)))}h&&(!t||!No(t,p))&&e.point(p[0],p[1]),t=p,a=h,n=g},lineEnd:function(){a&&e.lineEnd(),t=null},clean:function(){return u|(s&&a)<<1}}}function c(e,n,r){var i=_o(e),a=_o(n),o=[1,0,0],s=yo(i,a),c=vo(s,s),l=s[0],u=c-l*l;if(!u)return!r&&e;var d=t*c/u,f=-t*l/u,p=yo(o,s),m=xo(o,d);bo(m,xo(s,f));var h=p,g=vo(m,h),_=vo(h,h),v=g*g-_*(vo(m,m)-1);if(!(v<0)){var y=io(v),b=xo(h,(-g-y)/_);if(bo(b,m),b=go(b),!r)return b;var x=e[0],S=n[0],C=e[1],w=n[1],T;S<x&&(T=x,x=S,S=T);var E=S-x,D=Ya(E-$)<Ua,O=D||E<1e-6;if(!D&&w<C&&(T=C,C=w,w=T),O?D?C+w>0^b[1]<(Ya(b[0]-x)<1e-6?C:w):C<=b[1]&&b[1]<=w:E>$^(x<=b[0]&&b[0]<=S)){var k=xo(h,(-g+y)/_);return bo(k,m),[b,go(k)]}}}function l(t,n){var i=r?e:$-e,a=0;return t<-i?a|=1:t>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return zo(o,s,a,r?[0,-e]:[-$,e-$])}function qo(e,t,n,r,i,a){var o=e[0],s=e[1],c=t[0],l=t[1],u=0,d=1,f=c-o,p=l-s,m=n-o;if(!(!f&&m>0)){if(m/=f,f<0){if(m<u)return;m<d&&(d=m)}else if(f>0){if(m>d)return;m>u&&(u=m)}if(m=i-o,!(!f&&m<0)){if(m/=f,f<0){if(m>d)return;m>u&&(u=m)}else if(f>0){if(m<u)return;m<d&&(d=m)}if(m=r-s,!(!p&&m>0)){if(m/=p,p<0){if(m<u)return;m<d&&(d=m)}else if(p>0){if(m>d)return;m>u&&(u=m)}if(m=a-s,!(!p&&m<0)){if(m/=p,p<0){if(m>d)return;m>u&&(u=m)}else if(p>0){if(m<u)return;m<d&&(d=m)}return u>0&&(e[0]=o+u*f,e[1]=s+u*p),d<1&&(t[0]=o+d*f,t[1]=s+d*p),!0}}}}}var Jo=1e9,Yo=-Jo;function Xo(e,t,n,r){function i(i,a){return e<=i&&i<=n&&t<=a&&a<=r}function a(i,a,s,l){var u=0,d=0;if(i==null||(u=o(i,s))!==(d=o(a,s))||c(i,a)<0^s>0)do l.point(u===0||u===3?e:n,u>1?r:t);while((u=(u+s+4)%4)!==d);else l.point(a[0],a[1])}function o(r,i){return Ya(r[0]-e)<1e-6?i>0?0:3:Ya(r[0]-n)<1e-6?i>0?2:1:Ya(r[1]-t)<1e-6?i>0?1:0:i>0?3:2}function s(e,t){return c(e.x,t.x)}function c(e,t){var n=o(e,1),r=o(t,1);return n===r?n===0?t[1]-e[1]:n===1?e[0]-t[0]:n===2?e[1]-t[1]:t[0]-e[0]:n-r}return function(o){var c=o,l=Mo(),u,d,f,p,m,h,g,_,v,y,b,x={point:S,lineStart:E,lineEnd:D,polygonStart:w,polygonEnd:T};function S(e,t){i(e,t)&&c.point(e,t)}function C(){for(var t=0,n=0,i=d.length;n<i;++n)for(var a=d[n],o=1,s=a.length,c=a[0],l,u,f=c[0],p=c[1];o<s;++o)l=f,u=p,c=a[o],f=c[0],p=c[1],u<=r?p>r&&(f-l)*(r-u)>(p-u)*(e-l)&&++t:p<=r&&(f-l)*(r-u)<(p-u)*(e-l)&&--t;return t}function w(){c=l,u=[],d=[],b=!0}function T(){var e=C(),t=b&&e,n=(u=Ft(u)).length;(t||n)&&(o.polygonStart(),t&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),n&&Fo(u,s,e,a,o),o.polygonEnd()),c=o,u=d=f=null}function E(){x.point=O,d&&d.push(f=[]),y=!0,v=!1,g=_=NaN}function D(){u&&(O(p,m),h&&v&&l.rejoin(),u.push(l.result())),x.point=S,v&&c.lineEnd()}function O(a,o){var s=i(a,o);if(d&&f.push([a,o]),y)p=a,m=o,h=s,y=!1,s&&(c.lineStart(),c.point(a,o));else if(s&&v)c.point(a,o);else{var l=[g=Math.max(Yo,Math.min(Jo,g)),_=Math.max(Yo,Math.min(Jo,_))],u=[a=Math.max(Yo,Math.min(Jo,a)),o=Math.max(Yo,Math.min(Jo,o))];qo(l,u,e,t,n,r)?(v||(c.lineStart(),c.point(l[0],l[1])),c.point(u[0],u[1]),s||c.lineEnd(),b=!1):s&&(c.lineStart(),c.point(a,o),b=!1)}g=a,_=o,v=s}return x}}function Zo(e,t,n){var r=H(e,t-Ua,n).concat(t);return function(e){return r.map(function(t){return[e,t]})}}function Qo(e,t,n){var r=H(e,t-Ua,n).concat(t);return function(e){return r.map(function(t){return[t,e]})}}function $o(){var e,t,n,r,i,a,o,s,c=10,l=c,u=90,d=360,f,p,m,h,g=2.5;function _(){return{type:`MultiLineString`,coordinates:v()}}function v(){return H($a(r/u)*u,n,u).map(m).concat(H($a(s/d)*d,o,d).map(h)).concat(H($a(t/c)*c,e,c).filter(function(e){return Ya(e%u)>Ua}).map(f)).concat(H($a(a/l)*l,i,l).filter(function(e){return Ya(e%d)>Ua}).map(p))}return _.lines=function(){return v().map(function(e){return{type:`LineString`,coordinates:e}})},_.outline=function(){return{type:`Polygon`,coordinates:[m(r).concat(h(o).slice(1),m(n).reverse().slice(1),h(s).reverse().slice(1))]}},_.extent=function(e){return arguments.length?_.extentMajor(e).extentMinor(e):_.extentMinor()},_.extentMajor=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],s=+e[0][1],o=+e[1][1],r>n&&(e=r,r=n,n=e),s>o&&(e=s,s=o,o=e),_.precision(g)):[[r,s],[n,o]]},_.extentMinor=function(n){return arguments.length?(t=+n[0][0],e=+n[1][0],a=+n[0][1],i=+n[1][1],t>e&&(n=t,t=e,e=n),a>i&&(n=a,a=i,i=n),_.precision(g)):[[t,a],[e,i]]},_.step=function(e){return arguments.length?_.stepMajor(e).stepMinor(e):_.stepMinor()},_.stepMajor=function(e){return arguments.length?(u=+e[0],d=+e[1],_):[u,d]},_.stepMinor=function(e){return arguments.length?(c=+e[0],l=+e[1],_):[c,l]},_.precision=function(c){return arguments.length?(g=+c,f=Zo(a,i,90),p=Qo(t,e,g),m=Zo(s,o,90),h=Qo(r,n,g),_):g},_.extentMajor([[-180,-90+Ua],[180,90-Ua]]).extentMinor([[-180,-80-Ua],[180,80+Ua]])}var es=e=>e,ts=new bt,ns=new bt,rs,is,as,os,ss={point:co,lineStart:co,lineEnd:co,polygonStart:function(){ss.lineStart=cs,ss.lineEnd=ds},polygonEnd:function(){ss.lineStart=ss.lineEnd=ss.point=co,ts.add(Ya(ns)),ns=new bt},result:function(){var e=ts/2;return ts=new bt,e}};function cs(){ss.point=ls}function ls(e,t){ss.point=us,rs=as=e,is=os=t}function us(e,t){ns.add(os*e-as*t),as=e,os=t}function ds(){us(rs,is)}var fs=1/0,ps=fs,ms=-fs,hs=ms,gs={point:_s,lineStart:co,lineEnd:co,polygonStart:co,polygonEnd:co,result:function(){var e=[[fs,ps],[ms,hs]];return ms=hs=-(ps=fs=1/0),e}};function _s(e,t){e<fs&&(fs=e),e>ms&&(ms=e),t<ps&&(ps=t),t>hs&&(hs=t)}var vs=0,ys=0,bs=0,xs=0,Ss=0,Cs=0,ws=0,Ts=0,Es=0,Ds,Os,ks,As,js={point:Ms,lineStart:Ns,lineEnd:Is,polygonStart:function(){js.lineStart=Ls,js.lineEnd=Rs},polygonEnd:function(){js.point=Ms,js.lineStart=Ns,js.lineEnd=Is},result:function(){var e=Es?[ws/Es,Ts/Es]:Cs?[xs/Cs,Ss/Cs]:bs?[vs/bs,ys/bs]:[NaN,NaN];return vs=ys=bs=xs=Ss=Cs=ws=Ts=Es=0,e}};function Ms(e,t){vs+=e,ys+=t,++bs}function Ns(){js.point=Ps}function Ps(e,t){js.point=Fs,Ms(ks=e,As=t)}function Fs(e,t){var n=e-ks,r=t-As,i=io(n*n+r*r);xs+=i*(ks+e)/2,Ss+=i*(As+t)/2,Cs+=i,Ms(ks=e,As=t)}function Is(){js.point=Ms}function Ls(){js.point=zs}function Rs(){Bs(Ds,Os)}function zs(e,t){js.point=Bs,Ms(Ds=ks=e,Os=As=t)}function Bs(e,t){var n=e-ks,r=t-As,i=io(n*n+r*r);xs+=i*(ks+e)/2,Ss+=i*(As+t)/2,Cs+=i,i=As*e-ks*t,ws+=i*(ks+e),Ts+=i*(As+t),Es+=i*3,Ms(ks=e,As=t)}function Vs(e){this._context=e}Vs.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,Ka);break}},result:co};var Hs=new bt,Us,Ws,Gs,Ks,qs,Js={point:co,lineStart:function(){Js.point=Ys},lineEnd:function(){Us&&Xs(Ws,Gs),Js.point=co},polygonStart:function(){Us=!0},polygonEnd:function(){Us=null},result:function(){var e=+Hs;return Hs=new bt,e}};function Ys(e,t){Js.point=Xs,Ws=Ks=e,Gs=qs=t}function Xs(e,t){Ks-=e,qs-=t,Hs.add(io(Ks*Ks+qs*qs)),Ks=e,qs=t}var Zs,Qs,$s,ec,tc=class{constructor(e){this._append=e==null?nc:rc(e),this._radius=4.5,this._=``}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+=`Z`),this._point=NaN}point(e,t){switch(this._point){case 0:this._append`M${e},${t}`,this._point=1;break;case 1:this._append`L${e},${t}`;break;default:if(this._append`M${e},${t}`,this._radius!==$s||this._append!==Qs){let e=this._radius,t=this._;this._=``,this._append`m0,${e}a${e},${e} 0 1,1 0,${-2*e}a${e},${e} 0 1,1 0,${2*e}z`,$s=e,Qs=this._append,ec=this._,this._=t}this._+=ec;break}}result(){let e=this._;return this._=``,e.length?e:null}};function nc(e){let t=1;this._+=e[0];for(let n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function rc(e){let t=Math.floor(e);if(!(t>=0))throw RangeError(`invalid digits: ${e}`);if(t>15)return nc;if(t!==Zs){let e=10**t;Zs=t,Qs=function(t){let n=1;this._+=t[0];for(let r=t.length;n<r;++n)this._+=Math.round(arguments[n]*e)/e+t[n]}}return Qs}function ic(e,t){let n=3,r=4.5,i,a;function o(e){return e&&(typeof r==`function`&&a.pointRadius(+r.apply(this,arguments)),ho(e,i(a))),a.result()}return o.area=function(e){return ho(e,i(ss)),ss.result()},o.measure=function(e){return ho(e,i(Js)),Js.result()},o.bounds=function(e){return ho(e,i(gs)),gs.result()},o.centroid=function(e){return ho(e,i(js)),js.result()},o.projection=function(t){return arguments.length?(i=t==null?(e=null,es):(e=t).stream,o):e},o.context=function(e){return arguments.length?(a=e==null?(t=null,new tc(n)):new Vs(t=e),typeof r!=`function`&&a.pointRadius(r),o):t},o.pointRadius=function(e){return arguments.length?(r=typeof e==`function`?e:(a.pointRadius(+e),+e),o):r},o.digits=function(e){if(!arguments.length)return n;if(e==null)n=null;else{let t=Math.floor(e);if(!(t>=0))throw RangeError(`invalid digits: ${e}`);n=t}return t===null&&(a=new tc(n)),o},o.projection(e).digits(n).context(t)}function ac(e){return function(t){var n=new oc;for(var r in e)n[r]=e[r];return n.stream=t,n}}function oc(){}oc.prototype={constructor:oc,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function sc(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),ho(n,e.stream(gs)),t(gs.result()),r!=null&&e.clipExtent(r),e}function cc(e,t,n){return sc(e,function(n){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+t[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+t[0][1]+(i-a*(n[1][1]+n[0][1]))/2;e.scale(150*a).translate([o,s])},n)}function lc(e,t,n){return cc(e,[[0,0],t],n)}function uc(e,t,n){return sc(e,function(n){var r=+t,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];e.scale(150*i).translate([a,o])},n)}function dc(e,t,n){return sc(e,function(n){var r=+t,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;e.scale(150*i).translate([a,o])},n)}var fc=16,pc=Qa(30*Ja);function mc(e,t){return+t?gc(e,t):hc(e)}function hc(e){return ac({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function gc(e,t){function n(r,i,a,o,s,c,l,u,d,f,p,m,h,g){var _=l-r,v=u-i,y=_*_+v*v;if(y>4*t&&h--){var b=o+f,x=s+p,S=c+m,C=io(b*b+x*x+S*S),w=so(S/=C),T=Ya(Ya(S)-1)<1e-6||Ya(a-d)<1e-6?(a+d)/2:Za(x,b),E=e(T,w),D=E[0],O=E[1],k=D-r,A=O-i,j=v*k-_*A;(j*j/y>t||Ya((_*k+v*A)/y-.5)>.3||o*f+s*p+c*m<pc)&&(n(r,i,a,o,s,c,D,O,T,b/=C,x/=C,S,h,g),g.point(D,O),n(D,O,T,b,x,S,l,u,d,f,p,m,h,g))}}return function(t){var r,i,a,o,s,c,l,u,d,f,p,m,h={point:g,lineStart:_,lineEnd:y,polygonStart:function(){t.polygonStart(),h.lineStart=b},polygonEnd:function(){t.polygonEnd(),h.lineStart=_}};function g(n,r){n=e(n,r),t.point(n[0],n[1])}function _(){u=NaN,h.point=v,t.lineStart()}function v(r,i){var a=_o([r,i]),o=e(r,i);n(u,d,l,f,p,m,u=o[0],d=o[1],l=r,f=a[0],p=a[1],m=a[2],fc,t),t.point(u,d)}function y(){h.point=g,t.lineEnd()}function b(){_(),h.point=x,h.lineEnd=S}function x(e,t){v(r=e,t),i=u,a=d,o=f,s=p,c=m,h.point=v}function S(){n(u,d,l,f,p,m,i,a,r,o,s,c,fc,t),h.lineEnd=y,y()}return h}}var _c=ac({point:function(e,t){this.stream.point(e*Ja,t*Ja)}});function vc(e){return ac({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function yc(e,t,n,r,i){function a(a,o){return a*=r,o*=i,[t+e*a,n-e*o]}return a.invert=function(a,o){return[(a-t)/e*r,(n-o)/e*i]},a}function bc(e,t,n,r,i,a){if(!a)return yc(e,t,n,r,i);var o=Qa(a),s=no(a),c=o*e,l=s*e,u=o/e,d=s/e,f=(s*n-o*t)/e,p=(s*t+o*n)/e;function m(e,a){return e*=r,a*=i,[c*e-l*a+t,n-l*e-c*a]}return m.invert=function(e,t){return[r*(u*e-d*t+f),i*(p-d*e-u*t)]},m}function xc(e){return Sc(function(){return e})()}function Sc(e){var t,n=150,r=480,i=250,a=0,o=0,s=0,c=0,l=0,u,d=0,f=1,p=1,m=null,h=Ho,g=null,_,v,y,b=es,x=.5,S,C,w,T,E;function D(e){return w(e[0]*Ja,e[1]*Ja)}function O(e){return e=w.invert(e[0],e[1]),e&&[e[0]*qa,e[1]*qa]}D.stream=function(e){return T&&E===e?T:T=_c(vc(u)(h(S(b(E=e)))))},D.preclip=function(e){return arguments.length?(h=e,m=void 0,A()):h},D.postclip=function(e){return arguments.length?(b=e,g=_=v=y=null,A()):b},D.clipAngle=function(e){return arguments.length?(h=+e?Ko(m=e*Ja):(m=null,Ho),A()):m*qa},D.clipExtent=function(e){return arguments.length?(b=e==null?(g=_=v=y=null,es):Xo(g=+e[0][0],_=+e[0][1],v=+e[1][0],y=+e[1][1]),A()):g==null?null:[[g,_],[v,y]]},D.scale=function(e){return arguments.length?(n=+e,k()):n},D.translate=function(e){return arguments.length?(r=+e[0],i=+e[1],k()):[r,i]},D.center=function(e){return arguments.length?(a=e[0]%360*Ja,o=e[1]%360*Ja,k()):[a*qa,o*qa]},D.rotate=function(e){return arguments.length?(s=e[0]%360*Ja,c=e[1]%360*Ja,l=e.length>2?e[2]%360*Ja:0,k()):[s*qa,c*qa,l*qa]},D.angle=function(e){return arguments.length?(d=e%360*Ja,k()):d*qa},D.reflectX=function(e){return arguments.length?(f=e?-1:1,k()):f<0},D.reflectY=function(e){return arguments.length?(p=e?-1:1,k()):p<0},D.precision=function(e){return arguments.length?(S=mc(C,x=e*e),A()):io(x)},D.fitExtent=function(e,t){return cc(D,e,t)},D.fitSize=function(e,t){return lc(D,e,t)},D.fitWidth=function(e,t){return uc(D,e,t)},D.fitHeight=function(e,t){return dc(D,e,t)};function k(){var e=bc(n,0,0,f,p,d).apply(null,t(a,o)),m=bc(n,r-e[0],i-e[1],f,p,d);return u=To(s,c,l),C=Co(t,m),w=Co(u,C),S=mc(C,x),A()}function A(){return T=E=null,D}return function(){return t=e.apply(this,arguments),D.invert=t.invert&&O,k()}}function Cc(e){return function(t,n){var r=io(t*t+n*n),i=e(r),a=no(i),o=Qa(i);return[Za(t*a,r*o),so(r&&n*a/r)]}}function wc(e,t){return[e,to(ao((Wa+t)/2))]}wc.invert=function(e,t){return[e,2*Xa(eo(t))-Wa]};function Tc(){return Ec(wc).scale(961/Ka)}function Ec(e){var t=xc(e),n=t.center,r=t.scale,i=t.translate,a=t.clipExtent,o=null,s,c,l;t.scale=function(e){return arguments.length?(r(e),u()):r()},t.translate=function(e){return arguments.length?(i(e),u()):i()},t.center=function(e){return arguments.length?(n(e),u()):n()},t.clipExtent=function(e){return arguments.length?(e==null?o=s=c=l=null:(o=+e[0][0],s=+e[0][1],c=+e[1][0],l=+e[1][1]),u()):o==null?null:[[o,s],[c,l]]};function u(){var n=$*r(),i=t(ko(t.rotate()).invert([0,0]));return a(o==null?[[i[0]-n,i[1]-n],[i[0]+n,i[1]+n]]:e===wc?[[Math.max(i[0]-n,o),s],[Math.min(i[0]+n,c),l]]:[[o,Math.max(i[1]-n,s)],[c,Math.min(i[1]+n,l)]])}return u()}function Dc(e,t){return[Qa(t)*no(e),no(t)]}Dc.invert=Cc(so);function Oc(){return xc(Dc).scale(249.5).clipAngle(90+Ua)}var kc=100;function Ac(e,t,n){let r=document.createElement(`div`);r.className=`adornment`;let i=e.scale??1,a=i*kc;r.style.width=`${a}px`,r.style.height=`${a}px`,r.style.flexGrow=`0`,r.style.flexShrink=`0`;let o={id:e.id,map:t,container:r,moveEndPosition:t.getCenter(),geoJson:void 0,isGlobe:e.isGlobe,boundingBox:e.boundingBox,scale:i,backgroundColor:e.backgroundColor??`#000000`,globeBackgroundColor:e.globeBackgroundColor??`#000000`,borderColor:e.borderColor??`#000000`,primaryFillColor:e.primaryFillColor??`#000000`,primaryStrokeColor:e.primaryStrokeColor??`#000000`,secondaryFillColor:e.secondaryFillColor??`#000000`,secondaryStrokeColor:e.secondaryStrokeColor??`#000000`,graticuleColor:e.graticuleColor??`#000000`,frameColor:e.frameColor??`#000000`,frameOutlineColor:e.frameOutlineColor??`#000000`,dotColor:e.dotColor??`#000000`,dotOutlineColor:e.dotOutlineColor??`#000000`,globeFallbackActive:!1,globeGeoJsonRequested:!1,globeGeoJson:void 0};return fetch(`${n}data/insetmaps/${e.fileName}`).then(e=>e.json()).then(e=>{o.geoJson=Vi(e,Object.keys(e.objects)[0]),jc(o)}),t.on(`moveend`,()=>{o.moveEndPosition=t.getCenter(),(o.isGlobe||o.globeFallbackActive)&&jc(o)}),t.on(`move`,()=>{if(!o.isGlobe){let[e,r,i,a]=o.boundingBox,s=Pc(t),c=Ha(Dn([s,Tn([[[e,r],[e,a],[i,a],[i,r],[e,r]]])])),l=Mi(s),u=(c?Mi(c):0)<l*.75;o.globeFallbackActive!==u&&(o.globeFallbackActive=u,o.moveEndPosition=t.getCenter(),jc(o)),o.globeFallbackActive&&!o.globeGeoJsonRequested&&(o.globeGeoJsonRequested=!0,fetch(`${n}data/insetmaps/world-110m.json`).then(e=>e.json()).then(e=>{o.globeGeoJson=Vi(e,Object.keys(e.objects)[0]),o.moveEndPosition=t.getCenter(),jc(o)}))}Nc(o)}),r}function jc(e){let{id:t,container:n,scale:r,backgroundColor:i,globeBackgroundColor:a,secondaryFillColor:o,secondaryStrokeColor:s,primaryFillColor:c,primaryStrokeColor:l,graticuleColor:u,borderColor:d,frameColor:f,frameOutlineColor:p,dotColor:m,dotOutlineColor:h}=e,g=e.globeFallbackActive&&e.globeGeoJson!==void 0,_=g?e.globeGeoJson:e.geoJson,v=g||e.isGlobe;if(_===void 0)return;let y=kc*r,b=y/2,x=.1*r,S=[v?`<circle cx="${b}" cy="${b}" r="${b}" fill="${a}"></circle>`:`<rect x="0" y="0" width="${y}" height="${y}" fill="${i}"></rect>`],{path:C}=Mc(e),w=C({..._,features:_.features.filter(e=>e.properties?.class!==`P1`)});w&&S.push(`
916
+ `,onClick:()=>{if(!t){if(e.getSource(`location-circle`)||gi(e),n(!0),!navigator.geolocation){yi(),n(!1);return}navigator.geolocation.getCurrentPosition(r,i,{maximumAge:6e4,timeout:5e3})}}})}var xi=`<svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M6.155 1.146A.546.546 0 0 1 6.53 1c.14 0 .275.053.375.146l1.588 1.5c.1.094.155.221.155.354 0 .132-.056.26-.155.353l-1.588 1.5a.546.546 0 0 1-.373.14.545.545 0 0 1-.37-.146.487.487 0 0 1-.154-.349.486.486 0 0 1 .148-.352L6.84 3.5H6c-1.878 0-3.441 1.476-3.441 3.25S4.122 10 6 10s3.441-1.476 3.441-3.25c0-.133.056-.26.155-.354a.546.546 0 0 1 .375-.146c.14 0 .275.053.374.146.1.094.155.221.155.354C10.5 9.076 8.463 11 6 11S1.5 9.076 1.5 6.75 3.537 2.5 6 2.5h.84l-.685-.647A.486.486 0 0 1 6 1.5c0-.133.056-.26.155-.354Z"/></svg>
917
+ `;function Si(e,t){return ri({type:`button`,className:`control-button refresh-button`,content:xi,onClick:()=>{let n=e.getContainer(),r=0;if(n.clientWidth>0&&n.clientHeight>0){let e=Math.min(n.clientWidth/t.width,n.clientHeight/t.height);r=Math.log(e)/Math.LN2}e.easeTo({center:t.center,zoom:t.zoom-t.detailLevel+r,pitch:t.pitch,bearing:t.rotation})}})}var Ci=`<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="currentColor"><path d="M5.374.952a4.546 4.546 0 0 1 4.656 4.175 4.55 4.55 0 0 1-.958 3.184l1.824 1.81a.55.55 0 0 1 0 .765.55.55 0 0 1-.602.121.6.6 0 0 1-.179-.12l-1.807-1.81A4.544 4.544 0 0 1 .953 5.376 4.553 4.553 0 0 1 5.374.952m1.454 1.37a3.447 3.447 0 0 0-4.505 4.51 3.45 3.45 0 0 0 3.186 2.13A3.45 3.45 0 0 0 8.957 5.51a3.455 3.455 0 0 0-2.129-3.187"/></svg>
918
+ `,wi=`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="currentColor"><path d="m7.038 5.96 3.03 3.03L13.1 5.958l1.01 1.01L11.078 10l3.031 3.032-1.01 1.01-3.031-3.031-3.03 3.028-1.01-1.01L9.059 10l-3.03-3.03z"/></svg>
919
+ `,Ti={da_DK:{search:`Search`,videoAlert:`The video will only work when you publish the map`,mobileHelpText:`Use two fingers to move the map`,windowsHelpText:`Use Ctrl + scroll to zoom the map`,macHelpText:`Use ⌘ + scroll to zoom the map`},de_DE:{search:`Suche`,videoAlert:`Das Video ist in der veröffentlichten Karte sichtbar.`,mobileHelpText:`Verwenden Sie zwei Finger um die Karte zu bewegen`,windowsHelpText:`Verwenden Sie Strg + Scroll um in der Karte zu zoomen`,macHelpText:`Verwenden Sie ⌘ + Scroll um in der Karte zu zoomen`},en_GB:{search:`Search`,videoAlert:`The video will only work when you publish the map`,mobileHelpText:`Use two fingers to move the map`,windowsHelpText:`Use Ctrl + scroll to zoom the map`,macHelpText:`Use ⌘ + scroll to zoom the map`},es_ES:{search:`Buscar`,videoAlert:`The video will only work when you publish the map`,mobileHelpText:`Use dos dedos para mover el mapa`,windowsHelpText:`Use Ctrl + desplazamiento para hacer zoom en el mapa`,macHelpText:`Use ⌘ + desplazamiento para hacer zoom en el mapa`},fr_FR:{search:`Rechercher`,videoAlert:`Votre vidéo sera diffusée sur la carte publiée`,mobileHelpText:`Utilisez deux doigts pour déplacer la carte`,windowsHelpText:`Utilisez Ctrl + défilement pour zoomer sur la carte`,macHelpText:`Utilisez ⌘ + défilement pour zoomer sur la carte`},it_IT:{search:`Cercare`,videoAlert:`The video will only work when you publish the map`,mobileHelpText:`Usa due dita per muovere la mappa`,windowsHelpText:`Usa Ctrl + Scroll per ingrandire la mappa`,macHelpText:`Usa ⌘ + Scroll per ingrandire la mappa`},nl_NL:{search:`Zoeken`,videoAlert:`The video will only work when you publish the map`,mobileHelpText:`Gebruik twee vingers om de kaart te bewegen`,windowsHelpText:`Gebruik Ctrl + Scroll om de kaart te zoomen`,macHelpText:`Gebruik ⌘ + Scroll om de kaart te zoomen`}};function Ei(){let e=navigator.language.replace(`-`,`_`),t=Object.keys(Ti);return t.find(t=>t===e)??t.find(t=>t.split(`_`)[0]===e.split(`_`)[0])??`en_GB`}var Di=Ei();function Oi(e){return Ti[Di][e]??e}var ki=class{async getLocationInBounds(e,t,n=10){try{let r=await this._callGraphHopper({limit:n,q:e,point:`${t.lat},${t.lng}`});return this._mapResults(r.hits)}catch(e){return console.warn(`Geocoding failed: `,e),[]}}async _callGraphHopper(e){let t=new URLSearchParams(e);t.append(`key`,`c5c40ac9-ed73-4e20-aed6-cfe495604ca8`),t.append(`locale`,Di.slice(0,2));let n={headers:{Accept:`application/json`}},r=`https://graphhopper.com/api/1/geocode?${t}`;return await(await fetch(r,n)).json()}_mapResults(e){return e.map(e=>({id:e.osm_id.toString(),labelTitle:e.name,position:{lng:e.point.lng,lat:e.point.lat},bbox:e.extent?[{lng:e.extent[0],lat:e.extent[1]},{lng:e.extent[2],lat:e.extent[3]}]:null,subtitle:[e.osm_value,e.city,e.state,e.country].filter(Boolean).join(`, `)}))}},Ai=class{map;mapContainer;container;control;input;dropdown;inputWrapper;button;isOpen=!1;geocoder=new ki;suggestions=[];items=[];index=0;debounce;constructor(e){this.map=e,this.container=document.createElement(`div`),this.control=document.createElement(`div`),this.input=document.createElement(`input`),this.dropdown=document.createElement(`div`),this.inputWrapper=document.createElement(`div`),this.button=document.createElement(`button`),this.mapContainer=this.map.getContainer()}init(){this.container.className=`geocoder-container`,this.control.className=`geocoder-control`,this.input.className=`geocoder-input`,this.dropdown.className=`geocoder-dropdown`,this.inputWrapper.className=`geocoder-input-wrapper`,this.button.className=`control-button`,this.input.type=`text`,this.input.placeholder=Oi(`search`),this.button.innerHTML=Ci;let e=document.createElement(`button`);e.className=`geocoder-clear`,e.innerHTML=wi;let t=document.createElement(`div`);return t.className=`geocoder-scrollwrapper`,t.append(this.dropdown),this.inputWrapper.append(this.input,e),this.control.append(this.button,this.inputWrapper,t),e.addEventListener(`click`,()=>this.clearAll()),this.button.addEventListener(`click`,()=>this.toggle()),this.input.addEventListener(`input`,()=>this.onInput()),this.input.addEventListener(`keydown`,e=>this.onKeyDown(e)),this.dropdown.addEventListener(`mousemove`,e=>this.onMouseMove(e)),this.mapContainer.addEventListener(`mousedown`,e=>this.clickOutside(e)),window.addEventListener(`resize`,()=>this.setMaxSizes()),this.setMaxSizes(),this.updateVisibility(),this.container.append(this.control),this.container}clickOutside(e){e.target instanceof Node&&!this.control.contains(e.target)&&this.hide()}setMaxSizes(){let{width:e,height:t}=this.mapContainer.getBoundingClientRect();this.control.style.maxWidth=`${e-40}px`,this.dropdown.style.maxHeight=`${Math.min(310,t-63)}px`}toggle(){this.isOpen=!this.isOpen,this.button.classList.toggle(`open`),this.updateVisibility(),this.isOpen&&this.input.focus()}hide(){this.isOpen&&(this.isOpen=!1,this.button.classList.remove(`open`),this.updateVisibility())}clearDropdown(){this.suggestions=[],this.items=[],this.dropdown.innerHTML=``}clearAll(){this.input.value=``,this.clearDropdown()}updateVisibility(){let e=this.isOpen;this.inputWrapper.style.display=e?`flex`:`none`,e||this.clearAll()}onInput(){let e=this.input.value.trim();if(this.debounce&&clearTimeout(this.debounce),e.length<2){this.dropdown.innerHTML=``;return}this.debounce=window.setTimeout(async()=>{this.suggestions=await this.geocoder.getLocationInBounds(e,this.map.getCenter(),20),this.items=[],this.renderSuggestions()},200)}renderSuggestions(){this.dropdown.innerHTML=``,this.items=[],this.index=0,this.suggestions.forEach(e=>{let t=document.createElement(`div`),n=document.createElement(`div`),r=document.createElement(`div`);t.className=`geocoder-suggestion`,n.className=`title`,r.className=`subtitle`,n.textContent=e.labelTitle,r.textContent=e.subtitle,t.append(n,r),t.addEventListener(`mousedown`,t=>{t.stopPropagation(),this.goToSelection(e)}),this.dropdown.appendChild(t),this.items.push({data:e,el:t})}),this.updateHighlight()}updateHighlight(){this.items.forEach((e,t)=>{e.el.classList.toggle(`highlight`,t===this.index)})}onKeyDown(e){if(e.key===`ArrowUp`)e.preventDefault(),this.index--,this.index<0&&(this.index=this.items.length-1),this.adjustScroll();else if(e.key===`ArrowDown`)e.preventDefault(),this.index++,this.index>this.items.length-1&&(this.index=0),this.adjustScroll();else if(e.key===`Enter`){e.preventDefault();let t=this.items[this.index];t&&this.goToSelection(t.data)}else e.key===`Escape`&&(e.preventDefault(),this.hide());this.updateHighlight()}onMouseMove(e){let t=e.target.closest(`.geocoder-suggestion`);this.index=this.items.findIndex(e=>e.el===t),this.updateHighlight()}goToSelection(e){e.bbox?this.map.fitBounds(e.bbox,{duration:0,animate:!1}):this.map.jumpTo({center:e.position,zoom:16}),this.input.value=e.labelTitle,this.clearDropdown()}adjustScroll(){let e=this.items[this.index].el,t=this.dropdown,n=t.getBoundingClientRect(),r=e.getBoundingClientRect();r.bottom>n.bottom?t.scrollTop+=r.bottom-n.bottom:r.top<n.top&&(t.scrollTop+=r.top-n.top)}};function ji(e,t,n){let r=document.createElement(`div`);r.classList.add(`web-control`,`adornment`);let i=e.buttons.flatMap(e=>e===`zoom`?[`zoomIn`,`zoomOut`]:e);return(pr()?i.filter(e=>e!==`zoomIn`&&e!==`zoomOut`):i).forEach(e=>{let i;if(e===`zoomIn`)i=ii(t);else if(e===`zoomOut`)i=ai(t);else if(e===`fullscreen`)i=di(t);else if(e===`geolocation`)i=bi(t);else if(e===`refresh`)i=Si(t,n);else if(e===`search`)i=new Ai(t).init();else return;r.appendChild(i)}),r}function Mi(e){return Mn(e,(e,t)=>e+Ni(t),0)}function Ni(e){let t=0,n;switch(e.type){case`Polygon`:return Pi(e.coordinates);case`MultiPolygon`:for(n=0;n<e.coordinates.length;n++)t+=Pi(e.coordinates[n]);return t;case`Point`:case`MultiPoint`:case`LineString`:case`MultiLineString`:return 0}return 0}function Pi(e){let t=0;if(e&&e.length>0){t+=Math.abs(Li(e[0]));for(let n=1;n<e.length;n++)t-=Math.abs(Li(e[n]))}return t}var Fi=Cn*Cn/2,Ii=Math.PI/180;function Li(e){let t=e.length-1;if(t<=2)return 0;let n=0,r=0;for(;r<t;){let i=e[r],a=e[r+1===t?0:r+1],o=e[r+2>=t?(r+2)%t:r+2],s=i[0]*Ii,c=a[1]*Ii,l=o[0]*Ii;n+=(l-s)*Math.sin(c),r++}return n*Fi}function Ri(e){return e}function zi(e){if(e==null)return Ri;var t,n,r=e.scale[0],i=e.scale[1],a=e.translate[0],o=e.translate[1];return function(e,s){s||(t=n=0);var c=2,l=e.length,u=Array(l);for(u[0]=(t+=e[0])*r+a,u[1]=(n+=e[1])*i+o;c<l;)u[c]=e[c],++c;return u}}function Bi(e,t){for(var n,r=e.length,i=r-t;i<--r;)n=e[i],e[i++]=e[r],e[r]=n}function Vi(e,t){return typeof t==`string`&&(t=e.objects[t]),t.type===`GeometryCollection`?{type:`FeatureCollection`,features:t.geometries.map(function(t){return Hi(e,t)})}:Hi(e,t)}function Hi(e,t){var n=t.id,r=t.bbox,i=t.properties==null?{}:t.properties,a=Ui(e,t);return n==null&&r==null?{type:`Feature`,properties:i,geometry:a}:r==null?{type:`Feature`,id:n,properties:i,geometry:a}:{type:`Feature`,id:n,bbox:r,properties:i,geometry:a}}function Ui(e,t){var n=zi(e.transform),r=e.arcs;function i(e,t){t.length&&t.pop();for(var i=r[e<0?~e:e],a=0,o=i.length;a<o;++a)t.push(n(i[a],a));e<0&&Bi(t,o)}function a(e){return n(e)}function o(e){for(var t=[],n=0,r=e.length;n<r;++n)i(e[n],t);return t.length<2&&t.push(t[0]),t}function s(e){for(var t=o(e);t.length<4;)t.push(t[0]);return t}function c(e){return e.map(s)}function l(e){var t=e.type,n;switch(t){case`GeometryCollection`:return{type:t,geometries:e.geometries.map(l)};case`Point`:n=a(e.coordinates);break;case`MultiPoint`:n=e.coordinates.map(a);break;case`LineString`:n=o(e.arcs);break;case`MultiLineString`:n=e.arcs.map(o);break;case`Polygon`:n=c(e.arcs);break;case`MultiPolygon`:n=e.arcs.map(c);break;default:return null}return{type:t,coordinates:n}}return l(t)}var Wi=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Gi=Math.ceil,Ki=Math.floor,qi=`[BigNumber Error] `,Ji=qi+`Number primitive has more than 15 significant digits: `,Yi=0x5af3107a4000,J=14,Xi=9007199254740991,Zi=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,0xe8d4a51000,0x9184e72a000],Qi=1e7,$i=1e9;function ea(e){var t,n,r,i=v.prototype={constructor:v,toString:null,valueOf:null},a=new v(1),o=20,s=4,c=-7,l=21,u=-1e7,d=1e7,f=!1,p=1,m=0,h={prefix:``,groupSize:3,secondaryGroupSize:0,groupSeparator:`,`,decimalSeparator:`.`,fractionGroupSize:0,fractionGroupSeparator:`\xA0`,suffix:``},g=`0123456789abcdefghijklmnopqrstuvwxyz`,_=!0;function v(e,t){var i,a,c,l,f,p,m,h,y=this;if(!(y instanceof v))return new v(e,t);if(t==null){if(e&&e._isBigNumber===!0){y.s=e.s,!e.c||e.e>d?y.c=y.e=null:e.e<u?y.c=[y.e=0]:(y.e=e.e,y.c=e.c.slice());return}if((p=typeof e==`number`)&&e*0==0){if(y.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,f=e;f>=10;f/=10,l++);l>d?y.c=y.e=null:(y.e=l,y.c=[e]);return}h=String(e)}else{if(!Wi.test(h=String(e)))return r(y,h,p);y.s=h.charCodeAt(0)==45?(h=h.slice(1),-1):1}(l=h.indexOf(`.`))>-1&&(h=h.replace(`.`,``)),(f=h.search(/e/i))>0?(l<0&&(l=f),l+=+h.slice(f+1),h=h.substring(0,f)):l<0&&(l=h.length)}else{if(ia(t,2,g.length,`Base`),t==10&&_)return y=new v(e),S(y,o+y.e+1,s);if(h=String(e),p=typeof e==`number`){if(e*0!=0)return r(y,h,p,t);if(y.s=1/e<0?(h=h.slice(1),-1):1,v.DEBUG&&h.replace(/^0\.0*|\./,``).length>15)throw Error(Ji+e)}else y.s=h.charCodeAt(0)===45?(h=h.slice(1),-1):1;for(i=g.slice(0,t),l=f=0,m=h.length;f<m;f++)if(i.indexOf(a=h.charAt(f))<0){if(a==`.`){if(f>l){l=m;continue}}else if(!c&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){c=!0,f=-1,l=0;continue}return r(y,String(e),p,t)}p=!1,h=n(h,t,10,y.s),(l=h.indexOf(`.`))>-1?h=h.replace(`.`,``):l=h.length}for(f=0;h.charCodeAt(f)===48;f++);for(m=h.length;h.charCodeAt(--m)===48;);if(h=h.slice(f,++m)){if(m-=f,p&&v.DEBUG&&m>15&&(e>Xi||e!==Ki(e)))throw Error(Ji+y.s*e);if((l=l-f-1)>d)y.c=y.e=null;else if(l<u)y.c=[y.e=0];else{if(y.e=l,y.c=[],f=(l+1)%J,l<0&&(f+=J),f<m){for(f&&y.c.push(+h.slice(0,f)),m-=J;f<m;)y.c.push(+h.slice(f,f+=J));f=J-(h=h.slice(f)).length}else f-=m;for(;f--;h+=`0`);y.c.push(+h)}}else y.c=[y.e=0]}v.clone=ea,v.ROUND_UP=0,v.ROUND_DOWN=1,v.ROUND_CEIL=2,v.ROUND_FLOOR=3,v.ROUND_HALF_UP=4,v.ROUND_HALF_DOWN=5,v.ROUND_HALF_EVEN=6,v.ROUND_HALF_CEIL=7,v.ROUND_HALF_FLOOR=8,v.EUCLID=9,v.config=v.set=function(e){var t,n;if(e!=null)if(typeof e==`object`){if(e.hasOwnProperty(t=`DECIMAL_PLACES`)&&(n=e[t],ia(n,0,$i,t),o=n),e.hasOwnProperty(t=`ROUNDING_MODE`)&&(n=e[t],ia(n,0,8,t),s=n),e.hasOwnProperty(t=`EXPONENTIAL_AT`)&&(n=e[t],n&&n.pop?(ia(n[0],-$i,0,t),ia(n[1],0,$i,t),c=n[0],l=n[1]):(ia(n,-$i,$i,t),c=-(l=n<0?-n:n))),e.hasOwnProperty(t=`RANGE`))if(n=e[t],n&&n.pop)ia(n[0],-$i,-1,t),ia(n[1],1,$i,t),u=n[0],d=n[1];else if(ia(n,-$i,$i,t),n)u=-(d=n<0?-n:n);else throw Error(qi+t+` cannot be zero: `+n);if(e.hasOwnProperty(t=`CRYPTO`))if(n=e[t],n===!!n)if(n)if(typeof crypto<`u`&&crypto&&(crypto.getRandomValues||crypto.randomBytes))f=n;else throw f=!n,Error(qi+`crypto unavailable`);else f=n;else throw Error(qi+t+` not true or false: `+n);if(e.hasOwnProperty(t=`MODULO_MODE`)&&(n=e[t],ia(n,0,9,t),p=n),e.hasOwnProperty(t=`POW_PRECISION`)&&(n=e[t],ia(n,0,$i,t),m=n),e.hasOwnProperty(t=`FORMAT`))if(n=e[t],typeof n==`object`)h=n;else throw Error(qi+t+` not an object: `+n);if(e.hasOwnProperty(t=`ALPHABET`))if(n=e[t],typeof n==`string`&&!/^.?$|[+\-.\s]|(.).*\1/.test(n))_=n.slice(0,10)==`0123456789`,g=n;else throw Error(qi+t+` invalid: `+n)}else throw Error(qi+`Object expected: `+e);return{DECIMAL_PLACES:o,ROUNDING_MODE:s,EXPONENTIAL_AT:[c,l],RANGE:[u,d],CRYPTO:f,MODULO_MODE:p,POW_PRECISION:m,FORMAT:h,ALPHABET:g}},v.isBigNumber=function(e){if(!e||e._isBigNumber!==!0)return!1;if(!v.DEBUG)return!0;var t,n,r=e.c,i=e.e,a=e.s;out:if({}.toString.call(r)==`[object Array]`){if((a===1||a===-1)&&i>=-$i&&i<=$i&&i===Ki(i)){if(r[0]===0){if(i===0&&r.length===1)return!0;break out}if(t=(i+1)%J,t<1&&(t+=J),String(r[0]).length==t){for(t=0;t<r.length;t++)if(n=r[t],n<0||n>=Yi||n!==Ki(n))break out;if(n!==0)return!0}}}else if(r===null&&i===null&&(a===null||a===1||a===-1))return!0;throw Error(qi+`Invalid BigNumber: `+e)},v.maximum=v.max=function(){return b(arguments,-1)},v.minimum=v.min=function(){return b(arguments,1)},v.random=(function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return Ki(Math.random()*e)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(e){var n,r,i,s,c,l=0,u=[],d=new v(a);if(e==null?e=o:ia(e,0,$i),s=Gi(e/J),f)if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(s*=2));l<s;)c=n[l]*131072+(n[l+1]>>>11),c>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),n[l]=r[0],n[l+1]=r[1]):(u.push(c%0x5af3107a4000),l+=2);l=s/2}else if(crypto.randomBytes){for(n=crypto.randomBytes(s*=7);l<s;)c=(n[l]&31)*281474976710656+n[l+1]*1099511627776+n[l+2]*4294967296+n[l+3]*16777216+(n[l+4]<<16)+(n[l+5]<<8)+n[l+6],c>=9e15?crypto.randomBytes(7).copy(n,l):(u.push(c%0x5af3107a4000),l+=7);l=s/7}else throw f=!1,Error(qi+`crypto unavailable`);if(!f)for(;l<s;)c=t(),c<9e15&&(u[l++]=c%0x5af3107a4000);for(s=u[--l],e%=J,s&&e&&(c=Zi[J-e],u[l]=Ki(s/c)*c);u[l]===0;u.pop(),l--);if(l<0)u=[i=0];else{for(i=-1;u[0]===0;u.splice(0,1),i-=J);for(l=1,c=u[0];c>=10;c/=10,l++);l<J&&(i-=J-l)}return d.e=i,d.c=u,d}})(),v.sum=function(){for(var e=1,t=arguments,n=new v(t[0]);e<t.length;)n=n.plus(t[e++]);return n},n=(function(){var e=`0123456789`;function n(e,t,n,r){for(var i,a=[0],o,s=0,c=e.length;s<c;){for(o=a.length;o--;a[o]*=t);for(a[0]+=r.indexOf(e.charAt(s++)),i=0;i<a.length;i++)a[i]>n-1&&(a[i+1]??(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}return function(r,i,a,c,l){var u,d,f,p,h,_,y,b,x=r.indexOf(`.`),S=o,C=s;for(x>=0&&(p=m,m=0,r=r.replace(`.`,``),b=new v(i),_=b.pow(r.length-x),m=p,b.c=n(sa(na(_.c),_.e,`0`),10,a,e),b.e=b.c.length),y=n(r,i,a,l?(u=g,e):(u=e,g)),f=p=y.length;y[--p]==0;y.pop());if(!y[0])return u.charAt(0);if(x<0?--f:(_.c=y,_.e=f,_.s=c,_=t(_,b,S,C,a),y=_.c,h=_.r,f=_.e),d=f+S+1,x=y[d],p=a/2,h=h||d<0||y[d+1]!=null,h=C<4?(x!=null||h)&&(C==0||C==(_.s<0?3:2)):x>p||x==p&&(C==4||h||C==6&&y[d-1]&1||C==(_.s<0?8:7)),d<1||!y[0])r=h?sa(u.charAt(1),-S,u.charAt(0)):u.charAt(0);else{if(y.length=d,h)for(--a;++y[--d]>a;)y[d]=0,d||(++f,y=[1].concat(y));for(p=y.length;!y[--p];);for(x=0,r=``;x<=p;r+=u.charAt(y[x++]));r=sa(r,f,u.charAt(0))}return r}})(),t=(function(){function e(e,t,n){var r,i,a,o,s=0,c=e.length,l=t%Qi,u=t/Qi|0;for(e=e.slice();c--;)a=e[c]%Qi,o=e[c]/Qi|0,r=u*a+o*l,i=l*a+r%Qi*Qi+s,s=(i/n|0)+(r/Qi|0)+u*o,e[c]=i%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,a,o,s){var c,l,u,d,f,p,m,h,g,_,y,b,x,C,w,T,E,D=r.s==i.s?1:-1,O=r.c,k=i.c;if(!O||!O[0]||!k||!k[0])return new v(!r.s||!i.s||(O?k&&O[0]==k[0]:!k)?NaN:O&&O[0]==0||!k?D*0:D/0);for(h=new v(D),g=h.c=[],l=r.e-i.e,D=a+l+1,s||(s=Yi,l=ta(r.e/J)-ta(i.e/J),D=D/J|0),u=0;k[u]==(O[u]||0);u++);if(k[u]>(O[u]||0)&&l--,D<0)g.push(1),d=!0;else{for(C=O.length,T=k.length,u=0,D+=2,f=Ki(s/(k[0]+1)),f>1&&(k=e(k,f,s),O=e(O,f,s),T=k.length,C=O.length),x=T,_=O.slice(0,T),y=_.length;y<T;_[y++]=0);E=k.slice(),E=[0].concat(E),w=k[0],k[1]>=s/2&&w++;do{if(f=0,c=t(k,_,T,y),c<0){if(b=_[0],T!=y&&(b=b*s+(_[1]||0)),f=Ki(b/w),f>1)for(f>=s&&(f=s-1),p=e(k,f,s),m=p.length,y=_.length;t(p,_,m,y)==1;)f--,n(p,T<m?E:k,m,s),m=p.length,c=1;else f==0&&(c=f=1),p=k.slice(),m=p.length;if(m<y&&(p=[0].concat(p)),n(_,p,y,s),y=_.length,c==-1)for(;t(k,_,T,y)<1;)f++,n(_,T<y?E:k,y,s),y=_.length}else c===0&&(f++,_=[0]);g[u++]=f,_[0]?_[y++]=O[x]||0:(_=[O[x]],y=1)}while((x++<C||_[0]!=null)&&D--);d=_[0]!=null,g[0]||g.splice(0,1)}if(s==Yi){for(u=1,D=g[0];D>=10;D/=10,u++);S(h,a+(h.e=u+l*J-1)+1,o,d)}else h.e=l,h.r=+d;return h}})();function y(e,t,n,r){var i,a,o,u,d;if(n==null?n=s:ia(n,0,8),!e.c)return e.toString();if(i=e.c[0],o=e.e,t==null)d=na(e.c),d=r==1||r==2&&(o<=c||o>=l)?oa(d,o):sa(d,o,`0`);else if(e=S(new v(e),t,n),a=e.e,d=na(e.c),u=d.length,r==1||r==2&&(t<=a||a<=c)){for(;u<t;d+=`0`,u++);d=oa(d,a)}else if(t-=o+(r===2&&a>o),d=sa(d,a,`0`),a+1>u){if(--t>0)for(d+=`.`;t--;d+=`0`);}else if(t+=a-u,t>0)for(a+1==u&&(d+=`.`);t--;d+=`0`);return e.s<0&&i?`-`+d:d}function b(e,t){for(var n,r,i=1,a=new v(e[0]);i<e.length;i++)r=new v(e[i]),(!r.s||(n=ra(a,r))===t||n===0&&a.s===t)&&(a=r);return a}function x(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*J-1)>d?e.c=e.e=null:n<u?e.c=[e.e=0]:(e.e=n,e.c=t),e}r=(function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,n=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(a,o,s,c){var l,u=s?o:o.replace(i,``);if(r.test(u))a.s=isNaN(u)?null:u<0?-1:1;else{if(!s&&(u=u.replace(e,function(e,t,n){return l=(n=n.toLowerCase())==`x`?16:n==`b`?2:8,!c||c==l?t:e}),c&&(l=c,u=u.replace(t,`$1`).replace(n,`0.$1`)),o!=u))return new v(u,l);if(v.DEBUG)throw Error(qi+`Not a`+(c?` base `+c:``)+` number: `+o);a.s=null}a.c=a.e=null}})();function S(e,t,n,r){var i,a,o,s,c,l,f,p=e.c,m=Zi;if(p){out:{for(i=1,s=p[0];s>=10;s/=10,i++);if(a=t-i,a<0)a+=J,o=t,c=p[l=0],f=Ki(c/m[i-o-1]%10);else if(l=Gi((a+1)/J),l>=p.length)if(r){for(;p.length<=l;p.push(0));c=f=0,i=1,a%=J,o=a-J+1}else break out;else{for(c=s=p[l],i=1;s>=10;s/=10,i++);a%=J,o=a-J+i,f=o<0?0:Ki(c/m[i-o-1]%10)}if(r=r||t<0||p[l+1]!=null||(o<0?c:c%m[i-o-1]),r=n<4?(f||r)&&(n==0||n==(e.s<0?3:2)):f>5||f==5&&(n==4||r||n==6&&(a>0?o>0?c/m[i-o]:0:p[l-1])%10&1||n==(e.s<0?8:7)),t<1||!p[0])return p.length=0,r?(t-=e.e+1,p[0]=m[(J-t%J)%J],e.e=-t||0):p[0]=e.e=0,e;if(a==0?(p.length=l,s=1,l--):(p.length=l+1,s=m[J-a],p[l]=o>0?Ki(c/m[i-o]%m[o])*s:0),r)for(;;)if(l==0){for(a=1,o=p[0];o>=10;o/=10,a++);for(o=p[0]+=s,s=1;o>=10;o/=10,s++);a!=s&&(e.e++,p[0]==Yi&&(p[0]=1));break}else{if(p[l]+=s,p[l]!=Yi)break;p[l--]=0,s=1}for(a=p.length;p[--a]===0;p.pop());}e.e>d?e.c=e.e=null:e.e<u&&(e.c=[e.e=0])}return e}function C(e){var t,n=e.e;return n===null?e.toString():(t=na(e.c),t=n<=c||n>=l?oa(t,n):sa(t,n,`0`),e.s<0?`-`+t:t)}return i.absoluteValue=i.abs=function(){var e=new v(this);return e.s<0&&(e.s=1),e},i.comparedTo=function(e,t){return ra(this,new v(e,t))},i.decimalPlaces=i.dp=function(e,t){var n,r,i,a=this;if(e!=null)return ia(e,0,$i),t==null?t=s:ia(t,0,8),S(new v(a),e+a.e+1,t);if(!(n=a.c))return null;if(r=((i=n.length-1)-ta(this.e/J))*J,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},i.dividedBy=i.div=function(e,n){return t(this,new v(e,n),o,s)},i.dividedToIntegerBy=i.idiv=function(e,n){return t(this,new v(e,n),0,1)},i.exponentiatedBy=i.pow=function(e,t){var n,r,i,o,c,l,u,d,f,p=this;if(e=new v(e),e.c&&!e.isInteger())throw Error(qi+`Exponent not an integer: `+C(e));if(t!=null&&(t=new v(t)),l=e.e>14,!p.c||!p.c[0]||p.c[0]==1&&!p.e&&p.c.length==1||!e.c||!e.c[0])return f=new v(C(p)**(l?e.s*(2-aa(e)):+C(e))),t?f.mod(t):f;if(u=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new v(NaN);r=!u&&p.isInteger()&&t.isInteger(),r&&(p=p.mod(t))}else if(e.e>9&&(p.e>0||p.e<-1||(p.e==0?p.c[0]>1||l&&p.c[1]>=24e7:p.c[0]<8e13||l&&p.c[0]<=9999975e7)))return o=p.s<0&&aa(e)?-0:0,p.e>-1&&(o=1/o),new v(u?1/o:o);else m&&(o=Gi(m/J+2));for(l?(n=new v(.5),u&&(e.s=1),d=aa(e)):(i=Math.abs(+C(e)),d=i%2),f=new v(a);;){if(d){if(f=f.times(p),!f.c)break;o?f.c.length>o&&(f.c.length=o):r&&(f=f.mod(t))}if(i){if(i=Ki(i/2),i===0)break;d=i%2}else if(e=e.times(n),S(e,e.e+1,1),e.e>14)d=aa(e);else{if(i=+C(e),i===0)break;d=i%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):r&&(p=p.mod(t))}return r?f:(u&&(f=a.div(f)),t?f.mod(t):o?S(f,m,s,c):f)},i.integerValue=function(e){var t=new v(this);return e==null?e=s:ia(e,0,8),S(t,t.e+1,e)},i.isEqualTo=i.eq=function(e,t){return ra(this,new v(e,t))===0},i.isFinite=function(){return!!this.c},i.isGreaterThan=i.gt=function(e,t){return ra(this,new v(e,t))>0},i.isGreaterThanOrEqualTo=i.gte=function(e,t){return(t=ra(this,new v(e,t)))===1||t===0},i.isInteger=function(){return!!this.c&&ta(this.e/J)>this.c.length-2},i.isLessThan=i.lt=function(e,t){return ra(this,new v(e,t))<0},i.isLessThanOrEqualTo=i.lte=function(e,t){return(t=ra(this,new v(e,t)))===-1||t===0},i.isNaN=function(){return!this.s},i.isNegative=function(){return this.s<0},i.isPositive=function(){return this.s>0},i.isZero=function(){return!!this.c&&this.c[0]==0},i.minus=function(e,t){var n,r,i,a,o=this,c=o.s;if(e=new v(e,t),t=e.s,!c||!t)return new v(NaN);if(c!=t)return e.s=-t,o.plus(e);var l=o.e/J,u=e.e/J,d=o.c,f=e.c;if(!l||!u){if(!d||!f)return d?(e.s=-t,e):new v(f?o:NaN);if(!d[0]||!f[0])return f[0]?(e.s=-t,e):new v(d[0]?o:s==3?-0:0)}if(l=ta(l),u=ta(u),d=d.slice(),c=l-u){for((a=c<0)?(c=-c,i=d):(u=l,i=f),i.reverse(),t=c;t--;i.push(0));i.reverse()}else for(r=(a=(c=d.length)<(t=f.length))?c:t,c=t=0;t<r;t++)if(d[t]!=f[t]){a=d[t]<f[t];break}if(a&&(i=d,d=f,f=i,e.s=-e.s),t=(r=f.length)-(n=d.length),t>0)for(;t--;d[n++]=0);for(t=Yi-1;r>c;){if(d[--r]<f[r]){for(n=r;n&&!d[--n];d[n]=t);--d[n],d[r]+=Yi}d[r]-=f[r]}for(;d[0]==0;d.splice(0,1),--u);return d[0]?x(e,d,u):(e.s=s==3?-1:1,e.c=[e.e=0],e)},i.modulo=i.mod=function(e,n){var r,i,a=this;return e=new v(e,n),!a.c||!e.s||e.c&&!e.c[0]?new v(NaN):!e.c||a.c&&!a.c[0]?new v(a):(p==9?(i=e.s,e.s=1,r=t(a,e,0,3),e.s=i,r.s*=i):r=t(a,e,0,p),e=a.minus(r.times(e)),!e.c[0]&&p==1&&(e.s=a.s),e)},i.multipliedBy=i.times=function(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_=this,y=_.c,b=(e=new v(e,t)).c;if(!y||!b||!y[0]||!b[0])return!_.s||!e.s||y&&!y[0]&&!b||b&&!b[0]&&!y?e.c=e.e=e.s=null:(e.s*=_.s,!y||!b?e.c=e.e=null:(e.c=[0],e.e=0)),e;for(r=ta(_.e/J)+ta(e.e/J),e.s*=_.s,c=y.length,d=b.length,c<d&&(m=y,y=b,b=m,i=c,c=d,d=i),i=c+d,m=[];i--;m.push(0));for(h=Yi,g=Qi,i=d;--i>=0;){for(n=0,f=b[i]%g,p=b[i]/g|0,o=c,a=i+o;a>i;)l=y[--o]%g,u=y[o]/g|0,s=p*l+u*f,l=f*l+s%g*g+m[a]+n,n=(l/h|0)+(s/g|0)+p*u,m[a--]=l%h;m[a]=n}return n?++r:m.splice(0,1),x(e,m,r)},i.negated=function(){var e=new v(this);return e.s=-e.s||null,e},i.plus=function(e,t){var n,r=this,i=r.s;if(e=new v(e,t),t=e.s,!i||!t)return new v(NaN);if(i!=t)return e.s=-t,r.minus(e);var a=r.e/J,o=e.e/J,s=r.c,c=e.c;if(!a||!o){if(!s||!c)return new v(i/0);if(!s[0]||!c[0])return c[0]?e:new v(s[0]?r:i*0)}if(a=ta(a),o=ta(o),s=s.slice(),i=a-o){for(i>0?(o=a,n=c):(i=-i,n=s),n.reverse();i--;n.push(0));n.reverse()}for(i=s.length,t=c.length,i-t<0&&(n=c,c=s,s=n,t=i),i=0;t;)i=(s[--t]=s[t]+c[t]+i)/Yi|0,s[t]=Yi===s[t]?0:s[t]%Yi;return i&&(s=[i].concat(s),++o),x(e,s,o)},i.precision=i.sd=function(e,t){var n,r,i,a=this;if(e!=null&&e!==!!e)return ia(e,1,$i),t==null?t=s:ia(t,0,8),S(new v(a),e,t);if(!(n=a.c))return null;if(i=n.length-1,r=i*J+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&a.e+1>r&&(r=a.e+1),r},i.shiftedBy=function(e){return ia(e,-Xi,Xi),this.times(`1e`+e)},i.squareRoot=i.sqrt=function(){var e,n,r,i,a,c=this,l=c.c,u=c.s,d=c.e,f=o+4,p=new v(`0.5`);if(u!==1||!l||!l[0])return new v(!u||u<0&&(!l||l[0])?NaN:l?c:1/0);if(u=Math.sqrt(+C(c)),u==0||u==1/0?(n=na(l),(n.length+d)%2==0&&(n+=`0`),u=Math.sqrt(+n),d=ta((d+1)/2)-(d<0||d%2),u==1/0?n=`5e`+d:(n=u.toExponential(),n=n.slice(0,n.indexOf(`e`)+1)+d),r=new v(n)):r=new v(u+``),r.c[0]){for(d=r.e,u=d+f,u<3&&(u=0);;)if(a=r,r=p.times(a.plus(t(c,a,f,1))),na(a.c).slice(0,u)===(n=na(r.c)).slice(0,u))if(r.e<d&&--u,n=n.slice(u-3,u+1),n==`9999`||!i&&n==`4999`){if(!i&&(S(a,a.e+o+2,0),a.times(a).eq(c))){r=a;break}f+=4,u+=4,i=1}else{(!+n||!+n.slice(1)&&n.charAt(0)==`5`)&&(S(r,r.e+o+2,1),e=!r.times(r).eq(c));break}}return S(r,r.e+o+1,s,e)},i.toExponential=function(e,t){return e!=null&&(ia(e,0,$i),e++),y(this,e,t,1)},i.toFixed=function(e,t){return e!=null&&(ia(e,0,$i),e=e+this.e+1),y(this,e,t)},i.toFormat=function(e,t,n){var r,i=this;if(n==null)e!=null&&t&&typeof t==`object`?(n=t,t=null):e&&typeof e==`object`?(n=e,e=t=null):n=h;else if(typeof n!=`object`)throw Error(qi+`Argument not an object: `+n);if(r=i.toFixed(e,t),i.c){var a,o=r.split(`.`),s=+n.groupSize,c=+n.secondaryGroupSize,l=n.groupSeparator||``,u=o[0],d=o[1],f=i.s<0,p=f?u.slice(1):u,m=p.length;if(c&&(a=s,s=c,c=a,m-=a),s>0&&m>0){for(a=m%s||s,u=p.substr(0,a);a<m;a+=s)u+=l+p.substr(a,s);c>0&&(u+=l+p.slice(a)),f&&(u=`-`+u)}r=d?u+(n.decimalSeparator||``)+((c=+n.fractionGroupSize)?d.replace(RegExp(`\\d{`+c+`}\\B`,`g`),`$&`+(n.fractionGroupSeparator||``)):d):u}return(n.prefix||``)+r+(n.suffix||``)},i.toFraction=function(e){var n,r,i,o,c,l,u,f,p,m,h,g,_=this,y=_.c;if(e!=null&&(u=new v(e),!u.isInteger()&&(u.c||u.s!==1)||u.lt(a)))throw Error(qi+`Argument `+(u.isInteger()?`out of range: `:`not an integer: `)+C(u));if(!y)return new v(_);for(n=new v(a),p=r=new v(a),i=f=new v(a),g=na(y),c=n.e=g.length-_.e-1,n.c[0]=Zi[(l=c%J)<0?J+l:l],e=!e||u.comparedTo(n)>0?c>0?n:p:u,l=d,d=1/0,u=new v(g),f.c[0]=0;m=t(u,n,0,1),o=r.plus(m.times(i)),o.comparedTo(e)!=1;)r=i,i=o,p=f.plus(m.times(o=p)),f=o,n=u.minus(m.times(o=n)),u=o;return o=t(e.minus(r),i,0,1),f=f.plus(o.times(p)),r=r.plus(o.times(i)),f.s=p.s=_.s,c*=2,h=t(p,i,c,s).minus(_).abs().comparedTo(t(f,r,c,s).minus(_).abs())<1?[p,i]:[f,r],d=l,h},i.toNumber=function(){return+C(this)},i.toPrecision=function(e,t){return e!=null&&ia(e,1,$i),y(this,e,t,2)},i.toString=function(e){var t,r=this,i=r.s,a=r.e;return a===null?i?(t=`Infinity`,i<0&&(t=`-`+t)):t=`NaN`:(e==null?t=a<=c||a>=l?oa(na(r.c),a):sa(na(r.c),a,`0`):e===10&&_?(r=S(new v(r),o+a+1,s),t=sa(na(r.c),r.e,`0`)):(ia(e,2,g.length,`Base`),t=n(sa(na(r.c),a,`0`),10,e,i,!0)),i<0&&r.c[0]&&(t=`-`+t)),t},i.valueOf=i.toJSON=function(){return C(this)},i._isBigNumber=!0,i[Symbol.toStringTag]=`BigNumber`,i[Symbol.for(`nodejs.util.inspect.custom`)]=i.valueOf,e!=null&&v.set(e),v}function ta(e){var t=e|0;return e>0||e===t?t:t-1}function na(e){for(var t,n,r=1,i=e.length,a=e[0]+``;r<i;){for(t=e[r++]+``,n=J-t.length;n--;t=`0`+t);a+=t}for(i=a.length;a.charCodeAt(--i)===48;);return a.slice(0,i+1||1)}function ra(e,t){var n,r,i=e.c,a=t.c,o=e.s,s=t.s,c=e.e,l=t.e;if(!o||!s)return null;if(n=i&&!i[0],r=a&&!a[0],n||r)return n?r?0:-s:o;if(o!=s)return o;if(n=o<0,r=c==l,!i||!a)return r?0:!i^n?1:-1;if(!r)return c>l^n?1:-1;for(s=(c=i.length)<(l=a.length)?c:l,o=0;o<s;o++)if(i[o]!=a[o])return i[o]>a[o]^n?1:-1;return c==l?0:c>l^n?1:-1}function ia(e,t,n,r){if(e<t||e>n||e!==Ki(e))throw Error(qi+(r||`Argument`)+(typeof e==`number`?e<t||e>n?` out of range: `:` not an integer: `:` not a primitive number: `)+String(e))}function aa(e){var t=e.c.length-1;return ta(e.e/J)==t&&e.c[t]%2!=0}function oa(e,t){return(e.length>1?e.charAt(0)+`.`+e.slice(1):e)+(t<0?`e`:`e+`)+t}function sa(e,t,n){var r,i;if(t<0){for(i=n+`.`;++t;i+=n);e=i+e}else if(r=e.length,++t>r){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+`.`+e.slice(t));return e}var Y=ea(),ca=class{key;left=null;right=null;constructor(e){this.key=e}},la=class extends ca{constructor(e){super(e)}},ua=class{size=0;modificationCount=0;splayCount=0;splay(e){let t=this.root;if(t==null)return this.compare(e,e),-1;let n=null,r=null,i=null,a=null,o=t,s=this.compare,c;for(;;)if(c=s(o.key,e),c>0){let t=o.left;if(t==null||(c=s(t.key,e),c>0&&(o.left=t.right,t.right=o,o=t,t=o.left,t==null)))break;n==null?r=o:n.left=o,n=o,o=t}else if(c<0){let t=o.right;if(t==null||(c=s(t.key,e),c<0&&(o.right=t.left,t.left=o,o=t,t=o.right,t==null)))break;i==null?a=o:i.right=o,i=o,o=t}else break;return i!=null&&(i.right=o.left,o.left=a),n!=null&&(n.left=o.right,o.right=r),this.root!==o&&(this.root=o,this.splayCount++),c}splayMin(e){let t=e,n=t.left;for(;n!=null;){let e=n;t.left=e.right,e.right=t,t=e,n=t.left}return t}splayMax(e){let t=e,n=t.right;for(;n!=null;){let e=n;t.right=e.left,e.left=t,t=e,n=t.right}return t}_delete(e){if(this.root==null||this.splay(e)!=0)return null;let t=this.root,n=t,r=t.left;if(this.size--,r==null)this.root=t.right;else{let e=t.right;t=this.splayMax(r),t.right=e,this.root=t}return this.modificationCount++,n}addNewRoot(e,t){this.size++,this.modificationCount++;let n=this.root;if(n==null){this.root=e;return}t<0?(e.left=n,e.right=n.right,n.right=null):(e.right=n,e.left=n.left,n.left=null),this.root=e}_first(){let e=this.root;return e==null?null:(this.root=this.splayMin(e),this.root)}_last(){let e=this.root;return e==null?null:(this.root=this.splayMax(e),this.root)}clear(){this.root=null,this.size=0,this.modificationCount++}has(e){return this.validKey(e)&&this.splay(e)==0}defaultCompare(){return(e,t)=>e<t?-1:e>t?1:0}wrap(){return{getRoot:()=>this.root,setRoot:e=>{this.root=e},getSize:()=>this.size,getModificationCount:()=>this.modificationCount,getSplayCount:()=>this.splayCount,setSplayCount:e=>{this.splayCount=e},splay:e=>this.splay(e),has:e=>this.has(e)}}},da=class e extends ua{root=null;compare;validKey;constructor(e,t){super(),this.compare=e??this.defaultCompare(),this.validKey=t??(e=>e!=null&&e!=null)}delete(e){return this.validKey(e)?this._delete(e)!=null:!1}deleteAll(e){for(let t of e)this.delete(t)}forEach(e){let t=this[Symbol.iterator](),n;for(;n=t.next(),!n.done;)e(n.value,n.value,this)}add(e){let t=this.splay(e);return t!=0&&this.addNewRoot(new la(e),t),this}addAndReturn(e){let t=this.splay(e);return t!=0&&this.addNewRoot(new la(e),t),this.root.key}addAll(e){for(let t of e)this.add(t)}isEmpty(){return this.root==null}isNotEmpty(){return this.root!=null}single(){if(this.size==0)throw`Bad state: No element`;if(this.size>1)throw`Bad state: Too many element`;return this.root.key}first(){if(this.size==0)throw`Bad state: No element`;return this._first().key}last(){if(this.size==0)throw`Bad state: No element`;return this._last().key}lastBefore(e){if(e==null)throw`Invalid arguments(s)`;if(this.root==null)return null;if(this.splay(e)<0)return this.root.key;let t=this.root.left;if(t==null)return null;let n=t.right;for(;n!=null;)t=n,n=t.right;return t.key}firstAfter(e){if(e==null)throw`Invalid arguments(s)`;if(this.root==null)return null;if(this.splay(e)>0)return this.root.key;let t=this.root.right;if(t==null)return null;let n=t.left;for(;n!=null;)t=n,n=t.left;return t.key}retainAll(t){let n=new e(this.compare,this.validKey),r=this.modificationCount;for(let e of t){if(r!=this.modificationCount)throw`Concurrent modification during iteration.`;this.validKey(e)&&this.splay(e)==0&&n.add(this.root.key)}n.size!=this.size&&(this.root=n.root,this.size=n.size,this.modificationCount++)}lookup(e){return!this.validKey(e)||this.splay(e)!=0?null:this.root.key}intersection(t){let n=new e(this.compare,this.validKey);for(let e of this)t.has(e)&&n.add(e);return n}difference(t){let n=new e(this.compare,this.validKey);for(let e of this)t.has(e)||n.add(e);return n}union(e){let t=this.clone();return t.addAll(e),t}clone(){let t=new e(this.compare,this.validKey);return t.size=this.size,t.root=this.copyNode(this.root),t}copyNode(e){if(e==null)return null;function t(e,n){let r,i;do{if(r=e.left,i=e.right,r!=null){let e=new la(r.key);n.left=e,t(r,e)}if(i!=null){let t=new la(i.key);n.right=t,e=i,n=t}}while(i!=null)}let n=new la(e.key);return t(e,n),n}toSet(){return this.clone()}entries(){return new X(this.wrap())}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}[Symbol.iterator](){return new pa(this.wrap())}[Symbol.toStringTag]=`[object Set]`},fa=class{tree;path=[];modificationCount=null;splayCount;constructor(e){this.tree=e,this.splayCount=e.getSplayCount()}[Symbol.iterator](){return this}next(){return this.moveNext()?{done:!1,value:this.current()}:{done:!0,value:null}}current(){if(!this.path.length)return null;let e=this.path[this.path.length-1];return this.getValue(e)}rebuildPath(e){this.path.splice(0,this.path.length),this.tree.splay(e),this.path.push(this.tree.getRoot()),this.splayCount=this.tree.getSplayCount()}findLeftMostDescendent(e){for(;e!=null;)this.path.push(e),e=e.left}moveNext(){if(this.modificationCount!=this.tree.getModificationCount()){if(this.modificationCount==null){this.modificationCount=this.tree.getModificationCount();let e=this.tree.getRoot();for(;e!=null;)this.path.push(e),e=e.left;return this.path.length>0}throw`Concurrent modification during iteration.`}if(!this.path.length)return!1;this.splayCount!=this.tree.getSplayCount()&&this.rebuildPath(this.path[this.path.length-1].key);let e=this.path[this.path.length-1],t=e.right;if(t!=null){for(;t!=null;)this.path.push(t),t=t.left;return!0}for(this.path.pop();this.path.length&&this.path[this.path.length-1].right===e;)e=this.path.pop();return this.path.length>0}},pa=class extends fa{getValue(e){return e.key}},X=class extends fa{getValue(e){return[e.key,e.key]}},ma=e=>()=>e,ha=e=>{let t=e?(t,n)=>n.minus(t).abs().isLessThanOrEqualTo(e):ma(!1);return(e,n)=>t(e,n)?0:e.comparedTo(n)};function ga(e){let t=e?(t,n,r,i,a)=>t.exponentiatedBy(2).isLessThanOrEqualTo(i.minus(n).exponentiatedBy(2).plus(a.minus(r).exponentiatedBy(2)).times(e)):ma(!1);return(e,n,r)=>{let i=e.x,a=e.y,o=r.x,s=r.y,c=a.minus(s).times(n.x.minus(o)).minus(i.minus(o).times(n.y.minus(s)));return t(c,i,a,o,s)?0:c.comparedTo(0)}}var _a=e=>e,va=e=>{if(e){let t=new da(ha(e)),n=new da(ha(e)),r=(e,t)=>t.addAndReturn(e),i=e=>({x:r(e.x,t),y:r(e.y,n)});return i({x:new Y(0),y:new Y(0)}),i}return _a},ya=e=>({set:e=>{ba=ya(e)},reset:()=>ya(e),compare:ha(e),snap:va(e),orient:ga(e)}),ba=ya(),xa=(e,t)=>e.ll.x.isLessThanOrEqualTo(t.x)&&t.x.isLessThanOrEqualTo(e.ur.x)&&e.ll.y.isLessThanOrEqualTo(t.y)&&t.y.isLessThanOrEqualTo(e.ur.y),Sa=(e,t)=>{if(t.ur.x.isLessThan(e.ll.x)||e.ur.x.isLessThan(t.ll.x)||t.ur.y.isLessThan(e.ll.y)||e.ur.y.isLessThan(t.ll.y))return null;let n=e.ll.x.isLessThan(t.ll.x)?t.ll.x:e.ll.x,r=e.ur.x.isLessThan(t.ur.x)?e.ur.x:t.ur.x,i=e.ll.y.isLessThan(t.ll.y)?t.ll.y:e.ll.y,a=e.ur.y.isLessThan(t.ur.y)?e.ur.y:t.ur.y;return{ll:{x:n,y:i},ur:{x:r,y:a}}},Ca=(e,t)=>e.x.times(t.y).minus(e.y.times(t.x)),wa=(e,t)=>e.x.times(t.x).plus(e.y.times(t.y)),Ta=e=>wa(e,e).sqrt(),Ea=(e,t,n)=>{let r={x:t.x.minus(e.x),y:t.y.minus(e.y)},i={x:n.x.minus(e.x),y:n.y.minus(e.y)};return Ca(i,r).div(Ta(i)).div(Ta(r))},Da=(e,t,n)=>{let r={x:t.x.minus(e.x),y:t.y.minus(e.y)},i={x:n.x.minus(e.x),y:n.y.minus(e.y)};return wa(i,r).div(Ta(i)).div(Ta(r))},Oa=(e,t,n)=>t.y.isZero()?null:{x:e.x.plus(t.x.div(t.y).times(n.minus(e.y))),y:n},ka=(e,t,n)=>t.x.isZero()?null:{x:n,y:e.y.plus(t.y.div(t.x).times(n.minus(e.x)))},Aa=(e,t,n,r)=>{if(t.x.isZero())return ka(n,r,e.x);if(r.x.isZero())return ka(e,t,n.x);if(t.y.isZero())return Oa(n,r,e.y);if(r.y.isZero())return Oa(e,t,n.y);let i=Ca(t,r);if(i.isZero())return null;let a={x:n.x.minus(e.x),y:n.y.minus(e.y)},o=Ca(a,t).div(i),s=Ca(a,r).div(i),c=e.x.plus(s.times(t.x)),l=n.x.plus(o.times(r.x)),u=e.y.plus(s.times(t.y)),d=n.y.plus(o.times(r.y));return{x:c.plus(l).div(2),y:u.plus(d).div(2)}},ja=class e{point;isLeft;segment;otherSE;consumedBy;static compare(t,n){let r=e.comparePoints(t.point,n.point);return r===0?(t.point!==n.point&&t.link(n),t.isLeft===n.isLeft?La.compare(t.segment,n.segment):t.isLeft?1:-1):r}static comparePoints(e,t){return e.x.isLessThan(t.x)?-1:e.x.isGreaterThan(t.x)?1:e.y.isLessThan(t.y)?-1:e.y.isGreaterThan(t.y)?1:0}constructor(e,t){e.events===void 0?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=t}link(e){if(e.point===this.point)throw Error(`Tried to link already linked events`);let t=e.point.events;for(let e=0,n=t.length;e<n;e++){let n=t[e];this.point.events.push(n),n.point=this.point}this.checkForConsuming()}checkForConsuming(){let e=this.point.events.length;for(let t=0;t<e;t++){let n=this.point.events[t];if(n.segment.consumedBy===void 0)for(let r=t+1;r<e;r++){let e=this.point.events[r];e.consumedBy===void 0&&n.otherSE.point.events===e.otherSE.point.events&&n.segment.consume(e.segment)}}}getAvailableLinkedEvents(){let e=[];for(let t=0,n=this.point.events.length;t<n;t++){let n=this.point.events[t];n!==this&&!n.segment.ringOut&&n.segment.isInResult()&&e.push(n)}return e}getLeftmostComparator(e){let t=new Map,n=n=>{let r=n.otherSE;t.set(n,{sine:Ea(this.point,e.point,r.point),cosine:Da(this.point,e.point,r.point)})};return(e,r)=>{t.has(e)||n(e),t.has(r)||n(r);let{sine:i,cosine:a}=t.get(e),{sine:o,cosine:s}=t.get(r);return i.isGreaterThanOrEqualTo(0)&&o.isGreaterThanOrEqualTo(0)?a.isLessThan(s)?1:a.isGreaterThan(s)?-1:0:i.isLessThan(0)&&o.isLessThan(0)?a.isLessThan(s)?-1:a.isGreaterThan(s)?1:0:o.isLessThan(i)?-1:o.isGreaterThan(i)?1:0}}},Ma=class e{events;poly;_isExteriorRing;_enclosingRing;static factory(t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];if(!i.isInResult()||i.ringOut)continue;let a=null,o=i.leftSE,s=i.rightSE,c=[o],l=o.point,u=[];for(;a=o,o=s,c.push(o),o.point!==l;)for(;;){let t=o.getAvailableLinkedEvents();if(t.length===0){let e=c[0].point,t=c[c.length-1].point;throw Error(`Unable to complete output ring starting at [${e.x}, ${e.y}]. Last matching segment found ends at [${t.x}, ${t.y}].`)}if(t.length===1){s=t[0].otherSE;break}let r=null;for(let e=0,t=u.length;e<t;e++)if(u[e].point===o.point){r=e;break}if(r!==null){let t=u.splice(r)[0],i=c.splice(t.index);i.unshift(i[0].otherSE),n.push(new e(i.reverse()));continue}u.push({index:c.length,point:o.point});let i=o.getLeftmostComparator(a);s=t.sort(i)[0].otherSE;break}n.push(new e(c))}return n}constructor(e){this.events=e;for(let t=0,n=e.length;t<n;t++)e[t].segment.ringOut=this;this.poly=null}getGeom(){let e=this.events[0].point,t=[e];for(let n=1,r=this.events.length-1;n<r;n++){let r=this.events[n].point,i=this.events[n+1].point;ba.orient(r,e,i)!==0&&(t.push(r),e=r)}if(t.length===1)return null;let n=t[0],r=t[1];ba.orient(n,e,r)===0&&t.shift(),t.push(t[0]);let i=this.isExteriorRing()?1:-1,a=this.isExteriorRing()?0:t.length-1,o=this.isExteriorRing()?t.length:-1,s=[];for(let e=a;e!=o;e+=i)s.push([t[e].x.toNumber(),t[e].y.toNumber()]);return s}isExteriorRing(){if(this._isExteriorRing===void 0){let e=this.enclosingRing();this._isExteriorRing=e?!e.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let e=this.events[0];for(let t=1,n=this.events.length;t<n;t++){let n=this.events[t];ja.compare(e,n)>0&&(e=n)}let t=e.segment.prevInResult(),n=t?t.prevInResult():null;for(;;){if(!t)return null;if(!n)return t.ringOut;if(n.ringOut!==t.ringOut)return n.ringOut?.enclosingRing()===t.ringOut?t.ringOut?.enclosingRing():t.ringOut;t=n.prevInResult(),n=t?t.prevInResult():null}}},Na=class{exteriorRing;interiorRings;constructor(e){this.exteriorRing=e,e.poly=this,this.interiorRings=[]}addInterior(e){this.interiorRings.push(e),e.poly=this}getGeom(){let e=this.exteriorRing.getGeom();if(e===null)return null;let t=[e];for(let e=0,n=this.interiorRings.length;e<n;e++){let n=this.interiorRings[e].getGeom();n!==null&&t.push(n)}return t}},Pa=class{rings;polys;constructor(e){this.rings=e,this.polys=this._composePolys(e)}getGeom(){let e=[];for(let t=0,n=this.polys.length;t<n;t++){let n=this.polys[t].getGeom();n!==null&&e.push(n)}return e}_composePolys(e){let t=[];for(let n=0,r=e.length;n<r;n++){let r=e[n];if(!r.poly)if(r.isExteriorRing())t.push(new Na(r));else{let e=r.enclosingRing();e?.poly||t.push(new Na(e)),e?.poly?.addInterior(r)}}return t}},Fa=class{queue;tree;segments;constructor(e,t=La.compare){this.queue=e,this.tree=new da(t),this.segments=[]}process(e){let t=e.segment,n=[];if(e.consumedBy)return e.isLeft?this.queue.delete(e.otherSE):this.tree.delete(t),n;e.isLeft&&this.tree.add(t);let r=t,i=t;do r=this.tree.lastBefore(r);while(r!=null&&r.consumedBy!=null);do i=this.tree.firstAfter(i);while(i!=null&&i.consumedBy!=null);if(e.isLeft){let a=null;if(r){let e=r.getIntersection(t);if(e!==null&&(t.isAnEndpoint(e)||(a=e),!r.isAnEndpoint(e))){let t=this._splitSafely(r,e);for(let e=0,r=t.length;e<r;e++)n.push(t[e])}}let o=null;if(i){let e=i.getIntersection(t);if(e!==null&&(t.isAnEndpoint(e)||(o=e),!i.isAnEndpoint(e))){let t=this._splitSafely(i,e);for(let e=0,r=t.length;e<r;e++)n.push(t[e])}}if(a!==null||o!==null){let e=null;e=a===null?o:o===null||ja.comparePoints(a,o)<=0?a:o,this.queue.delete(t.rightSE),n.push(t.rightSE);let r=t.split(e);for(let e=0,t=r.length;e<t;e++)n.push(r[e])}n.length>0?(this.tree.delete(t),n.push(e)):(this.segments.push(t),t.prev=r)}else{if(r&&i){let e=r.getIntersection(i);if(e!==null){if(!r.isAnEndpoint(e)){let t=this._splitSafely(r,e);for(let e=0,r=t.length;e<r;e++)n.push(t[e])}if(!i.isAnEndpoint(e)){let t=this._splitSafely(i,e);for(let e=0,r=t.length;e<r;e++)n.push(t[e])}}}this.tree.delete(t)}return n}_splitSafely(e,t){this.tree.delete(e);let n=e.rightSE;this.queue.delete(n);let r=e.split(t);return r.push(n),e.consumedBy===void 0&&this.tree.add(e),r}},Z=new class{type;numMultiPolys;run(e,t,n){Z.type=e;let r=[new Ba(t,!0)];for(let e=0,t=n.length;e<t;e++)r.push(new Ba(n[e],!1));if(Z.numMultiPolys=r.length,Z.type===`difference`){let e=r[0],t=1;for(;t<r.length;)Sa(r[t].bbox,e.bbox)===null?r.splice(t,1):t++}if(Z.type===`intersection`)for(let e=0,t=r.length;e<t;e++){let t=r[e];for(let n=e+1,i=r.length;n<i;n++)if(Sa(t.bbox,r[n].bbox)===null)return[]}let i=new da(ja.compare);for(let e=0,t=r.length;e<t;e++){let t=r[e].getSweepEvents();for(let e=0,n=t.length;e<n;e++)i.add(t[e])}let a=new Fa(i),o=null;for(i.size!=0&&(o=i.first(),i.delete(o));o;){let e=a.process(o);for(let t=0,n=e.length;t<n;t++){let n=e[t];n.consumedBy===void 0&&i.add(n)}i.size==0?o=null:(o=i.first(),i.delete(o))}return ba.reset(),new Pa(Ma.factory(a.segments)).getGeom()}},Q=Z,Ia=0,La=class e{id;leftSE;rightSE;rings;windings;ringOut;consumedBy;prev;_prevInResult;_beforeState;_afterState;_isInResult;static compare(e,t){let n=e.leftSE.point.x,r=t.leftSE.point.x,i=e.rightSE.point.x,a=t.rightSE.point.x;if(a.isLessThan(n))return 1;if(i.isLessThan(r))return-1;let o=e.leftSE.point.y,s=t.leftSE.point.y,c=e.rightSE.point.y,l=t.rightSE.point.y;if(n.isLessThan(r)){if(s.isLessThan(o)&&s.isLessThan(c))return 1;if(s.isGreaterThan(o)&&s.isGreaterThan(c))return-1;let n=e.comparePoint(t.leftSE.point);if(n<0)return 1;if(n>0)return-1;let r=t.comparePoint(e.rightSE.point);return r===0?-1:r}if(n.isGreaterThan(r)){if(o.isLessThan(s)&&o.isLessThan(l))return-1;if(o.isGreaterThan(s)&&o.isGreaterThan(l))return 1;let n=t.comparePoint(e.leftSE.point);if(n!==0)return n;let r=e.comparePoint(t.rightSE.point);return r<0?1:r>0?-1:1}if(o.isLessThan(s))return-1;if(o.isGreaterThan(s))return 1;if(i.isLessThan(a)){let n=t.comparePoint(e.rightSE.point);if(n!==0)return n}if(i.isGreaterThan(a)){let n=e.comparePoint(t.rightSE.point);if(n<0)return 1;if(n>0)return-1}if(!i.eq(a)){let e=c.minus(o),t=i.minus(n),u=l.minus(s),d=a.minus(r);if(e.isGreaterThan(t)&&u.isLessThan(d))return 1;if(e.isLessThan(t)&&u.isGreaterThan(d))return-1}return i.isGreaterThan(a)?1:i.isLessThan(a)||c.isLessThan(l)?-1:c.isGreaterThan(l)?1:e.id<t.id?-1:e.id>t.id?1:0}constructor(e,t,n,r){this.id=++Ia,this.leftSE=e,e.segment=this,e.otherSE=t,this.rightSE=t,t.segment=this,t.otherSE=e,this.rings=n,this.windings=r}static fromRing(t,n,r){let i,a,o,s=ja.comparePoints(t,n);if(s<0)i=t,a=n,o=1;else if(s>0)i=n,a=t,o=-1;else throw Error(`Tried to create degenerate segment at [${t.x}, ${t.y}]`);return new e(new ja(i,!0),new ja(a,!1),[r],[o])}replaceRightSE(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){let e=this.leftSE.point.y,t=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e.isLessThan(t)?e:t},ur:{x:this.rightSE.point.x,y:e.isGreaterThan(t)?e:t}}}vector(){return{x:this.rightSE.point.x.minus(this.leftSE.point.x),y:this.rightSE.point.y.minus(this.leftSE.point.y)}}isAnEndpoint(e){return e.x.eq(this.leftSE.point.x)&&e.y.eq(this.leftSE.point.y)||e.x.eq(this.rightSE.point.x)&&e.y.eq(this.rightSE.point.y)}comparePoint(e){return ba.orient(this.leftSE.point,e,this.rightSE.point)}getIntersection(e){let t=this.bbox(),n=e.bbox(),r=Sa(t,n);if(r===null)return null;let i=this.leftSE.point,a=this.rightSE.point,o=e.leftSE.point,s=e.rightSE.point,c=xa(t,o)&&this.comparePoint(o)===0,l=xa(n,i)&&e.comparePoint(i)===0,u=xa(t,s)&&this.comparePoint(s)===0,d=xa(n,a)&&e.comparePoint(a)===0;if(l&&c)return d&&!u?a:!d&&u?s:null;if(l)return u&&i.x.eq(s.x)&&i.y.eq(s.y)?null:i;if(c)return d&&a.x.eq(o.x)&&a.y.eq(o.y)?null:o;if(d&&u)return null;if(d)return a;if(u)return s;let f=Aa(i,this.vector(),o,e.vector());return f===null||!xa(r,f)?null:ba.snap(f)}split(t){let n=[],r=t.events!==void 0,i=new ja(t,!0),a=new ja(t,!1),o=this.rightSE;this.replaceRightSE(a),n.push(a),n.push(i);let s=new e(i,o,this.rings.slice(),this.windings.slice());return ja.comparePoints(s.leftSE.point,s.rightSE.point)>0&&s.swapEvents(),ja.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.checkForConsuming(),a.checkForConsuming()),n}swapEvents(){let e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let e=0,t=this.windings.length;e<t;e++)this.windings[e]*=-1}consume(t){let n=this,r=t;for(;n.consumedBy;)n=n.consumedBy;for(;r.consumedBy;)r=r.consumedBy;let i=e.compare(n,r);if(i!==0){if(i>0){let e=n;n=r,r=e}if(n.prev===r){let e=n;n=r,r=e}for(let e=0,t=r.rings.length;e<t;e++){let t=r.rings[e],i=r.windings[e],a=n.rings.indexOf(t);a===-1?(n.rings.push(t),n.windings.push(i)):n.windings[a]+=i}r.rings=null,r.windings=null,r.consumedBy=n,r.leftSE.consumedBy=n.leftSE,r.rightSE.consumedBy=n.rightSE}}prevInResult(){return this._prevInResult===void 0&&(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null),this._prevInResult}beforeState(){return this._beforeState===void 0&&(this.prev?this._beforeState=(this.prev.consumedBy||this.prev).afterState():this._beforeState={rings:[],windings:[],multiPolys:[]}),this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;let e=this.beforeState();this._afterState={rings:e.rings.slice(0),windings:e.windings.slice(0),multiPolys:[]};let t=this._afterState.rings,n=this._afterState.windings,r=this._afterState.multiPolys;for(let e=0,r=this.rings.length;e<r;e++){let r=this.rings[e],i=this.windings[e],a=t.indexOf(r);a===-1?(t.push(r),n.push(i)):n[a]+=i}let i=[],a=[];for(let e=0,r=t.length;e<r;e++){if(n[e]===0)continue;let r=t[e],o=r.poly;if(a.indexOf(o)===-1)if(r.isExterior)i.push(o);else{a.indexOf(o)===-1&&a.push(o);let e=i.indexOf(r.poly);e!==-1&&i.splice(e,1)}}for(let e=0,t=i.length;e<t;e++){let t=i[e].multiPoly;r.indexOf(t)===-1&&r.push(t)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;let e=this.beforeState().multiPolys,t=this.afterState().multiPolys;switch(Q.type){case`union`:this._isInResult=e.length===0!=(t.length===0);break;case`intersection`:{let n,r;e.length<t.length?(n=e.length,r=t.length):(n=t.length,r=e.length),this._isInResult=r===Q.numMultiPolys&&n<r;break}case`xor`:this._isInResult=Math.abs(e.length-t.length)%2==1;break;case`difference`:{let n=e=>e.length===1&&e[0].isSubject;this._isInResult=n(e)!==n(t);break}}return this._isInResult}},Ra=class{poly;isExterior;segments;bbox;constructor(e,t,n){if(!Array.isArray(e)||e.length===0||(this.poly=t,this.isExterior=n,this.segments=[],typeof e[0][0]!=`number`||typeof e[0][1]!=`number`))throw Error(`Input geometry is not a valid Polygon or MultiPolygon`);let r=ba.snap({x:new Y(e[0][0]),y:new Y(e[0][1])});this.bbox={ll:{x:r.x,y:r.y},ur:{x:r.x,y:r.y}};let i=r;for(let t=1,n=e.length;t<n;t++){if(typeof e[t][0]!=`number`||typeof e[t][1]!=`number`)throw Error(`Input geometry is not a valid Polygon or MultiPolygon`);let n=ba.snap({x:new Y(e[t][0]),y:new Y(e[t][1])});n.x.eq(i.x)&&n.y.eq(i.y)||(this.segments.push(La.fromRing(i,n,this)),n.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=n.x),n.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=n.y),n.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=n.x),n.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=n.y),i=n)}(!r.x.eq(i.x)||!r.y.eq(i.y))&&this.segments.push(La.fromRing(i,r,this))}getSweepEvents(){let e=[];for(let t=0,n=this.segments.length;t<n;t++){let n=this.segments[t];e.push(n.leftSE),e.push(n.rightSE)}return e}},za=class{multiPoly;exteriorRing;interiorRings;bbox;constructor(e,t){if(!Array.isArray(e))throw Error(`Input geometry is not a valid Polygon or MultiPolygon`);this.exteriorRing=new Ra(e[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let t=1,n=e.length;t<n;t++){let n=new Ra(e[t],this,!1);n.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=n.bbox.ll.x),n.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=n.bbox.ll.y),n.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=n.bbox.ur.x),n.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=n.bbox.ur.y),this.interiorRings.push(n)}this.multiPoly=t}getSweepEvents(){let e=this.exteriorRing.getSweepEvents();for(let t=0,n=this.interiorRings.length;t<n;t++){let n=this.interiorRings[t].getSweepEvents();for(let t=0,r=n.length;t<r;t++)e.push(n[t])}return e}},Ba=class{isSubject;polys;bbox;constructor(e,t){if(!Array.isArray(e))throw Error(`Input geometry is not a valid Polygon or MultiPolygon`);try{typeof e[0][0][0]==`number`&&(e=[e])}catch{}this.polys=[],this.bbox={ll:{x:new Y(1/0),y:new Y(1/0)},ur:{x:new Y(-1/0),y:new Y(-1/0)}};for(let t=0,n=e.length;t<n;t++){let n=new za(e[t],this);n.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=n.bbox.ll.x),n.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=n.bbox.ll.y),n.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=n.bbox.ur.x),n.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=n.bbox.ur.y),this.polys.push(n)}this.isSubject=t}getSweepEvents(){let e=[];for(let t=0,n=this.polys.length;t<n;t++){let n=this.polys[t].getSweepEvents();for(let t=0,r=n.length;t<r;t++)e.push(n[t])}return e}},Va=(e,...t)=>Q.run(`intersection`,e,t);ba.set;function Ha(e,t={}){let n=[];if(jn(e,e=>{n.push(e.coordinates)}),n.length<2)throw Error(`Must specify at least 2 geometries`);let r=Va(n[0],...n.slice(1));return r.length===0?null:r.length===1?Tn(r[0],t.properties):kn(r,t.properties)}var Ua=1e-6,$=Math.PI,Wa=$/2,Ga=$/4,Ka=$*2,qa=180/$,Ja=$/180,Ya=Math.abs,Xa=Math.atan,Za=Math.atan2,Qa=Math.cos,$a=Math.ceil,eo=Math.exp,to=Math.log,no=Math.sin,ro=Math.sign||function(e){return e>0?1:e<0?-1:0},io=Math.sqrt,ao=Math.tan;function oo(e){return e>1?0:e<-1?$:Math.acos(e)}function so(e){return e>1?Wa:e<-1?-Wa:Math.asin(e)}function co(){}function lo(e,t){e&&fo.hasOwnProperty(e.type)&&fo[e.type](e,t)}var uo={Feature:function(e,t){lo(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)lo(n[r].geometry,t)}},fo={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){po(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)po(n[r],t,0)},Polygon:function(e,t){mo(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)mo(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)lo(n[r],t)}};function po(e,t,n){var r=-1,i=e.length-n,a;for(t.lineStart();++r<i;)a=e[r],t.point(a[0],a[1],a[2]);t.lineEnd()}function mo(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)po(e[n],t,1);t.polygonEnd()}function ho(e,t){e&&uo.hasOwnProperty(e.type)?uo[e.type](e,t):lo(e,t)}function go(e){return[Za(e[1],e[0]),so(e[2])]}function _o(e){var t=e[0],n=e[1],r=Qa(n);return[r*Qa(t),r*no(t),no(n)]}function vo(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function yo(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function bo(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function xo(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function So(e){var t=io(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function Co(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return n=t.invert(n,r),n&&e.invert(n[0],n[1])}),n}function wo(e,t){return Ya(e)>$&&(e-=Math.round(e/Ka)*Ka),[e,t]}wo.invert=wo;function To(e,t,n){return(e%=Ka)?t||n?Co(Do(e),Oo(t,n)):Do(e):t||n?Oo(t,n):wo}function Eo(e){return function(t,n){return t+=e,Ya(t)>$&&(t-=Math.round(t/Ka)*Ka),[t,n]}}function Do(e){var t=Eo(e);return t.invert=Eo(-e),t}function Oo(e,t){var n=Qa(e),r=no(e),i=Qa(t),a=no(t);function o(e,t){var o=Qa(t),s=Qa(e)*o,c=no(e)*o,l=no(t),u=l*n+s*r;return[Za(c*i-u*a,s*n-l*r),so(u*i+c*a)]}return o.invert=function(e,t){var o=Qa(t),s=Qa(e)*o,c=no(e)*o,l=no(t),u=l*i-c*a;return[Za(c*i+l*a,s*n+u*r),so(u*n-s*r)]},o}function ko(e){e=To(e[0]*Ja,e[1]*Ja,e.length>2?e[2]*Ja:0);function t(t){return t=e(t[0]*Ja,t[1]*Ja),t[0]*=qa,t[1]*=qa,t}return t.invert=function(t){return t=e.invert(t[0]*Ja,t[1]*Ja),t[0]*=qa,t[1]*=qa,t},t}function Ao(e,t,n,r,i,a){if(n){var o=Qa(t),s=no(t),c=r*n;i==null?(i=t+r*Ka,a=t-c/2):(i=jo(o,i),a=jo(o,a),(r>0?i<a:i>a)&&(i+=r*Ka));for(var l,u=i;r>0?u>a:u<a;u-=c)l=go([o,-s*Qa(u),-s*no(u)]),e.point(l[0],l[1])}}function jo(e,t){t=_o(t),t[0]-=e,So(t);var n=oo(-t[1]);return((-t[2]<0?-n:n)+Ka-Ua)%Ka}function Mo(){var e=[],t;return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:co,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function No(e,t){return Ya(e[0]-t[0])<1e-6&&Ya(e[1]-t[1])<1e-6}function Po(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Fo(e,t,n,r,i){var a=[],o=[],s,c;if(e.forEach(function(e){if(!((t=e.length-1)<=0)){var t,n=e[0],r=e[t],c;if(No(n,r)){if(!n[2]&&!r[2]){for(i.lineStart(),s=0;s<t;++s)i.point((n=e[s])[0],n[1]);i.lineEnd();return}r[0]+=2*Ua}a.push(c=new Po(n,e,null,!0)),o.push(c.o=new Po(n,null,c,!1)),a.push(c=new Po(r,e,null,!1)),o.push(c.o=new Po(r,null,c,!0))}}),a.length){for(o.sort(t),Io(a),Io(o),s=0,c=o.length;s<c;++s)o[s].e=n=!n;for(var l=a[0],u,d;;){for(var f=l,p=!0;f.v;)if((f=f.n)===l)return;u=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(p)for(s=0,c=u.length;s<c;++s)i.point((d=u[s])[0],d[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(p)for(u=f.p.z,s=u.length-1;s>=0;--s)i.point((d=u[s])[0],d[1]);else r(f.x,f.p.x,-1,i);f=f.p}f=f.o,u=f.z,p=!p}while(!f.v);i.lineEnd()}}}function Io(e){if(t=e.length){for(var t,n=0,r=e[0],i;++n<t;)r.n=i=e[n],i.p=r,r=i;r.n=i=e[0],i.p=r}}function Lo(e){return Ya(e[0])<=$?e[0]:ro(e[0])*((Ya(e[0])+$)%Ka-$)}function Ro(e,t){var n=Lo(t),r=t[1],i=no(r),a=[no(n),-Qa(n),0],o=0,s=0,c=new bt;i===1?r=Wa+Ua:i===-1&&(r=-Wa-Ua);for(var l=0,u=e.length;l<u;++l)if(f=(d=e[l]).length)for(var d,f,p=d[f-1],m=Lo(p),h=p[1]/2+Ga,g=no(h),_=Qa(h),v=0;v<f;++v,m=b,g=S,_=C,p=y){var y=d[v],b=Lo(y),x=y[1]/2+Ga,S=no(x),C=Qa(x),w=b-m,T=w>=0?1:-1,E=T*w,D=E>$,O=g*S;if(c.add(Za(O*T*no(E),_*C+O*Qa(E))),o+=D?w+T*Ka:w,D^m>=n^b>=n){var k=yo(_o(p),_o(y));So(k);var A=yo(a,k);So(A);var j=(D^w>=0?-1:1)*so(A[2]);(r>j||r===j&&(k[0]||k[1]))&&(s+=D^w>=0?1:-1)}}return(o<-1e-6||o<1e-6&&c<-1e-12)^s&1}function zo(e,t,n,r){return function(i){var a=t(i),o=Mo(),s=t(o),c=!1,l,u,d,f={point:p,lineStart:h,lineEnd:g,polygonStart:function(){f.point=_,f.lineStart=v,f.lineEnd=y,u=[],l=[]},polygonEnd:function(){f.point=p,f.lineStart=h,f.lineEnd=g,u=Ft(u);var e=Ro(l,r);u.length?(c||=(i.polygonStart(),!0),Fo(u,Vo,e,n,i)):e&&(c||=(i.polygonStart(),!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),c&&=(i.polygonEnd(),!1),u=l=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(t,n){e(t,n)&&i.point(t,n)}function m(e,t){a.point(e,t)}function h(){f.point=m,a.lineStart()}function g(){f.point=p,a.lineEnd()}function _(e,t){d.push([e,t]),s.point(e,t)}function v(){s.lineStart(),d=[]}function y(){_(d[0][0],d[0][1]),s.lineEnd();var e=s.clean(),t=o.result(),n,r=t.length,a,f,p;if(d.pop(),l.push(d),d=null,r){if(e&1){if(f=t[0],(a=f.length-1)>0){for(c||=(i.polygonStart(),!0),i.lineStart(),n=0;n<a;++n)i.point((p=f[n])[0],p[1]);i.lineEnd()}return}r>1&&e&2&&t.push(t.pop().concat(t.shift())),u.push(t.filter(Bo))}}return f}}function Bo(e){return e.length>1}function Vo(e,t){return((e=e.x)[0]<0?e[1]-Wa-Ua:Wa-e[1])-((t=t.x)[0]<0?t[1]-Wa-Ua:Wa-t[1])}var Ho=zo(function(){return!0},Uo,Go,[-$,-Wa]);function Uo(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(a,o){var s=a>0?$:-$,c=Ya(a-t);Ya(c-$)<1e-6?(e.point(t,n=(n+o)/2>0?Wa:-Wa),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),e.point(a,n),i=0):r!==s&&c>=$&&(Ya(t-r)<1e-6&&(t-=r*Ua),Ya(a-s)<1e-6&&(a-=s*Ua),n=Wo(t,n,a,o),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),i=0),e.point(t=a,n=o),r=s},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}}function Wo(e,t,n,r){var i,a,o=no(e-n);return Ya(o)>1e-6?Xa((no(t)*(a=Qa(r))*no(n)-no(r)*(i=Qa(t))*no(e))/(i*a*o)):(t+r)/2}function Go(e,t,n,r){var i;if(e==null)i=n*Wa,r.point(-$,i),r.point(0,i),r.point($,i),r.point($,0),r.point($,-i),r.point(0,-i),r.point(-$,-i),r.point(-$,0),r.point(-$,i);else if(Ya(e[0]-t[0])>1e-6){var a=e[0]<t[0]?$:-$;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(t[0],t[1])}function Ko(e){var t=Qa(e),n=2*Ja,r=t>0,i=Ya(t)>Ua;function a(t,r,i,a){Ao(a,e,n,i,t,r)}function o(e,n){return Qa(e)*Qa(n)>t}function s(e){var t,n,a,s,u;return{lineStart:function(){s=a=!1,u=1},point:function(d,f){var p=[d,f],m,h=o(d,f),g=r?h?0:l(d,f):h?l(d+(d<0?$:-$),f):0;if(!t&&(s=a=h)&&e.lineStart(),h!==a&&(m=c(t,p),(!m||No(t,m)||No(p,m))&&(p[2]=1)),h!==a)u=0,h?(e.lineStart(),m=c(p,t),e.point(m[0],m[1])):(m=c(t,p),e.point(m[0],m[1],2),e.lineEnd()),t=m;else if(i&&t&&r^h){var _;!(g&n)&&(_=c(p,t,!0))&&(u=0,r?(e.lineStart(),e.point(_[0][0],_[0][1]),e.point(_[1][0],_[1][1]),e.lineEnd()):(e.point(_[1][0],_[1][1]),e.lineEnd(),e.lineStart(),e.point(_[0][0],_[0][1],3)))}h&&(!t||!No(t,p))&&e.point(p[0],p[1]),t=p,a=h,n=g},lineEnd:function(){a&&e.lineEnd(),t=null},clean:function(){return u|(s&&a)<<1}}}function c(e,n,r){var i=_o(e),a=_o(n),o=[1,0,0],s=yo(i,a),c=vo(s,s),l=s[0],u=c-l*l;if(!u)return!r&&e;var d=t*c/u,f=-t*l/u,p=yo(o,s),m=xo(o,d);bo(m,xo(s,f));var h=p,g=vo(m,h),_=vo(h,h),v=g*g-_*(vo(m,m)-1);if(!(v<0)){var y=io(v),b=xo(h,(-g-y)/_);if(bo(b,m),b=go(b),!r)return b;var x=e[0],S=n[0],C=e[1],w=n[1],T;S<x&&(T=x,x=S,S=T);var E=S-x,D=Ya(E-$)<Ua,O=D||E<1e-6;if(!D&&w<C&&(T=C,C=w,w=T),O?D?C+w>0^b[1]<(Ya(b[0]-x)<1e-6?C:w):C<=b[1]&&b[1]<=w:E>$^(x<=b[0]&&b[0]<=S)){var k=xo(h,(-g+y)/_);return bo(k,m),[b,go(k)]}}}function l(t,n){var i=r?e:$-e,a=0;return t<-i?a|=1:t>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return zo(o,s,a,r?[0,-e]:[-$,e-$])}function qo(e,t,n,r,i,a){var o=e[0],s=e[1],c=t[0],l=t[1],u=0,d=1,f=c-o,p=l-s,m=n-o;if(!(!f&&m>0)){if(m/=f,f<0){if(m<u)return;m<d&&(d=m)}else if(f>0){if(m>d)return;m>u&&(u=m)}if(m=i-o,!(!f&&m<0)){if(m/=f,f<0){if(m>d)return;m>u&&(u=m)}else if(f>0){if(m<u)return;m<d&&(d=m)}if(m=r-s,!(!p&&m>0)){if(m/=p,p<0){if(m<u)return;m<d&&(d=m)}else if(p>0){if(m>d)return;m>u&&(u=m)}if(m=a-s,!(!p&&m<0)){if(m/=p,p<0){if(m>d)return;m>u&&(u=m)}else if(p>0){if(m<u)return;m<d&&(d=m)}return u>0&&(e[0]=o+u*f,e[1]=s+u*p),d<1&&(t[0]=o+d*f,t[1]=s+d*p),!0}}}}}var Jo=1e9,Yo=-Jo;function Xo(e,t,n,r){function i(i,a){return e<=i&&i<=n&&t<=a&&a<=r}function a(i,a,s,l){var u=0,d=0;if(i==null||(u=o(i,s))!==(d=o(a,s))||c(i,a)<0^s>0)do l.point(u===0||u===3?e:n,u>1?r:t);while((u=(u+s+4)%4)!==d);else l.point(a[0],a[1])}function o(r,i){return Ya(r[0]-e)<1e-6?i>0?0:3:Ya(r[0]-n)<1e-6?i>0?2:1:Ya(r[1]-t)<1e-6?i>0?1:0:i>0?3:2}function s(e,t){return c(e.x,t.x)}function c(e,t){var n=o(e,1),r=o(t,1);return n===r?n===0?t[1]-e[1]:n===1?e[0]-t[0]:n===2?e[1]-t[1]:t[0]-e[0]:n-r}return function(o){var c=o,l=Mo(),u,d,f,p,m,h,g,_,v,y,b,x={point:S,lineStart:E,lineEnd:D,polygonStart:w,polygonEnd:T};function S(e,t){i(e,t)&&c.point(e,t)}function C(){for(var t=0,n=0,i=d.length;n<i;++n)for(var a=d[n],o=1,s=a.length,c=a[0],l,u,f=c[0],p=c[1];o<s;++o)l=f,u=p,c=a[o],f=c[0],p=c[1],u<=r?p>r&&(f-l)*(r-u)>(p-u)*(e-l)&&++t:p<=r&&(f-l)*(r-u)<(p-u)*(e-l)&&--t;return t}function w(){c=l,u=[],d=[],b=!0}function T(){var e=C(),t=b&&e,n=(u=Ft(u)).length;(t||n)&&(o.polygonStart(),t&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),n&&Fo(u,s,e,a,o),o.polygonEnd()),c=o,u=d=f=null}function E(){x.point=O,d&&d.push(f=[]),y=!0,v=!1,g=_=NaN}function D(){u&&(O(p,m),h&&v&&l.rejoin(),u.push(l.result())),x.point=S,v&&c.lineEnd()}function O(a,o){var s=i(a,o);if(d&&f.push([a,o]),y)p=a,m=o,h=s,y=!1,s&&(c.lineStart(),c.point(a,o));else if(s&&v)c.point(a,o);else{var l=[g=Math.max(Yo,Math.min(Jo,g)),_=Math.max(Yo,Math.min(Jo,_))],u=[a=Math.max(Yo,Math.min(Jo,a)),o=Math.max(Yo,Math.min(Jo,o))];qo(l,u,e,t,n,r)?(v||(c.lineStart(),c.point(l[0],l[1])),c.point(u[0],u[1]),s||c.lineEnd(),b=!1):s&&(c.lineStart(),c.point(a,o),b=!1)}g=a,_=o,v=s}return x}}function Zo(e,t,n){var r=H(e,t-Ua,n).concat(t);return function(e){return r.map(function(t){return[e,t]})}}function Qo(e,t,n){var r=H(e,t-Ua,n).concat(t);return function(e){return r.map(function(t){return[t,e]})}}function $o(){var e,t,n,r,i,a,o,s,c=10,l=c,u=90,d=360,f,p,m,h,g=2.5;function _(){return{type:`MultiLineString`,coordinates:v()}}function v(){return H($a(r/u)*u,n,u).map(m).concat(H($a(s/d)*d,o,d).map(h)).concat(H($a(t/c)*c,e,c).filter(function(e){return Ya(e%u)>Ua}).map(f)).concat(H($a(a/l)*l,i,l).filter(function(e){return Ya(e%d)>Ua}).map(p))}return _.lines=function(){return v().map(function(e){return{type:`LineString`,coordinates:e}})},_.outline=function(){return{type:`Polygon`,coordinates:[m(r).concat(h(o).slice(1),m(n).reverse().slice(1),h(s).reverse().slice(1))]}},_.extent=function(e){return arguments.length?_.extentMajor(e).extentMinor(e):_.extentMinor()},_.extentMajor=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],s=+e[0][1],o=+e[1][1],r>n&&(e=r,r=n,n=e),s>o&&(e=s,s=o,o=e),_.precision(g)):[[r,s],[n,o]]},_.extentMinor=function(n){return arguments.length?(t=+n[0][0],e=+n[1][0],a=+n[0][1],i=+n[1][1],t>e&&(n=t,t=e,e=n),a>i&&(n=a,a=i,i=n),_.precision(g)):[[t,a],[e,i]]},_.step=function(e){return arguments.length?_.stepMajor(e).stepMinor(e):_.stepMinor()},_.stepMajor=function(e){return arguments.length?(u=+e[0],d=+e[1],_):[u,d]},_.stepMinor=function(e){return arguments.length?(c=+e[0],l=+e[1],_):[c,l]},_.precision=function(c){return arguments.length?(g=+c,f=Zo(a,i,90),p=Qo(t,e,g),m=Zo(s,o,90),h=Qo(r,n,g),_):g},_.extentMajor([[-180,-90+Ua],[180,90-Ua]]).extentMinor([[-180,-80-Ua],[180,80+Ua]])}var es=e=>e,ts=new bt,ns=new bt,rs,is,as,os,ss={point:co,lineStart:co,lineEnd:co,polygonStart:function(){ss.lineStart=cs,ss.lineEnd=ds},polygonEnd:function(){ss.lineStart=ss.lineEnd=ss.point=co,ts.add(Ya(ns)),ns=new bt},result:function(){var e=ts/2;return ts=new bt,e}};function cs(){ss.point=ls}function ls(e,t){ss.point=us,rs=as=e,is=os=t}function us(e,t){ns.add(os*e-as*t),as=e,os=t}function ds(){us(rs,is)}var fs=1/0,ps=fs,ms=-fs,hs=ms,gs={point:_s,lineStart:co,lineEnd:co,polygonStart:co,polygonEnd:co,result:function(){var e=[[fs,ps],[ms,hs]];return ms=hs=-(ps=fs=1/0),e}};function _s(e,t){e<fs&&(fs=e),e>ms&&(ms=e),t<ps&&(ps=t),t>hs&&(hs=t)}var vs=0,ys=0,bs=0,xs=0,Ss=0,Cs=0,ws=0,Ts=0,Es=0,Ds,Os,ks,As,js={point:Ms,lineStart:Ns,lineEnd:Is,polygonStart:function(){js.lineStart=Ls,js.lineEnd=Rs},polygonEnd:function(){js.point=Ms,js.lineStart=Ns,js.lineEnd=Is},result:function(){var e=Es?[ws/Es,Ts/Es]:Cs?[xs/Cs,Ss/Cs]:bs?[vs/bs,ys/bs]:[NaN,NaN];return vs=ys=bs=xs=Ss=Cs=ws=Ts=Es=0,e}};function Ms(e,t){vs+=e,ys+=t,++bs}function Ns(){js.point=Ps}function Ps(e,t){js.point=Fs,Ms(ks=e,As=t)}function Fs(e,t){var n=e-ks,r=t-As,i=io(n*n+r*r);xs+=i*(ks+e)/2,Ss+=i*(As+t)/2,Cs+=i,Ms(ks=e,As=t)}function Is(){js.point=Ms}function Ls(){js.point=zs}function Rs(){Bs(Ds,Os)}function zs(e,t){js.point=Bs,Ms(Ds=ks=e,Os=As=t)}function Bs(e,t){var n=e-ks,r=t-As,i=io(n*n+r*r);xs+=i*(ks+e)/2,Ss+=i*(As+t)/2,Cs+=i,i=As*e-ks*t,ws+=i*(ks+e),Ts+=i*(As+t),Es+=i*3,Ms(ks=e,As=t)}function Vs(e){this._context=e}Vs.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,Ka);break}},result:co};var Hs=new bt,Us,Ws,Gs,Ks,qs,Js={point:co,lineStart:function(){Js.point=Ys},lineEnd:function(){Us&&Xs(Ws,Gs),Js.point=co},polygonStart:function(){Us=!0},polygonEnd:function(){Us=null},result:function(){var e=+Hs;return Hs=new bt,e}};function Ys(e,t){Js.point=Xs,Ws=Ks=e,Gs=qs=t}function Xs(e,t){Ks-=e,qs-=t,Hs.add(io(Ks*Ks+qs*qs)),Ks=e,qs=t}var Zs,Qs,$s,ec,tc=class{constructor(e){this._append=e==null?nc:rc(e),this._radius=4.5,this._=``}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+=`Z`),this._point=NaN}point(e,t){switch(this._point){case 0:this._append`M${e},${t}`,this._point=1;break;case 1:this._append`L${e},${t}`;break;default:if(this._append`M${e},${t}`,this._radius!==$s||this._append!==Qs){let e=this._radius,t=this._;this._=``,this._append`m0,${e}a${e},${e} 0 1,1 0,${-2*e}a${e},${e} 0 1,1 0,${2*e}z`,$s=e,Qs=this._append,ec=this._,this._=t}this._+=ec;break}}result(){let e=this._;return this._=``,e.length?e:null}};function nc(e){let t=1;this._+=e[0];for(let n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function rc(e){let t=Math.floor(e);if(!(t>=0))throw RangeError(`invalid digits: ${e}`);if(t>15)return nc;if(t!==Zs){let e=10**t;Zs=t,Qs=function(t){let n=1;this._+=t[0];for(let r=t.length;n<r;++n)this._+=Math.round(arguments[n]*e)/e+t[n]}}return Qs}function ic(e,t){let n=3,r=4.5,i,a;function o(e){return e&&(typeof r==`function`&&a.pointRadius(+r.apply(this,arguments)),ho(e,i(a))),a.result()}return o.area=function(e){return ho(e,i(ss)),ss.result()},o.measure=function(e){return ho(e,i(Js)),Js.result()},o.bounds=function(e){return ho(e,i(gs)),gs.result()},o.centroid=function(e){return ho(e,i(js)),js.result()},o.projection=function(t){return arguments.length?(i=t==null?(e=null,es):(e=t).stream,o):e},o.context=function(e){return arguments.length?(a=e==null?(t=null,new tc(n)):new Vs(t=e),typeof r!=`function`&&a.pointRadius(r),o):t},o.pointRadius=function(e){return arguments.length?(r=typeof e==`function`?e:(a.pointRadius(+e),+e),o):r},o.digits=function(e){if(!arguments.length)return n;if(e==null)n=null;else{let t=Math.floor(e);if(!(t>=0))throw RangeError(`invalid digits: ${e}`);n=t}return t===null&&(a=new tc(n)),o},o.projection(e).digits(n).context(t)}function ac(e){return function(t){var n=new oc;for(var r in e)n[r]=e[r];return n.stream=t,n}}function oc(){}oc.prototype={constructor:oc,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function sc(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),ho(n,e.stream(gs)),t(gs.result()),r!=null&&e.clipExtent(r),e}function cc(e,t,n){return sc(e,function(n){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+t[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+t[0][1]+(i-a*(n[1][1]+n[0][1]))/2;e.scale(150*a).translate([o,s])},n)}function lc(e,t,n){return cc(e,[[0,0],t],n)}function uc(e,t,n){return sc(e,function(n){var r=+t,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];e.scale(150*i).translate([a,o])},n)}function dc(e,t,n){return sc(e,function(n){var r=+t,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;e.scale(150*i).translate([a,o])},n)}var fc=16,pc=Qa(30*Ja);function mc(e,t){return+t?gc(e,t):hc(e)}function hc(e){return ac({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function gc(e,t){function n(r,i,a,o,s,c,l,u,d,f,p,m,h,g){var _=l-r,v=u-i,y=_*_+v*v;if(y>4*t&&h--){var b=o+f,x=s+p,S=c+m,C=io(b*b+x*x+S*S),w=so(S/=C),T=Ya(Ya(S)-1)<1e-6||Ya(a-d)<1e-6?(a+d)/2:Za(x,b),E=e(T,w),D=E[0],O=E[1],k=D-r,A=O-i,j=v*k-_*A;(j*j/y>t||Ya((_*k+v*A)/y-.5)>.3||o*f+s*p+c*m<pc)&&(n(r,i,a,o,s,c,D,O,T,b/=C,x/=C,S,h,g),g.point(D,O),n(D,O,T,b,x,S,l,u,d,f,p,m,h,g))}}return function(t){var r,i,a,o,s,c,l,u,d,f,p,m,h={point:g,lineStart:_,lineEnd:y,polygonStart:function(){t.polygonStart(),h.lineStart=b},polygonEnd:function(){t.polygonEnd(),h.lineStart=_}};function g(n,r){n=e(n,r),t.point(n[0],n[1])}function _(){u=NaN,h.point=v,t.lineStart()}function v(r,i){var a=_o([r,i]),o=e(r,i);n(u,d,l,f,p,m,u=o[0],d=o[1],l=r,f=a[0],p=a[1],m=a[2],fc,t),t.point(u,d)}function y(){h.point=g,t.lineEnd()}function b(){_(),h.point=x,h.lineEnd=S}function x(e,t){v(r=e,t),i=u,a=d,o=f,s=p,c=m,h.point=v}function S(){n(u,d,l,f,p,m,i,a,r,o,s,c,fc,t),h.lineEnd=y,y()}return h}}var _c=ac({point:function(e,t){this.stream.point(e*Ja,t*Ja)}});function vc(e){return ac({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function yc(e,t,n,r,i){function a(a,o){return a*=r,o*=i,[t+e*a,n-e*o]}return a.invert=function(a,o){return[(a-t)/e*r,(n-o)/e*i]},a}function bc(e,t,n,r,i,a){if(!a)return yc(e,t,n,r,i);var o=Qa(a),s=no(a),c=o*e,l=s*e,u=o/e,d=s/e,f=(s*n-o*t)/e,p=(s*t+o*n)/e;function m(e,a){return e*=r,a*=i,[c*e-l*a+t,n-l*e-c*a]}return m.invert=function(e,t){return[r*(u*e-d*t+f),i*(p-d*e-u*t)]},m}function xc(e){return Sc(function(){return e})()}function Sc(e){var t,n=150,r=480,i=250,a=0,o=0,s=0,c=0,l=0,u,d=0,f=1,p=1,m=null,h=Ho,g=null,_,v,y,b=es,x=.5,S,C,w,T,E;function D(e){return w(e[0]*Ja,e[1]*Ja)}function O(e){return e=w.invert(e[0],e[1]),e&&[e[0]*qa,e[1]*qa]}D.stream=function(e){return T&&E===e?T:T=_c(vc(u)(h(S(b(E=e)))))},D.preclip=function(e){return arguments.length?(h=e,m=void 0,A()):h},D.postclip=function(e){return arguments.length?(b=e,g=_=v=y=null,A()):b},D.clipAngle=function(e){return arguments.length?(h=+e?Ko(m=e*Ja):(m=null,Ho),A()):m*qa},D.clipExtent=function(e){return arguments.length?(b=e==null?(g=_=v=y=null,es):Xo(g=+e[0][0],_=+e[0][1],v=+e[1][0],y=+e[1][1]),A()):g==null?null:[[g,_],[v,y]]},D.scale=function(e){return arguments.length?(n=+e,k()):n},D.translate=function(e){return arguments.length?(r=+e[0],i=+e[1],k()):[r,i]},D.center=function(e){return arguments.length?(a=e[0]%360*Ja,o=e[1]%360*Ja,k()):[a*qa,o*qa]},D.rotate=function(e){return arguments.length?(s=e[0]%360*Ja,c=e[1]%360*Ja,l=e.length>2?e[2]%360*Ja:0,k()):[s*qa,c*qa,l*qa]},D.angle=function(e){return arguments.length?(d=e%360*Ja,k()):d*qa},D.reflectX=function(e){return arguments.length?(f=e?-1:1,k()):f<0},D.reflectY=function(e){return arguments.length?(p=e?-1:1,k()):p<0},D.precision=function(e){return arguments.length?(S=mc(C,x=e*e),A()):io(x)},D.fitExtent=function(e,t){return cc(D,e,t)},D.fitSize=function(e,t){return lc(D,e,t)},D.fitWidth=function(e,t){return uc(D,e,t)},D.fitHeight=function(e,t){return dc(D,e,t)};function k(){var e=bc(n,0,0,f,p,d).apply(null,t(a,o)),m=bc(n,r-e[0],i-e[1],f,p,d);return u=To(s,c,l),C=Co(t,m),w=Co(u,C),S=mc(C,x),A()}function A(){return T=E=null,D}return function(){return t=e.apply(this,arguments),D.invert=t.invert&&O,k()}}function Cc(e){return function(t,n){var r=io(t*t+n*n),i=e(r),a=no(i),o=Qa(i);return[Za(t*a,r*o),so(r&&n*a/r)]}}function wc(e,t){return[e,to(ao((Wa+t)/2))]}wc.invert=function(e,t){return[e,2*Xa(eo(t))-Wa]};function Tc(){return Ec(wc).scale(961/Ka)}function Ec(e){var t=xc(e),n=t.center,r=t.scale,i=t.translate,a=t.clipExtent,o=null,s,c,l;t.scale=function(e){return arguments.length?(r(e),u()):r()},t.translate=function(e){return arguments.length?(i(e),u()):i()},t.center=function(e){return arguments.length?(n(e),u()):n()},t.clipExtent=function(e){return arguments.length?(e==null?o=s=c=l=null:(o=+e[0][0],s=+e[0][1],c=+e[1][0],l=+e[1][1]),u()):o==null?null:[[o,s],[c,l]]};function u(){var n=$*r(),i=t(ko(t.rotate()).invert([0,0]));return a(o==null?[[i[0]-n,i[1]-n],[i[0]+n,i[1]+n]]:e===wc?[[Math.max(i[0]-n,o),s],[Math.min(i[0]+n,c),l]]:[[o,Math.max(i[1]-n,s)],[c,Math.min(i[1]+n,l)]])}return u()}function Dc(e,t){return[Qa(t)*no(e),no(t)]}Dc.invert=Cc(so);function Oc(){return xc(Dc).scale(249.5).clipAngle(90+Ua)}var kc=100;function Ac(e,t,n){let r=document.createElement(`div`);r.className=`adornment`;let i=e.scale??1,a=i*kc;r.style.width=`${a}px`,r.style.height=`${a}px`,r.style.flexGrow=`0`,r.style.flexShrink=`0`;let o={id:e.id,map:t,container:r,moveEndPosition:t.getCenter(),geoJson:void 0,isGlobe:e.isGlobe,boundingBox:e.boundingBox,scale:i,backgroundColor:e.backgroundColor??`#000000`,globeBackgroundColor:e.globeBackgroundColor??`#000000`,borderColor:e.borderColor??`#000000`,primaryFillColor:e.primaryFillColor??`#000000`,primaryStrokeColor:e.primaryStrokeColor??`#000000`,secondaryFillColor:e.secondaryFillColor??`#000000`,secondaryStrokeColor:e.secondaryStrokeColor??`#000000`,graticuleColor:e.graticuleColor??`#000000`,frameColor:e.frameColor??`#000000`,frameOutlineColor:e.frameOutlineColor??`#000000`,dotColor:e.dotColor??`#000000`,dotOutlineColor:e.dotOutlineColor??`#000000`,globeFallbackActive:!1,globeGeoJsonRequested:!1,globeGeoJson:void 0};return fetch(`${n}data/insetmaps/${e.fileName}`).then(e=>e.json()).then(e=>{o.geoJson=Vi(e,Object.keys(e.objects)[0]),jc(o)}),t.on(`moveend`,()=>{o.moveEndPosition=t.getCenter(),(o.isGlobe||o.globeFallbackActive)&&jc(o)}),t.on(`move`,()=>{if(!o.isGlobe){let[e,r,i,a]=o.boundingBox,s=Pc(t),c=Ha(Dn([s,Tn([[[e,r],[e,a],[i,a],[i,r],[e,r]]])])),l=Mi(s),u=(c?Mi(c):0)<l*.75;o.globeFallbackActive!==u&&(o.globeFallbackActive=u,o.moveEndPosition=t.getCenter(),jc(o)),o.globeFallbackActive&&!o.globeGeoJsonRequested&&(o.globeGeoJsonRequested=!0,fetch(`${n}data/insetmaps/world-110m.json`).then(e=>e.json()).then(e=>{o.globeGeoJson=Vi(e,Object.keys(e.objects)[0]),o.moveEndPosition=t.getCenter(),jc(o)}))}Nc(o)}),r}function jc(e){let{id:t,container:n,scale:r,backgroundColor:i,globeBackgroundColor:a,secondaryFillColor:o,secondaryStrokeColor:s,primaryFillColor:c,primaryStrokeColor:l,graticuleColor:u,borderColor:d,frameColor:f,frameOutlineColor:p,dotColor:m,dotOutlineColor:h}=e,g=e.globeFallbackActive&&e.globeGeoJson!==void 0,_=g?e.globeGeoJson:e.geoJson,v=g||e.isGlobe;if(_===void 0)return;let y=kc*r,b=y/2,x=.1*r,S=[v?`<circle cx="${b}" cy="${b}" r="${b}" fill="${a}"></circle>`:`<rect x="0" y="0" width="${y}" height="${y}" fill="${i}"></rect>`],{path:C}=Mc(e),w=C({..._,features:_.features.filter(e=>e.properties?.class!==`P1`)});w&&S.push(`
911
920
  <path
912
921
  d="${w}"
913
922
  fill="${o}"
@@ -1094,7 +1103,11 @@ vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matr
1094
1103
  ${h?.humanized??``}
1095
1104
  </text>
1096
1105
  </svg>
1097
- `}function Hc(e,t,n){let r=document.createElement(`div`);r.className=`adornment`;let i=`ArialMT`,a=[e.titleFont??i,e.subtitleFont??i];return gr(Array.from(new Set(a)),t,n).then(()=>r.innerHTML=Uc(e,i)),r}function Uc(e,t){let{title:n,titleColor:r=`#000000`,titleFont:i=t,titleFontSize:a=20,titleJustify:o=`center`,subtitle:s,subtitleColor:c=`#000000`,subtitleFont:l=t,subtitleFontSize:u=12,subtitleJustify:d=`center`,background:f=`#ffffff`,showBackground:p=!1}=e,m=0,h=0,g=0,_=0,v=0,y=n.trim().length>0?jr([n],i,a):null,b=s.trim().length>0?jr([s],l,u):null;if(m=Math.max(y?.width??0,b?.width??0),y){let{ascent:e,descent:t}=y;h=e+t,_=8+e}if(b){let{ascent:e,descent:t}=b;g=e+t,v=y?_+y.descent+e+6:8+e}let x=m+16,S=h+g+16,C=o===`center`?x/2:o===`right`?x-8:8,w=d===`center`?x/2:d===`right`?x-8:8,T=``;if(T+=`<svg xmlns="http://www.w3.org/2000/svg" width="${x}" height="${S}" viewBox="0 0 ${x} ${S}">`,T+=`<rect x="0" y="0" width="${x}" height="${S}" fill="${f}" rx="6" style="visibility:${p?`visible`:`hidden`}" />`,y||b){let e=o===`center`?`middle`:o===`right`?`end`:`start`,t=d===`center`?`middle`:d===`right`?`end`:`start`;T+=`<text x="${C}" y="${_}" fill="${r}" font-family="${i}" font-size="${a}" text-anchor="${e}">`,y&&(T+=`${hr(n)}`),b&&(T+=`<tspan x="${w}" y="${v}" fill="${c}" font-family="${l}" font-size="${u}" text-anchor="${t}">`,T+=`${hr(s)}`,T+=`</tspan>`),T+=`</text>`}return T+=`</svg>`,T}var Wc={"sky-color":`#6babff`,"sky-horizon-blend":1,"horizon-color":[`interpolate-hcl`,[`linear`],[`zoom`],0,`#edf7fc`,9,`#edf7fc`,10,`#dcf0fa`],"horizon-fog-blend":.5,"fog-color":`#edf7fc`,"fog-ground-blend":.5,"atmosphere-blend":1},Gc={top_left:{x:`left`,y:`top`},top_center:{x:`center`,y:`top`},top_right:{x:`right`,y:`top`},right_center:{x:`right`,y:`center`},bottom_right:{x:`right`,y:`bottom`},bottom_center:{x:`center`,y:`bottom`},bottom_left:{x:`left`,y:`bottom`},left_center:{x:`left`,y:`center`}},Kc=[`top_left`,`top_right`,`bottom_left`,`bottom_right`,`top_center`,`left_center`,`right_center`,`bottom_center`],qc=new Map;function Jc(e,t,n,r,i,a,o){let{adornments:s=[]}=e;Yc(n,t),s.forEach(t=>{t.type===`custom`?Zc(C(t),t.position,t.stacking):t.type===`scalebar`?Zc(Bc(t,n),t.position,t.stacking):t.type===`northArrow`?Zc($r(t,n),t.position,t.stacking):t.type===`webControls`&&t.buttons?Zc(ji(t,n,r),t.position,t.stacking):t.type===`insetMap`?Zc(Ac(t,n,a),t.position,t.stacking):t.type===`heading`?Zc(Hc(t,i,o),t.position,t.stacking):t.type===`manualLegend`?Zc(Qr(t,i,o),t.position,t.stacking):t.type===`connectedLegend`&&Zc(Gr(t,e,n,i,o),t.position,t.stacking)}),Qc(n),n.on(`moveend`,()=>Qc(n))}function Yc(e,t){let n=e.getContainer();for(let e of Kc){let r=document.createElement(`div`);r.classList.add(`adornment-container`,`${e}`),t?.[e]&&(r.style.cssText=Xc(e,t));let i=document.createElement(`div`),a=document.createElement(`div`);r.classList.add(`adornment-container`,e),i.classList.add(`inner`),a.classList.add(`inner`,`vertical`),r.append(i,a),n.appendChild(r),qc.set(e,{horizontal:i,vertical:a})}}function Xc(e,t){let n=Gc[e],{x:r,y:i,unit:a}=t[e],o=``,s=[];return n.x===`center`?s.push(`translateX(${r}${a})`):o+=`${n.x}: ${r}${a};`,n.y===`center`?s.push(`translateY(${i}${a})`):e===`bottom_right`?o+=`${n.y}: max(${i}${a}, 25px);`:o+=`${n.y}: ${i}${a};`,s.length&&(o+=`transform: ${s.join(` `)};`),o}function Zc(e,t,n){n||=[`left_center`,`right_center`].includes(t)?`vertical`:`horizontal`;let r=qc.get(t),i=t===`left_center`||t===`right_center`?`vertical`:`horizontal`;r?.[i].hasChildNodes()||(n=i),(r?.[n])?.appendChild(e)}function Qc(e){let t=Array.from(document.querySelectorAll(`.adornment, .maplibregl-ctrl-attrib`)),n=[];t.forEach(e=>{let t=e.getBoundingClientRect();t&&n.push([t.x,t.y,t.x+t.width,t.y+t.height])}),e.setLabelFreeAreas(n)}function $c(e,t,n,r,i){e.addSource(t.id,{type:`geojson`,data:{type:`FeatureCollection`,features:t.models.filter(e=>e.visible??!0).map(e=>el(t,e,r,i))}}),e.addLayer({id:t.id,type:`fill`,source:t.id,metadata:{"mc-model-type":`polygon`,"mc-group-id":t.id},paint:{"fill-color":[`get`,`fill-color`]}},n),e.addLayer({id:`${t.id}-pattern`,type:`fill`,source:t.id,filter:[`has`,`fill-pattern`],paint:{"fill-pattern":[`get`,`fill-pattern`]},metadata:{"mc-model-type":`polygon`,"mc-group-id":t.id}},n),e.addLayer({id:`${t.id}-outline`,type:`line`,source:t.id,metadata:{"mc-model-type":`polygon`,"mc-group-id":t.id},layout:{"line-cap":`round`,"line-join":`round`},paint:{"line-width":[`get`,`outline-width`],"line-color":[`get`,`outline-color`]}},n)}function el(e,t,n,r){let i=t.fillPattern===void 0?void 0:r.getMapLibreImageKey(n[t.fillPattern],2*window.devicePixelRatio);return{type:`Feature`,id:f(t.id),properties:{id:t.id,"fill-color":e.fillColor||t.fillColor?Mr(t.dataBindings??{},t.fillColor,e.fillColor):`#000000`,"outline-color":e.outlineColor||t.outlineColor?Mr(t.dataBindings??{},t.outlineColor,e.outlineColor):`#000000`,"outline-width":t.outlineWidth??0,"fill-pattern":i},geometry:{type:`Polygon`,coordinates:Yn(t)}}}function tl(e,t,n,r,i){e.addSource(t.id,{type:`geojson`,data:{type:`FeatureCollection`,features:t.models.filter(e=>e.visible??!0).map(e=>nl(t,e,r,i))}}),e.addLayer({id:t.id,type:`fill`,source:t.id,metadata:{"mc-model-type":`circle`,"mc-group-id":t.id},filter:[`==`,[`geometry-type`],`Polygon`],paint:{"fill-color":[`get`,`fill-color`]}},n),e.addLayer({id:`${t.id}-pattern`,type:`fill`,source:t.id,filter:[`has`,`fill-pattern`],paint:{"fill-pattern":[`get`,`fill-pattern`]},metadata:{"mc-model-type":`circle`,"mc-group-id":t.id}},n),e.addLayer({id:`${t.id}-radius-line`,type:`line`,source:t.id,metadata:{"mc-model-type":`circle`,"mc-group-id":t.id},filter:[`all`,[`==`,[`geometry-type`],`LineString`],[`get`,`radius-line-enabled`]],paint:{"line-color":[`get`,`radius-line-color`],"line-width":[`get`,`radius-line-width`]}},n),e.addLayer({id:`${t.id}-outline`,type:`line`,source:t.id,metadata:{"mc-model-type":`circle`,"mc-group-id":t.id},filter:[`==`,[`geometry-type`],`Polygon`],layout:{"line-cap":`round`,"line-join":`round`},paint:{"line-width":[`get`,`outline-width`],"line-color":[`get`,`outline-color`]}},n)}function nl(e,t,n,r){let i=t.fillPattern===void 0?void 0:r.getMapLibreImageKey(n[t.fillPattern],2*window.devicePixelRatio);return{type:`Feature`,id:f(t.id),properties:{id:t.id,"fill-color":e.fillColor||t.fillColor?Mr(t.dataBindings??{},t.fillColor,e.fillColor):`#000000`,"outline-color":e.outlineColor||t.outlineColor?Mr(t.dataBindings??{},t.outlineColor,e.outlineColor):`#000000`,"outline-width":t.outlineWidth??0,"fill-pattern":i,"radius-line-enabled":t.radiusLineEnabled??!1,"radius-line-color":e.radiusLineColor||t.radiusLineColor?Mr(t.dataBindings??{},t.radiusLineColor,e.radiusLineColor):`#000000`,"radius-line-width":t.radiusLineWidth??0},geometry:{type:`GeometryCollection`,geometries:[{type:`Polygon`,coordinates:[Wn(t.center,t.radius)]},{type:`LineString`,coordinates:Gn(t.center,t.radius,t.radiusLineBearing??0)}]}}}var rl=`Roboto-Regular`;function il(e,t,n,r,i){let a=[],o=new Set,s=new Set,c=[`match`,[`get`,`text-font`]],l=!!t.clustering;for(let e of t.models)(e.visible??!0)&&a.push(ol(t,e,r,i)),o.add(e.textFont),s.add(e.textLineHeight??1.2);if(Array.from(o).length>0){for(let e of Array.from(o))c.push(e,[`literal`,[e,rl]]);c.push([`literal`,[rl]])}e.addSource(t.id,{type:`geojson`,data:{type:`FeatureCollection`,features:a},cluster:l,clusterRadius:t.clusterRadius??50,clusterMaxZoom:t.clusterMaxZoom??14}),s.forEach(r=>{e.addLayer({id:`${t.id}-${r}`,type:`symbol`,source:t.id,metadata:{"mc-model-type":`marker`,"mc-group-id":t.id},layout:{"icon-allow-overlap":!t.collisionDetection,"icon-ignore-placement":!t.collisionDetection,"text-allow-overlap":!t.collisionDetection,"text-ignore-placement":!t.collisionDetection,"icon-image":[`get`,`mc-image-key`],"icon-anchor":[`get`,`icon-anchor`],"icon-size":[`get`,`icon-size`],"icon-rotate":[`get`,`icon-rotate`],"icon-offset":[`get`,`icon-offset`],"text-field":`{text}`,"text-font":c,"text-max-width":[`get`,`text-max-width`],"text-offset":[`get`,`text-offset`],"text-rotate":[`get`,`text-rotate`],"text-size":[`get`,`text-size`],"text-anchor":[`get`,`text-anchor`],"text-letter-spacing":[`get`,`text-letter-spacing`],"text-line-height":r,"text-justify":[`get`,`text-justify`]},paint:{"text-color":[`get`,`text-color`],"text-halo-color":[`get`,`text-halo-color`],"text-halo-width":[`get`,`text-halo-width`]},filter:[`all`,[`==`,[`get`,`text-line-height`],r],[`!`,[`has`,`point_count`]]]},n)}),l&&(e.addLayer({id:`${t.id}-circle-cluster`,type:`circle`,source:t.id,filter:[`has`,`point_count`],paint:{"circle-color":{property:`point_count`,type:`interval`,stops:t.clusterCircleColor??[]},"circle-radius":{property:`point_count`,type:`interval`,stops:t.clusterCircleRadius??[]}}}),e.addLayer({id:`${t.id}-text-cluster`,type:`symbol`,source:t.id,filter:[`has`,`point_count`],paint:{"text-color":{property:`point_count`,type:`interval`,stops:t.clusterTextColor??[]}},layout:{"text-font":[`literal`,[rl]],"text-field":`{point_count_abbreviated}`,"text-size":{property:`point_count`,type:`interval`,stops:t.clusterTextSize??[]}}}),al(e,t))}function al(e,t){e.on(`click`,`${t.id}-circle-cluster`,async t=>{let n=e.queryRenderedFeatures(t.point).find(e=>e.properties.cluster);if(!n)return;let r=e.getSource(n.source);if(!r)return;let i=await r.getClusterExpansionZoom(Number(n.id));e.easeTo({center:n.geometry.coordinates,zoom:i})})}function ol(e,t,n,r){let i=t.svg===void 0?void 0:r.getMapLibreImageKey(Pr(t.dataBindings??{},n[t.svg],e.svg?n[e.svg]:void 0),window.devicePixelRatio*(t.iconScale??1));return{type:`Feature`,id:f(t.id),properties:{id:t.id,"mc-image-key":i,"icon-anchor":t.iconAnchor??`center`,"icon-rotate":t.iconRotation??0,"icon-offset":t.iconOffset??[0,0],"icon-size":t.iconScale??1,text:e.text||t.text?Nr(t.dataBindings??{},t.text,e.text):void 0,"text-anchor":t.textAnchor??`center`,"text-font":t.textFont,"text-offset":[(t.textOffset?.[0]??0)/(t.textSize??16),(t.textOffset?.[1]??0)/(t.textSize??16)],"text-rotate":t.textRotation??0,"text-max-width":t.textMaxWidth??10,"text-size":t.textSize??16,"text-color":e.textColor||t.textColor?Mr(t.dataBindings??{},t.textColor,e.textColor):`#000000`,"text-halo-color":e.textHaloColor||t.textHaloColor?Mr(t.dataBindings??{},t.textHaloColor,e.textHaloColor):`#000000`,"text-halo-width":t.textHaloWidth??0,"text-line-height":t.textLineHeight??1.2,"text-letter-spacing":t.textLetterSpacing??0,"text-justify":t.textJustify??`center`},geometry:{type:`Point`,coordinates:[t.lngLat.lng,t.lngLat.lat]}}}async function sl(e,t,n,r,i){let a=e.map(e=>`${n}styles/${e}.json?access_token=${r}`).map(e=>fetch(e).then(e=>e.json())),o=await Promise.all(a);await Promise.all(o.map(e=>cl(e,t,r,i)))}async function cl(e,t,n,r){for(let n in e.sources)t.getSource(n)===void 0&&t.addSource(n,e.sources[n]);e.sprite!==void 0&&await ul(t,e.sprite,n);for(let n of e.layers){t.getLayer(n.id)!==void 0&&t.removeLayer(n.id);let e=n.metadata?.[`mc-add-before`]??`mc-before-none`;t.addLayer(ll(n,r),e)}}function ll(e,t){let n=(t??{})[e.id]??{},r={...e,layout:{...e.layout,...n.layout},paint:{...e.paint,...n.paint},metadata:{...e.metadata,...n.metadata}};return n.minzoom!==void 0&&(r.minzoom=n.minzoom),n.maxzoom!==void 0&&(r.maxzoom=n.maxzoom),`filter`in n&&r.type!==`background`&&(r.filter=n.filter),r}async function ul(e,t,n){try{let r=`${t}.json?access_token=${n}`,i=`${t}.png?access_token=${n}`,[a,o]=await Promise.all([fetch(r),fetch(i)]);if(!a.ok||!o.ok)throw Error(`Failed to load sprite from ${t}`);let s=await a.json(),c=await o.blob(),l=await new Promise((e,t)=>{let n=new Image;n.onload=()=>e(n),n.onerror=e=>t(e),n.src=URL.createObjectURL(c)}),u=document.createElement(`canvas`),d=u.getContext(`2d`,{willReadFrequently:!0});if(!d)throw Error(`Failed to get canvas context`);for(let[t,n]of Object.entries(s)){if(e.hasImage(t))continue;let{x:r,y:i,width:a,height:o,pixelRatio:s}=n;u.width=a*s,u.height=o*s,d.clearRect(0,0,u.width,u.height),d.drawImage(l,r,i,a,o,0,0,u.width,u.height);let c=d.getImageData(0,0,u.width,u.height);e.addImage(t,c,{pixelRatio:s})}}catch(e){console.error(e)}}var dl=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='6'%20height='10'%20viewBox='0%200%206%2010'%20fill='currentColor'%3e%3cpath%20d='m0%204.647%204.282%204.4a.814.814%200%200%200%201.166-1.134L2.27%204.647l3.178-3.266A.814.814%200%201%200%204.282.246z'/%3e%3c/svg%3e`,fl=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='10'%20height='11'%20viewBox='0%200%2010%2011'%20fill='currentColor'%3e%3cpath%20d='M.21.71a.714.714%200%200%201%201.011%200l3.78%203.78L8.778.71a.715.715%200%200%201%201.013%201.01L6.01%205.501l3.78%203.778a.715.715%200%200%201-1.01%201.012L5%206.51l-3.779%203.78A.716.716%200%200%201%20.21%209.28L3.99%205.5.21%201.721A.714.714%200%200%201%20.21.71'/%3e%3c/svg%3e`,pl=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='6'%20height='10'%20viewBox='0%200%206%2010'%20fill='currentColor'%3e%3cpath%20d='m5.678%204.647-4.282%204.4A.814.814%200%201%201%20.23%207.914l3.177-3.266L.23%201.381A.814.814%200%201%201%201.396.246z'/%3e%3c/svg%3e`,ml=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2040%2040'%20stroke='currentColor'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20%204.167%201.667%2035.834h36.667z'%20stroke-width='2'%20stroke-linejoin='round'/%3e%3cpath%20d='M20%2029.167v.834m0-14.167.007%208.333'%20stroke-width='2'%20stroke-linecap='round'/%3e%3c/svg%3e`;function hl(e,t){let{allowFullscreen:n,loop:r}=e,i=p(e.src,t),a,o=i.match(/(?:youtube\.com\/(?:watch\?.*v=|embed\/|v\/)|youtu\.be\/)([-\w]{11})/)?.[1];a=o?`https://www.youtube.com/embed/${o}`:i;let s=[];if(n||s.push(`fs=0`),r&&o&&s.push(`loop=1&playlist=${o}`),a=_l(a),a=gl(a),s.length){let e=a.includes(`?`)?`&`:`?`;a+=`${e}${s.join(`&`)}`}return a}function gl(e){return e.replace(/([?&])si=[^&]+(&)?/,(e,t,n)=>t===`?`&&!n?``:t===`?`&&n?`?`:n?`&`:``)}function _l(e){let t=new URL(e),n=t.searchParams.get(`t`);if(!n)return e;let r=0,i=/^((\d+)m)?((\d+)s)?$/;if(/^\d+$/.test(n))r=parseInt(n,10);else{let e=n.match(i);if(e){let t=parseInt(e[2]||`0`,10),n=parseInt(e[4]||`0`,10);r=t*60+n}}return r>0&&(t.searchParams.delete(`t`),t.searchParams.set(`start`,String(r))),t.toString()}function vl(e,t,n,r){let i;if(t?.type===`video`)i=r===`preview`?Cl(t.src,n):`
1106
+ `}function Hc(e,t,n){let r=document.createElement(`div`);r.className=`adornment`;let i=`ArialMT`,a=[e.titleFont??i,e.subtitleFont??i];return gr(Array.from(new Set(a)),t,n).then(()=>r.innerHTML=Uc(e,i)),r}function Uc(e,t){let{title:n,titleColor:r=`#000000`,titleFont:i=t,titleFontSize:a=20,titleJustify:o=`center`,subtitle:s,subtitleColor:c=`#000000`,subtitleFont:l=t,subtitleFontSize:u=12,subtitleJustify:d=`center`,background:f=`#ffffff`,showBackground:p=!1}=e,m=0,h=0,g=0,_=0,v=0,y=n.trim().length>0?jr([n],i,a):null,b=s.trim().length>0?jr([s],l,u):null;if(m=Math.max(y?.width??0,b?.width??0),y){let{ascent:e,descent:t}=y;h=e+t,_=8+e}if(b){let{ascent:e,descent:t}=b;g=e+t,v=y?_+y.descent+e+6:8+e}let x=m+16,S=h+g+16,C=o===`center`?x/2:o===`right`?x-8:8,w=d===`center`?x/2:d===`right`?x-8:8,T=``;if(T+=`<svg xmlns="http://www.w3.org/2000/svg" width="${x}" height="${S}" viewBox="0 0 ${x} ${S}">`,T+=`<rect x="0" y="0" width="${x}" height="${S}" fill="${f}" rx="6" style="visibility:${p?`visible`:`hidden`}" />`,y||b){let e=o===`center`?`middle`:o===`right`?`end`:`start`,t=d===`center`?`middle`:d===`right`?`end`:`start`;T+=`<text x="${C}" y="${_}" fill="${r}" font-family="${i}" font-size="${a}" text-anchor="${e}">`,y&&(T+=`${hr(n)}`),b&&(T+=`<tspan x="${w}" y="${v}" fill="${c}" font-family="${l}" font-size="${u}" text-anchor="${t}">`,T+=`${hr(s)}`,T+=`</tspan>`),T+=`</text>`}return T+=`</svg>`,T}var Wc={"sky-color":`#6babff`,"sky-horizon-blend":1,"horizon-color":[`interpolate-hcl`,[`linear`],[`zoom`],0,`#edf7fc`,9,`#edf7fc`,10,`#dcf0fa`],"horizon-fog-blend":.5,"fog-color":`#edf7fc`,"fog-ground-blend":.5,"atmosphere-blend":1},Gc={top_left:{x:`left`,y:`top`},top_center:{x:`center`,y:`top`},top_right:{x:`right`,y:`top`},right_center:{x:`right`,y:`center`},bottom_right:{x:`right`,y:`bottom`},bottom_center:{x:`center`,y:`bottom`},bottom_left:{x:`left`,y:`bottom`},left_center:{x:`left`,y:`center`}},Kc=[`top_left`,`top_right`,`bottom_left`,`bottom_right`,`top_center`,`left_center`,`right_center`,`bottom_center`],qc=new Map;function Jc(e,t,n,r,i,a,o){let{adornments:s=[]}=e;Yc(n,t),s.forEach(t=>{t.type===`custom`?Zc(C(t),t.position,t.stacking):t.type===`scalebar`?Zc(Bc(t,n),t.position,t.stacking):t.type===`northArrow`?Zc($r(t,n),t.position,t.stacking):t.type===`webControls`&&t.buttons?Zc(ji(t,n,r),t.position,t.stacking):t.type===`insetMap`?Zc(Ac(t,n,a),t.position,t.stacking):t.type===`heading`?Zc(Hc(t,i,o),t.position,t.stacking):t.type===`manualLegend`?Zc(Qr(t,i,o),t.position,t.stacking):t.type===`connectedLegend`&&Zc(Gr(t,e,n,i,o),t.position,t.stacking)}),Qc(n),n.on(`moveend`,()=>Qc(n))}function Yc(e,t){let n=e.getContainer();for(let e of Kc){let r=document.createElement(`div`);r.classList.add(`adornment-container`,`${e}`),t?.[e]&&(r.style.cssText=Xc(e,t));let i=document.createElement(`div`),a=document.createElement(`div`);r.classList.add(`adornment-container`,e),i.classList.add(`inner`),a.classList.add(`inner`,`vertical`),r.append(i,a),n.appendChild(r),qc.set(e,{horizontal:i,vertical:a})}}function Xc(e,t){let n=Gc[e],{x:r,y:i,unit:a}=t[e],o=``,s=[];return n.x===`center`?s.push(`translateX(${r}${a})`):o+=`${n.x}: ${r}${a};`,n.y===`center`?s.push(`translateY(${i}${a})`):e===`bottom_right`?o+=`${n.y}: max(${i}${a}, 25px);`:o+=`${n.y}: ${i}${a};`,s.length&&(o+=`transform: ${s.join(` `)};`),o}function Zc(e,t,n){n||=[`left_center`,`right_center`].includes(t)?`vertical`:`horizontal`;let r=qc.get(t),i=t===`left_center`||t===`right_center`?`vertical`:`horizontal`;r?.[i].hasChildNodes()||(n=i),(r?.[n])?.appendChild(e)}function Qc(e){let t=Array.from(document.querySelectorAll(`.adornment, .maplibregl-ctrl-attrib`)),n=[];t.forEach(e=>{let t=e.getBoundingClientRect();t&&n.push([t.x,t.y,t.x+t.width,t.y+t.height])}),e.setLabelFreeAreas(n)}function $c(e,t,n,r,i){e.addSource(t.id,{type:`geojson`,data:{type:`FeatureCollection`,features:t.models.filter(e=>e.visible??!0).map(e=>el(t,e,r,i))}}),e.addLayer({id:t.id,type:`fill`,source:t.id,metadata:{"mc-model-type":`polygon`,"mc-group-id":t.id},paint:{"fill-color":[`get`,`fill-color`]}},n),e.addLayer({id:`${t.id}-pattern`,type:`fill`,source:t.id,filter:[`has`,`fill-pattern`],paint:{"fill-pattern":[`get`,`fill-pattern`]},metadata:{"mc-model-type":`polygon`,"mc-group-id":t.id}},n),e.addLayer({id:`${t.id}-outline`,type:`line`,source:t.id,metadata:{"mc-model-type":`polygon`,"mc-group-id":t.id},layout:{"line-cap":`round`,"line-join":`round`},paint:{"line-width":[`get`,`outline-width`],"line-color":[`get`,`outline-color`]}},n)}function el(e,t,n,r){let i=t.fillPattern===void 0?void 0:r.getMapLibreImageKey(n[t.fillPattern],2*window.devicePixelRatio);return{type:`Feature`,id:f(t.id),properties:{id:t.id,"fill-color":e.fillColor||t.fillColor?Mr(t.dataBindings??{},t.fillColor,e.fillColor):`#000000`,"outline-color":e.outlineColor||t.outlineColor?Mr(t.dataBindings??{},t.outlineColor,e.outlineColor):`#000000`,"outline-width":t.outlineWidth??0,"fill-pattern":i},geometry:{type:`Polygon`,coordinates:Yn(t)}}}function tl(e,t,n,r,i){e.addSource(t.id,{type:`geojson`,data:{type:`FeatureCollection`,features:t.models.filter(e=>e.visible??!0).map(e=>nl(t,e,r,i))}}),e.addLayer({id:t.id,type:`fill`,source:t.id,metadata:{"mc-model-type":`circle`,"mc-group-id":t.id},filter:[`==`,[`geometry-type`],`Polygon`],paint:{"fill-color":[`get`,`fill-color`]}},n),e.addLayer({id:`${t.id}-pattern`,type:`fill`,source:t.id,filter:[`has`,`fill-pattern`],paint:{"fill-pattern":[`get`,`fill-pattern`]},metadata:{"mc-model-type":`circle`,"mc-group-id":t.id}},n),e.addLayer({id:`${t.id}-radius-line`,type:`line`,source:t.id,metadata:{"mc-model-type":`circle`,"mc-group-id":t.id},filter:[`all`,[`==`,[`geometry-type`],`LineString`],[`get`,`radius-line-enabled`]],paint:{"line-color":[`get`,`radius-line-color`],"line-width":[`get`,`radius-line-width`]}},n),e.addLayer({id:`${t.id}-outline`,type:`line`,source:t.id,metadata:{"mc-model-type":`circle`,"mc-group-id":t.id},filter:[`==`,[`geometry-type`],`Polygon`],layout:{"line-cap":`round`,"line-join":`round`},paint:{"line-width":[`get`,`outline-width`],"line-color":[`get`,`outline-color`]}},n)}function nl(e,t,n,r){let i=t.fillPattern===void 0?void 0:r.getMapLibreImageKey(n[t.fillPattern],2*window.devicePixelRatio);return{type:`Feature`,id:f(t.id),properties:{id:t.id,"fill-color":e.fillColor||t.fillColor?Mr(t.dataBindings??{},t.fillColor,e.fillColor):`#000000`,"outline-color":e.outlineColor||t.outlineColor?Mr(t.dataBindings??{},t.outlineColor,e.outlineColor):`#000000`,"outline-width":t.outlineWidth??0,"fill-pattern":i,"radius-line-enabled":t.radiusLineEnabled??!1,"radius-line-color":e.radiusLineColor||t.radiusLineColor?Mr(t.dataBindings??{},t.radiusLineColor,e.radiusLineColor):`#000000`,"radius-line-width":t.radiusLineWidth??0},geometry:{type:`GeometryCollection`,geometries:[{type:`Polygon`,coordinates:[Wn(t.center,t.radius)]},{type:`LineString`,coordinates:Gn(t.center,t.radius,t.radiusLineBearing??0)}]}}}var rl=`Roboto-Regular`;function il(e,t,n,r,i){let a=[],o=new Set,s=new Set,c=[`match`,[`get`,`text-font`]],l=!!t.clustering;for(let e of t.models)(e.visible??!0)&&a.push(ol(t,e,r,i)),o.add(e.textFont),s.add(e.textLineHeight??1.2);if(Array.from(o).length>0){for(let e of Array.from(o))c.push(e,[`literal`,[e,rl]]);c.push([`literal`,[rl]])}e.addSource(t.id,{type:`geojson`,data:{type:`FeatureCollection`,features:a},cluster:l,clusterRadius:t.clusterRadius??50,clusterMaxZoom:t.clusterMaxZoom??14}),s.forEach(r=>{e.addLayer({id:`${t.id}-${r}`,type:`symbol`,source:t.id,metadata:{"mc-model-type":`marker`,"mc-group-id":t.id},layout:{"icon-allow-overlap":!t.collisionDetection,"icon-ignore-placement":!t.collisionDetection,"text-allow-overlap":!t.collisionDetection,"text-ignore-placement":!t.collisionDetection,"icon-image":[`get`,`mc-image-key`],"icon-anchor":[`get`,`icon-anchor`],"icon-size":[`get`,`icon-size`],"icon-rotate":[`get`,`icon-rotate`],"icon-offset":[`get`,`icon-offset`],"text-field":`{text}`,"text-font":c,"text-max-width":[`get`,`text-max-width`],"text-offset":[`get`,`text-offset`],"text-rotate":[`get`,`text-rotate`],"text-size":[`get`,`text-size`],"text-anchor":[`get`,`text-anchor`],"text-letter-spacing":[`get`,`text-letter-spacing`],"text-line-height":r,"text-justify":[`get`,`text-justify`]},paint:{"text-color":[`get`,`text-color`],"text-halo-color":[`get`,`text-halo-color`],"text-halo-width":[`get`,`text-halo-width`]},filter:[`all`,[`==`,[`get`,`text-line-height`],r],[`!`,[`has`,`point_count`]]]},n)}),l&&(e.addLayer({id:`${t.id}-circle-cluster`,type:`circle`,source:t.id,filter:[`has`,`point_count`],paint:{"circle-color":{property:`point_count`,type:`interval`,stops:t.clusterCircleColor??[]},"circle-radius":{property:`point_count`,type:`interval`,stops:t.clusterCircleRadius??[]}}}),e.addLayer({id:`${t.id}-text-cluster`,type:`symbol`,source:t.id,filter:[`has`,`point_count`],paint:{"text-color":{property:`point_count`,type:`interval`,stops:t.clusterTextColor??[]}},layout:{"text-font":[`literal`,[rl]],"text-field":`{point_count_abbreviated}`,"text-size":{property:`point_count`,type:`interval`,stops:t.clusterTextSize??[]}}}),al(e,t))}function al(e,t){e.on(`click`,`${t.id}-circle-cluster`,async t=>{let n=e.queryRenderedFeatures(t.point).find(e=>e.properties.cluster);if(!n)return;let r=e.getSource(n.source);if(!r)return;let i=await r.getClusterExpansionZoom(Number(n.id));e.easeTo({center:n.geometry.coordinates,zoom:i})})}function ol(e,t,n,r){let i=t.svg===void 0?void 0:r.getMapLibreImageKey(Pr(t.dataBindings??{},n[t.svg],e.svg?n[e.svg]:void 0),window.devicePixelRatio*(t.iconScale??1));return{type:`Feature`,id:f(t.id),properties:{id:t.id,"mc-image-key":i,"icon-anchor":t.iconAnchor??`center`,"icon-rotate":t.iconRotation??0,"icon-offset":t.iconOffset??[0,0],"icon-size":t.iconScale??1,text:e.text||t.text?Nr(t.dataBindings??{},t.text,e.text):void 0,"text-anchor":t.textAnchor??`center`,"text-font":t.textFont,"text-offset":[(t.textOffset?.[0]??0)/(t.textSize??16),(t.textOffset?.[1]??0)/(t.textSize??16)],"text-rotate":t.textRotation??0,"text-max-width":t.textMaxWidth??10,"text-size":t.textSize??16,"text-color":e.textColor||t.textColor?Mr(t.dataBindings??{},t.textColor,e.textColor):`#000000`,"text-halo-color":e.textHaloColor||t.textHaloColor?Mr(t.dataBindings??{},t.textHaloColor,e.textHaloColor):`#000000`,"text-halo-width":t.textHaloWidth??0,"text-line-height":t.textLineHeight??1.2,"text-letter-spacing":t.textLetterSpacing??0,"text-justify":t.textJustify??`center`},geometry:{type:`Point`,coordinates:[t.lngLat.lng,t.lngLat.lat]}}}async function sl(e,t,n,r,i){let a=e.map(e=>`${n}styles/${e}.json?access_token=${r}`).map(e=>fetch(e).then(e=>e.json())),o=await Promise.all(a);await Promise.all(o.map(e=>cl(e,t,r,i)))}async function cl(e,t,n,r){for(let n in e.sources)t.getSource(n)===void 0&&t.addSource(n,e.sources[n]);e.sprite!==void 0&&await ul(t,e.sprite,n);for(let n of e.layers){t.getLayer(n.id)!==void 0&&t.removeLayer(n.id);let e=n.metadata?.[`mc-add-before`]??`mc-before-none`;t.addLayer(ll(n,r),e)}}function ll(e,t){let n=(t??{})[e.id]??{},r={...e,layout:{...e.layout,...n.layout},paint:{...e.paint,...n.paint},metadata:{...e.metadata,...n.metadata}};return n.minzoom!==void 0&&(r.minzoom=n.minzoom),n.maxzoom!==void 0&&(r.maxzoom=n.maxzoom),`filter`in n&&r.type!==`background`&&(r.filter=n.filter),r}async function ul(e,t,n){try{let r=`${t}.json?access_token=${n}`,i=`${t}.png?access_token=${n}`,[a,o]=await Promise.all([fetch(r),fetch(i)]);if(!a.ok||!o.ok)throw Error(`Failed to load sprite from ${t}`);let s=await a.json(),c=await o.blob(),l=await new Promise((e,t)=>{let n=new Image;n.onload=()=>e(n),n.onerror=e=>t(e),n.src=URL.createObjectURL(c)}),u=document.createElement(`canvas`),d=u.getContext(`2d`,{willReadFrequently:!0});if(!d)throw Error(`Failed to get canvas context`);for(let[t,n]of Object.entries(s)){if(e.hasImage(t))continue;let{x:r,y:i,width:a,height:o,pixelRatio:s}=n;u.width=a*s,u.height=o*s,d.clearRect(0,0,u.width,u.height),d.drawImage(l,r,i,a,o,0,0,u.width,u.height);let c=d.getImageData(0,0,u.width,u.height);e.addImage(t,c,{pixelRatio:s})}}catch(e){console.error(e)}}var dl=`<svg xmlns="http://www.w3.org/2000/svg" width="6" height="10" viewBox="0 0 6 10" fill="currentColor"><path d="m0 4.647 4.282 4.4a.814.814 0 0 0 1.166-1.134L2.27 4.647l3.178-3.266A.814.814 0 1 0 4.282.246z"/></svg>
1107
+ `,fl=`<svg xmlns="http://www.w3.org/2000/svg" width="10" height="11" viewBox="0 0 10 11" fill="currentColor"><path d="M.21.71a.714.714 0 0 1 1.011 0l3.78 3.78L8.778.71a.715.715 0 0 1 1.013 1.01L6.01 5.501l3.78 3.778a.715.715 0 0 1-1.01 1.012L5 6.51l-3.779 3.78A.716.716 0 0 1 .21 9.28L3.99 5.5.21 1.721A.714.714 0 0 1 .21.71"/></svg>
1108
+ `,pl=`<svg xmlns="http://www.w3.org/2000/svg" width="6" height="10" viewBox="0 0 6 10" fill="currentColor"><path d="m5.678 4.647-4.282 4.4A.814.814 0 1 1 .23 7.914l3.177-3.266L.23 1.381A.814.814 0 1 1 1.396.246z"/></svg>
1109
+ `,ml=`<svg width="20" height="20" viewBox="0 0 40 40" stroke="currentColor" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 4.167 1.667 35.834h36.667z" stroke-width="2" stroke-linejoin="round"/><path d="M20 29.167v.834m0-14.167.007 8.333" stroke-width="2" stroke-linecap="round"/></svg>
1110
+ `;function hl(e,t){let{allowFullscreen:n,loop:r}=e,i=p(e.src,t),a,o=i.match(/(?:youtube\.com\/(?:watch\?.*v=|embed\/|v\/)|youtu\.be\/)([-\w]{11})/)?.[1];a=o?`https://www.youtube.com/embed/${o}`:i;let s=[];if(n||s.push(`fs=0`),r&&o&&s.push(`loop=1&playlist=${o}`),a=_l(a),a=gl(a),s.length){let e=a.includes(`?`)?`&`:`?`;a+=`${e}${s.join(`&`)}`}return a}function gl(e){return e.replace(/([?&])si=[^&]+(&)?/,(e,t,n)=>t===`?`&&!n?``:t===`?`&&n?`?`:n?`&`:``)}function _l(e){let t=new URL(e),n=t.searchParams.get(`t`);if(!n)return e;let r=0,i=/^((\d+)m)?((\d+)s)?$/;if(/^\d+$/.test(n))r=parseInt(n,10);else{let e=n.match(i);if(e){let t=parseInt(e[2]||`0`,10),n=parseInt(e[4]||`0`,10);r=t*60+n}}return r>0&&(t.searchParams.delete(`t`),t.searchParams.set(`start`,String(r))),t.toString()}function vl(e,t,n,r){let i;if(t?.type===`video`)i=r===`preview`?Cl(t.src,n):`
1098
1111
  <div class="youtube-container">
1099
1112
  <iframe
1100
1113
  src="${hl(t,n)}"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mapcreator/sdk",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "engines": {
5
5
  "node": "^24.0.0",
6
6
  "npm": "^11.0.0"