@maptiler/sdk 3.5.1-rc5 → 3.5.1-rc6

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.
@@ -3608,7 +3608,7 @@ class Nr {
3608
3608
  return this.bindings[e] ? !0 : this.parent ? this.parent.has(e) : !1;
3609
3609
  }
3610
3610
  }
3611
- const Ot = { kind: "null" }, w = { kind: "number" }, I = { kind: "string" }, _ = { kind: "boolean" }, de = { kind: "color" }, jt = { kind: "projectionDefinition" }, Re = { kind: "object" }, T = { kind: "value" }, Ki = { kind: "error" }, Nt = { kind: "collator" }, Dt = { kind: "formatted" }, Ut = { kind: "padding" }, nt = { kind: "colorArray" }, Bt = { kind: "numberArray" }, ft = { kind: "resolvedImage" }, qt = { kind: "variableAnchorOffsetCollection" };
3611
+ const Ot = { kind: "null" }, b = { kind: "number" }, I = { kind: "string" }, _ = { kind: "boolean" }, de = { kind: "color" }, jt = { kind: "projectionDefinition" }, Re = { kind: "object" }, T = { kind: "value" }, Ki = { kind: "error" }, Nt = { kind: "collator" }, Dt = { kind: "formatted" }, Ut = { kind: "padding" }, nt = { kind: "colorArray" }, Bt = { kind: "numberArray" }, ft = { kind: "resolvedImage" }, qt = { kind: "variableAnchorOffsetCollection" };
3612
3612
  function W(r, e) {
3613
3613
  return {
3614
3614
  kind: "array",
@@ -3625,7 +3625,7 @@ function j(r) {
3625
3625
  }
3626
3626
  const Xi = [
3627
3627
  Ot,
3628
- w,
3628
+ b,
3629
3629
  I,
3630
3630
  _,
3631
3631
  de,
@@ -3764,7 +3764,7 @@ function rs(r) {
3764
3764
  // ,|/ (optional)
3765
3765
  m,
3766
3766
  // <numeric> (optional)
3767
- b
3767
+ w
3768
3768
  // % (optional)
3769
3769
  ] = o, v = [u || " ", f || " ", y].join("");
3770
3770
  if (v === " " || v === " /" || v === ",," || v === ",,,") {
@@ -3774,7 +3774,7 @@ function rs(r) {
3774
3774
  Ue(+s / A, 0, 1),
3775
3775
  Ue(+c / A, 0, 1),
3776
3776
  Ue(+d / A, 0, 1),
3777
- m ? kn(+m, b) : 1
3777
+ m ? kn(+m, w) : 1
3778
3778
  ];
3779
3779
  if (Cn(L))
3780
3780
  return L;
@@ -4094,13 +4094,13 @@ class F {
4094
4094
  let x = u - o;
4095
4095
  u > o && x > 180 ? x -= 360 : u < o && o - u > 180 && (x += 360), d = o + n * x;
4096
4096
  } else isNaN(o) ? isNaN(u) ? d = NaN : (d = u, (s === 1 || s === 0) && (h = c)) : (d = o, (p === 1 || p === 0) && (h = i));
4097
- const [y, m, b, v] = Qi([
4097
+ const [y, m, w, v] = Qi([
4098
4098
  d,
4099
4099
  h ?? Le(i, c, n),
4100
4100
  Le(s, p, n),
4101
4101
  Le(l, f, n)
4102
4102
  ]);
4103
- return new F(y, m, b, v, !1);
4103
+ return new F(y, m, w, v, !1);
4104
4104
  }
4105
4105
  case "lab": {
4106
4106
  const [o, i, s, l] = Sa(Ve(e.lab, t.lab, n));
@@ -4354,7 +4354,7 @@ function B(r) {
4354
4354
  if (typeof r == "boolean")
4355
4355
  return _;
4356
4356
  if (typeof r == "number")
4357
- return w;
4357
+ return b;
4358
4358
  if (r instanceof F)
4359
4359
  return de;
4360
4360
  if (r instanceof ie)
@@ -4420,7 +4420,7 @@ class He {
4420
4420
  }
4421
4421
  const wt = {
4422
4422
  string: I,
4423
- number: w,
4423
+ number: b,
4424
4424
  boolean: _,
4425
4425
  object: Re
4426
4426
  };
@@ -4483,7 +4483,7 @@ class se {
4483
4483
  const Ln = {
4484
4484
  "to-boolean": _,
4485
4485
  "to-color": de,
4486
- "to-number": w,
4486
+ "to-number": b,
4487
4487
  "to-string": I
4488
4488
  };
4489
4489
  class ke {
@@ -4765,7 +4765,7 @@ class Br {
4765
4765
  static parse(e, t) {
4766
4766
  if (e.length !== 3)
4767
4767
  return t.error(`Expected 2 arguments, but found ${e.length - 1} instead.`);
4768
- const n = t.parse(e[1], 1, w), a = t.parse(e[2], 2, W(t.expectedType || T));
4768
+ const n = t.parse(e[1], 1, b), a = t.parse(e[2], 2, W(t.expectedType || T));
4769
4769
  if (!n || !a)
4770
4770
  return null;
4771
4771
  const o = a.type;
@@ -4796,7 +4796,7 @@ class qr {
4796
4796
  if (e.length !== 3)
4797
4797
  return t.error(`Expected 2 arguments, but found ${e.length - 1} instead.`);
4798
4798
  const n = t.parse(e[1], 1, T), a = t.parse(e[2], 2, T);
4799
- return !n || !a ? null : Dr(n.type, [_, I, w, Ot, T]) ? new qr(n, a) : t.error(`Expected first argument to be of type boolean, string, number or null, but found ${j(n.type)} instead`);
4799
+ return !n || !a ? null : Dr(n.type, [_, I, b, Ot, T]) ? new qr(n, a) : t.error(`Expected first argument to be of type boolean, string, number or null, but found ${j(n.type)} instead`);
4800
4800
  }
4801
4801
  evaluate(e) {
4802
4802
  const t = this.needle.evaluate(e), n = this.haystack.evaluate(e);
@@ -4817,7 +4817,7 @@ class qr {
4817
4817
  }
4818
4818
  class Tt {
4819
4819
  constructor(e, t, n) {
4820
- this.type = w, this.needle = e, this.haystack = t, this.fromIndex = n;
4820
+ this.type = b, this.needle = e, this.haystack = t, this.fromIndex = n;
4821
4821
  }
4822
4822
  static parse(e, t) {
4823
4823
  if (e.length <= 2 || e.length >= 5)
@@ -4825,10 +4825,10 @@ class Tt {
4825
4825
  const n = t.parse(e[1], 1, T), a = t.parse(e[2], 2, T);
4826
4826
  if (!n || !a)
4827
4827
  return null;
4828
- if (!Dr(n.type, [_, I, w, Ot, T]))
4828
+ if (!Dr(n.type, [_, I, b, Ot, T]))
4829
4829
  return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${j(n.type)} instead`);
4830
4830
  if (e.length === 4) {
4831
- const o = t.parse(e[3], 3, w);
4831
+ const o = t.parse(e[3], 3, b);
4832
4832
  return o ? new Tt(n, a, o) : null;
4833
4833
  } else
4834
4834
  return new Tt(n, a);
@@ -4960,13 +4960,13 @@ class _t {
4960
4960
  static parse(e, t) {
4961
4961
  if (e.length <= 2 || e.length >= 5)
4962
4962
  return t.error(`Expected 3 or 4 arguments, but found ${e.length - 1} instead.`);
4963
- const n = t.parse(e[1], 1, T), a = t.parse(e[2], 2, w);
4963
+ const n = t.parse(e[1], 1, T), a = t.parse(e[2], 2, b);
4964
4964
  if (!n || !a)
4965
4965
  return null;
4966
4966
  if (!Dr(n.type, [W(T), I, T]))
4967
4967
  return t.error(`Expected first argument to be of type array or string, but found ${j(n.type)} instead`);
4968
4968
  if (e.length === 4) {
4969
- const o = t.parse(e[3], 3, w);
4969
+ const o = t.parse(e[3], 3, b);
4970
4970
  return o ? new _t(n.type, n, a, o) : null;
4971
4971
  } else
4972
4972
  return new _t(n.type, n, a);
@@ -5012,7 +5012,7 @@ class Kt {
5012
5012
  return t.error(`Expected at least 4 arguments, but found only ${e.length - 1}.`);
5013
5013
  if ((e.length - 1) % 2 !== 0)
5014
5014
  return t.error("Expected an even number of arguments.");
5015
- const n = t.parse(e[1], 1, w);
5015
+ const n = t.parse(e[1], 1, b);
5016
5016
  if (!n)
5017
5017
  return null;
5018
5018
  const a = [];
@@ -5140,7 +5140,7 @@ class he {
5140
5140
  return t.error(`Expected at least 4 arguments, but found only ${e.length - 1}.`);
5141
5141
  if ((e.length - 1) % 2 !== 0)
5142
5142
  return t.error("Expected an even number of arguments.");
5143
- if (o = t.parse(o, 2, w), !o)
5143
+ if (o = t.parse(o, 2, b), !o)
5144
5144
  return null;
5145
5145
  const s = [];
5146
5146
  let l = null;
@@ -5156,7 +5156,7 @@ class he {
5156
5156
  return null;
5157
5157
  l = l || h.type, s.push([c, h]);
5158
5158
  }
5159
- return !we(l, w) && !we(l, jt) && !we(l, de) && !we(l, Ut) && !we(l, Bt) && !we(l, nt) && !we(l, qt) && !we(l, W(w)) ? t.error(`Type ${j(l)} is not interpolatable.`) : new he(l, n, a, o, s);
5159
+ return !we(l, b) && !we(l, jt) && !we(l, de) && !we(l, Ut) && !we(l, Bt) && !we(l, nt) && !we(l, qt) && !we(l, W(b)) ? t.error(`Type ${j(l)} is not interpolatable.`) : new he(l, n, a, o, s);
5160
5160
  }
5161
5161
  evaluate(e) {
5162
5162
  const t = this.labels, n = this.outputs;
@@ -5384,7 +5384,7 @@ class Hr {
5384
5384
  static parse(e, t) {
5385
5385
  if (e.length !== 3)
5386
5386
  return t.error("Expected two arguments.");
5387
- const n = t.parse(e[1], 1, w);
5387
+ const n = t.parse(e[1], 1, b);
5388
5388
  if (!n)
5389
5389
  return null;
5390
5390
  const a = e[2];
@@ -5397,10 +5397,10 @@ class Hr {
5397
5397
  if (a.currency && (i = t.parse(a.currency, 1, I), !i))
5398
5398
  return null;
5399
5399
  let s = null;
5400
- if (a["min-fraction-digits"] && (s = t.parse(a["min-fraction-digits"], 1, w), !s))
5400
+ if (a["min-fraction-digits"] && (s = t.parse(a["min-fraction-digits"], 1, b), !s))
5401
5401
  return null;
5402
5402
  let l = null;
5403
- return a["max-fraction-digits"] && (l = t.parse(a["max-fraction-digits"], 1, w), !l) ? null : new Hr(n, o, i, s, l);
5403
+ return a["max-fraction-digits"] && (l = t.parse(a["max-fraction-digits"], 1, b), !l) ? null : new Hr(n, o, i, s, l);
5404
5404
  }
5405
5405
  evaluate(e) {
5406
5406
  return new Intl.NumberFormat(this.locale ? this.locale.evaluate(e) : [], {
@@ -5434,7 +5434,7 @@ class Kr {
5434
5434
  if (o && typeof s == "object" && !Array.isArray(s)) {
5435
5435
  o = !1;
5436
5436
  let l = null;
5437
- if (s["font-scale"] && (l = t.parse(s["font-scale"], 1, w), !l))
5437
+ if (s["font-scale"] && (l = t.parse(s["font-scale"], 1, b), !l))
5438
5438
  return null;
5439
5439
  let u = null;
5440
5440
  if (s["text-font"] && (u = t.parse(s["text-font"], 1, W(I)), !u))
@@ -5501,7 +5501,7 @@ class Xr {
5501
5501
  }
5502
5502
  class Zr {
5503
5503
  constructor(e) {
5504
- this.type = w, this.input = e;
5504
+ this.type = b, this.input = e;
5505
5505
  }
5506
5506
  static parse(e, t) {
5507
5507
  if (e.length !== 2)
@@ -6001,10 +6001,10 @@ function Zs(r, e, t, n = 1 / 0) {
6001
6001
  const p = s[c], f = s[l];
6002
6002
  for (const d of e)
6003
6003
  for (let h = 0, y = d.length, m = y - 1; h < y; m = h++) {
6004
- const b = d[m], v = d[h];
6005
- if (Zt(p, f, b, v))
6004
+ const w = d[m], v = d[h];
6005
+ if (Zt(p, f, w, v))
6006
6006
  return 0;
6007
- i = Math.min(i, en(p, f, b, v, t));
6007
+ i = Math.min(i, en(p, f, w, v, t));
6008
6008
  }
6009
6009
  }
6010
6010
  return i;
@@ -6171,7 +6171,7 @@ function cr(r) {
6171
6171
  }
6172
6172
  class $e {
6173
6173
  constructor(e, t) {
6174
- this.type = w, this.geojson = e, this.geometries = t;
6174
+ this.type = b, this.geojson = e, this.geometries = t;
6175
6175
  }
6176
6176
  static parse(e, t) {
6177
6177
  if (e.length !== 2)
@@ -6370,7 +6370,7 @@ le.register(tn, {
6370
6370
  (r, [e]) => j(B(e.evaluate(r)))
6371
6371
  ],
6372
6372
  "to-rgba": [
6373
- W(w, 4),
6373
+ W(b, 4),
6374
6374
  [de],
6375
6375
  (r, [e]) => {
6376
6376
  const [t, n, a, o] = e.evaluate(r).rgb;
@@ -6379,12 +6379,12 @@ le.register(tn, {
6379
6379
  ],
6380
6380
  rgb: [
6381
6381
  de,
6382
- [w, w, w],
6382
+ [b, b, b],
6383
6383
  On
6384
6384
  ],
6385
6385
  rgba: [
6386
6386
  de,
6387
- [w, w, w, w],
6387
+ [b, b, b, b],
6388
6388
  On
6389
6389
  ],
6390
6390
  has: {
@@ -6434,22 +6434,22 @@ le.register(tn, {
6434
6434
  (r) => r.id()
6435
6435
  ],
6436
6436
  zoom: [
6437
- w,
6437
+ b,
6438
6438
  [],
6439
6439
  (r) => r.globals.zoom
6440
6440
  ],
6441
6441
  "heatmap-density": [
6442
- w,
6442
+ b,
6443
6443
  [],
6444
6444
  (r) => r.globals.heatmapDensity || 0
6445
6445
  ],
6446
6446
  elevation: [
6447
- w,
6447
+ b,
6448
6448
  [],
6449
6449
  (r) => r.globals.elevation || 0
6450
6450
  ],
6451
6451
  "line-progress": [
6452
- w,
6452
+ b,
6453
6453
  [],
6454
6454
  (r) => r.globals.lineProgress || 0
6455
6455
  ],
@@ -6459,8 +6459,8 @@ le.register(tn, {
6459
6459
  (r) => r.globals.accumulated === void 0 ? null : r.globals.accumulated
6460
6460
  ],
6461
6461
  "+": [
6462
- w,
6463
- Ie(w),
6462
+ b,
6463
+ Ie(b),
6464
6464
  (r, e) => {
6465
6465
  let t = 0;
6466
6466
  for (const n of e)
@@ -6469,8 +6469,8 @@ le.register(tn, {
6469
6469
  }
6470
6470
  ],
6471
6471
  "*": [
6472
- w,
6473
- Ie(w),
6472
+ b,
6473
+ Ie(b),
6474
6474
  (r, e) => {
6475
6475
  let t = 1;
6476
6476
  for (const n of e)
@@ -6479,129 +6479,129 @@ le.register(tn, {
6479
6479
  }
6480
6480
  ],
6481
6481
  "-": {
6482
- type: w,
6482
+ type: b,
6483
6483
  overloads: [
6484
6484
  [
6485
- [w, w],
6485
+ [b, b],
6486
6486
  (r, [e, t]) => e.evaluate(r) - t.evaluate(r)
6487
6487
  ],
6488
6488
  [
6489
- [w],
6489
+ [b],
6490
6490
  (r, [e]) => -e.evaluate(r)
6491
6491
  ]
6492
6492
  ]
6493
6493
  },
6494
6494
  "/": [
6495
- w,
6496
- [w, w],
6495
+ b,
6496
+ [b, b],
6497
6497
  (r, [e, t]) => e.evaluate(r) / t.evaluate(r)
6498
6498
  ],
6499
6499
  "%": [
6500
- w,
6501
- [w, w],
6500
+ b,
6501
+ [b, b],
6502
6502
  (r, [e, t]) => e.evaluate(r) % t.evaluate(r)
6503
6503
  ],
6504
6504
  ln2: [
6505
- w,
6505
+ b,
6506
6506
  [],
6507
6507
  () => Math.LN2
6508
6508
  ],
6509
6509
  pi: [
6510
- w,
6510
+ b,
6511
6511
  [],
6512
6512
  () => Math.PI
6513
6513
  ],
6514
6514
  e: [
6515
- w,
6515
+ b,
6516
6516
  [],
6517
6517
  () => Math.E
6518
6518
  ],
6519
6519
  "^": [
6520
- w,
6521
- [w, w],
6520
+ b,
6521
+ [b, b],
6522
6522
  (r, [e, t]) => Math.pow(e.evaluate(r), t.evaluate(r))
6523
6523
  ],
6524
6524
  sqrt: [
6525
- w,
6526
- [w],
6525
+ b,
6526
+ [b],
6527
6527
  (r, [e]) => Math.sqrt(e.evaluate(r))
6528
6528
  ],
6529
6529
  log10: [
6530
- w,
6531
- [w],
6530
+ b,
6531
+ [b],
6532
6532
  (r, [e]) => Math.log(e.evaluate(r)) / Math.LN10
6533
6533
  ],
6534
6534
  ln: [
6535
- w,
6536
- [w],
6535
+ b,
6536
+ [b],
6537
6537
  (r, [e]) => Math.log(e.evaluate(r))
6538
6538
  ],
6539
6539
  log2: [
6540
- w,
6541
- [w],
6540
+ b,
6541
+ [b],
6542
6542
  (r, [e]) => Math.log(e.evaluate(r)) / Math.LN2
6543
6543
  ],
6544
6544
  sin: [
6545
- w,
6546
- [w],
6545
+ b,
6546
+ [b],
6547
6547
  (r, [e]) => Math.sin(e.evaluate(r))
6548
6548
  ],
6549
6549
  cos: [
6550
- w,
6551
- [w],
6550
+ b,
6551
+ [b],
6552
6552
  (r, [e]) => Math.cos(e.evaluate(r))
6553
6553
  ],
6554
6554
  tan: [
6555
- w,
6556
- [w],
6555
+ b,
6556
+ [b],
6557
6557
  (r, [e]) => Math.tan(e.evaluate(r))
6558
6558
  ],
6559
6559
  asin: [
6560
- w,
6561
- [w],
6560
+ b,
6561
+ [b],
6562
6562
  (r, [e]) => Math.asin(e.evaluate(r))
6563
6563
  ],
6564
6564
  acos: [
6565
- w,
6566
- [w],
6565
+ b,
6566
+ [b],
6567
6567
  (r, [e]) => Math.acos(e.evaluate(r))
6568
6568
  ],
6569
6569
  atan: [
6570
- w,
6571
- [w],
6570
+ b,
6571
+ [b],
6572
6572
  (r, [e]) => Math.atan(e.evaluate(r))
6573
6573
  ],
6574
6574
  min: [
6575
- w,
6576
- Ie(w),
6575
+ b,
6576
+ Ie(b),
6577
6577
  (r, e) => Math.min(...e.map((t) => t.evaluate(r)))
6578
6578
  ],
6579
6579
  max: [
6580
- w,
6581
- Ie(w),
6580
+ b,
6581
+ Ie(b),
6582
6582
  (r, e) => Math.max(...e.map((t) => t.evaluate(r)))
6583
6583
  ],
6584
6584
  abs: [
6585
- w,
6586
- [w],
6585
+ b,
6586
+ [b],
6587
6587
  (r, [e]) => Math.abs(e.evaluate(r))
6588
6588
  ],
6589
6589
  round: [
6590
- w,
6591
- [w],
6590
+ b,
6591
+ [b],
6592
6592
  (r, [e]) => {
6593
6593
  const t = e.evaluate(r);
6594
6594
  return t < 0 ? -Math.round(-t) : Math.round(t);
6595
6595
  }
6596
6596
  ],
6597
6597
  floor: [
6598
- w,
6599
- [w],
6598
+ b,
6599
+ [b],
6600
6600
  (r, [e]) => Math.floor(e.evaluate(r))
6601
6601
  ],
6602
6602
  ceil: [
6603
- w,
6604
- [w],
6603
+ b,
6604
+ [b],
6605
6605
  (r, [e]) => Math.ceil(e.evaluate(r))
6606
6606
  ],
6607
6607
  "filter-==": [
@@ -6963,7 +6963,7 @@ function nl(r) {
6963
6963
  const e = {
6964
6964
  color: de,
6965
6965
  string: I,
6966
- number: w,
6966
+ number: b,
6967
6967
  enum: I,
6968
6968
  boolean: _,
6969
6969
  formatted: Dt,
@@ -7133,36 +7133,36 @@ function ja(r) {
7133
7133
  if (t === "identity")
7134
7134
  return [new g(y.key, y.value, 'identity function may not have a "stops" property')];
7135
7135
  let m = [];
7136
- const b = y.value;
7136
+ const w = y.value;
7137
7137
  return m = m.concat(an({
7138
7138
  key: y.key,
7139
- value: b,
7139
+ value: w,
7140
7140
  valueSpec: y.valueSpec,
7141
7141
  validateSpec: y.validateSpec,
7142
7142
  style: y.style,
7143
7143
  styleSpec: y.styleSpec,
7144
7144
  arrayElementValidator: f
7145
- })), M(b) === "array" && b.length === 0 && m.push(new g(y.key, b, "array must have at least one stop")), m;
7145
+ })), M(w) === "array" && w.length === 0 && m.push(new g(y.key, w, "array must have at least one stop")), m;
7146
7146
  }
7147
7147
  function f(y) {
7148
7148
  let m = [];
7149
- const b = y.value, v = y.key;
7150
- if (M(b) !== "array")
7151
- return [new g(v, b, `array expected, ${M(b)} found`)];
7152
- if (b.length !== 2)
7153
- return [new g(v, b, `array length 2 expected, length ${b.length} found`)];
7149
+ const w = y.value, v = y.key;
7150
+ if (M(w) !== "array")
7151
+ return [new g(v, w, `array expected, ${M(w)} found`)];
7152
+ if (w.length !== 2)
7153
+ return [new g(v, w, `array length 2 expected, length ${w.length} found`)];
7154
7154
  if (u) {
7155
- if (M(b[0]) !== "object")
7156
- return [new g(v, b, `object expected, ${M(b[0])} found`)];
7157
- if (b[0].zoom === void 0)
7158
- return [new g(v, b, "object stop key must have zoom")];
7159
- if (b[0].value === void 0)
7160
- return [new g(v, b, "object stop key must have value")];
7161
- if (i && i > U(b[0].zoom))
7162
- return [new g(v, b[0].zoom, "stop zoom values must appear in ascending order")];
7163
- U(b[0].zoom) !== i && (i = U(b[0].zoom), o = void 0, a = {}), m = m.concat(te({
7155
+ if (M(w[0]) !== "object")
7156
+ return [new g(v, w, `object expected, ${M(w[0])} found`)];
7157
+ if (w[0].zoom === void 0)
7158
+ return [new g(v, w, "object stop key must have zoom")];
7159
+ if (w[0].value === void 0)
7160
+ return [new g(v, w, "object stop key must have value")];
7161
+ if (i && i > U(w[0].zoom))
7162
+ return [new g(v, w[0].zoom, "stop zoom values must appear in ascending order")];
7163
+ U(w[0].zoom) !== i && (i = U(w[0].zoom), o = void 0, a = {}), m = m.concat(te({
7164
7164
  key: `${v}[0]`,
7165
- value: b[0],
7165
+ value: w[0],
7166
7166
  valueSpec: { zoom: {} },
7167
7167
  validateSpec: y.validateSpec,
7168
7168
  style: y.style,
@@ -7172,14 +7172,14 @@ function ja(r) {
7172
7172
  } else
7173
7173
  m = m.concat(d({
7174
7174
  key: `${v}[0]`,
7175
- value: b[0],
7175
+ value: w[0],
7176
7176
  validateSpec: y.validateSpec,
7177
7177
  style: y.style,
7178
7178
  styleSpec: y.styleSpec
7179
- }, b));
7180
- return za(je(b[1])) ? m.concat([new g(`${v}[1]`, b[1], "expressions are not allowed in function stops.")]) : m.concat(y.validateSpec({
7179
+ }, w));
7180
+ return za(je(w[1])) ? m.concat([new g(`${v}[1]`, w[1], "expressions are not allowed in function stops.")]) : m.concat(y.validateSpec({
7181
7181
  key: `${v}[1]`,
7182
- value: b[1],
7182
+ value: w[1],
7183
7183
  valueSpec: e,
7184
7184
  validateSpec: y.validateSpec,
7185
7185
  style: y.style,
@@ -7187,18 +7187,18 @@ function ja(r) {
7187
7187
  }));
7188
7188
  }
7189
7189
  function d(y, m) {
7190
- const b = M(y.value), v = U(y.value), x = y.value !== null ? y.value : m;
7190
+ const w = M(y.value), v = U(y.value), x = y.value !== null ? y.value : m;
7191
7191
  if (!n)
7192
- n = b;
7193
- else if (b !== n)
7194
- return [new g(y.key, x, `${b} stop domain type must match previous stop domain type ${n}`)];
7195
- if (b !== "number" && b !== "string" && b !== "boolean")
7192
+ n = w;
7193
+ else if (w !== n)
7194
+ return [new g(y.key, x, `${w} stop domain type must match previous stop domain type ${n}`)];
7195
+ if (w !== "number" && w !== "string" && w !== "boolean")
7196
7196
  return [new g(y.key, x, "stop domain value must be a number, string, or boolean")];
7197
- if (b !== "number" && t !== "categorical") {
7198
- let A = `number expected, ${b} found`;
7197
+ if (w !== "number" && t !== "categorical") {
7198
+ let A = `number expected, ${w} found`;
7199
7199
  return zt(e) && t === void 0 && (A += '\nIf you intended to use a categorical function, specify `"type": "categorical"`.'), [new g(y.key, x, A)];
7200
7200
  }
7201
- return t === "categorical" && b === "number" && (!isFinite(v) || Math.floor(v) !== v) ? [new g(y.key, x, `integer expected, found ${v}`)] : t !== "categorical" && b === "number" && o !== void 0 && v < o ? [new g(y.key, x, "stop domain values must appear in ascending order")] : (o = v, t === "categorical" && v in a ? [new g(y.key, x, "stop domain values must be unique")] : (a[v] = !0, []));
7201
+ return t === "categorical" && w === "number" && (!isFinite(v) || Math.floor(v) !== v) ? [new g(y.key, x, `integer expected, found ${v}`)] : t !== "categorical" && w === "number" && o !== void 0 && v < o ? [new g(y.key, x, "stop domain values must appear in ascending order")] : (o = v, t === "categorical" && v in a ? [new g(y.key, x, "stop domain values must be unique")] : (a[v] = !0, []));
7202
7202
  }
7203
7203
  function h(y) {
7204
7204
  return y.validateSpec({
@@ -8228,7 +8228,7 @@ class Ll {
8228
8228
  this.projectionButton.classList.remove("maplibregl-ctrl-projection-globe"), this.projectionButton.classList.remove("maplibregl-ctrl-projection-mercator"), this.map.isGlobeProjection() ? (this.projectionButton.classList.add("maplibregl-ctrl-projection-mercator"), this.projectionButton.title = "Enable Mercator projection") : (this.projectionButton.classList.add("maplibregl-ctrl-projection-globe"), this.projectionButton.title = "Enable Globe projection");
8229
8229
  }
8230
8230
  }
8231
- const Al = "@maptiler/sdk", El = "3.5.1-rc5", Tl = "The Javascript & TypeScript map SDK tailored for MapTiler Cloud", _l = "MapTiler", Il = "dist/maptiler-sdk.mjs", Ml = "dist/maptiler-sdk.d.ts", Pl = "dist/maptiler-sdk.css", Rl = "module", zl = "dist/maptiler-sdk.mjs", Fl = { ".": { import: "./dist/maptiler-sdk.mjs", types: "./dist/maptiler-sdk.d.ts" }, "./dist/maptiler-sdk.css": { import: "./dist/maptiler-sdk.css" }, "./style.css": { import: "./dist/maptiler-sdk.css" } }, $l = ["maptiler", "map", "sdk", "webmap", "cloud", "webGL", "maplibre"], Ol = "https://docs.maptiler.com/sdk-js/", jl = "BSD-3-Clause", Nl = { type: "git", url: "https://github.com/maptiler/maptiler-sdk-js.git" }, Dl = { prepare: "husky", doc: "rm -rf docs/* && typedoc --out docs && cp -r images docs/", ncu: "npx npm-check-updates", lint: "tsc --noEmit && eslint src", "lint:fix": "tsc --noEmit && eslint src --fix", "test:watch": "vitest watch -c vite.config-test.ts --dom", test: "vitest run -c vite.config-test.ts --dom", "install:clean": "rm -rf build/ dist/ node_modules/ && npm ci", dev: "npm run build-css && vite -c vite.config-dev.ts", "dev-umd": "npm run build-css && tsc && NODE_ENV=development vite build -w -c vite.config-umd.ts", "build-css": "mkdir -p dist build && node scripts/replace-path-with-content.js src/style/style_template.css dist/tmp_maptiler-sdk.css && cat node_modules/maplibre-gl/dist/maplibre-gl.css dist/tmp_maptiler-sdk.css > dist/maptiler-sdk.css && rm dist/tmp_maptiler-sdk.css && cp dist/maptiler-sdk.css build/maptiler-sdk.css", "build-umd": "tsc && NODE_ENV=production vite build -c vite.config-umd.ts", "build-es": "tsc && NODE_ENV=production vite build -c vite.config-es.ts", build: "npm run build-es; npm run build-umd; npm run build-css", make: "npm run install:clean && npm run build" }, Ul = { "@canvas/image-data": "^1.0.0", "@eslint/js": "^9.21.0", "@types/color-convert": "^2.0.4", "@types/color-name": "^2.0.0", "@types/stats.js": "^0.17.4", "@types/uuid": "^10.0.0", "@types/xmldom": "^0.1.31", "@vitest/web-worker": "^3.0.9", "@xmldom/xmldom": "^0.8.10", concurrently: "^9.1.2", eslint: "^9.21.0", "eslint-config-prettier": "^10.0.2", "eslint-plugin-prettier": "^5.2.3", "happy-dom": "^17.4.4", husky: "^8.0.0", jiti: "^2.4.2", "lint-staged": "^15.4.3", prettier: "3.5.2", "stats.js": "^0.17.0", typedoc: "^0.27.6", typescript: "^5.7.3", "typescript-eslint": "^8.25.0", vite: "^6.0.7", "vite-plugin-dts": "^4.5.0", vitest: "^3.0.9" }, Bl = { "@maplibre/maplibre-gl-style-spec": "~23.3.0", "@maptiler/client": "~2.4.0", events: "^3.3.0", "gl-matrix": "^3.4.3", "js-base64": "^3.7.7", "maplibre-gl": "~5.6.0", uuid: "^11.0.5" }, ql = {
8231
+ const Al = "@maptiler/sdk", El = "3.5.1-rc6", Tl = "The Javascript & TypeScript map SDK tailored for MapTiler Cloud", _l = "MapTiler", Il = "dist/maptiler-sdk.mjs", Ml = "dist/maptiler-sdk.d.ts", Pl = "dist/maptiler-sdk.css", Rl = "module", zl = "dist/maptiler-sdk.mjs", Fl = { ".": { import: "./dist/maptiler-sdk.mjs", types: "./dist/maptiler-sdk.d.ts" }, "./dist/maptiler-sdk.css": { import: "./dist/maptiler-sdk.css" }, "./style.css": { import: "./dist/maptiler-sdk.css" } }, $l = ["maptiler", "map", "sdk", "webmap", "cloud", "webGL", "maplibre"], Ol = "https://docs.maptiler.com/sdk-js/", jl = "BSD-3-Clause", Nl = { type: "git", url: "https://github.com/maptiler/maptiler-sdk-js.git" }, Dl = { prepare: "husky", doc: "rm -rf docs/* && typedoc --out docs && cp -r images docs/", ncu: "npx npm-check-updates", lint: "tsc --noEmit && eslint src", "lint:fix": "tsc --noEmit && eslint src --fix", "test:watch": "vitest watch -c vite.config-test.ts --dom", test: "vitest run -c vite.config-test.ts --dom", "install:clean": "rm -rf build/ dist/ node_modules/ && npm ci", dev: "npm run build-css && vite -c vite.config-dev.ts", "dev-umd": "npm run build-css && tsc && NODE_ENV=development vite build -w -c vite.config-umd.ts", "build-css": "mkdir -p dist build && node scripts/replace-path-with-content.js src/style/style_template.css dist/tmp_maptiler-sdk.css && cat node_modules/maplibre-gl/dist/maplibre-gl.css dist/tmp_maptiler-sdk.css > dist/maptiler-sdk.css && rm dist/tmp_maptiler-sdk.css && cp dist/maptiler-sdk.css build/maptiler-sdk.css", "build-umd": "tsc && NODE_ENV=production vite build -c vite.config-umd.ts", "build-es": "tsc && NODE_ENV=production vite build -c vite.config-es.ts", build: "npm run build-es; npm run build-umd; npm run build-css", make: "npm run install:clean && npm run build" }, Ul = { "@canvas/image-data": "^1.0.0", "@eslint/js": "^9.21.0", "@types/color-convert": "^2.0.4", "@types/color-name": "^2.0.0", "@types/stats.js": "^0.17.4", "@types/uuid": "^10.0.0", "@types/xmldom": "^0.1.31", "@vitest/web-worker": "^3.0.9", "@xmldom/xmldom": "^0.8.10", concurrently: "^9.1.2", eslint: "^9.21.0", "eslint-config-prettier": "^10.0.2", "eslint-plugin-prettier": "^5.2.3", "happy-dom": "^17.4.4", husky: "^8.0.0", jiti: "^2.4.2", "lint-staged": "^15.4.3", prettier: "3.5.2", "stats.js": "^0.17.0", typedoc: "^0.27.6", typescript: "^5.7.3", "typescript-eslint": "^8.25.0", vite: "^6.0.7", "vite-plugin-dts": "^4.5.0", vitest: "^3.0.9" }, Bl = { "@maplibre/maplibre-gl-style-spec": "~23.3.0", "@maptiler/client": "~2.4.0", events: "^3.3.0", "gl-matrix": "^3.4.3", "js-base64": "^3.7.7", "maplibre-gl": "~5.6.0", uuid: "^11.0.5" }, ql = {
8232
8232
  name: Al,
8233
8233
  version: El,
8234
8234
  description: Tl,
@@ -8299,8 +8299,8 @@ function Vl(r, e, t, n, a, o, i, s, l, u, c, p, f, d, h, y, m) {
8299
8299
  return r[0] = e, r[1] = t, r[2] = n, r[3] = a, r[4] = o, r[5] = i, r[6] = s, r[7] = l, r[8] = u, r[9] = c, r[10] = p, r[11] = f, r[12] = d, r[13] = h, r[14] = y, r[15] = m, r;
8300
8300
  }
8301
8301
  function Hl(r, e, t) {
8302
- var n = e[0], a = e[1], o = e[2], i = e[3], s = e[4], l = e[5], u = e[6], c = e[7], p = e[8], f = e[9], d = e[10], h = e[11], y = e[12], m = e[13], b = e[14], v = e[15], x = t[0], A = t[1], L = t[2], $ = t[3];
8303
- return r[0] = x * n + A * s + L * p + $ * y, r[1] = x * a + A * l + L * f + $ * m, r[2] = x * o + A * u + L * d + $ * b, r[3] = x * i + A * c + L * h + $ * v, x = t[4], A = t[5], L = t[6], $ = t[7], r[4] = x * n + A * s + L * p + $ * y, r[5] = x * a + A * l + L * f + $ * m, r[6] = x * o + A * u + L * d + $ * b, r[7] = x * i + A * c + L * h + $ * v, x = t[8], A = t[9], L = t[10], $ = t[11], r[8] = x * n + A * s + L * p + $ * y, r[9] = x * a + A * l + L * f + $ * m, r[10] = x * o + A * u + L * d + $ * b, r[11] = x * i + A * c + L * h + $ * v, x = t[12], A = t[13], L = t[14], $ = t[15], r[12] = x * n + A * s + L * p + $ * y, r[13] = x * a + A * l + L * f + $ * m, r[14] = x * o + A * u + L * d + $ * b, r[15] = x * i + A * c + L * h + $ * v, r;
8302
+ var n = e[0], a = e[1], o = e[2], i = e[3], s = e[4], l = e[5], u = e[6], c = e[7], p = e[8], f = e[9], d = e[10], h = e[11], y = e[12], m = e[13], w = e[14], v = e[15], x = t[0], A = t[1], L = t[2], $ = t[3];
8303
+ return r[0] = x * n + A * s + L * p + $ * y, r[1] = x * a + A * l + L * f + $ * m, r[2] = x * o + A * u + L * d + $ * w, r[3] = x * i + A * c + L * h + $ * v, x = t[4], A = t[5], L = t[6], $ = t[7], r[4] = x * n + A * s + L * p + $ * y, r[5] = x * a + A * l + L * f + $ * m, r[6] = x * o + A * u + L * d + $ * w, r[7] = x * i + A * c + L * h + $ * v, x = t[8], A = t[9], L = t[10], $ = t[11], r[8] = x * n + A * s + L * p + $ * y, r[9] = x * a + A * l + L * f + $ * m, r[10] = x * o + A * u + L * d + $ * w, r[11] = x * i + A * c + L * h + $ * v, x = t[12], A = t[13], L = t[14], $ = t[15], r[12] = x * n + A * s + L * p + $ * y, r[13] = x * a + A * l + L * f + $ * m, r[14] = x * o + A * u + L * d + $ * w, r[15] = x * i + A * c + L * h + $ * v, r;
8304
8304
  }
8305
8305
  function Kl(r, e, t) {
8306
8306
  var n = t[0], a = t[1], o = t[2];
@@ -9081,7 +9081,7 @@ let vr, ta, ra;
9081
9081
  function gu({ gl: r, faces: e, onReady: t, forceRefresh: n }) {
9082
9082
  vr && !n && ra === JSON.stringify(e) && t(vr, ta), ra = JSON.stringify(e);
9083
9083
  const a = r.createTexture();
9084
- if (r.bindTexture(r.TEXTURE_CUBE_MAP, a), !e) {
9084
+ if (!e) {
9085
9085
  console.warn("[CubemapLayer][loadCubemapTexture]: Faces are null");
9086
9086
  return;
9087
9087
  }
@@ -9091,24 +9091,35 @@ function gu({ gl: r, faces: e, onReady: t, forceRefresh: n }) {
9091
9091
  return;
9092
9092
  }
9093
9093
  const i = Object.entries(e).map(([s, l]) => new Promise((u, c) => {
9094
+ const p = s;
9094
9095
  if (l === void 0) {
9095
- console.warn(`[CubemapLayer][loadCubemapTexture]: Face ${s} is undefined`);
9096
+ c(new Error(`[CubemapLayer][loadCubemapTexture]: Face ${s} is undefined`));
9096
9097
  return;
9097
9098
  }
9098
- const p = vu(r, s);
9099
- if (p) {
9100
- const d = r.RGBA, h = r.RGBA, y = r.UNSIGNED_BYTE, m = new Image();
9101
- m.crossOrigin = "anonymous";
9102
- const b = () => {
9103
- r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_MAG_FILTER, r.LINEAR), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_MIN_FILTER, r.LINEAR), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_WRAP_S, r.CLAMP_TO_EDGE), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_WRAP_T, r.CLAMP_TO_EDGE), r.texImage2D(p, 0, d, h, y, m), u(m);
9104
- };
9105
- m.src = l, m.complete && m.naturalWidth > 0 ? b() : m.onload = b, m.onerror = () => {
9106
- c(new Error(`[CubemapLayer][loadCubemapTexture]: Error loading image ${l}`));
9107
- };
9108
- }
9099
+ const f = new Image();
9100
+ f.crossOrigin = "anonymous";
9101
+ const d = () => {
9102
+ u({ image: f, key: p });
9103
+ };
9104
+ f.src = l, f.complete && f.naturalWidth > 0 ? d() : f.onload = d, f.onerror = () => {
9105
+ c(new Error(`[CubemapLayer][loadCubemapTexture]: Error loading image ${l}`));
9106
+ };
9109
9107
  }));
9110
9108
  Promise.all(i).then((s) => {
9111
- r.bindTexture(r.TEXTURE_CUBE_MAP, a), r.generateMipmap(r.TEXTURE_CUBE_MAP), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_MIN_FILTER, r.LINEAR_MIPMAP_LINEAR), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_MAG_FILTER, r.LINEAR), t(a, s), ta = s, vr = a;
9109
+ for (let u = 0; u < s.length; u++) {
9110
+ const p = r.RGBA, f = r.RGBA, d = r.UNSIGNED_BYTE, { image: h, key: y } = s[u] ?? {};
9111
+ if (!h || !y) {
9112
+ console.warn("[CubemapLayer][loadCubemapTexture]: Image or key is null");
9113
+ continue;
9114
+ }
9115
+ const m = vu(r, y);
9116
+ r.bindTexture(r.TEXTURE_CUBE_MAP, a), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_MAG_FILTER, r.LINEAR), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_MIN_FILTER, r.LINEAR), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_WRAP_S, r.CLAMP_TO_EDGE), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_WRAP_T, r.CLAMP_TO_EDGE), r.texImage2D(m, 0, p, f, d, h);
9117
+ }
9118
+ r.bindTexture(r.TEXTURE_CUBE_MAP, a), r.generateMipmap(r.TEXTURE_CUBE_MAP), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_MIN_FILTER, r.LINEAR_MIPMAP_LINEAR), r.texParameteri(r.TEXTURE_CUBE_MAP, r.TEXTURE_MAG_FILTER, r.LINEAR);
9119
+ const l = s.map((u) => u.image);
9120
+ t(a, l), ta = l, vr = a;
9121
+ }).catch((s) => {
9122
+ console.error("[CubemapLayer][loadCubemapTexture]: Error loading cubemap texture", s);
9112
9123
  });
9113
9124
  }
9114
9125
  function vu(r, e) {
@@ -9752,14 +9763,14 @@ class wr {
9752
9763
  Xn(d, c, f), dr(d, d), Vl(l, f[0], f[1], f[2], 0, d[0], d[1], d[2], 0, c[0], c[1], c[2], 0, 0, 0, 0, 1);
9753
9764
  const h = this.plane.programInfo.uniformsLocations.rotationMatrix;
9754
9765
  e.uniformMatrix4fv(h, !1, l);
9755
- const y = this.gradient.stops.length, m = [], b = [];
9766
+ const y = this.gradient.stops.length, m = [], w = [];
9756
9767
  for (let v = 0; v <= y; v++)
9757
9768
  if (v < y) {
9758
9769
  m[v] = this.gradient.stops[v][0];
9759
9770
  const x = Lt(this.gradient.stops[v][1]);
9760
- b.push(...x);
9771
+ w.push(...x);
9761
9772
  }
9762
- e.uniform1i(this.plane.programInfo.uniformsLocations.stopsNumber, y), e.uniform1fv(this.plane.programInfo.uniformsLocations.stops, new Float32Array(m)), e.uniform4fv(this.plane.programInfo.uniformsLocations.colors, new Float32Array(b)), e.uniform1f(this.plane.programInfo.uniformsLocations.maxDistance, Je), e.uniform1f(this.plane.programInfo.uniformsLocations.scale, o), e.drawArrays(e.TRIANGLE_STRIP, 0, 4);
9773
+ e.uniform1i(this.plane.programInfo.uniformsLocations.stopsNumber, y), e.uniform1fv(this.plane.programInfo.uniformsLocations.stops, new Float32Array(m)), e.uniform4fv(this.plane.programInfo.uniformsLocations.colors, new Float32Array(w)), e.uniform1f(this.plane.programInfo.uniformsLocations.maxDistance, Je), e.uniform1f(this.plane.programInfo.uniformsLocations.scale, o), e.drawArrays(e.TRIANGLE_STRIP, 0, 4);
9763
9774
  }
9764
9775
  /**
9765
9776
  * Sets a new gradient for the radial gradient layer and animates the transition.
@@ -9837,9 +9848,9 @@ let Mu = class ro extends k.Map {
9837
9848
  this.styleInProcess = !1;
9838
9849
  }), this.on("error", (h) => {
9839
9850
  if (h.error instanceof k.AJAXError) {
9840
- const m = h.error.url, b = new URL(m);
9841
- b.search = "";
9842
- const v = b.href;
9851
+ const m = h.error.url, w = new URL(m);
9852
+ w.search = "";
9853
+ const v = w.href;
9843
9854
  this.monitoredStyleUrls && this.monitoredStyleUrls.has(v) && (this.monitoredStyleUrls.delete(v), u());
9844
9855
  return;
9845
9856
  }
@@ -9918,8 +9929,8 @@ let Mu = class ro extends k.Map {
9918
9929
  } else t.maptilerLogo && this.addControl(new xn(), t.logoPosition);
9919
9930
  if (t.scaleControl) {
9920
9931
  const y = t.scaleControl === !0 || t.scaleControl === void 0 ? "bottom-right" : t.scaleControl, m = new ai({ unit: D.unit });
9921
- this.addControl(m, y), D.on("unit", (b) => {
9922
- m.setUnit(b);
9932
+ this.addControl(m, y), D.on("unit", (w) => {
9933
+ m.setUnit(w);
9923
9934
  });
9924
9935
  }
9925
9936
  if (t.navigationControl !== !1) {
@@ -9969,7 +9980,7 @@ let Mu = class ro extends k.Map {
9969
9980
  const {
9970
9981
  zoom: y,
9971
9982
  center: m,
9972
- style: b,
9983
+ style: w,
9973
9984
  language: v,
9974
9985
  apiKey: x,
9975
9986
  maptilerLogo: A,
@@ -9992,7 +10003,7 @@ let Mu = class ro extends k.Map {
9992
10003
  this.minimap = new fr(h, {
9993
10004
  zoom: y,
9994
10005
  center: m,
9995
- style: b,
10006
+ style: w,
9996
10007
  language: v,
9997
10008
  apiKey: x,
9998
10009
  container: "null",
@@ -10271,10 +10282,10 @@ let Mu = class ro extends k.Map {
10271
10282
  else
10272
10283
  return l(), this;
10273
10284
  return this.styleInProcess && this.once("style.load", () => {
10274
- var m, b, v, x;
10285
+ var m, w, v, x;
10275
10286
  console.log("style.load");
10276
10287
  const h = this.getLayersOrder()[0], y = a.style;
10277
- this.space ? this.setSpaceFromStyle({ style: y }) : this.initSpace({ before: h, spec: (b = (m = y.metadata) == null ? void 0 : m.maptiler) == null ? void 0 : b.space }), this.halo ? this.setHaloFromStyle({ style: y }) : this.initHalo({ before: h, spec: (x = (v = y.metadata) == null ? void 0 : v.maptiler) == null ? void 0 : x.halo });
10288
+ this.space ? this.setSpaceFromStyle({ style: y }) : this.initSpace({ before: h, spec: (w = (m = y.metadata) == null ? void 0 : m.maptiler) == null ? void 0 : w.space }), this.halo ? this.setHaloFromStyle({ style: y }) : this.initHalo({ before: h, spec: (x = (v = y.metadata) == null ? void 0 : v.maptiler) == null ? void 0 : x.halo });
10278
10289
  }), this;
10279
10290
  }
10280
10291
  /**
@@ -10491,8 +10502,8 @@ let Mu = class ro extends k.Map {
10491
10502
  continue;
10492
10503
  let m;
10493
10504
  if (u ? (m = this.getLayoutProperty(h, "text-field"), this.originalLabelStyle.set(h, m)) : m = this.originalLabelStyle.get(h), typeof m == "string") {
10494
- const { contains: b, exactMatch: v } = Zo(m, this.isStyleLocalized);
10495
- if (!b) continue;
10505
+ const { contains: w, exactMatch: v } = Zo(m, this.isStyleLocalized);
10506
+ if (!w) continue;
10496
10507
  if (v)
10497
10508
  this.setLayoutProperty(h, "text-field", s);
10498
10509
  else {
@@ -10500,8 +10511,8 @@ let Mu = class ro extends k.Map {
10500
10511
  this.setLayoutProperty(h, "text-field", x);
10501
10512
  }
10502
10513
  } else {
10503
- const b = Xo(m, s, this.isStyleLocalized);
10504
- this.setLayoutProperty(h, "text-field", b);
10514
+ const w = Xo(m, s, this.isStyleLocalized);
10515
+ this.setLayoutProperty(h, "text-field", w);
10505
10516
  }
10506
10517
  }
10507
10518
  this.languageIsUpdated = !0;
@@ -10854,7 +10865,7 @@ function zu(r, e, t, n) {
10854
10865
  o[x[d].getAttribute("name") ?? ""] = O(x[d]) ?? "";
10855
10866
  }
10856
10867
  f !== null && (o.visibility = O(f) ?? ""), a.coordTimes.length !== 0 && (o.coordTimes = a.coordTimes.length === 1 ? a.coordTimes[0] : a.coordTimes);
10857
- const b = {
10868
+ const w = {
10858
10869
  type: "Feature",
10859
10870
  geometry: a.geoms.length === 1 ? a.geoms[0] : {
10860
10871
  type: "GeometryCollection",
@@ -10862,7 +10873,7 @@ function zu(r, e, t, n) {
10862
10873
  },
10863
10874
  properties: o
10864
10875
  };
10865
- return Oe(r, "id") && (b.id = Oe(r, "id") ?? void 0), [b];
10876
+ return Oe(r, "id") && (w.id = Oe(r, "id") ?? void 0), [w];
10866
10877
  }
10867
10878
  function io(r, e) {
10868
10879
  const t = G(r, e), n = [], a = [];
@@ -12258,14 +12269,14 @@ function Vu(r, e) {
12258
12269
  ), e.outline === !0) {
12259
12270
  let m;
12260
12271
  f === "inside" ? typeof i == "number" ? m = 0.5 * i : m = z(
12261
- i.map(({ zoom: b, value: v }) => ({
12262
- zoom: b,
12272
+ i.map(({ zoom: w, value: v }) => ({
12273
+ zoom: w,
12263
12274
  value: 0.5 * v
12264
12275
  }))
12265
12276
  ) : f === "outside" ? typeof i == "number" ? m = -0.5 * i : m = z(
12266
- i.map((b) => ({
12267
- zoom: b.zoom,
12268
- value: -0.5 * b.value
12277
+ i.map((w) => ({
12278
+ zoom: w.zoom,
12279
+ value: -0.5 * w.value
12269
12280
  }))
12270
12281
  ) : m = 0, r.addLayer(
12271
12282
  {
@@ -12309,7 +12320,7 @@ function Hu(r, e) {
12309
12320
  throw new Error(`A layer already exists with the layer id: ${e.layerId}`);
12310
12321
  const t = e.minPointRadius ?? 10, n = e.maxPointRadius ?? 50, a = e.cluster ?? !1, o = 20, i = Array.isArray(e.pointColor) ? e.pointColor : mo.TURBO.scale(10, e.cluster ? 1e4 : 1e3).resample("ease-out-square"), s = i.getBounds(), l = e.sourceId ?? yt(), u = e.layerId ?? mt(), c = e.showLabel ?? a, p = e.alignOnViewport ?? !0, f = e.outline ?? !1, d = e.outlineOpacity ?? 1, h = e.outlineWidth ?? 1, y = e.outlineColor ?? "#FFFFFF";
12311
12322
  let m;
12312
- const b = e.zoomCompensation ?? !0, v = e.minzoom ?? 0, x = e.maxzoom ?? 23;
12323
+ const w = e.zoomCompensation ?? !0, v = e.minzoom ?? 0, x = e.maxzoom ?? 23;
12313
12324
  typeof e.pointOpacity == "number" ? m = e.pointOpacity : Array.isArray(e.pointOpacity) ? m = z(e.pointOpacity) : e.cluster ? m = Or(i, "point_count") : e.property ? m = Or(i, e.property) : m = z([
12314
12325
  { zoom: v, value: 0 },
12315
12326
  { zoom: v + 0.25, value: 1 },
@@ -12390,13 +12401,13 @@ function Hu(r, e) {
12390
12401
  e.beforeId
12391
12402
  );
12392
12403
  } else {
12393
- let L = typeof e.pointColor == "string" ? e.pointColor : Array.isArray(e.pointColor) ? e.pointColor.getColorHex(e.pointColor.getBounds().min) : Qt(), $ = typeof e.pointRadius == "number" ? b ? z([
12404
+ let L = typeof e.pointColor == "string" ? e.pointColor : Array.isArray(e.pointColor) ? e.pointColor.getColorHex(e.pointColor.getBounds().min) : Qt(), $ = typeof e.pointRadius == "number" ? w ? z([
12394
12405
  { zoom: 0, value: e.pointRadius * 0.025 },
12395
12406
  { zoom: 2, value: e.pointRadius * 0.05 },
12396
12407
  { zoom: 4, value: e.pointRadius * 0.1 },
12397
12408
  { zoom: 8, value: e.pointRadius * 0.25 },
12398
12409
  { zoom: 16, value: e.pointRadius * 1 }
12399
- ]) : e.pointRadius : Array.isArray(e.pointRadius) ? z(e.pointRadius) : b ? z([
12410
+ ]) : e.pointRadius : Array.isArray(e.pointRadius) ? z(e.pointRadius) : w ? z([
12400
12411
  { zoom: 0, value: t * 0.05 },
12401
12412
  { zoom: 2, value: t * 0.1 },
12402
12413
  { zoom: 4, value: t * 0.2 },
@@ -12412,7 +12423,7 @@ function Hu(r, e) {
12412
12423
  color: typeof e.pointColor == "string" ? e.pointColor : i.getColorHex(vt)
12413
12424
  };
12414
12425
  });
12415
- L = Fr(Te, e.property), $ = $r(Te, e.property, b);
12426
+ L = Fr(Te, e.property), $ = $r(Te, e.property, w);
12416
12427
  }
12417
12428
  r.addLayer(
12418
12429
  {
@@ -12499,7 +12510,7 @@ function Ku(r, e) {
12499
12510
  ], y = e.radius ?? (i ? h : 10);
12500
12511
  let m = 1;
12501
12512
  typeof y == "number" ? m = y : Array.isArray(y) && "zoom" in y[0] ? m = z(y) : p && Array.isArray(y) && "propertyValue" in y[0] ? m = ho(y, p, i) : !p && Array.isArray(y) && "propertyValue" in y[0] ? (m = z(h), console.warn("The option `.radius` can only be property-driven if the option `.property` is provided.")) : m = z(h);
12502
- const b = {
12513
+ const w = {
12503
12514
  heatmapLayerId: n,
12504
12515
  heatmapSourceId: t
12505
12516
  };
@@ -12526,7 +12537,7 @@ function Ku(r, e) {
12526
12537
  }
12527
12538
  },
12528
12539
  e.beforeId
12529
- ), b;
12540
+ ), w;
12530
12541
  }
12531
12542
  const xc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12532
12543
  __proto__: null,
@@ -12553,7 +12564,7 @@ const xc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12553
12564
  }, Symbol.toStringTag, { value: "Module" }));
12554
12565
  qo();
12555
12566
  function kc() {
12556
- return "3.5.1-rc5";
12567
+ return "3.5.1-rc6";
12557
12568
  }
12558
12569
  const Cc = k.Map, Lc = k.Marker, Ac = k.Popup, Ec = k.Style, Tc = k.CanvasSource, _c = k.GeoJSONSource, Ic = k.ImageSource, Mc = k.RasterTileSource, Pc = k.RasterDEMTileSource, Rc = k.VectorTileSource, zc = k.VideoSource, Fc = k.NavigationControl, $c = k.GeolocateControl, Oc = k.AttributionControl, jc = k.LogoControl, Nc = k.ScaleControl, Dc = k.FullscreenControl, Uc = k.TerrainControl, Bc = k.BoxZoomHandler, qc = k.ScrollZoomHandler, Gc = k.CooperativeGesturesHandler, Vc = k.KeyboardHandler, Hc = k.TwoFingersTouchPitchHandler, Kc = k.MapWheelEvent, Xc = k.MapTouchEvent, Zc = k.MapMouseEvent, Wc = k.config, Yc = k.getVersion, {
12559
12570
  setRTLTextPlugin: Jc,