@mapcreator/sdk 0.0.0-video.18 → 0.0.0-video.19

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.
@@ -7762,25 +7762,25 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
7762
7762
  function ca(e) {
7763
7763
  return e && typeof ArrayBuffer < "u" && (e instanceof ArrayBuffer || e.constructor && e.constructor.name === "ArrayBuffer");
7764
7764
  }
7765
- function X(e) {
7765
+ function la(e) {
7766
7766
  return e.$name || e.constructor._classRegistryKey;
7767
7767
  }
7768
- function la(e) {
7768
+ function ua(e) {
7769
7769
  return !function(e) {
7770
7770
  if (typeof e != "object" || !e) return !1;
7771
- let t = X(e);
7771
+ let t = la(e);
7772
7772
  return !(!t || t === "Object");
7773
7773
  }(e) && (e == null || typeof e == "boolean" || typeof e == "number" || typeof e == "string" || e instanceof Boolean || e instanceof Number || e instanceof String || e instanceof Date || e instanceof RegExp || e instanceof Blob || e instanceof Error || ca(e) || ue(e) || ArrayBuffer.isView(e) || e instanceof ImageData);
7774
7774
  }
7775
- function ua(e, t) {
7776
- if (la(e)) return (ca(e) || ue(e)) && t && t.push(e), ArrayBuffer.isView(e) && t && t.push(e.buffer), e instanceof ImageData && t && t.push(e.data.buffer), e;
7775
+ function X(e, t) {
7776
+ if (ua(e)) return (ca(e) || ue(e)) && t && t.push(e), ArrayBuffer.isView(e) && t && t.push(e.buffer), e instanceof ImageData && t && t.push(e.data.buffer), e;
7777
7777
  if (Array.isArray(e)) {
7778
7778
  let n = [];
7779
- for (let r of e) n.push(ua(r, t));
7779
+ for (let r of e) n.push(X(r, t));
7780
7780
  return n;
7781
7781
  }
7782
7782
  if (typeof e != "object") throw Error("can't serialize object of type " + typeof e);
7783
- let n = X(e);
7783
+ let n = la(e);
7784
7784
  if (!n) throw Error(`can't serialize object of unregistered class ${e.constructor.name}`);
7785
7785
  if (!sa[n]) throw Error(`${n} is not registered.`);
7786
7786
  let { klass: r } = sa[n], i = r.serialize ? r.serialize(e, t) : {};
@@ -7790,7 +7790,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
7790
7790
  for (let r in e) {
7791
7791
  if (!e.hasOwnProperty(r) || sa[n].omit.indexOf(r) >= 0) continue;
7792
7792
  let a = e[r];
7793
- i[r] = sa[n].shallow.indexOf(r) >= 0 ? a : ua(a, t);
7793
+ i[r] = sa[n].shallow.indexOf(r) >= 0 ? a : X(a, t);
7794
7794
  }
7795
7795
  e instanceof Error && (i.message = e.message);
7796
7796
  }
@@ -7798,10 +7798,10 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
7798
7798
  return n !== "Object" && (i.$name = n), i;
7799
7799
  }
7800
7800
  function da(e) {
7801
- if (la(e)) return e;
7801
+ if (ua(e)) return e;
7802
7802
  if (Array.isArray(e)) return e.map(da);
7803
7803
  if (typeof e != "object") throw Error("can't deserialize object of type " + typeof e);
7804
- let t = X(e) || "Object";
7804
+ let t = la(e) || "Object";
7805
7805
  if (!sa[t]) throw Error(`can't deserialize unregistered class ${t}`);
7806
7806
  let { klass: n } = sa[t];
7807
7807
  if (!n) throw Error(`can't deserialize unregistered class ${t}`);
@@ -14532,7 +14532,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
14532
14532
  id: i,
14533
14533
  sourceMapId: this.mapId,
14534
14534
  origin: location.origin,
14535
- data: ua(e.data, o)
14535
+ data: X(e.data, o)
14536
14536
  });
14537
14537
  this.target.postMessage(s, { transfer: o });
14538
14538
  }));
@@ -14582,8 +14582,8 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
14582
14582
  type: "<response>",
14583
14583
  sourceMapId: this.mapId,
14584
14584
  origin: location.origin,
14585
- error: t ? ua(t) : null,
14586
- data: ua(n, r)
14585
+ error: t ? X(t) : null,
14586
+ data: X(n, r)
14587
14587
  };
14588
14588
  this.target.postMessage(i, { transfer: r });
14589
14589
  }
@@ -27180,7 +27180,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
27180
27180
  function ca(e, t) {
27181
27181
  return Math.log(e / t) / Math.LN2;
27182
27182
  }
27183
- class X extends sa {
27183
+ class la extends sa {
27184
27184
  reset() {
27185
27185
  super.reset(), delete this._distance, delete this._startDistance;
27186
27186
  }
@@ -27195,10 +27195,10 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
27195
27195
  };
27196
27196
  }
27197
27197
  }
27198
- function la(e, t) {
27198
+ function ua(e, t) {
27199
27199
  return 180 * e.angleWith(t) / Math.PI;
27200
27200
  }
27201
- class ua extends sa {
27201
+ class X extends sa {
27202
27202
  reset() {
27203
27203
  super.reset(), delete this._minDiameter, delete this._startVector, delete this._vector;
27204
27204
  }
@@ -27208,13 +27208,13 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
27208
27208
  _move(e, t, n) {
27209
27209
  let r = this._vector;
27210
27210
  if (this._vector = e[0].sub(e[1]), this._active || !this._isBelowThreshold(this._vector)) return this._active = !0, {
27211
- bearingDelta: la(this._vector, r),
27211
+ bearingDelta: ua(this._vector, r),
27212
27212
  pinchAround: t
27213
27213
  };
27214
27214
  }
27215
27215
  _isBelowThreshold(e) {
27216
27216
  this._minDiameter = Math.min(this._minDiameter, e.mag());
27217
- let t = 25 / (Math.PI * this._minDiameter) * 360, n = la(e, this._startVector);
27217
+ let t = 25 / (Math.PI * this._minDiameter) * 360, n = ua(e, this._startVector);
27218
27218
  return Math.abs(n) < t;
27219
27219
  }
27220
27220
  }
@@ -27806,7 +27806,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
27806
27806
  });
27807
27807
  }(e), g = new oa(e, n);
27808
27808
  n.dragPan = new ba(r, h, g), this._add("mousePan", h), this._add("touchPan", g, ["touchZoom", "touchRotate"]), e.interactive && e.dragPan && n.dragPan.enable(e.dragPan);
27809
- let _ = new ua(), v = new X();
27809
+ let _ = new X(), v = new la();
27810
27810
  n.touchZoomRotate = new Sa(r, v, _, l), this._add("touchRotate", _, ["touchPan", "touchZoom"]), this._add("touchZoom", v, ["touchPan", "touchRotate"]), e.interactive && e.touchZoomRotate && n.touchZoomRotate.enable(e.touchZoomRotate);
27811
27811
  let y = n.scrollZoom = new ga(n, (() => this._triggerRenderFrame()));
27812
27812
  this._add("scrollZoom", y, ["mousePan"]), e.interactive && e.scrollZoom && n.scrollZoom.enable(e.scrollZoom);
@@ -30317,7 +30317,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
30317
30317
  onRemove() {
30318
30318
  s.remove(this._container), this._map.off("terrain", this._updateTerrainIcon), this._map = void 0;
30319
30319
  }
