gs-maplibre-draw 0.0.71 → 0.0.72

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.
package/dist/index.js CHANGED
@@ -73,56 +73,56 @@ const Lt = Math.PI, Ge = 2 * Lt, ve = Lt / 2, qt = 1e-6, Qe = Number.MAX_SAFE_IN
73
73
  if (o === 0)
74
74
  return r[0].t = e, r[0];
75
75
  if (o === 1) {
76
- const u = {
76
+ const c = {
77
77
  x: a * s[0].x + e * s[1].x,
78
78
  y: a * s[0].y + e * s[1].y,
79
79
  t: e
80
80
  };
81
- return n && (u.z = a * s[0].z + e * s[1].z), u;
81
+ return n && (c.z = a * s[0].z + e * s[1].z), c;
82
82
  }
83
83
  if (o < 4) {
84
- let u = a * a, c = e * e, l, g, d, p = 0;
85
- o === 2 ? (s = [s[0], s[1], s[2], Nt], l = u, g = a * e * 2, d = c) : o === 3 && (l = u * a, g = u * e * 3, d = a * c * 3, p = e * c);
84
+ let c = a * a, u = e * e, l, x, d, p = 0;
85
+ o === 2 ? (s = [s[0], s[1], s[2], Nt], l = c, x = a * e * 2, d = u) : o === 3 && (l = c * a, x = c * e * 3, d = a * u * 3, p = e * u);
86
86
  const z = {
87
- x: l * s[0].x + g * s[1].x + d * s[2].x + p * s[3].x,
88
- y: l * s[0].y + g * s[1].y + d * s[2].y + p * s[3].y,
87
+ x: l * s[0].x + x * s[1].x + d * s[2].x + p * s[3].x,
88
+ y: l * s[0].y + x * s[1].y + d * s[2].y + p * s[3].y,
89
89
  t: e
90
90
  };
91
- return n && (z.z = l * s[0].z + g * s[1].z + d * s[2].z + p * s[3].z), z;
91
+ return n && (z.z = l * s[0].z + x * s[1].z + d * s[2].z + p * s[3].z), z;
92
92
  }
93
93
  const i = JSON.parse(JSON.stringify(r));
94
94
  for (; i.length > 1; ) {
95
- for (let u = 0; u < i.length - 1; u++)
96
- i[u] = {
97
- x: i[u].x + (i[u + 1].x - i[u].x) * e,
98
- y: i[u].y + (i[u + 1].y - i[u].y) * e
99
- }, typeof i[u].z < "u" && (i[u].z = i[u].z + (i[u + 1].z - i[u].z) * e);
95
+ for (let c = 0; c < i.length - 1; c++)
96
+ i[c] = {
97
+ x: i[c].x + (i[c + 1].x - i[c].x) * e,
98
+ y: i[c].y + (i[c + 1].y - i[c].y) * e
99
+ }, typeof i[c].z < "u" && (i[c].z = i[c].z + (i[c + 1].z - i[c].z) * e);
100
100
  i.splice(i.length - 1, 1);
101
101
  }
102
102
  return i[0].t = e, i[0];
103
103
  },