30320
- }, e.TwoFingersTouchPitchHandler = fa, e.TwoFingersTouchRotateHandler = ua, e.TwoFingersTouchZoomHandler = X, e.TwoFingersTouchZoomRotateHandler = Sa, e.VectorTileSource = Fe, e.VideoSource = Be, e.addSourceType = (e, n) => t._(void 0, void 0, void 0, (function* () {
30320
+ }, e.TwoFingersTouchPitchHandler = fa, e.TwoFingersTouchRotateHandler = X, e.TwoFingersTouchZoomHandler = la, e.TwoFingersTouchZoomRotateHandler = Sa, e.VectorTileSource = Fe, e.VideoSource = Be, e.addSourceType = (e, n) => t._(void 0, void 0, void 0, (function* () {
30321
30321
  if (Ue(e)) throw Error(`A source type called "${e}" already exists.`);
30322
30322
  ((e, t) => {
30323
30323
  He[e] = t;
@@ -32252,6 +32252,14 @@ function Sr(e, t) {
32252
32252
  return n !== void 0 && n !== "color";
32253
32253
  }
32254
32254
  //#endregion
32255
+ //#region src/utils/browser.ts
32256
+ function Cr() {
32257
+ return navigator.userAgent.toLowerCase().indexOf("mobile") >= 0;
32258
+ }
32259
+ function wr() {
32260
+ return window.InstallTrigger !== void 0;
32261
+ }
32262
+ //#endregion
32255
32263
  //#region node_modules/path-data-polyfill/path-data-polyfill.js
32256
32264
  (function() {
32257
32265
  var e = function(e) {
@@ -32984,22 +32992,31 @@ function Sr(e, t) {
32984
32992
  })();
32985
32993
  //#endregion
32986
32994
  //#region src/utils/svgHelpers.ts
32987
- function Cr(e) {
32995
+ function Tr(e) {
32988
32996
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
32989
32997
  }
32990
- async function wr(e, t, n) {
32998
+ async function Er(e, t, n) {
32991
32999
  for (let r of e) try {
32992
33000
  let e = await fetch(`${t}/fonts/${r}.woff2?access_token=${n}`).then((e) => e.arrayBuffer());
32993
33001
  document.fonts.add(new FontFace(r, e));
32994
33002
  } catch {}
32995
33003
  }
32996
- function Tr(e, t, n = 1e-4) {
33004
+ function Dr(e, t, n = 1e-4) {
32997
33005
  return Math.abs(e - t) < n;
32998
33006
  }
32999
- function Er(e, t, n) {
33000
- return Dr(new Blob([e], { type: "image/svg+xml" }), t, n);
33007
+ async function Or(e, t, n) {
33008
+ if (wr() || e.length < 2e6) try {
33009
+ return await kr(e, t, n);
33010
+ } catch {}
33011
+ return await Ar(new Blob([e], { type: "image/svg+xml" }), t, n);
33012
+ }
33013
+ function kr(e, t, n) {
33014
+ let r = new Image();
33015
+ return r.width = t, r.height = n, new Promise((t, n) => {
33016
+ r.onload = () => t(r), r.onerror = () => n(/* @__PURE__ */ Error("Failed to quickly generate image from svg")), r.src = `data:image/svg+xml;base64,${btoa(e)}`;
33017
+ });
33001
33018
  }
33002
- async function Dr(e, t, n) {
33019
+ async function Ar(e, t, n) {
33003
33020
  let r = new Image();
33004
33021
  r.width = t, r.height = n;
33005
33022
  let i = URL.createObjectURL(e);
@@ -33012,16 +33029,16 @@ async function Dr(e, t, n) {
33012
33029
  }
33013
33030
  return r;
33014
33031
  }
33015
- var Or = /\$\{([^}]+)}/g, kr = new DOMParser(), Ar = new XMLSerializer(), jr = /* @__PURE__ */ new Map();
33016
- function Mr(e) {
33017
- let t = jr.get(e);
33018
- return t || (t = kr.parseFromString(e, "image/svg+xml").documentElement, jr.set(e, t)), t;
33032
+ var jr = /\$\{([^}]+)}/g, Mr = new DOMParser(), Nr = new XMLSerializer(), Pr = /* @__PURE__ */ new Map();
33033
+ function Fr(e) {
33034
+ let t = Pr.get(e);
33035
+ return t || (t = Mr.parseFromString(e, "image/svg+xml").documentElement, Pr.set(e, t)), t;
33019
33036
  }
33020
- function Nr(e) {
33021
- let t = Ar.serializeToString(e);
33022
- return jr.has(t) || jr.set(t, e), t;
33037
+ function Ir(e) {
33038
+ let t = Nr.serializeToString(e);
33039
+ return Pr.has(t) || Pr.set(t, e), t;
33023
33040
  }
33024
- var Pr = class {
33041
+ var Lr = class {
33025
33042
  _seen = [];
33026
33043
  _svg = null;
33027
33044
  _element = null;
@@ -33029,23 +33046,23 @@ var Pr = class {
33029
33046
  this._svg = e;
33030
33047
  }
33031
33048
  setElement() {
33032
- return this._element = Mr(this._svg).cloneNode(!0), this._svg = null, this._element;
33049
+ return this._element = Fr(this._svg).cloneNode(!0), this._svg = null, this._element;
33033
33050
  }
33034
33051
  getSvgString() {
33035
- return this._svg ?? Nr(this._element);
33052
+ return this._svg ?? Ir(this._element);
33036
33053
  }
33037
33054
  getSvgSize() {
33038
- let e = this._element ?? Mr(this._svg);
33055
+ let e = this._element ?? Fr(this._svg);
33039
33056
  return [e.width.baseVal.value, e.height.baseVal.value];
33040
33057
  }
33041
33058
  getSvgColors() {
33042
- let e = [], t = [], n = (this._element ?? Mr(this._svg)).querySelectorAll("[mol_edit_style=true]");
33059
+ let e = [], t = [], n = (this._element ?? Fr(this._svg)).querySelectorAll("[mol_edit_style=true]");
33043
33060
  for (let r = 0; r < n.length; ++r) {
33044
33061
  let i = n[r], a = i.id;
33045
33062
  if (a && t.every((e) => e.id !== a)) {
33046
33063
  let n = i.getAttribute("fill")?.trim();
33047
33064
  if (n) {
33048
- let r = new Ur(n);
33065
+ let r = new Kr(n);
33049
33066
  if (r.badValue) e.push({
33050
33067
  name: `fill#${a}`,
33051
33068
  color: n
@@ -33054,14 +33071,14 @@ var Pr = class {
33054
33071
  let { rgba: t } = r, n = i.getAttribute("fill-opacity");
33055
33072
  t[3] *= n ? j(Number(n), 0, 1) : 1, e.push({
33056
33073
  name: `fill#${a}`,
33057
- color: Ur.fromRGB(t)
33074
+ color: Kr.fromRGB(t)
33058
33075
  });
33059
33076
  }
33060
33077
  t.push(i);
33061
33078
  }
33062
33079
  let r = i.getAttribute("stroke")?.trim();
33063
33080
  if (r) {
33064
- let n = new Ur(r);
33081
+ let n = new Kr(r);
33065
33082
  if (n.badValue) e.push({
33066
33083
  name: `stroke#${a}`,
33067
33084
  color: r
@@ -33070,7 +33087,7 @@ var Pr = class {
33070
33087
  let { rgba: t } = n, r = i.getAttribute("stroke-opacity");
33071
33088
  t[3] *= r ? j(Number(r), 0, 1) : 1, e.push({
33072
33089
  name: `stroke#${a}`,
33073
- color: Ur.fromRGB(t)
33090
+ color: Kr.fromRGB(t)
33074
33091
  });
33075
33092
  }
33076
33093
  t.push(i);
@@ -33100,7 +33117,7 @@ var Pr = class {
33100
33117
  return this;
33101
33118
  }
33102
33119
  getSvgTexts() {
33103
- let e = [], t = (this._element ?? Mr(this._svg)).querySelectorAll("[mol_edit_text=true]");
33120
+ let e = [], t = (this._element ?? Fr(this._svg)).querySelectorAll("[mol_edit_text=true]");
33104
33121
  for (let n = 0; n < t.length; ++n) {
33105
33122
  let r = t[n], i = r.id;
33106
33123
  i && e.every((e) => e.name !== i) && e.push({
@@ -33167,30 +33184,30 @@ var Pr = class {
33167
33184
  e[3]
33168
33185
  ];
33169
33186
  }
33170
- Tr(e.attributes.x.value, t.x - r[0]) && Tr(e.attributes.y.value, t.y - r[2]) && Tr(e.attributes.width.value, t.width + r[0] + r[1]) && Tr(e.attributes.height.value, t.height + r[2] + r[3]) || (e.attributes.x.value = t.x - r[0], e.attributes.y.value = t.y - r[2], e.attributes.width.value = t.width + r[0] + r[1], e.attributes.height.value = t.height + r[2] + r[3], this.nodeChanged(e));
33187
+ Dr(e.attributes.x.value, t.x - r[0]) && Dr(e.attributes.y.value, t.y - r[2]) && Dr(e.attributes.width.value, t.width + r[0] + r[1]) && Dr(e.attributes.height.value, t.height + r[2] + r[3]) || (e.attributes.x.value = t.x - r[0], e.attributes.y.value = t.y - r[2], e.attributes.width.value = t.width + r[0] + r[1], e.attributes.height.value = t.height + r[2] + r[3], this.nodeChanged(e));
33171
33188
  }
33172
33189
  sameWidth(e, t) {
33173
33190
  let n = t.width + 2 * parseFloat(e.attributes.mol_samewidth.value.split(" ")[1]);
33174
- Tr(e.attributes.width.value, n) || (e.attributes.width.value = n, this.nodeChanged(e));
33191
+ Dr(e.attributes.width.value, n) || (e.attributes.width.value = n, this.nodeChanged(e));
33175
33192
  }
33176
33193
  sameHeight(e, t) {
33177
33194
  let n = t.height + 2 * parseFloat(e.attributes.mol_sameheight.value.split(" ")[1]);
33178
- Tr(e.attributes.height.value, n) || (this._seen.push(e), e.attributes.height.value = n, this.nodeChanged(e));
33195
+ Dr(e.attributes.height.value, n) || (this._seen.push(e), e.attributes.height.value = n, this.nodeChanged(e));
33179
33196
  }
33180
33197
  stack(e, t) {
33181
33198
  let n = !1;
33182
33199
  switch (e.attributes.mol_stack.value.split(" ")[0]) {
33183
33200
  case "top":
33184
- n = !(Tr(e.attributes.width.value, t.width) && Tr(e.attributes.x.value, t.x) && Tr(e.attributes.y.value, t.y - e.attributes.height.value)), n && (e.attributes.width.value = t.width, e.attributes.x.value = t.x, e.attributes.y.value = t.y - e.attributes.height.value);
33201
+ n = !(Dr(e.attributes.width.value, t.width) && Dr(e.attributes.x.value, t.x) && Dr(e.attributes.y.value, t.y - e.attributes.height.value)), n && (e.attributes.width.value = t.width, e.attributes.x.value = t.x, e.attributes.y.value = t.y - e.attributes.height.value);
33185
33202
  break;
33186
33203
  case "bottom":
33187
- n = !(Tr(e.attributes.width.value, t.width) && Tr(e.attributes.x.value, t.x) && Tr(e.attributes.y.value, t.y + t.height)), n && (e.attributes.width.value = t.width, e.attributes.x.value = t.x, e.attributes.y.value = t.y + t.height);
33204
+ n = !(Dr(e.attributes.width.value, t.width) && Dr(e.attributes.x.value, t.x) && Dr(e.attributes.y.value, t.y + t.height)), n && (e.attributes.width.value = t.width, e.attributes.x.value = t.x, e.attributes.y.value = t.y + t.height);
33188
33205
  break;
33189
33206
  case "left":
33190
- n = !(Tr(e.attributes.height.value, t.height) && Tr(e.attributes.x.value, t.x - e.attributes.width.value) && Tr(e.attributes.y.value, t.y)), n && (e.attributes.height.value = t.height, e.attributes.x.value = t.x - e.attributes.width.value, e.attributes.y.value = t.y);
33207
+ n = !(Dr(e.attributes.height.value, t.height) && Dr(e.attributes.x.value, t.x - e.attributes.width.value) && Dr(e.attributes.y.value, t.y)), n && (e.attributes.height.value = t.height, e.attributes.x.value = t.x - e.attributes.width.value, e.attributes.y.value = t.y);
33191
33208
  break;
33192
33209
  case "right":
33193
- n = !(Tr(e.attributes.height.value, t.height) && Tr(e.attributes.x.value, t.x + t.width) && Tr(e.attributes.y.value, t.y)), n && (e.attributes.height.value = t.height, e.attributes.x.value = t.x + t.width, e.attributes.y.value = t.y);
33210
+ n = !(Dr(e.attributes.height.value, t.height) && Dr(e.attributes.x.value, t.x + t.width) && Dr(e.attributes.y.value, t.y)), n && (e.attributes.height.value = t.height, e.attributes.x.value = t.x + t.width, e.attributes.y.value = t.y);
33194
33211
  break;
33195
33212
  }
33196
33213
  n && this.nodeChanged(e);
@@ -33239,22 +33256,22 @@ var Pr = class {
33239
33256
  break;
33240
33257
  }
33241
33258
  let o = this.getCoordinate(e, 0, 0);
33242
- o && !(Tr(o.x, a.x) && Tr(o.y, a.y)) && (this.moveElement(e, a), this.nodeChanged(e));
33259
+ o && !(Dr(o.x, a.x) && Dr(o.y, a.y)) && (this.moveElement(e, a), this.nodeChanged(e));
33243
33260
  }
33244
33261
  pathPosition(e, t) {
33245
33262
  let n = e.attributes.mol_pathposition.value.split(" ").map((e) => parseFloat(e)), r = this.getCoordinate(e, 0, 0), i = this.getCoordinate(t, n[1], n[2]);
33246
- i && r && !(Tr(i.x, r.x) && Tr(i.y, r.y)) && (this.moveElement(e, i), this.nodeChanged(e));
33263
+ i && r && !(Dr(i.x, r.x) && Dr(i.y, r.y)) && (this.moveElement(e, i), this.nodeChanged(e));
33247
33264
  }
33248
33265
  copyPosition(e, t) {
33249
33266
  let n = e.attributes.mol_copyposition.value.split(" ").map((e) => parseFloat(e)), r = this.getCoordinate(e, n[0], n[1]), i = this.getCoordinate(t, n[3], n[4]);
33250
- i && r && !(Tr(i.x, r.x) && Tr(i.y, r.y)) && (this.setCoordinate(e, i, n[0], n[1]), this.nodeChanged(e));
33267
+ i && r && !(Dr(i.x, r.x) && Dr(i.y, r.y)) && (this.setCoordinate(e, i, n[0], n[1]), this.nodeChanged(e));
33251
33268
  }
33252
33269
  resetSize(e) {
33253
33270
  let t = this._element ?? this.setElement(), n = this.getBBox(t);
33254
33271
  n.x -= .1 * n.width, n.y -= .1 * n.height, n.width *= 1.2, n.height *= 1.2, t.setAttribute("viewBox", `${n.x} ${n.y} ${n.width} ${n.height}`), t.setAttribute("width", `${n.width * e}`), t.setAttribute("height", `${n.height * e}`);
33255
33272
  }
33256
33273
  resetAnchor() {
33257
- let e = (this._element ?? Mr(this._svg)).querySelector("[mol_edit_anchor]");
33274
+ let e = (this._element ?? Fr(this._svg)).querySelector("[mol_edit_anchor]");
33258
33275
  if (e) {
33259
33276
  let t = e.getAttribute("mol_edit_anchor").split(" ").map((e) => parseFloat(e)), n = this.getCoordinate(e, t[0], t[1]), r = this._element ?? this.setElement(), i = r.getElementById("scale");
33260
33277
  if (i) {
@@ -33399,14 +33416,14 @@ var Pr = class {
33399
33416
  case "rect":
33400
33417
  case "circle":
33401
33418
  case "ellipse":
33402
- n = this.getCoordinate(e, 0, 0), a = !Tr(n.x, t.x) || !Tr(n.y, t.y), a && this.setCoordinate(e, t, 0, 0);
33419
+ n = this.getCoordinate(e, 0, 0), a = !Dr(n.x, t.x) || !Dr(n.y, t.y), a && this.setCoordinate(e, t, 0, 0);
33403
33420
  break;
33404
33421
  case "polyline":
33405
33422
  case "polygon":
33406
- if (n = this.getCoordinate(e, 0, 0), r.x = t.x - n.x, r.y = t.y - n.y, a = !Tr(r.x, 0) || !Tr(r.y, 0), a) for (this.setCoordinate(e, t, 0, 0), i = 1, n = this.getCoordinate(e, i, 0); n !== null;) n.x += r.x, n.y += r.y, this.setCoordinate(n, i, 0, void 0), i++, n = this.getCoordinate(e, i, 0);
33423
+ if (n = this.getCoordinate(e, 0, 0), r.x = t.x - n.x, r.y = t.y - n.y, a = !Dr(r.x, 0) || !Dr(r.y, 0), a) for (this.setCoordinate(e, t, 0, 0), i = 1, n = this.getCoordinate(e, i, 0); n !== null;) n.x += r.x, n.y += r.y, this.setCoordinate(n, i, 0, void 0), i++, n = this.getCoordinate(e, i, 0);
33407
33424
  break;
33408
33425
  case "path":
33409
- if (n = this.getCoordinate(e, 0, 0), r.x = t.x - n.x, r.y = t.y - n.y, a = !Tr(r.x, 0) || !Tr(r.y, 0), a) {
33426
+ if (n = this.getCoordinate(e, 0, 0), r.x = t.x - n.x, r.y = t.y - n.y, a = !Dr(r.x, 0) || !Dr(r.y, 0), a) {
33410
33427
  o = e.getPathData({ normalize: !0 });
33411
33428
  for (let e = 0; e < o.length; ++e) {
33412
33429
  let t = o[e];
@@ -33446,7 +33463,7 @@ var Pr = class {
33446
33463
  for (u = document.createElementNS(h, "tspan"), u.setAttributeNS(null, "x", String(w)), u.setAttributeNS(null, "y", String(A + o)), d = p + f.toString(), u.setAttribute("id", d), f++, s = "", i = 0, l = document.createTextNode(s), u.appendChild(l), t.appendChild(u), o += O, a = 0; a < r.length;) c = s + r[a], i++, l.nodeValue = c, m = e.querySelector(`#${d}`).getComputedTextLength(), m < D ? (s = c, s.length > 0 && s[s.length - 1] === "\n" && a < r.length - 1 && (l.nodeValue = s, u = document.createElementNS(h, "tspan"), u.setAttributeNS(null, "x", String(w)), u.setAttributeNS(null, "y", String(A + o)), d = p + f.toString(), u.setAttribute("id", d), o += O + S, f++, s = "", i = 0, l = document.createTextNode(s), u.appendChild(l), t.appendChild(u)), a++) : (i > 1 ? l.nodeValue = s : (s = c, a++), s.length > 0 && s[s.length - 1] === "\n" && (s = s.substr(0, s.length - 1), l.nodeValue = s), u = document.createElementNS(h, "tspan"), u.setAttributeNS(null, "x", String(w)), u.setAttributeNS(null, "y", String(A + o)), d = p + f.toString(), u.setAttribute("id", d), o += O + S, f++, s = "", i = 0, l = document.createTextNode(s), u.appendChild(l), t.appendChild(u));
33447
33464
  return t.childElementCount === 1 && t.firstElementChild.replaceWith(t.firstElementChild.textContent), o;
33448
33465
  }
33449
- }, Fr = class {
33466
+ }, Rr = class {
33450
33467
  map;
33451
33468
  keyCache = /* @__PURE__ */ new Map();
33452
33469
  constructor(e) {
@@ -33457,18 +33474,18 @@ var Pr = class {
33457
33474
  n || (n = /* @__PURE__ */ new Map(), this.keyCache.set(t, n));
33458
33475
  let r = n.get(e);
33459
33476
  if (!r) {
33460
- let i = e + t, a = new Pr(e).getSvgSize(), o = Math.max(a[0] * t, 1), s = Math.max(a[1] * t, 1);
33461
- r = `mc-image-${M(i)}`, Er(e, o, s).then((e) => this.map.addImage(r, e, { pixelRatio: t })).catch((e) => console.log(e)), n.set(e, r);
33477
+ let i = e + t, a = new Lr(e).getSvgSize(), o = Math.max(a[0] * t, 1), s = Math.max(a[1] * t, 1);
33478
+ r = `mc-image-${M(i)}`, Or(e, o, s).then((e) => this.map.addImage(r, e, { pixelRatio: t })).catch((e) => console.log(e)), n.set(e, r);
33462
33479
  }
33463
33480
  return r;
33464
33481
  }
33465
- }, Ir = 0, Lr = "", Rr = document.createElement("canvas").getContext("2d");
33466
- function zr(e, t, n) {
33482
+ }, zr = 0, Br = "", Vr = document.createElement("canvas").getContext("2d");
33483
+ function Hr(e, t, n) {
33467
33484
  let r = 0, i = 0, a = 0, o = 0;
33468
- if (Rr) {
33469
- (Ir !== n || Lr !== t) && (Rr.font = `${n}px ${t}`, Lr = t, Ir = n), {actualBoundingBoxAscent: a, actualBoundingBoxDescent: o} = Rr.measureText("█");
33485
+ if (Vr) {
33486
+ (zr !== n || Br !== t) && (Vr.font = `${n}px ${t}`, Br = t, zr = n), {actualBoundingBoxAscent: a, actualBoundingBoxDescent: o} = Vr.measureText("█");
33470
33487
  for (let t = 0; t < e.length; ++t) {
33471
- let { actualBoundingBoxLeft: n, actualBoundingBoxRight: i } = Rr.measureText(e[t]);
33488
+ let { actualBoundingBoxLeft: n, actualBoundingBoxRight: i } = Vr.measureText(e[t]);
33472
33489
  n + i > r && (r = n + i);
33473
33490
  }
33474
33491
  i = (a + o) * e.length;
@@ -33480,28 +33497,28 @@ function zr(e, t, n) {
33480
33497
  descent: o
33481
33498
  };
33482
33499
  }
33483
- function Br(e, t, n, r, i) {
33500
+ function Ur(e, t, n, r, i) {
33484
33501
  let a = n ?? t, o = !r, s = a?.match(/\$\{([^}]+)}/)?.[1], c = s ? o ? w(e[s]) : T(e[s]) : null, l = s ? o ? c : typeof c != "boolean" && c !== null && c !== "" ? r(c) : i : a;
33485
- return l && !new Ur(l).badValue ? l : "#000000";
33502
+ return l && !new Kr(l).badValue ? l : "#000000";
33486
33503
  }
33487
- function Vr(e, t, n) {
33488
- return (n ?? t)?.split(Or).map((t, n) => n & 1 ? w(e[t]) : t).join("") || void 0;
33504
+ function Wr(e, t, n) {
33505
+ return (n ?? t)?.split(jr).map((t, n) => n & 1 ? w(e[t]) : t).join("") || void 0;
33489
33506
  }
33490
- function Hr(e, t, n) {
33507
+ function Gr(e, t, n) {
33491
33508
  let r = t;
33492
33509
  if (t) {
33493
- let i = new Pr(t), a = i.getSvgColors(), o = i.getSvgTexts(), s = n ? new Map(new Pr(n).getSvgColors().map(({ name: e, color: t }) => [e, t])) : /* @__PURE__ */ new Map(), c = n ? new Map(new Pr(n).getSvgTexts().map(({ name: e, text: t }) => [e, t])) : /* @__PURE__ */ new Map(), l = a.map(({ name: t, color: n }) => ({
33510
+ let i = new Lr(t), a = i.getSvgColors(), o = i.getSvgTexts(), s = n ? new Map(new Lr(n).getSvgColors().map(({ name: e, color: t }) => [e, t])) : /* @__PURE__ */ new Map(), c = n ? new Map(new Lr(n).getSvgTexts().map(({ name: e, text: t }) => [e, t])) : /* @__PURE__ */ new Map(), l = a.map(({ name: t, color: n }) => ({
33494
33511
  name: t,
33495
- color: new Ur(Br(e, n?.toString(), s.get(t)?.toString()))
33512
+ color: new Kr(Ur(e, n?.toString(), s.get(t)?.toString()))
33496
33513
  })).filter((e, t) => typeof a[t].color == "string" || !e.color.sameColor(a[t].color)), u = o.map(({ name: t, text: n }) => ({
33497
33514
  name: t,
33498
- text: Vr(e, n, c.get(t))
33515
+ text: Wr(e, n, c.get(t))
33499
33516
  })).filter((e, t) => e.text !== o[t].text);
33500
33517
  l.length && i.setSvgColors(l), u.length && i.setSvgTexts(u), (l.length || u.length) && (r = i.getSvgString());
33501
33518
  }
33502
33519
  return r;
33503
33520
  }
33504
- var Ur = class e {
33521
+ var Kr = class e {
33505
33522
  _error = !1;
33506
33523
  _rgba;
33507
33524
  static fromRGB(t) {
@@ -33519,12 +33536,12 @@ var Ur = class e {
33519
33536
  if (n === 0) this._error = !0;
33520
33537
  else if (e === "transparent" || e === "none") t[3] = 0;
33521
33538
  else if (e[0] === "#") n < 6 ? (t[0] = parseInt(e[1] + e[1], 16) || 0, t[1] = parseInt(e[2] + e[2], 16) || 0, t[2] = parseInt(e[3] + e[3], 16) || 0, n === 5 && (t[3] = parseInt(e[4] + e[4], 16) / 255)) : (t[0] = parseInt(e[1] + e[2], 16) || 0, t[1] = parseInt(e[3] + e[4], 16) || 0, t[2] = parseInt(e[5] + e[6], 16) || 0, n > 8 && (t[3] = parseInt(e[7] + e[8], 16) / 255));
33522
- else if (e in Jr) {
33523
- let n = Jr[e];
33539
+ else if (e in Zr) {
33540
+ let n = Zr[e];
33524
33541
  t[0] = n[0], t[1] = n[1], t[2] = n[2];
33525
33542
  } else if (r = /^(rgba?|hs[lv]a?)\s*\(([^)]*)\)/.exec(e)) {
33526
- let e = r[1].replace(/a$/, ""), n = r[2].trim().split(/\s*[,/]\s*|\s+/).map(Gr, { space: e });
33527
- e === "rgb" ? (t[0] = n[0], t[1] = n[1], t[2] = n[2], n.length > 3 && (t[3] = n[3])) : e === "hsl" ? qr(n, t) : e === "hsv" && J(n, t);
33543
+ let e = r[1].replace(/a$/, ""), n = r[2].trim().split(/\s*[,/]\s*|\s+/).map(J, { space: e });
33544
+ e === "rgb" ? (t[0] = n[0], t[1] = n[1], t[2] = n[2], n.length > 3 && (t[3] = n[3])) : e === "hsl" ? Yr(n, t) : e === "hsv" && Xr(n, t);
33528
33545
  } else this._error = !0;
33529
33546
  }
33530
33547
  get badValue() {
@@ -33540,13 +33557,13 @@ var Ur = class e {
33540
33557
  return this._rgba.slice();
33541
33558
  }
33542
33559
  sameColor(e) {
33543
- return Tr(this._rgba[0], e._rgba[0]) && Tr(this._rgba[1], e._rgba[1]) && Tr(this._rgba[2], e._rgba[2]) && Tr(this._rgba[3], e._rgba[3]);
33560
+ return Dr(this._rgba[0], e._rgba[0]) && Dr(this._rgba[1], e._rgba[1]) && Dr(this._rgba[2], e._rgba[2]) && Dr(this._rgba[3], e._rgba[3]);
33544
33561
  }
33545
33562
  toString() {
33546
33563
  let [e, t, n, r] = this._rgba;
33547
33564
  return r === 1 ? this.hex : `rgba(${Math.round(e)}, ${Math.round(t)}, ${Math.round(n)}, ${r})`;
33548
33565
  }
33549
- }, Wr = {
33566
+ }, qr = {
33550
33567
  red: 0,
33551
33568
  orange: 60,
33552
33569
  yellow: 120,
@@ -33554,14 +33571,14 @@ var Ur = class e {
33554
33571
  blue: 240,
33555
33572
  purple: 300
33556
33573
  };
33557
- function Gr(e, t) {
33574
+ function J(e, t) {
33558
33575
  let { space: n } = this;
33559
33576
  if (e[e.length - 1] === "%") {
33560
33577
  let r = parseFloat(e), i = t < 3 && n === "rgb" ? 255 : 1, a = t > 0 && t < 3 && n[0] === "h" ? 1 : 100;
33561
33578
  return (r < 0 ? 0 : r > 100 ? 100 : r) / a * i;
33562
33579
  }
33563
33580
  if (n[t] === "h" || t === 2 && n[n.length - 1] === "h") {
33564
- if (e in Wr) return Wr[e];
33581
+ if (e in qr) return qr[e];
33565
33582
  let t = parseFloat(e);
33566
33583
  switch (!0) {
33567
33584
  case e.endsWith("turn"):
@@ -33582,10 +33599,10 @@ function Gr(e, t) {
33582
33599
  return r < 0 ? 0 : r > i ? i : r;
33583
33600
  }
33584
33601
  }
33585
- function Kr(e, t, n) {
33602
+ function Jr(e, t, n) {
33586
33603
  return n < 0 && (n += 1), n > 1 && --n, (n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e) * 255;
33587
33604
  }
33588
- function qr(e, t = [
33605
+ function Yr(e, t = [
33589
33606
  0,
33590
33607
  0,
33591
33608
  0,
@@ -33595,11 +33612,11 @@ function qr(e, t = [
33595
33612
  if (r === 0) t[2] = t[1] = t[0] = i * 255;
33596
33613
  else {
33597
33614
  let e = i < .5 ? i * (1 + r) : i + r - i * r, a = 2 * i - e;
33598
- t[0] = Kr(a, e, n + 1 / 3), t[1] = Kr(a, e, n), t[2] = Kr(a, e, n - 1 / 3);
33615
+ t[0] = Jr(a, e, n + 1 / 3), t[1] = Jr(a, e, n), t[2] = Jr(a, e, n - 1 / 3);
33599
33616
  }
33600
33617
  return e.length > 3 && (t[3] = e[3]), t;
33601
33618
  }
33602
- function J(e, t = [
33619
+ function Xr(e, t = [
33603
33620
  0,
33604
33621
  0,
33605
33622
  0,
@@ -33628,7 +33645,7 @@ function J(e, t = [
33628
33645
  }
33629
33646
  return e.length > 3 && (t[3] = e[3]), t;
33630
33647
  }
33631
- var Jr = {
33648
+ var Zr = {
33632
33649
  aliceblue: [
33633
33650
  240,
33634
33651
  248,
@@ -34372,8 +34389,8 @@ var Jr = {
34372
34389
  };
34373
34390
  //#endregion
34374
34391
  //#region src/adornments/categoricalLegend.ts
34375
- function Yr(e, t, n) {
34376
- let { title: r = "", titleFontColor: i = "#000000", titleFont: a = t, titleFontSize: o = 24, entries: s, entryFontColor: c = "#000000", entryFont: l = t, entryFontSize: u = 13, entryShape: d = "rectangle", layout: f = "vertical", background: p = "#ffffff", showBackground: m = !1 } = e, h = zr([r], a, o), g = s.map((e) => zr([e.label], l, u)), _ = r.trim().length > 0, v, y;
34392
+ function Qr(e, t, n) {
34393
+ let { title: r = "", titleFontColor: i = "#000000", titleFont: a = t, titleFontSize: o = 24, entries: s, entryFontColor: c = "#000000", entryFont: l = t, entryFontSize: u = 13, entryShape: d = "rectangle", layout: f = "vertical", background: p = "#ffffff", showBackground: m = !1 } = e, h = Hr([r], a, o), g = s.map((e) => Hr([e.label], l, u)), _ = r.trim().length > 0, v, y;
34377
34394
  f === "vertical" ? (v = Math.max(h.width, ...g.map((e) => e.width + 15 + 10)) + 30, y = 30 + (_ ? h.height + 20 : 0) + g.reduce((e, t) => e + t.height, 0) + Math.max(g.length - 1, 0) * 20) : (v = Math.max(h.width + 30, 30 + g.reduce((e, t) => e + t.width + 15 + 10, 0) + Math.max(g.length - 1, 0) * 20), y = 30 + (_ ? h.height + 20 : 0) + Math.max(0, ...g.map((e) => e.height)));
34378
34395
  let b = [];
34379
34396
  m && b.push(`
@@ -34396,7 +34413,7 @@ function Yr(e, t, n) {
34396
34413
  font-size="${o}"
34397
34414
  fill="${i}"
34398
34415
  >
34399
- ${Cr(r)}
34416
+ ${Tr(r)}
34400
34417
  </text>
34401
34418
  `), S += h.height + 20);
34402
34419
  for (let e = 0; e < s.length; e++) {
@@ -34443,7 +34460,7 @@ function Yr(e, t, n) {
34443
34460
  font-size="${u}"
34444
34461
  fill="${c}"
34445
34462
  >
34446
- ${Cr(t.label)}
34463
+ ${Tr(t.label)}
34447
34464
  </text>
34448
34465
  `), f === "vertical" ? S += n.height + 20 : x += n.width + 15 + 10 + 20;
34449
34466
  }
@@ -34461,24 +34478,24 @@ function Yr(e, t, n) {
34461
34478
  }
34462
34479
  //#endregion
34463
34480
  //#region src/adornments/connectedLegend.ts
34464
- var Xr = "ArialMT", Zr = 15;
34465
- function Qr(e, t, n, r, i, a) {
34481
+ var $r = "ArialMT", ei = 15;
34482
+ function ti(e, t, n, r, i, a) {
34466
34483
  let o = document.createElement("div");
34467
34484
  o.className = "adornment", e.showBackground && (o.style.boxShadow = "0 0 7px 0 rgba(33, 37, 41, 0.25)", o.style.borderRadius = "10px");
34468
- let s = [e.titleFont ?? Xr, e.labelFont ?? Xr];
34469
- return wr(Array.from(new Set(s)), r, i).then(() => o.innerHTML = $r(e, t, n, a)), o;
34485
+ let s = [e.titleFont ?? $r, e.labelFont ?? $r];
34486
+ return Er(Array.from(new Set(s)), r, i).then(() => o.innerHTML = ni(e, t, n, a)), o;
34470
34487
  }
34471
- function $r(e, t, n, r) {
34488
+ function ni(e, t, n, r) {
34472
34489
  let { target: i } = e, a = t.registry?.models?.[i.modelType]?.find((e) => e.id === i.groupId), o = a?.models ?? [], s = a?.choropleth, c = br(a?.fillColor);
34473
- return !s || !c || a.models.every((e) => !(e.visible ?? !0)) || !Sr(o, c) ? ei() : s.colorMode === "categorical" ? ri(e, s, c, r) : s.colorMode === "linear" ? ti(e, a, n, r) : s.colorMode === "quantile" || s.colorMode === "quantize" ? ni(e, a, n, r) : ei();
34490
+ return !s || !c || a.models.every((e) => !(e.visible ?? !0)) || !Sr(o, c) ? ri() : s.colorMode === "categorical" ? oi(e, s, c, r) : s.colorMode === "linear" ? ii(e, a, n, r) : s.colorMode === "quantile" || s.colorMode === "quantize" ? ai(e, a, n, r) : ri();
34474
34491
  }
34475
- function ei() {
34492
+ function ri() {
34476
34493
  return "\n <svg\n class=\"adornment-svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"0\"\n height=\"0\"\n viewBox=\"0 0 0 0\"\n >\n </svg>\n ";
34477
34494
  }
34478
- function ti(e, t, n, r) {
34479
- let i = 15 / 2, { id: a, layout: o = "vertical", labelFont: s = Xr, labelFontSize: c = 13, labelFontColor: l = "#000000", numberFormat: u = ".2~s", title: d = "", titleFont: f = Xr, titleFontSize: p = 14, titleFontColor: m = "#000000", showBackground: h = !1, background: g = "#ffffff" } = e, _ = `gradient-${a}`, v = o === "horizontal", y = gr(t);
34480
- if (y === void 0) return ei();
34481
- let b = [], [x, S] = At(y.domain()), C = zt(x, S, 4), w = ii(u), T = C.map((e) => w(e)), E = T.map((e) => zr([e], s, c)), D = [];
34495
+ function ii(e, t, n, r) {
34496
+ let i = 15 / 2, { id: a, layout: o = "vertical", labelFont: s = $r, labelFontSize: c = 13, labelFontColor: l = "#000000", numberFormat: u = ".2~s", title: d = "", titleFont: f = $r, titleFontSize: p = 14, titleFontColor: m = "#000000", showBackground: h = !1, background: g = "#ffffff" } = e, _ = `gradient-${a}`, v = o === "horizontal", y = gr(t);
34497
+ if (y === void 0) return ri();
34498
+ let b = [], [x, S] = At(y.domain()), C = zt(x, S, 4), w = si(u), T = C.map((e) => w(e)), E = T.map((e) => Hr([e], s, c)), D = [];
34482
34499
  for (let e = 0; e < 32; e++) {
34483
34500
  let t = e / 31;
34484
34501
  D.push(`<stop offset="${t * 100}%" stop-color="${y(x + t * (S - x))}" />`);
@@ -34491,11 +34508,11 @@ function ti(e, t, n, r) {
34491
34508
  </linearGradient>
34492
34509
  </defs>
34493
34510
  `);
34494
- let M = zr([d], f, p), N = d.trim().length > 0, P = {
34511
+ let M = Hr([d], f, p), N = d.trim().length > 0, P = {
34495
34512
  width: Math.max(0, ...E.map((e) => e.width)),
34496
34513
  height: Math.max(0, ...E.map((e) => e.height)),
34497
34514
  ascent: Math.max(0, ...E.map((e) => e.ascent))
34498
- }, F = N ? M.height + 10 : 0, ee = N ? M.width : 0, I = C.length - 1, te = j(45 * I, Math.ceil(v ? (P.width + 10) * I : (P.height + 10) * I), Math.floor(v ? n.getContainer().clientWidth - 10 - Zr * 2 : n.getContainer().clientHeight - 10 - Zr * 2 - F)), ne = Math.ceil(v ? Zr * 2 + Math.max(ee, te) : Zr * 2 + Math.max(ee, 25 + P.width)), re = Math.ceil(v ? Zr * 2 + F + 20 + 5 + P.ascent : Zr * 2 + F + te);
34515
+ }, F = N ? M.height + 10 : 0, ee = N ? M.width : 0, I = C.length - 1, te = j(45 * I, Math.ceil(v ? (P.width + 10) * I : (P.height + 10) * I), Math.floor(v ? n.getContainer().clientWidth - 10 - ei * 2 : n.getContainer().clientHeight - 10 - ei * 2 - F)), ne = Math.ceil(v ? ei * 2 + Math.max(ee, te) : ei * 2 + Math.max(ee, 25 + P.width)), re = Math.ceil(v ? ei * 2 + F + 20 + 5 + P.ascent : ei * 2 + F + te);
34499
34516
  h && b.push(`
34500
34517
  <rect
34501
34518
  x="0"
@@ -34507,7 +34524,7 @@ function ti(e, t, n, r) {
34507
34524
  fill="${g}"
34508
34525
  />
34509
34526
  `);
34510
- let ie = Zr, ae = Zr;
34527
+ let ie = ei, ae = ei;
34511
34528
  N && (b.push(`
34512
34529
  <text
34513
34530
  x="${ie}"
@@ -34516,7 +34533,7 @@ function ti(e, t, n, r) {
34516
34533
  font-size="${p}"
34517
34534
  fill="${m}"
34518
34535
  >
34519
- ${Cr(d)}
34536
+ ${Tr(d)}
34520
34537
  </text>
34521
34538
  `), ae += M.height + 10), b.push(`
34522
34539
  <rect
@@ -34548,7 +34565,7 @@ function ti(e, t, n, r) {
34548
34565
  fill="${l}"
34549
34566
  text-anchor="${v ? "middle" : "start"}"
34550
34567
  >
34551
- ${Cr(n)}
34568
+ ${Tr(n)}
34552
34569
  </text>
34553
34570
  `);
34554
34571
  }
@@ -34564,15 +34581,15 @@ function ti(e, t, n, r) {
34564
34581
  </svg>
34565
34582
  `;
34566
34583
  }
34567
- function ni(e, t, n, r) {
34584
+ function ai(e, t, n, r) {
34568
34585
  let i = gr(t), a = i?.range(), o = [], s = 0, c = 0;
34569
34586
  if (i && a && a.length > 1) {
34570
- let { layout: t = "vertical", labelFont: r = Xr, labelFontSize: l = 13, labelFontColor: u = "#000000", labelStyle: d = "range", numberFormat: f = ".2~s", title: p = "", titleFont: m = Xr, titleFontSize: h = 14, titleFontColor: g = "#000000", showBackground: _ = !1, background: v = "#ffffff" } = e, y = t === "vertical", b = d === "range", x = ii(f), S = b ? a.map((e) => i.invertExtent(e)).map((e, t, n) => t === 0 ? `< ${x(e[1])}` : t === n.length - 1 ? `> ${x(e[0])}` : `${x(e[0])} – ${x(e[1])}`) : a.map((e) => i.invertExtent(e)).reduce((e, t, n) => (n && e.push(x(t[0])), e), []), C = S.map((e) => zr([e], r, l)), w = zr([p], m, h), T = p.trim().length > 0, E = {
34587
+ let { layout: t = "vertical", labelFont: r = $r, labelFontSize: l = 13, labelFontColor: u = "#000000", labelStyle: d = "range", numberFormat: f = ".2~s", title: p = "", titleFont: m = $r, titleFontSize: h = 14, titleFontColor: g = "#000000", showBackground: _ = !1, background: v = "#ffffff" } = e, y = t === "vertical", b = d === "range", x = si(f), S = b ? a.map((e) => i.invertExtent(e)).map((e, t, n) => t === 0 ? `< ${x(e[1])}` : t === n.length - 1 ? `> ${x(e[0])}` : `${x(e[0])} – ${x(e[1])}`) : a.map((e) => i.invertExtent(e)).reduce((e, t, n) => (n && e.push(x(t[0])), e), []), C = S.map((e) => Hr([e], r, l)), w = Hr([p], m, h), T = p.trim().length > 0, E = {
34571
34588
  width: Math.max(0, ...C.map((e) => e.width)),
34572
34589
  height: Math.max(0, ...C.map((e) => e.height)),
34573
34590
  ascent: Math.max(0, ...C.map((e) => e.ascent))
34574
34591
  }, D = T ? w.height + 10 : 0, O = T ? w.width : 0, k = a.length, A = 45, M = 15 / 2;
34575
- y ? (A = j(A, Math.ceil(E.height) + 10, Math.floor((n.getContainer().clientHeight - 10 - Zr * 2 - D) / k)), s = Math.ceil(Zr * 2 + D + k * A), c = Math.ceil(Zr * 2 + Math.max(O, 25 + E.width))) : (A = j(A, Math.ceil(E.width) + 10, Math.floor((n.getContainer().clientWidth - 10 - Zr * 2) / k)), c = Math.ceil(Zr * 2 + Math.max(O, k * A)), s = Math.ceil(Zr * 2 + D + 15 + 10 + E.ascent)), _ && o.push(`
34592
+ y ? (A = j(A, Math.ceil(E.height) + 10, Math.floor((n.getContainer().clientHeight - 10 - ei * 2 - D) / k)), s = Math.ceil(ei * 2 + D + k * A), c = Math.ceil(ei * 2 + Math.max(O, 25 + E.width))) : (A = j(A, Math.ceil(E.width) + 10, Math.floor((n.getContainer().clientWidth - 10 - ei * 2) / k)), c = Math.ceil(ei * 2 + Math.max(O, k * A)), s = Math.ceil(ei * 2 + D + 15 + 10 + E.ascent)), _ && o.push(`
34576
34593
  <rect
34577
34594
  x="0"
34578
34595
  y="0"
@@ -34583,7 +34600,7 @@ function ni(e, t, n, r) {
34583
34600
  fill="${v}"
34584
34601
  />
34585
34602
  `);
34586
- let N = Zr, P = Zr;
34603
+ let N = ei, P = ei;
34587
34604
  T && (o.push(`
34588
34605
  <text
34589
34606
  x="${N}"
@@ -34592,7 +34609,7 @@ function ni(e, t, n, r) {
34592
34609
  font-size="${h}"
34593
34610
  fill="${g}"
34594
34611
  >
34595
- ${Cr(p)}
34612
+ ${Tr(p)}
34596
34613
  </text>
34597
34614
  `), P += D);
34598
34615
  let F = y ? 15 : A, ee = y ? A : 15, I = y ? 0 : A, te = y ? A : 0, ne = b ? 15 : 20, re = y ? `M ${N} ${P + M} v ${A - M} h 15 v ${-(A - M)} a ${M} ${M} 0 0 0 -15 0 z` : `M ${N + M} ${P} h ${A - M} v 15 h ${-(A - M)} a ${M} ${M} 0 0 1 0 -15 z`;
@@ -34623,7 +34640,7 @@ function ni(e, t, n, r) {
34623
34640
  y2="${y ? P + .5 : P + ne}"
34624
34641
  stroke="#ffffff"
34625
34642
  />
34626
- `), N = Zr, P = Zr + D;
34643
+ `), N = ei, P = ei + D;
34627
34644
  for (let e = 0; e < S.length; e++, N += I, P += te) o.push(`
34628
34645
  <text
34629
34646
  x="${y ? N + 15 + 10 : N + (b ? A / 2 : A)}"
@@ -34633,7 +34650,7 @@ function ni(e, t, n, r) {
34633
34650
  font-size="${l}"
34634
34651
  fill="${u}"
34635
34652
  >
34636
- ${Cr(S[e])}
34653
+ ${Tr(S[e])}
34637
34654
  </text>
34638
34655
  `);
34639
34656
  }
@@ -34649,9 +34666,9 @@ function ni(e, t, n, r) {
34649
34666
  </svg>
34650
34667
  `;
34651
34668
  }
34652
- function ri(e, t, n, r) {
34669
+ function oi(e, t, n, r) {
34653
34670
  let i = t.categoricalColors[n];
34654
- if (i === void 0) return ei();
34671
+ if (i === void 0) return ri();
34655
34672
  let a = xr(i.values), o = Object.entries(i.colors).map(([e, n]) => ({
34656
34673
  color: e,
34657
34674
  label: n.title ?? a[e] ?? t.defaultGroupName,
@@ -34659,7 +34676,7 @@ function ri(e, t, n, r) {
34659
34676
  hidden: n.hidden,
34660
34677
  svg: ""
34661
34678
  })).filter((e) => !e.hidden).sort((e, t) => e.order - t.order);
34662
- return Yr({
34679
+ return Qr({
34663
34680
  type: "manualLegend",
34664
34681
  id: e.id,
34665
34682
  name: e.name,
@@ -34667,20 +34684,20 @@ function ri(e, t, n, r) {
34667
34684
  stacking: e.stacking ?? "vertical",
34668
34685
  layout: e.layout ?? "vertical",
34669
34686
  title: e.title ?? "",
34670
- titleFont: e.titleFont ?? Xr,
34687
+ titleFont: e.titleFont ?? $r,
34671
34688
  titleFontColor: e.titleFontColor ?? "#000000",
34672
34689
  titleFontSize: e.titleFontSize ?? 14,
34673
- entryFont: e.labelFont ?? Xr,
34690
+ entryFont: e.labelFont ?? $r,
34674
34691
  entryFontColor: e.labelFontColor ?? "#000000",
34675
34692
  entryFontSize: e.labelFontSize ?? 13,
34676
34693
  entryShape: "rectangle",
34677
34694
  entries: o,
34678
34695
  background: e.background ?? "#ffffff",
34679
34696
  showBackground: e.showBackground ?? !1
34680
- }, Xr, r);
34697
+ }, $r, r);
34681
34698
  }
34682
- function ii(e) {
34683
- let { decimal: t, group: n } = ai();
34699
+ function si(e) {
34700
+ let { decimal: t, group: n } = ci();
34684
34701
  return bn({
34685
34702
  decimal: t,
34686
34703
  thousands: n,
@@ -34688,7 +34705,7 @@ function ii(e) {
34688
34705
  currency: ["", ""]
34689
34706
  }).format(e);
34690
34707
  }
34691
- function ai() {
34708
+ function ci() {
34692
34709
  let e = new Intl.NumberFormat(navigator.languages).formatToParts(1000.1), t = e.find((e) => e.type === "decimal")?.value, n = e.find((e) => e.type === "group")?.value;
34693
34710
  return t !== void 0 && n !== void 0 ? {
34694
34711
  decimal: t,
@@ -34700,23 +34717,23 @@ function ai() {
34700
34717
  }
34701
34718
  //#endregion
34702
34719
  //#region src/adornments/manualLegend.ts
34703
- function oi(e, t, n, r) {
34720
+ function li(e, t, n, r) {
34704
34721
  let i = document.createElement("div");
34705
34722
  i.className = "adornment", e.showBackground && (i.style.boxShadow = "0 0 7px 0 rgba(33, 37, 41, 0.25)", i.style.borderRadius = "10px");
34706
34723
  let a = "ArialMT", o = [e.titleFont ?? a, e.entryFont ?? a];
34707
- return wr(Array.from(new Set(o)), t, n).then(() => i.innerHTML = Yr(e, a, r)), i;
34724
+ return Er(Array.from(new Set(o)), t, n).then(() => i.innerHTML = Qr(e, a, r)), i;
34708
34725
  }
34709
34726
  //#endregion
34710
34727
  //#region src/adornments/northArrow.ts
34711
- function si(e, t, n) {
34728
+ function ui(e, t, n) {
34712
34729
  let r = document.createElement("div");
34713
34730
  r.className = "adornment";
34714
34731
  let i = (e.scale ?? 1) * 30, a = i * n;
34715
34732
  return r.style.cssText = `width: ${a}px; height: ${a}px`, t.on("move", () => {
34716
- r.innerHTML = ci(t, i, n);
34717
- }), r.innerHTML = ci(t, i, n), r;
34733
+ r.innerHTML = di(t, i, n);
34734
+ }), r.innerHTML = di(t, i, n), r;
34718
34735
  }
34719
- function ci(e, t, n) {
34736
+ function di(e, t, n) {
34720
34737
  let r = e.getBearing(), i = e.getPitch();
34721
34738
  return `
34722
34739
  <svg class="adornment-svg" width="${t * n}" height="${t * n}" viewBox="-5 -5 30 30" xmlns="http://www.w3.org/2000/svg">
@@ -34729,64 +34746,59 @@ function ci(e, t, n) {
34729
34746
  `;
34730
34747
  }
34731
34748
  //#endregion
34732
- //#region src/utils/browser.ts
34733
- function li() {
34734
- return navigator.userAgent.toLowerCase().indexOf("mobile") >= 0;
34735
- }
34736
- //#endregion
34737
34749
  //#region src/images/plus.svg?raw
34738
- var ui = "<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", di = "<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";
34750
+ var fi = "<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", pi = "<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";
34739
34751
  //#endregion
34740
34752
  //#region src/controls/controls.ts
34741
- function fi(e) {
34753
+ function mi(e) {
34742
34754
  let t = document.createElement("button");
34743
34755
  return t.className = e.className, t.innerHTML = `${e.content}`, t.addEventListener("click", e.onClick), t;
34744
34756
  }
34745
34757
  //#endregion
34746
34758
  //#region src/controls/zoomControls.ts
34747
- function pi(e) {
34748
- return fi({
34759
+ function hi(e) {
34760
+ return mi({
34749
34761
  type: "button",
34750
34762
  className: "control-button zoom-in-button",
34751
- content: ui,
34763
+ content: fi,
34752
34764
  onClick: () => e.zoomIn()
34753
34765
  });
34754
34766
  }
34755
- function mi(e) {
34756
- return fi({
34767
+ function gi(e) {
34768
+ return mi({
34757
34769
  type: "button",
34758
34770
  className: "control-button zoom-out-button",
34759
- content: di,
34771
+ content: pi,
34760
34772
  onClick: () => e.zoomOut()
34761
34773
  });
34762
34774
  }
34763
34775
  //#endregion
34764
34776
  //#region src/images/full-screen.svg?raw
34765
- var hi = "<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";
34777
+ var _i = "<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";
34766
34778
  //#endregion
34767
34779
  //#region src/utils/fullscreen.ts
34768
- function gi() {
34780
+ function vi() {
34769
34781
  return !!(document.fullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled || document.webkitFullscreenEnabled);
34770
34782
  }
34771
- function _i(e) {
34783
+ function yi(e) {
34772
34784
  return document.fullscreenElement === e || document.webkitFullscreenElement === e || document.mozFullScreenElement === e || document.msFullscreenElement === e;
34773
34785
  }
34774
- function vi(e) {
34786
+ function bi(e) {
34775
34787
  e.requestFullscreen ? e.requestFullscreen() : e.mozRequestFullScreen ? e.mozRequestFullScreen() : e.msRequestFullscreen ? e.msRequestFullscreen() : e.webkitRequestFullscreen && e.webkitRequestFullscreen();
34776
34788
  }
34777
- function yi() {
34789
+ function xi() {
34778
34790
  document.exitFullscreen ? document.exitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.msExitFullscreen ? document.msExitFullscreen() : document.webkitCancelFullScreen && document.webkitCancelFullScreen();
34779
34791
  }
34780
34792
  //#endregion
34781
34793
  //#region src/controls/fullscreenControls.ts
34782
- function bi(e) {
34783
- return fi({
34794
+ function Si(e) {
34795
+ return mi({
34784
34796
  type: "button",
34785
34797
  className: "control-button fullscreen-control-button",
34786
- content: hi,
34798
+ content: _i,
34787
34799
  onClick: () => {
34788
34800
  let t = e.getContainer();
34789
- if (gi()) _i(t) ? yi() : vi(t);
34801
+ if (vi()) yi(t) ? xi() : bi(t);
34790
34802
  else {
34791
34803
  let e = document.location.href;
34792
34804
  e += e.includes("?") ? "&" : "?", e += "close-tab", window.open(e, "_blank");
@@ -34796,10 +34808,10 @@ function bi(e) {
34796
34808
  }
34797
34809
  //#endregion
34798
34810
  //#region src/images/geolocation.svg?raw
34799
- var xi = "<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", Si = "<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", Ci = "<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", wi = (e) => {
34800
- let t = 2 * window.devicePixelRatio, n = new Fr(e).getMapLibreImageKey(Ci, t);
34811
+ var Ci = "<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", wi = "<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", Ti = "<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", Ei = (e) => {
34812
+ let t = 2 * window.devicePixelRatio, n = new Rr(e).getMapLibreImageKey(Ti, t);
34801
34813
  e.setLayoutProperty("location-dot", "icon-image", n);
34802
- }, Ti = (e) => {
34814
+ }, Di = (e) => {
34803
34815
  e.getSource("location-circle") || e.addSource("location-circle", {
34804
34816
  type: "geojson",
34805
34817
  data: {
@@ -34836,8 +34848,8 @@ var xi = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentCo
34836
34848
  "mc-name": "location dot",
34837
34849
  "mc-skip-load": !0
34838
34850
  }
34839
- }, "mc-before-names"), wi(e);
34840
- }, Ei = (e, t, n) => {
34851
+ }, "mc-before-names"), Ei(e);
34852
+ }, Oi = (e, t, n) => {
34841
34853
  let r = e.getSource("location-dot");
34842
34854
  r && r.setData({
34843
34855
  type: "Feature",
@@ -34847,7 +34859,7 @@ var xi = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentCo
34847
34859
  },
34848
34860
  properties: {}
34849
34861
  });
34850
- }, Di = (e, t, n) => {
34862
+ }, ki = (e, t, n) => {
34851
34863
  let r = n / 1e3, i = [], a = r / (111.32 * Math.cos(t * Math.PI / 180)), o = r / 110.574;
34852
34864
  for (let n = 0; n < 64; n++) {
34853
34865
  let r = n / 64 * (2 * Math.PI), s = a * Math.cos(r), c = o * Math.sin(r);
@@ -34863,7 +34875,7 @@ var xi = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentCo
34863
34875
  }
34864
34876
  }]
34865
34877
  };
34866
- }, Oi = () => {
34878
+ }, Ai = () => {
34867
34879
  let e = document.querySelector(".map"), t = document.createElement("div");
34868
34880
  t.classList.add("location-notification"), t.textContent = "Geolocation is not available", e?.appendChild(t), setTimeout(() => {
34869
34881
  e?.removeChild(t);
@@ -34871,7 +34883,7 @@ var xi = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentCo
34871
34883
  };
34872
34884
  //#endregion
34873
34885
  //#region src/controls/geolocationControls.ts
34874
- function ki(e) {
34886
+ function ji(e) {
34875
34887
  let t = !1, n = (e) => {
34876
34888
  let n = document.querySelector(".geolocation-button"), r = n?.querySelector(".geolocation-icon"), i = n?.querySelector(".locating-icon");
34877
34889
  r && i && (r.classList.toggle("active", !e), i.classList.toggle("active", e)), t = e;
@@ -34883,21 +34895,21 @@ function ki(e) {
34883
34895
  duration: 1e3
34884
34896
  }) : e.setCenter && e.setCenter(o);
34885
34897
  let s = e.getSource("location-circle");
34886
- s && s.setData(Di(r, i, a / 2)), Ei(e, r, i), e.once("moveend", () => n(!1));
34898
+ s && s.setData(ki(r, i, a / 2)), Oi(e, r, i), e.once("moveend", () => n(!1));
34887
34899
  }, i = (e) => {
34888
34900
  console.error("Geolocation error:", e), n(!1);
34889
34901
  };
34890
- return fi({
34902
+ return mi({
34891
34903
  type: "button",
34892
34904
  className: "control-button geolocation-button",
34893
34905
  content: `
34894
- <div class="location-icon geolocation-icon active">${xi}</div>
34895
- <div class="location-icon locating-icon">${Si}</div>
34906
+ <div class="location-icon geolocation-icon active">${Ci}</div>
34907
+ <div class="location-icon locating-icon">${wi}</div>
34896
34908
  `,
34897
34909
  onClick: () => {
34898
34910
  if (!t) {
34899
- if (e.getSource("location-circle") || Ti(e), n(!0), !navigator.geolocation) {
34900
- Oi(), n(!1);
34911
+ if (e.getSource("location-circle") || Di(e), n(!0), !navigator.geolocation) {
34912
+ Ai(), n(!1);
34901
34913
  return;
34902
34914
  }
34903
34915
  navigator.geolocation.getCurrentPosition(r, i, {
@@ -34910,14 +34922,14 @@ function ki(e) {
34910
34922
  }
34911
34923
  //#endregion
34912
34924
  //#region src/images/refresh.svg?raw
34913
- var Ai = "<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";
34925
+ var Mi = "<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";
34914
34926
  //#endregion
34915
34927
  //#region src/controls/refreshMapControls.ts
34916
- function ji(e, t) {
34917
- return fi({
34928
+ function Ni(e, t) {
34929
+ return mi({
34918
34930
  type: "button",
34919
34931
  className: "control-button refresh-button",
34920
- content: Ai,
34932
+ content: Mi,
34921
34933
  onClick: () => {
34922
34934
  e.easeTo({
34923
34935
  center: t.center,
@@ -34930,7 +34942,7 @@ function ji(e, t) {
34930
34942
  }
34931
34943
  //#endregion
34932
34944
  //#region src/images/search.svg?raw
34933
- var Mi = "<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", Ni = "<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", Pi = {
34945
+ var Pi = "<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", Fi = "<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", Ii = {
34934
34946
  da_DK: {
34935
34947
  search: "Search",
34936
34948
  videoAlert: "The video will only work when you publish the map",
@@ -34981,17 +34993,17 @@ var Mi = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" v
34981
34993
  macHelpText: "Gebruik ⌘ + Scroll om de kaart te zoomen"
34982
34994
  }
34983
34995
  };
34984
- function Fi() {
34985
- let e = navigator.language.replace("-", "_"), t = Object.keys(Pi);
34996
+ function Li() {
34997
+ let e = navigator.language.replace("-", "_"), t = Object.keys(Ii);
34986
34998
  return t.find((t) => t === e) ?? t.find((t) => t.split("_")[0] === e.split("_")[0]) ?? "en_GB";
34987
34999
  }
34988
- var Ii = Fi();
34989
- function Li(e) {
34990
- return Pi[Ii][e] ?? e;
35000
+ var Ri = Li();
35001
+ function zi(e) {
35002
+ return Ii[Ri][e] ?? e;
34991
35003
  }
34992
35004
  //#endregion
34993
35005
  //#region src/utils/graphhopper.ts
34994
- var Ri = class {
35006
+ var Bi = class {
34995
35007
  async getLocationInBounds(e, t, n = 10) {
34996
35008
  try {
34997
35009
  let r = await this._callGraphHopper({
@@ -35006,7 +35018,7 @@ var Ri = class {
35006
35018
  }
35007
35019
  async _callGraphHopper(e) {
35008
35020
  let t = new URLSearchParams(e);
35009
- t.append("key", "c5c40ac9-ed73-4e20-aed6-cfe495604ca8"), t.append("locale", Ii.slice(0, 2));
35021
+ t.append("key", "c5c40ac9-ed73-4e20-aed6-cfe495604ca8"), t.append("locale", Ri.slice(0, 2));
35010
35022
  let n = { headers: { Accept: "application/json" } }, r = `https://graphhopper.com/api/1/geocode?${t}`;
35011
35023
  return await (await fetch(r, n)).json();
35012
35024
  }
@@ -35033,7 +35045,7 @@ var Ri = class {
35033
35045
  ].filter(Boolean).join(", ")
35034
35046
  }));
35035
35047
  }
35036
- }, zi = class {
35048
+ }, Vi = class {
35037
35049
  map;
35038
35050
  mapContainer;
35039
35051
  container;
@@ -35043,7 +35055,7 @@ var Ri = class {
35043
35055
  inputWrapper;
35044
35056
  button;
35045
35057
  isOpen = !1;
35046
- geocoder = new Ri();
35058
+ geocoder = new Bi();
35047
35059
  suggestions = [];
35048
35060
  items = [];
35049
35061
  index = 0;
@@ -35052,9 +35064,9 @@ var Ri = class {
35052
35064
  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();
35053
35065
  }
35054
35066
  init() {
35055
- 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 = Li("search"), this.button.innerHTML = Mi;
35067
+ 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 = zi("search"), this.button.innerHTML = Pi;
35056
35068
  let e = document.createElement("button");
35057
- e.className = "geocoder-clear", e.innerHTML = Ni;
35069
+ e.className = "geocoder-clear", e.innerHTML = Fi;
35058
35070
  let t = document.createElement("div");
35059
35071
  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;
35060
35072
  }
@@ -35137,25 +35149,25 @@ var Ri = class {
35137
35149
  };
35138
35150
  //#endregion
35139
35151
  //#region src/controls/webControls.ts
35140
- function Bi(e, t, n) {
35152
+ function Hi(e, t, n) {
35141
35153
  let r = document.createElement("div");
35142
35154
  r.classList.add("web-control", "adornment");
35143
35155
  let i = e.buttons.flatMap((e) => e === "zoom" ? ["zoomIn", "zoomOut"] : e);
35144
- return (li() ? i.filter((e) => e !== "zoomIn" && e !== "zoomOut") : i).forEach((e) => {
35156
+ return (Cr() ? i.filter((e) => e !== "zoomIn" && e !== "zoomOut") : i).forEach((e) => {
35145
35157
  let i;
35146
- if (e === "zoomIn") i = pi(t);
35147
- else if (e === "zoomOut") i = mi(t);
35148
- else if (e === "fullscreen") i = bi(t);
35149
- else if (e === "geolocation") i = ki(t);
35150
- else if (e === "refresh") i = ji(t, n);
35151
- else if (e === "search") i = new zi(t).init();
35158
+ if (e === "zoomIn") i = hi(t);
35159
+ else if (e === "zoomOut") i = gi(t);
35160
+ else if (e === "fullscreen") i = Si(t);
35161
+ else if (e === "geolocation") i = ji(t);
35162
+ else if (e === "refresh") i = Ni(t, n);
35163
+ else if (e === "search") i = new Vi(t).init();
35152
35164
  else return;
35153
35165
  r.appendChild(i);
35154
35166
  }), r;
35155
35167
  }
35156
35168
  //#endregion
35157
35169
  //#region src/adornments/copyright.ts
35158
- var Vi = {
35170
+ var Ui = {
35159
35171
  here: {
35160
35172
  href: "https://www.here.com/",
35161
35173
  label: "© HERE 2025"
@@ -35169,16 +35181,16 @@ var Vi = {
35169
35181
  label: "© OpenStreetMap"
35170
35182
  }
35171
35183
  };
35172
- function Hi(e, t, n) {
35184
+ function Wi(e, t, n) {
35173
35185
  let r = document.createElement("div");
35174
35186
  r.className = "adornment";
35175
35187
  let i = () => {
35176
- r.innerHTML = Gi(t, e, n);
35188
+ r.innerHTML = qi(t, e, n);
35177
35189
  };
35178
35190
  return i(), t.on("attributionchange", i), t.on("zoomend", i), r;
35179
35191
  }
35180
- function Ui(e) {
35181
- let t = Object.values(e.style.sourceCaches), n = [Vi.mapcreator], r = {
35192
+ function Gi(e) {
35193
+ let t = Object.values(e.style.sourceCaches), n = [Ui.mapcreator], r = {
35182
35194
  osm: !1,
35183
35195
  here: !1
35184
35196
  };
@@ -35189,16 +35201,16 @@ function Ui(e) {
35189
35201
  "attribution" in e && typeof e.attribution == "string" && (e.attribution.includes("OpenStreetMap") && (r.osm = !0), e.attribution.includes("HERE") && (r.here = !0));
35190
35202
  }
35191
35203
  }
35192
- return r.osm && n.push(Vi.openStreetMap), r.here && n.push(Vi.here), n;
35204
+ return r.osm && n.push(Ui.openStreetMap), r.here && n.push(Ui.here), n;
35193
35205
  }
35194
- function Wi(e, t, n) {
35206
+ function Ki(e, t, n) {
35195
35207
  let r = document.createElement("span");
35196
35208
  r.style.fontFamily = t, r.style.fontSize = `${n}px`, r.style.position = "absolute", r.style.visibility = "hidden", r.innerText = e, document.body.appendChild(r);
35197
35209
  let i = Math.max(r.offsetWidth, 1);
35198
35210
  return r.remove(), i;
35199
35211
  }
35200
- function Gi(e, t, n) {
35201
- let { color: r = "#000000", font: i = "Arial, sans-serif", fontSize: a = 10, orientation: o = "horizontal", position: s } = t, c = Ui(e), l = Wi(c.map(({ label: e }) => e).join(" "), i, a), u = a * 1.2, d = o === "vertical", f = ["top_left", "bottom_left"].includes(s), p = d ? u : l, m = d ? l : u, h = d ? f ? -90 : 90 : 0, g = d ? f ? .38 * a : .3 * a : .38 * a, _ = c.map((e) => `<a href="${e.href}" target="_blank">${e.label}</a>`).join(" ");
35212
+ function qi(e, t, n) {
35213
+ let { color: r = "#000000", font: i = "Arial, sans-serif", fontSize: a = 10, orientation: o = "horizontal", position: s } = t, c = Gi(e), l = Ki(c.map(({ label: e }) => e).join(" "), i, a), u = a * 1.2, d = o === "vertical", f = ["top_left", "bottom_left"].includes(s), p = d ? u : l, m = d ? l : u, h = d ? f ? -90 : 90 : 0, g = d ? f ? .38 * a : .3 * a : .38 * a, _ = c.map((e) => `<a href="${e.href}" target="_blank">${e.label}</a>`).join(" ");
35202
35214
  return `
35203
35215
  <svg
35204
35216
  class="adornment-svg"
@@ -35223,15 +35235,15 @@ function Gi(e, t, n) {
35223
35235
  }
35224
35236
  //#endregion
35225
35237
  //#region node_modules/@turf/area/dist/esm/index.js
35226
- function Ki(e) {
35227
- return Hn(e, (e, t) => e + qi(t), 0);
35238
+ function Ji(e) {
35239
+ return Hn(e, (e, t) => e + Yi(t), 0);
35228
35240
  }
35229
- function qi(e) {
35241
+ function Yi(e) {
35230
35242
  let t = 0, n;
35231
35243
  switch (e.type) {
35232
- case "Polygon": return Ji(e.coordinates);
35244
+ case "Polygon": return Xi(e.coordinates);
35233
35245
  case "MultiPolygon":
35234
- for (n = 0; n < e.coordinates.length; n++) t += Ji(e.coordinates[n]);
35246
+ for (n = 0; n < e.coordinates.length; n++) t += Xi(e.coordinates[n]);
35235
35247
  return t;
35236
35248
  case "Point":
35237
35249
  case "MultiPoint":
@@ -35240,34 +35252,34 @@ function qi(e) {
35240
35252
  }
35241
35253
  return 0;
35242
35254
  }
35243
- function Ji(e) {
35255
+ function Xi(e) {
35244
35256
  let t = 0;
35245
35257
  if (e && e.length > 0) {
35246
- t += Math.abs(Zi(e[0]));
35247
- for (let n = 1; n < e.length; n++) t -= Math.abs(Zi(e[n]));
35258
+ t += Math.abs($i(e[0]));
35259
+ for (let n = 1; n < e.length; n++) t -= Math.abs($i(e[n]));
35248
35260
  }
35249
35261
  return t;
35250
35262
  }
35251
- var Yi = Nn * Nn / 2, Xi = Math.PI / 180;
35252
- function Zi(e) {
35263
+ var Zi = Nn * Nn / 2, Qi = Math.PI / 180;
35264
+ function $i(e) {
35253
35265
  let t = e.length - 1;
35254
35266
  if (t <= 2) return 0;
35255
35267
  let n = 0, r = 0;
35256
35268
  for (; r < t;) {
35257
- 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] * Xi, c = a[1] * Xi, l = o[0] * Xi;
35269
+ 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] * Qi, c = a[1] * Qi, l = o[0] * Qi;
35258
35270
  n += (l - s) * Math.sin(c), r++;
35259
35271
  }
35260
- return n * Yi;
35272
+ return n * Zi;
35261
35273
  }
35262
35274
  //#endregion
35263
35275
  //#region node_modules/topojson-client/src/identity.js
35264
- function Qi(e) {
35276
+ function ea(e) {
35265
35277
  return e;
35266
35278
  }
35267
35279
  //#endregion
35268
35280
  //#region node_modules/topojson-client/src/transform.js
35269
- function $i(e) {
35270
- if (e == null) return Qi;
35281
+ function ta(e) {
35282
+ if (e == null) return ea;
35271
35283
  var t, n, r = e.scale[0], i = e.scale[1], a = e.translate[0], o = e.translate[1];
35272
35284
  return function(e, s) {
35273
35285
  s || (t = n = 0);
@@ -35278,21 +35290,21 @@ function $i(e) {
35278
35290
  }
35279
35291
  //#endregion
35280
35292
  //#region node_modules/topojson-client/src/reverse.js
35281
- function ea(e, t) {
35293
+ function na(e, t) {
35282
35294
  for (var n, r = e.length, i = r - t; i < --r;) n = e[i], e[i++] = e[r], e[r] = n;
35283
35295
  }
35284
35296
  //#endregion
35285
35297
  //#region node_modules/topojson-client/src/feature.js
35286
- function ta(e, t) {
35298
+ function ra(e, t) {
35287
35299
  return typeof t == "string" && (t = e.objects[t]), t.type === "GeometryCollection" ? {
35288
35300
  type: "FeatureCollection",
35289
35301
  features: t.geometries.map(function(t) {
35290
- return na(e, t);
35302
+ return ia(e, t);
35291
35303
  })
35292
- } : na(e, t);
35304
+ } : ia(e, t);
35293
35305
  }
35294
- function na(e, t) {
35295
- var n = t.id, r = t.bbox, i = t.properties == null ? {} : t.properties, a = ra(e, t);
35306
+ function ia(e, t) {
35307
+ var n = t.id, r = t.bbox, i = t.properties == null ? {} : t.properties, a = aa(e, t);
35296
35308
  return n == null && r == null ? {
35297
35309
  type: "Feature",
35298
35310
  properties: i,
@@ -35310,12 +35322,12 @@ function na(e, t) {
35310
35322
  geometry: a
35311
35323
  };
35312
35324
  }
35313
- function ra(e, t) {
35314
- var n = $i(e.transform), r = e.arcs;
35325
+ function aa(e, t) {
35326
+ var n = ta(e.transform), r = e.arcs;
35315
35327
  function i(e, t) {
35316
35328
  t.length && t.pop();
35317
35329
  for (var i = r[e < 0 ? ~e : e], a = 0, o = i.length; a < o; ++a) t.push(n(i[a], a));
35318
- e < 0 && ea(t, o);
35330
+ e < 0 && na(t, o);
35319
35331
  }
35320
35332
  function a(e) {
35321
35333
  return n(e);
@@ -35367,7 +35379,7 @@ function ra(e, t) {
35367
35379
  }
35368
35380
  //#endregion
35369
35381
  //#region node_modules/bignumber.js/bignumber.mjs
35370
- var ia = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, aa = Math.ceil, oa = Math.floor, sa = "[BigNumber Error] ", Y = sa + "Number primitive has more than 15 significant digits: ", ca = 0x5af3107a4000, X = 14, la = 9007199254740991, ua = [
35382
+ var oa = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, sa = Math.ceil, Y = Math.floor, ca = "[BigNumber Error] ", la = ca + "Number primitive has more than 15 significant digits: ", ua = 0x5af3107a4000, X = 14, da = 9007199254740991, fa = [
35371
35383
  1,
35372
35384
  10,
35373
35385
  100,
@@ -35382,8 +35394,8 @@ var ia = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, aa = Math.ceil, oa = Math
35382
35394
  1e11,
35383
35395
  0xe8d4a51000,
35384
35396
  0x9184e72a000
35385
- ], da = 1e7, fa = 1e9;
35386
- function Z(e) {
35397
+ ], Z = 1e7, pa = 1e9;
35398
+ function ma(e) {
35387
35399
  var t, n, r, i = v.prototype = {
35388
35400
  constructor: v,
35389
35401
  toString: null,
@@ -35414,15 +35426,15 @@ function Z(e) {
35414
35426
  }
35415
35427
  h = String(e);
35416
35428
  } else {
35417
- if (!ia.test(h = String(e))) return r(y, h, p);
35429
+ if (!oa.test(h = String(e))) return r(y, h, p);
35418
35430
  y.s = h.charCodeAt(0) == 45 ? (h = h.slice(1), -1) : 1;
35419
35431
  }
35420
35432
  (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);
35421
35433
  } else {
35422
- if (ga(t, 2, g.length, "Base"), t == 10 && _) return y = new v(e), S(y, o + y.e + 1, s);
35434
+ if (va(t, 2, g.length, "Base"), t == 10 && _) return y = new v(e), S(y, o + y.e + 1, s);
35423
35435
  if (h = String(e), p = typeof e == "number") {
35424
35436
  if (e * 0 != 0) return r(y, h, p, t);
35425
- if (y.s = 1 / e < 0 ? (h = h.slice(1), -1) : 1, v.DEBUG && h.replace(/^0\.0*|\./, "").length > 15) throw Error(Y + e);
35437
+ if (y.s = 1 / e < 0 ? (h = h.slice(1), -1) : 1, v.DEBUG && h.replace(/^0\.0*|\./, "").length > 15) throw Error(la + e);
35426
35438
  } else y.s = h.charCodeAt(0) === 45 ? (h = h.slice(1), -1) : 1;
35427
35439
  for (i = g.slice(0, t), l = f = 0, m = h.length; f < m; f++) if (i.indexOf(a = h.charAt(f)) < 0) {
35428
35440
  if (a == ".") {
@@ -35441,7 +35453,7 @@ function Z(e) {
35441
35453
  for (f = 0; h.charCodeAt(f) === 48; f++);
35442
35454
  for (m = h.length; h.charCodeAt(--m) === 48;);
35443
35455
  if (h = h.slice(f, ++m)) {
35444
- if (m -= f, p && v.DEBUG && m > 15 && (e > la || e !== oa(e))) throw Error(Y + y.s * e);
35456
+ if (m -= f, p && v.DEBUG && m > 15 && (e > da || e !== Y(e))) throw Error(la + y.s * e);
35445
35457
  if ((l = l - f - 1) > d) y.c = y.e = null;
35446
35458
  else if (l < u) y.c = [y.e = 0];
35447
35459
  else {
@@ -35454,21 +35466,21 @@ function Z(e) {
35454
35466
  }
35455
35467
  } else y.c = [y.e = 0];
35456
35468
  }
35457
- v.clone = Z, 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) {
35469
+ v.clone = ma, 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) {
35458
35470
  var t, n;
35459
35471
  if (e != null) if (typeof e == "object") {
35460
- if (e.hasOwnProperty(t = "DECIMAL_PLACES") && (n = e[t], ga(n, 0, fa, t), o = n), e.hasOwnProperty(t = "ROUNDING_MODE") && (n = e[t], ga(n, 0, 8, t), s = n), e.hasOwnProperty(t = "EXPONENTIAL_AT") && (n = e[t], n && n.pop ? (ga(n[0], -fa, 0, t), ga(n[1], 0, fa, t), c = n[0], l = n[1]) : (ga(n, -fa, fa, t), c = -(l = n < 0 ? -n : n))), e.hasOwnProperty(t = "RANGE")) if (n = e[t], n && n.pop) ga(n[0], -fa, -1, t), ga(n[1], 1, fa, t), u = n[0], d = n[1];
35461
- else if (ga(n, -fa, fa, t), n) u = -(d = n < 0 ? -n : n);
35462
- else throw Error(sa + t + " cannot be zero: " + n);
35472
+ if (e.hasOwnProperty(t = "DECIMAL_PLACES") && (n = e[t], va(n, 0, pa, t), o = n), e.hasOwnProperty(t = "ROUNDING_MODE") && (n = e[t], va(n, 0, 8, t), s = n), e.hasOwnProperty(t = "EXPONENTIAL_AT") && (n = e[t], n && n.pop ? (va(n[0], -pa, 0, t), va(n[1], 0, pa, t), c = n[0], l = n[1]) : (va(n, -pa, pa, t), c = -(l = n < 0 ? -n : n))), e.hasOwnProperty(t = "RANGE")) if (n = e[t], n && n.pop) va(n[0], -pa, -1, t), va(n[1], 1, pa, t), u = n[0], d = n[1];
35473
+ else if (va(n, -pa, pa, t), n) u = -(d = n < 0 ? -n : n);
35474
+ else throw Error(ca + t + " cannot be zero: " + n);
35463
35475
  if (e.hasOwnProperty(t = "CRYPTO")) if (n = e[t], n === !!n) if (n) if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes)) f = n;
35464
- else throw f = !n, Error(sa + "crypto unavailable");
35476
+ else throw f = !n, Error(ca + "crypto unavailable");
35465
35477
  else f = n;
35466
- else throw Error(sa + t + " not true or false: " + n);
35467
- if (e.hasOwnProperty(t = "MODULO_MODE") && (n = e[t], ga(n, 0, 9, t), p = n), e.hasOwnProperty(t = "POW_PRECISION") && (n = e[t], ga(n, 0, fa, t), m = n), e.hasOwnProperty(t = "FORMAT")) if (n = e[t], typeof n == "object") h = n;
35468
- else throw Error(sa + t + " not an object: " + n);
35478
+ else throw Error(ca + t + " not true or false: " + n);
35479
+ if (e.hasOwnProperty(t = "MODULO_MODE") && (n = e[t], va(n, 0, 9, t), p = n), e.hasOwnProperty(t = "POW_PRECISION") && (n = e[t], va(n, 0, pa, t), m = n), e.hasOwnProperty(t = "FORMAT")) if (n = e[t], typeof n == "object") h = n;
35480
+ else throw Error(ca + t + " not an object: " + n);
35469
35481
  if (e.hasOwnProperty(t = "ALPHABET")) if (n = e[t], typeof n == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(n)) _ = n.slice(0, 10) == "0123456789", g = n;
35470
- else throw Error(sa + t + " invalid: " + n);
35471
- } else throw Error(sa + "Object expected: " + e);
35482
+ else throw Error(ca + t + " invalid: " + n);
35483
+ } else throw Error(ca + "Object expected: " + e);
35472
35484
  return {
35473
35485
  DECIMAL_PLACES: o,
35474
35486
  ROUNDING_MODE: s,
@@ -35485,39 +35497,39 @@ function Z(e) {
35485
35497
  if (!v.DEBUG) return !0;
35486
35498
  var t, n, r = e.c, i = e.e, a = e.s;
35487
35499
  out: if ({}.toString.call(r) == "[object Array]") {
35488
- if ((a === 1 || a === -1) && i >= -fa && i <= fa && i === oa(i)) {
35500
+ if ((a === 1 || a === -1) && i >= -pa && i <= pa && i === Y(i)) {
35489
35501
  if (r[0] === 0) {
35490
35502
  if (i === 0 && r.length === 1) return !0;
35491
35503
  break out;
35492
35504
  }
35493
35505
  if (t = (i + 1) % X, t < 1 && (t += X), String(r[0]).length == t) {
35494
- for (t = 0; t < r.length; t++) if (n = r[t], n < 0 || n >= ca || n !== oa(n)) break out;
35506
+ for (t = 0; t < r.length; t++) if (n = r[t], n < 0 || n >= ua || n !== Y(n)) break out;
35495
35507
  if (n !== 0) return !0;
35496
35508
  }
35497
35509
  }
35498
35510
  } else if (r === null && i === null && (a === null || a === 1 || a === -1)) return !0;
35499
- throw Error(sa + "Invalid BigNumber: " + e);
35511
+ throw Error(ca + "Invalid BigNumber: " + e);
35500
35512
  }, v.maximum = v.max = function() {
35501
35513
  return b(arguments, -1);
35502
35514
  }, v.minimum = v.min = function() {
35503
35515
  return b(arguments, 1);
35504
35516
  }, v.random = (function() {
35505
35517
  var e = 9007199254740992, t = Math.random() * e & 2097151 ? function() {
35506
- return oa(Math.random() * e);
35518
+ return Y(Math.random() * e);
35507
35519
  } : function() {
35508
35520
  return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
35509
35521
  };
35510
35522
  return function(e) {
35511
35523
  var n, r, i, s, c, l = 0, u = [], d = new v(a);
35512
- if (e == null ? e = o : ga(e, 0, fa), s = aa(e / X), f) if (crypto.getRandomValues) {
35524
+ if (e == null ? e = o : va(e, 0, pa), s = sa(e / X), f) if (crypto.getRandomValues) {
35513
35525
  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);
35514
35526
  l = s / 2;
35515
35527
  } else if (crypto.randomBytes) {
35516
35528
  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);
35517
35529
  l = s / 7;
35518
- } else throw f = !1, Error(sa + "crypto unavailable");
35530
+ } else throw f = !1, Error(ca + "crypto unavailable");
35519
35531
  if (!f) for (; l < s;) c = t(), c < 9e15 && (u[l++] = c % 0x5af3107a4000);
35520
- for (s = u[--l], e %= X, s && e && (c = ua[X - e], u[l] = oa(s / c) * c); u[l] === 0; u.pop(), l--);
35532
+ for (s = u[--l], e %= X, s && e && (c = fa[X - e], u[l] = Y(s / c) * c); u[l] === 0; u.pop(), l--);
35521
35533
  if (l < 0) u = [i = 0];
35522
35534
  else {
35523
35535
  for (i = -1; u[0] === 0; u.splice(0, 1), i -= X);
@@ -35540,21 +35552,21 @@ function Z(e) {
35540
35552
  }
35541
35553
  return function(r, i, a, c, l) {
35542
35554
  var u, d, f, p, h, _, y, b, x = r.indexOf("."), S = o, C = s;
35543
- for (x >= 0 && (p = m, m = 0, r = r.replace(".", ""), b = new v(i), _ = b.pow(r.length - x), m = p, b.c = n(ya(ma(_.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());
35555
+ for (x >= 0 && (p = m, m = 0, r = r.replace(".", ""), b = new v(i), _ = b.pow(r.length - x), m = p, b.c = n(xa(ga(_.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());
35544
35556
  if (!y[0]) return u.charAt(0);
35545
- 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 ? ya(u.charAt(1), -S, u.charAt(0)) : u.charAt(0);
35557
+ 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 ? xa(u.charAt(1), -S, u.charAt(0)) : u.charAt(0);
35546
35558
  else {
35547
35559
  if (y.length = d, h) for (--a; ++y[--d] > a;) y[d] = 0, d || (++f, y = [1].concat(y));
35548
35560
  for (p = y.length; !y[--p];);
35549
35561
  for (x = 0, r = ""; x <= p; r += u.charAt(y[x++]));
35550
- r = ya(r, f, u.charAt(0));
35562
+ r = xa(r, f, u.charAt(0));
35551
35563
  }
35552
35564
  return r;
35553
35565
  };
35554
35566
  })(), t = (function() {
35555
35567
  function e(e, t, n) {
35556
- var r, i, a, o, s = 0, c = e.length, l = t % da, u = t / da | 0;
35557
- for (e = e.slice(); c--;) a = e[c] % da, o = e[c] / da | 0, r = u * a + o * l, i = l * a + r % da * da + s, s = (i / n | 0) + (r / da | 0) + u * o, e[c] = i % n;
35568
+ var r, i, a, o, s = 0, c = e.length, l = t % Z, u = t / Z | 0;
35569
+ for (e = e.slice(); c--;) a = e[c] % Z, o = e[c] / Z | 0, r = u * a + o * l, i = l * a + r % Z * Z + s, s = (i / n | 0) + (r / Z | 0) + u * o, e[c] = i % n;
35558
35570
  return s && (e = [s].concat(e)), e;
35559
35571
  }
35560
35572
  function t(e, t, n, r) {
@@ -35573,14 +35585,14 @@ function Z(e) {
35573
35585
  return function(r, i, a, o, s) {
35574
35586
  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;
35575
35587
  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);
35576
- for (h = new v(D), g = h.c = [], l = r.e - i.e, D = a + l + 1, s || (s = ca, l = pa(r.e / X) - pa(i.e / X), D = D / X | 0), u = 0; k[u] == (O[u] || 0); u++);
35588
+ for (h = new v(D), g = h.c = [], l = r.e - i.e, D = a + l + 1, s || (s = ua, l = ha(r.e / X) - ha(i.e / X), D = D / X | 0), u = 0; k[u] == (O[u] || 0); u++);
35577
35589
  if (k[u] > (O[u] || 0) && l--, D < 0) g.push(1), d = !0;
35578
35590
  else {
35579
- for (C = O.length, T = k.length, u = 0, D += 2, f = oa(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);
35591
+ for (C = O.length, T = k.length, u = 0, D += 2, f = Y(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);
35580
35592
  E = k.slice(), E = [0].concat(E), w = k[0], k[1] >= s / 2 && w++;
35581
35593
  do {
35582
35594
  if (f = 0, c = t(k, _, T, y), c < 0) {
35583
- if (b = _[0], T != y && (b = b * s + (_[1] || 0)), f = oa(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;
35595
+ if (b = _[0], T != y && (b = b * s + (_[1] || 0)), f = Y(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;
35584
35596
  else f == 0 && (c = f = 1), p = k.slice(), m = p.length;
35585
35597
  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;
35586
35598
  } else c === 0 && (f++, _ = [0]);
@@ -35588,7 +35600,7 @@ function Z(e) {
35588
35600
  } while ((x++ < C || _[0] != null) && D--);
35589
35601
  d = _[0] != null, g[0] || g.splice(0, 1);
35590
35602
  }
35591
- if (s == ca) {
35603
+ if (s == ua) {
35592
35604
  for (u = 1, D = g[0]; D >= 10; D /= 10, u++);
35593
35605
  S(h, a + (h.e = u + l * X - 1) + 1, o, d);
35594
35606
  } else h.e = l, h.r = +d;
@@ -35597,18 +35609,18 @@ function Z(e) {
35597
35609
  })();
35598
35610
  function y(e, t, n, r) {
35599
35611
  var i, a, o, u, d;
35600
- if (n == null ? n = s : ga(n, 0, 8), !e.c) return e.toString();
35601
- if (i = e.c[0], o = e.e, t == null) d = ma(e.c), d = r == 1 || r == 2 && (o <= c || o >= l) ? va(d, o) : ya(d, o, "0");
35602
- else if (e = S(new v(e), t, n), a = e.e, d = ma(e.c), u = d.length, r == 1 || r == 2 && (t <= a || a <= c)) {
35612
+ if (n == null ? n = s : va(n, 0, 8), !e.c) return e.toString();
35613
+ if (i = e.c[0], o = e.e, t == null) d = ga(e.c), d = r == 1 || r == 2 && (o <= c || o >= l) ? ba(d, o) : xa(d, o, "0");
35614
+ else if (e = S(new v(e), t, n), a = e.e, d = ga(e.c), u = d.length, r == 1 || r == 2 && (t <= a || a <= c)) {
35603
35615
  for (; u < t; d += "0", u++);
35604
- d = va(d, a);
35605
- } else if (t -= o + (r === 2 && a > o), d = ya(d, a, "0"), a + 1 > u) {
35616
+ d = ba(d, a);
35617
+ } else if (t -= o + (r === 2 && a > o), d = xa(d, a, "0"), a + 1 > u) {
35606
35618
  if (--t > 0) for (d += "."; t--; d += "0");
35607
35619
  } else if (t += a - u, t > 0) for (a + 1 == u && (d += "."); t--; d += "0");
35608
35620
  return e.s < 0 && i ? "-" + d : d;
35609
35621
  }
35610
35622
  function b(e, t) {
35611
- for (var n, r, i = 1, a = new v(e[0]); i < e.length; i++) r = new v(e[i]), (!r.s || (n = ha(a, r)) === t || n === 0 && a.s === t) && (a = r);
35623
+ for (var n, r, i = 1, a = new v(e[0]); i < e.length; i++) r = new v(e[i]), (!r.s || (n = _a(a, r)) === t || n === 0 && a.s === t) && (a = r);
35612
35624
  return a;
35613
35625
  }
35614
35626
  function x(e, t, n) {
@@ -35625,34 +35637,34 @@ function Z(e) {
35625
35637
  if (!s && (u = u.replace(e, function(e, t, n) {
35626
35638
  return l = (n = n.toLowerCase()) == "x" ? 16 : n == "b" ? 2 : 8, !c || c == l ? t : e;
35627
35639
  }), c && (l = c, u = u.replace(t, "$1").replace(n, "0.$1")), o != u)) return new v(u, l);
35628
- if (v.DEBUG) throw Error(sa + "Not a" + (c ? " base " + c : "") + " number: " + o);
35640
+ if (v.DEBUG) throw Error(ca + "Not a" + (c ? " base " + c : "") + " number: " + o);
35629
35641
  a.s = null;
35630
35642
  }
35631
35643
  a.c = a.e = null;
35632
35644
  };
35633
35645
  })();
35634
35646
  function S(e, t, n, r) {
35635
- var i, a, o, s, c, l, f, p = e.c, m = ua;
35647
+ var i, a, o, s, c, l, f, p = e.c, m = fa;
35636
35648
  if (p) {
35637
35649
  out: {
35638
35650
  for (i = 1, s = p[0]; s >= 10; s /= 10, i++);
35639
- if (a = t - i, a < 0) a += X, o = t, c = p[l = 0], f = oa(c / m[i - o - 1] % 10);
35640
- else if (l = aa((a + 1) / X), l >= p.length) if (r) {
35651
+ if (a = t - i, a < 0) a += X, o = t, c = p[l = 0], f = Y(c / m[i - o - 1] % 10);
35652
+ else if (l = sa((a + 1) / X), l >= p.length) if (r) {
35641
35653
  for (; p.length <= l; p.push(0));
35642
35654
  c = f = 0, i = 1, a %= X, o = a - X + 1;
35643
35655
  } else break out;
35644
35656
  else {
35645
35657
  for (c = s = p[l], i = 1; s >= 10; s /= 10, i++);
35646
- a %= X, o = a - X + i, f = o < 0 ? 0 : oa(c / m[i - o - 1] % 10);
35658
+ a %= X, o = a - X + i, f = o < 0 ? 0 : Y(c / m[i - o - 1] % 10);
35647
35659
  }
35648
35660
  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[(X - t % X) % X], e.e = -t || 0) : p[0] = e.e = 0, e;
35649
- if (a == 0 ? (p.length = l, s = 1, l--) : (p.length = l + 1, s = m[X - a], p[l] = o > 0 ? oa(c / m[i - o] % m[o]) * s : 0), r) for (;;) if (l == 0) {
35661
+ if (a == 0 ? (p.length = l, s = 1, l--) : (p.length = l + 1, s = m[X - a], p[l] = o > 0 ? Y(c / m[i - o] % m[o]) * s : 0), r) for (;;) if (l == 0) {
35650
35662
  for (a = 1, o = p[0]; o >= 10; o /= 10, a++);
35651
35663
  for (o = p[0] += s, s = 1; o >= 10; o /= 10, s++);
35652
- a != s && (e.e++, p[0] == ca && (p[0] = 1));
35664
+ a != s && (e.e++, p[0] == ua && (p[0] = 1));
35653
35665
  break;
35654
35666
  } else {
35655
- if (p[l] += s, p[l] != ca) break;
35667
+ if (p[l] += s, p[l] != ua) break;
35656
35668
  p[l--] = 0, s = 1;
35657
35669
  }
35658
35670
  for (a = p.length; p[--a] === 0; p.pop());
@@ -35663,18 +35675,18 @@ function Z(e) {
35663
35675
  }
35664
35676
  function C(e) {
35665
35677
  var t, n = e.e;
35666
- return n === null ? e.toString() : (t = ma(e.c), t = n <= c || n >= l ? va(t, n) : ya(t, n, "0"), e.s < 0 ? "-" + t : t);
35678
+ return n === null ? e.toString() : (t = ga(e.c), t = n <= c || n >= l ? ba(t, n) : xa(t, n, "0"), e.s < 0 ? "-" + t : t);
35667
35679
  }
35668
35680
  return i.absoluteValue = i.abs = function() {
35669
35681
  var e = new v(this);
35670
35682
  return e.s < 0 && (e.s = 1), e;
35671
35683
  }, i.comparedTo = function(e, t) {
35672
- return ha(this, new v(e, t));
35684
+ return _a(this, new v(e, t));
35673
35685
  }, i.decimalPlaces = i.dp = function(e, t) {
35674
35686
  var n, r, i, a = this;
35675
- if (e != null) return ga(e, 0, fa), t == null ? t = s : ga(t, 0, 8), S(new v(a), e + a.e + 1, t);
35687
+ if (e != null) return va(e, 0, pa), t == null ? t = s : va(t, 0, 8), S(new v(a), e + a.e + 1, t);
35676
35688
  if (!(n = a.c)) return null;
35677
- if (r = ((i = n.length - 1) - pa(this.e / X)) * X, i = n[i]) for (; i % 10 == 0; i /= 10, r--);
35689
+ if (r = ((i = n.length - 1) - ha(this.e / X)) * X, i = n[i]) for (; i % 10 == 0; i /= 10, r--);
35678
35690
  return r < 0 && (r = 0), r;
35679
35691
  }, i.dividedBy = i.div = function(e, n) {
35680
35692
  return t(this, new v(e, n), o, s);
@@ -35682,22 +35694,22 @@ function Z(e) {
35682
35694
  return t(this, new v(e, n), 0, 1);
35683
35695
  }, i.exponentiatedBy = i.pow = function(e, t) {
35684
35696
  var n, r, i, o, c, l, u, d, f, p = this;
35685
- if (e = new v(e), e.c && !e.isInteger()) throw Error(sa + "Exponent not an integer: " + C(e));
35686
- 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 - _a(e)) : +C(e))), t ? f.mod(t) : f;
35697
+ if (e = new v(e), e.c && !e.isInteger()) throw Error(ca + "Exponent not an integer: " + C(e));
35698
+ 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 - ya(e)) : +C(e))), t ? f.mod(t) : f;
35687
35699
  if (u = e.s < 0, t) {
35688
35700
  if (t.c ? !t.c[0] : !t.s) return new v(NaN);
35689
35701
  r = !u && p.isInteger() && t.isInteger(), r && (p = p.mod(t));
35690
- } 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 && _a(e) ? -0 : 0, p.e > -1 && (o = 1 / o), new v(u ? 1 / o : o);
35691
- else m && (o = aa(m / X + 2));
35692
- for (l ? (n = new v(.5), u && (e.s = 1), d = _a(e)) : (i = Math.abs(+C(e)), d = i % 2), f = new v(a);;) {
35702
+ } 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 && ya(e) ? -0 : 0, p.e > -1 && (o = 1 / o), new v(u ? 1 / o : o);
35703
+ else m && (o = sa(m / X + 2));
35704
+ for (l ? (n = new v(.5), u && (e.s = 1), d = ya(e)) : (i = Math.abs(+C(e)), d = i % 2), f = new v(a);;) {
35693
35705
  if (d) {
35694
35706
  if (f = f.times(p), !f.c) break;
35695
35707
  o ? f.c.length > o && (f.c.length = o) : r && (f = f.mod(t));
35696
35708
  }
35697
35709
  if (i) {
35698
- if (i = oa(i / 2), i === 0) break;
35710
+ if (i = Y(i / 2), i === 0) break;
35699
35711
  d = i % 2;
35700
- } else if (e = e.times(n), S(e, e.e + 1, 1), e.e > 14) d = _a(e);
35712
+ } else if (e = e.times(n), S(e, e.e + 1, 1), e.e > 14) d = ya(e);
35701
35713
  else {
35702
35714
  if (i = +C(e), i === 0) break;
35703
35715
  d = i % 2;
@@ -35707,21 +35719,21 @@ function Z(e) {
35707
35719
  return r ? f : (u && (f = a.div(f)), t ? f.mod(t) : o ? S(f, m, s, c) : f);
35708
35720
  }, i.integerValue = function(e) {
35709
35721
  var t = new v(this);
35710
- return e == null ? e = s : ga(e, 0, 8), S(t, t.e + 1, e);
35722
+ return e == null ? e = s : va(e, 0, 8), S(t, t.e + 1, e);
35711
35723
  }, i.isEqualTo = i.eq = function(e, t) {
35712
- return ha(this, new v(e, t)) === 0;
35724
+ return _a(this, new v(e, t)) === 0;
35713
35725
  }, i.isFinite = function() {
35714
35726
  return !!this.c;
35715
35727
  }, i.isGreaterThan = i.gt = function(e, t) {
35716
- return ha(this, new v(e, t)) > 0;
35728
+ return _a(this, new v(e, t)) > 0;
35717
35729
  }, i.isGreaterThanOrEqualTo = i.gte = function(e, t) {
35718
- return (t = ha(this, new v(e, t))) === 1 || t === 0;
35730
+ return (t = _a(this, new v(e, t))) === 1 || t === 0;
35719
35731
  }, i.isInteger = function() {
35720
- return !!this.c && pa(this.e / X) > this.c.length - 2;
35732
+ return !!this.c && ha(this.e / X) > this.c.length - 2;
35721
35733
  }, i.isLessThan = i.lt = function(e, t) {
35722
- return ha(this, new v(e, t)) < 0;
35734
+ return _a(this, new v(e, t)) < 0;
35723
35735
  }, i.isLessThanOrEqualTo = i.lte = function(e, t) {
35724
- return (t = ha(this, new v(e, t))) === -1 || t === 0;
35736
+ return (t = _a(this, new v(e, t))) === -1 || t === 0;
35725
35737
  }, i.isNaN = function() {
35726
35738
  return !this.s;
35727
35739
  }, i.isNegative = function() {
@@ -35739,7 +35751,7 @@ function Z(e) {
35739
35751
  if (!d || !f) return d ? (e.s = -t, e) : new v(f ? o : NaN);
35740
35752
  if (!d[0] || !f[0]) return f[0] ? (e.s = -t, e) : new v(d[0] ? o : s == 3 ? -0 : 0);
35741
35753
  }
35742
- if (l = pa(l), u = pa(u), d = d.slice(), c = l - u) {
35754
+ if (l = ha(l), u = ha(u), d = d.slice(), c = l - u) {
35743
35755
  for ((a = c < 0) ? (c = -c, i = d) : (u = l, i = f), i.reverse(), t = c; t--; i.push(0));
35744
35756
  i.reverse();
35745
35757
  } else for (r = (a = (c = d.length) < (t = f.length)) ? c : t, c = t = 0; t < r; t++) if (d[t] != f[t]) {
@@ -35747,10 +35759,10 @@ function Z(e) {
35747
35759
  break;
35748
35760
  }
35749
35761
  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);
35750
- for (t = ca - 1; r > c;) {
35762
+ for (t = ua - 1; r > c;) {
35751
35763
  if (d[--r] < f[r]) {
35752
35764
  for (n = r; n && !d[--n]; d[n] = t);
35753
- --d[n], d[r] += ca;
35765
+ --d[n], d[r] += ua;
35754
35766
  }
35755
35767
  d[r] -= f[r];
35756
35768
  }
@@ -35762,8 +35774,8 @@ function Z(e) {
35762
35774
  }, i.multipliedBy = i.times = function(e, t) {
35763
35775
  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;
35764
35776
  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;
35765
- for (r = pa(_.e / X) + pa(e.e / X), 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));
35766
- for (h = ca, g = da, i = d; --i >= 0;) {
35777
+ for (r = ha(_.e / X) + ha(e.e / X), 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));
35778
+ for (h = ua, g = Z, i = d; --i >= 0;) {
35767
35779
  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;
35768
35780
  m[a] = n;
35769
35781
  }
@@ -35780,15 +35792,15 @@ function Z(e) {
35780
35792
  if (!s || !c) return new v(i / 0);
35781
35793
  if (!s[0] || !c[0]) return c[0] ? e : new v(s[0] ? r : i * 0);
35782
35794
  }
35783
- if (a = pa(a), o = pa(o), s = s.slice(), i = a - o) {
35795
+ if (a = ha(a), o = ha(o), s = s.slice(), i = a - o) {
35784
35796
  for (i > 0 ? (o = a, n = c) : (i = -i, n = s), n.reverse(); i--; n.push(0));
35785
35797
  n.reverse();
35786
35798
  }
35787
- 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) / ca | 0, s[t] = ca === s[t] ? 0 : s[t] % ca;
35799
+ 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) / ua | 0, s[t] = ua === s[t] ? 0 : s[t] % ua;
35788
35800
  return i && (s = [i].concat(s), ++o), x(e, s, o);
35789
35801
  }, i.precision = i.sd = function(e, t) {
35790
35802
  var n, r, i, a = this;
35791
- if (e != null && e !== !!e) return ga(e, 1, fa), t == null ? t = s : ga(t, 0, 8), S(new v(a), e, t);
35803
+ if (e != null && e !== !!e) return va(e, 1, pa), t == null ? t = s : va(t, 0, 8), S(new v(a), e, t);
35792
35804
  if (!(n = a.c)) return null;
35793
35805
  if (i = n.length - 1, r = i * X + 1, i = n[i]) {
35794
35806
  for (; i % 10 == 0; i /= 10, r--);
@@ -35796,12 +35808,12 @@ function Z(e) {
35796
35808
  }
35797
35809
  return e && a.e + 1 > r && (r = a.e + 1), r;
35798
35810
  }, i.shiftedBy = function(e) {
35799
- return ga(e, -la, la), this.times("1e" + e);
35811
+ return va(e, -da, da), this.times("1e" + e);
35800
35812
  }, i.squareRoot = i.sqrt = function() {
35801
35813
  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");
35802
35814
  if (u !== 1 || !l || !l[0]) return new v(!u || u < 0 && (!l || l[0]) ? NaN : l ? c : Infinity);
35803
- if (u = Math.sqrt(+C(c)), u == 0 || u == Infinity ? (n = ma(l), (n.length + d) % 2 == 0 && (n += "0"), u = Math.sqrt(+n), d = pa((d + 1) / 2) - (d < 0 || d % 2), u == Infinity ? 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]) {
35804
- for (d = r.e, u = d + f, u < 3 && (u = 0);;) if (a = r, r = p.times(a.plus(t(c, a, f, 1))), ma(a.c).slice(0, u) === (n = ma(r.c)).slice(0, u)) if (r.e < d && --u, n = n.slice(u - 3, u + 1), n == "9999" || !i && n == "4999") {
35815
+ if (u = Math.sqrt(+C(c)), u == 0 || u == Infinity ? (n = ga(l), (n.length + d) % 2 == 0 && (n += "0"), u = Math.sqrt(+n), d = ha((d + 1) / 2) - (d < 0 || d % 2), u == Infinity ? 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]) {
35816
+ for (d = r.e, u = d + f, u < 3 && (u = 0);;) if (a = r, r = p.times(a.plus(t(c, a, f, 1))), ga(a.c).slice(0, u) === (n = ga(r.c)).slice(0, u)) if (r.e < d && --u, n = n.slice(u - 3, u + 1), n == "9999" || !i && n == "4999") {
35805
35817
  if (!i && (S(a, a.e + o + 2, 0), a.times(a).eq(c))) {
35806
35818
  r = a;
35807
35819
  break;
@@ -35814,13 +35826,13 @@ function Z(e) {
35814
35826
  }
35815
35827
  return S(r, r.e + o + 1, s, e);
35816
35828
  }, i.toExponential = function(e, t) {
35817
- return e != null && (ga(e, 0, fa), e++), y(this, e, t, 1);
35829
+ return e != null && (va(e, 0, pa), e++), y(this, e, t, 1);
35818
35830
  }, i.toFixed = function(e, t) {
35819
- return e != null && (ga(e, 0, fa), e = e + this.e + 1), y(this, e, t);
35831
+ return e != null && (va(e, 0, pa), e = e + this.e + 1), y(this, e, t);
35820
35832
  }, i.toFormat = function(e, t, n) {
35821
35833
  var r, i = this;
35822
35834
  if (n == null) e != null && t && typeof t == "object" ? (n = t, t = null) : e && typeof e == "object" ? (n = e, e = t = null) : n = h;
35823
- else if (typeof n != "object") throw Error(sa + "Argument not an object: " + n);
35835
+ else if (typeof n != "object") throw Error(ca + "Argument not an object: " + n);
35824
35836
  if (r = i.toFixed(e, t), i.c) {
35825
35837
  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;
35826
35838
  if (c && (a = s, s = c, c = a, m -= a), s > 0 && m > 0) {
@@ -35832,26 +35844,26 @@ function Z(e) {
35832
35844
  return (n.prefix || "") + r + (n.suffix || "");
35833
35845
  }, i.toFraction = function(e) {
35834
35846
  var n, r, i, o, c, l, u, f, p, m, h, g, _ = this, y = _.c;
35835
- if (e != null && (u = new v(e), !u.isInteger() && (u.c || u.s !== 1) || u.lt(a))) throw Error(sa + "Argument " + (u.isInteger() ? "out of range: " : "not an integer: ") + C(u));
35847
+ if (e != null && (u = new v(e), !u.isInteger() && (u.c || u.s !== 1) || u.lt(a))) throw Error(ca + "Argument " + (u.isInteger() ? "out of range: " : "not an integer: ") + C(u));
35836
35848
  if (!y) return new v(_);
35837
- for (n = new v(a), p = r = new v(a), i = f = new v(a), g = ma(y), c = n.e = g.length - _.e - 1, n.c[0] = ua[(l = c % X) < 0 ? X + l : l], e = !e || u.comparedTo(n) > 0 ? c > 0 ? n : p : u, l = d, d = Infinity, 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;
35849
+ for (n = new v(a), p = r = new v(a), i = f = new v(a), g = ga(y), c = n.e = g.length - _.e - 1, n.c[0] = fa[(l = c % X) < 0 ? X + l : l], e = !e || u.comparedTo(n) > 0 ? c > 0 ? n : p : u, l = d, d = Infinity, 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;
35838
35850
  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;
35839
35851
  }, i.toNumber = function() {
35840
35852
  return +C(this);
35841
35853
  }, i.toPrecision = function(e, t) {
35842
- return e != null && ga(e, 1, fa), y(this, e, t, 2);
35854
+ return e != null && va(e, 1, pa), y(this, e, t, 2);
35843
35855
  }, i.toString = function(e) {
35844
35856
  var t, r = this, i = r.s, a = r.e;
35845
- return a === null ? i ? (t = "Infinity", i < 0 && (t = "-" + t)) : t = "NaN" : (e == null ? t = a <= c || a >= l ? va(ma(r.c), a) : ya(ma(r.c), a, "0") : e === 10 && _ ? (r = S(new v(r), o + a + 1, s), t = ya(ma(r.c), r.e, "0")) : (ga(e, 2, g.length, "Base"), t = n(ya(ma(r.c), a, "0"), 10, e, i, !0)), i < 0 && r.c[0] && (t = "-" + t)), t;
35857
+ return a === null ? i ? (t = "Infinity", i < 0 && (t = "-" + t)) : t = "NaN" : (e == null ? t = a <= c || a >= l ? ba(ga(r.c), a) : xa(ga(r.c), a, "0") : e === 10 && _ ? (r = S(new v(r), o + a + 1, s), t = xa(ga(r.c), r.e, "0")) : (va(e, 2, g.length, "Base"), t = n(xa(ga(r.c), a, "0"), 10, e, i, !0)), i < 0 && r.c[0] && (t = "-" + t)), t;
35846
35858
  }, i.valueOf = i.toJSON = function() {
35847
35859
  return C(this);
35848
35860
  }, i._isBigNumber = !0, i[Symbol.toStringTag] = "BigNumber", i[Symbol.for("nodejs.util.inspect.custom")] = i.valueOf, e != null && v.set(e), v;
35849
35861
  }
35850
- function pa(e) {
35862
+ function ha(e) {
35851
35863
  var t = e | 0;
35852
35864
  return e > 0 || e === t ? t : t - 1;
35853
35865
  }
35854
- function ma(e) {
35866
+ function ga(e) {
35855
35867
  for (var t, n, r = 1, i = e.length, a = e[0] + ""; r < i;) {
35856
35868
  for (t = e[r++] + "", n = X - t.length; n--; t = "0" + t);
35857
35869
  a += t;
@@ -35859,7 +35871,7 @@ function ma(e) {
35859
35871
  for (i = a.length; a.charCodeAt(--i) === 48;);
35860
35872
  return a.slice(0, i + 1 || 1);
35861
35873
  }
35862
- function ha(e, t) {
35874
+ function _a(e, t) {
35863
35875
  var n, r, i = e.c, a = t.c, o = e.s, s = t.s, c = e.e, l = t.e;
35864
35876
  if (!o || !s) return null;
35865
35877
  if (n = i && !i[0], r = a && !a[0], n || r) return n ? r ? 0 : -s : o;
@@ -35869,17 +35881,17 @@ function ha(e, t) {
35869
35881
  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;
35870
35882
  return c == l ? 0 : c > l ^ n ? 1 : -1;
35871
35883
  }
35872
- function ga(e, t, n, r) {
35873
- if (e < t || e > n || e !== oa(e)) throw Error(sa + (r || "Argument") + (typeof e == "number" ? e < t || e > n ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(e));
35884
+ function va(e, t, n, r) {
35885
+ if (e < t || e > n || e !== Y(e)) throw Error(ca + (r || "Argument") + (typeof e == "number" ? e < t || e > n ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(e));
35874
35886
  }
35875
- function _a(e) {
35887
+ function ya(e) {
35876
35888
  var t = e.c.length - 1;
35877
- return pa(e.e / X) == t && e.c[t] % 2 != 0;
35889
+ return ha(e.e / X) == t && e.c[t] % 2 != 0;
35878
35890
  }
35879
- function va(e, t) {
35891
+ function ba(e, t) {
35880
35892
  return (e.length > 1 ? e.charAt(0) + "." + e.slice(1) : e) + (t < 0 ? "e" : "e+") + t;
35881
35893
  }
35882
- function ya(e, t, n) {
35894
+ function xa(e, t, n) {
35883
35895
  var r, i;
35884
35896
  if (t < 0) {
35885
35897
  for (i = n + "."; ++t; i += n);
@@ -35890,18 +35902,18 @@ function ya(e, t, n) {
35890
35902
  } else t < r && (e = e.slice(0, t) + "." + e.slice(t));
35891
35903
  return e;
35892
35904
  }
35893
- var ba = Z(), xa = class {
35905
+ var Sa = ma(), Ca = class {
35894
35906
  key;
35895
35907
  left = null;
35896
35908
  right = null;
35897
35909
  constructor(e) {
35898
35910
  this.key = e;
35899
35911
  }
35900
- }, Sa = class extends xa {
35912
+ }, wa = class extends Ca {
35901
35913
  constructor(e) {
35902
35914
  super(e);
35903
35915
  }
35904
- }, Ca = class {
35916
+ }, Ta = class {
35905
35917
  size = 0;
35906
35918
  modificationCount = 0;
35907
35919
  splayCount = 0;
@@ -35988,7 +36000,7 @@ var ba = Z(), xa = class {
35988
36000
  has: (e) => this.has(e)
35989
36001
  };
35990
36002
  }
35991
- }, wa = class e extends Ca {
36003
+ }, Ea = class e extends Ta {
35992
36004
  root = null;
35993
36005
  compare;
35994
36006
  validKey;
@@ -36007,11 +36019,11 @@ var ba = Z(), xa = class {
36007
36019
  }
36008
36020
  add(e) {
36009
36021
  let t = this.splay(e);
36010
- return t != 0 && this.addNewRoot(new Sa(e), t), this;
36022
+ return t != 0 && this.addNewRoot(new wa(e), t), this;
36011
36023
  }
36012
36024
  addAndReturn(e) {
36013
36025
  let t = this.splay(e);
36014
- return t != 0 && this.addNewRoot(new Sa(e), t), this.root.key;
36026
+ return t != 0 && this.addNewRoot(new wa(e), t), this.root.key;
36015
36027
  }
36016
36028
  addAll(e) {
36017
36029
  for (let t of e) this.add(t);
@@ -36090,23 +36102,23 @@ var ba = Z(), xa = class {
36090
36102
  let r, i;
36091
36103
  do {
36092
36104
  if (r = e.left, i = e.right, r != null) {
36093
- let e = new Sa(r.key);
36105
+ let e = new wa(r.key);
36094
36106
  n.left = e, t(r, e);
36095
36107
  }
36096
36108
  if (i != null) {
36097
- let t = new Sa(i.key);
36109
+ let t = new wa(i.key);
36098
36110
  n.right = t, e = i, n = t;
36099
36111
  }
36100
36112
  } while (i != null);
36101
36113
  }
36102
- let n = new Sa(e.key);
36114
+ let n = new wa(e.key);
36103
36115
  return t(e, n), n;
36104
36116
  }
36105
36117
  toSet() {
36106
36118
  return this.clone();
36107
36119
  }
36108
36120
  entries() {
36109
- return new Da(this.wrap());
36121
+ return new ka(this.wrap());
36110
36122
  }
36111
36123
  keys() {
36112
36124
  return this[Symbol.iterator]();
@@ -36115,10 +36127,10 @@ var ba = Z(), xa = class {
36115
36127
  return this[Symbol.iterator]();
36116
36128
  }
36117
36129
  [Symbol.iterator]() {
36118
- return new Ea(this.wrap());
36130
+ return new Oa(this.wrap());
36119
36131
  }
36120
36132
  [Symbol.toStringTag] = "[object Set]";
36121
- }, Ta = class {
36133
+ }, Da = class {
36122
36134
  tree;
36123
36135
  path = [];
36124
36136
  modificationCount = null;
@@ -36169,46 +36181,46 @@ var ba = Z(), xa = class {
36169
36181
  for (this.path.pop(); this.path.length && this.path[this.path.length - 1].right === e;) e = this.path.pop();
36170
36182
  return this.path.length > 0;
36171
36183
  }
36172
- }, Ea = class extends Ta {
36184
+ }, Oa = class extends Da {
36173
36185
  getValue(e) {
36174
36186
  return e.key;
36175
36187
  }
36176
- }, Da = class extends Ta {
36188
+ }, ka = class extends Da {
36177
36189
  getValue(e) {
36178
36190
  return [e.key, e.key];
36179
36191
  }
36180
- }, Oa = (e) => () => e, ka = (e) => {
36181
- let t = e ? (t, n) => n.minus(t).abs().isLessThanOrEqualTo(e) : Oa(!1);
36192
+ }, Aa = (e) => () => e, ja = (e) => {
36193
+ let t = e ? (t, n) => n.minus(t).abs().isLessThanOrEqualTo(e) : Aa(!1);
36182
36194
  return (e, n) => t(e, n) ? 0 : e.comparedTo(n);
36183
36195
  };
36184
- function Aa(e) {
36185
- 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)) : Oa(!1);
36196
+ function Ma(e) {
36197
+ 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)) : Aa(!1);
36186
36198
  return (e, n, r) => {
36187
36199
  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)));
36188
36200
  return t(c, i, a, o, s) ? 0 : c.comparedTo(0);
36189
36201
  };
36190
36202
  }
36191
- var ja = (e) => e, Ma = (e) => {
36203
+ var Na = (e) => e, Pa = (e) => {
36192
36204
  if (e) {
36193
- let t = new wa(ka(e)), n = new wa(ka(e)), r = (e, t) => t.addAndReturn(e), i = (e) => ({
36205
+ let t = new Ea(ja(e)), n = new Ea(ja(e)), r = (e, t) => t.addAndReturn(e), i = (e) => ({
36194
36206
  x: r(e.x, t),
36195
36207
  y: r(e.y, n)
36196
36208
  });
36197
36209
  return i({
36198
- x: new ba(0),
36199
- y: new ba(0)
36210
+ x: new Sa(0),
36211
+ y: new Sa(0)
36200
36212
  }), i;
36201
36213
  }
36202
- return ja;
36203
- }, Na = (e) => ({
36214
+ return Na;
36215
+ }, Q = (e) => ({
36204
36216
  set: (e) => {
36205
- Pa = Na(e);
36217
+ $ = Q(e);
36206
36218
  },
36207
- reset: () => Na(e),
36208
- compare: ka(e),
36209
- snap: Ma(e),
36210
- orient: Aa(e)
36211
- }), Pa = Na(), Q = (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), $ = (e, t) => {
36219
+ reset: () => Q(e),
36220
+ compare: ja(e),
36221
+ snap: Pa(e),
36222
+ orient: Ma(e)
36223
+ }), $ = Q(), Fa = (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), Ia = (e, t) => {
36212
36224
  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;
36213
36225
  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;
36214
36226
  return {
@@ -36221,7 +36233,7 @@ var ja = (e) => e, Ma = (e) => {
36221
36233
  y: a
36222
36234
  }
36223
36235
  };
36224
- }, Fa = (e, t) => e.x.times(t.y).minus(e.y.times(t.x)), Ia = (e, t) => e.x.times(t.x).plus(e.y.times(t.y)), La = (e) => Ia(e, e).sqrt(), Ra = (e, t, n) => {
36236
+ }, La = (e, t) => e.x.times(t.y).minus(e.y.times(t.x)), Ra = (e, t) => e.x.times(t.x).plus(e.y.times(t.y)), za = (e) => Ra(e, e).sqrt(), Ba = (e, t, n) => {
36225
36237
  let r = {
36226
36238
  x: t.x.minus(e.x),
36227
36239
  y: t.y.minus(e.y)
@@ -36229,8 +36241,8 @@ var ja = (e) => e, Ma = (e) => {
36229
36241
  x: n.x.minus(e.x),
36230
36242
  y: n.y.minus(e.y)
36231
36243
  };
36232
- return Fa(i, r).div(La(i)).div(La(r));
36233
- }, za = (e, t, n) => {
36244
+ return La(i, r).div(za(i)).div(za(r));
36245
+ }, Va = (e, t, n) => {
36234
36246
  let r = {
36235
36247
  x: t.x.minus(e.x),
36236
36248
  y: t.y.minus(e.y)
@@ -36238,29 +36250,29 @@ var ja = (e) => e, Ma = (e) => {
36238
36250
  x: n.x.minus(e.x),
36239
36251
  y: n.y.minus(e.y)
36240
36252
  };
36241
- return Ia(i, r).div(La(i)).div(La(r));
36242
- }, Ba = (e, t, n) => t.y.isZero() ? null : {
36253
+ return Ra(i, r).div(za(i)).div(za(r));
36254
+ }, Ha = (e, t, n) => t.y.isZero() ? null : {
36243
36255
  x: e.x.plus(t.x.div(t.y).times(n.minus(e.y))),
36244
36256
  y: n
36245
- }, Va = (e, t, n) => t.x.isZero() ? null : {
36257
+ }, Ua = (e, t, n) => t.x.isZero() ? null : {
36246
36258
  x: n,
36247
36259
  y: e.y.plus(t.y.div(t.x).times(n.minus(e.x)))
36248
- }, Ha = (e, t, n, r) => {
36249
- if (t.x.isZero()) return Va(n, r, e.x);
36250
- if (r.x.isZero()) return Va(e, t, n.x);
36251
- if (t.y.isZero()) return Ba(n, r, e.y);
36252
- if (r.y.isZero()) return Ba(e, t, n.y);
36253
- let i = Fa(t, r);
36260
+ }, Wa = (e, t, n, r) => {
36261
+ if (t.x.isZero()) return Ua(n, r, e.x);
36262
+ if (r.x.isZero()) return Ua(e, t, n.x);
36263
+ if (t.y.isZero()) return Ha(n, r, e.y);
36264
+ if (r.y.isZero()) return Ha(e, t, n.y);
36265
+ let i = La(t, r);
36254
36266
  if (i.isZero()) return null;
36255
36267
  let a = {
36256
36268
  x: n.x.minus(e.x),
36257
36269
  y: n.y.minus(e.y)
36258
- }, o = Fa(a, t).div(i), s = Fa(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));
36270
+ }, o = La(a, t).div(i), s = La(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));
36259
36271
  return {
36260
36272
  x: c.plus(l).div(2),
36261
36273
  y: u.plus(d).div(2)
36262
36274
  };
36263
- }, Ua = class e {
36275
+ }, Ga = class e {
36264
36276
  point;
36265
36277
  isLeft;
36266
36278
  segment;
@@ -36268,7 +36280,7 @@ var ja = (e) => e, Ma = (e) => {
36268
36280
  consumedBy;
36269
36281
  static compare(t, n) {
36270
36282
  let r = e.comparePoints(t.point, n.point);
36271
- return r === 0 ? (t.point !== n.point && t.link(n), t.isLeft === n.isLeft ? Za.compare(t.segment, n.segment) : t.isLeft ? 1 : -1) : r;
36283
+ return r === 0 ? (t.point !== n.point && t.link(n), t.isLeft === n.isLeft ? $a.compare(t.segment, n.segment) : t.isLeft ? 1 : -1) : r;
36272
36284
  }
36273
36285
  static comparePoints(e, t) {
36274
36286
  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;
@@ -36307,8 +36319,8 @@ var ja = (e) => e, Ma = (e) => {
36307
36319
  let t = /* @__PURE__ */ new Map(), n = (n) => {
36308
36320
  let r = n.otherSE;
36309
36321
  t.set(n, {
36310
- sine: Ra(this.point, e.point, r.point),
36311
- cosine: za(this.point, e.point, r.point)
36322
+ sine: Ba(this.point, e.point, r.point),
36323
+ cosine: Va(this.point, e.point, r.point)
36312
36324
  });
36313
36325
  };
36314
36326
  return (e, r) => {
@@ -36317,7 +36329,7 @@ var ja = (e) => e, Ma = (e) => {
36317
36329
  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;
36318
36330
  };
36319
36331
  }
36320
- }, Wa = class e {
36332
+ }, Ka = class e {
36321
36333
  events;
36322
36334
  poly;
36323
36335
  _isExteriorRing;
@@ -36369,11 +36381,11 @@ var ja = (e) => e, Ma = (e) => {
36369
36381
  let e = this.events[0].point, t = [e];
36370
36382
  for (let n = 1, r = this.events.length - 1; n < r; n++) {
36371
36383
  let r = this.events[n].point, i = this.events[n + 1].point;
36372
- Pa.orient(r, e, i) !== 0 && (t.push(r), e = r);
36384
+ $.orient(r, e, i) !== 0 && (t.push(r), e = r);
36373
36385
  }
36374
36386
  if (t.length === 1) return null;
36375
36387
  let n = t[0], r = t[1];
36376
- Pa.orient(n, e, r) === 0 && t.shift(), t.push(t[0]);
36388
+ $.orient(n, e, r) === 0 && t.shift(), t.push(t[0]);
36377
36389
  let i = this.isExteriorRing() ? 1 : -1, a = this.isExteriorRing() ? 0 : t.length - 1, o = this.isExteriorRing() ? t.length : -1, s = [];
36378
36390
  for (let e = a; e != o; e += i) s.push([t[e].x.toNumber(), t[e].y.toNumber()]);
36379
36391
  return s;
@@ -36392,7 +36404,7 @@ var ja = (e) => e, Ma = (e) => {
36392
36404
  let e = this.events[0];
36393
36405
  for (let t = 1, n = this.events.length; t < n; t++) {
36394
36406
  let n = this.events[t];
36395
- Ua.compare(e, n) > 0 && (e = n);
36407
+ Ga.compare(e, n) > 0 && (e = n);
36396
36408
  }
36397
36409
  let t = e.segment.prevInResult(), n = t ? t.prevInResult() : null;
36398
36410
  for (;;) {
@@ -36402,7 +36414,7 @@ var ja = (e) => e, Ma = (e) => {
36402
36414
  t = n.prevInResult(), n = t ? t.prevInResult() : null;
36403
36415
  }
36404
36416
  }
36405
- }, Ga = class {
36417
+ }, qa = class {
36406
36418
  exteriorRing;
36407
36419
  interiorRings;
36408
36420
  constructor(e) {
@@ -36421,7 +36433,7 @@ var ja = (e) => e, Ma = (e) => {
36421
36433
  }
36422
36434
  return t;
36423
36435
  }
36424
- }, Ka = class {
36436
+ }, Ja = class {
36425
36437
  rings;
36426
36438
  polys;
36427
36439
  constructor(e) {
@@ -36439,20 +36451,20 @@ var ja = (e) => e, Ma = (e) => {
36439
36451
  let t = [];
36440
36452
  for (let n = 0, r = e.length; n < r; n++) {
36441
36453
  let r = e[n];
36442
- if (!r.poly) if (r.isExteriorRing()) t.push(new Ga(r));
36454
+ if (!r.poly) if (r.isExteriorRing()) t.push(new qa(r));
36443
36455
  else {
36444
36456
  let e = r.enclosingRing();
36445
- e?.poly || t.push(new Ga(e)), e?.poly?.addInterior(r);
36457
+ e?.poly || t.push(new qa(e)), e?.poly?.addInterior(r);
36446
36458
  }
36447
36459
  }
36448
36460
  return t;
36449
36461
  }
36450
- }, qa = class {
36462
+ }, Ya = class {
36451
36463
  queue;
36452
36464
  tree;
36453
36465
  segments;
36454
- constructor(e, t = Za.compare) {
36455
- this.queue = e, this.tree = new wa(t), this.segments = [];
36466
+ constructor(e, t = $a.compare) {
36467
+ this.queue = e, this.tree = new Ea(t), this.segments = [];
36456
36468
  }
36457
36469
  process(e) {
36458
36470
  let t = e.segment, n = [];
@@ -36484,7 +36496,7 @@ var ja = (e) => e, Ma = (e) => {
36484
36496
  }
36485
36497
  if (a !== null || o !== null) {
36486
36498
  let e = null;
36487
- e = a === null ? o : o === null || Ua.comparePoints(a, o) <= 0 ? a : o, this.queue.delete(t.rightSE), n.push(t.rightSE);
36499
+ e = a === null ? o : o === null || Ga.comparePoints(a, o) <= 0 ? a : o, this.queue.delete(t.rightSE), n.push(t.rightSE);
36488
36500
  let r = t.split(e);
36489
36501
  for (let e = 0, t = r.length; e < t; e++) n.push(r[e]);
36490
36502
  }
@@ -36514,27 +36526,27 @@ var ja = (e) => e, Ma = (e) => {
36514
36526
  let r = e.split(t);
36515
36527
  return r.push(n), e.consumedBy === void 0 && this.tree.add(e), r;
36516
36528
  }
36517
- }, Ja = new class {
36529
+ }, Xa = new class {
36518
36530
  type;
36519
36531
  numMultiPolys;
36520
36532
  run(e, t, n) {
36521
- Ja.type = e;
36522
- let r = [new eo(t, !0)];
36523
- for (let e = 0, t = n.length; e < t; e++) r.push(new eo(n[e], !1));
36524
- if (Ja.numMultiPolys = r.length, Ja.type === "difference") {
36533
+ Xa.type = e;
36534
+ let r = [new no(t, !0)];
36535
+ for (let e = 0, t = n.length; e < t; e++) r.push(new no(n[e], !1));
36536
+ if (Xa.numMultiPolys = r.length, Xa.type === "difference") {
36525
36537
  let e = r[0], t = 1;
36526
- for (; t < r.length;) $(r[t].bbox, e.bbox) === null ? r.splice(t, 1) : t++;
36538
+ for (; t < r.length;) Ia(r[t].bbox, e.bbox) === null ? r.splice(t, 1) : t++;
36527
36539
  }
36528
- if (Ja.type === "intersection") for (let e = 0, t = r.length; e < t; e++) {
36540
+ if (Xa.type === "intersection") for (let e = 0, t = r.length; e < t; e++) {
36529
36541
  let t = r[e];
36530
- for (let n = e + 1, i = r.length; n < i; n++) if ($(t.bbox, r[n].bbox) === null) return [];
36542
+ for (let n = e + 1, i = r.length; n < i; n++) if (Ia(t.bbox, r[n].bbox) === null) return [];
36531
36543
  }
36532
- let i = new wa(Ua.compare);
36544
+ let i = new Ea(Ga.compare);
36533
36545
  for (let e = 0, t = r.length; e < t; e++) {
36534
36546
  let t = r[e].getSweepEvents();
36535
36547
  for (let e = 0, n = t.length; e < n; e++) i.add(t[e]);
36536
36548
  }
36537
- let a = new qa(i), o = null;
36549
+ let a = new Ya(i), o = null;
36538
36550
  for (i.size != 0 && (o = i.first(), i.delete(o)); o;) {
36539
36551
  let e = a.process(o);
36540
36552
  for (let t = 0, n = e.length; t < n; t++) {
@@ -36543,9 +36555,9 @@ var ja = (e) => e, Ma = (e) => {
36543
36555
  }
36544
36556
  i.size == 0 ? o = null : (o = i.first(), i.delete(o));
36545
36557
  }
36546
- return Pa.reset(), new Ka(Wa.factory(a.segments)).getGeom();
36558
+ return $.reset(), new Ja(Ka.factory(a.segments)).getGeom();
36547
36559
  }
36548
- }(), Ya = Ja, Xa = 0, Za = class e {
36560
+ }(), Za = Xa, Qa = 0, $a = class e {
36549
36561
  id;
36550
36562
  leftSE;
36551
36563
  rightSE;
@@ -36599,14 +36611,14 @@ var ja = (e) => e, Ma = (e) => {
36599
36611
  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;
36600
36612
  }
36601
36613
  constructor(e, t, n, r) {
36602
- this.id = ++Xa, this.leftSE = e, e.segment = this, e.otherSE = t, this.rightSE = t, t.segment = this, t.otherSE = e, this.rings = n, this.windings = r;
36614
+ this.id = ++Qa, this.leftSE = e, e.segment = this, e.otherSE = t, this.rightSE = t, t.segment = this, t.otherSE = e, this.rings = n, this.windings = r;
36603
36615
  }
36604
36616
  static fromRing(t, n, r) {
36605
- let i, a, o, s = Ua.comparePoints(t, n);
36617
+ let i, a, o, s = Ga.comparePoints(t, n);
36606
36618
  if (s < 0) i = t, a = n, o = 1;
36607
36619
  else if (s > 0) i = n, a = t, o = -1;
36608
36620
  else throw Error(`Tried to create degenerate segment at [${t.x}, ${t.y}]`);
36609
- return new e(new Ua(i, !0), new Ua(a, !1), [r], [o]);
36621
+ return new e(new Ga(i, !0), new Ga(a, !1), [r], [o]);
36610
36622
  }
36611
36623
  replaceRightSE(e) {
36612
36624
  this.rightSE = e, this.rightSE.segment = this, this.rightSE.otherSE = this.leftSE, this.leftSE.otherSE = this.rightSE;
@@ -36634,26 +36646,26 @@ var ja = (e) => e, Ma = (e) => {
36634
36646
  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);
36635
36647
  }
36636
36648
  comparePoint(e) {
36637
- return Pa.orient(this.leftSE.point, e, this.rightSE.point);
36649
+ return $.orient(this.leftSE.point, e, this.rightSE.point);
36638
36650
  }
36639
36651
  getIntersection(e) {
36640
- let t = this.bbox(), n = e.bbox(), r = $(t, n);
36652
+ let t = this.bbox(), n = e.bbox(), r = Ia(t, n);
36641
36653
  if (r === null) return null;
36642
- let i = this.leftSE.point, a = this.rightSE.point, o = e.leftSE.point, s = e.rightSE.point, c = Q(t, o) && this.comparePoint(o) === 0, l = Q(n, i) && e.comparePoint(i) === 0, u = Q(t, s) && this.comparePoint(s) === 0, d = Q(n, a) && e.comparePoint(a) === 0;
36654
+ let i = this.leftSE.point, a = this.rightSE.point, o = e.leftSE.point, s = e.rightSE.point, c = Fa(t, o) && this.comparePoint(o) === 0, l = Fa(n, i) && e.comparePoint(i) === 0, u = Fa(t, s) && this.comparePoint(s) === 0, d = Fa(n, a) && e.comparePoint(a) === 0;
36643
36655
  if (l && c) return d && !u ? a : !d && u ? s : null;
36644
36656
  if (l) return u && i.x.eq(s.x) && i.y.eq(s.y) ? null : i;
36645
36657
  if (c) return d && a.x.eq(o.x) && a.y.eq(o.y) ? null : o;
36646
36658
  if (d && u) return null;
36647
36659
  if (d) return a;
36648
36660
  if (u) return s;
36649
- let f = Ha(i, this.vector(), o, e.vector());
36650
- return f === null || !Q(r, f) ? null : Pa.snap(f);
36661
+ let f = Wa(i, this.vector(), o, e.vector());
36662
+ return f === null || !Fa(r, f) ? null : $.snap(f);
36651
36663
  }
36652
36664
  split(t) {
36653
- let n = [], r = t.events !== void 0, i = new Ua(t, !0), a = new Ua(t, !1), o = this.rightSE;
36665
+ let n = [], r = t.events !== void 0, i = new Ga(t, !0), a = new Ga(t, !1), o = this.rightSE;
36654
36666
  this.replaceRightSE(a), n.push(a), n.push(i);
36655
36667
  let s = new e(i, o, this.rings.slice(), this.windings.slice());
36656
- return Ua.comparePoints(s.leftSE.point, s.rightSE.point) > 0 && s.swapEvents(), Ua.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), r && (i.checkForConsuming(), a.checkForConsuming()), n;
36668
+ return Ga.comparePoints(s.leftSE.point, s.rightSE.point) > 0 && s.swapEvents(), Ga.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), r && (i.checkForConsuming(), a.checkForConsuming()), n;
36657
36669
  }
36658
36670
  swapEvents() {
36659
36671
  let e = this.rightSE;
@@ -36725,13 +36737,13 @@ var ja = (e) => e, Ma = (e) => {
36725
36737
  if (this.consumedBy) return !1;
36726
36738
  if (this._isInResult !== void 0) return this._isInResult;
36727
36739
  let e = this.beforeState().multiPolys, t = this.afterState().multiPolys;
36728
- switch (Ya.type) {
36740
+ switch (Za.type) {
36729
36741
  case "union":
36730
36742
  this._isInResult = e.length === 0 != (t.length === 0);
36731
36743
  break;
36732
36744
  case "intersection": {
36733
36745
  let n, r;
36734
- e.length < t.length ? (n = e.length, r = t.length) : (n = t.length, r = e.length), this._isInResult = r === Ya.numMultiPolys && n < r;
36746
+ e.length < t.length ? (n = e.length, r = t.length) : (n = t.length, r = e.length), this._isInResult = r === Za.numMultiPolys && n < r;
36735
36747
  break;
36736
36748
  }
36737
36749
  case "xor":
@@ -36745,16 +36757,16 @@ var ja = (e) => e, Ma = (e) => {
36745
36757
  }
36746
36758
  return this._isInResult;
36747
36759
  }
36748
- }, Qa = class {
36760
+ }, eo = class {
36749
36761
  poly;
36750
36762
  isExterior;
36751
36763
  segments;
36752
36764
  bbox;
36753
36765
  constructor(e, t, n) {
36754
36766
  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");
36755
- let r = Pa.snap({
36756
- x: new ba(e[0][0]),
36757
- y: new ba(e[0][1])
36767
+ let r = $.snap({
36768
+ x: new Sa(e[0][0]),
36769
+ y: new Sa(e[0][1])
36758
36770
  });
36759
36771
  this.bbox = {
36760
36772
  ll: {
@@ -36769,13 +36781,13 @@ var ja = (e) => e, Ma = (e) => {
36769
36781
  let i = r;
36770
36782
  for (let t = 1, n = e.length; t < n; t++) {
36771
36783
  if (typeof e[t][0] != "number" || typeof e[t][1] != "number") throw Error("Input geometry is not a valid Polygon or MultiPolygon");
36772
- let n = Pa.snap({
36773
- x: new ba(e[t][0]),
36774
- y: new ba(e[t][1])
36784
+ let n = $.snap({
36785
+ x: new Sa(e[t][0]),
36786
+ y: new Sa(e[t][1])
36775
36787
  });
36776
- n.x.eq(i.x) && n.y.eq(i.y) || (this.segments.push(Za.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);
36788
+ n.x.eq(i.x) && n.y.eq(i.y) || (this.segments.push($a.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);
36777
36789
  }
36778
- (!r.x.eq(i.x) || !r.y.eq(i.y)) && this.segments.push(Za.fromRing(i, r, this));
36790
+ (!r.x.eq(i.x) || !r.y.eq(i.y)) && this.segments.push($a.fromRing(i, r, this));
36779
36791
  }
36780
36792
  getSweepEvents() {
36781
36793
  let e = [];
@@ -36785,14 +36797,14 @@ var ja = (e) => e, Ma = (e) => {
36785
36797
  }
36786
36798
  return e;
36787
36799
  }
36788
- }, $a = class {
36800
+ }, to = class {
36789
36801
  multiPoly;
36790
36802
  exteriorRing;
36791
36803
  interiorRings;
36792
36804
  bbox;
36793
36805
  constructor(e, t) {
36794
36806
  if (!Array.isArray(e)) throw Error("Input geometry is not a valid Polygon or MultiPolygon");
36795
- this.exteriorRing = new Qa(e[0], this, !0), this.bbox = {
36807
+ this.exteriorRing = new eo(e[0], this, !0), this.bbox = {
36796
36808
  ll: {
36797
36809
  x: this.exteriorRing.bbox.ll.x,
36798
36810
  y: this.exteriorRing.bbox.ll.y
@@ -36803,7 +36815,7 @@ var ja = (e) => e, Ma = (e) => {
36803
36815
  }
36804
36816
  }, this.interiorRings = [];
36805
36817
  for (let t = 1, n = e.length; t < n; t++) {
36806
- let n = new Qa(e[t], this, !1);
36818
+ let n = new eo(e[t], this, !1);
36807
36819
  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);
36808
36820
  }
36809
36821
  this.multiPoly = t;
@@ -36816,7 +36828,7 @@ var ja = (e) => e, Ma = (e) => {
36816
36828
  }
36817
36829
  return e;
36818
36830
  }
36819
- }, eo = class {
36831
+ }, no = class {
36820
36832
  isSubject;
36821
36833
  polys;
36822
36834
  bbox;
@@ -36827,16 +36839,16 @@ var ja = (e) => e, Ma = (e) => {
36827
36839
  } catch {}
36828
36840
  this.polys = [], this.bbox = {
36829
36841
  ll: {
36830
- x: new ba(Infinity),
36831
- y: new ba(Infinity)
36842
+ x: new Sa(Infinity),
36843
+ y: new Sa(Infinity)
36832
36844
  },
36833
36845
  ur: {
36834
- x: new ba(-Infinity),
36835
- y: new ba(-Infinity)
36846
+ x: new Sa(-Infinity),
36847
+ y: new Sa(-Infinity)
36836
36848
  }
36837
36849
  };
36838
36850
  for (let t = 0, n = e.length; t < n; t++) {
36839
- let n = new $a(e[t], this);
36851
+ let n = new to(e[t], this);
36840
36852
  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);
36841
36853
  }
36842
36854
  this.isSubject = t;
@@ -36849,45 +36861,45 @@ var ja = (e) => e, Ma = (e) => {
36849
36861
  }
36850
36862
  return e;
36851
36863
  }
36852
- }, to = (e, ...t) => Ya.run("intersection", e, t);
36853
- Pa.set;
36864
+ }, ro = (e, ...t) => Za.run("intersection", e, t);
36865
+ $.set;
36854
36866
  //#endregion
36855
36867
  //#region node_modules/@turf/intersect/dist/esm/index.js
36856
- function no(e, t = {}) {
36868
+ function io(e, t = {}) {
36857
36869
  let n = [];
36858
36870
  if (Vn(e, (e) => {
36859
36871
  n.push(e.coordinates);
36860
36872
  }), n.length < 2) throw Error("Must specify at least 2 geometries");
36861
- let r = to(n[0], ...n.slice(1));
36873
+ let r = ro(n[0], ...n.slice(1));
36862
36874
  return r.length === 0 ? null : r.length === 1 ? Fn(r[0], t.properties) : zn(r, t.properties);
36863
36875
  }
36864
36876
  //#endregion
36865
36877
  //#region node_modules/d3-geo/src/math.js
36866
- var ro = 1e-6, io = Math.PI, ao = io / 2, oo = io / 4, so = io * 2, co = 180 / io, lo = io / 180, uo = Math.abs, fo = Math.atan, po = Math.atan2, mo = Math.cos, ho = Math.ceil, go = Math.exp, _o = Math.log, vo = Math.sin, yo = Math.sign || function(e) {
36878
+ var ao = 1e-6, oo = Math.PI, so = oo / 2, co = oo / 4, lo = oo * 2, uo = 180 / oo, fo = oo / 180, po = Math.abs, mo = Math.atan, ho = Math.atan2, go = Math.cos, _o = Math.ceil, vo = Math.exp, yo = Math.log, bo = Math.sin, xo = Math.sign || function(e) {
36867
36879
  return e > 0 ? 1 : e < 0 ? -1 : 0;
36868
- }, bo = Math.sqrt, xo = Math.tan;
36869
- function So(e) {
36870
- return e > 1 ? 0 : e < -1 ? io : Math.acos(e);
36880
+ }, So = Math.sqrt, Co = Math.tan;
36881
+ function wo(e) {
36882
+ return e > 1 ? 0 : e < -1 ? oo : Math.acos(e);
36871
36883
  }
36872
- function Co(e) {
36873
- return e > 1 ? ao : e < -1 ? -ao : Math.asin(e);
36884
+ function To(e) {
36885
+ return e > 1 ? so : e < -1 ? -so : Math.asin(e);
36874
36886
  }
36875
36887
  //#endregion
36876
36888
  //#region node_modules/d3-geo/src/noop.js
36877
- function wo() {}
36889
+ function Eo() {}
36878
36890
  //#endregion
36879
36891
  //#region node_modules/d3-geo/src/stream.js
36880
- function To(e, t) {
36881
- e && Do.hasOwnProperty(e.type) && Do[e.type](e, t);
36892
+ function Do(e, t) {
36893
+ e && ko.hasOwnProperty(e.type) && ko[e.type](e, t);
36882
36894
  }
36883
- var Eo = {
36895
+ var Oo = {
36884
36896
  Feature: function(e, t) {
36885
- To(e.geometry, t);
36897
+ Do(e.geometry, t);
36886
36898
  },
36887
36899
  FeatureCollection: function(e, t) {
36888
- for (var n = e.features, r = -1, i = n.length; ++r < i;) To(n[r].geometry, t);
36900
+ for (var n = e.features, r = -1, i = n.length; ++r < i;) Do(n[r].geometry, t);
36889
36901
  }
36890
- }, Do = {
36902
+ }, ko = {
36891
36903
  Sphere: function(e, t) {
36892
36904
  t.sphere();
36893
36905
  },
@@ -36898,74 +36910,74 @@ var Eo = {
36898
36910
  for (var n = e.coordinates, r = -1, i = n.length; ++r < i;) e = n[r], t.point(e[0], e[1], e[2]);
36899
36911
  },
36900
36912
  LineString: function(e, t) {
36901
- Oo(e.coordinates, t, 0);
36913
+ Ao(e.coordinates, t, 0);
36902
36914
  },
36903
36915
  MultiLineString: function(e, t) {
36904
- for (var n = e.coordinates, r = -1, i = n.length; ++r < i;) Oo(n[r], t, 0);
36916
+ for (var n = e.coordinates, r = -1, i = n.length; ++r < i;) Ao(n[r], t, 0);
36905
36917
  },
36906
36918
  Polygon: function(e, t) {
36907
- ko(e.coordinates, t);
36919
+ jo(e.coordinates, t);
36908
36920
  },
36909
36921
  MultiPolygon: function(e, t) {
36910
- for (var n = e.coordinates, r = -1, i = n.length; ++r < i;) ko(n[r], t);
36922
+ for (var n = e.coordinates, r = -1, i = n.length; ++r < i;) jo(n[r], t);
36911
36923
  },
36912
36924
  GeometryCollection: function(e, t) {
36913
- for (var n = e.geometries, r = -1, i = n.length; ++r < i;) To(n[r], t);
36925
+ for (var n = e.geometries, r = -1, i = n.length; ++r < i;) Do(n[r], t);
36914
36926
  }
36915
36927
  };
36916
- function Oo(e, t, n) {
36928
+ function Ao(e, t, n) {
36917
36929
  var r = -1, i = e.length - n, a;
36918
36930
  for (t.lineStart(); ++r < i;) a = e[r], t.point(a[0], a[1], a[2]);
36919
36931
  t.lineEnd();
36920
36932
  }
36921
- function ko(e, t) {
36933
+ function jo(e, t) {
36922
36934
  var n = -1, r = e.length;
36923
- for (t.polygonStart(); ++n < r;) Oo(e[n], t, 1);
36935
+ for (t.polygonStart(); ++n < r;) Ao(e[n], t, 1);
36924
36936
  t.polygonEnd();
36925
36937
  }
36926
- function Ao(e, t) {
36927
- e && Eo.hasOwnProperty(e.type) ? Eo[e.type](e, t) : To(e, t);
36938
+ function Mo(e, t) {
36939
+ e && Oo.hasOwnProperty(e.type) ? Oo[e.type](e, t) : Do(e, t);
36928
36940
  }
36929
36941
  //#endregion
36930
36942
  //#region node_modules/d3-geo/src/cartesian.js
36931
- function jo(e) {
36932
- return [po(e[1], e[0]), Co(e[2])];
36943
+ function No(e) {
36944
+ return [ho(e[1], e[0]), To(e[2])];
36933
36945
  }
36934
- function Mo(e) {
36935
- var t = e[0], n = e[1], r = mo(n);
36946
+ function Po(e) {
36947
+ var t = e[0], n = e[1], r = go(n);
36936
36948
  return [
36937
- r * mo(t),
36938
- r * vo(t),
36939
- vo(n)
36949
+ r * go(t),
36950
+ r * bo(t),
36951
+ bo(n)
36940
36952
  ];
36941
36953
  }
36942
- function No(e, t) {
36954
+ function Fo(e, t) {
36943
36955
  return e[0] * t[0] + e[1] * t[1] + e[2] * t[2];
36944
36956
  }
36945
- function Po(e, t) {
36957
+ function Io(e, t) {
36946
36958
  return [
36947
36959
  e[1] * t[2] - e[2] * t[1],
36948
36960
  e[2] * t[0] - e[0] * t[2],
36949
36961
  e[0] * t[1] - e[1] * t[0]
36950
36962
  ];
36951
36963
  }
36952
- function Fo(e, t) {
36964
+ function Lo(e, t) {
36953
36965
  e[0] += t[0], e[1] += t[1], e[2] += t[2];
36954
36966
  }
36955
- function Io(e, t) {
36967
+ function Ro(e, t) {
36956
36968
  return [
36957
36969
  e[0] * t,
36958
36970
  e[1] * t,
36959
36971
  e[2] * t
36960
36972
  ];
36961
36973
  }
36962
- function Lo(e) {
36963
- var t = bo(e[0] * e[0] + e[1] * e[1] + e[2] * e[2]);
36974
+ function zo(e) {
36975
+ var t = So(e[0] * e[0] + e[1] * e[1] + e[2] * e[2]);
36964
36976
  e[0] /= t, e[1] /= t, e[2] /= t;
36965
36977
  }
36966
36978
  //#endregion
36967
36979
  //#region node_modules/d3-geo/src/compose.js
36968
- function Ro(e, t) {
36980
+ function Bo(e, t) {
36969
36981
  function n(n, r) {
36970
36982
  return n = e(n, r), t(n[0], n[1]);
36971
36983
  }
@@ -36975,63 +36987,63 @@ function Ro(e, t) {
36975
36987
  }
36976
36988
  //#endregion
36977
36989
  //#region node_modules/d3-geo/src/rotation.js
36978
- function zo(e, t) {
36979
- return uo(e) > io && (e -= Math.round(e / so) * so), [e, t];
36990
+ function Vo(e, t) {
36991
+ return po(e) > oo && (e -= Math.round(e / lo) * lo), [e, t];
36980
36992
  }
36981
- zo.invert = zo;
36982
- function Bo(e, t, n) {
36983
- return (e %= so) ? t || n ? Ro(Ho(e), Uo(t, n)) : Ho(e) : t || n ? Uo(t, n) : zo;
36993
+ Vo.invert = Vo;
36994
+ function Ho(e, t, n) {
36995
+ return (e %= lo) ? t || n ? Bo(Wo(e), Go(t, n)) : Wo(e) : t || n ? Go(t, n) : Vo;
36984
36996
  }
36985
- function Vo(e) {
36997
+ function Uo(e) {
36986
36998
  return function(t, n) {
36987
- return t += e, uo(t) > io && (t -= Math.round(t / so) * so), [t, n];
36999
+ return t += e, po(t) > oo && (t -= Math.round(t / lo) * lo), [t, n];
36988
37000
  };
36989
37001
  }
36990
- function Ho(e) {
36991
- var t = Vo(e);
36992
- return t.invert = Vo(-e), t;
37002
+ function Wo(e) {
37003
+ var t = Uo(e);
37004
+ return t.invert = Uo(-e), t;
36993
37005
  }
36994
- function Uo(e, t) {
36995
- var n = mo(e), r = vo(e), i = mo(t), a = vo(t);
37006
+ function Go(e, t) {
37007
+ var n = go(e), r = bo(e), i = go(t), a = bo(t);
36996
37008
  function o(e, t) {
36997
- var o = mo(t), s = mo(e) * o, c = vo(e) * o, l = vo(t), u = l * n + s * r;
36998
- return [po(c * i - u * a, s * n - l * r), Co(u * i + c * a)];
37009
+ var o = go(t), s = go(e) * o, c = bo(e) * o, l = bo(t), u = l * n + s * r;
37010
+ return [ho(c * i - u * a, s * n - l * r), To(u * i + c * a)];
36999
37011
  }
37000
37012
  return o.invert = function(e, t) {
37001
- var o = mo(t), s = mo(e) * o, c = vo(e) * o, l = vo(t), u = l * i - c * a;
37002
- return [po(c * i + l * a, s * n + u * r), Co(u * n - s * r)];
37013
+ var o = go(t), s = go(e) * o, c = bo(e) * o, l = bo(t), u = l * i - c * a;
37014
+ return [ho(c * i + l * a, s * n + u * r), To(u * n - s * r)];
37003
37015
  }, o;
37004
37016
  }
37005
- function Wo(e) {
37006
- e = Bo(e[0] * lo, e[1] * lo, e.length > 2 ? e[2] * lo : 0);
37017
+ function Ko(e) {
37018
+ e = Ho(e[0] * fo, e[1] * fo, e.length > 2 ? e[2] * fo : 0);
37007
37019
  function t(t) {
37008
- return t = e(t[0] * lo, t[1] * lo), t[0] *= co, t[1] *= co, t;
37020
+ return t = e(t[0] * fo, t[1] * fo), t[0] *= uo, t[1] *= uo, t;
37009
37021
  }
37010
37022
  return t.invert = function(t) {
37011
- return t = e.invert(t[0] * lo, t[1] * lo), t[0] *= co, t[1] *= co, t;
37023
+ return t = e.invert(t[0] * fo, t[1] * fo), t[0] *= uo, t[1] *= uo, t;
37012
37024
  }, t;
37013
37025
  }
37014
37026
  //#endregion
37015
37027
  //#region node_modules/d3-geo/src/circle.js
37016
- function Go(e, t, n, r, i, a) {
37028
+ function qo(e, t, n, r, i, a) {
37017
37029
  if (n) {
37018
- var o = mo(t), s = vo(t), c = r * n;
37019
- i == null ? (i = t + r * so, a = t - c / 2) : (i = Ko(o, i), a = Ko(o, a), (r > 0 ? i < a : i > a) && (i += r * so));
37020
- for (var l, u = i; r > 0 ? u > a : u < a; u -= c) l = jo([
37030
+ var o = go(t), s = bo(t), c = r * n;
37031
+ i == null ? (i = t + r * lo, a = t - c / 2) : (i = Jo(o, i), a = Jo(o, a), (r > 0 ? i < a : i > a) && (i += r * lo));
37032
+ for (var l, u = i; r > 0 ? u > a : u < a; u -= c) l = No([
37021
37033
  o,
37022
- -s * mo(u),
37023
- -s * vo(u)
37034
+ -s * go(u),
37035
+ -s * bo(u)
37024
37036
  ]), e.point(l[0], l[1]);
37025
37037
  }
37026
37038
  }
37027
- function Ko(e, t) {
37028
- t = Mo(t), t[0] -= e, Lo(t);
37029
- var n = So(-t[1]);
37030
- return ((-t[2] < 0 ? -n : n) + so - ro) % so;
37039
+ function Jo(e, t) {
37040
+ t = Po(t), t[0] -= e, zo(t);
37041
+ var n = wo(-t[1]);
37042
+ return ((-t[2] < 0 ? -n : n) + lo - ao) % lo;
37031
37043
  }
37032
37044
  //#endregion
37033
37045
  //#region node_modules/d3-geo/src/clip/buffer.js
37034
- function qo() {
37046
+ function Yo() {
37035
37047
  var e = [], t;
37036
37048
  return {
37037
37049
  point: function(e, n, r) {
@@ -37044,7 +37056,7 @@ function qo() {
37044
37056
  lineStart: function() {
37045
37057
  e.push(t = []);
37046
37058
  },
37047
- lineEnd: wo,
37059
+ lineEnd: Eo,
37048
37060
  rejoin: function() {
37049
37061
  e.length > 1 && e.push(e.pop().concat(e.shift()));
37050
37062
  },
@@ -37056,31 +37068,31 @@ function qo() {
37056
37068
  }
37057
37069
  //#endregion
37058
37070
  //#region node_modules/d3-geo/src/pointEqual.js
37059
- function Jo(e, t) {
37060
- return uo(e[0] - t[0]) < 1e-6 && uo(e[1] - t[1]) < 1e-6;
37071
+ function Xo(e, t) {
37072
+ return po(e[0] - t[0]) < 1e-6 && po(e[1] - t[1]) < 1e-6;
37061
37073
  }
37062
37074
  //#endregion
37063
37075
  //#region node_modules/d3-geo/src/clip/rejoin.js
37064
- function Yo(e, t, n, r) {
37076
+ function Zo(e, t, n, r) {
37065
37077
  this.x = e, this.z = t, this.o = n, this.e = r, this.v = !1, this.n = this.p = null;
37066
37078
  }
37067
- function Xo(e, t, n, r, i) {
37079
+ function Qo(e, t, n, r, i) {
37068
37080
  var a = [], o = [], s, c;
37069
37081
  if (e.forEach(function(e) {
37070
37082
  if (!((t = e.length - 1) <= 0)) {
37071
37083
  var t, n = e[0], r = e[t], c;
37072
- if (Jo(n, r)) {
37084
+ if (Xo(n, r)) {
37073
37085
  if (!n[2] && !r[2]) {
37074
37086
  for (i.lineStart(), s = 0; s < t; ++s) i.point((n = e[s])[0], n[1]);
37075
37087
  i.lineEnd();
37076
37088
  return;
37077
37089
  }
37078
- r[0] += 2 * ro;
37090
+ r[0] += 2 * ao;
37079
37091
  }
37080
- a.push(c = new Yo(n, e, null, !0)), o.push(c.o = new Yo(n, null, c, !1)), a.push(c = new Yo(r, e, null, !1)), o.push(c.o = new Yo(r, null, c, !0));
37092
+ a.push(c = new Zo(n, e, null, !0)), o.push(c.o = new Zo(n, null, c, !1)), a.push(c = new Zo(r, e, null, !1)), o.push(c.o = new Zo(r, null, c, !0));
37081
37093
  }
37082
37094
  }), a.length) {
37083
- for (o.sort(t), Zo(a), Zo(o), s = 0, c = o.length; s < c; ++s) o[s].e = n = !n;
37095
+ for (o.sort(t), $o(a), $o(o), s = 0, c = o.length; s < c; ++s) o[s].e = n = !n;
37084
37096
  for (var l = a[0], u, d;;) {
37085
37097
  for (var f = l, p = !0; f.v;) if ((f = f.n) === l) return;
37086
37098
  u = f.z, i.lineStart();
@@ -37100,7 +37112,7 @@ function Xo(e, t, n, r, i) {
37100
37112
  }
37101
37113
  }
37102
37114
  }
37103
- function Zo(e) {
37115
+ function $o(e) {
37104
37116
  if (t = e.length) {
37105
37117
  for (var t, n = 0, r = e[0], i; ++n < t;) r.n = i = e[n], i.p = r, r = i;
37106
37118
  r.n = i = e[0], i.p = r;
@@ -37108,24 +37120,24 @@ function Zo(e) {
37108
37120
  }
37109
37121
  //#endregion
37110
37122
  //#region node_modules/d3-geo/src/polygonContains.js
37111
- function Qo(e) {
37112
- return uo(e[0]) <= io ? e[0] : yo(e[0]) * ((uo(e[0]) + io) % so - io);
37123
+ function es(e) {
37124
+ return po(e[0]) <= oo ? e[0] : xo(e[0]) * ((po(e[0]) + oo) % lo - oo);
37113
37125
  }
37114
- function $o(e, t) {
37115
- var n = Qo(t), r = t[1], i = vo(r), a = [
37116
- vo(n),
37117
- -mo(n),
37126
+ function ts(e, t) {
37127
+ var n = es(t), r = t[1], i = bo(r), a = [
37128
+ bo(n),
37129
+ -go(n),
37118
37130
  0
37119
37131
  ], o = 0, s = 0, c = new U();
37120
- i === 1 ? r = ao + ro : i === -1 && (r = -ao - ro);
37121
- 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 = Qo(p), h = p[1] / 2 + oo, g = vo(h), _ = mo(h), v = 0; v < f; ++v, m = b, g = S, _ = C, p = y) {
37122
- var y = d[v], b = Qo(y), x = y[1] / 2 + oo, S = vo(x), C = mo(x), w = b - m, T = w >= 0 ? 1 : -1, E = T * w, D = E > io, O = g * S;
37123
- if (c.add(po(O * T * vo(E), _ * C + O * mo(E))), o += D ? w + T * so : w, D ^ m >= n ^ b >= n) {
37124
- var k = Po(Mo(p), Mo(y));
37125
- Lo(k);
37126
- var A = Po(a, k);
37127
- Lo(A);
37128
- var j = (D ^ w >= 0 ? -1 : 1) * Co(A[2]);
37132
+ i === 1 ? r = so + ao : i === -1 && (r = -so - ao);
37133
+ 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 = es(p), h = p[1] / 2 + co, g = bo(h), _ = go(h), v = 0; v < f; ++v, m = b, g = S, _ = C, p = y) {
37134
+ var y = d[v], b = es(y), x = y[1] / 2 + co, S = bo(x), C = go(x), w = b - m, T = w >= 0 ? 1 : -1, E = T * w, D = E > oo, O = g * S;
37135
+ if (c.add(ho(O * T * bo(E), _ * C + O * go(E))), o += D ? w + T * lo : w, D ^ m >= n ^ b >= n) {
37136
+ var k = Io(Po(p), Po(y));
37137
+ zo(k);
37138
+ var A = Io(a, k);
37139
+ zo(A);
37140
+ var j = (D ^ w >= 0 ? -1 : 1) * To(A[2]);
37129
37141
  (r > j || r === j && (k[0] || k[1])) && (s += D ^ w >= 0 ? 1 : -1);
37130
37142
  }
37131
37143
  }
@@ -37133,9 +37145,9 @@ function $o(e, t) {
37133
37145
  }
37134
37146
  //#endregion
37135
37147
  //#region node_modules/d3-geo/src/clip/index.js
37136
- function es(e, t, n, r) {
37148
+ function ns(e, t, n, r) {
37137
37149
  return function(i) {
37138
- var a = t(i), o = qo(), s = t(o), c = !1, l, u, d, f = {
37150
+ var a = t(i), o = Yo(), s = t(o), c = !1, l, u, d, f = {
37139
37151
  point: p,
37140
37152
  lineStart: h,
37141
37153
  lineEnd: g,
@@ -37144,8 +37156,8 @@ function es(e, t, n, r) {
37144
37156
  },
37145
37157
  polygonEnd: function() {
37146
37158
  f.point = p, f.lineStart = h, f.lineEnd = g, u = Wt(u);
37147
- var e = $o(l, r);
37148
- u.length ? (c ||= (i.polygonStart(), !0), Xo(u, ns, e, n, i)) : e && (c ||= (i.polygonStart(), !0), i.lineStart(), n(null, null, 1, i), i.lineEnd()), c &&= (i.polygonEnd(), !1), u = l = null;
37159
+ var e = ts(l, r);
37160
+ u.length ? (c ||= (i.polygonStart(), !0), Qo(u, is, e, n, i)) : e && (c ||= (i.polygonStart(), !0), i.lineStart(), n(null, null, 1, i), i.lineEnd()), c &&= (i.polygonEnd(), !1), u = l = null;
37149
37161
  },
37150
37162
  sphere: function() {
37151
37163
  i.polygonStart(), i.lineStart(), n(null, null, 1, i), i.lineEnd(), i.polygonEnd();
@@ -37180,32 +37192,32 @@ function es(e, t, n, r) {
37180
37192
  }
37181
37193
  return;
37182
37194
  }
37183
- r > 1 && e & 2 && t.push(t.pop().concat(t.shift())), u.push(t.filter(ts));
37195
+ r > 1 && e & 2 && t.push(t.pop().concat(t.shift())), u.push(t.filter(rs));
37184
37196
  }
37185
37197
  }
37186
37198
  return f;
37187
37199
  };
37188
37200
  }
37189
- function ts(e) {
37201
+ function rs(e) {
37190
37202
  return e.length > 1;
37191
37203
  }
37192
- function ns(e, t) {
37193
- return ((e = e.x)[0] < 0 ? e[1] - ao - ro : ao - e[1]) - ((t = t.x)[0] < 0 ? t[1] - ao - ro : ao - t[1]);
37204
+ function is(e, t) {
37205
+ return ((e = e.x)[0] < 0 ? e[1] - so - ao : so - e[1]) - ((t = t.x)[0] < 0 ? t[1] - so - ao : so - t[1]);
37194
37206
  }
37195
37207
  //#endregion
37196
37208
  //#region node_modules/d3-geo/src/clip/antimeridian.js
37197
- var rs = es(function() {
37209
+ var as = ns(function() {
37198
37210
  return !0;
37199
- }, is, os, [-io, -ao]);
37200
- function is(e) {
37211
+ }, os, cs, [-oo, -so]);
37212
+ function os(e) {
37201
37213
  var t = NaN, n = NaN, r = NaN, i;
37202
37214
  return {
37203
37215
  lineStart: function() {
37204
37216
  e.lineStart(), i = 1;
37205
37217
  },
37206
37218
  point: function(a, o) {
37207
- var s = a > 0 ? io : -io, c = uo(a - t);
37208
- uo(c - io) < 1e-6 ? (e.point(t, n = (n + o) / 2 > 0 ? ao : -ao), e.point(r, n), e.lineEnd(), e.lineStart(), e.point(s, n), e.point(a, n), i = 0) : r !== s && c >= io && (uo(t - r) < 1e-6 && (t -= r * ro), uo(a - s) < 1e-6 && (a -= s * ro), n = as(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;
37219
+ var s = a > 0 ? oo : -oo, c = po(a - t);
37220
+ po(c - oo) < 1e-6 ? (e.point(t, n = (n + o) / 2 > 0 ? so : -so), e.point(r, n), e.lineEnd(), e.lineStart(), e.point(s, n), e.point(a, n), i = 0) : r !== s && c >= oo && (po(t - r) < 1e-6 && (t -= r * ao), po(a - s) < 1e-6 && (a -= s * ao), n = ss(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;
37209
37221
  },
37210
37222
  lineEnd: function() {
37211
37223
  e.lineEnd(), t = n = NaN;
@@ -37215,27 +37227,27 @@ function is(e) {
37215
37227
  }
37216
37228
  };
37217
37229
  }
37218
- function as(e, t, n, r) {
37219
- var i, a, o = vo(e - n);
37220
- return uo(o) > 1e-6 ? fo((vo(t) * (a = mo(r)) * vo(n) - vo(r) * (i = mo(t)) * vo(e)) / (i * a * o)) : (t + r) / 2;
37230
+ function ss(e, t, n, r) {
37231
+ var i, a, o = bo(e - n);
37232
+ return po(o) > 1e-6 ? mo((bo(t) * (a = go(r)) * bo(n) - bo(r) * (i = go(t)) * bo(e)) / (i * a * o)) : (t + r) / 2;
37221
37233
  }
37222
- function os(e, t, n, r) {
37234
+ function cs(e, t, n, r) {
37223
37235
  var i;
37224
- if (e == null) i = n * ao, r.point(-io, i), r.point(0, i), r.point(io, i), r.point(io, 0), r.point(io, -i), r.point(0, -i), r.point(-io, -i), r.point(-io, 0), r.point(-io, i);
37225
- else if (uo(e[0] - t[0]) > 1e-6) {
37226
- var a = e[0] < t[0] ? io : -io;
37236
+ if (e == null) i = n * so, r.point(-oo, i), r.point(0, i), r.point(oo, i), r.point(oo, 0), r.point(oo, -i), r.point(0, -i), r.point(-oo, -i), r.point(-oo, 0), r.point(-oo, i);
37237
+ else if (po(e[0] - t[0]) > 1e-6) {
37238
+ var a = e[0] < t[0] ? oo : -oo;
37227
37239
  i = n * a / 2, r.point(-a, i), r.point(0, i), r.point(a, i);
37228
37240
  } else r.point(t[0], t[1]);
37229
37241
  }
37230
37242
  //#endregion
37231
37243
  //#region node_modules/d3-geo/src/clip/circle.js
37232
- function ss(e) {
37233
- var t = mo(e), n = 2 * lo, r = t > 0, i = uo(t) > ro;
37244
+ function ls(e) {
37245
+ var t = go(e), n = 2 * fo, r = t > 0, i = po(t) > ao;
37234
37246
  function a(t, r, i, a) {
37235
- Go(a, e, n, i, t, r);
37247
+ qo(a, e, n, i, t, r);
37236
37248
  }
37237
37249
  function o(e, n) {
37238
- return mo(e) * mo(n) > t;
37250
+ return go(e) * go(n) > t;
37239
37251
  }
37240
37252
  function s(e) {
37241
37253
  var t, n, a, s, u;
@@ -37244,13 +37256,13 @@ function ss(e) {
37244
37256
  s = a = !1, u = 1;
37245
37257
  },
37246
37258
  point: function(d, f) {
37247
- var p = [d, f], m, h = o(d, f), g = r ? h ? 0 : l(d, f) : h ? l(d + (d < 0 ? io : -io), f) : 0;
37248
- if (!t && (s = a = h) && e.lineStart(), h !== a && (m = c(t, p), (!m || Jo(t, m) || Jo(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;
37259
+ var p = [d, f], m, h = o(d, f), g = r ? h ? 0 : l(d, f) : h ? l(d + (d < 0 ? oo : -oo), f) : 0;
37260
+ if (!t && (s = a = h) && e.lineStart(), h !== a && (m = c(t, p), (!m || Xo(t, m) || Xo(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;
37249
37261
  else if (i && t && r ^ h) {
37250
37262
  var _;
37251
37263
  !(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)));
37252
37264
  }
37253
- h && (!t || !Jo(t, p)) && e.point(p[0], p[1]), t = p, a = h, n = g;
37265
+ h && (!t || !Xo(t, p)) && e.point(p[0], p[1]), t = p, a = h, n = g;
37254
37266
  },
37255
37267
  lineEnd: function() {
37256
37268
  a && e.lineEnd(), t = null;
@@ -37261,36 +37273,36 @@ function ss(e) {
37261
37273
  };
37262
37274
  }
37263
37275
  function c(e, n, r) {
37264
- var i = Mo(e), a = Mo(n), o = [
37276
+ var i = Po(e), a = Po(n), o = [
37265
37277
  1,
37266
37278
  0,
37267
37279
  0
37268
- ], s = Po(i, a), c = No(s, s), l = s[0], u = c - l * l;
37280
+ ], s = Io(i, a), c = Fo(s, s), l = s[0], u = c - l * l;
37269
37281
  if (!u) return !r && e;
37270
- var d = t * c / u, f = -t * l / u, p = Po(o, s), m = Io(o, d);
37271
- Fo(m, Io(s, f));
37272
- var h = p, g = No(m, h), _ = No(h, h), v = g * g - _ * (No(m, m) - 1);
37282
+ var d = t * c / u, f = -t * l / u, p = Io(o, s), m = Ro(o, d);
37283
+ Lo(m, Ro(s, f));
37284
+ var h = p, g = Fo(m, h), _ = Fo(h, h), v = g * g - _ * (Fo(m, m) - 1);
37273
37285
  if (!(v < 0)) {
37274
- var y = bo(v), b = Io(h, (-g - y) / _);
37275
- if (Fo(b, m), b = jo(b), !r) return b;
37286
+ var y = So(v), b = Ro(h, (-g - y) / _);
37287
+ if (Lo(b, m), b = No(b), !r) return b;
37276
37288
  var x = e[0], S = n[0], C = e[1], w = n[1], T;
37277
37289
  S < x && (T = x, x = S, S = T);
37278
- var E = S - x, D = uo(E - io) < ro, O = D || E < 1e-6;
37279
- if (!D && w < C && (T = C, C = w, w = T), O ? D ? C + w > 0 ^ b[1] < (uo(b[0] - x) < 1e-6 ? C : w) : C <= b[1] && b[1] <= w : E > io ^ (x <= b[0] && b[0] <= S)) {
37280
- var k = Io(h, (-g + y) / _);
37281
- return Fo(k, m), [b, jo(k)];
37290
+ var E = S - x, D = po(E - oo) < ao, O = D || E < 1e-6;
37291
+ if (!D && w < C && (T = C, C = w, w = T), O ? D ? C + w > 0 ^ b[1] < (po(b[0] - x) < 1e-6 ? C : w) : C <= b[1] && b[1] <= w : E > oo ^ (x <= b[0] && b[0] <= S)) {
37292
+ var k = Ro(h, (-g + y) / _);
37293
+ return Lo(k, m), [b, No(k)];
37282
37294
  }
37283
37295
  }
37284
37296
  }
37285
37297
  function l(t, n) {
37286
- var i = r ? e : io - e, a = 0;
37298
+ var i = r ? e : oo - e, a = 0;
37287
37299
  return t < -i ? a |= 1 : t > i && (a |= 2), n < -i ? a |= 4 : n > i && (a |= 8), a;
37288
37300
  }
37289
- return es(o, s, a, r ? [0, -e] : [-io, e - io]);
37301
+ return ns(o, s, a, r ? [0, -e] : [-oo, e - oo]);
37290
37302
  }
37291
37303
  //#endregion
37292
37304
  //#region node_modules/d3-geo/src/clip/line.js
37293
- function cs(e, t, n, r, i, a) {
37305
+ function us(e, t, n, r, i, a) {
37294
37306
  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;
37295
37307
  if (!(!f && m > 0)) {
37296
37308
  if (m /= f, f < 0) {
@@ -37332,8 +37344,8 @@ function cs(e, t, n, r, i, a) {
37332
37344
  }
37333
37345
  //#endregion
37334
37346
  //#region node_modules/d3-geo/src/clip/rectangle.js
37335
- var ls = 1e9, us = -ls;
37336
- function ds(e, t, n, r) {
37347
+ var ds = 1e9, fs = -ds;
37348
+ function ps(e, t, n, r) {
37337
37349
  function i(i, a) {
37338
37350
  return e <= i && i <= n && t <= a && a <= r;
37339
37351
  }
@@ -37345,7 +37357,7 @@ function ds(e, t, n, r) {
37345
37357
  else l.point(a[0], a[1]);
37346
37358
  }
37347
37359
  function o(r, i) {
37348
- return uo(r[0] - e) < 1e-6 ? i > 0 ? 0 : 3 : uo(r[0] - n) < 1e-6 ? i > 0 ? 2 : 1 : uo(r[1] - t) < 1e-6 ? i > 0 ? 1 : 0 : i > 0 ? 3 : 2;
37360
+ return po(r[0] - e) < 1e-6 ? i > 0 ? 0 : 3 : po(r[0] - n) < 1e-6 ? i > 0 ? 2 : 1 : po(r[1] - t) < 1e-6 ? i > 0 ? 1 : 0 : i > 0 ? 3 : 2;
37349
37361
  }
37350
37362
  function s(e, t) {
37351
37363
  return c(e.x, t.x);
@@ -37355,7 +37367,7 @@ function ds(e, t, n, r) {
37355
37367
  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;
37356
37368
  }
37357
37369
  return function(o) {
37358
- var c = o, l = qo(), u, d, f, p, m, h, g, _, v, y, b, x = {
37370
+ var c = o, l = Yo(), u, d, f, p, m, h, g, _, v, y, b, x = {
37359
37371
  point: S,
37360
37372
  lineStart: E,
37361
37373
  lineEnd: D,
@@ -37374,7 +37386,7 @@ function ds(e, t, n, r) {
37374
37386
  }
37375
37387
  function T() {
37376
37388
  var e = C(), t = b && e, n = (u = Wt(u)).length;
37377
- (t || n) && (o.polygonStart(), t && (o.lineStart(), a(null, null, 1, o), o.lineEnd()), n && Xo(u, s, e, a, o), o.polygonEnd()), c = o, u = d = f = null;
37389
+ (t || n) && (o.polygonStart(), t && (o.lineStart(), a(null, null, 1, o), o.lineEnd()), n && Qo(u, s, e, a, o), o.polygonEnd()), c = o, u = d = f = null;
37378
37390
  }
37379
37391
  function E() {
37380
37392
  x.point = O, d && d.push(f = []), y = !0, v = !1, g = _ = NaN;
@@ -37387,8 +37399,8 @@ function ds(e, t, n, r) {
37387
37399
  if (d && f.push([a, o]), y) p = a, m = o, h = s, y = !1, s && (c.lineStart(), c.point(a, o));
37388
37400
  else if (s && v) c.point(a, o);
37389
37401
  else {
37390
- var l = [g = Math.max(us, Math.min(ls, g)), _ = Math.max(us, Math.min(ls, _))], u = [a = Math.max(us, Math.min(ls, a)), o = Math.max(us, Math.min(ls, o))];
37391
- cs(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);
37402
+ var l = [g = Math.max(fs, Math.min(ds, g)), _ = Math.max(fs, Math.min(ds, _))], u = [a = Math.max(fs, Math.min(ds, a)), o = Math.max(fs, Math.min(ds, o))];
37403
+ us(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);
37392
37404
  }
37393
37405
  g = a, _ = o, v = s;
37394
37406
  }
@@ -37397,23 +37409,23 @@ function ds(e, t, n, r) {
37397
37409
  }
37398
37410
  //#endregion
37399
37411
  //#region node_modules/d3-geo/src/graticule.js
37400
- function fs(e, t, n) {
37401
- var r = Gt(e, t - ro, n).concat(t);
37412
+ function ms(e, t, n) {
37413
+ var r = Gt(e, t - ao, n).concat(t);
37402
37414
  return function(e) {
37403
37415
  return r.map(function(t) {
37404
37416
  return [e, t];
37405
37417
  });
37406
37418
  };
37407
37419
  }
37408
- function ps(e, t, n) {
37409
- var r = Gt(e, t - ro, n).concat(t);
37420
+ function hs(e, t, n) {
37421
+ var r = Gt(e, t - ao, n).concat(t);
37410
37422
  return function(e) {
37411
37423
  return r.map(function(t) {
37412
37424
  return [t, e];
37413
37425
  });
37414
37426
  };
37415
37427
  }
37416
- function ms() {
37428
+ function gs() {
37417
37429
  var e, t, n, r, i, a, o, s, c = 10, l = c, u = 90, d = 360, f, p, m, h, g = 2.5;
37418
37430
  function _() {
37419
37431
  return {
@@ -37422,10 +37434,10 @@ function ms() {
37422
37434
  };
37423
37435
  }
37424
37436
  function v() {
37425
- return Gt(ho(r / u) * u, n, u).map(m).concat(Gt(ho(s / d) * d, o, d).map(h)).concat(Gt(ho(t / c) * c, e, c).filter(function(e) {
37426
- return uo(e % u) > ro;
37427
- }).map(f)).concat(Gt(ho(a / l) * l, i, l).filter(function(e) {
37428
- return uo(e % d) > ro;
37437
+ return Gt(_o(r / u) * u, n, u).map(m).concat(Gt(_o(s / d) * d, o, d).map(h)).concat(Gt(_o(t / c) * c, e, c).filter(function(e) {
37438
+ return po(e % u) > ao;
37439
+ }).map(f)).concat(Gt(_o(a / l) * l, i, l).filter(function(e) {
37440
+ return po(e % d) > ao;
37429
37441
  }).map(p));
37430
37442
  }
37431
37443
  return _.lines = function() {
@@ -37453,106 +37465,106 @@ function ms() {
37453
37465
  }, _.stepMinor = function(e) {
37454
37466
  return arguments.length ? (c = +e[0], l = +e[1], _) : [c, l];
37455
37467
  }, _.precision = function(c) {
37456
- return arguments.length ? (g = +c, f = fs(a, i, 90), p = ps(t, e, g), m = fs(s, o, 90), h = ps(r, n, g), _) : g;
37457
- }, _.extentMajor([[-180, -90 + ro], [180, 90 - ro]]).extentMinor([[-180, -80 - ro], [180, 80 + ro]]);
37468
+ return arguments.length ? (g = +c, f = ms(a, i, 90), p = hs(t, e, g), m = ms(s, o, 90), h = hs(r, n, g), _) : g;
37469
+ }, _.extentMajor([[-180, -90 + ao], [180, 90 - ao]]).extentMinor([[-180, -80 - ao], [180, 80 + ao]]);
37458
37470
  }
37459
37471
  //#endregion
37460
37472
  //#region node_modules/d3-geo/src/identity.js
37461
- var hs = (e) => e, gs = new U(), _s = new U(), vs, ys, bs, xs, Ss = {
37462
- point: wo,
37463
- lineStart: wo,
37464
- lineEnd: wo,
37473
+ var _s = (e) => e, vs = new U(), ys = new U(), bs, xs, Ss, Cs, ws = {
37474
+ point: Eo,
37475
+ lineStart: Eo,
37476
+ lineEnd: Eo,
37465
37477
  polygonStart: function() {
37466
- Ss.lineStart = Cs, Ss.lineEnd = Es;
37478
+ ws.lineStart = Ts, ws.lineEnd = Os;
37467
37479
  },
37468
37480
  polygonEnd: function() {
37469
- Ss.lineStart = Ss.lineEnd = Ss.point = wo, gs.add(uo(_s)), _s = new U();
37481
+ ws.lineStart = ws.lineEnd = ws.point = Eo, vs.add(po(ys)), ys = new U();
37470
37482
  },
37471
37483
  result: function() {
37472
- var e = gs / 2;
37473
- return gs = new U(), e;
37484
+ var e = vs / 2;
37485
+ return vs = new U(), e;
37474
37486
  }
37475
37487
  };
37476
- function Cs() {
37477
- Ss.point = ws;
37488
+ function Ts() {
37489
+ ws.point = Es;
37478
37490
  }
37479
- function ws(e, t) {
37480
- Ss.point = Ts, vs = bs = e, ys = xs = t;
37491
+ function Es(e, t) {
37492
+ ws.point = Ds, bs = Ss = e, xs = Cs = t;
37481
37493
  }
37482
- function Ts(e, t) {
37483
- _s.add(xs * e - bs * t), bs = e, xs = t;
37494
+ function Ds(e, t) {
37495
+ ys.add(Cs * e - Ss * t), Ss = e, Cs = t;
37484
37496
  }
37485
- function Es() {
37486
- Ts(vs, ys);
37497
+ function Os() {
37498
+ Ds(bs, xs);
37487
37499
  }
37488
37500
  //#endregion
37489
37501
  //#region node_modules/d3-geo/src/path/bounds.js
37490
- var Ds = Infinity, Os = Ds, ks = -Ds, As = ks, js = {
37491
- point: Ms,
37492
- lineStart: wo,
37493
- lineEnd: wo,
37494
- polygonStart: wo,
37495
- polygonEnd: wo,
37502
+ var ks = Infinity, As = ks, js = -ks, Ms = js, Ns = {
37503
+ point: Ps,
37504
+ lineStart: Eo,
37505
+ lineEnd: Eo,
37506
+ polygonStart: Eo,
37507
+ polygonEnd: Eo,
37496
37508
  result: function() {
37497
- var e = [[Ds, Os], [ks, As]];
37498
- return ks = As = -(Os = Ds = Infinity), e;
37509
+ var e = [[ks, As], [js, Ms]];
37510
+ return js = Ms = -(As = ks = Infinity), e;
37499
37511
  }
37500
37512
  };
37501
- function Ms(e, t) {
37502
- e < Ds && (Ds = e), e > ks && (ks = e), t < Os && (Os = t), t > As && (As = t);
37513
+ function Ps(e, t) {
37514
+ e < ks && (ks = e), e > js && (js = e), t < As && (As = t), t > Ms && (Ms = t);
37503
37515
  }
37504
37516
  //#endregion
37505
37517
  //#region node_modules/d3-geo/src/path/centroid.js
37506
- var Ns = 0, Ps = 0, Fs = 0, Is = 0, Ls = 0, Rs = 0, zs = 0, Bs = 0, Vs = 0, Hs, Us, Ws, Gs, Ks = {
37507
- point: qs,
37508
- lineStart: Js,
37509
- lineEnd: Zs,
37518
+ var Fs = 0, Is = 0, Ls = 0, Rs = 0, zs = 0, Bs = 0, Vs = 0, Hs = 0, Us = 0, Ws, Gs, Ks, qs, Js = {
37519
+ point: Ys,
37520
+ lineStart: Xs,
37521
+ lineEnd: $s,
37510
37522
  polygonStart: function() {
37511
- Ks.lineStart = Qs, Ks.lineEnd = $s;
37523
+ Js.lineStart = ec, Js.lineEnd = tc;
37512
37524
  },
37513
37525
  polygonEnd: function() {
37514
- Ks.point = qs, Ks.lineStart = Js, Ks.lineEnd = Zs;
37526
+ Js.point = Ys, Js.lineStart = Xs, Js.lineEnd = $s;
37515
37527
  },
37516
37528
  result: function() {
37517
- var e = Vs ? [zs / Vs, Bs / Vs] : Rs ? [Is / Rs, Ls / Rs] : Fs ? [Ns / Fs, Ps / Fs] : [NaN, NaN];
37518
- return Ns = Ps = Fs = Is = Ls = Rs = zs = Bs = Vs = 0, e;
37529
+ var e = Us ? [Vs / Us, Hs / Us] : Bs ? [Rs / Bs, zs / Bs] : Ls ? [Fs / Ls, Is / Ls] : [NaN, NaN];
37530
+ return Fs = Is = Ls = Rs = zs = Bs = Vs = Hs = Us = 0, e;
37519
37531
  }
37520
37532
  };
37521
- function qs(e, t) {
37522
- Ns += e, Ps += t, ++Fs;
37523
- }
37524
- function Js() {
37525
- Ks.point = Ys;
37526
- }
37527
37533
  function Ys(e, t) {
37528
- Ks.point = Xs, qs(Ws = e, Gs = t);
37534
+ Fs += e, Is += t, ++Ls;
37529
37535
  }
37530
- function Xs(e, t) {
37531
- var n = e - Ws, r = t - Gs, i = bo(n * n + r * r);
37532
- Is += i * (Ws + e) / 2, Ls += i * (Gs + t) / 2, Rs += i, qs(Ws = e, Gs = t);
37536
+ function Xs() {
37537
+ Js.point = Zs;
37533
37538
  }
37534
- function Zs() {
37535
- Ks.point = qs;
37539
+ function Zs(e, t) {
37540
+ Js.point = Qs, Ys(Ks = e, qs = t);
37536
37541
  }
37537
- function Qs() {
37538
- Ks.point = ec;
37542
+ function Qs(e, t) {
37543
+ var n = e - Ks, r = t - qs, i = So(n * n + r * r);
37544
+ Rs += i * (Ks + e) / 2, zs += i * (qs + t) / 2, Bs += i, Ys(Ks = e, qs = t);
37539
37545
  }
37540
37546
  function $s() {
37541
- tc(Hs, Us);
37547
+ Js.point = Ys;
37548
+ }
37549
+ function ec() {
37550
+ Js.point = nc;
37551
+ }
37552
+ function tc() {
37553
+ rc(Ws, Gs);
37542
37554
  }
37543
- function ec(e, t) {
37544
- Ks.point = tc, qs(Hs = Ws = e, Us = Gs = t);
37555
+ function nc(e, t) {
37556
+ Js.point = rc, Ys(Ws = Ks = e, Gs = qs = t);
37545
37557
  }
37546
- function tc(e, t) {
37547
- var n = e - Ws, r = t - Gs, i = bo(n * n + r * r);
37548
- Is += i * (Ws + e) / 2, Ls += i * (Gs + t) / 2, Rs += i, i = Gs * e - Ws * t, zs += i * (Ws + e), Bs += i * (Gs + t), Vs += i * 3, qs(Ws = e, Gs = t);
37558
+ function rc(e, t) {
37559
+ var n = e - Ks, r = t - qs, i = So(n * n + r * r);
37560
+ Rs += i * (Ks + e) / 2, zs += i * (qs + t) / 2, Bs += i, i = qs * e - Ks * t, Vs += i * (Ks + e), Hs += i * (qs + t), Us += i * 3, Ys(Ks = e, qs = t);
37549
37561
  }
37550
37562
  //#endregion
37551
37563
  //#region node_modules/d3-geo/src/path/context.js
37552
- function nc(e) {
37564
+ function ic(e) {
37553
37565
  this._context = e;
37554
37566
  }
37555
- nc.prototype = {
37567
+ ic.prototype = {
37556
37568
  _radius: 4.5,
37557
37569
  pointRadius: function(e) {
37558
37570
  return this._radius = e, this;
@@ -37578,44 +37590,44 @@ nc.prototype = {
37578
37590
  this._context.lineTo(e, t);
37579
37591
  break;
37580
37592
  default:
37581
- this._context.moveTo(e + this._radius, t), this._context.arc(e, t, this._radius, 0, so);
37593
+ this._context.moveTo(e + this._radius, t), this._context.arc(e, t, this._radius, 0, lo);
37582
37594
  break;
37583
37595
  }
37584
37596
  },
37585
- result: wo
37597
+ result: Eo
37586
37598
  };
37587
37599
  //#endregion
37588
37600
  //#region node_modules/d3-geo/src/path/measure.js
37589
- var rc = new U(), ic, ac, oc, sc, cc, lc = {
37590
- point: wo,
37601
+ var ac = new U(), oc, sc, cc, lc, uc, dc = {
37602
+ point: Eo,
37591
37603
  lineStart: function() {
37592
- lc.point = uc;
37604
+ dc.point = fc;
37593
37605
  },
37594
37606
  lineEnd: function() {
37595
- ic && dc(ac, oc), lc.point = wo;
37607
+ oc && pc(sc, cc), dc.point = Eo;
37596
37608
  },
37597
37609
  polygonStart: function() {
37598
- ic = !0;
37610
+ oc = !0;
37599
37611
  },
37600
37612
  polygonEnd: function() {
37601
- ic = null;
37613
+ oc = null;
37602
37614
  },
37603
37615
  result: function() {
37604
- var e = +rc;
37605
- return rc = new U(), e;
37616
+ var e = +ac;
37617
+ return ac = new U(), e;
37606
37618
  }
37607
37619
  };
37608
- function uc(e, t) {
37609
- lc.point = dc, ac = sc = e, oc = cc = t;
37620
+ function fc(e, t) {
37621
+ dc.point = pc, sc = lc = e, cc = uc = t;
37610
37622
  }
37611
- function dc(e, t) {
37612
- sc -= e, cc -= t, rc.add(bo(sc * sc + cc * cc)), sc = e, cc = t;
37623
+ function pc(e, t) {
37624
+ lc -= e, uc -= t, ac.add(So(lc * lc + uc * uc)), lc = e, uc = t;
37613
37625
  }
37614
37626
  //#endregion
37615
37627
  //#region node_modules/d3-geo/src/path/string.js
37616
- var fc, pc, mc, hc, gc = class {
37628
+ var mc, hc, gc, _c, vc = class {
37617
37629
  constructor(e) {
37618
- this._append = e == null ? _c : vc(e), this._radius = 4.5, this._ = "";
37630
+ this._append = e == null ? yc : bc(e), this._radius = 4.5, this._ = "";
37619
37631
  }
37620
37632
  pointRadius(e) {
37621
37633
  return this._radius = +e, this;
@@ -37641,11 +37653,11 @@ var fc, pc, mc, hc, gc = class {
37641
37653
  this._append`L${e},${t}`;
37642
37654
  break;
37643
37655
  default:
37644
- if (this._append`M${e},${t}`, this._radius !== mc || this._append !== pc) {
37656
+ if (this._append`M${e},${t}`, this._radius !== gc || this._append !== hc) {
37645
37657
  let e = this._radius, t = this._;
37646
- this._ = "", this._append`m0,${e}a${e},${e} 0 1,1 0,${-2 * e}a${e},${e} 0 1,1 0,${2 * e}z`, mc = e, pc = this._append, hc = this._, this._ = t;
37658
+ this._ = "", this._append`m0,${e}a${e},${e} 0 1,1 0,${-2 * e}a${e},${e} 0 1,1 0,${2 * e}z`, gc = e, hc = this._append, _c = this._, this._ = t;
37647
37659
  }
37648
- this._ += hc;
37660
+ this._ += _c;
37649
37661
  break;
37650
37662
  }
37651
37663
  }
@@ -37654,44 +37666,44 @@ var fc, pc, mc, hc, gc = class {
37654
37666
  return this._ = "", e.length ? e : null;
37655
37667
  }
37656
37668
  };
37657
- function _c(e) {
37669
+ function yc(e) {
37658
37670
  let t = 1;
37659
37671
  this._ += e[0];
37660
37672
  for (let n = e.length; t < n; ++t) this._ += arguments[t] + e[t];
37661
37673
  }
37662
- function vc(e) {
37674
+ function bc(e) {
37663
37675
  let t = Math.floor(e);
37664
37676
  if (!(t >= 0)) throw RangeError(`invalid digits: ${e}`);
37665
- if (t > 15) return _c;
37666
- if (t !== fc) {
37677
+ if (t > 15) return yc;
37678
+ if (t !== mc) {
37667
37679
  let e = 10 ** t;
37668
- fc = t, pc = function(t) {
37680
+ mc = t, hc = function(t) {
37669
37681
  let n = 1;
37670
37682
  this._ += t[0];
37671
37683
  for (let r = t.length; n < r; ++n) this._ += Math.round(arguments[n] * e) / e + t[n];
37672
37684
  };
37673
37685
  }
37674
- return pc;
37686
+ return hc;
37675
37687
  }
37676
37688
  //#endregion
37677
37689
  //#region node_modules/d3-geo/src/path/index.js
37678
- function yc(e, t) {
37690
+ function xc(e, t) {
37679
37691
  let n = 3, r = 4.5, i, a;
37680
37692
  function o(e) {
37681
- return e && (typeof r == "function" && a.pointRadius(+r.apply(this, arguments)), Ao(e, i(a))), a.result();
37693
+ return e && (typeof r == "function" && a.pointRadius(+r.apply(this, arguments)), Mo(e, i(a))), a.result();
37682
37694
  }
37683
37695
  return o.area = function(e) {
37684
- return Ao(e, i(Ss)), Ss.result();
37696
+ return Mo(e, i(ws)), ws.result();
37685
37697
  }, o.measure = function(e) {
37686
- return Ao(e, i(lc)), lc.result();
37698
+ return Mo(e, i(dc)), dc.result();
37687
37699
  }, o.bounds = function(e) {
37688
- return Ao(e, i(js)), js.result();
37700
+ return Mo(e, i(Ns)), Ns.result();
37689
37701
  }, o.centroid = function(e) {
37690
- return Ao(e, i(Ks)), Ks.result();
37702
+ return Mo(e, i(Js)), Js.result();
37691
37703
  }, o.projection = function(t) {
37692
- return arguments.length ? (i = t == null ? (e = null, hs) : (e = t).stream, o) : e;
37704
+ return arguments.length ? (i = t == null ? (e = null, _s) : (e = t).stream, o) : e;
37693
37705
  }, o.context = function(e) {
37694
- return arguments.length ? (a = e == null ? (t = null, new gc(n)) : new nc(t = e), typeof r != "function" && a.pointRadius(r), o) : t;
37706
+ return arguments.length ? (a = e == null ? (t = null, new vc(n)) : new ic(t = e), typeof r != "function" && a.pointRadius(r), o) : t;
37695
37707
  }, o.pointRadius = function(e) {
37696
37708
  return arguments.length ? (r = typeof e == "function" ? e : (a.pointRadius(+e), +e), o) : r;
37697
37709
  }, o.digits = function(e) {
@@ -37702,21 +37714,21 @@ function yc(e, t) {
37702
37714
  if (!(t >= 0)) throw RangeError(`invalid digits: ${e}`);
37703
37715
  n = t;
37704
37716
  }
37705
- return t === null && (a = new gc(n)), o;
37717
+ return t === null && (a = new vc(n)), o;
37706
37718
  }, o.projection(e).digits(n).context(t);
37707
37719
  }
37708
37720
  //#endregion
37709
37721
  //#region node_modules/d3-geo/src/transform.js
37710
- function bc(e) {
37722
+ function Sc(e) {
37711
37723
  return function(t) {
37712
- var n = new xc();
37724
+ var n = new Cc();
37713
37725
  for (var r in e) n[r] = e[r];
37714
37726
  return n.stream = t, n;
37715
37727
  };
37716
37728
  }
37717
- function xc() {}
37718
- xc.prototype = {
37719
- constructor: xc,
37729
+ function Cc() {}
37730
+ Cc.prototype = {
37731
+ constructor: Cc,
37720
37732
  point: function(e, t) {
37721
37733
  this.stream.point(e, t);
37722
37734
  },
@@ -37738,48 +37750,48 @@ xc.prototype = {
37738
37750
  };
37739
37751
  //#endregion
37740
37752
  //#region node_modules/d3-geo/src/projection/fit.js
37741
- function Sc(e, t, n) {
37753
+ function wc(e, t, n) {
37742
37754
  var r = e.clipExtent && e.clipExtent();
37743
- return e.scale(150).translate([0, 0]), r != null && e.clipExtent(null), Ao(n, e.stream(js)), t(js.result()), r != null && e.clipExtent(r), e;
37755
+ return e.scale(150).translate([0, 0]), r != null && e.clipExtent(null), Mo(n, e.stream(Ns)), t(Ns.result()), r != null && e.clipExtent(r), e;
37744
37756
  }
37745
- function Cc(e, t, n) {
37746
- return Sc(e, function(n) {
37757
+ function Tc(e, t, n) {
37758
+ return wc(e, function(n) {
37747
37759
  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;
37748
37760
  e.scale(150 * a).translate([o, s]);
37749
37761
  }, n);
37750
37762
  }
37751
- function wc(e, t, n) {
37752
- return Cc(e, [[0, 0], t], n);
37763
+ function Ec(e, t, n) {
37764
+ return Tc(e, [[0, 0], t], n);
37753
37765
  }
37754
- function Tc(e, t, n) {
37755
- return Sc(e, function(n) {
37766
+ function Dc(e, t, n) {
37767
+ return wc(e, function(n) {
37756
37768
  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];
37757
37769
  e.scale(150 * i).translate([a, o]);
37758
37770
  }, n);
37759
37771
  }
37760
- function Ec(e, t, n) {
37761
- return Sc(e, function(n) {
37772
+ function Oc(e, t, n) {
37773
+ return wc(e, function(n) {
37762
37774
  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;
37763
37775
  e.scale(150 * i).translate([a, o]);
37764
37776
  }, n);
37765
37777
  }
37766
37778
  //#endregion
37767
37779
  //#region node_modules/d3-geo/src/projection/resample.js
37768
- var Dc = 16, Oc = mo(30 * lo);
37769
- function kc(e, t) {
37770
- return +t ? jc(e, t) : Ac(e);
37780
+ var kc = 16, Ac = go(30 * fo);
37781
+ function jc(e, t) {
37782
+ return +t ? Nc(e, t) : Mc(e);
37771
37783
  }
37772
- function Ac(e) {
37773
- return bc({ point: function(t, n) {
37784
+ function Mc(e) {
37785
+ return Sc({ point: function(t, n) {
37774
37786
  t = e(t, n), this.stream.point(t[0], t[1]);
37775
37787
  } });
37776
37788
  }
37777
- function jc(e, t) {
37789
+ function Nc(e, t) {
37778
37790
  function n(r, i, a, o, s, c, l, u, d, f, p, m, h, g) {
37779
37791
  var _ = l - r, v = u - i, y = _ * _ + v * v;
37780
37792
  if (y > 4 * t && h--) {
37781
- var b = o + f, x = s + p, S = c + m, C = bo(b * b + x * x + S * S), w = Co(S /= C), T = uo(uo(S) - 1) < 1e-6 || uo(a - d) < 1e-6 ? (a + d) / 2 : po(x, b), E = e(T, w), D = E[0], O = E[1], k = D - r, A = O - i, j = v * k - _ * A;
37782
- (j * j / y > t || uo((_ * k + v * A) / y - .5) > .3 || o * f + s * p + c * m < Oc) && (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));
37793
+ var b = o + f, x = s + p, S = c + m, C = So(b * b + x * x + S * S), w = To(S /= C), T = po(po(S) - 1) < 1e-6 || po(a - d) < 1e-6 ? (a + d) / 2 : ho(x, b), E = e(T, w), D = E[0], O = E[1], k = D - r, A = O - i, j = v * k - _ * A;
37794
+ (j * j / y > t || po((_ * k + v * A) / y - .5) > .3 || o * f + s * p + c * m < Ac) && (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));
37783
37795
  }
37784
37796
  }
37785
37797
  return function(t) {
@@ -37801,8 +37813,8 @@ function jc(e, t) {
37801
37813
  u = NaN, h.point = v, t.lineStart();
37802
37814
  }
37803
37815
  function v(r, i) {
37804
- var a = Mo([r, i]), o = e(r, i);
37805
- n(u, d, l, f, p, m, u = o[0], d = o[1], l = r, f = a[0], p = a[1], m = a[2], Dc, t), t.point(u, d);
37816
+ var a = Po([r, i]), o = e(r, i);
37817
+ n(u, d, l, f, p, m, u = o[0], d = o[1], l = r, f = a[0], p = a[1], m = a[2], kc, t), t.point(u, d);
37806
37818
  }
37807
37819
  function y() {
37808
37820
  h.point = g, t.lineEnd();
@@ -37814,23 +37826,23 @@ function jc(e, t) {
37814
37826
  v(r = e, t), i = u, a = d, o = f, s = p, c = m, h.point = v;
37815
37827
  }
37816
37828
  function S() {
37817
- n(u, d, l, f, p, m, i, a, r, o, s, c, Dc, t), h.lineEnd = y, y();
37829
+ n(u, d, l, f, p, m, i, a, r, o, s, c, kc, t), h.lineEnd = y, y();
37818
37830
  }
37819
37831
  return h;
37820
37832
  };
37821
37833
  }
37822
37834
  //#endregion
37823
37835
  //#region node_modules/d3-geo/src/projection/index.js
37824
- var Mc = bc({ point: function(e, t) {
37825
- this.stream.point(e * lo, t * lo);
37836
+ var Pc = Sc({ point: function(e, t) {
37837
+ this.stream.point(e * fo, t * fo);
37826
37838
  } });
37827
- function Nc(e) {
37828
- return bc({ point: function(t, n) {
37839
+ function Fc(e) {
37840
+ return Sc({ point: function(t, n) {
37829
37841
  var r = e(t, n);
37830
37842
  return this.stream.point(r[0], r[1]);
37831
37843
  } });
37832
37844
  }
37833
- function Pc(e, t, n, r, i) {
37845
+ function Ic(e, t, n, r, i) {
37834
37846
  function a(a, o) {
37835
37847
  return a *= r, o *= i, [t + e * a, n - e * o];
37836
37848
  }
@@ -37838,9 +37850,9 @@ function Pc(e, t, n, r, i) {
37838
37850
  return [(a - t) / e * r, (n - o) / e * i];
37839
37851
  }, a;
37840
37852
  }
37841
- function Fc(e, t, n, r, i, a) {
37842
- if (!a) return Pc(e, t, n, r, i);
37843
- var o = mo(a), s = vo(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;
37853
+ function Lc(e, t, n, r, i, a) {
37854
+ if (!a) return Ic(e, t, n, r, i);
37855
+ var o = go(a), s = bo(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;
37844
37856
  function m(e, a) {
37845
37857
  return e *= r, a *= i, [c * e - l * a + t, n - l * e - c * a];
37846
37858
  }
@@ -37848,61 +37860,61 @@ function Fc(e, t, n, r, i, a) {
37848
37860
  return [r * (u * e - d * t + f), i * (p - d * e - u * t)];
37849
37861
  }, m;
37850
37862
  }
37851
- function Ic(e) {
37852
- return Lc(function() {
37863
+ function Rc(e) {
37864
+ return zc(function() {
37853
37865
  return e;
37854
37866
  })();
37855
37867
  }
37856
- function Lc(e) {
37857
- 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 = rs, g = null, _, v, y, b = hs, x = .5, S, C, w, T, E;
37868
+ function zc(e) {
37869
+ 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 = as, g = null, _, v, y, b = _s, x = .5, S, C, w, T, E;
37858
37870
  function D(e) {
37859
- return w(e[0] * lo, e[1] * lo);
37871
+ return w(e[0] * fo, e[1] * fo);
37860
37872
  }
37861
37873
  function O(e) {
37862
- return e = w.invert(e[0], e[1]), e && [e[0] * co, e[1] * co];
37874
+ return e = w.invert(e[0], e[1]), e && [e[0] * uo, e[1] * uo];
37863
37875
  }
37864
37876
  D.stream = function(e) {
37865
- return T && E === e ? T : T = Mc(Nc(u)(h(S(b(E = e)))));
37877
+ return T && E === e ? T : T = Pc(Fc(u)(h(S(b(E = e)))));
37866
37878
  }, D.preclip = function(e) {
37867
37879
  return arguments.length ? (h = e, m = void 0, A()) : h;
37868
37880
  }, D.postclip = function(e) {
37869
37881
  return arguments.length ? (b = e, g = _ = v = y = null, A()) : b;
37870
37882
  }, D.clipAngle = function(e) {
37871
- return arguments.length ? (h = +e ? ss(m = e * lo) : (m = null, rs), A()) : m * co;
37883
+ return arguments.length ? (h = +e ? ls(m = e * fo) : (m = null, as), A()) : m * uo;
37872
37884
  }, D.clipExtent = function(e) {
37873
- return arguments.length ? (b = e == null ? (g = _ = v = y = null, hs) : ds(g = +e[0][0], _ = +e[0][1], v = +e[1][0], y = +e[1][1]), A()) : g == null ? null : [[g, _], [v, y]];
37885
+ return arguments.length ? (b = e == null ? (g = _ = v = y = null, _s) : ps(g = +e[0][0], _ = +e[0][1], v = +e[1][0], y = +e[1][1]), A()) : g == null ? null : [[g, _], [v, y]];
37874
37886
  }, D.scale = function(e) {
37875
37887
  return arguments.length ? (n = +e, k()) : n;
37876
37888
  }, D.translate = function(e) {
37877
37889
  return arguments.length ? (r = +e[0], i = +e[1], k()) : [r, i];
37878
37890
  }, D.center = function(e) {
37879
- return arguments.length ? (a = e[0] % 360 * lo, o = e[1] % 360 * lo, k()) : [a * co, o * co];
37891
+ return arguments.length ? (a = e[0] % 360 * fo, o = e[1] % 360 * fo, k()) : [a * uo, o * uo];
37880
37892
  }, D.rotate = function(e) {
37881
- return arguments.length ? (s = e[0] % 360 * lo, c = e[1] % 360 * lo, l = e.length > 2 ? e[2] % 360 * lo : 0, k()) : [
37882
- s * co,
37883
- c * co,
37884
- l * co
37893
+ return arguments.length ? (s = e[0] % 360 * fo, c = e[1] % 360 * fo, l = e.length > 2 ? e[2] % 360 * fo : 0, k()) : [
37894
+ s * uo,
37895
+ c * uo,
37896
+ l * uo
37885
37897
  ];
37886
37898
  }, D.angle = function(e) {
37887
- return arguments.length ? (d = e % 360 * lo, k()) : d * co;
37899
+ return arguments.length ? (d = e % 360 * fo, k()) : d * uo;
37888
37900
  }, D.reflectX = function(e) {
37889
37901
  return arguments.length ? (f = e ? -1 : 1, k()) : f < 0;
37890
37902
  }, D.reflectY = function(e) {
37891
37903
  return arguments.length ? (p = e ? -1 : 1, k()) : p < 0;
37892
37904
  }, D.precision = function(e) {
37893
- return arguments.length ? (S = kc(C, x = e * e), A()) : bo(x);
37905
+ return arguments.length ? (S = jc(C, x = e * e), A()) : So(x);
37894
37906
  }, D.fitExtent = function(e, t) {
37895
- return Cc(D, e, t);
37907
+ return Tc(D, e, t);
37896
37908
  }, D.fitSize = function(e, t) {
37897
- return wc(D, e, t);
37909
+ return Ec(D, e, t);
37898
37910
  }, D.fitWidth = function(e, t) {
37899
- return Tc(D, e, t);
37911
+ return Dc(D, e, t);
37900
37912
  }, D.fitHeight = function(e, t) {
37901
- return Ec(D, e, t);
37913
+ return Oc(D, e, t);
37902
37914
  };
37903
37915
  function k() {
37904
- var e = Fc(n, 0, 0, f, p, d).apply(null, t(a, o)), m = Fc(n, r - e[0], i - e[1], f, p, d);
37905
- return u = Bo(s, c, l), C = Ro(t, m), w = Ro(u, C), S = kc(C, x), A();
37916
+ var e = Lc(n, 0, 0, f, p, d).apply(null, t(a, o)), m = Lc(n, r - e[0], i - e[1], f, p, d);
37917
+ return u = Ho(s, c, l), C = Bo(t, m), w = Bo(u, C), S = jc(C, x), A();
37906
37918
  }
37907
37919
  function A() {
37908
37920
  return T = E = null, D;
@@ -37913,25 +37925,25 @@ function Lc(e) {
37913
37925
  }
37914
37926
  //#endregion
37915
37927
  //#region node_modules/d3-geo/src/projection/azimuthal.js
37916
- function Rc(e) {
37928
+ function Bc(e) {
37917
37929
  return function(t, n) {
37918
- var r = bo(t * t + n * n), i = e(r), a = vo(i), o = mo(i);
37919
- return [po(t * a, r * o), Co(r && n * a / r)];
37930
+ var r = So(t * t + n * n), i = e(r), a = bo(i), o = go(i);
37931
+ return [ho(t * a, r * o), To(r && n * a / r)];
37920
37932
  };
37921
37933
  }
37922
37934
  //#endregion
37923
37935
  //#region node_modules/d3-geo/src/projection/mercator.js
37924
- function zc(e, t) {
37925
- return [e, _o(xo((ao + t) / 2))];
37936
+ function Vc(e, t) {
37937
+ return [e, yo(Co((so + t) / 2))];
37926
37938
  }
37927
- zc.invert = function(e, t) {
37928
- return [e, 2 * fo(go(t)) - ao];
37939
+ Vc.invert = function(e, t) {
37940
+ return [e, 2 * mo(vo(t)) - so];
37929
37941
  };
37930
- function Bc() {
37931
- return Vc(zc).scale(961 / so);
37942
+ function Hc() {
37943
+ return Uc(Vc).scale(961 / lo);
37932
37944
  }
37933
- function Vc(e) {
37934
- var t = Ic(e), n = t.center, r = t.scale, i = t.translate, a = t.clipExtent, o = null, s, c, l;
37945
+ function Uc(e) {
37946
+ var t = Rc(e), n = t.center, r = t.scale, i = t.translate, a = t.clipExtent, o = null, s, c, l;
37935
37947
  t.scale = function(e) {
37936
37948
  return arguments.length ? (r(e), u()) : r();
37937
37949
  }, t.translate = function(e) {
@@ -37942,27 +37954,27 @@ function Vc(e) {
37942
37954
  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]];
37943
37955
  };
37944
37956
  function u() {
37945
- var n = io * r(), i = t(Wo(t.rotate()).invert([0, 0]));
37946
- return a(o == null ? [[i[0] - n, i[1] - n], [i[0] + n, i[1] + n]] : e === zc ? [[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)]]);
37957
+ var n = oo * r(), i = t(Ko(t.rotate()).invert([0, 0]));
37958
+ return a(o == null ? [[i[0] - n, i[1] - n], [i[0] + n, i[1] + n]] : e === Vc ? [[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)]]);
37947
37959
  }
37948
37960
  return u();
37949
37961
  }
37950
37962
  //#endregion
37951
37963
  //#region node_modules/d3-geo/src/projection/orthographic.js
37952
- function Hc(e, t) {
37953
- return [mo(t) * vo(e), vo(t)];
37964
+ function Wc(e, t) {
37965
+ return [go(t) * bo(e), bo(t)];
37954
37966
  }
37955
- Hc.invert = Rc(Co);
37956
- function Uc() {
37957
- return Ic(Hc).scale(249.5).clipAngle(90 + ro);
37967
+ Wc.invert = Bc(To);
37968
+ function Gc() {
37969
+ return Rc(Wc).scale(249.5).clipAngle(90 + ao);
37958
37970
  }
37959
37971
  //#endregion
37960
37972
  //#region src/adornments/insetMap.ts
37961
- var Wc = 100;
37962
- function Gc(e, t, n, r) {
37973
+ var Kc = 100;
37974
+ function qc(e, t, n, r) {
37963
37975
  let i = document.createElement("div");
37964
37976
  i.className = "adornment";
37965
- let a = e.scale ?? 1, o = a * Wc;
37977
+ let a = e.scale ?? 1, o = a * Kc;
37966
37978
  i.style.width = `${o * r}px`, i.style.height = `${o * r}px`, i.style.flexGrow = "0", i.style.flexShrink = "0";
37967
37979
  let s = {
37968
37980
  id: e.id,
@@ -37990,46 +38002,30 @@ function Gc(e, t, n, r) {
37990
38002
  globeGeoJsonRequested: !1,
37991
38003
  globeGeoJson: void 0
37992
38004
  };
37993
- return fetch("/status", {
37994
- method: "POST",
37995
- body: JSON.stringify({ status: "initializing" })
37996
- }), fetch(`${n}/data/insetmaps/${e.fileName}`).catch((e) => {
37997
- throw fetch("/status", {
37998
- method: "POST",
37999
- body: JSON.stringify({ error: e })
38000
- }), e;
38001
- }).then((e) => (fetch("/status", {
38002
- method: "POST",
38003
- body: JSON.stringify({ status: e.status })
38004
- }), e.json())).then((e) => {
38005
- s.geoJson = ta(e, Object.keys(e.objects)[0]), Kc(s);
38006
- }).catch((e) => {
38007
- fetch("/status", {
38008
- method: "POST",
38009
- body: JSON.stringify({ error: e })
38010
- });
38005
+ return fetch(`${n}/data/insetmaps/${e.fileName}`).then((e) => e.json()).then((e) => {
38006
+ s.geoJson = ra(e, Object.keys(e.objects)[0]), Jc(s);
38011
38007
  }), t.on("moveend", () => {
38012
- s.moveEndPosition = t.getCenter(), (s.isGlobe || s.globeFallbackActive) && Kc(s);
38008
+ s.moveEndPosition = t.getCenter(), (s.isGlobe || s.globeFallbackActive) && Jc(s);
38013
38009
  }), t.on("move", () => {
38014
38010
  if (!s.isGlobe) {
38015
- let [e, r, i, a] = s.boundingBox, o = Yc(t), c = no(Ln([o, Fn([[
38011
+ let [e, r, i, a] = s.boundingBox, o = Zc(t), c = io(Ln([o, Fn([[
38016
38012
  [e, r],
38017
38013
  [e, a],
38018
38014
  [i, a],
38019
38015
  [i, r],
38020
38016
  [e, r]
38021
- ]])])), l = Ki(o), u = (c ? Ki(c) : 0) < l * .75;
38022
- s.globeFallbackActive !== u && (s.globeFallbackActive = u, s.moveEndPosition = t.getCenter(), Kc(s)), s.globeFallbackActive && !s.globeGeoJsonRequested && (s.globeGeoJsonRequested = !0, fetch(`${n}/data/insetmaps/world-110m.json`).then((e) => e.json()).then((e) => {
38023
- s.globeGeoJson = ta(e, Object.keys(e.objects)[0]), s.moveEndPosition = t.getCenter(), Kc(s);
38017
+ ]])])), l = Ji(o), u = (c ? Ji(c) : 0) < l * .75;
38018
+ s.globeFallbackActive !== u && (s.globeFallbackActive = u, s.moveEndPosition = t.getCenter(), Jc(s)), s.globeFallbackActive && !s.globeGeoJsonRequested && (s.globeGeoJsonRequested = !0, fetch(`${n}/data/insetmaps/world-110m.json`).then((e) => e.json()).then((e) => {
38019
+ s.globeGeoJson = ra(e, Object.keys(e.objects)[0]), s.moveEndPosition = t.getCenter(), Jc(s);
38024
38020
  }));
38025
38021
  }
38026
- Jc(s);
38022
+ Xc(s);
38027
38023
  }), i;
38028
38024
  }
38029
- function Kc(e) {
38025
+ function Jc(e) {
38030
38026
  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;
38031
38027
  if (_ === void 0) return;
38032
- let y = Wc * 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 } = qc(e), w = C({
38028
+ 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 } = Yc(e), w = C({
38033
38029
  ..._,
38034
38030
  features: _.features.filter((e) => e.properties?.class !== "P1")
38035
38031
  });
@@ -38053,7 +38049,7 @@ function Kc(e) {
38053
38049
  stroke-width="${x}"
38054
38050
  ></path>
38055
38051
  `), v) {
38056
- let e = C(Ln(ms().step([10, 10]).lines().map((e) => In(e.coordinates))));
38052
+ let e = C(Ln(gs().step([10, 10]).lines().map((e) => In(e.coordinates))));
38057
38053
  S.push(`
38058
38054
  <path
38059
38055
  d="${e}"
@@ -38105,15 +38101,15 @@ function Kc(e) {
38105
38101
  >
38106
38102
  ${S.join("")}
38107
38103
  </svg>
38108
- `, Jc(e);
38104
+ `, Xc(e);
38109
38105
  }
38110
- function qc(e) {
38111
- let { scale: t, boundingBox: n, moveEndPosition: r } = e, i = e.globeFallbackActive && e.globeGeoJson !== void 0 || e.isGlobe, a = Wc * t, o = yc(), s;
38106
+ function Yc(e) {
38107
+ let { scale: t, boundingBox: n, moveEndPosition: r } = e, i = e.globeFallbackActive && e.globeGeoJson !== void 0 || e.isGlobe, a = Kc * t, o = xc(), s;
38112
38108
  if (i) {
38113
38109
  let { lng: e, lat: t } = r;
38114
- s = Uc().scale(a / 2).translate([a / 2, a / 2]).rotate([-e, -t]).clipAngle(90);
38110
+ s = Gc().scale(a / 2).translate([a / 2, a / 2]).rotate([-e, -t]).clipAngle(90);
38115
38111
  } else {
38116
- s = Bc().scale(1).translate([0, 0]);
38112
+ s = Hc().scale(1).translate([0, 0]);
38117
38113
  let e = s([n[0], n[3]]), t = s([n[2], n[1]]), r = Math.abs(t[0] - e[0]), i = Math.abs(t[1] - e[1]), o = (e[0] + t[0]) / 2, c = (e[1] + t[1]) / 2, l = 1 / Math.max(r / a, i / a);
38118
38114
  s.scale(l).translate([a / 2 - l * o, a / 2 - l * c]);
38119
38115
  }
@@ -38122,10 +38118,10 @@ function qc(e) {
38122
38118
  projection: s
38123
38119
  };
38124
38120
  }
38125
- function Jc(e) {
38121
+ function Xc(e) {
38126
38122
  let { id: t, map: n, container: r, scale: i } = e, a = r.querySelector(`#frame-${t}`), o = r.querySelector(`#frame-outline-${t}`), s = r.querySelector(`#dot-${t}`);
38127
38123
  if (!a || !o || !s) return;
38128
- let c = Yc(n), { path: l, projection: u } = qc(e), d = Infinity, f = -Infinity, p = Infinity, m = -Infinity, h = Infinity, g = -Infinity;
38124
+ let c = Zc(n), { path: l, projection: u } = Yc(e), d = Infinity, f = -Infinity, p = Infinity, m = -Infinity, h = Infinity, g = -Infinity;
38129
38125
  Bn(c, (e) => {
38130
38126
  let t = u(e);
38131
38127
  d = Math.min(d, e[0]), f = Math.max(f, e[0]), p = Math.min(p, t[0]), m = Math.max(m, t[0]), h = Math.min(h, t[1]), g = Math.max(g, t[1]);
@@ -38141,7 +38137,7 @@ function Jc(e) {
38141
38137
  a.setAttribute("d", e), o.setAttribute("d", e);
38142
38138
  } else a.style.display = "none", o.style.display = "none", s.style.display = "none";
38143
38139
  }
38144
- function Yc(e) {
38140
+ function Zc(e) {
38145
38141
  let t = e.getCanvas().width, n = e.getCanvas().height, r = [];
38146
38142
  for (let n = 0; n < 64; n++) {
38147
38143
  let { lng: i, lat: a } = e.unprojectWithScaleCorrection([k(0, t, n / 64), 0]);
@@ -38171,14 +38167,14 @@ function Yc(e) {
38171
38167
  }
38172
38168
  //#endregion
38173
38169
  //#region src/utils/scalebar.ts
38174
- var Xc = [
38170
+ var Qc = [
38175
38171
  10,
38176
38172
  5,
38177
38173
  3,
38178
38174
  2,
38179
38175
  1
38180
38176
  ];
38181
- function Zc(e, t = 1e-6) {
38177
+ function $c(e, t = 1e-6) {
38182
38178
  let n = Math.floor(e);
38183
38179
  if (e -= n, e < t) return [n, 1];
38184
38180
  if (1 - t < e) return [n + 1, 1];
@@ -38190,37 +38186,37 @@ function Zc(e, t = 1e-6) {
38190
38186
  else return [n * c + s, c];
38191
38187
  }
38192
38188
  }
38193
- function Qc(e) {
38189
+ function el(e) {
38194
38190
  let t = 10 ** Math.floor(Math.log10(e)), n = e / t;
38195
- for (let e of Xc) if (n >= e) return e * t;
38196
- return $c(n) * t;
38191
+ for (let e of Qc) if (n >= e) return e * t;
38192
+ return tl(n) * t;
38197
38193
  }
38198
- function $c(e) {
38194
+ function tl(e) {
38199
38195
  let t = 10 ** Math.ceil(-Math.log(e) / Math.LN10);
38200
38196
  return Math.round(e * t) / t;
38201
38197
  }
38202
38198
  //#endregion
38203
38199
  //#region src/adornments/scalebar.ts
38204
- var el = {
38200
+ var nl = {
38205
38201
  kilometer: "km",
38206
38202
  meter: "m",
38207
38203
  mile: "mi",
38208
38204
  foot: "ft",
38209
38205
  nauticalMile: "nm"
38210
38206
  };
38211
- function tl(e, t, n) {
38207
+ function rl(e, t, n) {
38212
38208
  let r = document.createElement("div");
38213
- return r.className = "adornment", r.innerHTML = nl(t, e, n), t.on("move", () => {
38214
- r.innerHTML = nl(t, e, n);
38209
+ return r.className = "adornment", r.innerHTML = il(t, e, n), t.on("move", () => {
38210
+ r.innerHTML = il(t, e, n);
38215
38211
  }), r;
38216
38212
  }
38217
- function nl(e, t, n) {
38218
- let { maxWidth: r = 100, fontSize: i = 8, font: a = "Arial, sans-serif", color: o = "#000000", unit: s = "metric_and_imperial" } = t, c = e.getCenter(), l = e.projectWithScaleCorrection(c), u = x(c, e.unprojectWithScaleCorrection([l.x + r, l.y])), d = Object.fromEntries(Object.entries(el).map(([e, t]) => {
38219
- let n = O("meter", e, u), r = Qc(n) || 0;
38213
+ function il(e, t, n) {
38214
+ let { maxWidth: r = 100, fontSize: i = 8, font: a = "Arial, sans-serif", color: o = "#000000", unit: s = "metric_and_imperial" } = t, c = e.getCenter(), l = e.projectWithScaleCorrection(c), u = x(c, e.unprojectWithScaleCorrection([l.x + r, l.y])), d = Object.fromEntries(Object.entries(nl).map(([e, t]) => {
38215
+ let n = O("meter", e, u), r = el(n) || 0;
38220
38216
  return [e, {
38221
38217
  value: n,
38222
38218
  ratio: n ? r / n : 0,
38223
- humanized: r < 1 ? `${Zc(r).join("/")} ${t}` : `${r} ${t}`
38219
+ humanized: r < 1 ? `${$c(r).join("/")} ${t}` : `${r} ${t}`
38224
38220
  }];
38225
38221
  })), f = d.meter.value > 1e3 ? d.kilometer : d.meter, p = d.foot.value > 5280 ? d.mile : d.foot, m = {
38226
38222
  imperial: p,
@@ -38368,14 +38364,14 @@ function nl(e, t, n) {
38368
38364
  }
38369
38365
  //#endregion
38370
38366
  //#region src/adornments/heading.ts
38371
- function rl(e, t, n, r) {
38367
+ function al(e, t, n, r) {
38372
38368
  let i = document.createElement("div");
38373
38369
  i.className = "adornment";
38374
38370
  let a = "ArialMT", o = [e.titleFont ?? a, e.subtitleFont ?? a];
38375
- return wr(Array.from(new Set(o)), t, n).then(() => i.innerHTML = il(e, a, r)), i;
38371
+ return Er(Array.from(new Set(o)), t, n).then(() => i.innerHTML = ol(e, a, r)), i;
38376
38372
  }
38377
- function il(e, t, n) {
38378
- let { title: r, titleColor: i = "#000000", titleFont: a = t, titleFontSize: o = 20, titleJustify: s = "center", subtitle: c, subtitleColor: l = "#000000", subtitleFont: u = t, subtitleFontSize: d = 12, subtitleJustify: f = "center", background: p = "#ffffff", showBackground: m = !1 } = e, h = 0, g = 0, _ = 0, v = 0, y = 0, b = r.trim().length > 0 ? zr([r], a, o) : null, x = c.trim().length > 0 ? zr([c], u, d) : null;
38373
+ function ol(e, t, n) {
38374
+ let { title: r, titleColor: i = "#000000", titleFont: a = t, titleFontSize: o = 20, titleJustify: s = "center", subtitle: c, subtitleColor: l = "#000000", subtitleFont: u = t, subtitleFontSize: d = 12, subtitleJustify: f = "center", background: p = "#ffffff", showBackground: m = !1 } = e, h = 0, g = 0, _ = 0, v = 0, y = 0, b = r.trim().length > 0 ? Hr([r], a, o) : null, x = c.trim().length > 0 ? Hr([c], u, d) : null;
38379
38375
  if (h = Math.max(b?.width ?? 0, x?.width ?? 0), b) {
38380
38376
  let { ascent: e, descent: t } = b;
38381
38377
  g = e + t, v = 8 + e;
@@ -38387,13 +38383,13 @@ function il(e, t, n) {
38387
38383
  let S = h + 16, C = g + _ + 16, w = s === "center" ? S / 2 : s === "right" ? S - 8 : 8, T = f === "center" ? S / 2 : f === "right" ? S - 8 : 8, E = "";
38388
38384
  if (E += `<svg class="adornment-svg" xmlns="http://www.w3.org/2000/svg" width="${S * n}" height="${C * n}" viewBox="0 0 ${S} ${C}">`, E += `<rect x="0" y="0" width="${S}" height="${C}" fill="${p}" rx="6" style="visibility:${m ? "visible" : "hidden"}" />`, b || x) {
38389
38385
  let e = s === "center" ? "middle" : s === "right" ? "end" : "start", t = f === "center" ? "middle" : f === "right" ? "end" : "start";
38390
- E += `<text x="${w}" y="${v}" fill="${i}" font-family="${a}" font-size="${o}" text-anchor="${e}">`, b && (E += `${Cr(r)}`), x && (E += `<tspan x="${T}" y="${y}" fill="${l}" font-family="${u}" font-size="${d}" text-anchor="${t}">`, E += `${Cr(c)}`, E += "</tspan>"), E += "</text>";
38386
+ E += `<text x="${w}" y="${v}" fill="${i}" font-family="${a}" font-size="${o}" text-anchor="${e}">`, b && (E += `${Tr(r)}`), x && (E += `<tspan x="${T}" y="${y}" fill="${l}" font-family="${u}" font-size="${d}" text-anchor="${t}">`, E += `${Tr(c)}`, E += "</tspan>"), E += "</text>";
38391
38387
  }
38392
38388
  return E += "</svg>", E;
38393
38389
  }
38394
38390
  //#endregion
38395
38391
  //#region src/renderAdornments.ts
38396
- var al = [
38392
+ var sl = [
38397
38393
  "top_left",
38398
38394
  "top_right",
38399
38395
  "bottom_left",
@@ -38402,35 +38398,35 @@ var al = [
38402
38398
  "left_center",
38403
38399
  "right_center",
38404
38400
  "bottom_center"
38405
- ], ol = /* @__PURE__ */ new Map();
38406
- function sl(e, t, n, r, i, a, o, s, c) {
38401
+ ], cl = /* @__PURE__ */ new Map();
38402
+ function ll(e, t, n, r, i, a, o, s, c) {
38407
38403
  let { adornments: l = [] } = e;
38408
- cl(n, t, s, c), l.forEach((t) => {
38409
- t.type === "custom" ? ul(F(t, s), t.position, t.stacking) : t.type === "scalebar" ? ul(tl(t, n, s), t.position, t.stacking) : t.type === "northArrow" ? ul(si(t, n, s), t.position, t.stacking) : t.type === "webControls" && t.buttons ? ul(Bi(t, n, r), t.position, t.stacking) : t.type === "insetMap" ? ul(Gc(t, n, a, s), t.position, t.stacking) : t.type === "heading" ? ul(rl(t, i, o, s), t.position, t.stacking) : t.type === "manualLegend" ? ul(oi(t, i, o, s), t.position, t.stacking) : t.type === "connectedLegend" ? ul(Qr(t, e, n, i, o, s), t.position, t.stacking) : t.type === "copyright" && c === "video" && ul(Hi(t, n, s), t.position, t.stacking);
38410
- }), dl(n), n.on("moveend", () => dl(n));
38404
+ ul(n, t, s, c), l.forEach((t) => {
38405
+ t.type === "custom" ? fl(F(t, s), t.position, t.stacking) : t.type === "scalebar" ? fl(rl(t, n, s), t.position, t.stacking) : t.type === "northArrow" ? fl(ui(t, n, s), t.position, t.stacking) : t.type === "webControls" && t.buttons ? fl(Hi(t, n, r), t.position, t.stacking) : t.type === "insetMap" ? fl(qc(t, n, a, s), t.position, t.stacking) : t.type === "heading" ? fl(al(t, i, o, s), t.position, t.stacking) : t.type === "manualLegend" ? fl(li(t, i, o, s), t.position, t.stacking) : t.type === "connectedLegend" ? fl(ti(t, e, n, i, o, s), t.position, t.stacking) : t.type === "copyright" && c === "video" && fl(Wi(t, n, s), t.position, t.stacking);
38406
+ }), pl(n), n.on("moveend", () => pl(n));
38411
38407
  }
38412
- function cl(e, t, n, r) {
38408
+ function ul(e, t, n, r) {
38413
38409
  let i = e.getContainer();
38414
- for (let e of al) {
38410
+ for (let e of sl) {
38415
38411
  let a = document.createElement("div");
38416
- a.classList.add("adornment-container", e), a.style.cssText = ll(e, t[e], n, r);
38412
+ a.classList.add("adornment-container", e), a.style.cssText = dl(e, t[e], n, r);
38417
38413
  let o = document.createElement("div"), s = document.createElement("div");
38418
- o.classList.add("inner"), s.classList.add("inner", "vertical"), a.append(o, s), i.appendChild(a), ol.set(e, {
38414
+ o.classList.add("inner"), s.classList.add("inner", "vertical"), a.append(o, s), i.appendChild(a), cl.set(e, {
38419
38415
  horizontal: o,
38420
38416
  vertical: s
38421
38417
  });
38422
38418
  }
38423
38419
  }
38424
- function ll(e, t, n, r) {
38420
+ function dl(e, t, n, r) {
38425
38421
  let i = _[e], a = "", o = [], s = t.x * n, c = t.y * n, { unit: l } = t;
38426
38422
  return i.x === "center" ? o.push(`translateX(${s}${l})`) : a += `${i.x}: ${s}${l};`, i.y === "center" ? o.push(`translateY(${c}${l})`) : e === "bottom_right" && r !== "video" ? a += `${i.y}: max(${c}${l}, 25px);` : a += `${i.y}: ${c}${l};`, o.length && (a += `transform: ${o.join(" ")};`), a;
38427
38423
  }
38428
- function ul(e, t, n) {
38424
+ function fl(e, t, n) {
38429
38425
  n ||= ["left_center", "right_center"].includes(t) ? "vertical" : "horizontal";
38430
- let r = ol.get(t), i = t === "left_center" || t === "right_center" ? "vertical" : "horizontal";
38426
+ let r = cl.get(t), i = t === "left_center" || t === "right_center" ? "vertical" : "horizontal";
38431
38427
  r?.[i].hasChildNodes() || (n = i), (r?.[n])?.appendChild(e);
38432
38428
  }
38433
- function dl(e) {
38429
+ function pl(e) {
38434
38430
  let t = Array.from(document.querySelectorAll(".adornment, .maplibregl-ctrl-attrib")), n = [];
38435
38431
  t.forEach((e) => {
38436
38432
  let t = e.getBoundingClientRect();
@@ -38444,12 +38440,12 @@ function dl(e) {
38444
38440
  }
38445
38441
  //#endregion
38446
38442
  //#region src/models/polygon.ts
38447
- function fl(e, t, n, r, i) {
38443
+ function ml(e, t, n, r, i) {
38448
38444
  e.addSource(t.id, {
38449
38445
  type: "geojson",
38450
38446
  data: {
38451
38447
  type: "FeatureCollection",
38452
- features: t.models.filter((e) => e.visible ?? !0).map((e) => pl(t, e, r, i))
38448
+ features: t.models.filter((e) => e.visible ?? !0).map((e) => hl(t, e, r, i))
38453
38449
  }
38454
38450
  }), e.addLayer({
38455
38451
  id: t.id,
@@ -38510,15 +38506,15 @@ function fl(e, t, n, r, i) {
38510
38506
  }
38511
38507
  }, n);
38512
38508
  }
38513
- function pl(e, t, n, r) {
38509
+ function hl(e, t, n, r) {
38514
38510
  let i = t.fillPattern === void 0 ? void 0 : r.getMapLibreImageKey(n[t.fillPattern], 2 * window.devicePixelRatio);
38515
38511
  return {
38516
38512
  type: "Feature",
38517
38513
  id: S(t.id),
38518
38514
  properties: {
38519
38515
  id: t.id,
38520
- "fill-color": e.fillColor || t.fillColor ? Br(t.dataBindings ?? {}, t.fillColor, e.fillColor) : "#000000",
38521
- "outline-color": e.outlineColor || t.outlineColor ? Br(t.dataBindings ?? {}, t.outlineColor, e.outlineColor) : "#000000",
38516
+ "fill-color": e.fillColor || t.fillColor ? Ur(t.dataBindings ?? {}, t.fillColor, e.fillColor) : "#000000",
38517
+ "outline-color": e.outlineColor || t.outlineColor ? Ur(t.dataBindings ?? {}, t.outlineColor, e.outlineColor) : "#000000",
38522
38518
  "outline-width": t.outlineWidth ?? 0,
38523
38519
  "fill-pattern": i
38524
38520
  },
@@ -38530,12 +38526,12 @@ function pl(e, t, n, r) {
38530
38526
  }
38531
38527
  //#endregion
38532
38528
  //#region src/models/circle.ts
38533
- function ml(e, t, n, r, i) {
38529
+ function gl(e, t, n, r, i) {
38534
38530
  e.addSource(t.id, {
38535
38531
  type: "geojson",
38536
38532
  data: {
38537
38533
  type: "FeatureCollection",
38538
- features: t.models.filter((e) => e.visible ?? !0).map((e) => hl(t, e, 1, r, i))
38534
+ features: t.models.filter((e) => e.visible ?? !0).map((e) => _l(t, e, 1, r, i))
38539
38535
  }
38540
38536
  }), e.addLayer({
38541
38537
  id: t.id,
@@ -38633,19 +38629,19 @@ function ml(e, t, n, r, i) {
38633
38629
  }
38634
38630
  }, n);
38635
38631
  }
38636
- function hl(e, t, n, r, i) {
38632
+ function _l(e, t, n, r, i) {
38637
38633
  let a = t.fillPattern === void 0 ? void 0 : i.getMapLibreImageKey(r[t.fillPattern], 2 * window.devicePixelRatio);
38638
38634
  return {
38639
38635
  type: "Feature",
38640
38636
  id: S(t.id),
38641
38637
  properties: {
38642
38638
  id: t.id,
38643
- "fill-color": e.fillColor || t.fillColor ? Br(t.dataBindings ?? {}, t.fillColor, e.fillColor) : "#000000",
38644
- "outline-color": e.outlineColor || t.outlineColor ? Br(t.dataBindings ?? {}, t.outlineColor, e.outlineColor) : "#000000",
38639
+ "fill-color": e.fillColor || t.fillColor ? Ur(t.dataBindings ?? {}, t.fillColor, e.fillColor) : "#000000",
38640
+ "outline-color": e.outlineColor || t.outlineColor ? Ur(t.dataBindings ?? {}, t.outlineColor, e.outlineColor) : "#000000",
38645
38641
  "outline-width": t.outlineWidth ?? 0,
38646
38642
  "fill-pattern": a,
38647
38643
  "radius-line-enabled": t.radiusLineEnabled ?? !1,
38648
- "radius-line-color": e.radiusLineColor || t.radiusLineColor ? Br(t.dataBindings ?? {}, t.radiusLineColor, e.radiusLineColor) : "#000000",
38644
+ "radius-line-color": e.radiusLineColor || t.radiusLineColor ? Ur(t.dataBindings ?? {}, t.radiusLineColor, e.radiusLineColor) : "#000000",
38649
38645
  "radius-line-width": t.radiusLineWidth ?? 0
38650
38646
  },
38651
38647
  geometry: {
@@ -38662,13 +38658,13 @@ function hl(e, t, n, r, i) {
38662
38658
  }
38663
38659
  //#endregion
38664
38660
  //#region src/models/marker.ts
38665
- var gl = "Roboto-Regular";
38666
- function _l(e, t, n, r, i) {
38661
+ var vl = "Roboto-Regular";
38662
+ function yl(e, t, n, r, i) {
38667
38663
  let a = [], o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), c = ["match", ["get", "text-font"]], l = !!t.clustering;
38668
- for (let e of t.models) (e.visible ?? !0) && a.push(yl(t, e, 1, r, i)), o.add(e.textFont), s.add(e.textLineHeight ?? 1.2);
38664
+ for (let e of t.models) (e.visible ?? !0) && a.push(xl(t, e, 1, r, i)), o.add(e.textFont), s.add(e.textLineHeight ?? 1.2);
38669
38665
  if (Array.from(o).length > 0) {
38670
- for (let e of Array.from(o)) c.push(e, ["literal", [e, gl]]);
38671
- c.push(["literal", [gl]]);
38666
+ for (let e of Array.from(o)) c.push(e, ["literal", [e, vl]]);
38667
+ c.push(["literal", [vl]]);
38672
38668
  }
38673
38669
  e.addSource(t.id, {
38674
38670
  type: "geojson",
@@ -38764,7 +38760,7 @@ function _l(e, t, n, r, i) {
38764
38760
  stops: t.clusterTextColor ?? []
38765
38761
  } },
38766
38762
  layout: {
38767
- "text-font": ["literal", [gl]],
38763
+ "text-font": ["literal", [vl]],
38768
38764
  "text-field": "{point_count_abbreviated}",
38769
38765
  "text-size": {
38770
38766
  property: "point_count",
@@ -38772,9 +38768,9 @@ function _l(e, t, n, r, i) {
38772
38768
  stops: t.clusterTextSize ?? []
38773
38769
  }
38774
38770
  }
38775
- }), vl(e, t));
38771
+ }), bl(e, t));
38776
38772
  }
38777
- function vl(e, t) {
38773
+ function bl(e, t) {
38778
38774
  e.on("click", `${t.id}-circle-cluster`, async (t) => {
38779
38775
  let n = e.queryRenderedFeatures(t.point).find((e) => e.properties.cluster);
38780
38776
  if (!n) return;
@@ -38787,8 +38783,8 @@ function vl(e, t) {
38787
38783
  });
38788
38784
  });
38789
38785
  }
38790
- function yl(e, t, n, r, i) {
38791
- let a = t.svg === void 0 ? void 0 : i.getMapLibreImageKey(Hr(t.dataBindings ?? {}, r[t.svg], e.svg ? r[e.svg] : void 0), window.devicePixelRatio * (t.iconScale ?? 1));
38786
+ function xl(e, t, n, r, i) {
38787
+ let a = t.svg === void 0 ? void 0 : i.getMapLibreImageKey(Gr(t.dataBindings ?? {}, r[t.svg], e.svg ? r[e.svg] : void 0), window.devicePixelRatio * (t.iconScale ?? 1));
38792
38788
  return {
38793
38789
  type: "Feature",
38794
38790
  id: S(t.id),
@@ -38799,15 +38795,15 @@ function yl(e, t, n, r, i) {
38799
38795
  "icon-rotate": t.iconRotation ?? 0,
38800
38796
  "icon-offset": t.iconOffset ?? [0, 0],
38801
38797
  "icon-size": (t.iconScale ?? 1) * n,
38802
- text: e.text || t.text ? Vr(t.dataBindings ?? {}, t.text, e.text) : void 0,
38798
+ text: e.text || t.text ? Wr(t.dataBindings ?? {}, t.text, e.text) : void 0,
38803
38799
  "text-anchor": t.textAnchor ?? "center",
38804
38800
  "text-font": t.textFont,
38805
38801
  "text-offset": [(t.textOffset?.[0] ?? 0) / (t.textSize ?? 16), (t.textOffset?.[1] ?? 0) / (t.textSize ?? 16)],
38806
38802
  "text-rotate": t.textRotation ?? 0,
38807
38803
  "text-max-width": t.textMaxWidth ?? 10,
38808
38804
  "text-size": (t.textSize ?? 16) * n,
38809
- "text-color": e.textColor || t.textColor ? Br(t.dataBindings ?? {}, t.textColor, e.textColor) : "#000000",
38810
- "text-halo-color": e.textHaloColor || t.textHaloColor ? Br(t.dataBindings ?? {}, t.textHaloColor, e.textHaloColor) : "#000000",
38805
+ "text-color": e.textColor || t.textColor ? Ur(t.dataBindings ?? {}, t.textColor, e.textColor) : "#000000",
38806
+ "text-halo-color": e.textHaloColor || t.textHaloColor ? Ur(t.dataBindings ?? {}, t.textHaloColor, e.textHaloColor) : "#000000",
38811
38807
  "text-halo-width": t.textHaloWidth ?? 0,
38812
38808
  "text-line-height": t.textLineHeight ?? 1.2,
38813
38809
  "text-letter-spacing": t.textLetterSpacing ?? 0,
@@ -38821,24 +38817,24 @@ function yl(e, t, n, r, i) {
38821
38817
  }
38822
38818
  //#endregion
38823
38819
  //#region src/utils/overlays.ts
38824
- async function bl(e, t, n, r, i, a) {
38820
+ async function Sl(e, t, n, r, i, a) {
38825
38821
  let o = await Promise.all(t.map((e) => `${r}/styles/${e}.json?access_token=${i}`).map((e) => fetch(e).then((e) => e.json())));
38826
38822
  for (let t = 0; t < e.length; t++) {
38827
38823
  let n = e[t], r = o[t];
38828
38824
  for (let e of r.layers) e.metadata === void 0 && (e.metadata = {}), e.metadata["mc-original-layer-id"] = e.id, e.id = `${n} | ${e.id}`;
38829
38825
  }
38830
- return await Promise.all(o.map((e) => xl(e, n, i, a))), o;
38826
+ return await Promise.all(o.map((e) => Cl(e, n, i, a))), o;
38831
38827
  }
38832
- async function xl(e, t, n, r) {
38828
+ async function Cl(e, t, n, r) {
38833
38829
  for (let n in e.sources) t.getSource(n) === void 0 && t.addSource(n, e.sources[n]);
38834
- e.sprite !== void 0 && await Cl(t, e.sprite, n);
38830
+ e.sprite !== void 0 && await Tl(t, e.sprite, n);
38835
38831
  for (let n of e.layers) {
38836
38832
  t.getLayer(n.id) !== void 0 && t.removeLayer(n.id);
38837
38833
  let e = n.metadata?.["mc-add-before"] ?? "mc-before-none";
38838
- t.addLayer(Sl(n, r), e);
38834
+ t.addLayer(wl(n, r), e);
38839
38835
  }
38840
38836
  }
38841
- function Sl(e, t) {
38837
+ function wl(e, t) {
38842
38838
  let n = t ?? {}, r = e.metadata?.["mc-original-layer-id"], i = r === void 0 ? {} : n[r] ?? {}, a = {
38843
38839
  ...e,
38844
38840
  layout: {
@@ -38856,7 +38852,7 @@ function Sl(e, t) {
38856
38852
  };
38857
38853
  return i.minzoom !== void 0 && (a.minzoom = i.minzoom), i.maxzoom !== void 0 && (a.maxzoom = i.maxzoom), "filter" in i && a.type !== "background" && (a.filter = i.filter), a;
38858
38854
  }
38859
- async function Cl(e, t, n) {
38855
+ async function Tl(e, t, n) {
38860
38856
  try {
38861
38857
  let r = `${t}.json?access_token=${n}`, i = `${t}.png?access_token=${n}`, [a, o] = await Promise.all([fetch(r), fetch(i)]);
38862
38858
  if (!a.ok || !o.ok) throw Error(`Failed to load sprite from ${t}`);
@@ -38878,23 +38874,23 @@ async function Cl(e, t, n) {
38878
38874
  }
38879
38875
  //#endregion
38880
38876
  //#region src/images/popup-previous.svg?raw
38881
- var wl = "<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", Tl = "<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", El = "<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", Dl = "<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";
38877
+ var El = "<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", Ol = "<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", kl = "<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";
38882
38878
  //#endregion
38883
38879
  //#region src/utils/youtube.ts
38884
- function Ol(e, t) {
38880
+ function Al(e, t) {
38885
38881
  let { allowFullscreen: n, loop: r } = e, i = C(e.src, t), a, o = i.match(/(?:youtube\.com\/(?:watch\?.*v=|embed\/|v\/)|youtu\.be\/)([-\w]{11})/)?.[1];
38886
38882
  a = o ? `https://www.youtube.com/embed/${o}` : i;
38887
38883
  let s = [];
38888
- if (n || s.push("fs=0"), r && o && s.push(`loop=1&playlist=${o}`), a = Al(a), a = kl(a), s.length) {
38884
+ if (n || s.push("fs=0"), r && o && s.push(`loop=1&playlist=${o}`), a = Ml(a), a = jl(a), s.length) {
38889
38885
  let e = a.includes("?") ? "&" : "?";
38890
38886
  a += `${e}${s.join("&")}`;
38891
38887
  }
38892
38888
  return a;
38893
38889
  }
38894
- function kl(e) {
38890
+ function jl(e) {
38895
38891
  return e.replace(/([?&])si=[^&]+(&)?/, (e, t, n) => t === "?" && !n ? "" : t === "?" && n ? "?" : n ? "&" : "");
38896
38892
  }
38897
- function Al(e) {
38893
+ function Ml(e) {
38898
38894
  let t = new URL(e), n = t.searchParams.get("t");
38899
38895
  if (!n) return e;
38900
38896
  let r = 0, i = /^((\d+)m)?((\d+)s)?$/;
@@ -38910,12 +38906,12 @@ function Al(e) {
38910
38906
  }
38911
38907
  //#endregion
38912
38908
  //#region src/utils/template.ts
38913
- function jl(e, t, n, r) {
38909
+ function Nl(e, t, n, r) {
38914
38910
  let i;
38915
- if (t?.type === "video") i = r === "preview" ? Il(t.src, n) : `
38911
+ if (t?.type === "video") i = r === "preview" ? Rl(t.src, n) : `
38916
38912
  <div class="youtube-container">
38917
38913
  <iframe
38918
- src="${Ol(t, n)}"
38914
+ src="${Al(t, n)}"
38919
38915
  width="100%" height="300" style="border: none" allowfullscreen>
38920
38916
  </iframe>
38921
38917
  </div>
@@ -38929,7 +38925,7 @@ function jl(e, t, n, r) {
38929
38925
  `;
38930
38926
  }
38931
38927
  i = i ? `<div class="media-content">${i}</div>` : "";
38932
- let a = e ? `<div class="text-content">${Pl(e, n)}</div>` : "";
38928
+ let a = e ? `<div class="text-content">${Il(e, n)}</div>` : "";
38933
38929
  return `
38934
38930
  <div class="popup-scroll-wrapper">
38935
38931
  <div class="mc-popup">
@@ -38939,53 +38935,53 @@ function jl(e, t, n, r) {
38939
38935
  </div>
38940
38936
  `;
38941
38937
  }
38942
- var Ml = `
38938
+ var Pl = `
38943
38939
  <button class="mc-popup-button close">
38944
- ${Tl}
38940
+ ${Dl}
38945
38941
  </button>
38946
- `, Nl = `
38942
+ `, Fl = `
38947
38943
  <div class="cycle-buttons">
38948
38944
  <button class="mc-popup-button prev">
38949
- ${wl}
38945
+ ${El}
38950
38946
  </button>
38951
38947
  <button class="mc-popup-button next">
38952
- ${El}
38948
+ ${Ol}
38953
38949
  </button>
38954
38950
  </div>
38955
38951
  `;
38956
- function Pl(e, t) {
38952
+ function Il(e, t) {
38957
38953
  return e ? (e = e.replace(/placeholder="[^"]+"/, ""), e = e.replace(/onerror="[^"]+"/, ""), e = e.replace(/youtube\.com\/embed\/\$([^"'<>\\]+)/gi, (e, n) => {
38958
38954
  let r = w(t[n]);
38959
38955
  return r ? `youtube.com/embed/${E(r)}?` : "";
38960
38956
  }), e = e.replace(/(\S+?)\s*=\s*"\$([^"]+?)"/g, (e, n, r) => {
38961
38957
  let i = w(t[r]);
38962
- return ["src", "href"].includes(n) && !i ? "" : ["src", "href"].includes(n) ? /^(mailto:|tel:|ftp:|data:|http:\/\/|https:\/\/)/i.test(i) ? ` ${n}="${i}"` : ` ${n}="${Fl(i)}"` : ` ${n}="${i}"`;
38958
+ return ["src", "href"].includes(n) && !i ? "" : ["src", "href"].includes(n) ? /^(mailto:|tel:|ftp:|data:|http:\/\/|https:\/\/)/i.test(i) ? ` ${n}="${i}"` : ` ${n}="${Ll(i)}"` : ` ${n}="${i}"`;
38963
38959
  }), e = e.replace(/>\$(.+?)</gi, (e, n) => `>${w(t[n])}<`), e = e.replace(/<span\s+class="mention"\s+data-mention-id="[^"]*">(.*?)<\/span>/gim, (e, t) => t), e) : "";
38964
38960
  }
38965
- function Fl(e) {
38961
+ function Ll(e) {
38966
38962
  return /^https?:\/\//i.test(e) ? e : `https://${e}`;
38967
38963
  }
38968
- function Il(e, t) {
38964
+ function Rl(e, t) {
38969
38965
  return `
38970
38966
  <div class="youtube-placeholder">
38971
38967
  <img src="${`https://img.youtube.com/vi/${E(C(e, t))}/hqdefault.jpg`}" />
38972
38968
  <div class="popup-alert">
38973
- <div class="alert-icon">${Dl}</div>
38974
- <div>${Li("videoAlert")}</div>
38969
+ <div class="alert-icon">${kl}</div>
38970
+ <div>${zi("videoAlert")}</div>
38975
38971
  </div>
38976
38972
  </div>
38977
38973
  `;
38978
38974
  }
38979
38975
  //#endregion
38980
38976
  //#region src/Registry.ts
38981
- var Ll = [
38977
+ var zl = [
38982
38978
  "area",
38983
38979
  "circle",
38984
38980
  "dot",
38985
38981
  "line",
38986
38982
  "marker",
38987
38983
  "polygon"
38988
- ], Rl = class {
38984
+ ], Bl = class {
38989
38985
  data;
38990
38986
  customGroupIds;
38991
38987
  constructor(e) {
@@ -38997,7 +38993,7 @@ var Ll = [
38997
38993
  marker: {},
38998
38994
  polygon: {}
38999
38995
  };
39000
- for (let t of Ll) for (let n of e.registry?.models?.[t] ?? []) {
38996
+ for (let t of zl) for (let n of e.registry?.models?.[t] ?? []) {
39001
38997
  this.data[t][n.id] = {};
39002
38998
  for (let e of n.models) {
39003
38999
  if (t === "area") {
@@ -39043,7 +39039,7 @@ var Ll = [
39043
39039
  }
39044
39040
  return e.reverse();
39045
39041
  }
39046
- }, zl = class {
39042
+ }, Vl = class {
39047
39043
  map;
39048
39044
  popupElements;
39049
39045
  markerLayerIds;
@@ -39192,7 +39188,7 @@ var Ll = [
39192
39188
  r / i
39193
39189
  ];
39194
39190
  }
39195
- }, Bl = class {
39191
+ }, Hl = class {
39196
39192
  map;
39197
39193
  popupPosition = "bottomLeft";
39198
39194
  mapContainer;
@@ -39214,7 +39210,7 @@ var Ll = [
39214
39210
  this.map = e, this.mode = t, this.mapContainer = this.map.getContainer(), this.popupContainer = document.createElement("div"), this.popupContainer.classList.add("popup-container"), this.map.on("mousemove", (e) => this.onMouseMove(e)), this.map.on("click", (e) => this.onClick(e));
39215
39211
  }
39216
39212
  setJobObject(e) {
39217
- this.registry = new Rl(e);
39213
+ this.registry = new Bl(e);
39218
39214
  }
39219
39215
  setParams(e, t, n, r) {
39220
39216
  this.popupPosition = e, this.language = t, this.restrictMapMovement = n, this.center = r;
@@ -39226,7 +39222,7 @@ var Ll = [
39226
39222
  this.popupElements = this.registry.getPopupElements();
39227
39223
  }
39228
39224
  setHighlightManager() {
39229
- this.highlightManager = new zl(this.map, this.registry.getPopupElements());
39225
+ this.highlightManager = new Vl(this.map, this.registry.getPopupElements());
39230
39226
  }
39231
39227
  onMouseMove(e) {
39232
39228
  this.feature = this.getInteractiveFeature(e), this.feature ? this.map.getCanvas().style.cursor = "pointer" : this.map.getCanvas().style.cursor = "";
@@ -39280,7 +39276,7 @@ var Ll = [
39280
39276
  }
39281
39277
  getTemplate(e) {
39282
39278
  let { layer: t } = e, n, r = this.registry.getModel(e);
39283
- if (r?.popup || r?.popupMedia) n = jl(r.popup, r.popupMedia, r.dataBindings ?? {}, this.mode);
39279
+ if (r?.popup || r?.popupMedia) n = Nl(r.popup, r.popupMedia, r.dataBindings ?? {}, this.mode);
39284
39280
  else {
39285
39281
  let r = [];
39286
39282
  this.publication && (r.push(`:${this.publication}-${this.language}`), r.push(`:${this.publication}-:en`)), r.push(`:${this.language}`), r.push(":en"), r.push("");
@@ -39304,11 +39300,11 @@ var Ll = [
39304
39300
  return t.innerHTML = e.trim(), t.content.firstElementChild;
39305
39301
  }
39306
39302
  addPopupControls() {
39307
- let e = this.htmlToElement(Ml);
39303
+ let e = this.htmlToElement(Pl);
39308
39304
  if (e && (e.addEventListener("click", () => {
39309
39305
  this.hidePopup(), this.highlightManager.highlight(void 0);
39310
39306
  }), this.popupContainer.appendChild(e)), this.popupElements.length < 2) return;
39311
- let t = this.htmlToElement(Nl);
39307
+ let t = this.htmlToElement(Fl);
39312
39308
  t && (t.querySelector(".prev")?.addEventListener("click", () => this.cyclePopups(!1)), t.querySelector(".next")?.addEventListener("click", () => this.cyclePopups()), this.popupContainer.appendChild(t));
39313
39309
  }
39314
39310
  fillDatalayerTemplate(e, t, n) {
@@ -39344,11 +39340,11 @@ var Ll = [
39344
39340
  n = e ? t === this.popupElements.length - 1 ? 0 : t + 1 : t === 0 ? this.popupElements.length - 1 : t - 1;
39345
39341
  let r = this.popupElements?.[n];
39346
39342
  this.highlightManager.highlight(r);
39347
- let i = jl(r.popup, r.popupMedia, r.dataBindings ?? {}, this.mode), a = this.popupContainer;
39343
+ let i = Nl(r.popup, r.popupMedia, r.dataBindings ?? {}, this.mode), a = this.popupContainer;
39348
39344
  this.popupContainer.remove(), a.innerHTML = i, this.mapContainer.appendChild(a), this.currentModelId = r.modelId, this.addPopupControls(), e ? this.popupContainer.querySelector(".mc-popup-button.next")?.focus() : this.popupContainer.querySelector(".mc-popup-button.prev")?.focus(), this.currentFeatureId = void 0;
39349
39345
  }
39350
39346
  }
39351
- }, Vl = class e {
39347
+ }, Ul = class e {
39352
39348
  static #e(e) {
39353
39349
  let t = 0, n = [t];
39354
39350
  for (let r = 1; r < e.length; ++r) {
@@ -39399,19 +39395,19 @@ var Ll = [
39399
39395
  get length() {
39400
39396
  return this.#a;
39401
39397
  }
39402
- }, Hl = {
39398
+ }, Wl = {
39403
39399
  solid: [1, 0],
39404
39400
  dotted: [.7, .3],
39405
39401
  dashed: [3.5, 1.5]
39406
39402
  };
39407
- function Ul(e, t, n, r) {
39403
+ function Gl(e, t, n, r) {
39408
39404
  e.addSource(t.id, {
39409
39405
  type: "geojson",
39410
39406
  data: {
39411
39407
  type: "FeatureCollection",
39412
- features: t.models.filter((e) => e.visible ?? !0).map((n) => Wl(e, t, n, 1, r))
39408
+ features: t.models.filter((e) => e.visible ?? !0).map((n) => Kl(e, t, n, 1, r))
39413
39409
  }
39414
- }), Object.entries(Hl).forEach(([r, i]) => {
39410
+ }), Object.entries(Wl).forEach(([r, i]) => {
39415
39411
  t.models.some((e) => (e.lineStyle ?? "solid") === r) && e.addLayer({
39416
39412
  id: `${t.id}-${r}`,
39417
39413
  type: "line",
@@ -39496,18 +39492,18 @@ function Ul(e, t, n, r) {
39496
39492
  ]
39497
39493
  }, n);
39498
39494
  }
39499
- function Wl(e, t, n, r, i) {
39500
- let a = new Vl(n.geometry).slice(0, r), o = n.svg === void 0 ? void 0 : i.getMapLibreImageKey(Hr(n.dataBindings ?? {}, n.svg, void 0), window.devicePixelRatio * (n.iconScale ?? 1));
39495
+ function Kl(e, t, n, r, i) {
39496
+ let a = new Ul(n.geometry).slice(0, r), o = n.svg === void 0 ? void 0 : i.getMapLibreImageKey(Gr(n.dataBindings ?? {}, n.svg, void 0), window.devicePixelRatio * (n.iconScale ?? 1));
39501
39497
  return {
39502
39498
  type: "Feature",
39503
39499
  id: S(n.id),
39504
39500
  properties: {
39505
39501
  id: n.id,
39506
39502
  "line-width": n.lineWidth ?? 3,
39507
- "line-color": t.lineColor || n.lineColor ? Br(n.dataBindings ?? {}, n.lineColor, t.lineColor) : "#000000",
39503
+ "line-color": t.lineColor || n.lineColor ? Ur(n.dataBindings ?? {}, n.lineColor, t.lineColor) : "#000000",
39508
39504
  "line-style": n.lineStyle ?? "solid",
39509
39505
  "mc-image-key": o,
39510
- "icon-rotate": Gl(n, a, e),
39506
+ "icon-rotate": ql(n, a, e),
39511
39507
  "icon-offset": n.iconOffset,
39512
39508
  "icon-size": n.iconScale
39513
39509
  },
@@ -39523,12 +39519,12 @@ function Wl(e, t, n, r, i) {
39523
39519
  }
39524
39520
  };
39525
39521
  }
39526
- function Gl(e, t, n) {
39522
+ function ql(e, t, n) {
39527
39523
  return e.iconRotation ? e.iconAlign ? lr(t, n) + e.iconRotation : e.iconRotation : 0;
39528
39524
  }
39529
39525
  //#endregion
39530
39526
  //#region src/models/area.ts
39531
- function Kl(e, t, n, r, i, a, o) {
39527
+ function Jl(e, t, n, r, i, a, o) {
39532
39528
  let s = gr(t), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map();
39533
39529
  for (let e of t.models) {
39534
39530
  let n = e.featureId, a = t.id, o = [], u = sr(e), d = or(a, e), f = l.get(d) ?? {
@@ -39542,7 +39538,7 @@ function Kl(e, t, n, r, i, a, o) {
39542
39538
  if (e.visible ?? !0) {
39543
39539
  f.featureIds.push(n);
39544
39540
  let a = e.fillPattern === void 0 ? null : i.getMapLibreImageKey(r[e.fillPattern], 2 * window.devicePixelRatio);
39545
- f.modelIdToFillColor[n] = t.fillColor || e.fillColor ? Br(e.dataBindings ?? {}, e.fillColor, t.fillColor, s, t.choropleth?.unmatchedColor) : "#000000", f.modelIdToFillPattern[n] = a, f.modelIdToOutlineColor[n] = t.outlineColor || e.outlineColor ? Br(e.dataBindings ?? {}, e.outlineColor, t.outlineColor) : "#000000", f.modelIdToOutlineWidth[n] = e.outlineWidth ?? .5;
39541
+ f.modelIdToFillColor[n] = t.fillColor || e.fillColor ? Ur(e.dataBindings ?? {}, e.fillColor, t.fillColor, s, t.choropleth?.unmatchedColor) : "#000000", f.modelIdToFillPattern[n] = a, f.modelIdToOutlineColor[n] = t.outlineColor || e.outlineColor ? Ur(e.dataBindings ?? {}, e.outlineColor, t.outlineColor) : "#000000", f.modelIdToOutlineWidth[n] = e.outlineWidth ?? .5;
39546
39542
  }
39547
39543
  c.set(u, e), l.set(d, f);
39548
39544
  }
@@ -39678,12 +39674,12 @@ function Kl(e, t, n, r, i, a, o) {
39678
39674
  }
39679
39675
  //#endregion
39680
39676
  //#region src/models/dot.ts
39681
- function ql(e, t, n) {
39677
+ function Yl(e, t, n) {
39682
39678
  e.addSource(t.id, {
39683
39679
  type: "geojson",
39684
39680
  data: {
39685
39681
  type: "FeatureCollection",
39686
- features: t.models.filter((e) => e.visible ?? !0).map((e) => Jl(t, e))
39682
+ features: t.models.filter((e) => e.visible ?? !0).map((e) => Xl(t, e))
39687
39683
  }
39688
39684
  }), e.addLayer({
39689
39685
  id: t.id,
@@ -39705,14 +39701,14 @@ function ql(e, t, n) {
39705
39701
  }
39706
39702
  }, n);
39707
39703
  }
39708
- function Jl(e, t) {
39704
+ function Xl(e, t) {
39709
39705
  return {
39710
39706
  type: "Feature",
39711
39707
  id: t.id,
39712
39708
  properties: {
39713
39709
  id: t.id,
39714
39710
  "circle-radius": t.radius,
39715
- "circle-color": e.fillColor || t.fillColor ? Br(t.dataBindings ?? {}, t.fillColor, e.fillColor) : "#000000"
39711
+ "circle-color": e.fillColor || t.fillColor ? Ur(t.dataBindings ?? {}, t.fillColor, e.fillColor) : "#000000"
39716
39712
  },
39717
39713
  geometry: {
39718
39714
  type: "Point",
@@ -39722,94 +39718,94 @@ function Jl(e, t) {
39722
39718
  }
39723
39719
  //#endregion
39724
39720
  //#region src/utils/video/easings.ts
39725
- function Yl(e, t, n, r) {
39721
+ function Zl(e, t, n, r) {
39726
39722
  return t + n / r * e;
39727
39723
  }
39728
- function Xl(e, t, n, r) {
39724
+ function Ql(e, t, n, r) {
39729
39725
  return n * ((e = e / r - 1) * e * e + 1) + t;
39730
39726
  }
39731
- function Zl(e, t, n, r) {
39727
+ function $l(e, t, n, r) {
39732
39728
  let i = 1.70158, a = 0, o = n;
39733
39729
  return e === 0 ? t : (e /= r) === 1 ? t + n : (a ||= r * .3, o < Math.abs(n) ? (o = n, i = a / 4) : i = a / (2 * Math.PI) * Math.asin(n / o), o * 2 ** (-10 * e) * Math.sin((e * r - i) * (2 * Math.PI) / a) + n + t);
39734
39730
  }
39735
- function Ql(e, t, n, r, i) {
39731
+ function eu(e, t, n, r, i) {
39736
39732
  return i === void 0 && (i = 1.70158), n * ((e = e / r - 1) * e * ((i + 1) * e + i) + 1) + t;
39737
39733
  }
39738
- function $l(e, t, n, r) {
39734
+ function tu(e, t, n, r) {
39739
39735
  return (e /= r) < 1 / 2.75 ? n * (7.5625 * e * e) + t : e < 2 / 2.75 ? n * (7.5625 * (e -= 1.5 / 2.75) * e + .75) + t : e < 2.5 / 2.75 ? n * (7.5625 * (e -= 2.25 / 2.75) * e + .9375) + t : n * (7.5625 * (e -= 2.625 / 2.75) * e + .984375) + t;
39740
39736
  }
39741
39737
  //#endregion
39742
39738
  //#region src/utils/video/animations.ts
39743
- var eu = {
39744
- linear: Yl,
39745
- easeOutCubic: Xl,
39746
- easeOutBack: Ql,
39747
- easeOutBounce: $l,
39748
- easeOutElastic: Zl
39739
+ var nu = {
39740
+ linear: Zl,
39741
+ easeOutCubic: Ql,
39742
+ easeOutBack: eu,
39743
+ easeOutBounce: tu,
39744
+ easeOutElastic: $l
39749
39745
  };
39750
- function tu(e) {
39746
+ function ru(e) {
39751
39747
  return e.entryType === "fade" || e.exitType === "fade" || e.entryType === "instant" || e.exitType === "instant";
39752
39748
  }
39753
- function nu(e) {
39749
+ function iu(e) {
39754
39750
  return e.entryType === "grow" || e.exitType === "grow";
39755
39751
  }
39756
- function ru(e, t, n) {
39752
+ function au(e, t, n) {
39757
39753
  let { entry: r, entryDuration: i, exit: a, exitDuration: o } = e, { entryType: s, entryEasing: c, exitType: l, exitEasing: u } = e;
39758
- return n < r && (s === t || s === "instant" && t === "fade") || n > a && (l === t || l === "instant" && t === "fade") ? 0 : i > 0 && n < r + i && s === t ? eu[c](n - r, 0, 1, i) : o > 0 && n > a - o && l === t ? eu[u](n - (a - o), 1, -1, o) : 1;
39754
+ return n < r && (s === t || s === "instant" && t === "fade") || n > a && (l === t || l === "instant" && t === "fade") ? 0 : i > 0 && n < r + i && s === t ? nu[c](n - r, 0, 1, i) : o > 0 && n > a - o && l === t ? nu[u](n - (a - o), 1, -1, o) : 1;
39759
39755
  }
39760
39756
  //#endregion
39761
39757
  //#region src/utils/video/index.ts
39762
- function iu(e) {
39763
- let t = e.length > 0 ? [au(e[0])] : [], n = 0, r = 0;
39758
+ function ou(e) {
39759
+ let t = e.length > 0 ? [su(e[0])] : [], n = 0, r = 0;
39764
39760
  for (let i = 1; i < e.length; ++i) {
39765
- let a = au(e[i]);
39766
- n += ou(e[i - 1].center[0], a.center[0]), r += ou(e[i - 1].bearing, a.bearing), a.center[0] += n * 360, a.x += n, a.bearing += r * 360, t.push(a);
39761
+ let a = su(e[i]);
39762
+ n += cu(e[i - 1].center[0], a.center[0]), r += cu(e[i - 1].bearing, a.bearing), a.center[0] += n * 360, a.x += n, a.bearing += r * 360, t.push(a);
39767
39763
  }
39768
39764
  return t;
39769
39765
  }
39770
- function au(e) {
39766
+ function su(e) {
39771
39767
  return {
39772
39768
  ...e,
39773
39769
  center: [e.center[0], e.center[1]]
39774
39770
  };
39775
39771
  }
39776
- function ou(e, t) {
39772
+ function cu(e, t) {
39777
39773
  if (Math.abs(e) + Math.abs(t) > 180) {
39778
39774
  if (e > 0 && t < 0) return 1;
39779
39775
  if (e < 0 && t > 0) return -1;
39780
39776
  }
39781
39777
  return 0;
39782
39778
  }
39783
- function su(e) {
39779
+ function lu(e) {
39784
39780
  return 2 ** -e;
39785
39781
  }
39786
- function cu(e) {
39782
+ function uu(e) {
39787
39783
  return e.length > 0 ? e[e.length - 1].time : 0;
39788
39784
  }
39789
- function lu(e) {
39785
+ function du(e) {
39790
39786
  return P(e, 23.976) ? 24e3 / 1001 : P(e, 29.97) ? 3e4 / 1001 : P(e, 59.94) ? 6e4 / 1001 : e;
39791
39787
  }
39792
39788
  //#endregion
39793
39789
  //#region node_modules/d3-shape/src/curve/monotone.js
39794
- function uu(e) {
39790
+ function fu(e) {
39795
39791
  return e < 0 ? -1 : 1;
39796
39792
  }
39797
- function du(e, t, n) {
39793
+ function pu(e, t, n) {
39798
39794
  var r = e._x1 - e._x0, i = t - e._x1, a = (e._y1 - e._y0) / (r || i < 0 && -0), o = (n - e._y1) / (i || r < 0 && -0), s = (a * i + o * r) / (r + i);
39799
- return (uu(a) + uu(o)) * Math.min(Math.abs(a), Math.abs(o), .5 * Math.abs(s)) || 0;
39795
+ return (fu(a) + fu(o)) * Math.min(Math.abs(a), Math.abs(o), .5 * Math.abs(s)) || 0;
39800
39796
  }
39801
- function fu(e, t) {
39797
+ function mu(e, t) {
39802
39798
  var n = e._x1 - e._x0;
39803
39799
  return n ? (3 * (e._y1 - e._y0) / n - t) / 2 : t;
39804
39800
  }
39805
- function pu(e, t, n) {
39801
+ function hu(e, t, n) {
39806
39802
  var r = e._x0, i = e._y0, a = e._x1, o = e._y1, s = (a - r) / 3;
39807
39803
  e._context.bezierCurveTo(r + s, i + s * t, a - s, o - s * n, a, o);
39808
39804
  }
39809
- function mu(e) {
39805
+ function gu(e) {
39810
39806
  this._context = e;
39811
39807
  }
39812
- mu.prototype = {
39808
+ gu.prototype = {
39813
39809
  areaStart: function() {
39814
39810
  this._line = 0;
39815
39811
  },
@@ -39825,7 +39821,7 @@ mu.prototype = {
39825
39821
  this._context.lineTo(this._x1, this._y1);
39826
39822
  break;
39827
39823
  case 3:
39828
- pu(this, this._t0, fu(this, this._t0));
39824
+ hu(this, this._t0, mu(this, this._t0));
39829
39825
  break;
39830
39826
  }
39831
39827
  (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
@@ -39841,26 +39837,26 @@ mu.prototype = {
39841
39837
  this._point = 2;
39842
39838
  break;
39843
39839
  case 2:
39844
- this._point = 3, pu(this, fu(this, n = du(this, e, t)), n);
39840
+ this._point = 3, hu(this, mu(this, n = pu(this, e, t)), n);
39845
39841
  break;
39846
39842
  default:
39847
- pu(this, this._t0, n = du(this, e, t));
39843
+ hu(this, this._t0, n = pu(this, e, t));
39848
39844
  break;
39849
39845
  }
39850
39846
  this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t, this._t0 = n;
39851
39847
  }
39852
39848
  }
39853
39849
  };
39854
- function hu(e) {
39855
- this._context = new gu(e);
39850
+ function _u(e) {
39851
+ this._context = new vu(e);
39856
39852
  }
39857
- (hu.prototype = Object.create(mu.prototype)).point = function(e, t) {
39858
- mu.prototype.point.call(this, t, e);
39853
+ (_u.prototype = Object.create(gu.prototype)).point = function(e, t) {
39854
+ gu.prototype.point.call(this, t, e);
39859
39855
  };
39860
- function gu(e) {
39856
+ function vu(e) {
39861
39857
  this._context = e;
39862
39858
  }
39863
- gu.prototype = {
39859
+ vu.prototype = {
39864
39860
  moveTo: function(e, t) {
39865
39861
  this._context.moveTo(t, e);
39866
39862
  },
@@ -39874,34 +39870,34 @@ gu.prototype = {
39874
39870
  this._context.bezierCurveTo(t, e, r, n, a, i);
39875
39871
  }
39876
39872
  };
39877
- function _u(e) {
39878
- return new mu(e);
39873
+ function yu(e) {
39874
+ return new gu(e);
39879
39875
  }
39880
39876
  //#endregion
39881
39877
  //#region node_modules/bezier-easing/src/index.js
39882
- function vu(e) {
39878
+ function bu(e) {
39883
39879
  return e;
39884
39880
  }
39885
- var { cbrt: yu, sqrt: bu, PI: xu } = Math, Su = (e, t, n, r, i) => {
39881
+ var { cbrt: xu, sqrt: Su, PI: Cu } = Math, wu = (e, t, n, r, i) => {
39886
39882
  let a = t + n * e, o = a ** 2 + r;
39887
39883
  if (o > 0) {
39888
- let e = bu(o);
39889
- return yu(a + e) + yu(a - e) - i;
39884
+ let e = Su(o);
39885
+ return xu(a + e) + xu(a - e) - i;
39890
39886
  }
39891
- let s = yu(bu(a * a - o)), c = a ? Math.atan(bu(-o) / a) : -xu / 2, l;
39892
- return l = n < 0 ? (a > 0 ? 2 * xu : xu) - c : i < 0 ? (a > 0 ? 2 * xu : -3 * xu) + c : (a > 0 ? 0 : xu) + c, 2 * s * Math.cos(l / 3) - i;
39893
- }, Cu = (e, t, n, r) => ((t * e + 3 * n) * e + r) * e;
39894
- function wu(e, t, n, r) {
39887
+ let s = xu(Su(a * a - o)), c = a ? Math.atan(Su(-o) / a) : -Cu / 2, l;
39888
+ return l = n < 0 ? (a > 0 ? 2 * Cu : Cu) - c : i < 0 ? (a > 0 ? 2 * Cu : -3 * Cu) + c : (a > 0 ? 0 : Cu) + c, 2 * s * Math.cos(l / 3) - i;
39889
+ }, Tu = (e, t, n, r) => ((t * e + 3 * n) * e + r) * e;
39890
+ function Eu(e, t, n, r) {
39895
39891
  if (!(0 <= e && e <= 1 && 0 <= n && n <= 1)) throw Error("bezier x values must be in [0, 1] range");
39896
- if (e === t && n === r) return vu;
39897
- let i = 6 * (3 * e - 3 * n + 1), a = 6 * (n - 2 * e), o = 3 * e, s = i * i, c = a * a, l = a / i, u = 3 * a * o / s - c * a / (s * i), d = 2 * o / i - c / s, f = d * d * d, p = 3 / i, m = 3 * t - 3 * r + 1, h = r - 2 * t, g = 3 * t, _ = i ? Su : vu;
39892
+ if (e === t && n === r) return bu;
39893
+ let i = 6 * (3 * e - 3 * n + 1), a = 6 * (n - 2 * e), o = 3 * e, s = i * i, c = a * a, l = a / i, u = 3 * a * o / s - c * a / (s * i), d = 2 * o / i - c / s, f = d * d * d, p = 3 / i, m = 3 * t - 3 * r + 1, h = r - 2 * t, g = 3 * t, _ = i ? wu : bu;
39898
39894
  return function(e) {
39899
- return e === 0 || e === 1 ? e : Cu(_(e, u, p, f, l), m, h, g);
39895
+ return e === 0 || e === 1 ? e : Tu(_(e, u, p, f, l), m, h, g);
39900
39896
  };
39901
39897
  }
39902
39898
  //#endregion
39903
39899
  //#region src/utils/video/monotonicCurve.ts
39904
- var Tu = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
39900
+ var Du = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
39905
39901
  t.exports = n;
39906
39902
  function n(e, t, n, r) {
39907
39903
  var i, a, o, s, c, l, u, d, f, p, m, h, g, _;
@@ -39912,11 +39908,11 @@ var Tu = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
39912
39908
  }
39913
39909
  return g && console.log("Newton-Raphson: Maximum iterations reached (" + c + ")"), !1;
39914
39910
  }
39915
- })))(), 1), Eu = class {
39911
+ })))(), 1), Ou = class {
39916
39912
  segments;
39917
39913
  constructor(e) {
39918
39914
  this.segments = [];
39919
- let t = new Du(), n = _u(t);
39915
+ let t = new ku(), n = yu(t);
39920
39916
  n.lineStart();
39921
39917
  for (let t of e) n.point(t.x, t.y);
39922
39918
  n.lineEnd(), this.segments = t.segments;
@@ -39928,17 +39924,17 @@ var Tu = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
39928
39924
  return t.startY !== t.endY && t.easing !== void 0 ? k(t.startY, t.endY, t.easing(n)) : k(t.startY, t.endY, n);
39929
39925
  }
39930
39926
  solve(e, t) {
39931
- let n = (0, Tu.default)((t) => this.sample(t) - e, t);
39927
+ let n = (0, Du.default)((t) => this.sample(t) - e, t);
39932
39928
  return n === !1 ? t : n;
39933
39929
  }
39934
- }, Du = class {
39930
+ }, ku = class {
39935
39931
  previousPoint = {
39936
39932
  x: 0,
39937
39933
  y: 0
39938
39934
  };
39939
39935
  segments = [];
39940
39936
  bezierCurveTo(e, t, n, r, i, a) {
39941
- let o = this.previousPoint.x, s = this.previousPoint.y, c = i === o ? void 0 : wu((e - o) / (i - o), (t - s) / (a - s), (n - o) / (i - o), (r - s) / (a - s));
39937
+ let o = this.previousPoint.x, s = this.previousPoint.y, c = i === o ? void 0 : Eu((e - o) / (i - o), (t - s) / (a - s), (n - o) / (i - o), (r - s) / (a - s));
39942
39938
  this.segments.push({
39943
39939
  startX: o,
39944
39940
  endX: i,
@@ -39973,7 +39969,7 @@ var Tu = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
39973
39969
  rect() {}
39974
39970
  arcTo() {}
39975
39971
  quadraticCurveTo() {}
39976
- }, Ou = class {
39972
+ }, Au = class {
39977
39973
  script;
39978
39974
  xCurve;
39979
39975
  yCurve;
@@ -39984,10 +39980,10 @@ var Tu = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
39984
39980
  altitudeCurve;
39985
39981
  elevationCurve;
39986
39982
  constructor(e) {
39987
- this.script = iu(e), this.xCurve = this.createMonotonicCurve(this.script, "x"), this.yCurve = this.createMonotonicCurve(this.script, "y"), this.fovCurve = this.createMonotonicCurve(this.script, "fov"), this.zoomCurve = this.createMonotonicCurve(this.script, "zoom"), this.pitchCurve = this.createMonotonicCurve(this.script, "pitch"), this.bearingCurve = this.createMonotonicCurve(this.script, "bearing"), this.altitudeCurve = this.createMonotonicCurve(this.script, "altitude"), this.elevationCurve = this.createMonotonicCurve(this.script, "elevation");
39983
+ this.script = ou(e), this.xCurve = this.createMonotonicCurve(this.script, "x"), this.yCurve = this.createMonotonicCurve(this.script, "y"), this.fovCurve = this.createMonotonicCurve(this.script, "fov"), this.zoomCurve = this.createMonotonicCurve(this.script, "zoom"), this.pitchCurve = this.createMonotonicCurve(this.script, "pitch"), this.bearingCurve = this.createMonotonicCurve(this.script, "bearing"), this.altitudeCurve = this.createMonotonicCurve(this.script, "altitude"), this.elevationCurve = this.createMonotonicCurve(this.script, "elevation");
39988
39984
  }
39989
39985
  sample(e) {
39990
- let t = this.zoomCurve.sample(e), n = this.altitudeCurve.solve(su(t), e), r = this.xCurve.sample(n), i = this.yCurve.sample(n), a = this.elevationCurve.sample(n), o = this.bearingCurve.sample(e), s = this.pitchCurve.sample(e), c = this.fovCurve.sample(e);
39986
+ let t = this.zoomCurve.sample(e), n = this.altitudeCurve.solve(lu(t), e), r = this.xCurve.sample(n), i = this.yCurve.sample(n), a = this.elevationCurve.sample(n), o = this.bearingCurve.sample(e), s = this.pitchCurve.sample(e), c = this.fovCurve.sample(e);
39991
39987
  return {
39992
39988
  center: new l.MercatorCoordinate(r, i).toLngLat(),
39993
39989
  zoom: t,
@@ -40031,7 +40027,7 @@ var Tu = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
40031
40027
  y: l
40032
40028
  });
40033
40029
  }
40034
- return new Eu(n);
40030
+ return new Ou(n);
40035
40031
  }
40036
40032
  sampleAutoHideOpacity(e) {
40037
40033
  let t = this.script;
@@ -40042,12 +40038,12 @@ var Tu = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
40042
40038
  if (r.hideLabels === (a?.hideLabels ?? !1)) o = r.hideLabels ? 0 : 1;
40043
40039
  else {
40044
40040
  let t = e - r.time, n = Math.min(400, i.time - r.time);
40045
- o = j(Xl(t, r.hideLabels ? 1 : 0, r.hideLabels ? -1 : 1, n), 0, 1);
40041
+ o = j(Ql(t, r.hideLabels ? 1 : 0, r.hideLabels ? -1 : 1, n), 0, 1);
40046
40042
  }
40047
40043
  let s;
40048
40044
  if (n === t.length - 2 && r.hideLabels) {
40049
40045
  let t = Math.max(r.time, i.time - 400);
40050
- s = j(Xl(e - t, 0, 1, i.time - t), 0, 1);
40046
+ s = j(Ql(e - t, 0, 1, i.time - t), 0, 1);
40051
40047
  } else s = 0;
40052
40048
  return Math.max(o, s);
40053
40049
  }
@@ -40059,10 +40055,10 @@ var Tu = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
40059
40055
  }
40060
40056
  }
40061
40057
  getKeyframeValue(e, t) {
40062
- return t === "altitude" ? su(e.zoom) : e[t];
40058
+ return t === "altitude" ? lu(e.zoom) : e[t];
40063
40059
  }
40064
- }, ku = Au;
40065
- function Au(e, t, n) {
40060
+ }, ju = Mu;
40061
+ function Mu(e, t, n) {
40066
40062
  var r = null, i = null, a = function() {
40067
40063
  r &&= (clearTimeout(r), i = null, null);
40068
40064
  }, o = function() {
@@ -40084,7 +40080,7 @@ function Au(e, t, n) {
40084
40080
  }
40085
40081
  //#endregion
40086
40082
  //#region src/Video.ts
40087
- var ju = class {
40083
+ var Nu = class {
40088
40084
  mcMap;
40089
40085
  cameraCurve;
40090
40086
  jobObject;
@@ -40108,7 +40104,7 @@ var ju = class {
40108
40104
  elevation: e.elevation ?? 0
40109
40105
  };
40110
40106
  });
40111
- this.duration = cu(s), this.cameraCurve = new Ou(s), this.jobObject = t, this.svgs = n, this.svgCache = r, this.mapstyle = i, this.overlays = a, this.layerInfo = o;
40107
+ this.duration = uu(s), this.cameraCurve = new Au(s), this.jobObject = t, this.svgs = n, this.svgCache = r, this.mapstyle = i, this.overlays = a, this.layerInfo = o;
40112
40108
  }
40113
40109
  play() {
40114
40110
  this.playbackContext === void 0 && this.duration > 0 && (this.playhead >= this.duration && (this.playhead = 0), this.playbackContext = {
@@ -40126,7 +40122,7 @@ var ju = class {
40126
40122
  }));
40127
40123
  }
40128
40124
  async *frames() {
40129
- let e = this.mcMap.map, t = lu(this.jobObject.export?.frameRate ?? 60), n = Math.ceil(this.duration * t / 1e3);
40125
+ let e = this.mcMap.map, t = du(this.jobObject.export?.frameRate ?? 60), n = Math.ceil(this.duration * t / 1e3);
40130
40126
  e._fadeDuration = 0, e.style.stylesheet.transition = {
40131
40127
  duration: 0,
40132
40128
  delay: 0
@@ -40145,7 +40141,7 @@ var ju = class {
40145
40141
  let r = t.querySelectorAll(".adornment-svg"), i = await Promise.all(Array.from(r).map(async (e) => {
40146
40142
  let t = e.outerHTML, r = e.getBoundingClientRect(), i = r.left - n.left, a = r.top - n.top, o = r.width, s = r.height;
40147
40143
  return {
40148
- image: await Er(t, o, s),
40144
+ image: await Or(t, o, s),
40149
40145
  x: i,
40150
40146
  y: a
40151
40147
  };
@@ -40167,8 +40163,8 @@ var ju = class {
40167
40163
  let t = this.mcMap.map, { svgs: n, svgCache: r } = this, i = this.jobObject.video?.animations ?? [];
40168
40164
  for (let n of i) {
40169
40165
  let { target: r } = n;
40170
- if (r.type === "model" && tu(n)) {
40171
- let { modelType: i, groupId: a, modelId: o } = r, s = ru(n, "fade", e);
40166
+ if (r.type === "model" && ru(n)) {
40167
+ let { modelType: i, groupId: a, modelId: o } = r, s = au(n, "fade", e);
40172
40168
  (i === "polygon" || i === "circle" || i === "line" || i === "marker" || i === "dot") && (o === void 0 ? t.setGlobalStateProperty(`opacity-${a}`, s === 1 ? null : s) : t.setFeatureState({
40173
40169
  source: a,
40174
40170
  id: S(o)
@@ -40178,14 +40174,14 @@ var ju = class {
40178
40174
  for (let n of this.jobObject.registry?.models?.area ?? []) {
40179
40175
  let { groupAnimation: r, modelAnimations: a } = this.getGroupAnimations(i, "area", n.id, "opacity");
40180
40176
  if (!(r === void 0 && a.size === 0)) if (r !== void 0 && a.size === 0) {
40181
- let i = ru(r, "fade", e);
40177
+ let i = au(r, "fade", e);
40182
40178
  n.models.reduce((e, t) => e.add(or(n.id, t)), /* @__PURE__ */ new Set()).forEach((e) => {
40183
40179
  t.setPaintProperty(e, "fill-opacity", i), t.setPaintProperty(`${e}-outline`, "line-opacity", i), t.setPaintProperty(`${e}-pattern`, "fill-opacity", i);
40184
40180
  });
40185
40181
  } else {
40186
- let i = r === void 0 ? 1 : ru(r, "fade", e), o = {};
40182
+ let i = r === void 0 ? 1 : au(r, "fade", e), o = {};
40187
40183
  for (let t of n.models) {
40188
- let r = t.featureId === void 0 ? t.id : String(t.featureId), s = or(n.id, t), c = a.get(t.id), l = c === void 0 ? i : ru(c, "fade", e);
40184
+ let r = t.featureId === void 0 ? t.id : String(t.featureId), s = or(n.id, t), c = a.get(t.id), l = c === void 0 ? i : au(c, "fade", e);
40189
40185
  o[s] ??= {}, o[s][r] = l;
40190
40186
  }
40191
40187
  for (let [e, n] of Object.entries(o)) {
@@ -40208,32 +40204,32 @@ var ju = class {
40208
40204
  }
40209
40205
  }
40210
40206
  for (let a of this.jobObject.registry?.models?.circle ?? []) {
40211
- let { groupAnimation: o, modelAnimations: s } = this.getGroupAnimations(i, "circle", a.id, "scale"), c = o === void 0 ? 1 : ru(o, "grow", e);
40207
+ let { groupAnimation: o, modelAnimations: s } = this.getGroupAnimations(i, "circle", a.id, "scale"), c = o === void 0 ? 1 : au(o, "grow", e);
40212
40208
  (o !== void 0 || s.size > 0) && t.getSource(a.id).setData({
40213
40209
  type: "FeatureCollection",
40214
40210
  features: a.models.filter((e) => e.visible ?? !0).map((t) => {
40215
40211
  let i = s.get(t.id);
40216
- return hl(a, t, i === void 0 ? c : ru(i, "grow", e), n, r);
40212
+ return _l(a, t, i === void 0 ? c : au(i, "grow", e), n, r);
40217
40213
  })
40218
40214
  });
40219
40215
  }
40220
40216
  for (let n of this.jobObject.registry?.models?.line ?? []) {
40221
- let { groupAnimation: a, modelAnimations: o } = this.getGroupAnimations(i, "line", n.id, "scale"), s = a === void 0 ? 1 : ru(a, "grow", e);
40217
+ let { groupAnimation: a, modelAnimations: o } = this.getGroupAnimations(i, "line", n.id, "scale"), s = a === void 0 ? 1 : au(a, "grow", e);
40222
40218
  (a !== void 0 || o.size > 0) && t.getSource(n.id).setData({
40223
40219
  type: "FeatureCollection",
40224
40220
  features: n.models.filter((e) => e.visible ?? !0).map((i) => {
40225
40221
  let a = o.get(i.id);
40226
- return Wl(t, n, i, a === void 0 ? s : ru(a, "grow", e), r);
40222
+ return Kl(t, n, i, a === void 0 ? s : au(a, "grow", e), r);
40227
40223
  })
40228
40224
  });
40229
40225
  }
40230
40226
  for (let a of this.jobObject.registry?.models?.marker ?? []) {
40231
- let { groupAnimation: o, modelAnimations: s } = this.getGroupAnimations(i, "marker", a.id, "scale"), c = o === void 0 ? 1 : ru(o, "grow", e);
40227
+ let { groupAnimation: o, modelAnimations: s } = this.getGroupAnimations(i, "marker", a.id, "scale"), c = o === void 0 ? 1 : au(o, "grow", e);
40232
40228
  (o !== void 0 || s.size > 0) && t.getSource(a.id).setData({
40233
40229
  type: "FeatureCollection",
40234
40230
  features: a.models.filter((e) => e.visible ?? !0).map((t) => {
40235
40231
  let i = s.get(t.id);
40236
- return yl(a, t, i === void 0 ? c : ru(i, "grow", e), n, r);
40232
+ return xl(a, t, i === void 0 ? c : au(i, "grow", e), n, r);
40237
40233
  })
40238
40234
  });
40239
40235
  }
@@ -40254,7 +40250,7 @@ var ju = class {
40254
40250
  delay: 0
40255
40251
  }), this.restoreAfterPlayback();
40256
40252
  }
40257
- restoreAfterPlayback = ku(() => {
40253
+ restoreAfterPlayback = ju(() => {
40258
40254
  let e = this.mcMap.map;
40259
40255
  e.setCenterClampedToGround(!0), e.style?.stylesheet && (e.style.stylesheet.transition = void 0);
40260
40256
  }, 300);
@@ -40262,7 +40258,7 @@ var ju = class {
40262
40258
  let i, a = /* @__PURE__ */ new Map();
40263
40259
  for (let o of e) {
40264
40260
  let { target: e } = o;
40265
- e.type === "model" && e.modelType === t && e.groupId === n && (r === "opacity" && tu(o) || r === "scale" && nu(o)) && (e.modelId === void 0 ? i = o : a.set(e.modelId, o));
40261
+ e.type === "model" && e.modelType === t && e.groupId === n && (r === "opacity" && ru(o) || r === "scale" && iu(o)) && (e.modelId === void 0 ? i = o : a.set(e.modelId, o));
40266
40262
  }
40267
40263
  return {
40268
40264
  groupAnimation: i,
@@ -40276,7 +40272,7 @@ var ju = class {
40276
40272
  let { target: e } = n;
40277
40273
  e.type === "layer" && e.ids.includes(t.id) && e.ids.length < o && (a = n, o = e.ids.length);
40278
40274
  }
40279
- return a === void 0 ? i === void 0 ? void 0 : ru(i, "fade", n) : ru(a, "fade", n);
40275
+ return a === void 0 ? i === void 0 ? void 0 : au(i, "fade", n) : au(a, "fade", n);
40280
40276
  }
40281
40277
  setLayerOpacity(e, t) {
40282
40278
  let n = this.mcMap.map;
@@ -40286,11 +40282,11 @@ var ju = class {
40286
40282
  let t = this.mcMap.map;
40287
40283
  e.type === "fill" ? t.setPaintProperty(e.id, "fill-opacity", e.paint?.["fill-opacity"] ?? 1) : e.type === "line" ? t.setPaintProperty(e.id, "line-opacity", e.paint?.["line-opacity"] ?? 1) : e.type === "circle" ? (t.setPaintProperty(e.id, "circle-opacity", e.paint?.["circle-opacity"] ?? 1), t.setPaintProperty(e.id, "circle-stroke-opacity", e.paint?.["circle-stroke-opacity"] ?? 1)) : e.type === "heatmap" ? t.setPaintProperty(e.id, "heatmap-opacity", e.paint?.["heatmap-opacity"] ?? 1) : e.type === "fill-extrusion" ? t.setPaintProperty(e.id, "fill-extrusion-opacity", e.paint?.["fill-extrusion-opacity"] ?? 1) : e.type === "symbol" ? (t.setPaintProperty(e.id, "icon-opacity", e.paint?.["icon-opacity"] ?? 1), t.setPaintProperty(e.id, "text-opacity", e.paint?.["text-opacity"] ?? 1)) : e.type === "raster" ? t.setPaintProperty(e.id, "raster-opacity", e.paint?.["raster-opacity"] ?? 1) : e.type === "hillshade" ? t.setPaintProperty(e.id, "hillshade-exaggeration", e.paint?.["hillshade-exaggeration"] ?? .5) : e.type === "color-relief" ? t.setPaintProperty(e.id, "color-relief-opacity", e.paint?.["color-relief-opacity"] ?? 1) : e.type === "background" && t.setPaintProperty(e.id, "background-opacity", e.paint?.["background-opacity"] ?? 1), t.setLayoutProperty(e.id, "visibility", this.layerInfo[e.id]?.visibility ? "visible" : "none");
40288
40284
  }
40289
- }, Mu = class extends l.Evented {
40285
+ }, Pu = class extends l.Evented {
40290
40286
  map;
40291
40287
  video;
40292
40288
  constructor(e, t, n, r, i, a, o) {
40293
- super(), this.map = e, this.video = new ju(this, t, n, r, i, a, o);
40289
+ super(), this.map = e, this.video = new Nu(this, t, n, r, i, a, o);
40294
40290
  }
40295
40291
  on(e, t) {
40296
40292
  return super.on(e, t);
@@ -40319,9 +40315,9 @@ var ju = class {
40319
40315
  };
40320
40316
  //#endregion
40321
40317
  //#region src/initMap.ts
40322
- async function Nu(e) {
40323
- let { accessToken: t, mode: n = "sdk", env: r = "production" } = e, i = r === "bleeding" ? "https://vapi.bleeding.mc-cdn.io" : r === "beta" ? "https://vapi.beta.mc-cdn.io" : "https://vapi.mc-cdn.io", a = r === "bleeding" ? "https://cdn.bleeding.mapcreator.io" : r === "beta" ? "https://cdn.beta.mapcreator.io" : "https://cdn.mapcreator.io", o = typeof e.job == "string" ? await Pu(e.job, a, t) : e.job;
40324
- await Fu();
40318
+ async function Fu(e) {
40319
+ let { accessToken: t, mode: n = "sdk", env: r = "production" } = e, i = r === "bleeding" ? "https://vapi.bleeding.mc-cdn.io" : r === "beta" ? "https://vapi.beta.mc-cdn.io" : "https://vapi.mc-cdn.io", a = r === "bleeding" ? "https://cdn.bleeding.mapcreator.io" : r === "beta" ? "https://cdn.beta.mapcreator.io" : "https://cdn.mapcreator.io", o = typeof e.job == "string" ? await Iu(e.job, a, t) : e.job;
40320
+ await Lu();
40325
40321
  let s = new l.Map({
40326
40322
  container: e.container,
40327
40323
  attributionControl: !1,
@@ -40335,17 +40331,17 @@ async function Nu(e) {
40335
40331
  maxPitch: 85,
40336
40332
  maxZoom: 22,
40337
40333
  locale: {
40338
- "CooperativeGesturesHandler.WindowsHelpText": Li("windowsHelpText"),
40339
- "CooperativeGesturesHandler.MacHelpText": Li("macHelpText"),
40340
- "CooperativeGesturesHandler.MobileHelpText": Li("mobileHelpText")
40334
+ "CooperativeGesturesHandler.WindowsHelpText": zi("windowsHelpText"),
40335
+ "CooperativeGesturesHandler.MacHelpText": zi("macHelpText"),
40336
+ "CooperativeGesturesHandler.MobileHelpText": zi("mobileHelpText")
40341
40337
  },
40342
40338
  canvasContextAttributes: { preserveDrawingBuffer: n === "video" }
40343
40339
  }), c = s.getContainer();
40344
40340
  c.classList.add("mc-map"), c.classList.add(`mc-mode-${n}`);
40345
- let d = new Fr(s), p = new Bl(s, n), { map: { language: h, pitch: _ = 0, rotation: v = 0, center: y, hideBasemap: b, detailLevel: x = 0, projection: S = "mercator", terrain: C = !1, terrainExaggeration: w = 1 }, registry: T = {}, web: E, positionOffsets: D, title: O } = o, { models: k = {}, slots: A = {}, svgs: j = {} } = T;
40346
- Ru(r, i, t), s.resize(), n === "app" && (document.title = O ? `${O} - Mapcreator` : "Mapcreator"), s.setPitch(_), s.setBearing(v);
40341
+ let d = new Rr(s), p = new Hl(s, n), { map: { language: h, pitch: _ = 0, rotation: v = 0, center: y, hideBasemap: b, detailLevel: x = 0, projection: S = "mercator", terrain: C = !1, terrainExaggeration: w = 1 }, registry: T = {}, web: E, positionOffsets: D, title: O } = o, { models: k = {}, slots: A = {}, svgs: j = {} } = T;
40342
+ Bu(r, i, t), s.resize(), n === "app" && (document.title = O ? `${O} - Mapcreator` : "Mapcreator"), s.setPitch(_), s.setBearing(v);
40347
40343
  let M = N(o, c), P, F;
40348
- if (n === "video" ? (F = o.map.zoom - x, P = M) : (F = o.map.zoom - x + Math.log2(M), P = 1), s.setScale(P), s.setZoom(F), s.setCenter(y), s.setDetailLevel(x), s.setMinZoom(x), s.addControl(new l.AttributionControl({ compact: !1 })), n === "app" && s.cooperativeGestures.enable(), sl(o, D ?? g, s, {
40344
+ if (n === "video" ? (F = o.map.zoom - x, P = M) : (F = o.map.zoom - x + Math.log2(M), P = 1), s.setScale(P), s.setZoom(F), s.setCenter(y), s.setDetailLevel(x), s.setMinZoom(x), s.addControl(new l.AttributionControl({ compact: !1 })), n === "app" && s.cooperativeGestures.enable(), ll(o, D ?? g, s, {
40349
40345
  center: y,
40350
40346
  zoom: F,
40351
40347
  pitch: _,
@@ -40355,16 +40351,16 @@ async function Nu(e) {
40355
40351
  e && (s.boxZoom.disable(), s.doubleClickZoom.disable(), s.dragPan.disable(), s.dragRotate.disable(), s.keyboard.disable(), s.scrollZoom.disable(), s.touchPitch.disable(), s.touchZoomRotate.disable()), p.setParams(t, m(h, f.TWO), e, y);
40356
40352
  }
40357
40353
  let ee = await fetch(`${i}/styles/${o.meta.mapstyleSet}.json?access_token=${t}`).then((e) => e.json());
40358
- s.setStyle(null), s.setStyle(ee), await s.once("style.load"), n === "app" && zu(s.getStyle().metadata?.customCssFilePath, t), u(h, s);
40359
- let I = await bl(o.map.overlays ?? [], o.meta.layers ?? [], s, i, t, ee.metadata?.styleOverride), te = (o.map.overlays ?? []).reduce((e, t, n) => e.set(t, I[n]), /* @__PURE__ */ new Map());
40360
- Hu(s, d, k, A, j, i, t), u(h, s), p.setPublication(ee.metadata?.publication), p.setpopupElements(), p.setHighlightManager(), s.setProjection({ type: S === "globe" ? "globe" : "mercator" }), Iu(s, S), C && Lu(s, i, t, w);
40361
- let ne = Bu(o.map.layerInfo, ee, I);
40362
- return Vu(s, ne, !b), new Mu(s, o, j, d, ee, te, ne);
40354
+ s.setStyle(null), s.setStyle(ee), await s.once("style.load"), n === "app" && Vu(s.getStyle().metadata?.customCssFilePath, t), u(h, s);
40355
+ let I = await Sl(o.map.overlays ?? [], o.meta.layers ?? [], s, i, t, ee.metadata?.styleOverride), te = (o.map.overlays ?? []).reduce((e, t, n) => e.set(t, I[n]), /* @__PURE__ */ new Map());
40356
+ Wu(s, d, k, A, j, i, t), u(h, s), p.setPublication(ee.metadata?.publication), p.setpopupElements(), p.setHighlightManager(), s.setProjection({ type: S === "globe" ? "globe" : "mercator" }), Ru(s, S), C && zu(s, i, t, w);
40357
+ let ne = Hu(o.map.layerInfo, ee, I);
40358
+ return Uu(s, ne, !b), new Pu(s, o, j, d, ee, te, ne);
40363
40359
  }
40364
- function Pu(e, t, n) {
40360
+ function Iu(e, t, n) {
40365
40361
  return fetch(`${t}/jobs/${e}.json?access_token=${n}`).then((e) => e.json());
40366
40362
  }
40367
- function Fu() {
40363
+ function Lu() {
40368
40364
  return new Promise((e) => {
40369
40365
  let t = () => {
40370
40366
  window.innerWidth > 0 && window.innerHeight > 0 && (window.removeEventListener("resize", t), e());
@@ -40372,7 +40368,7 @@ function Fu() {
40372
40368
  window.addEventListener("resize", t), t();
40373
40369
  });
40374
40370
  }
40375
- function Iu(e, t) {
40371
+ function Ru(e, t) {
40376
40372
  let n = e.getStyle().metadata ?? {}, r = n["mc:background-color"] ?? "#f8f8f8", i = n["mc:background-color-globe"] ?? "#000000";
40377
40373
  e.getContainer().style.backgroundColor = t === "globe" ? i : r, e.setSky(e.getStyle().sky ?? h), e.setLight({ position: [
40378
40374
  1.15,
@@ -40380,7 +40376,7 @@ function Iu(e, t) {
40380
40376
  45
40381
40377
  ] });
40382
40378
  }
40383
- function Lu(e, t, n, r) {
40379
+ function zu(e, t, n, r) {
40384
40380
  e.addSource("mc-dem", {
40385
40381
  type: "raster-dem",
40386
40382
  tiles: [`${t}/dataset/jaxa_terrainrgb/{z}/{x}/{y}?access_token=${n}`],
@@ -40392,57 +40388,57 @@ function Lu(e, t, n, r) {
40392
40388
  exaggeration: r
40393
40389
  });
40394
40390
  }
40395
- function Ru(e, t, n) {
40391
+ function Bu(e, t, n) {
40396
40392
  let r = `${t}/stylesheets/ff-${e === "beta" ? "b-" : ""}${n}.css?access_token=${n}`, i = document.createElement("link");
40397
40393
  i.setAttribute("rel", "stylesheet"), i.setAttribute("href", r), i.setAttribute("type", "text/css"), document.head.insertBefore(i, document.head.firstChild);
40398
40394
  }
40399
- function zu(e, t) {
40395
+ function Vu(e, t) {
40400
40396
  if (document.getElementById("custom-style")?.remove(), !e) return;
40401
40397
  let n;
40402
40398
  e.startsWith("http") ? (e = `${e}?access_token=${t}`, n = document.createElement("link"), n.setAttribute("rel", "stylesheet"), n.setAttribute("href", e.replace(/https?:/, ""))) : (n = document.createElement("style"), n.appendChild(document.createTextNode(e))), n.setAttribute("id", "custom-style"), n.setAttribute("type", "text/css"), document.head.appendChild(n);
40403
40399
  }
40404
- function Bu(e, t, n) {
40400
+ function Hu(e, t, n) {
40405
40401
  let r = e?.reduce((e, t) => (e[t.id] = { visibility: t.visibility }, e), {}) ?? {}, i = {};
40406
40402
  for (let e of t.layers) i[e.id] = r[e.id] ?? { visibility: (e.layout?.visibility ?? "visible") === "visible" };
40407
40403
  for (let e of n) for (let t of e.layers) i[t.id] = r[t.id] ?? { visibility: !1 };
40408
40404
  return i;
40409
40405
  }
40410
- function Vu(e, t, n) {
40406
+ function Uu(e, t, n) {
40411
40407
  for (let r in t) e.getLayer(r) !== void 0 && e.setLayoutProperty(r, "visibility", t[r].visibility && n ? "visible" : "none");
40412
40408
  }
40413
- function Hu(e, t, n, r, i, a, o) {
40409
+ function Wu(e, t, n, r, i, a, o) {
40414
40410
  let { beforeNone: s = [], beforeNames: c = [], beforeBoundaries: l = [], beforeWaters: u = [] } = r;
40415
40411
  s.forEach((r) => {
40416
- Uu(e, t, n, r, i, "mc-before-none", a, o);
40412
+ Gu(e, t, n, r, i, "mc-before-none", a, o);
40417
40413
  }), c.forEach((r) => {
40418
- Uu(e, t, n, r, i, "mc-before-names", a, o);
40414
+ Gu(e, t, n, r, i, "mc-before-names", a, o);
40419
40415
  }), l.forEach((r) => {
40420
- Uu(e, t, n, r, i, "mc-before-boundaries", a, o);
40416
+ Gu(e, t, n, r, i, "mc-before-boundaries", a, o);
40421
40417
  }), u.forEach((r) => {
40422
- Uu(e, t, n, r, i, "mc-before-waters", a, o);
40418
+ Gu(e, t, n, r, i, "mc-before-waters", a, o);
40423
40419
  });
40424
40420
  }
40425
- function Uu(e, t, n, r, i, a, o, s) {
40421
+ function Gu(e, t, n, r, i, a, o, s) {
40426
40422
  if (r.type === "marker") {
40427
40423
  let o = n.marker?.find((e) => e.id === r.groupId);
40428
- o && _l(e, o, a, i, t);
40424
+ o && yl(e, o, a, i, t);
40429
40425
  } else if (r.type === "polygon") {
40430
40426
  let o = n.polygon?.find((e) => e.id === r.groupId);
40431
- o && fl(e, o, a, i, t);
40427
+ o && ml(e, o, a, i, t);
40432
40428
  } else if (r.type === "circle") {
40433
40429
  let o = n.circle?.find((e) => e.id === r.groupId);
40434
- o && ml(e, o, a, i, t);
40430
+ o && gl(e, o, a, i, t);
40435
40431
  } else if (r.type === "line") {
40436
40432
  let i = n.line?.find((e) => e.id === r.groupId);
40437
- i && Ul(e, i, a, t);
40433
+ i && Gl(e, i, a, t);
40438
40434
  } else if (r.type === "dot") {
40439
40435
  let t = n.dot?.find((e) => e.id === r.groupId);
40440
- t && ql(e, t, a);
40436
+ t && Yl(e, t, a);
40441
40437
  } else if (r.type === "area") {
40442
40438
  let c = n.area?.find((e) => e.id === r.groupId);
40443
- c && Kl(e, c, a, i, t, o, s);
40439
+ c && Jl(e, c, a, i, t, o, s);
40444
40440
  }
40445
40441
  }
40446
40442
  //#endregion
40447
- var Wu = l.setRTLTextPlugin;
40448
- export { Nu as initMap, Wu as setRTLTextPlugin };
40443
+ var Ku = l.setRTLTextPlugin;
40444
+ export { Fu as initMap, Ku as setRTLTextPlugin };