104
104
  computeWithRatios: function(e, r, n, o) {
105
105
  const a = 1 - e, s = n, i = r;
106
- let u = s[0], c = s[1], l = s[2], g = s[3], d;
107
- if (u *= a, c *= e, i.length === 2)
108
- return d = u + c, {
109
- x: (u * i[0].x + c * i[1].x) / d,
110
- y: (u * i[0].y + c * i[1].y) / d,
111
- z: o ? (u * i[0].z + c * i[1].z) / d : !1,
106
+ let c = s[0], u = s[1], l = s[2], x = s[3], d;
107
+ if (c *= a, u *= e, i.length === 2)
108
+ return d = c + u, {
109
+ x: (c * i[0].x + u * i[1].x) / d,
110
+ y: (c * i[0].y + u * i[1].y) / d,
111
+ z: o ? (c * i[0].z + u * i[1].z) / d : !1,
112
112
  t: e
113
113
  };
114
- if (u *= a, c *= 2 * a, l *= e * e, i.length === 3)
115
- return d = u + c + l, {
116
- x: (u * i[0].x + c * i[1].x + l * i[2].x) / d,
117
- y: (u * i[0].y + c * i[1].y + l * i[2].y) / d,
118
- z: o ? (u * i[0].z + c * i[1].z + l * i[2].z) / d : !1,
114
+ if (c *= a, u *= 2 * a, l *= e * e, i.length === 3)
115
+ return d = c + u + l, {
116
+ x: (c * i[0].x + u * i[1].x + l * i[2].x) / d,
117
+ y: (c * i[0].y + u * i[1].y + l * i[2].y) / d,
118
+ z: o ? (c * i[0].z + u * i[1].z + l * i[2].z) / d : !1,
119
119
  t: e
120
120
  };
121
- if (u *= a, c *= 1.5 * a, l *= 3 * a, g *= e * e * e, i.length === 4)
122
- return d = u + c + l + g, {
123
- x: (u * i[0].x + c * i[1].x + l * i[2].x + g * i[3].x) / d,
124
- y: (u * i[0].y + c * i[1].y + l * i[2].y + g * i[3].y) / d,
125
- z: o ? (u * i[0].z + c * i[1].z + l * i[2].z + g * i[3].z) / d : !1,
121
+ if (c *= a, u *= 1.5 * a, l *= 3 * a, x *= e * e * e, i.length === 4)
122
+ return d = c + u + l + x, {
123
+ x: (c * i[0].x + u * i[1].x + l * i[2].x + x * i[3].x) / d,
124
+ y: (c * i[0].y + u * i[1].y + l * i[2].y + x * i[3].y) / d,
125
+ z: o ? (c * i[0].z + u * i[1].z + l * i[2].z + x * i[3].z) / d : !1,
126
126
  t: e
127
127
  };
128
128
  },
@@ -130,11 +130,11 @@ const Lt = Math.PI, Ge = 2 * Lt, ve = Lt / 2, qt = 1e-6, Qe = Number.MAX_SAFE_IN
130
130
  const n = [];
131
131
  for (let o = e, a = o.length, s = a - 1; a > 1; a--, s--) {
132
132
  const i = [];
133
- for (let u = 0, c; u < s; u++)
134
- c = {
135
- x: s * (o[u + 1].x - o[u].x),
136
- y: s * (o[u + 1].y - o[u].y)
137
- }, r && (c.z = s * (o[u + 1].z - o[u].z)), i.push(c);
133
+ for (let c = 0, u; c < s; c++)
134
+ u = {
135
+ x: s * (o[c + 1].x - o[c].x),
136
+ y: s * (o[c + 1].y - o[c].y)
137
+ }, r && (u.z = s * (o[c + 1].z - o[c].z)), i.push(u);
138
138
  n.push(i), o = i;
139
139
  }
140
140
  return n;
@@ -153,8 +153,8 @@ const Lt = Math.PI, Ge = 2 * Lt, ve = Lt / 2, qt = 1e-6, Qe = Number.MAX_SAFE_IN
153
153
  return 0.5 * o;
154
154
  },
155
155
  map: function(e, r, n, o, a) {
156
- const s = n - r, i = a - o, u = e - r, c = u / s;
157
- return o + i * c;
156
+ const s = n - r, i = a - o, c = e - r, u = c / s;
157
+ return o + i * u;
158
158
  },
159
159
  lerp: function(e, r, n) {
160
160
  const o = {
@@ -174,8 +174,8 @@ const Lt = Math.PI, Ge = 2 * Lt, ve = Lt / 2, qt = 1e-6, Qe = Number.MAX_SAFE_IN
174
174
  return JSON.parse(JSON.stringify(e));
175
175
  },
176
176
  angle: function(e, r, n) {
177
- const o = r.x - e.x, a = r.y - e.y, s = n.x - e.x, i = n.y - e.y, u = o * i - a * s, c = o * s + a * i;
178
- return Xe(u, c);
177
+ const o = r.x - e.x, a = r.y - e.y, s = n.x - e.x, i = n.y - e.y, c = o * i - a * s, u = o * s + a * i;
178
+ return Xe(c, u);
179
179
  },
180
180
  // round as string, to avoid rounding errors
181
181
  round: function(e, r) {
@@ -212,13 +212,13 @@ const Lt = Math.PI, Ge = 2 * Lt, ve = Lt / 2, qt = 1e-6, Qe = Number.MAX_SAFE_IN
212
212
  const n = he(1 - e, r), o = he(e, r) + n;
213
213
  return n / o;
214
214
  },
215
- lli8: function(e, r, n, o, a, s, i, u) {
216
- const c = (e * o - r * n) * (a - i) - (e - n) * (a * u - s * i), l = (e * o - r * n) * (s - u) - (r - o) * (a * u - s * i), g = (e - n) * (s - u) - (r - o) * (a - i);
217
- return g == 0 ? !1 : { x: c / g, y: l / g };
215
+ lli8: function(e, r, n, o, a, s, i, c) {
216
+ const u = (e * o - r * n) * (a - i) - (e - n) * (a * c - s * i), l = (e * o - r * n) * (s - c) - (r - o) * (a * c - s * i), x = (e - n) * (s - c) - (r - o) * (a - i);
217
+ return x == 0 ? !1 : { x: u / x, y: l / x };
218
218
  },
219
219
  lli4: function(e, r, n, o) {
220
- const a = e.x, s = e.y, i = r.x, u = r.y, c = n.x, l = n.y, g = o.x, d = o.y;
221
- return L.lli8(a, s, i, u, c, l, g, d);
220
+ const a = e.x, s = e.y, i = r.x, c = r.y, u = n.x, l = n.y, x = o.x, d = o.y;
221
+ return L.lli8(a, s, i, c, u, l, x, d);
222
222
  },
223
223
  lli: function(e, r) {
224
224
  return L.lli4(e, e.c, r, r.c);
@@ -246,41 +246,41 @@ const Lt = Math.PI, Ge = 2 * Lt, ve = Lt / 2, qt = 1e-6, Qe = Number.MAX_SAFE_IN
246
246
  shapeintersections: function(e, r, n, o, a) {
247
247
  if (!L.bboxoverlap(r, o))
248
248
  return [];
249
- const s = [], i = [e.startcap, e.forward, e.back, e.endcap], u = [n.startcap, n.forward, n.back, n.endcap];
250
- return i.forEach(function(c) {
251
- c.virtual || u.forEach(function(l) {
249
+ const s = [], i = [e.startcap, e.forward, e.back, e.endcap], c = [n.startcap, n.forward, n.back, n.endcap];
250
+ return i.forEach(function(u) {
251
+ u.virtual || c.forEach(function(l) {
252
252
  if (l.virtual)
253
253
  return;
254
- const g = c.intersects(l, a);
255
- g.length > 0 && (g.c1 = c, g.c2 = l, g.s1 = e, g.s2 = n, s.push(g));
254
+ const x = u.intersects(l, a);
255
+ x.length > 0 && (x.c1 = u, x.c2 = l, x.s1 = e, x.s2 = n, s.push(x));
256
256
  });
257
257
  }), s;
258
258
  },
259
259
  makeshape: function(e, r, n) {
260
- const o = r.points.length, a = e.points.length, s = L.makeline(r.points[o - 1], e.points[0]), i = L.makeline(e.points[a - 1], r.points[0]), u = {
260
+ const o = r.points.length, a = e.points.length, s = L.makeline(r.points[o - 1], e.points[0]), i = L.makeline(e.points[a - 1], r.points[0]), c = {
261
261
  startcap: s,
262
262
  forward: e,
263
263
  back: r,
264
264
  endcap: i,
265
265
  bbox: L.findbbox([s, e, r, i])
266
266
  };
267
- return u.intersections = function(c) {
267
+ return c.intersections = function(u) {
268
268
  return L.shapeintersections(
269
- u,
270
- u.bbox,
271
269
  c,
272
270
  c.bbox,
271
+ u,
272
+ u.bbox,
273
273
  n
274
274
  );
275
- }, u;
275
+ }, c;
276
276
  },
277
277
  getminmax: function(e, r, n) {
278
278
  if (!n)
279
279
  return { min: 0, max: 0 };
280
280
  let o = Qe, a = Ve, s, i;
281
281
  n.indexOf(0) === -1 && (n = [0].concat(n)), n.indexOf(1) === -1 && n.push(1);
282
- for (let u = 0, c = n.length; u < c; u++)
283
- s = n[u], i = e.get(s), i[r] < o && (o = i[r]), i[r] > a && (a = i[r]);
282
+ for (let c = 0, u = n.length; c < u; c++)
283
+ s = n[c], i = e.get(s), i[r] < o && (o = i[r]), i[r] > a && (a = i[r]);
284
284
  return { min: o, mid: (o + a) / 2, max: a, size: a - o };
285
285
  },
286
286
  align: function(e, r) {
@@ -298,34 +298,34 @@ const Lt = Math.PI, Ge = 2 * Lt, ve = Lt / 2, qt = 1e-6, Qe = Number.MAX_SAFE_IN
298
298
  return 0 <= v && v <= 1;
299
299
  };
300
300
  if (n === 2) {
301
- const v = o[0].y, M = o[1].y, S = o[2].y, D = v - 2 * M + S;
301
+ const v = o[0].y, M = o[1].y, _ = o[2].y, D = v - 2 * M + _;
302
302
  if (D !== 0) {
303
- const A = -me(M * M - v * S), Y = -v + M, R = -(A + Y) / D, q = -(-A + Y) / D;
303
+ const A = -me(M * M - v * _), Y = -v + M, R = -(A + Y) / D, q = -(-A + Y) / D;
304
304
  return [R, q].filter(a);
305
- } else if (M !== S && D === 0)
306
- return [(2 * M - S) / (2 * M - 2 * S)].filter(a);
305
+ } else if (M !== _ && D === 0)
306
+ return [(2 * M - _) / (2 * M - 2 * _)].filter(a);
307
307
  return [];
308
308
  }
309
- const s = o[0].y, i = o[1].y, u = o[2].y, c = o[3].y;
310
- let l = -s + 3 * i - 3 * u + c, g = 3 * s - 6 * i + 3 * u, d = -3 * s + 3 * i, p = s;
309
+ const s = o[0].y, i = o[1].y, c = o[2].y, u = o[3].y;
310
+ let l = -s + 3 * i - 3 * c + u, x = 3 * s - 6 * i + 3 * c, d = -3 * s + 3 * i, p = s;
311
311
  if (L.approximately(l, 0)) {
312
- if (L.approximately(g, 0))
312
+ if (L.approximately(x, 0))
313
313
  return L.approximately(d, 0) ? [] : [-p / d].filter(a);
314
- const v = me(d * d - 4 * g * p), M = 2 * g;
314
+ const v = me(d * d - 4 * x * p), M = 2 * x;
315
315
  return [(v - d) / M, (-d - v) / M].filter(a);
316
316
  }
317
- g /= l, d /= l, p /= l;
318
- const z = (3 * d - g * g) / 3, m = z / 3, b = (2 * g * g * g - 9 * g * d + 27 * p) / 27, F = b / 2, X = F * F + m * m * m;
319
- let f, h, y, x, _;
317
+ x /= l, d /= l, p /= l;
318
+ const z = (3 * d - x * x) / 3, m = z / 3, b = (2 * x * x * x - 9 * x * d + 27 * p) / 27, F = b / 2, X = F * F + m * m * m;
319
+ let f, h, y, g, S;
320
320
  if (X < 0) {
321
- const v = -z / 3, M = v * v * v, S = me(M), D = -b / (2 * S), A = D < -1 ? -1 : D > 1 ? 1 : D, Y = Bt(A), R = Ye(S), q = 2 * R;
322
- return y = q * ge(Y / 3) - g / 3, x = q * ge((Y + Ge) / 3) - g / 3, _ = q * ge((Y + 2 * Ge) / 3) - g / 3, [y, x, _].filter(a);
321
+ const v = -z / 3, M = v * v * v, _ = me(M), D = -b / (2 * _), A = D < -1 ? -1 : D > 1 ? 1 : D, Y = Bt(A), R = Ye(_), q = 2 * R;
322
+ return y = q * ge(Y / 3) - x / 3, g = q * ge((Y + Ge) / 3) - x / 3, S = q * ge((Y + 2 * Ge) / 3) - x / 3, [y, g, S].filter(a);
323
323
  } else {
324
324
  if (X === 0)
325
- return f = F < 0 ? Ye(-F) : -Ye(F), y = 2 * f - g / 3, x = -f - g / 3, [y, x].filter(a);
325
+ return f = F < 0 ? Ye(-F) : -Ye(F), y = 2 * f - x / 3, g = -f - x / 3, [y, g].filter(a);
326
326
  {
327
327
  const v = me(X);
328
- return f = Ye(-F + v), h = Ye(F + v), [f - h - g / 3].filter(a);
328
+ return f = Ye(-F + v), h = Ye(F + v), [f - h - x / 3].filter(a);
329
329
  }
330
330
  }
331
331
  },
@@ -333,8 +333,8 @@ const Lt = Math.PI, Ge = 2 * Lt, ve = Lt / 2, qt = 1e-6, Qe = Number.MAX_SAFE_IN
333
333
  if (e.length === 3) {
334
334
  const r = e[0], n = e[1], o = e[2], a = r - 2 * n + o;
335
335
  if (a !== 0) {
336
- const s = -me(n * n - r * o), i = -r + n, u = -(s + i) / a, c = -(-s + i) / a;
337
- return [u, c];
336
+ const s = -me(n * n - r * o), i = -r + n, c = -(s + i) / a, u = -(-s + i) / a;
337
+ return [c, u];
338
338
  } else if (n !== o && a === 0)
339
339
  return [(2 * n - o) / (2 * (n - o))];
340
340
  return [];
@@ -346,25 +346,25 @@ const Lt = Math.PI, Ge = 2 * Lt, ve = Lt / 2, qt = 1e-6, Qe = Number.MAX_SAFE_IN
346
346
  return [];
347
347
  },
348
348
  curvature: function(e, r, n, o, a) {
349
- let s, i, u, c, l = 0, g = 0;
349
+ let s, i, c, u, l = 0, x = 0;
350
350
  const d = L.compute(e, r), p = L.compute(e, n), z = d.x * d.x + d.y * d.y;
351
351
  if (o ? (s = me(
352
352
  he(d.y * p.z - p.y * d.z, 2) + he(d.z * p.x - p.z * d.x, 2) + he(d.x * p.y - p.x * d.y, 2)
353
353
  ), i = he(z + d.z * d.z, 3 / 2)) : (s = d.x * p.y - d.y * p.x, i = he(z, 3 / 2)), s === 0 || i === 0)
354
354
  return { k: 0, r: 0 };
355
- if (l = s / i, g = i / s, !a) {
355
+ if (l = s / i, x = i / s, !a) {
356
356
  const m = L.curvature(e - 1e-3, r, n, o, !0).k, b = L.curvature(e + 1e-3, r, n, o, !0).k;
357
- c = (b - l + (l - m)) / 2, u = (Ae(b - l) + Ae(l - m)) / 2;
357
+ u = (b - l + (l - m)) / 2, c = (Ae(b - l) + Ae(l - m)) / 2;
358
358
  }
359
- return { k: l, r: g, dk: c, adk: u };
359
+ return { k: l, r: x, dk: u, adk: c };
360
360
  },
361
361
  inflections: function(e) {
362
362
  if (e.length < 4)
363
363
  return [];
364
- const r = L.align(e, { p1: e[0], p2: e.slice(-1)[0] }), n = r[2].x * r[1].y, o = r[3].x * r[1].y, a = r[1].x * r[2].y, s = r[3].x * r[2].y, i = 18 * (-3 * n + 2 * o + 3 * a - s), u = 18 * (3 * n - o - 3 * a), c = 18 * (a - n);
364
+ const r = L.align(e, { p1: e[0], p2: e.slice(-1)[0] }), n = r[2].x * r[1].y, o = r[3].x * r[1].y, a = r[1].x * r[2].y, s = r[3].x * r[2].y, i = 18 * (-3 * n + 2 * o + 3 * a - s), c = 18 * (3 * n - o - 3 * a), u = 18 * (a - n);
365
365
  if (L.approximately(i, 0)) {
366
- if (!L.approximately(u, 0)) {
367
- let p = -c / u;
366
+ if (!L.approximately(c, 0)) {
367
+ let p = -u / c;
368
368
  if (0 <= p && p <= 1)
369
369
  return [p];
370
370
  }
@@ -373,18 +373,18 @@ const Lt = Math.PI, Ge = 2 * Lt, ve = Lt / 2, qt = 1e-6, Qe = Number.MAX_SAFE_IN
373
373
  const l = 2 * i;
374
374
  if (L.approximately(l, 0))
375
375
  return [];
376
- const g = u * u - 4 * i * c;
377
- if (g < 0)
376
+ const x = c * c - 4 * i * u;
377
+ if (x < 0)
378
378
  return [];
379
- const d = Math.sqrt(g);
380
- return [(d - u) / l, -(u + d) / l].filter(function(p) {
379
+ const d = Math.sqrt(x);
380
+ return [(d - c) / l, -(c + d) / l].filter(function(p) {
381
381
  return 0 <= p && p <= 1;
382
382
  });
383
383
  },
384
384
  bboxoverlap: function(e, r) {
385
385
  const n = ["x", "y"], o = n.length;
386
- for (let a = 0, s, i, u, c; a < o; a++)
387
- if (s = n[a], i = e[s].mid, u = r[s].mid, c = (e[s].size + r[s].size) / 2, Ae(i - u) >= c)
386
+ for (let a = 0, s, i, c, u; a < o; a++)
387
+ if (s = n[a], i = e[s].mid, c = r[s].mid, u = (e[s].size + r[s].size) / 2, Ae(i - c) >= u)
388
388
  return !1;
389
389
  return !0;
390
390
  },
@@ -397,34 +397,34 @@ const Lt = Math.PI, Ge = 2 * Lt, ve = Lt / 2, qt = 1e-6, Qe = Number.MAX_SAFE_IN
397
397
  return [
398
398
  (s * (e._t1 + e._t2) / 2 | 0) / s + "/" + (s * (r._t1 + r._t2) / 2 | 0) / s
399
399
  ];
400
- let u = e.split(0.5), c = r.split(0.5), l = [
401
- { left: u.left, right: c.left },
402
- { left: u.left, right: c.right },
403
- { left: u.right, right: c.right },
404
- { left: u.right, right: c.left }
400
+ let c = e.split(0.5), u = r.split(0.5), l = [
401
+ { left: c.left, right: u.left },
402
+ { left: c.left, right: u.right },
403
+ { left: c.right, right: u.right },
404
+ { left: c.right, right: u.left }
405
405
  ];
406
406
  l = l.filter(function(d) {
407
407
  return L.bboxoverlap(d.left.bbox(), d.right.bbox());
408
408
  });
409
- let g = [];
409
+ let x = [];
410
410
  return l.length === 0 || (l.forEach(function(d) {
411
- g = g.concat(
411
+ x = x.concat(
412
412
  L.pairiteration(d.left, d.right, i)
413
413
  );
414
- }), g = g.filter(function(d, p) {
415
- return g.indexOf(d) === p;
416
- })), g;
414
+ }), x = x.filter(function(d, p) {
415
+ return x.indexOf(d) === p;
416
+ })), x;
417
417
  },
418
418
  getccenter: function(e, r, n) {
419
- const o = r.x - e.x, a = r.y - e.y, s = n.x - r.x, i = n.y - r.y, u = o * ge(ve) - a * be(ve), c = o * be(ve) + a * ge(ve), l = s * ge(ve) - i * be(ve), g = s * be(ve) + i * ge(ve), d = (e.x + r.x) / 2, p = (e.y + r.y) / 2, z = (r.x + n.x) / 2, m = (r.y + n.y) / 2, b = d + u, F = p + c, X = z + l, f = m + g, h = L.lli8(d, p, b, F, z, m, X, f), y = L.dist(h, e);
420
- let x = Xe(e.y - h.y, e.x - h.x), _ = Xe(r.y - h.y, r.x - h.x), v = Xe(n.y - h.y, n.x - h.x), M;
421
- return x < v ? ((x > _ || _ > v) && (x += Ge), x > v && (M = v, v = x, x = M)) : v < _ && _ < x ? (M = v, v = x, x = M) : v += Ge, h.s = x, h.e = v, h.r = y, h;
419
+ const o = r.x - e.x, a = r.y - e.y, s = n.x - r.x, i = n.y - r.y, c = o * ge(ve) - a * be(ve), u = o * be(ve) + a * ge(ve), l = s * ge(ve) - i * be(ve), x = s * be(ve) + i * ge(ve), d = (e.x + r.x) / 2, p = (e.y + r.y) / 2, z = (r.x + n.x) / 2, m = (r.y + n.y) / 2, b = d + c, F = p + u, X = z + l, f = m + x, h = L.lli8(d, p, b, F, z, m, X, f), y = L.dist(h, e);
420
+ let g = Xe(e.y - h.y, e.x - h.x), S = Xe(r.y - h.y, r.x - h.x), v = Xe(n.y - h.y, n.x - h.x), M;
421
+ return g < v ? ((g > S || S > v) && (g += Ge), g > v && (M = v, v = g, g = M)) : v < S && S < g ? (M = v, v = g, g = M) : v += Ge, h.s = g, h.e = v, h.r = y, h;
422
422
  },
423
423
  numberSort: function(e, r) {
424
424
  return e - r;
425
425
  }
426
426
  };
427
- class Oe {
427
+ class Ie {
428
428
  constructor(r) {
429
429
  this.curves = [], this._3d = !1, r && (this.curves = r, this._3d = this.curves[0]._3d);
430
430
  }
@@ -459,7 +459,7 @@ class Oe {
459
459
  const n = [];
460
460
  return this.curves.forEach(function(o) {
461
461
  n.push(...o.offset(r));
462
- }), new Oe(n);
462
+ }), new Ie(n);
463
463
  }
464
464
  }
465
465
  const { abs: Ce, min: dt, max: gt, cos: Tt, sin: Gt, acos: $t, sqrt: Fe } = Math, Ut = Math.PI;
@@ -489,17 +489,17 @@ class j {
489
489
  throw new Error(
490
490
  "Only new Bezier(point[]) is accepted for 4th and higher order curves"
491
491
  );
492
- const i = this._3d = !a && (s === 9 || s === 12) || r && r[0] && typeof r[0].z < "u", u = this.points = [];
492
+ const i = this._3d = !a && (s === 9 || s === 12) || r && r[0] && typeof r[0].z < "u", c = this.points = [];
493
493
  for (let z = 0, m = i ? 3 : 2; z < s; z += m) {
494
- var c = {
494
+ var u = {
495
495
  x: n[z],
496
496
  y: n[z + 1]
497
497
  };
498
- i && (c.z = n[z + 2]), u.push(c);
498
+ i && (u.z = n[z + 2]), c.push(u);
499
499
  }
500
- const l = this.order = u.length - 1, g = this.dims = ["x", "y"];
501
- i && g.push("z"), this.dimlen = g.length;
502
- const d = L.align(u, { p1: u[0], p2: u[l] }), p = L.dist(u[0], u[l]);
500
+ const l = this.order = c.length - 1, x = this.dims = ["x", "y"];
501
+ i && x.push("z"), this.dimlen = x.length;
502
+ const d = L.align(c, { p1: c[0], p2: c[l] }), p = L.dist(c[0], c[l]);
503
503
  this._linear = d.reduce((z, m) => z + Ce(m.y), 0) < p / 50, this._lut = [], this._t1 = 0, this._t2 = 1, this.update();
504
504
  }
505
505
  static quadraticFromPoints(r, n, o, a) {
@@ -514,11 +514,11 @@ class j {
514
514
  typeof a > "u" && (a = 0.5);
515
515
  const i = j.getABC(3, r, n, o, a);
516
516
  typeof s > "u" && (s = L.dist(n, i.C));
517
- const u = s * (1 - a) / a, c = L.dist(r, o), l = (o.x - r.x) / c, g = (o.y - r.y) / c, d = s * l, p = s * g, z = u * l, m = u * g, b = { x: n.x - d, y: n.y - p }, F = { x: n.x + z, y: n.y + m }, X = i.A, f = { x: X.x + (b.x - X.x) / (1 - a), y: X.y + (b.y - X.y) / (1 - a) }, h = { x: X.x + (F.x - X.x) / a, y: X.y + (F.y - X.y) / a }, y = { x: r.x + (f.x - r.x) / a, y: r.y + (f.y - r.y) / a }, x = {
517
+ const c = s * (1 - a) / a, u = L.dist(r, o), l = (o.x - r.x) / u, x = (o.y - r.y) / u, d = s * l, p = s * x, z = c * l, m = c * x, b = { x: n.x - d, y: n.y - p }, F = { x: n.x + z, y: n.y + m }, X = i.A, f = { x: X.x + (b.x - X.x) / (1 - a), y: X.y + (b.y - X.y) / (1 - a) }, h = { x: X.x + (F.x - X.x) / a, y: X.y + (F.y - X.y) / a }, y = { x: r.x + (f.x - r.x) / a, y: r.y + (f.y - r.y) / a }, g = {
518
518
  x: o.x + (h.x - o.x) / (1 - a),
519
519
  y: o.y + (h.y - o.y) / (1 - a)
520
520
  };
521
- return new j(r, y, x, o);
521
+ return new j(r, y, g, o);
522
522
  }
523
523
  static getUtils() {
524
524
  return L;
@@ -527,7 +527,7 @@ class j {
527
527
  return j.getUtils();
528
528
  }
529
529
  static get PolyBezier() {
530
- return Oe;
530
+ return Ie;
531
531
  }
532
532
  valueOf() {
533
533
  return this.toString();
@@ -568,14 +568,14 @@ class j {
568
568
  return L.length(this.derivative.bind(this));
569
569
  }
570
570
  static getABC(r = 2, n, o, a, s = 0.5) {
571
- const i = L.projectionratio(s, r), u = 1 - i, c = {
572
- x: i * n.x + u * a.x,
573
- y: i * n.y + u * a.y
571
+ const i = L.projectionratio(s, r), c = 1 - i, u = {
572
+ x: i * n.x + c * a.x,
573
+ y: i * n.y + c * a.y
574
574
  }, l = L.abcratio(s, r);
575
575
  return { A: {
576
- x: o.x + (o.x - c.x) / l,
577
- y: o.y + (o.y - c.y) / l
578
- }, B: o, C: c, S: n, E: a };
576
+ x: o.x + (o.x - u.x) / l,
577
+ y: o.y + (o.y - u.y) / l
578
+ }, B: o, C: u, S: n, E: a };
579
579
  }
580
580
  getABC(r, n) {
581
581
  n = n || this.get(r);
@@ -593,16 +593,16 @@ class j {
593
593
  on(r, n) {
594
594
  n = n || 5;
595
595
  const o = this.getLUT(), a = [];
596
- for (let s = 0, i, u = 0; s < o.length; s++)
597
- i = o[s], L.dist(i, r) < n && (a.push(i), u += s / o.length);
596
+ for (let s = 0, i, c = 0; s < o.length; s++)
597
+ i = o[s], L.dist(i, r) < n && (a.push(i), c += s / o.length);
598
598
  return a.length ? t /= a.length : !1;
599
599
  }
600
600
  project(r) {
601
- const n = this.getLUT(), o = n.length - 1, a = L.closest(n, r), s = a.mpos, i = (s - 1) / o, u = (s + 1) / o, c = 0.1 / o;
602
- let l = a.mdist, g = i, d = g, p;
601
+ const n = this.getLUT(), o = n.length - 1, a = L.closest(n, r), s = a.mpos, i = (s - 1) / o, c = (s + 1) / o, u = 0.1 / o;
602
+ let l = a.mdist, x = i, d = x, p;
603
603
  l += 1;
604
- for (let z; g < u + c; g += c)
605
- p = this.compute(g), z = L.dist(r, p), z < l && (l = z, d = g);
604
+ for (let z; x < c + u; x += u)
605
+ p = this.compute(x), z = L.dist(r, p), z < l && (l = z, d = x);
606
606
  return d = d < 0 ? 0 : d > 1 ? 1 : d, p = this.compute(d), p.t = d, p.d = l, p;
607
607
  }
608
608
  get(r) {
@@ -653,9 +653,9 @@ class j {
653
653
  x: o.y * n.z - o.z * n.y,
654
654
  y: o.z * n.x - o.x * n.z,
655
655
  z: o.x * n.y - o.y * n.x
656
- }, u = Fe(i.x * i.x + i.y * i.y + i.z * i.z);
657
- i.x /= u, i.y /= u, i.z /= u;
658
- const c = [
656
+ }, c = Fe(i.x * i.x + i.y * i.y + i.z * i.z);
657
+ i.x /= c, i.y /= c, i.z /= c;
658
+ const u = [
659
659
  i.x * i.x,
660
660
  i.x * i.y - i.z,
661
661
  i.x * i.z + i.y,
@@ -668,17 +668,17 @@ class j {
668
668
  ];
669
669
  return {
670
670
  t: r,
671
- x: c[0] * n.x + c[1] * n.y + c[2] * n.z,
672
- y: c[3] * n.x + c[4] * n.y + c[5] * n.z,
673
- z: c[6] * n.x + c[7] * n.y + c[8] * n.z
671
+ x: u[0] * n.x + u[1] * n.y + u[2] * n.z,
672
+ y: u[3] * n.x + u[4] * n.y + u[5] * n.z,
673
+ z: u[6] * n.x + u[7] * n.y + u[8] * n.z
674
674
  };
675
675
  }
676
676
  hull(r) {
677
677
  let n = this.points, o = [], a = [], s = 0;
678
678
  for (a[s++] = n[0], a[s++] = n[1], a[s++] = n[2], this.order === 3 && (a[s++] = n[3]); n.length > 1; ) {
679
679
  o = [];
680
- for (let i = 0, u, c = n.length - 1; i < c; i++)
681
- u = L.lerp(r, n[i], n[i + 1]), a[s++] = u, o.push(u);
680
+ for (let i = 0, c, u = n.length - 1; i < u; i++)
681
+ c = L.lerp(r, n[i], n[i + 1]), a[s++] = c, o.push(c);
682
682
  n = o;
683
683
  }
684
684
  return a;
@@ -758,29 +758,29 @@ class j {
758
758
  return this._3d && (o += r.z * n.z), Ce($t(o)) < Ut / 3;
759
759
  }
760
760
  reduce() {
761
- let r, n = 0, o = 0, a = 0.01, s, i = [], u = [], c = this.extrema().values;
762
- for (c.indexOf(0) === -1 && (c = [0].concat(c)), c.indexOf(1) === -1 && c.push(1), n = c[0], r = 1; r < c.length; r++)
763
- o = c[r], s = this.split(n, o), s._t1 = n, s._t2 = o, i.push(s), n = o;
761
+ let r, n = 0, o = 0, a = 0.01, s, i = [], c = [], u = this.extrema().values;
762
+ for (u.indexOf(0) === -1 && (u = [0].concat(u)), u.indexOf(1) === -1 && u.push(1), n = u[0], r = 1; r < u.length; r++)
763
+ o = u[r], s = this.split(n, o), s._t1 = n, s._t2 = o, i.push(s), n = o;
764
764
  return i.forEach(function(l) {
765
765
  for (n = 0, o = 0; o <= 1; )
766
766
  for (o = n + a; o <= 1 + a; o += a)
767
767
  if (s = l.split(n, o), !s.simple()) {
768
768
  if (o -= a, Ce(n - o) < a)
769
769
  return [];
770
- s = l.split(n, o), s._t1 = L.map(n, 0, 1, l._t1, l._t2), s._t2 = L.map(o, 0, 1, l._t1, l._t2), u.push(s), n = o;
770
+ s = l.split(n, o), s._t1 = L.map(n, 0, 1, l._t1, l._t2), s._t2 = L.map(o, 0, 1, l._t1, l._t2), c.push(s), n = o;
771
771
  break;
772
772
  }
773
- n < 1 && (s = l.split(n, 1), s._t1 = L.map(n, 0, 1, l._t1, l._t2), s._t2 = l._t2, u.push(s));
774
- }), u;
773
+ n < 1 && (s = l.split(n, 1), s._t1 = L.map(n, 0, 1, l._t1, l._t2), s._t2 = l._t2, c.push(s));
774
+ }), c;
775
775
  }
776
776
  translate(r, n, o) {
777
777
  o = typeof o == "number" ? o : n;
778
778
  const a = this.order;
779
- let s = this.points.map((i, u) => (1 - u / a) * n + u / a * o);
779
+ let s = this.points.map((i, c) => (1 - c / a) * n + c / a * o);
780
780
  return new j(
781
- this.points.map((i, u) => ({
782
- x: i.x + r.x * s[u],
783
- y: i.y + r.y * s[u]
781
+ this.points.map((i, c) => ({
782
+ x: i.x + r.x * s[c],
783
+ y: i.y + r.y * s[c]
784
784
  }))
785
785
  );
786
786
  }
@@ -796,17 +796,17 @@ class j {
796
796
  o ? o(0) : r,
797
797
  o ? o(1) : r
798
798
  );
799
- const i = o ? o(0) : r, u = o ? o(1) : r, c = [this.offset(0, 10), this.offset(1, 10)], l = [], g = L.lli4(c[0], c[0].c, c[1], c[1].c);
800
- if (!g)
799
+ const i = o ? o(0) : r, c = o ? o(1) : r, u = [this.offset(0, 10), this.offset(1, 10)], l = [], x = L.lli4(u[0], u[0].c, u[1], u[1].c);
800
+ if (!x)
801
801
  throw new Error("cannot scale this curve. Try reducing it first.");
802
802
  return [0, 1].forEach(function(d) {
803
803
  const p = l[d * n] = L.copy(s[d * n]);
804
- p.x += (d ? u : i) * c[d].n.x, p.y += (d ? u : i) * c[d].n.y;
804
+ p.x += (d ? c : i) * u[d].n.x, p.y += (d ? c : i) * u[d].n.y;
805
805
  }), o ? ([0, 1].forEach(function(d) {
806
806
  if (!(n === 2 && d)) {
807
807
  var p = s[d + 1], z = {
808
- x: p.x - g.x,
809
- y: p.y - g.y
808
+ x: p.x - x.x,
809
+ y: p.y - x.y
810
810
  }, m = o ? o((d + 1) / n) : r;
811
811
  o && !a && (m = -m);
812
812
  var b = Fe(z.x * z.x + z.y * z.y);
@@ -819,51 +819,51 @@ class j {
819
819
  if (n === 2 && d)
820
820
  return;
821
821
  const p = l[d * n], z = this.derivative(d), m = { x: p.x + z.x, y: p.y + z.y };
822
- l[d + 1] = L.lli4(p, m, g, s[d + 1]);
822
+ l[d + 1] = L.lli4(p, m, x, s[d + 1]);
823
823
  }), new j(l));
824
824
  }
825
825
  outline(r, n, o, a) {
826
826
  if (n = n === void 0 ? r : n, this._linear) {
827
- const x = this.normal(0), _ = this.points[0], v = this.points[this.points.length - 1];
828
- let M, S, D;
829
- o === void 0 && (o = r, a = n), M = { x: _.x + x.x * r, y: _.y + x.y * r }, D = { x: v.x + x.x * o, y: v.y + x.y * o }, S = { x: (M.x + D.x) / 2, y: (M.y + D.y) / 2 };
830
- const A = [M, S, D];
831
- M = { x: _.x - x.x * n, y: _.y - x.y * n }, D = { x: v.x - x.x * a, y: v.y - x.y * a }, S = { x: (M.x + D.x) / 2, y: (M.y + D.y) / 2 };
832
- const Y = [D, S, M], R = L.makeline(Y[2], A[0]), q = L.makeline(A[2], Y[0]), se = [R, new j(A), q, new j(Y)];
833
- return new Oe(se);
834
- }
835
- const s = this.reduce(), i = s.length, u = [];
836
- let c = [], l, g = 0, d = this.length();
827
+ const g = this.normal(0), S = this.points[0], v = this.points[this.points.length - 1];
828
+ let M, _, D;
829
+ o === void 0 && (o = r, a = n), M = { x: S.x + g.x * r, y: S.y + g.y * r }, D = { x: v.x + g.x * o, y: v.y + g.y * o }, _ = { x: (M.x + D.x) / 2, y: (M.y + D.y) / 2 };
830
+ const A = [M, _, D];
831
+ M = { x: S.x - g.x * n, y: S.y - g.y * n }, D = { x: v.x - g.x * a, y: v.y - g.y * a }, _ = { x: (M.x + D.x) / 2, y: (M.y + D.y) / 2 };
832
+ const Y = [D, _, M], R = L.makeline(Y[2], A[0]), q = L.makeline(A[2], Y[0]), se = [R, new j(A), q, new j(Y)];
833
+ return new Ie(se);
834
+ }
835
+ const s = this.reduce(), i = s.length, c = [];
836
+ let u = [], l, x = 0, d = this.length();
837
837
  const p = typeof o < "u" && typeof a < "u";
838
- function z(x, _, v, M, S) {
838
+ function z(g, S, v, M, _) {
839
839
  return function(D) {
840
- const A = M / v, Y = (M + S) / v, R = _ - x;
841
- return L.map(D, 0, 1, x + A * R, x + Y * R);
840
+ const A = M / v, Y = (M + _) / v, R = S - g;
841
+ return L.map(D, 0, 1, g + A * R, g + Y * R);
842
842
  };
843
843
  }
844
- s.forEach(function(x) {
845
- const _ = x.length();
846
- p ? (u.push(
847
- x.scale(z(r, o, d, g, _))
848
- ), c.push(
849
- x.scale(z(-n, -a, d, g, _))
850
- )) : (u.push(x.scale(r)), c.push(x.scale(-n))), g += _;
851
- }), c = c.map(function(x) {
852
- return l = x.points, l[3] ? x.points = [l[3], l[2], l[1], l[0]] : x.points = [l[2], l[1], l[0]], x;
844
+ s.forEach(function(g) {
845
+ const S = g.length();
846
+ p ? (c.push(
847
+ g.scale(z(r, o, d, x, S))
848
+ ), u.push(
849
+ g.scale(z(-n, -a, d, x, S))
850
+ )) : (c.push(g.scale(r)), u.push(g.scale(-n))), x += S;
851
+ }), u = u.map(function(g) {
852
+ return l = g.points, l[3] ? g.points = [l[3], l[2], l[1], l[0]] : g.points = [l[2], l[1], l[0]], g;
853
853
  }).reverse();
854
- const m = u[0].points[0], b = u[i - 1].points[u[i - 1].points.length - 1], F = c[i - 1].points[c[i - 1].points.length - 1], X = c[0].points[0], f = L.makeline(F, m), h = L.makeline(b, X), y = [f].concat(u).concat([h]).concat(c);
855
- return new Oe(y);
854
+ const m = c[0].points[0], b = c[i - 1].points[c[i - 1].points.length - 1], F = u[i - 1].points[u[i - 1].points.length - 1], X = u[0].points[0], f = L.makeline(F, m), h = L.makeline(b, X), y = [f].concat(c).concat([h]).concat(u);
855
+ return new Ie(y);
856
856
  }
857
857
  outlineshapes(r, n, o) {
858
858
  n = n || r;
859
859
  const a = this.outline(r, n).curves, s = [];
860
- for (let i = 1, u = a.length; i < u / 2; i++) {
861
- const c = L.makeshape(
860
+ for (let i = 1, c = a.length; i < c / 2; i++) {
861
+ const u = L.makeshape(
862
862
  a[i],
863
- a[u - i],
863
+ a[c - i],
864
864
  o
865
865
  );
866
- c.startcap.virtual = i > 1, c.endcap.virtual = i < u / 2 - 1, s.push(c);
866
+ u.startcap.virtual = i > 1, u.endcap.virtual = i < c / 2 - 1, s.push(u);
867
867
  }
868
868
  return s;
869
869
  }
@@ -877,52 +877,52 @@ class j {
877
877
  lineIntersects(r) {
878
878
  const n = dt(r.p1.x, r.p2.x), o = dt(r.p1.y, r.p2.y), a = gt(r.p1.x, r.p2.x), s = gt(r.p1.y, r.p2.y);
879
879
  return L.roots(this.points, r).filter((i) => {
880
- var u = this.get(i);
881
- return L.between(u.x, n, a) && L.between(u.y, o, s);
880
+ var c = this.get(i);
881
+ return L.between(c.x, n, a) && L.between(c.y, o, s);
882
882
  });
883
883
  }
884
884
  selfintersects(r) {
885
885
  const n = this.reduce(), o = n.length - 2, a = [];
886
- for (let s = 0, i, u, c; s < o; s++)
887
- u = n.slice(s, s + 1), c = n.slice(s + 2), i = this.curveintersects(u, c, r), a.push(...i);
886
+ for (let s = 0, i, c, u; s < o; s++)
887
+ c = n.slice(s, s + 1), u = n.slice(s + 2), i = this.curveintersects(c, u, r), a.push(...i);
888
888
  return a;
889
889
  }
890
890
  curveintersects(r, n, o) {
891
891
  const a = [];
892
892
  r.forEach(function(i) {
893
- n.forEach(function(u) {
894
- i.overlaps(u) && a.push({ left: i, right: u });
893
+ n.forEach(function(c) {
894
+ i.overlaps(c) && a.push({ left: i, right: c });
895
895
  });
896
896
  });
897
897
  let s = [];
898
898
  return a.forEach(function(i) {
899
- const u = L.pairiteration(
899
+ const c = L.pairiteration(
900
900
  i.left,
901
901
  i.right,
902
902
  o
903
903
  );
904
- u.length > 0 && (s = s.concat(u));
904
+ c.length > 0 && (s = s.concat(c));
905
905
  }), s;
906
906
  }
907
907
  arcs(r) {
908
908
  return r = r || 0.5, this._iterate(r, []);
909
909
  }
910
910
  _error(r, n, o, a) {
911
- const s = (a - o) / 4, i = this.get(o + s), u = this.get(a - s), c = L.dist(r, n), l = L.dist(r, i), g = L.dist(r, u);
912
- return Ce(l - c) + Ce(g - c);
911
+ const s = (a - o) / 4, i = this.get(o + s), c = this.get(a - s), u = L.dist(r, n), l = L.dist(r, i), x = L.dist(r, c);
912
+ return Ce(l - u) + Ce(x - u);
913
913
  }
914
914
  _iterate(r, n) {
915
915
  let o = 0, a = 1, s;
916
916
  do {
917
917
  s = 0, a = 1;
918
- let i = this.get(o), u, c, l, g, d = !1, p = !1, z, m = a, b = 1;
918
+ let i = this.get(o), c, u, l, x, d = !1, p = !1, z, m = a, b = 1;
919
919
  do
920
- if (p = d, g = l, m = (o + a) / 2, u = this.get(m), c = this.get(a), l = L.getccenter(i, u, c), l.interval = {
920
+ if (p = d, x = l, m = (o + a) / 2, c = this.get(m), u = this.get(a), l = L.getccenter(i, c, u), l.interval = {
921
921
  start: o,
922
922
  end: a
923
923
  }, d = this._error(l, i, o, a) <= r, z = p && !d, z || (b = a), d) {
924
924
  if (a >= 1) {
925
- if (l.interval.end = b = 1, g = l, a > 1) {
925
+ if (l.interval.end = b = 1, x = l, a > 1) {
926
926
  let X = {
927
927
  x: l.x + l.r * Tt(l.e),
928
928
  y: l.y + l.r * Gt(l.e)
@@ -937,7 +937,7 @@ class j {
937
937
  while (!z && s++ < 100);
938
938
  if (s >= 100)
939
939
  break;
940
- g = g || l, n.push(g), o = b;
940
+ x = x || l, n.push(x), o = b;
941
941
  } while (a < 1);
942
942
  return n;
943
943
  }
@@ -959,7 +959,7 @@ var le = 63710088e-1, Pt = {
959
959
  radians: 1,
960
960
  yards: le * 1.0936
961
961
  };
962
- function ct(e, r, n) {
962
+ function ut(e, r, n) {
963
963
  n === void 0 && (n = {});
964
964
  var o = { type: "Feature" };
965
965
  return (n.id === 0 || n.id) && (o.id = n.id), n.bbox && (o.bbox = n.bbox), o.properties = r || {}, o.geometry = e, o;
@@ -977,7 +977,7 @@ function pe(e, r, n) {
977
977
  type: "Point",
978
978
  coordinates: e
979
979
  };
980
- return ct(o, r, n);
980
+ return ut(o, r, n);
981
981
  }
982
982
  function Re(e, r, n) {
983
983
  n === void 0 && (n = {});
@@ -989,11 +989,11 @@ function Re(e, r, n) {
989
989
  if (s[s.length - 1][i] !== s[0][i])
990
990
  throw new Error("First and last Position are not equivalent.");
991
991
  }
992
- var u = {
992
+ var c = {
993
993
  type: "Polygon",
994
994
  coordinates: e
995
995
  };
996
- return ct(u, r, n);
996
+ return ut(c, r, n);
997
997
  }
998
998
  function Ze(e, r, n) {
999
999
  if (n === void 0 && (n = {}), e.length < 2)
@@ -1002,7 +1002,7 @@ function Ze(e, r, n) {
1002
1002
  type: "LineString",
1003
1003
  coordinates: e
1004
1004
  };
1005
- return ct(o, r, n);
1005
+ return ut(o, r, n);
1006
1006
  }
1007
1007
  function $e(e, r) {
1008
1008
  if (r === void 0 && (r = 0), r && !(r >= 0))
@@ -1037,19 +1037,19 @@ function xt(e) {
1037
1037
  }
1038
1038
  function Be(e, r, n) {
1039
1039
  if (e !== null)
1040
- for (var o, a, s, i, u, c, l, g = 0, d = 0, p, z = e.type, m = z === "FeatureCollection", b = z === "Feature", F = m ? e.features.length : 1, X = 0; X < F; X++) {
1041
- l = m ? e.features[X].geometry : b ? e.geometry : e, p = l ? l.type === "GeometryCollection" : !1, u = p ? l.geometries.length : 1;
1042
- for (var f = 0; f < u; f++) {
1040
+ for (var o, a, s, i, c, u, l, x = 0, d = 0, p, z = e.type, m = z === "FeatureCollection", b = z === "Feature", F = m ? e.features.length : 1, X = 0; X < F; X++) {
1041
+ l = m ? e.features[X].geometry : b ? e.geometry : e, p = l ? l.type === "GeometryCollection" : !1, c = p ? l.geometries.length : 1;
1042
+ for (var f = 0; f < c; f++) {
1043
1043
  var h = 0, y = 0;
1044
1044
  if (i = p ? l.geometries[f] : l, i !== null) {
1045
- c = i.coordinates;
1046
- var x = i.type;
1047
- switch (g = n && (x === "Polygon" || x === "MultiPolygon") ? 1 : 0, x) {
1045
+ u = i.coordinates;
1046
+ var g = i.type;
1047
+ switch (x = n && (g === "Polygon" || g === "MultiPolygon") ? 1 : 0, g) {
1048
1048
  case null:
1049
1049
  break;
1050
1050
  case "Point":
1051
1051
  if (r(
1052
- c,
1052
+ u,
1053
1053
  d,
1054
1054
  X,
1055
1055
  h,
@@ -1060,25 +1060,25 @@ function Be(e, r, n) {
1060
1060
  break;
1061
1061
  case "LineString":
1062
1062
  case "MultiPoint":
1063
- for (o = 0; o < c.length; o++) {
1063
+ for (o = 0; o < u.length; o++) {
1064
1064
  if (r(
1065
- c[o],
1065
+ u[o],
1066
1066
  d,
1067
1067
  X,
1068
1068
  h,
1069
1069
  y
1070
1070
  ) === !1)
1071
1071
  return !1;
1072
- d++, x === "MultiPoint" && h++;
1072
+ d++, g === "MultiPoint" && h++;
1073
1073
  }
1074
- x === "LineString" && h++;
1074
+ g === "LineString" && h++;
1075
1075
  break;
1076
1076
  case "Polygon":
1077
1077
  case "MultiLineString":
1078
- for (o = 0; o < c.length; o++) {
1079
- for (a = 0; a < c[o].length - g; a++) {
1078
+ for (o = 0; o < u.length; o++) {
1079
+ for (a = 0; a < u[o].length - x; a++) {
1080
1080
  if (r(
1081
- c[o][a],
1081
+ u[o][a],
1082
1082
  d,
1083
1083
  X,
1084
1084
  h,
@@ -1087,16 +1087,16 @@ function Be(e, r, n) {
1087
1087
  return !1;
1088
1088
  d++;
1089
1089
  }
1090
- x === "MultiLineString" && h++, x === "Polygon" && y++;
1090
+ g === "MultiLineString" && h++, g === "Polygon" && y++;
1091
1091
  }
1092
- x === "Polygon" && h++;
1092
+ g === "Polygon" && h++;
1093
1093
  break;
1094
1094
  case "MultiPolygon":
1095
- for (o = 0; o < c.length; o++) {
1096
- for (y = 0, a = 0; a < c[o].length; a++) {
1097
- for (s = 0; s < c[o][a].length - g; s++) {
1095
+ for (o = 0; o < u.length; o++) {
1096
+ for (y = 0, a = 0; a < u[o].length; a++) {
1097
+ for (s = 0; s < u[o][a].length - x; s++) {
1098
1098
  if (r(
1099
- c[o][a][s],
1099
+ u[o][a][s],
1100
1100
  d,
1101
1101
  X,
1102
1102
  h,
@@ -1123,15 +1123,15 @@ function Be(e, r, n) {
1123
1123
  }
1124
1124
  }
1125
1125
  function jt(e, r) {
1126
- var n, o, a, s, i, u, c, l, g, d, p = 0, z = e.type === "FeatureCollection", m = e.type === "Feature", b = z ? e.features.length : 1;
1126
+ var n, o, a, s, i, c, u, l, x, d, p = 0, z = e.type === "FeatureCollection", m = e.type === "Feature", b = z ? e.features.length : 1;
1127
1127
  for (n = 0; n < b; n++) {
1128
- for (u = z ? e.features[n].geometry : m ? e.geometry : e, l = z ? e.features[n].properties : m ? e.properties : {}, g = z ? e.features[n].bbox : m ? e.bbox : void 0, d = z ? e.features[n].id : m ? e.id : void 0, c = u ? u.type === "GeometryCollection" : !1, i = c ? u.geometries.length : 1, a = 0; a < i; a++) {
1129
- if (s = c ? u.geometries[a] : u, s === null) {
1128
+ for (c = z ? e.features[n].geometry : m ? e.geometry : e, l = z ? e.features[n].properties : m ? e.properties : {}, x = z ? e.features[n].bbox : m ? e.bbox : void 0, d = z ? e.features[n].id : m ? e.id : void 0, u = c ? c.type === "GeometryCollection" : !1, i = u ? c.geometries.length : 1, a = 0; a < i; a++) {
1129
+ if (s = u ? c.geometries[a] : c, s === null) {
1130
1130
  if (r(
1131
1131
  null,
1132
1132
  p,
1133
1133
  l,
1134
- g,
1134
+ x,
1135
1135
  d
1136
1136
  ) === !1)
1137
1137
  return !1;
@@ -1148,7 +1148,7 @@ function jt(e, r) {
1148
1148
  s,
1149
1149
  p,
1150
1150
  l,
1151
- g,
1151
+ x,
1152
1152
  d
1153
1153
  ) === !1)
1154
1154
  return !1;
@@ -1160,7 +1160,7 @@ function jt(e, r) {
1160
1160
  s.geometries[o],
1161
1161
  p,
1162
1162
  l,
1163
- g,
1163
+ x,
1164
1164
  d
1165
1165
  ) === !1)
1166
1166
  return !1;
@@ -1177,14 +1177,14 @@ function Ht(e, r, n) {
1177
1177
  var o = n;
1178
1178
  return jt(
1179
1179
  e,
1180
- function(a, s, i, u, c) {
1180
+ function(a, s, i, c, u) {
1181
1181
  s === 0 && n === void 0 ? o = a : o = r(
1182
1182
  o,
1183
1183
  a,
1184
1184
  s,
1185
1185
  i,
1186
- u,
1187
- c
1186
+ c,
1187
+ u
1188
1188
  );
1189
1189
  }
1190
1190
  ), o;
@@ -1245,27 +1245,27 @@ var lt = { exports: {} }, Dt = { exports: {} };
1245
1245
  (function(n, o) {
1246
1246
  e.exports = o();
1247
1247
  })(bt, function() {
1248
- function n(f, h, y, x, _) {
1249
- (function v(M, S, D, A, Y) {
1248
+ function n(f, h, y, g, S) {
1249
+ (function v(M, _, D, A, Y) {
1250
1250
  for (; A > D; ) {
1251
1251
  if (A - D > 600) {
1252
- var R = A - D + 1, q = S - D + 1, se = Math.log(R), H = 0.5 * Math.exp(2 * se / 3), K = 0.5 * Math.sqrt(se * H * (R - H) / R) * (q - R / 2 < 0 ? -1 : 1), W = Math.max(D, Math.floor(S - q * H / R + K)), Q = Math.min(A, Math.floor(S + (R - q) * H / R + K));
1253
- v(M, S, W, Q, Y);
1252
+ var R = A - D + 1, q = _ - D + 1, se = Math.log(R), H = 0.5 * Math.exp(2 * se / 3), K = 0.5 * Math.sqrt(se * H * (R - H) / R) * (q - R / 2 < 0 ? -1 : 1), W = Math.max(D, Math.floor(_ - q * H / R + K)), Q = Math.min(A, Math.floor(_ + (R - q) * H / R + K));
1253
+ v(M, _, W, Q, Y);
1254
1254
  }
1255
- var k = M[S], I = D, w = A;
1256
- for (o(M, D, S), Y(M[A], k) > 0 && o(M, D, A); I < w; ) {
1257
- for (o(M, I, w), I++, w--; Y(M[I], k) < 0; )
1258
- I++;
1255
+ var k = M[_], O = D, w = A;
1256
+ for (o(M, D, _), Y(M[A], k) > 0 && o(M, D, A); O < w; ) {
1257
+ for (o(M, O, w), O++, w--; Y(M[O], k) < 0; )
1258
+ O++;
1259
1259
  for (; Y(M[w], k) > 0; )
1260
1260
  w--;
1261
1261
  }
1262
- Y(M[D], k) === 0 ? o(M, D, w) : o(M, ++w, A), w <= S && (D = w + 1), S <= w && (A = w - 1);
1262
+ Y(M[D], k) === 0 ? o(M, D, w) : o(M, ++w, A), w <= _ && (D = w + 1), _ <= w && (A = w - 1);
1263
1263
  }
1264
- })(f, h, y || 0, x || f.length - 1, _ || a);
1264
+ })(f, h, y || 0, g || f.length - 1, S || a);
1265
1265
  }
1266
1266
  function o(f, h, y) {
1267
- var x = f[h];
1268
- f[h] = f[y], f[y] = x;
1267
+ var g = f[h];
1268
+ f[h] = f[y], f[y] = g;
1269
1269
  }
1270
1270
  function a(f, h) {
1271
1271
  return f < h ? -1 : f > h ? 1 : 0;
@@ -1276,26 +1276,26 @@ var lt = { exports: {} }, Dt = { exports: {} };
1276
1276
  function i(f, h, y) {
1277
1277
  if (!y)
1278
1278
  return h.indexOf(f);
1279
- for (var x = 0; x < h.length; x++)
1280
- if (y(f, h[x]))
1281
- return x;
1279
+ for (var g = 0; g < h.length; g++)
1280
+ if (y(f, h[g]))
1281
+ return g;
1282
1282
  return -1;
1283
1283
  }
1284
- function u(f, h) {
1285
- c(f, 0, f.children.length, h, f);
1284
+ function c(f, h) {
1285
+ u(f, 0, f.children.length, h, f);
1286
1286
  }
1287
- function c(f, h, y, x, _) {
1288
- _ || (_ = F(null)), _.minX = 1 / 0, _.minY = 1 / 0, _.maxX = -1 / 0, _.maxY = -1 / 0;
1287
+ function u(f, h, y, g, S) {
1288
+ S || (S = F(null)), S.minX = 1 / 0, S.minY = 1 / 0, S.maxX = -1 / 0, S.maxY = -1 / 0;
1289
1289
  for (var v = h; v < y; v++) {
1290
1290
  var M = f.children[v];
1291
- l(_, f.leaf ? x(M) : M);
1291
+ l(S, f.leaf ? g(M) : M);
1292
1292
  }
1293
- return _;
1293
+ return S;
1294
1294
  }
1295
1295
  function l(f, h) {
1296
1296
  return f.minX = Math.min(f.minX, h.minX), f.minY = Math.min(f.minY, h.minY), f.maxX = Math.max(f.maxX, h.maxX), f.maxY = Math.max(f.maxY, h.maxY), f;
1297
1297
  }
1298
- function g(f, h) {
1298
+ function x(f, h) {
1299
1299
  return f.minX - h.minX;
1300
1300
  }
1301
1301
  function d(f, h) {
@@ -1316,11 +1316,11 @@ var lt = { exports: {} }, Dt = { exports: {} };
1316
1316
  function F(f) {
1317
1317
  return { children: f, height: 1, leaf: !0, minX: 1 / 0, minY: 1 / 0, maxX: -1 / 0, maxY: -1 / 0 };
1318
1318
  }
1319
- function X(f, h, y, x, _) {
1319
+ function X(f, h, y, g, S) {
1320
1320
  for (var v = [h, y]; v.length; )
1321
- if (!((y = v.pop()) - (h = v.pop()) <= x)) {
1322
- var M = h + Math.ceil((y - h) / x / 2) * x;
1323
- n(f, M, h, y, _), v.push(h, M, M, y);
1321
+ if (!((y = v.pop()) - (h = v.pop()) <= g)) {
1322
+ var M = h + Math.ceil((y - h) / g / 2) * g;
1323
+ n(f, M, h, y, S), v.push(h, M, M, y);
1324
1324
  }
1325
1325
  }
1326
1326
  return s.prototype.all = function() {
@@ -1329,12 +1329,12 @@ var lt = { exports: {} }, Dt = { exports: {} };
1329
1329
  var h = this.data, y = [];
1330
1330
  if (!b(f, h))
1331
1331
  return y;
1332
- for (var x = this.toBBox, _ = []; h; ) {
1332
+ for (var g = this.toBBox, S = []; h; ) {
1333
1333
  for (var v = 0; v < h.children.length; v++) {
1334
- var M = h.children[v], S = h.leaf ? x(M) : M;
1335
- b(f, S) && (h.leaf ? y.push(M) : m(f, S) ? this._all(M, y) : _.push(M));
1334
+ var M = h.children[v], _ = h.leaf ? g(M) : M;
1335
+ b(f, _) && (h.leaf ? y.push(M) : m(f, _) ? this._all(M, y) : S.push(M));
1336
1336
  }
1337
- h = _.pop();
1337
+ h = S.pop();
1338
1338
  }
1339
1339
  return y;
1340
1340
  }, s.prototype.collides = function(f) {
@@ -1342,12 +1342,12 @@ var lt = { exports: {} }, Dt = { exports: {} };
1342
1342
  if (!b(f, h))
1343
1343
  return !1;
1344
1344
  for (var y = []; h; ) {
1345
- for (var x = 0; x < h.children.length; x++) {
1346
- var _ = h.children[x], v = h.leaf ? this.toBBox(_) : _;
1345
+ for (var g = 0; g < h.children.length; g++) {
1346
+ var S = h.children[g], v = h.leaf ? this.toBBox(S) : S;
1347
1347
  if (b(f, v)) {
1348
1348
  if (h.leaf || m(f, v))
1349
1349
  return !0;
1350
- y.push(_);
1350
+ y.push(S);
1351
1351
  }
1352
1352
  }
1353
1353
  h = y.pop();
@@ -1367,8 +1367,8 @@ var lt = { exports: {} }, Dt = { exports: {} };
1367
1367
  this._splitRoot(this.data, y);
1368
1368
  else {
1369
1369
  if (this.data.height < y.height) {
1370
- var x = this.data;
1371
- this.data = y, y = x;
1370
+ var g = this.data;
1371
+ this.data = y, y = g;
1372
1372
  }
1373
1373
  this._insert(y, this.data.height - y.height - 1, !0);
1374
1374
  }
@@ -1382,13 +1382,13 @@ var lt = { exports: {} }, Dt = { exports: {} };
1382
1382
  }, s.prototype.remove = function(f, h) {
1383
1383
  if (!f)
1384
1384
  return this;
1385
- for (var y, x, _, v = this.data, M = this.toBBox(f), S = [], D = []; v || S.length; ) {
1386
- if (v || (v = S.pop(), x = S[S.length - 1], y = D.pop(), _ = !0), v.leaf) {
1385
+ for (var y, g, S, v = this.data, M = this.toBBox(f), _ = [], D = []; v || _.length; ) {
1386
+ if (v || (v = _.pop(), g = _[_.length - 1], y = D.pop(), S = !0), v.leaf) {
1387
1387
  var A = i(f, v.children, h);
1388
1388
  if (A !== -1)
1389
- return v.children.splice(A, 1), S.push(v), this._condense(S), this;
1389
+ return v.children.splice(A, 1), _.push(v), this._condense(_), this;
1390
1390
  }
1391
- _ || v.leaf || !m(v, M) ? x ? (y++, v = x.children[y], _ = !1) : v = null : (S.push(v), D.push(y), y = 0, x = v, v = v.children[0]);
1391
+ S || v.leaf || !m(v, M) ? g ? (y++, v = g.children[y], S = !1) : v = null : (_.push(v), D.push(y), y = 0, g = v, v = v.children[0]);
1392
1392
  }
1393
1393
  return this;
1394
1394
  }, s.prototype.toBBox = function(f) {
@@ -1405,70 +1405,70 @@ var lt = { exports: {} }, Dt = { exports: {} };
1405
1405
  for (var y = []; f; )
1406
1406
  f.leaf ? h.push.apply(h, f.children) : y.push.apply(y, f.children), f = y.pop();
1407
1407
  return h;
1408
- }, s.prototype._build = function(f, h, y, x) {
1409
- var _, v = y - h + 1, M = this._maxEntries;
1408
+ }, s.prototype._build = function(f, h, y, g) {
1409
+ var S, v = y - h + 1, M = this._maxEntries;
1410
1410
  if (v <= M)
1411
- return u(_ = F(f.slice(h, y + 1)), this.toBBox), _;
1412
- x || (x = Math.ceil(Math.log(v) / Math.log(M)), M = Math.ceil(v / Math.pow(M, x - 1))), (_ = F([])).leaf = !1, _.height = x;
1413
- var S = Math.ceil(v / M), D = S * Math.ceil(Math.sqrt(M));
1411
+ return c(S = F(f.slice(h, y + 1)), this.toBBox), S;
1412
+ g || (g = Math.ceil(Math.log(v) / Math.log(M)), M = Math.ceil(v / Math.pow(M, g - 1))), (S = F([])).leaf = !1, S.height = g;
1413
+ var _ = Math.ceil(v / M), D = _ * Math.ceil(Math.sqrt(M));
1414
1414
  X(f, h, y, D, this.compareMinX);
1415
1415
  for (var A = h; A <= y; A += D) {
1416
1416
  var Y = Math.min(A + D - 1, y);
1417
- X(f, A, Y, S, this.compareMinY);
1418
- for (var R = A; R <= Y; R += S) {
1419
- var q = Math.min(R + S - 1, Y);
1420
- _.children.push(this._build(f, R, q, x - 1));
1417
+ X(f, A, Y, _, this.compareMinY);
1418
+ for (var R = A; R <= Y; R += _) {
1419
+ var q = Math.min(R + _ - 1, Y);
1420
+ S.children.push(this._build(f, R, q, g - 1));
1421
1421
  }
1422
1422
  }
1423
- return u(_, this.toBBox), _;
1424
- }, s.prototype._chooseSubtree = function(f, h, y, x) {
1425
- for (; x.push(h), !h.leaf && x.length - 1 !== y; ) {
1426
- for (var _ = 1 / 0, v = 1 / 0, M = void 0, S = 0; S < h.children.length; S++) {
1427
- var D = h.children[S], A = p(D), Y = (R = f, q = D, (Math.max(q.maxX, R.maxX) - Math.min(q.minX, R.minX)) * (Math.max(q.maxY, R.maxY) - Math.min(q.minY, R.minY)) - A);
1428
- Y < v ? (v = Y, _ = A < _ ? A : _, M = D) : Y === v && A < _ && (_ = A, M = D);
1423
+ return c(S, this.toBBox), S;
1424
+ }, s.prototype._chooseSubtree = function(f, h, y, g) {
1425
+ for (; g.push(h), !h.leaf && g.length - 1 !== y; ) {
1426
+ for (var S = 1 / 0, v = 1 / 0, M = void 0, _ = 0; _ < h.children.length; _++) {
1427
+ var D = h.children[_], A = p(D), Y = (R = f, q = D, (Math.max(q.maxX, R.maxX) - Math.min(q.minX, R.minX)) * (Math.max(q.maxY, R.maxY) - Math.min(q.minY, R.minY)) - A);
1428
+ Y < v ? (v = Y, S = A < S ? A : S, M = D) : Y === v && A < S && (S = A, M = D);
1429
1429
  }
1430
1430
  h = M || h.children[0];
1431
1431
  }
1432
1432
  var R, q;
1433
1433
  return h;
1434
1434
  }, s.prototype._insert = function(f, h, y) {
1435
- var x = y ? f : this.toBBox(f), _ = [], v = this._chooseSubtree(x, this.data, h, _);
1436
- for (v.children.push(f), l(v, x); h >= 0 && _[h].children.length > this._maxEntries; )
1437
- this._split(_, h), h--;
1438
- this._adjustParentBBoxes(x, _, h);
1435
+ var g = y ? f : this.toBBox(f), S = [], v = this._chooseSubtree(g, this.data, h, S);
1436
+ for (v.children.push(f), l(v, g); h >= 0 && S[h].children.length > this._maxEntries; )
1437
+ this._split(S, h), h--;
1438
+ this._adjustParentBBoxes(g, S, h);
1439
1439
  }, s.prototype._split = function(f, h) {
1440
- var y = f[h], x = y.children.length, _ = this._minEntries;
1441
- this._chooseSplitAxis(y, _, x);
1442
- var v = this._chooseSplitIndex(y, _, x), M = F(y.children.splice(v, y.children.length - v));
1443
- M.height = y.height, M.leaf = y.leaf, u(y, this.toBBox), u(M, this.toBBox), h ? f[h - 1].children.push(M) : this._splitRoot(y, M);
1440
+ var y = f[h], g = y.children.length, S = this._minEntries;
1441
+ this._chooseSplitAxis(y, S, g);
1442
+ var v = this._chooseSplitIndex(y, S, g), M = F(y.children.splice(v, y.children.length - v));
1443
+ M.height = y.height, M.leaf = y.leaf, c(y, this.toBBox), c(M, this.toBBox), h ? f[h - 1].children.push(M) : this._splitRoot(y, M);
1444
1444
  }, s.prototype._splitRoot = function(f, h) {
1445
- this.data = F([f, h]), this.data.height = f.height + 1, this.data.leaf = !1, u(this.data, this.toBBox);
1445
+ this.data = F([f, h]), this.data.height = f.height + 1, this.data.leaf = !1, c(this.data, this.toBBox);
1446
1446
  }, s.prototype._chooseSplitIndex = function(f, h, y) {
1447
- for (var x, _, v, M, S, D, A, Y = 1 / 0, R = 1 / 0, q = h; q <= y - h; q++) {
1448
- var se = c(f, 0, q, this.toBBox), H = c(f, q, y, this.toBBox), K = (_ = se, v = H, M = void 0, S = void 0, D = void 0, A = void 0, M = Math.max(_.minX, v.minX), S = Math.max(_.minY, v.minY), D = Math.min(_.maxX, v.maxX), A = Math.min(_.maxY, v.maxY), Math.max(0, D - M) * Math.max(0, A - S)), W = p(se) + p(H);
1449
- K < Y ? (Y = K, x = q, R = W < R ? W : R) : K === Y && W < R && (R = W, x = q);
1447
+ for (var g, S, v, M, _, D, A, Y = 1 / 0, R = 1 / 0, q = h; q <= y - h; q++) {
1448
+ var se = u(f, 0, q, this.toBBox), H = u(f, q, y, this.toBBox), K = (S = se, v = H, M = void 0, _ = void 0, D = void 0, A = void 0, M = Math.max(S.minX, v.minX), _ = Math.max(S.minY, v.minY), D = Math.min(S.maxX, v.maxX), A = Math.min(S.maxY, v.maxY), Math.max(0, D - M) * Math.max(0, A - _)), W = p(se) + p(H);
1449
+ K < Y ? (Y = K, g = q, R = W < R ? W : R) : K === Y && W < R && (R = W, g = q);
1450
1450
  }
1451
- return x || y - h;
1451
+ return g || y - h;
1452
1452
  }, s.prototype._chooseSplitAxis = function(f, h, y) {
1453
- var x = f.leaf ? this.compareMinX : g, _ = f.leaf ? this.compareMinY : d;
1454
- this._allDistMargin(f, h, y, x) < this._allDistMargin(f, h, y, _) && f.children.sort(x);
1455
- }, s.prototype._allDistMargin = function(f, h, y, x) {
1456
- f.children.sort(x);
1457
- for (var _ = this.toBBox, v = c(f, 0, h, _), M = c(f, y - h, y, _), S = z(v) + z(M), D = h; D < y - h; D++) {
1453
+ var g = f.leaf ? this.compareMinX : x, S = f.leaf ? this.compareMinY : d;
1454
+ this._allDistMargin(f, h, y, g) < this._allDistMargin(f, h, y, S) && f.children.sort(g);
1455
+ }, s.prototype._allDistMargin = function(f, h, y, g) {
1456
+ f.children.sort(g);
1457
+ for (var S = this.toBBox, v = u(f, 0, h, S), M = u(f, y - h, y, S), _ = z(v) + z(M), D = h; D < y - h; D++) {
1458
1458
  var A = f.children[D];
1459
- l(v, f.leaf ? _(A) : A), S += z(v);
1459
+ l(v, f.leaf ? S(A) : A), _ += z(v);
1460
1460
  }
1461
1461
  for (var Y = y - h - 1; Y >= h; Y--) {
1462
1462
  var R = f.children[Y];
1463
- l(M, f.leaf ? _(R) : R), S += z(M);
1463
+ l(M, f.leaf ? S(R) : R), _ += z(M);
1464
1464
  }
1465
- return S;
1465
+ return _;
1466
1466
  }, s.prototype._adjustParentBBoxes = function(f, h, y) {
1467
- for (var x = y; x >= 0; x--)
1468
- l(h[x], f);
1467
+ for (var g = y; g >= 0; g--)
1468
+ l(h[g], f);
1469
1469
  }, s.prototype._condense = function(f) {
1470
1470
  for (var h = f.length - 1, y = void 0; h >= 0; h--)
1471
- f[h].children.length === 0 ? h > 0 ? (y = f[h - 1].children).splice(y.indexOf(f[h]), 1) : this.clear() : u(f[h], this.toBBox);
1471
+ f[h].children.length === 0 ? h > 0 ? (y = f[h - 1].children).splice(y.indexOf(f[h]), 1) : this.clear() : c(f[h], this.toBBox);
1472
1472
  }, s;
1473
1473
  });
1474
1474
  })(Dt);
@@ -1504,11 +1504,11 @@ class tr {
1504
1504
  _down(r) {
1505
1505
  const { data: n, compare: o } = this, a = this.length >> 1, s = n[r];
1506
1506
  for (; r < a; ) {
1507
- let i = (r << 1) + 1, u = n[i];
1508
- const c = i + 1;
1509
- if (c < this.length && o(n[c], u) < 0 && (i = c, u = n[c]), o(u, s) >= 0)
1507
+ let i = (r << 1) + 1, c = n[i];
1508
+ const u = i + 1;
1509
+ if (u < this.length && o(n[u], c) < 0 && (i = u, c = n[u]), o(c, s) >= 0)
1510
1510
  break;
1511
- n[r] = u, r = i;
1511
+ n[r] = c, r = i;
1512
1512
  }
1513
1513
  n[r] = s;
1514
1514
  }
@@ -1521,21 +1521,21 @@ const nr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1521
1521
  default: tr
1522
1522
  }, Symbol.toStringTag, { value: "Module" })), or = /* @__PURE__ */ Wt(nr);
1523
1523
  var je = { exports: {} }, ir = function(r, n, o, a) {
1524
- var s = r[0], i = r[1], u = !1;
1524
+ var s = r[0], i = r[1], c = !1;
1525
1525
  o === void 0 && (o = 0), a === void 0 && (a = n.length);
1526
- for (var c = (a - o) / 2, l = 0, g = c - 1; l < c; g = l++) {
1527
- var d = n[o + l * 2 + 0], p = n[o + l * 2 + 1], z = n[o + g * 2 + 0], m = n[o + g * 2 + 1], b = p > i != m > i && s < (z - d) * (i - p) / (m - p) + d;
1528
- b && (u = !u);
1526
+ for (var u = (a - o) / 2, l = 0, x = u - 1; l < u; x = l++) {
1527
+ var d = n[o + l * 2 + 0], p = n[o + l * 2 + 1], z = n[o + x * 2 + 0], m = n[o + x * 2 + 1], b = p > i != m > i && s < (z - d) * (i - p) / (m - p) + d;
1528
+ b && (c = !c);
1529
1529
  }
1530
- return u;
1530
+ return c;
1531
1531
  }, sr = function(r, n, o, a) {
1532
- var s = r[0], i = r[1], u = !1;
1532
+ var s = r[0], i = r[1], c = !1;
1533
1533
  o === void 0 && (o = 0), a === void 0 && (a = n.length);
1534
- for (var c = a - o, l = 0, g = c - 1; l < c; g = l++) {
1535
- var d = n[l + o][0], p = n[l + o][1], z = n[g + o][0], m = n[g + o][1], b = p > i != m > i && s < (z - d) * (i - p) / (m - p) + d;
1536
- b && (u = !u);
1534
+ for (var u = a - o, l = 0, x = u - 1; l < u; x = l++) {
1535
+ var d = n[l + o][0], p = n[l + o][1], z = n[x + o][0], m = n[x + o][1], b = p > i != m > i && s < (z - d) * (i - p) / (m - p) + d;
1536
+ b && (c = !c);
1537
1537
  }
1538
- return u;
1538
+ return c;
1539
1539
  }, kt = ir, Et = sr;
1540
1540
  je.exports = function(r, n, o, a) {
1541
1541
  return n.length > 0 && Array.isArray(n[0]) ? Et(r, n, o, a) : kt(r, n, o, a);
@@ -1549,53 +1549,53 @@ var ar = je.exports, it = { exports: {} };
1549
1549
  })(bt, function(n) {
1550
1550
  const a = 33306690738754706e-32;
1551
1551
  function s(b, F, X, f, h) {
1552
- let y, x, _, v, M = F[0], S = f[0], D = 0, A = 0;
1553
- S > M == S > -M ? (y = M, M = F[++D]) : (y = S, S = f[++A]);
1552
+ let y, g, S, v, M = F[0], _ = f[0], D = 0, A = 0;
1553
+ _ > M == _ > -M ? (y = M, M = F[++D]) : (y = _, _ = f[++A]);
1554
1554
  let Y = 0;
1555
1555
  if (D < b && A < X)
1556
- for (S > M == S > -M ? (_ = y - ((x = M + y) - M), M = F[++D]) : (_ = y - ((x = S + y) - S), S = f[++A]), y = x, _ !== 0 && (h[Y++] = _); D < b && A < X; )
1557
- S > M == S > -M ? (_ = y - ((x = y + M) - (v = x - y)) + (M - v), M = F[++D]) : (_ = y - ((x = y + S) - (v = x - y)) + (S - v), S = f[++A]), y = x, _ !== 0 && (h[Y++] = _);
1556
+ for (_ > M == _ > -M ? (S = y - ((g = M + y) - M), M = F[++D]) : (S = y - ((g = _ + y) - _), _ = f[++A]), y = g, S !== 0 && (h[Y++] = S); D < b && A < X; )
1557
+ _ > M == _ > -M ? (S = y - ((g = y + M) - (v = g - y)) + (M - v), M = F[++D]) : (S = y - ((g = y + _) - (v = g - y)) + (_ - v), _ = f[++A]), y = g, S !== 0 && (h[Y++] = S);
1558
1558
  for (; D < b; )
1559
- _ = y - ((x = y + M) - (v = x - y)) + (M - v), M = F[++D], y = x, _ !== 0 && (h[Y++] = _);
1559
+ S = y - ((g = y + M) - (v = g - y)) + (M - v), M = F[++D], y = g, S !== 0 && (h[Y++] = S);
1560
1560
  for (; A < X; )
1561
- _ = y - ((x = y + S) - (v = x - y)) + (S - v), S = f[++A], y = x, _ !== 0 && (h[Y++] = _);
1561
+ S = y - ((g = y + _) - (v = g - y)) + (_ - v), _ = f[++A], y = g, S !== 0 && (h[Y++] = S);
1562
1562
  return y === 0 && Y !== 0 || (h[Y++] = y), Y;
1563
1563
  }
1564
1564
  function i(b) {
1565
1565
  return new Float64Array(b);
1566
1566
  }
1567
- const u = 33306690738754716e-32, c = 22204460492503146e-32, l = 11093356479670487e-47, g = i(4), d = i(8), p = i(12), z = i(16), m = i(4);
1567
+ const c = 33306690738754716e-32, u = 22204460492503146e-32, l = 11093356479670487e-47, x = i(4), d = i(8), p = i(12), z = i(16), m = i(4);
1568
1568
  n.orient2d = function(b, F, X, f, h, y) {
1569
- const x = (F - y) * (X - h), _ = (b - h) * (f - y), v = x - _;
1570
- if (x === 0 || _ === 0 || x > 0 != _ > 0)
1569
+ const g = (F - y) * (X - h), S = (b - h) * (f - y), v = g - S;
1570
+ if (g === 0 || S === 0 || g > 0 != S > 0)
1571
1571
  return v;
1572
- const M = Math.abs(x + _);
1573
- return Math.abs(v) >= u * M ? v : -function(S, D, A, Y, R, q, se) {
1574
- let H, K, W, Q, k, I, w, E, C, G, B, $, J, U, V, ne, ie, Z;
1575
- const oe = S - R, ee = A - R, te = D - q, ae = Y - q;
1576
- k = (V = (E = oe - (w = (I = 134217729 * oe) - (I - oe))) * (G = ae - (C = (I = 134217729 * ae) - (I - ae))) - ((U = oe * ae) - w * C - E * C - w * G)) - (B = V - (ie = (E = te - (w = (I = 134217729 * te) - (I - te))) * (G = ee - (C = (I = 134217729 * ee) - (I - ee))) - ((ne = te * ee) - w * C - E * C - w * G))), g[0] = V - (B + k) + (k - ie), k = (J = U - (($ = U + B) - (k = $ - U)) + (B - k)) - (B = J - ne), g[1] = J - (B + k) + (k - ne), k = (Z = $ + B) - $, g[2] = $ - (Z - k) + (B - k), g[3] = Z;
1572
+ const M = Math.abs(g + S);
1573
+ return Math.abs(v) >= c * M ? v : -function(_, D, A, Y, R, q, se) {
1574
+ let H, K, W, Q, k, O, w, E, C, G, B, $, J, U, V, ne, ie, Z;
1575
+ const oe = _ - R, ee = A - R, te = D - q, ae = Y - q;
1576
+ k = (V = (E = oe - (w = (O = 134217729 * oe) - (O - oe))) * (G = ae - (C = (O = 134217729 * ae) - (O - ae))) - ((U = oe * ae) - w * C - E * C - w * G)) - (B = V - (ie = (E = te - (w = (O = 134217729 * te) - (O - te))) * (G = ee - (C = (O = 134217729 * ee) - (O - ee))) - ((ne = te * ee) - w * C - E * C - w * G))), x[0] = V - (B + k) + (k - ie), k = (J = U - (($ = U + B) - (k = $ - U)) + (B - k)) - (B = J - ne), x[1] = J - (B + k) + (k - ne), k = (Z = $ + B) - $, x[2] = $ - (Z - k) + (B - k), x[3] = Z;
1577
1577
  let ye = function(Ee, Le) {
1578
1578
  let Ne = Le[0];
1579
1579
  for (let Pe = 1; Pe < Ee; Pe++)
1580
1580
  Ne += Le[Pe];
1581
1581
  return Ne;
1582
- }(4, g), we = c * se;
1583
- if (ye >= we || -ye >= we || (H = S - (oe + (k = S - oe)) + (k - R), W = A - (ee + (k = A - ee)) + (k - R), K = D - (te + (k = D - te)) + (k - q), Q = Y - (ae + (k = Y - ae)) + (k - q), H === 0 && K === 0 && W === 0 && Q === 0) || (we = l * se + a * Math.abs(ye), (ye += oe * Q + ae * H - (te * W + ee * K)) >= we || -ye >= we))
1582
+ }(4, x), we = u * se;
1583
+ if (ye >= we || -ye >= we || (H = _ - (oe + (k = _ - oe)) + (k - R), W = A - (ee + (k = A - ee)) + (k - R), K = D - (te + (k = D - te)) + (k - q), Q = Y - (ae + (k = Y - ae)) + (k - q), H === 0 && K === 0 && W === 0 && Q === 0) || (we = l * se + a * Math.abs(ye), (ye += oe * Q + ae * H - (te * W + ee * K)) >= we || -ye >= we))
1584
1584
  return ye;
1585
- k = (V = (E = H - (w = (I = 134217729 * H) - (I - H))) * (G = ae - (C = (I = 134217729 * ae) - (I - ae))) - ((U = H * ae) - w * C - E * C - w * G)) - (B = V - (ie = (E = K - (w = (I = 134217729 * K) - (I - K))) * (G = ee - (C = (I = 134217729 * ee) - (I - ee))) - ((ne = K * ee) - w * C - E * C - w * G))), m[0] = V - (B + k) + (k - ie), k = (J = U - (($ = U + B) - (k = $ - U)) + (B - k)) - (B = J - ne), m[1] = J - (B + k) + (k - ne), k = (Z = $ + B) - $, m[2] = $ - (Z - k) + (B - k), m[3] = Z;
1586
- const qe = s(4, g, 4, m, d);
1587
- k = (V = (E = oe - (w = (I = 134217729 * oe) - (I - oe))) * (G = Q - (C = (I = 134217729 * Q) - (I - Q))) - ((U = oe * Q) - w * C - E * C - w * G)) - (B = V - (ie = (E = te - (w = (I = 134217729 * te) - (I - te))) * (G = W - (C = (I = 134217729 * W) - (I - W))) - ((ne = te * W) - w * C - E * C - w * G))), m[0] = V - (B + k) + (k - ie), k = (J = U - (($ = U + B) - (k = $ - U)) + (B - k)) - (B = J - ne), m[1] = J - (B + k) + (k - ne), k = (Z = $ + B) - $, m[2] = $ - (Z - k) + (B - k), m[3] = Z;
1585
+ k = (V = (E = H - (w = (O = 134217729 * H) - (O - H))) * (G = ae - (C = (O = 134217729 * ae) - (O - ae))) - ((U = H * ae) - w * C - E * C - w * G)) - (B = V - (ie = (E = K - (w = (O = 134217729 * K) - (O - K))) * (G = ee - (C = (O = 134217729 * ee) - (O - ee))) - ((ne = K * ee) - w * C - E * C - w * G))), m[0] = V - (B + k) + (k - ie), k = (J = U - (($ = U + B) - (k = $ - U)) + (B - k)) - (B = J - ne), m[1] = J - (B + k) + (k - ne), k = (Z = $ + B) - $, m[2] = $ - (Z - k) + (B - k), m[3] = Z;
1586
+ const qe = s(4, x, 4, m, d);
1587
+ k = (V = (E = oe - (w = (O = 134217729 * oe) - (O - oe))) * (G = Q - (C = (O = 134217729 * Q) - (O - Q))) - ((U = oe * Q) - w * C - E * C - w * G)) - (B = V - (ie = (E = te - (w = (O = 134217729 * te) - (O - te))) * (G = W - (C = (O = 134217729 * W) - (O - W))) - ((ne = te * W) - w * C - E * C - w * G))), m[0] = V - (B + k) + (k - ie), k = (J = U - (($ = U + B) - (k = $ - U)) + (B - k)) - (B = J - ne), m[1] = J - (B + k) + (k - ne), k = (Z = $ + B) - $, m[2] = $ - (Z - k) + (B - k), m[3] = Z;
1588
1588
  const He = s(qe, d, 4, m, p);
1589
- k = (V = (E = H - (w = (I = 134217729 * H) - (I - H))) * (G = Q - (C = (I = 134217729 * Q) - (I - Q))) - ((U = H * Q) - w * C - E * C - w * G)) - (B = V - (ie = (E = K - (w = (I = 134217729 * K) - (I - K))) * (G = W - (C = (I = 134217729 * W) - (I - W))) - ((ne = K * W) - w * C - E * C - w * G))), m[0] = V - (B + k) + (k - ie), k = (J = U - (($ = U + B) - (k = $ - U)) + (B - k)) - (B = J - ne), m[1] = J - (B + k) + (k - ne), k = (Z = $ + B) - $, m[2] = $ - (Z - k) + (B - k), m[3] = Z;
1590
- const Se = s(He, p, 4, m, z);
1591
- return z[Se - 1];
1589
+ k = (V = (E = H - (w = (O = 134217729 * H) - (O - H))) * (G = Q - (C = (O = 134217729 * Q) - (O - Q))) - ((U = H * Q) - w * C - E * C - w * G)) - (B = V - (ie = (E = K - (w = (O = 134217729 * K) - (O - K))) * (G = W - (C = (O = 134217729 * W) - (O - W))) - ((ne = K * W) - w * C - E * C - w * G))), m[0] = V - (B + k) + (k - ie), k = (J = U - (($ = U + B) - (k = $ - U)) + (B - k)) - (B = J - ne), m[1] = J - (B + k) + (k - ne), k = (Z = $ + B) - $, m[2] = $ - (Z - k) + (B - k), m[3] = Z;
1590
+ const _e = s(He, p, 4, m, z);
1591
+ return z[_e - 1];
1592
1592
  }(b, F, X, f, h, y, M);
1593
1593
  }, n.orient2dfast = function(b, F, X, f, h, y) {
1594
1594
  return (F - y) * (X - h) - (b - h) * (f - y);
1595
1595
  }, Object.defineProperty(n, "__esModule", { value: !0 });
1596
1596
  });
1597
1597
  })(it, it.exports);
1598
- var ur = it.exports, pt = er, Je = or, cr = ar, lr = ur.orient2d;
1598
+ var cr = it.exports, pt = er, Je = or, ur = ar, lr = cr.orient2d;
1599
1599
  Je.default && (Je = Je.default);
1600
1600
  lt.exports = At;
1601
1601
  lt.exports.default = At;
@@ -1614,42 +1614,42 @@ function At(e, r, n) {
1614
1614
  }, a.compareMinY = function(f, h) {
1615
1615
  return f[1] - h[1];
1616
1616
  }, a.load(e);
1617
- for (var s = [], i = 0, u; i < o.length; i++) {
1618
- var c = o[i];
1619
- a.remove(c), u = wt(c, u), s.push(u);
1617
+ for (var s = [], i = 0, c; i < o.length; i++) {
1618
+ var u = o[i];
1619
+ a.remove(u), c = wt(u, c), s.push(c);
1620
1620
  }
1621
1621
  var l = new pt(16);
1622
1622
  for (i = 0; i < s.length; i++)
1623
1623
  l.insert(Ke(s[i]));
1624
- for (var g = r * r, d = n * n; s.length; ) {
1624
+ for (var x = r * r, d = n * n; s.length; ) {
1625
1625
  var p = s.shift(), z = p.p, m = p.next.p, b = We(z, m);
1626
1626
  if (!(b < d)) {
1627
- var F = b / g;
1628
- c = fr(a, p.prev.p, z, m, p.next.next.p, F, l), c && Math.min(We(c, z), We(c, m)) <= F && (s.push(p), s.push(wt(c, p)), a.remove(c), l.remove(p), l.insert(Ke(p)), l.insert(Ke(p.next)));
1627
+ var F = b / x;
1628
+ u = fr(a, p.prev.p, z, m, p.next.next.p, F, l), u && Math.min(We(u, z), We(u, m)) <= F && (s.push(p), s.push(wt(u, p)), a.remove(u), l.remove(p), l.insert(Ke(p)), l.insert(Ke(p.next)));
1629
1629
  }
1630
1630
  }
1631
- p = u;
1631
+ p = c;
1632
1632
  var X = [];
1633
1633
  do
1634
1634
  X.push(p.p), p = p.next;
1635
- while (p !== u);
1635
+ while (p !== c);
1636
1636
  return X.push(p.p), X;
1637
1637
  }
1638
1638
  function fr(e, r, n, o, a, s, i) {
1639
- for (var u = new Je([], hr), c = e.data; c; ) {
1640
- for (var l = 0; l < c.children.length; l++) {
1641
- var g = c.children[l], d = c.leaf ? et(g, n, o) : yr(n, o, g);
1642
- d > s || u.push({
1643
- node: g,
1639
+ for (var c = new Je([], hr), u = e.data; u; ) {
1640
+ for (var l = 0; l < u.children.length; l++) {
1641
+ var x = u.children[l], d = u.leaf ? et(x, n, o) : yr(n, o, x);
1642
+ d > s || c.push({
1643
+ node: x,
1644
1644
  dist: d
1645
1645
  });
1646
1646
  }
1647
- for (; u.length && !u.peek().node.children; ) {
1648
- var p = u.pop(), z = p.node, m = et(z, r, n), b = et(z, o, a);
1647
+ for (; c.length && !c.peek().node.children; ) {
1648
+ var p = c.pop(), z = p.node, m = et(z, r, n), b = et(z, o, a);
1649
1649
  if (p.dist < m && p.dist < b && vt(n, z, i) && vt(o, z, i))
1650
1650
  return z;
1651
1651
  }
1652
- c = u.pop(), c && (c = c.node);
1652
+ u = c.pop(), u && (u = u.node);
1653
1653
  }
1654
1654
  return null;
1655
1655
  }
@@ -1675,8 +1675,8 @@ function mt(e, r) {
1675
1675
  return e[0] >= r.minX && e[0] <= r.maxX && e[1] >= r.minY && e[1] <= r.maxY;
1676
1676
  }
1677
1677
  function vt(e, r, n) {
1678
- for (var o = Math.min(e[0], r[0]), a = Math.min(e[1], r[1]), s = Math.max(e[0], r[0]), i = Math.max(e[1], r[1]), u = n.search({ minX: o, minY: a, maxX: s, maxY: i }), c = 0; c < u.length; c++)
1679
- if (dr(u[c].p, u[c].next.p, e, r))
1678
+ for (var o = Math.min(e[0], r[0]), a = Math.min(e[1], r[1]), s = Math.max(e[0], r[0]), i = Math.max(e[1], r[1]), c = n.search({ minX: o, minY: a, maxX: s, maxY: i }), u = 0; u < c.length; u++)
1679
+ if (dr(c[u].p, c[u].next.p, e, r))
1680
1680
  return !1;
1681
1681
  return !0;
1682
1682
  }
@@ -1695,10 +1695,10 @@ function gr(e) {
1695
1695
  var i = e[s];
1696
1696
  i[0] < r[0] && (r = i), i[0] > o[0] && (o = i), i[1] < n[1] && (n = i), i[1] > a[1] && (a = i);
1697
1697
  }
1698
- var u = [r, n, o, a], c = u.slice();
1698
+ var c = [r, n, o, a], u = c.slice();
1699
1699
  for (s = 0; s < e.length; s++)
1700
- cr(e[s], u) || c.push(e[s]);
1701
- return pr(c);
1700
+ ur(e[s], c) || u.push(e[s]);
1701
+ return pr(u);
1702
1702
  }
1703
1703
  function wt(e, r) {
1704
1704
  var n = {
@@ -1719,15 +1719,15 @@ function We(e, r) {
1719
1719
  function et(e, r, n) {
1720
1720
  var o = r[0], a = r[1], s = n[0] - o, i = n[1] - a;
1721
1721
  if (s !== 0 || i !== 0) {
1722
- var u = ((e[0] - o) * s + (e[1] - a) * i) / (s * s + i * i);
1723
- u > 1 ? (o = n[0], a = n[1]) : u > 0 && (o += s * u, a += i * u);
1722
+ var c = ((e[0] - o) * s + (e[1] - a) * i) / (s * s + i * i);
1723
+ c > 1 ? (o = n[0], a = n[1]) : c > 0 && (o += s * c, a += i * c);
1724
1724
  }
1725
1725
  return s = e[0] - o, i = e[1] - a, s * s + i * i;
1726
1726
  }
1727
- function Ue(e, r, n, o, a, s, i, u) {
1728
- var c = n - e, l = o - r, g = i - a, d = u - s, p = e - a, z = r - s, m = c * c + l * l, b = c * g + l * d, F = g * g + d * d, X = c * p + l * z, f = g * p + d * z, h = m * F - b * b, y, x, _, v, M = h, S = h;
1729
- h === 0 ? (x = 0, M = 1, v = f, S = F) : (x = b * f - F * X, v = m * f - b * X, x < 0 ? (x = 0, v = f, S = F) : x > M && (x = M, v = f + b, S = F)), v < 0 ? (v = 0, -X < 0 ? x = 0 : -X > m ? x = M : (x = -X, M = m)) : v > S && (v = S, -X + b < 0 ? x = 0 : -X + b > m ? x = M : (x = -X + b, M = m)), y = x === 0 ? 0 : x / M, _ = v === 0 ? 0 : v / S;
1730
- var D = (1 - y) * e + y * n, A = (1 - y) * r + y * o, Y = (1 - _) * a + _ * i, R = (1 - _) * s + _ * u, q = Y - D, se = R - A;
1727
+ function Ue(e, r, n, o, a, s, i, c) {
1728
+ var u = n - e, l = o - r, x = i - a, d = c - s, p = e - a, z = r - s, m = u * u + l * l, b = u * x + l * d, F = x * x + d * d, X = u * p + l * z, f = x * p + d * z, h = m * F - b * b, y, g, S, v, M = h, _ = h;
1729
+ h === 0 ? (g = 0, M = 1, v = f, _ = F) : (g = b * f - F * X, v = m * f - b * X, g < 0 ? (g = 0, v = f, _ = F) : g > M && (g = M, v = f + b, _ = F)), v < 0 ? (v = 0, -X < 0 ? g = 0 : -X > m ? g = M : (g = -X, M = m)) : v > _ && (v = _, -X + b < 0 ? g = 0 : -X + b > m ? g = M : (g = -X + b, M = m)), y = g === 0 ? 0 : g / M, S = v === 0 ? 0 : v / _;
1730
+ var D = (1 - y) * e + y * n, A = (1 - y) * r + y * o, Y = (1 - S) * a + S * i, R = (1 - S) * s + S * c, q = Y - D, se = R - A;
1731
1731
  return q * q + se * se;
1732
1732
  }
1733
1733
  function xr(e, r) {
@@ -1761,7 +1761,7 @@ function wr(e, r) {
1761
1761
  }
1762
1762
  function st(e, r, n) {
1763
1763
  n === void 0 && (n = {});
1764
- var o = ke(e), a = ke(r), s = de(a[1] - o[1]), i = de(a[0] - o[0]), u = de(o[1]), c = de(a[1]), l = Math.pow(Math.sin(s / 2), 2) + Math.pow(Math.sin(i / 2), 2) * Math.cos(u) * Math.cos(c);
1764
+ var o = ke(e), a = ke(r), s = de(a[1] - o[1]), i = de(a[0] - o[0]), c = de(o[1]), u = de(a[1]), l = Math.pow(Math.sin(s / 2), 2) + Math.pow(Math.sin(i / 2), 2) * Math.cos(c) * Math.cos(u);
1765
1765
  return Jt(2 * Math.atan2(Math.sqrt(l), Math.sqrt(1 - l)), n.units);
1766
1766
  }
1767
1767
  function re(e) {
@@ -1849,17 +1849,17 @@ var zr = (
1849
1849
  }
1850
1850
  this.controls.push([this.points[0], this.points[0]]);
1851
1851
  for (var n = 0; n < this.centers.length - 1; n++) {
1852
- var s = this.points[n + 1].x - (this.centers[n].x + this.centers[n + 1].x) / 2, i = this.points[n + 1].y - (this.centers[n].y + this.centers[n + 1].y) / 2, u = this.points[n + 1].z - (this.centers[n].y + this.centers[n + 1].z) / 2;
1852
+ var s = this.points[n + 1].x - (this.centers[n].x + this.centers[n + 1].x) / 2, i = this.points[n + 1].y - (this.centers[n].y + this.centers[n + 1].y) / 2, c = this.points[n + 1].z - (this.centers[n].y + this.centers[n + 1].z) / 2;
1853
1853
  this.controls.push([
1854
1854
  {
1855
1855
  x: (1 - this.sharpness) * this.points[n + 1].x + this.sharpness * (this.centers[n].x + s),
1856
1856
  y: (1 - this.sharpness) * this.points[n + 1].y + this.sharpness * (this.centers[n].y + i),
1857
- z: (1 - this.sharpness) * this.points[n + 1].z + this.sharpness * (this.centers[n].z + u)
1857
+ z: (1 - this.sharpness) * this.points[n + 1].z + this.sharpness * (this.centers[n].z + c)
1858
1858
  },
1859
1859
  {
1860
1860
  x: (1 - this.sharpness) * this.points[n + 1].x + this.sharpness * (this.centers[n + 1].x + s),
1861
1861
  y: (1 - this.sharpness) * this.points[n + 1].y + this.sharpness * (this.centers[n + 1].y + i),
1862
- z: (1 - this.sharpness) * this.points[n + 1].z + this.sharpness * (this.centers[n + 1].z + u)
1862
+ z: (1 - this.sharpness) * this.points[n + 1].z + this.sharpness * (this.centers[n + 1].z + c)
1863
1863
  }
1864
1864
  ]);
1865
1865
  }
@@ -1889,19 +1889,19 @@ var zr = (
1889
1889
  if (o >= 1)
1890
1890
  return this.points[this.length - 1];
1891
1891
  var a = Math.floor((this.points.length - 1) * o), s = (this.length - 1) * o - a;
1892
- return _r(s, this.points[a], this.controls[a][1], this.controls[a + 1][0], this.points[a + 1]);
1892
+ return Sr(s, this.points[a], this.controls[a][1], this.controls[a + 1][0], this.points[a + 1]);
1893
1893
  }, e;
1894
1894
  }()
1895
1895
  );
1896
- function _r(e, r, n, o, a) {
1897
- var s = Sr(e), i = {
1896
+ function Sr(e, r, n, o, a) {
1897
+ var s = _r(e), i = {
1898
1898
  x: a.x * s[0] + o.x * s[1] + n.x * s[2] + r.x * s[3],
1899
1899
  y: a.y * s[0] + o.y * s[1] + n.y * s[2] + r.y * s[3],
1900
1900
  z: a.z * s[0] + o.z * s[1] + n.z * s[2] + r.z * s[3]
1901
1901
  };
1902
1902
  return i;
1903
1903
  }
1904
- function Sr(e) {
1904
+ function _r(e) {
1905
1905
  var r = e * e, n = r * e;
1906
1906
  return [
1907
1907
  n,
@@ -1918,44 +1918,44 @@ function at(e, r) {
1918
1918
  duration: n,
1919
1919
  points: s,
1920
1920
  sharpness: o
1921
- }), u = function(l) {
1922
- var g = i.pos(l);
1923
- Math.floor(l / 100) % 2 === 0 && a.push([g.x, g.y]);
1924
- }, c = 0; c < i.duration; c += 10)
1925
- u(c);
1926
- return u(i.duration), Ze(a, r.properties);
1921
+ }), c = function(l) {
1922
+ var x = i.pos(l);
1923
+ Math.floor(l / 100) % 2 === 0 && a.push([x.x, x.y]);
1924
+ }, u = 0; u < i.duration; u += 10)
1925
+ c(u);
1926
+ return c(i.duration), Ze(a, r.properties);
1927
1927
  }
1928
1928
  function Lr(e, r) {
1929
1929
  r === void 0 && (r = {});
1930
1930
  var n = Number(e[0]), o = Number(e[1]), a = Number(e[2]), s = Number(e[3]);
1931
1931
  if (e.length === 6)
1932
1932
  throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");
1933
- var i = [n, o], u = [n, s], c = [a, s], l = [a, o];
1934
- return Re([[i, l, c, u, i]], r.properties, { bbox: e, id: r.id });
1933
+ var i = [n, o], c = [n, s], u = [a, s], l = [a, o];
1934
+ return Re([[i, l, u, c, i]], r.properties, { bbox: e, id: r.id });
1935
1935
  }
1936
1936
  function Ft(e, r, n, o) {
1937
1937
  o === void 0 && (o = {});
1938
- var a = ke(e), s = de(a[0]), i = de(a[1]), u = de(n), c = Zt(r, o.units), l = Math.asin(Math.sin(i) * Math.cos(c) + Math.cos(i) * Math.sin(c) * Math.cos(u)), g = s + Math.atan2(Math.sin(u) * Math.sin(c) * Math.cos(i), Math.cos(c) - Math.sin(i) * Math.sin(l)), d = nt(g), p = nt(l);
1938
+ var a = ke(e), s = de(a[0]), i = de(a[1]), c = de(n), u = Zt(r, o.units), l = Math.asin(Math.sin(i) * Math.cos(u) + Math.cos(i) * Math.sin(u) * Math.cos(c)), x = s + Math.atan2(Math.sin(c) * Math.sin(u) * Math.cos(i), Math.cos(u) - Math.sin(i) * Math.sin(l)), d = nt(x), p = nt(l);
1939
1939
  return pe([d, p], o.properties);
1940
1940
  }
1941
- function It(e, r, n) {
1941
+ function Ot(e, r, n) {
1942
1942
  n === void 0 && (n = {});
1943
1943
  for (var o = n.steps || 64, a = n.properties ? n.properties : !Array.isArray(e) && e.type === "Feature" && e.properties ? e.properties : {}, s = [], i = 0; i < o; i++)
1944
1944
  s.push(Ft(e, r, i * -360 / o, n).geometry.coordinates);
1945
1945
  return s.push(s[0]), Re([s], a);
1946
1946
  }
1947
- function Ot(e, r, n) {
1947
+ function It(e, r, n) {
1948
1948
  if (n === void 0 && (n = {}), n.final === !0)
1949
1949
  return Pr(e, r);
1950
- var o = ke(e), a = ke(r), s = de(o[0]), i = de(a[0]), u = de(o[1]), c = de(a[1]), l = Math.sin(i - s) * Math.cos(c), g = Math.cos(u) * Math.sin(c) - Math.sin(u) * Math.cos(c) * Math.cos(i - s);
1951
- return nt(Math.atan2(l, g));
1950
+ var o = ke(e), a = ke(r), s = de(o[0]), i = de(a[0]), c = de(o[1]), u = de(a[1]), l = Math.sin(i - s) * Math.cos(u), x = Math.cos(c) * Math.sin(u) - Math.sin(c) * Math.cos(u) * Math.cos(i - s);
1951
+ return nt(Math.atan2(l, x));
1952
1952
  }
1953
1953
  function Pr(e, r) {
1954
- var n = Ot(r, e);
1954
+ var n = It(r, e);
1955
1955
  return n = (n + 180) % 360, n;
1956
1956
  }
1957
1957
  function br(e, r) {
1958
- var n = st(e, r), o = Ot(e, r), a = Ft(e, n / 2, o);
1958
+ var n = st(e, r), o = It(e, r), a = Ft(e, n / 2, o);
1959
1959
  return a;
1960
1960
  }
1961
1961
  function Mt(e, r) {
@@ -1965,7 +1965,7 @@ function Mt(e, r) {
1965
1965
  n += s[0], o += s[1], a++;
1966
1966
  }, !0), pe([n / a, o / a], r.properties);
1967
1967
  }
1968
- function ut(e, r) {
1968
+ function ct(e, r) {
1969
1969
  switch (r === void 0 && (r = {}), Vt(e)) {
1970
1970
  case "Point":
1971
1971
  return pe(ke(e), r.properties);
@@ -1974,18 +1974,18 @@ function ut(e, r) {
1974
1974
  Be(e, function(y) {
1975
1975
  n.push(y);
1976
1976
  });
1977
- var o = Mt(e, { properties: r.properties }), a = o.geometry.coordinates, s = 0, i = 0, u = 0, c, l, g, d, p, z, m, b, F = n.map(function(y) {
1977
+ var o = Mt(e, { properties: r.properties }), a = o.geometry.coordinates, s = 0, i = 0, c = 0, u, l, x, d, p, z, m, b, F = n.map(function(y) {
1978
1978
  return [y[0] - a[0], y[1] - a[1]];
1979
1979
  });
1980
- for (c = 0; c < n.length - 1; c++)
1981
- l = F[c], d = l[0], z = l[1], g = F[c + 1], p = g[0], m = g[1], b = d * m - p * z, u += b, s += (d + p) * b, i += (z + m) * b;
1982
- if (u === 0)
1980
+ for (u = 0; u < n.length - 1; u++)
1981
+ l = F[u], d = l[0], z = l[1], x = F[u + 1], p = x[0], m = x[1], b = d * m - p * z, c += b, s += (d + p) * b, i += (z + m) * b;
1982
+ if (c === 0)
1983
1983
  return o;
1984
- var X = u * 0.5, f = 1 / (6 * X);
1984
+ var X = c * 0.5, f = 1 / (6 * X);
1985
1985
  return pe([a[0] + f * s, a[1] + f * i], r.properties);
1986
1986
  default:
1987
1987
  var h = wr(e);
1988
- return h ? ut(h, { properties: r.properties }) : Mt(e, { properties: r.properties });
1988
+ return h ? ct(h, { properties: r.properties }) : Mt(e, { properties: r.properties });
1989
1989
  }
1990
1990
  }
1991
1991
  var zt = 6378137;
@@ -1998,10 +1998,10 @@ function Dr(e) {
1998
1998
  var r = 0, n;
1999
1999
  switch (e.type) {
2000
2000
  case "Polygon":
2001
- return _t(e.coordinates);
2001
+ return St(e.coordinates);
2002
2002
  case "MultiPolygon":
2003
2003
  for (n = 0; n < e.coordinates.length; n++)
2004
- r += _t(e.coordinates[n]);
2004
+ r += St(e.coordinates[n]);
2005
2005
  return r;
2006
2006
  case "Point":
2007
2007
  case "MultiPoint":
@@ -2011,23 +2011,23 @@ function Dr(e) {
2011
2011
  }
2012
2012
  return 0;
2013
2013
  }
2014
- function _t(e) {
2014
+ function St(e) {
2015
2015
  var r = 0;
2016
2016
  if (e && e.length > 0) {
2017
- r += Math.abs(St(e[0]));
2017
+ r += Math.abs(_t(e[0]));
2018
2018
  for (var n = 1; n < e.length; n++)
2019
- r -= Math.abs(St(e[n]));
2019
+ r -= Math.abs(_t(e[n]));
2020
2020
  }
2021
2021
  return r;
2022
2022
  }
2023
- function St(e) {
2024
- var r, n, o, a, s, i, u, c = 0, l = e.length;
2023
+ function _t(e) {
2024
+ var r, n, o, a, s, i, c, u = 0, l = e.length;
2025
2025
  if (l > 2) {
2026
- for (u = 0; u < l; u++)
2027
- u === l - 2 ? (a = l - 2, s = l - 1, i = 0) : u === l - 1 ? (a = l - 1, s = 0, i = 1) : (a = u, s = u + 1, i = u + 2), r = e[a], n = e[s], o = e[i], c += (rt(o[0]) - rt(r[0])) * Math.sin(rt(n[1]));
2028
- c = c * zt * zt / 2;
2026
+ for (c = 0; c < l; c++)
2027
+ c === l - 2 ? (a = l - 2, s = l - 1, i = 0) : c === l - 1 ? (a = l - 1, s = 0, i = 1) : (a = c, s = c + 1, i = c + 2), r = e[a], n = e[s], o = e[i], u += (rt(o[0]) - rt(r[0])) * Math.sin(rt(n[1]));
2028
+ u = u * zt * zt / 2;
2029
2029
  }
2030
- return c;
2030
+ return u;
2031
2031
  }
2032
2032
  function rt(e) {
2033
2033
  return e * Math.PI / 180;
@@ -2083,7 +2083,7 @@ const kr = (e, r, n, o) => {
2083
2083
  "line-width": (o == null ? void 0 : o["line-width"]) || 4
2084
2084
  }
2085
2085
  });
2086
- }, Ie = (e, r, n, o) => {
2086
+ }, Oe = (e, r, n, o) => {
2087
2087
  e.addLayer({
2088
2088
  id: r,
2089
2089
  type: "symbol",
@@ -2099,7 +2099,7 @@ const kr = (e, r, n, o) => {
2099
2099
  visibility: o != null && o.visibility ? "visible" : "none"
2100
2100
  }
2101
2101
  });
2102
- }, _e = (e, r, n, o) => {
2102
+ }, Se = (e, r, n, o) => {
2103
2103
  e.addLayer({
2104
2104
  id: r,
2105
2105
  type: "fill",
@@ -2110,39 +2110,9 @@ const kr = (e, r, n, o) => {
2110
2110
  "fill-opacity": 0.8
2111
2111
  }
2112
2112
  });
2113
- }, Er = (e) => {
2114
- let r = !1, n = e, o = [], a = n.length - 1;
2115
- for (let i = 0; i < a; i++) {
2116
- let u = n[i], c = n[i + 1];
2117
- (u.x != c.x || u.y != c.y) && o.push(u);
2118
- }
2119
- let s = o.length - 1;
2120
- for (let i = 0; i < s; i++) {
2121
- let u = o[i], c = o[i + 1];
2122
- for (let l = i + 2; l < s; l++) {
2123
- let g = o[l], d = o[l + 1], p = Ar(u, c, g, d);
2124
- if (p == null && c.x == d.x && c.y == d.y && (p = { x: c.x, y: c.y }), p != null) {
2125
- r = !0;
2126
- break;
2127
- }
2128
- }
2129
- if (r)
2130
- break;
2131
- }
2132
- return r;
2133
2113
  };
2134
- function Ar(e, r, n, o) {
2135
- var a = null, s = (e.x - n.x) * (r.y - n.y) - (e.y - n.y) * (r.x - n.x), i = (e.x - o.x) * (r.y - o.y) - (e.y - o.y) * (r.x - o.x);
2136
- if (s * i >= 0)
2137
- return a;
2138
- var u = (n.x - e.x) * (o.y - e.y) - (n.y - e.y) * (o.x - e.x), c = u + s - i;
2139
- if (u * c >= 0)
2140
- return a;
2141
- var l = u / (i - s), g = l * (r.x - e.x), d = l * (r.y - e.y);
2142
- return a = { x: e.x + g, y: e.y + d }, a;
2143
- }
2144
- function Xr(e, r, n, o, a) {
2145
- let s = "free", i = "", u = [], c = [], l = {}, g = !1, d = !0, p = !1, z = !0, m = [], b = !0, F = 5e4, X = !1, f = {
2114
+ function Er(e, r, n, o, a) {
2115
+ let s = "free", i = "", c = [], u = [], l = {}, x = !1, d = !0, p = !1, z = !0, m = [], b = !0, F = 5e4, X = !1, f = {
2146
2116
  type: "FeatureCollection",
2147
2117
  features: []
2148
2118
  }, h = {
@@ -2160,14 +2130,14 @@ function Xr(e, r, n, o, a) {
2160
2130
  coordinates: []
2161
2131
  }
2162
2132
  };
2163
- const x = (P, O) => {
2133
+ const g = (P, I) => {
2164
2134
  let N = 0;
2165
2135
  return function(...T) {
2166
- const ue = (/* @__PURE__ */ new Date()).getTime();
2167
- ue - N < O || (N = ue, P(...T));
2136
+ const ce = (/* @__PURE__ */ new Date()).getTime();
2137
+ ce - N < I || (N = ce, P(...T));
2168
2138
  };
2169
- }, _ = (P) => {
2170
- switch (e.off("click", C), e.off("mousemove", te), e.off("contextmenu", J), Q(), ee(), g && (d = !0, E(!1)), g = !0, s = P.type || "point", b = P.multipleLine || !1, p = P.smooth || !1, F = P.brushSize * 1e3 || 3e4, l = P, z = P.showLayer, h.properties = P, y.properties = P, s) {
2139
+ }, S = (P) => {
2140
+ switch (e.off("click", C), e.off("mousemove", te), e.off("contextmenu", J), Q(), ee(), x && (d = !0, E(!1)), x = !0, s = P.type || "point", b = P.multipleLine || !1, p = P.smooth || !1, F = P.brushSize * 1e3 || 3e4, l = P, z = P.showLayer, h.properties = P, y.properties = P, s) {
2171
2141
  case "point":
2172
2142
  break;
2173
2143
  case "brush":
@@ -2179,38 +2149,38 @@ function Xr(e, r, n, o, a) {
2179
2149
  s = P, h.properties.type = s, y.properties.type = s;
2180
2150
  }, M = (P) => {
2181
2151
  if (n)
2182
- if (u.length) {
2183
- const T = [u[u.length - 1]];
2152
+ if (c.length) {
2153
+ const T = [c[c.length - 1]];
2184
2154
  n(T);
2185
2155
  } else
2186
2156
  n([]);
2187
- I(), ee(), e.addSource(i, { type: "geojson", data: f }), ze(e, i, i, l), f.features.push({
2157
+ O(), ee(), e.addSource(i, { type: "geojson", data: f }), ze(e, i, i, l), f.features.push({
2188
2158
  type: "Feature",
2189
2159
  properties: l,
2190
2160
  geometry: { type: "Point", coordinates: P.lngLat.toArray() }
2191
2161
  }), e.getSource(i).setData(re(f)), r && r(Z());
2192
- }, S = (P) => {
2162
+ }, _ = (P) => {
2193
2163
  if (d) {
2194
2164
  if (n)
2195
- if (u.length) {
2196
- const N = u[u.length - 1], T = [N, N + "point"];
2165
+ if (c.length) {
2166
+ const N = c[c.length - 1], T = [N, N + "point"];
2197
2167
  n(T);
2198
2168
  } else
2199
2169
  n([]);
2200
- I(), ee(), e.addSource(i, { type: "geojson", data: h }), xe(e, i, i), ze(e, i + "point", i, l), d = !1, e.on("mousemove", te), e.on("contextmenu", J), e.dragRotate.enable();
2170
+ O(), ee(), e.addSource(i, { type: "geojson", data: h }), xe(e, i, i), ze(e, i + "point", i, l), d = !1, e.on("mousemove", te), e.on("contextmenu", J), e.dragRotate.enable();
2201
2171
  }
2202
2172
  h.geometry.coordinates.push(P.lngLat.toArray());
2203
- const O = e.getSource(i);
2204
- O.setData(h), !b && h.geometry.coordinates.length == 3 && (e.off("mousemove", te), e.off("contextmenu", J), d = !0, E(!1), h.geometry.coordinates.pop(), O.setData(re(h)), r && r(Z()));
2173
+ const I = e.getSource(i);
2174
+ I.setData(h), !b && h.geometry.coordinates.length == 3 && (e.off("mousemove", te), e.off("contextmenu", J), d = !0, E(!1), h.geometry.coordinates.pop(), I.setData(re(h)), r && r(Z()));
2205
2175
  }, D = (P) => {
2206
2176
  if (d) {
2207
2177
  if (n)
2208
- if (u.length) {
2209
- const T = u[u.length - 1], ue = [T, T + "outline", T + "point"];
2210
- n(ue);
2178
+ if (c.length) {
2179
+ const T = c[c.length - 1], ce = [T, T + "outline", T + "point"];
2180
+ n(ce);
2211
2181
  } else
2212
2182
  n([]);
2213
- I(), ee(), e.addSource(i, { type: "geojson", data: y }), e.addSource(i + "point", { type: "geojson", data: f }), _e(e, i, i, l), xe(e, i + "outline", i, { "line-color": "black", "line-width": 2, ...l }), ze(e, i + "point", i + "point", l), d = !1, e.on("mousemove", te), e.on("contextmenu", J), e.dragRotate.enable();
2183
+ O(), ee(), e.addSource(i, { type: "geojson", data: y }), e.addSource(i + "point", { type: "geojson", data: f }), Se(e, i, i, l), xe(e, i + "outline", i, { "line-color": "black", "line-width": 2, ...l }), ze(e, i + "point", i + "point", l), d = !1, e.on("mousemove", te), e.on("contextmenu", J), e.dragRotate.enable();
2214
2184
  }
2215
2185
  y.geometry.coordinates[0].length >= 3 && y.geometry.coordinates[0].pop(), y.geometry.coordinates[0].push(P.lngLat.toArray()), y.geometry.coordinates[0].push(y.geometry.coordinates[0][0]), f.features.push(
2216
2186
  re({
@@ -2223,22 +2193,22 @@ function Xr(e, r, n, o, a) {
2223
2193
  }, A = (P) => {
2224
2194
  if (d) {
2225
2195
  if (n)
2226
- if (u.length) {
2227
- const N = u[u.length - 1], T = [N, N + "outline"];
2196
+ if (c.length) {
2197
+ const N = c[c.length - 1], T = [N, N + "outline"];
2228
2198
  n(T);
2229
2199
  } else
2230
2200
  n([]);
2231
- I(), ee(), e.addSource(i, { type: "geojson", data: y }), _e(e, i, i, l), xe(e, i + "outline", i, { "line-color": "black", "line-width": 2, ...l }), d = !1, y.geometry.coordinates[0].push(P.lngLat.toArray()), e.getSource(i).setData(y), e.on("mousemove", te), e.on("contextmenu", J), E(!0), e.dragRotate.enable();
2201
+ O(), ee(), e.addSource(i, { type: "geojson", data: y }), Se(e, i, i, l), xe(e, i + "outline", i, { "line-color": "black", "line-width": 2, ...l }), d = !1, y.geometry.coordinates[0].push(P.lngLat.toArray()), e.getSource(i).setData(y), e.on("mousemove", te), e.on("contextmenu", J), E(!0), e.dragRotate.enable();
2232
2202
  }
2233
2203
  }, Y = () => {
2234
2204
  e.on("mousedown", U), e.on("mouseup", V), e.on("mousemove", B), e.on("mouseover", ne), e.on("mouseout", ie);
2235
2205
  }, R = () => {
2236
- I(), ee(), e.addSource(i, { type: "geojson", data: y }), _e(e, i, i, l), xe(e, i + "outline", i, { "line-color": "black", "line-width": 2, ...l });
2237
- }, q = (P, O) => {
2238
- const N = pe([P.lng, P.lat]), T = O / 2 / 111320, ue = ot(It(N, T, { units: "degrees" }));
2239
- return Lr(ue);
2240
- }, se = (P, O) => {
2241
- const N = q(P, O);
2206
+ O(), ee(), e.addSource(i, { type: "geojson", data: y }), Se(e, i, i, l), xe(e, i + "outline", i, { "line-color": "black", "line-width": 2, ...l });
2207
+ }, q = (P, I) => {
2208
+ const N = pe([P.lng, P.lat]), T = I / 2 / 111320, ce = ot(Ot(N, T, { units: "degrees" }));
2209
+ return Lr(ce);
2210
+ }, se = (P, I) => {
2211
+ const N = q(P, I);
2242
2212
  y.geometry = N.geometry, e.getSource(i).setData(y);
2243
2213
  }, H = () => {
2244
2214
  const P = i, N = e.getSource(P).serialize().data;
@@ -2250,11 +2220,11 @@ function Xr(e, r, n, o, a) {
2250
2220
  }, Q = () => {
2251
2221
  e.off("mousedown", U), e.off("mouseup", V), e.off("mousemove", B), e.off("mouseover", ne), e.off("mouseout", ie);
2252
2222
  }, k = (P) => {
2253
- let O = re(P);
2254
- const N = Ze(O.geometry.coordinates[0]), T = at(N, { sharpness: 0.6 });
2255
- return O.geometry.coordinates[0] = T.geometry.coordinates, O;
2256
- }, I = () => {
2257
- i = w(), u.push(i), c.push(i);
2223
+ let I = re(P);
2224
+ const N = Ze(I.geometry.coordinates[0]), T = at(N, { sharpness: 0.6 });
2225
+ return I.geometry.coordinates[0] = T.geometry.coordinates, I;
2226
+ }, O = () => {
2227
+ i = w(), c.push(i), u.push(i);
2258
2228
  }, w = () => {
2259
2229
  let P = (/* @__PURE__ */ new Date()).getTime();
2260
2230
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(N) {
@@ -2271,7 +2241,7 @@ function Xr(e, r, n, o, a) {
2271
2241
  M(P);
2272
2242
  break;
2273
2243
  case "line":
2274
- S(P);
2244
+ _(P);
2275
2245
  break;
2276
2246
  case "polygon":
2277
2247
  D(P);
@@ -2286,9 +2256,9 @@ function Xr(e, r, n, o, a) {
2286
2256
  h.geometry.coordinates.length && (h.geometry.coordinates.length == 1 && h.geometry.coordinates.push(P.lngLat.toArray()), h.geometry.coordinates[h.geometry.coordinates.length - 1] = P.lngLat.toArray(), e.getSource(i).setData(h));
2287
2257
  break;
2288
2258
  case "polygon":
2289
- const O = y.geometry.coordinates[0].length;
2290
- if (O) {
2291
- O == 2 ? y.geometry.coordinates[0][O - 1] = P.lngLat.toArray() : y.geometry.coordinates[0][O - 2] = P.lngLat.toArray();
2259
+ const I = y.geometry.coordinates[0].length;
2260
+ if (I) {
2261
+ I == 2 ? y.geometry.coordinates[0][I - 1] = P.lngLat.toArray() : y.geometry.coordinates[0][I - 2] = P.lngLat.toArray();
2292
2262
  const T = e.getSource(i);
2293
2263
  T.setData(y), p && y.geometry.coordinates[0].length >= 3 && T.setData(k(y));
2294
2264
  }
@@ -2299,31 +2269,27 @@ function Xr(e, r, n, o, a) {
2299
2269
  }
2300
2270
  }, B = (P) => {
2301
2271
  se(P.lngLat, F), X && $();
2302
- }, $ = x(H, 0), J = (P) => {
2272
+ }, $ = g(H, 0), J = (P) => {
2303
2273
  P.preventDefault(), e.off("mousemove", te), e.off("contextmenu", J), d = !0, m.push(P.point), E(!1), e.dragRotate.disable();
2304
- const O = e.getSource(i);
2274
+ const I = e.getSource(i);
2305
2275
  switch (s) {
2306
2276
  case "line":
2307
- h.geometry.coordinates.length && O.setData(re(h));
2277
+ h.geometry.coordinates.length && I.setData(re(h));
2308
2278
  break;
2309
2279
  case "polygon":
2310
2280
  if (y.geometry.coordinates[0].length) {
2311
2281
  const N = y.geometry.coordinates[0].length;
2312
- y.geometry.coordinates[0].splice(N - 2, 1), O.setData(re(y));
2282
+ y.geometry.coordinates[0].splice(N - 2, 1), I.setData(re(y));
2313
2283
  }
2314
- z || (e.setLayoutProperty(i, "visibility", "none"), e.setLayoutProperty(i + "outline", "visibility", "none")), e.setLayoutProperty(i + "point", "visibility", "none"), p && O.setData(re(k(y)));
2284
+ z || (e.setLayoutProperty(i, "visibility", "none"), e.setLayoutProperty(i + "outline", "visibility", "none")), e.setLayoutProperty(i + "point", "visibility", "none"), p && I.setData(re(k(y)));
2315
2285
  break;
2316
2286
  case "free":
2317
2287
  if (y.geometry.coordinates[0].length) {
2318
2288
  const N = y.geometry.coordinates[0].length;
2319
- if (y.geometry.coordinates[0].splice(N - 2, 1), O.setData(re(y)), Er(m)) {
2320
- alert("落区自相交,请重画"), u.pop(), c.pop(), e.removeLayer(i), e.removeLayer(i + "outline");
2321
- return;
2322
- }
2323
- if (z || (e.setLayoutProperty(i, "visibility", "none"), e.setLayoutProperty(i + "outline", "visibility", "none")), p) {
2324
- const T = [...m.slice(m.length / 5), ...m.slice(0, m.length / 5), m.slice(m.length / 5)[0]], ue = T.length > 10 ? 5 : 3, ce = Math.ceil(T.length / ue), Te = [];
2325
- for (let fe = 0; fe < T.length; fe += ce)
2326
- Te.push(T.slice(fe, fe + ce));
2289
+ if (y.geometry.coordinates[0].splice(N - 2, 1), I.setData(re(y)), z || (e.setLayoutProperty(i, "visibility", "none"), e.setLayoutProperty(i + "outline", "visibility", "none")), p) {
2290
+ const T = [...m.slice(m.length / 5), ...m.slice(0, m.length / 5), m.slice(m.length / 5)[0]], ce = T.length > 10 ? 5 : 3, ue = Math.ceil(T.length / ce), Te = [];
2291
+ for (let fe = 0; fe < T.length; fe += ue)
2292
+ Te.push(T.slice(fe, fe + ue));
2327
2293
  let Me = [];
2328
2294
  Te.forEach((fe) => {
2329
2295
  if (fe.length > 1) {
@@ -2336,7 +2302,7 @@ function Xr(e, r, n, o, a) {
2336
2302
  const yt = e.unproject(Me[fe]);
2337
2303
  y.geometry.coordinates[0].push(yt.toArray());
2338
2304
  }
2339
- O.setData(re(y));
2305
+ I.setData(re(y));
2340
2306
  }
2341
2307
  }
2342
2308
  break;
@@ -2351,31 +2317,31 @@ function Xr(e, r, n, o, a) {
2351
2317
  }, ie = () => {
2352
2318
  e.getLayer(i) && e.removeLayer(i), e.getLayer(i + "outline") && e.removeLayer(i + "outline"), e.getSource(i) && e.removeSource(i);
2353
2319
  }, Z = () => {
2354
- const P = u, O = [];
2320
+ const P = c, I = [];
2355
2321
  return P.forEach((N, T) => {
2356
2322
  if (e.getSource(N)) {
2357
- const ce = e.getSource(N).serialize().data;
2358
- ce.features ? (ce.features[0].properties.layerId = N, ce.features[0].properties.sourceId = c[T], O.push(...ce.features)) : (ce.properties.layerId = N, ce.properties.sourceId = c[T], O.push(ce));
2323
+ const ue = e.getSource(N).serialize().data;
2324
+ ue.features ? (ue.features[0].properties.layerId = N, ue.features[0].properties.sourceId = u[T], I.push(...ue.features)) : (ue.properties.layerId = N, ue.properties.sourceId = u[T], I.push(ue));
2359
2325
  }
2360
- }), O;
2326
+ }), I;
2361
2327
  }, oe = () => {
2362
- u.forEach((P) => {
2328
+ c.forEach((P) => {
2363
2329
  e.getLayer(P) && e.removeLayer(P), e.getLayer(P + "outline") && e.removeLayer(P + "outline"), e.getLayer(P + "point") && e.removeLayer(P + "point"), e.getLayer(P + "text") && e.removeLayer(P + "text");
2364
- }), c.forEach((P) => {
2330
+ }), u.forEach((P) => {
2365
2331
  e.getSource(P) && e.removeSource(P), e.getSource(P + "point") && e.removeSource(P + "point"), e.getSource(P + "text") && e.removeSource(P + "text");
2366
- }), u.length = 0, c.length = 0;
2332
+ }), c.length = 0, u.length = 0;
2367
2333
  }, ee = () => {
2368
2334
  m.length = 0, f.features.length = 0, h.geometry.coordinates.length = 0, y.geometry.coordinates.length = 0, y.geometry.coordinates[0] = [], y.properties.result = "";
2369
- }, te = x(G, 30), ae = () => {
2335
+ }, te = g(G, 30), ae = () => {
2370
2336
  Q(), e.off("click", C), e.off("mousemove", te), e.off("contextmenu", J), e.getCanvas().style.cursor = "pointer", E(!1);
2371
2337
  }, ye = () => {
2372
- (s == "free" || s == "polygon" || s == "point" || s == "line") && u.length && (e.removeLayer(u[u.length - 1]), e.getLayer(u[u.length - 1] + "outline") && e.removeLayer(u[u.length - 1] + "outline"), e.getLayer(u[u.length - 1] + "point") && e.removeLayer(u[u.length - 1] + "point"), u.pop());
2338
+ (s == "free" || s == "polygon" || s == "point" || s == "line") && c.length && (e.removeLayer(c[c.length - 1]), e.getLayer(c[c.length - 1] + "outline") && e.removeLayer(c[c.length - 1] + "outline"), e.getLayer(c[c.length - 1] + "point") && e.removeLayer(c[c.length - 1] + "point"), c.pop());
2373
2339
  }, we = () => {
2374
- if ((s == "free" || s == "polygon") && c.length) {
2375
- const P = u.length - c.length, O = c.slice(P);
2376
- if (P !== 0 && O.length) {
2377
- const ue = e.getSource(O[0]).serialize().data.valueOf();
2378
- e.getLayer(O[0]) || (u.push(O[0]), _e(e, O[0], O[0], { "fill-color": ue.properties["fill-color"] }), xe(e, O[0] + "outline", O[0], { "line-color": "black", "line-width": 2, ...ue.properties }));
2340
+ if ((s == "free" || s == "polygon") && u.length) {
2341
+ const P = c.length - u.length, I = u.slice(P);
2342
+ if (P !== 0 && I.length) {
2343
+ const ce = e.getSource(I[0]).serialize().data.valueOf();
2344
+ e.getLayer(I[0]) || (c.push(I[0]), Se(e, I[0], I[0], { "fill-color": ce.properties["fill-color"] }), xe(e, I[0] + "outline", I[0], { "line-color": "black", "line-width": 2, ...ce.properties }));
2379
2345
  }
2380
2346
  }
2381
2347
  };
@@ -2383,30 +2349,30 @@ function Xr(e, r, n, o, a) {
2383
2349
  const He = (P) => {
2384
2350
  qe = P;
2385
2351
  };
2386
- let Se, Ee = !1, Le = "";
2352
+ let _e, Ee = !1, Le = "";
2387
2353
  e.on("mousedown", (P) => {
2388
- const O = e.queryRenderedFeatures(P.point);
2389
- O.length > 0 && (Le = O[0].layer.source, qe && Ne(P));
2354
+ const I = e.queryRenderedFeatures(P.point);
2355
+ I.length > 0 && (Le = I[0].layer.source, qe && Ne(P));
2390
2356
  });
2391
2357
  const Ne = (P) => {
2392
- e.dragPan.disable(), Se = P.lngLat, Ee = !0, e.on("mouseup", Pe), e.on("mousemove", ht), a && a();
2358
+ e.dragPan.disable(), _e = P.lngLat, Ee = !0, e.on("mouseup", Pe), e.on("mousemove", ht), a && a();
2393
2359
  }, Pe = () => {
2394
2360
  if (Ee = !1, e.off("mouseup", Pe), e.off("mousemove", ht), e.dragPan.enable(), o) {
2395
- const O = e.getSource(Le).serialize().data;
2396
- o(O);
2361
+ const I = e.getSource(Le).serialize().data;
2362
+ o(I);
2397
2363
  }
2398
2364
  }, ht = (P) => {
2399
2365
  if (!Ee)
2400
2366
  return;
2401
- const O = P.lngLat, N = O.lng - Se.lng, T = O.lat - Se.lat;
2402
- Se = O;
2403
- const ue = e.getSource(Le), ce = ue.serialize().data;
2404
- ce.geometry.coordinates = ce.geometry.coordinates.map((Te) => Te.map((Me) => [Me[0] + N, Me[1] + T])), ue.setData(ce);
2367
+ const I = P.lngLat, N = I.lng - _e.lng, T = I.lat - _e.lat;
2368
+ _e = I;
2369
+ const ce = e.getSource(Le), ue = ce.serialize().data;
2370
+ ue.geometry.coordinates = ue.geometry.coordinates.map((Te) => Te.map((Me) => [Me[0] + N, Me[1] + T])), ce.setData(ue);
2405
2371
  };
2406
- return { startDraw: _, revoke: ye, redo: we, getFeaturesFromDraw: Z, clearDraw: oe, stopDraw: ae, setBrushSize: K, setValue: W, setDrawMethod: v, setDragMode: He };
2372
+ return { startDraw: S, revoke: ye, redo: we, getFeaturesFromDraw: Z, clearDraw: oe, stopDraw: ae, setBrushSize: K, setValue: W, setDrawMethod: v, setDragMode: He };
2407
2373
  }
2408
- function Yr(e, r) {
2409
- let n = "free", o = "", a = [], s = [], i = {}, u = !1, c = !0, l = !0, g = !1, d = [], p = {
2374
+ function Ar(e, r) {
2375
+ let n = "free", o = "", a = [], s = [], i = {}, c = !1, u = !0, l = !0, x = !1, d = [], p = {
2410
2376
  type: "FeatureCollection",
2411
2377
  features: []
2412
2378
  }, z = {
@@ -2432,9 +2398,9 @@ function Yr(e, r) {
2432
2398
  }
2433
2399
  };
2434
2400
  const F = (w) => {
2435
- e.off("click", D), e.off("mousemove", I), e.off("contextmenu", Y), Q(), u && (c = !0, S(!1)), u = !0, n = w.type || "point", l = w.measure || !1, g = w.smooth || !1, i = w, z.properties = w, m.properties = w, b.properties = w, e.on("click", D), e.getCanvas().style.cursor = "crosshair";
2401
+ e.off("click", D), e.off("mousemove", O), e.off("contextmenu", Y), Q(), c && (u = !0, _(!1)), c = !0, n = w.type || "point", l = w.measure || !1, x = w.smooth || !1, i = w, z.properties = w, m.properties = w, b.properties = w, e.on("click", D), e.getCanvas().style.cursor = "crosshair";
2436
2402
  }, X = (w) => {
2437
- v(), Q(), e.addSource(o, { type: "geojson", data: p }), ze(e, o, o, i), Ie(e, o + "text", o, { visibility: l }), p.features.push({
2403
+ v(), Q(), e.addSource(o, { type: "geojson", data: p }), ze(e, o, o, i), Oe(e, o + "text", o, { visibility: l }), p.features.push({
2438
2404
  type: "Feature",
2439
2405
  properties: i,
2440
2406
  geometry: { type: "Point", coordinates: w.lngLat.toArray() }
@@ -2446,24 +2412,24 @@ function Yr(e, r) {
2446
2412
  geometry: { type: "Point", coordinates: w.lngLat.toArray() }
2447
2413
  }), e.getSource(o).setData(re(p)), r && r(R());
2448
2414
  }, h = (w) => {
2449
- c && (v(), Q(), e.addSource(o, { type: "geojson", data: z }), e.addSource(o + "text", { type: "geojson", data: p }), xe(e, o, o), ze(e, o + "point", o, i), Ie(e, o + "text", o + "text", { visibility: l }), c = !1, e.on("mousemove", I), e.on("contextmenu", Y)), z.geometry.coordinates.push(w.lngLat.toArray()), e.getSource(o).setData(z), p.features.push({
2415
+ u && (v(), Q(), e.addSource(o, { type: "geojson", data: z }), e.addSource(o + "text", { type: "geojson", data: p }), xe(e, o, o), ze(e, o + "point", o, i), Oe(e, o + "text", o + "text", { visibility: l }), u = !1, e.on("mousemove", O), e.on("contextmenu", Y)), z.geometry.coordinates.push(w.lngLat.toArray()), e.getSource(o).setData(z), p.features.push({
2450
2416
  type: "Feature",
2451
2417
  properties: {},
2452
2418
  geometry: { type: "Point", coordinates: w.lngLat.toArray() }
2453
2419
  }), e.getSource(o + "text").setData(p);
2454
2420
  }, y = (w) => {
2455
- c && (v(), Q(), e.addSource(o, { type: "geojson", data: m }), e.addSource(o + "area", { type: "geojson", data: b }), _e(e, o, o), xe(e, o + "outline", o, { "line-color": "black", "line-width": 2, ...i }), ze(e, o + "point", o), Ie(e, o + "area", o + "area", { visibility: l }), c = !1, e.on("mousemove", I), e.on("contextmenu", Y)), m.geometry.coordinates[0].length >= 3 && m.geometry.coordinates[0].pop(), m.geometry.coordinates[0].push(w.lngLat.toArray()), m.geometry.coordinates[0].push(m.geometry.coordinates[0][0]), d.push(w.point), e.getSource(o).setData(m), S(!0);
2456
- }, x = (w) => {
2457
- c && (v(), Q(), e.addSource(o, { type: "geojson", data: m }), e.addSource(o + "area", { type: "geojson", data: b }), _e(e, o, o, i), xe(e, o + "outline", o, { "line-color": "black", "line-width": 2, ...i }), Ie(e, o + "area", o + "area", { visibility: l }), c = !1, m.geometry.coordinates[0].push(w.lngLat.toArray()), e.getSource(o).setData(m), e.on("mousemove", I), e.on("contextmenu", Y), S(!0));
2458
- }, _ = (w) => {
2459
- if (c) {
2460
- v(), Q(), e.addSource(o, { type: "geojson", data: m }), e.addSource(o + "area", { type: "geojson", data: b }), e.addSource(o + "point", { type: "geojson", data: p }), _e(e, o, o, i), xe(e, o + "outline", o, { "line-color": "black", "line-width": 2, ...i }), ze(e, o + "point", o + "point"), Ie(e, o + "area", o + "area", { visibility: l }), c = !1;
2421
+ u && (v(), Q(), e.addSource(o, { type: "geojson", data: m }), e.addSource(o + "area", { type: "geojson", data: b }), Se(e, o, o), xe(e, o + "outline", o, { "line-color": "black", "line-width": 2, ...i }), ze(e, o + "point", o), Oe(e, o + "area", o + "area", { visibility: l }), u = !1, e.on("mousemove", O), e.on("contextmenu", Y)), m.geometry.coordinates[0].length >= 3 && m.geometry.coordinates[0].pop(), m.geometry.coordinates[0].push(w.lngLat.toArray()), m.geometry.coordinates[0].push(m.geometry.coordinates[0][0]), d.push(w.point), e.getSource(o).setData(m), _(!0);
2422
+ }, g = (w) => {
2423
+ u && (v(), Q(), e.addSource(o, { type: "geojson", data: m }), e.addSource(o + "area", { type: "geojson", data: b }), Se(e, o, o, i), xe(e, o + "outline", o, { "line-color": "black", "line-width": 2, ...i }), Oe(e, o + "area", o + "area", { visibility: l }), u = !1, m.geometry.coordinates[0].push(w.lngLat.toArray()), e.getSource(o).setData(m), e.on("mousemove", O), e.on("contextmenu", Y), _(!0));
2424
+ }, S = (w) => {
2425
+ if (u) {
2426
+ v(), Q(), e.addSource(o, { type: "geojson", data: m }), e.addSource(o + "area", { type: "geojson", data: b }), e.addSource(o + "point", { type: "geojson", data: p }), Se(e, o, o, i), xe(e, o + "outline", o, { "line-color": "black", "line-width": 2, ...i }), ze(e, o + "point", o + "point"), Oe(e, o + "area", o + "area", { visibility: l }), u = !1;
2461
2427
  const E = {
2462
2428
  type: "Feature",
2463
2429
  properties: {},
2464
2430
  geometry: { type: "Point", coordinates: w.lngLat.toArray() }
2465
2431
  };
2466
- p.features.push(re(E)), p.features.push(re(E)), b.geometry.coordinates = w.lngLat.toArray(), e.getSource(o + "point").setData(p), e.on("mousemove", I), e.on("contextmenu", Y), S(!0);
2432
+ p.features.push(re(E)), p.features.push(re(E)), b.geometry.coordinates = w.lngLat.toArray(), e.getSource(o + "point").setData(p), e.on("mousemove", O), e.on("contextmenu", Y), _(!0);
2467
2433
  }
2468
2434
  }, v = () => {
2469
2435
  o = M(), a.push(o), s.push(o);
@@ -2473,7 +2439,7 @@ function Yr(e, r) {
2473
2439
  const G = (w + Math.random() * 16) % 16 | 0;
2474
2440
  return w = Math.floor(w / 16), (C === "x" ? G : G & 3 | 8).toString(16);
2475
2441
  });
2476
- }, S = (w) => {
2442
+ }, _ = (w) => {
2477
2443
  ["scrollZoom", "boxZoom", "dragPan", "keyboard", "doubleClickZoom", "touchZoomRotate"].forEach((C) => {
2478
2444
  w ? e[C].disable() : e[C].enable();
2479
2445
  });
@@ -2492,10 +2458,10 @@ function Yr(e, r) {
2492
2458
  y(w);
2493
2459
  break;
2494
2460
  case "free":
2495
- x(w);
2461
+ g(w);
2496
2462
  break;
2497
2463
  case "circle":
2498
- _(w);
2464
+ S(w);
2499
2465
  break;
2500
2466
  }
2501
2467
  }, A = (w) => {
@@ -2513,11 +2479,11 @@ function Yr(e, r) {
2513
2479
  V == 2 ? m.geometry.coordinates[0][V - 1] = w.lngLat.toArray() : m.geometry.coordinates[0][V - 2] = w.lngLat.toArray();
2514
2480
  const ie = tt(m) / 1e6;
2515
2481
  if (V >= 4) {
2516
- var E = Re(m.geometry.coordinates), C = ut(E);
2482
+ var E = Re(m.geometry.coordinates), C = ct(E);
2517
2483
  b.geometry.coordinates = C.geometry.coordinates, b.properties.result = $e(ie, 2) + "km²";
2518
2484
  }
2519
2485
  const Z = e.getSource(o);
2520
- Z.setData(m), e.getSource(o + "area").setData(b), g && m.geometry.coordinates[0].length >= 3 && Z.setData(q(m));
2486
+ Z.setData(m), e.getSource(o + "area").setData(b), x && m.geometry.coordinates[0].length >= 3 && Z.setData(q(m));
2521
2487
  }
2522
2488
  break;
2523
2489
  case "free":
@@ -2526,7 +2492,7 @@ function Yr(e, r) {
2526
2492
  d.push(w.point), m.geometry.coordinates[0].length != 1 && m.geometry.coordinates[0].pop(), m.geometry.coordinates[0].push(w.lngLat.toArray()), m.geometry.coordinates[0].push(m.geometry.coordinates[0][0]);
2527
2493
  const ie = tt(m) / 1e6;
2528
2494
  if (ne >= 4) {
2529
- var E = Re(m.geometry.coordinates), C = ut(E);
2495
+ var E = Re(m.geometry.coordinates), C = ct(E);
2530
2496
  b.geometry.coordinates = C.geometry.coordinates, b.properties.result = $e(ie, 2) + "km²";
2531
2497
  }
2532
2498
  e.getSource(o).setData(m), e.getSource(o + "area").setData(b);
@@ -2535,7 +2501,7 @@ function Yr(e, r) {
2535
2501
  case "circle":
2536
2502
  if (p.features.length) {
2537
2503
  p.features[1].geometry.coordinates = w.lngLat.toArray();
2538
- var G = pe(p.features[0].geometry.coordinates), B = pe(p.features[1].geometry.coordinates), $ = st(G, B, { units: "miles" }), J = { steps: 500, units: "miles", properties: { foo: "bar" } }, U = It(G, $, J);
2504
+ var G = pe(p.features[0].geometry.coordinates), B = pe(p.features[1].geometry.coordinates), $ = st(G, B, { units: "miles" }), J = { steps: 500, units: "miles", properties: { foo: "bar" } }, U = Ot(G, $, J);
2539
2505
  m.geometry.coordinates = U.geometry.coordinates;
2540
2506
  const ie = tt(m) / 1e6;
2541
2507
  b.properties.result = $e(ie, 2) + "km²";
@@ -2545,17 +2511,17 @@ function Yr(e, r) {
2545
2511
  break;
2546
2512
  }
2547
2513
  }, Y = (w) => {
2548
- w.preventDefault(), e.off("mousemove", I), e.off("contextmenu", Y), c = !0, d.push(w.point), S(!1);
2514
+ w.preventDefault(), e.off("mousemove", O), e.off("contextmenu", Y), u = !0, d.push(w.point), _(!1);
2549
2515
  const E = e.getSource(o);
2550
2516
  switch (n) {
2551
2517
  case "line":
2552
- z.geometry.coordinates.length && (console.log(z), E.setData(re(z)), e.removeLayer(o + "point"), g && z.geometry.coordinates.length >= 2 && E.setData(se(z)));
2518
+ z.geometry.coordinates.length && (console.log(z), E.setData(re(z)), e.removeLayer(o + "point"), x && z.geometry.coordinates.length >= 2 && E.setData(se(z)));
2553
2519
  break;
2554
2520
  case "polygon":
2555
- m.geometry.coordinates[0].length && E.setData(re(m)), e.setLayoutProperty(o + "point", "visibility", "none"), g && E.setData(re(q(m)));
2521
+ m.geometry.coordinates[0].length && E.setData(re(m)), e.setLayoutProperty(o + "point", "visibility", "none"), x && E.setData(re(q(m)));
2556
2522
  break;
2557
2523
  case "free":
2558
- if (m.geometry.coordinates[0].length && (E.setData(re(m)), g)) {
2524
+ if (m.geometry.coordinates[0].length && (E.setData(re(m)), x)) {
2559
2525
  const C = [...d.slice(d.length / 5), ...d.slice(0, d.length / 5), d.slice(d.length / 5)[0]], G = C.length > 10 ? 5 : 3, B = Math.ceil(C.length / G), $ = [];
2560
2526
  for (let U = 0; U < C.length; U += B)
2561
2527
  $.push(C.slice(U, U + B));
@@ -2603,10 +2569,10 @@ function Yr(e, r) {
2603
2569
  e.removeSource(w), e.getSource(w + "point") && e.removeSource(w + "point"), e.getSource(w + "text") && e.removeSource(w + "text"), e.getSource(w + "area") && e.removeSource(w + "area");
2604
2570
  }), a.length = 0, s.length = 0;
2605
2571
  }, W = () => {
2606
- e.off("click", D), e.off("mousemove", I), e.off("contextmenu", Y), e.getCanvas().style.cursor = "pointer", S(!1);
2572
+ e.off("click", D), e.off("mousemove", O), e.off("contextmenu", Y), e.getCanvas().style.cursor = "pointer", _(!1);
2607
2573
  }, Q = () => {
2608
2574
  d.length = 0, p.features.length = 0, z.geometry.coordinates.length = 0, m.geometry.coordinates.length = 0, m.geometry.coordinates[0] = [], m.properties.result = "", b.geometry.coordinates.length = 0;
2609
- }, I = ((w, E) => {
2575
+ }, O = ((w, E) => {
2610
2576
  let C = 0;
2611
2577
  return function(...G) {
2612
2578
  const B = (/* @__PURE__ */ new Date()).getTime();
@@ -2616,6 +2582,6 @@ function Yr(e, r) {
2616
2582
  return { startMeasure: F, clearMeasure: K, stopMeasure: W, getFeaturesFromMeasure: R, clearLayerById: H };
2617
2583
  }
2618
2584
  export {
2619
- Xr as draw,
2620
- Yr as measure
2585
+ Er as draw,
2586
+ Ar as measure
2621
2587
  };