azure-maps-control 2.2.2 → 2.2.4

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/atlas.js CHANGED
@@ -77,7 +77,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
77
77
  }
78
78
 
79
79
  var azuremapsMaplibreGlUnminified = createCommonjsModule(function (module, exports) {
80
- /* The Azure Maps fork of MapLibre GL JS is licensed under the 3-Clause BSD License. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v1.14.0-rc4/LICENSE.txt */
80
+ /* The Azure Maps fork of MapLibre GL JS is licensed under the 3-Clause BSD License. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v1.15.0/LICENSE.txt */
81
81
  (function (global, factory) {
82
82
  module.exports = factory() ;
83
83
  }(commonjsGlobal, (function () {
@@ -109,7 +109,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
109
109
  return module = { exports: {} }, fn(module, module.exports), module.exports;
110
110
  }
111
111
 
112
- var version = "1.14.0-rc4";
112
+ var version = "1.15.0";
113
113
 
114
114
  var unitbezier = UnitBezier;
115
115
  function UnitBezier(p1x, p1y, p2x, p2y) {
@@ -2455,8 +2455,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
2455
2455
  "property-type": "data-driven"
2456
2456
  },
2457
2457
  "icon-padding": {
2458
- type: "number",
2459
- "default": 2,
2458
+ type: "padding",
2459
+ "default": [
2460
+ 2
2461
+ ],
2460
2462
  minimum: 0,
2461
2463
  units: "pixels",
2462
2464
  requires: [
@@ -2465,10 +2467,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
2465
2467
  expression: {
2466
2468
  interpolated: true,
2467
2469
  parameters: [
2468
- "zoom"
2470
+ "zoom",
2471
+ "feature"
2469
2472
  ]
2470
2473
  },
2471
- "property-type": "data-constant"
2474
+ "property-type": "data-driven"
2472
2475
  },
2473
2476
  "icon-keep-upright": {
2474
2477
  type: "boolean",
@@ -4674,6 +4677,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
4674
4677
  var ErrorType = { kind: 'error' };
4675
4678
  var CollatorType = { kind: 'collator' };
4676
4679
  var FormattedType = { kind: 'formatted' };
4680
+ var PaddingType = { kind: 'padding' };
4677
4681
  var ResolvedImageType = { kind: 'resolvedImage' };
4678
4682
  function array(itemType, N) {
4679
4683
  return {
@@ -4699,6 +4703,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
4699
4703
  FormattedType,
4700
4704
  ObjectType,
4701
4705
  array(ValueType),
4706
+ PaddingType,
4702
4707
  ResolvedImageType
4703
4708
  ];
4704
4709
  function checkSubtype(expected, t) {
@@ -5897,6 +5902,65 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
5897
5902
  return serialized;
5898
5903
  };
5899
5904
 
5905
+ var Padding = function Padding(values) {
5906
+ this.values = values.slice();
5907
+ };
5908
+ Padding.parse = function parse(input) {
5909
+ if (input instanceof Padding) {
5910
+ return input;
5911
+ }
5912
+ if (typeof input === 'number') {
5913
+ return new Padding([
5914
+ input,
5915
+ input,
5916
+ input,
5917
+ input
5918
+ ]);
5919
+ }
5920
+ if (!Array.isArray(input)) {
5921
+ return undefined;
5922
+ }
5923
+ if (input.length < 1 || input.length > 4) {
5924
+ return undefined;
5925
+ }
5926
+ for (var i = 0, list = input; i < list.length; i += 1) {
5927
+ var val = list[i];
5928
+ if (typeof val !== 'number') {
5929
+ return undefined;
5930
+ }
5931
+ }
5932
+ switch (input.length) {
5933
+ case 1:
5934
+ input = [
5935
+ input[0],
5936
+ input[0],
5937
+ input[0],
5938
+ input[0]
5939
+ ];
5940
+ break;
5941
+ case 2:
5942
+ input = [
5943
+ input[0],
5944
+ input[1],
5945
+ input[0],
5946
+ input[1]
5947
+ ];
5948
+ break;
5949
+ case 3:
5950
+ input = [
5951
+ input[0],
5952
+ input[1],
5953
+ input[2],
5954
+ input[1]
5955
+ ];
5956
+ break;
5957
+ }
5958
+ return new Padding(input);
5959
+ };
5960
+ Padding.prototype.toString = function toString() {
5961
+ return JSON.stringify(this.values);
5962
+ };
5963
+
5900
5964
  var ResolvedImage = function ResolvedImage(options) {
5901
5965
  this.name = options.name;
5902
5966
  this.available = options.available;
@@ -5959,6 +6023,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
5959
6023
  return true;
5960
6024
  } else if (mixed instanceof Formatted) {
5961
6025
  return true;
6026
+ } else if (mixed instanceof Padding) {
6027
+ return true;
5962
6028
  } else if (mixed instanceof ResolvedImage) {
5963
6029
  return true;
5964
6030
  } else if (Array.isArray(mixed)) {
@@ -5995,6 +6061,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
5995
6061
  return CollatorType;
5996
6062
  } else if (value instanceof Formatted) {
5997
6063
  return FormattedType;
6064
+ } else if (value instanceof Padding) {
6065
+ return PaddingType;
5998
6066
  } else if (value instanceof ResolvedImage) {
5999
6067
  return ResolvedImageType;
6000
6068
  } else if (Array.isArray(value)) {
@@ -6023,7 +6091,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
6023
6091
  return '';
6024
6092
  } else if (type === 'string' || type === 'number' || type === 'boolean') {
6025
6093
  return String(value);
6026
- } else if (value instanceof Color || value instanceof Formatted || value instanceof ResolvedImage) {
6094
+ } else if (value instanceof Color || value instanceof Formatted || value instanceof Padding || value instanceof ResolvedImage) {
6027
6095
  return value.toString();
6028
6096
  } else {
6029
6097
  return JSON.stringify(value);
@@ -6373,11 +6441,22 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
6373
6441
  }
6374
6442
  }
6375
6443
  throw new RuntimeError(error || 'Could not parse color from value \'' + (typeof input === 'string' ? input : String(JSON.stringify(input))) + '\'');
6376
- } else if (this.type.kind === 'number') {
6377
- var value = null;
6444
+ } else if (this.type.kind === 'padding') {
6445
+ var input$1;
6378
6446
  for (var i$1 = 0, list$1 = this.args; i$1 < list$1.length; i$1 += 1) {
6379
6447
  var arg$1 = list$1[i$1];
6380
- value = arg$1.evaluate(ctx);
6448
+ input$1 = arg$1.evaluate(ctx);
6449
+ var pad = Padding.parse(input$1);
6450
+ if (pad) {
6451
+ return pad;
6452
+ }
6453
+ }
6454
+ throw new RuntimeError('Could not parse padding from value \'' + (typeof input$1 === 'string' ? input$1 : JSON.stringify(input$1)) + '\'');
6455
+ } else if (this.type.kind === 'number') {
6456
+ var value = null;
6457
+ for (var i$2 = 0, list$2 = this.args; i$2 < list$2.length; i$2 += 1) {
6458
+ var arg$2 = list$2[i$2];
6459
+ value = arg$2.evaluate(ctx);
6381
6460
  if (value === null) {
6382
6461
  return 0;
6383
6462
  }
@@ -7129,6 +7208,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
7129
7208
  parsed = annotate(parsed, expected, options.typeAnnotation || 'assert');
7130
7209
  } else if ((expected.kind === 'color' || expected.kind === 'formatted' || expected.kind === 'resolvedImage') && (actual.kind === 'value' || actual.kind === 'string')) {
7131
7210
  parsed = annotate(parsed, expected, options.typeAnnotation || 'coerce');
7211
+ } else if (expected.kind === 'padding' && (actual.kind === 'value' || actual.kind === 'number' || actual.kind === 'array')) {
7212
+ parsed = annotate(parsed, expected, options.typeAnnotation || 'coerce');
7132
7213
  } else if (this.checkSubtype(expected, actual)) {
7133
7214
  return null;
7134
7215
  }
@@ -7335,12 +7416,23 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
7335
7416
  return number(d, to[i], t);
7336
7417
  });
7337
7418
  }
7419
+ function padding(from, to, t) {
7420
+ var fromVal = from.values;
7421
+ var toVal = to.values;
7422
+ return new Padding([
7423
+ number(fromVal[0], toVal[0], t),
7424
+ number(fromVal[1], toVal[1], t),
7425
+ number(fromVal[2], toVal[2], t),
7426
+ number(fromVal[3], toVal[3], t)
7427
+ ]);
7428
+ }
7338
7429
 
7339
7430
  var interpolate = /*#__PURE__*/Object.freeze({
7340
7431
  __proto__: null,
7341
7432
  number: number,
7342
7433
  color: color,
7343
- array: array$1
7434
+ array: array$1,
7435
+ padding: padding
7344
7436
  });
7345
7437
 
7346
7438
  var Xn = 0.95047, Yn = 1, Zn = 1.08883, t0 = 4 / 29, t1 = 6 / 29, t2 = 3 * t1 * t1, t3 = t1 * t1 * t1, deg2rad = Math.PI / 180, rad2deg = 180 / Math.PI;
@@ -7531,7 +7623,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
7531
7623
  parsed
7532
7624
  ]);
7533
7625
  }
7534
- if (outputType.kind !== 'number' && outputType.kind !== 'color' && !(outputType.kind === 'array' && outputType.itemType.kind === 'number' && typeof outputType.N === 'number')) {
7626
+ if (outputType.kind !== 'number' && outputType.kind !== 'color' && outputType.kind !== 'padding' && !(outputType.kind === 'array' && outputType.itemType.kind === 'number' && typeof outputType.N === 'number')) {
7535
7627
  return context.error('Type ' + toString(outputType) + ' is not interpolatable.');
7536
7628
  }
7537
7629
  return new Interpolate(outputType, operator, interpolation, input, stops);
@@ -9281,20 +9373,21 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
9281
9373
  var featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;
9282
9374
  var zoomDependent = zoomAndFeatureDependent || !featureDependent;
9283
9375
  var type = parameters.type || (supportsInterpolation(propertySpec) ? 'exponential' : 'interval');
9284
- if (isColor) {
9376
+ if (isColor || propertySpec.type === 'padding') {
9377
+ var parseFn = isColor ? Color.parse : Padding.parse;
9285
9378
  parameters = extend$1({}, parameters);
9286
9379
  if (parameters.stops) {
9287
9380
  parameters.stops = parameters.stops.map(function (stop) {
9288
9381
  return [
9289
9382
  stop[0],
9290
- Color.parse(stop[1])
9383
+ parseFn(stop[1])
9291
9384
  ];
9292
9385
  });
9293
9386
  }
9294
9387
  if (parameters.default) {
9295
- parameters.default = Color.parse(parameters.default);
9388
+ parameters.default = parseFn(parameters.default);
9296
9389
  } else {
9297
- parameters.default = Color.parse(propertySpec.default);
9390
+ parameters.default = parseFn(propertySpec.default);
9298
9391
  }
9299
9392
  }
9300
9393
  if (parameters.colorSpace && parameters.colorSpace !== 'rgb' && !colorSpaces[parameters.colorSpace]) {
@@ -9475,14 +9568,23 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
9475
9568
  return interp(outputLower, outputUpper, t);
9476
9569
  }
9477
9570
  function evaluateIdentityFunction(parameters, propertySpec, input) {
9478
- if (propertySpec.type === 'color') {
9571
+ switch (propertySpec.type) {
9572
+ case 'color':
9479
9573
  input = Color.parse(input);
9480
- } else if (propertySpec.type === 'formatted') {
9574
+ break;
9575
+ case 'formatted':
9481
9576
  input = Formatted.fromString(input.toString());
9482
- } else if (propertySpec.type === 'resolvedImage') {
9577
+ break;
9578
+ case 'resolvedImage':
9483
9579
  input = ResolvedImage.fromString(input.toString());
9484
- } else if (getType(input) !== propertySpec.type && (propertySpec.type !== 'enum' || !propertySpec.values[input])) {
9485
- input = undefined;
9580
+ break;
9581
+ case 'padding':
9582
+ input = Padding.parse(input);
9583
+ break;
9584
+ default:
9585
+ if (getType(input) !== propertySpec.type && (propertySpec.type !== 'enum' || !propertySpec.values[input])) {
9586
+ input = undefined;
9587
+ }
9486
9588
  }
9487
9589
  return coalesce(input, parameters.default, propertySpec.default);
9488
9590
  }
@@ -9639,8 +9741,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
9639
9741
  return expression.value;
9640
9742
  } else {
9641
9743
  var constant = value;
9642
- if (typeof value === 'string' && specification.type === 'color') {
9744
+ if (specification.type === 'color' && typeof value === 'string') {
9643
9745
  constant = Color.parse(value);
9746
+ } else if (specification.type === 'padding' && (typeof value === 'number' || Array.isArray(value))) {
9747
+ constant = Padding.parse(value);
9644
9748
  }
9645
9749
  return {
9646
9750
  kind: 'constant',
@@ -9688,6 +9792,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
9688
9792
  enum: StringType,
9689
9793
  boolean: BooleanType,
9690
9794
  formatted: FormattedType,
9795
+ padding: PaddingType,
9691
9796
  resolvedImage: ResolvedImageType
9692
9797
  };
9693
9798
  if (spec.type === 'array') {
@@ -9700,6 +9805,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
9700
9805
  return new Color(0, 0, 0, 0);
9701
9806
  } else if (spec.type === 'color') {
9702
9807
  return Color.parse(spec.default) || null;
9808
+ } else if (spec.type === 'padding') {
9809
+ return Padding.parse(spec.default) || null;
9703
9810
  } else if (spec.default === undefined) {
9704
9811
  return null;
9705
9812
  } else {
@@ -10698,6 +10805,33 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
10698
10805
  return validateExpression(options);
10699
10806
  }
10700
10807
 
10808
+ function validatePadding(options) {
10809
+ var key = options.key;
10810
+ var value = options.value;
10811
+ var type = getType(value);
10812
+ if (type === 'array') {
10813
+ if (value.length < 1 || value.length > 4) {
10814
+ return [new ValidationError(key, value, 'padding requires 1 to 4 values; ' + value.length + ' values found')];
10815
+ }
10816
+ var arrayElementSpec = { type: 'number' };
10817
+ var errors = [];
10818
+ for (var i = 0; i < value.length; i++) {
10819
+ errors = errors.concat(validate({
10820
+ key: key + '[' + i + ']',
10821
+ value: value[i],
10822
+ valueSpec: arrayElementSpec
10823
+ }));
10824
+ }
10825
+ return errors;
10826
+ } else {
10827
+ return validateNumber({
10828
+ key: key,
10829
+ value: value,
10830
+ valueSpec: {}
10831
+ });
10832
+ }
10833
+ }
10834
+
10701
10835
  var VALIDATORS = {
10702
10836
  '*': function _() {
10703
10837
  return [];
@@ -10716,7 +10850,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
10716
10850
  'light': validateLight,
10717
10851
  'string': validateString,
10718
10852
  'formatted': validateFormatted,
10719
- 'resolvedImage': validateImage
10853
+ 'resolvedImage': validateImage,
10854
+ 'padding': validatePadding
10720
10855
  };
10721
10856
  function validate(options) {
10722
10857
  var value = options.value;
@@ -15088,7 +15223,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15088
15223
  out[7] = a13 * c - a03 * s;
15089
15224
  return out;
15090
15225
  }
15091
- function perspective(out, fovy, aspect, near, far) {
15226
+ function perspectiveNO(out, fovy, aspect, near, far) {
15092
15227
  var f = 1 / Math.tan(fovy / 2), nf;
15093
15228
  out[0] = f / aspect;
15094
15229
  out[1] = 0;
@@ -15114,7 +15249,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15114
15249
  }
15115
15250
  return out;
15116
15251
  }
15117
- function ortho(out, left, right, bottom, top, near, far) {
15252
+ var perspective = perspectiveNO;
15253
+ function orthoNO(out, left, right, bottom, top, near, far) {
15118
15254
  var lr = 1 / (left - right);
15119
15255
  var bt = 1 / (bottom - top);
15120
15256
  var nf = 1 / (near - far);
@@ -15136,6 +15272,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15136
15272
  out[15] = 1;
15137
15273
  return out;
15138
15274
  }
15275
+ var ortho = orthoNO;
15139
15276
  var mul = multiply;
15140
15277
 
15141
15278
  function create$3() {
@@ -15659,9 +15796,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15659
15796
  }
15660
15797
  }
15661
15798
  invSize = Math.max(maxX - minX, maxY - minY);
15662
- invSize = invSize !== 0 ? 1 / invSize : 0;
15799
+ invSize = invSize !== 0 ? 32767 / invSize : 0;
15663
15800
  }
15664
- earcutLinked(outerNode, triangles, dim, minX, minY, invSize);
15801
+ earcutLinked(outerNode, triangles, dim, minX, minY, invSize, 0);
15665
15802
  return triangles;
15666
15803
  }
15667
15804
  function linkedList(data, start, end, dim, clockwise) {
@@ -15716,9 +15853,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15716
15853
  prev = ear.prev;
15717
15854
  next = ear.next;
15718
15855
  if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {
15719
- triangles.push(prev.i / dim);
15720
- triangles.push(ear.i / dim);
15721
- triangles.push(next.i / dim);
15856
+ triangles.push(prev.i / dim | 0);
15857
+ triangles.push(ear.i / dim | 0);
15858
+ triangles.push(next.i / dim | 0);
15722
15859
  removeNode(ear);
15723
15860
  ear = next.next;
15724
15861
  stop = next.next;
@@ -15743,9 +15880,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15743
15880
  if (area(a, b, c) >= 0) {
15744
15881
  return false;
15745
15882
  }
15746
- var p = ear.next.next;
15747
- while (p !== ear.prev) {
15748
- if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && area(p.prev, p, p.next) >= 0) {
15883
+ var ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;
15884
+ var x0 = ax < bx ? ax < cx ? ax : cx : bx < cx ? bx : cx, y0 = ay < by ? ay < cy ? ay : cy : by < cy ? by : cy, x1 = ax > bx ? ax > cx ? ax : cx : bx > cx ? bx : cx, y1 = ay > by ? ay > cy ? ay : cy : by > cy ? by : cy;
15885
+ var p = c.next;
15886
+ while (p !== a) {
15887
+ if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) {
15749
15888
  return false;
15750
15889
  }
15751
15890
  p = p.next;
@@ -15757,27 +15896,28 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15757
15896
  if (area(a, b, c) >= 0) {
15758
15897
  return false;
15759
15898
  }
15760
- var minTX = a.x < b.x ? a.x < c.x ? a.x : c.x : b.x < c.x ? b.x : c.x, minTY = a.y < b.y ? a.y < c.y ? a.y : c.y : b.y < c.y ? b.y : c.y, maxTX = a.x > b.x ? a.x > c.x ? a.x : c.x : b.x > c.x ? b.x : c.x, maxTY = a.y > b.y ? a.y > c.y ? a.y : c.y : b.y > c.y ? b.y : c.y;
15761
- var minZ = zOrder(minTX, minTY, minX, minY, invSize), maxZ = zOrder(maxTX, maxTY, minX, minY, invSize);
15899
+ var ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;
15900
+ var x0 = ax < bx ? ax < cx ? ax : cx : bx < cx ? bx : cx, y0 = ay < by ? ay < cy ? ay : cy : by < cy ? by : cy, x1 = ax > bx ? ax > cx ? ax : cx : bx > cx ? bx : cx, y1 = ay > by ? ay > cy ? ay : cy : by > cy ? by : cy;
15901
+ var minZ = zOrder(x0, y0, minX, minY, invSize), maxZ = zOrder(x1, y1, minX, minY, invSize);
15762
15902
  var p = ear.prevZ, n = ear.nextZ;
15763
15903
  while (p && p.z >= minZ && n && n.z <= maxZ) {
15764
- if (p !== ear.prev && p !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && area(p.prev, p, p.next) >= 0) {
15904
+ if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) {
15765
15905
  return false;
15766
15906
  }
15767
15907
  p = p.prevZ;
15768
- if (n !== ear.prev && n !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) && area(n.prev, n, n.next) >= 0) {
15908
+ if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) {
15769
15909
  return false;
15770
15910
  }
15771
15911
  n = n.nextZ;
15772
15912
  }
15773
15913
  while (p && p.z >= minZ) {
15774
- if (p !== ear.prev && p !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && area(p.prev, p, p.next) >= 0) {
15914
+ if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) {
15775
15915
  return false;
15776
15916
  }
15777
15917
  p = p.prevZ;
15778
15918
  }
15779
15919
  while (n && n.z <= maxZ) {
15780
- if (n !== ear.prev && n !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) && area(n.prev, n, n.next) >= 0) {
15920
+ if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) {
15781
15921
  return false;
15782
15922
  }
15783
15923
  n = n.nextZ;
@@ -15789,9 +15929,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15789
15929
  do {
15790
15930
  var a = p.prev, b = p.next.next;
15791
15931
  if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {
15792
- triangles.push(a.i / dim);
15793
- triangles.push(p.i / dim);
15794
- triangles.push(b.i / dim);
15932
+ triangles.push(a.i / dim | 0);
15933
+ triangles.push(p.i / dim | 0);
15934
+ triangles.push(b.i / dim | 0);
15795
15935
  removeNode(p);
15796
15936
  removeNode(p.next);
15797
15937
  p = start = b;
@@ -15809,8 +15949,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15809
15949
  var c = splitPolygon(a, b);
15810
15950
  a = filterPoints(a, a.next);
15811
15951
  c = filterPoints(c, c.next);
15812
- earcutLinked(a, triangles, dim, minX, minY, invSize);
15813
- earcutLinked(c, triangles, dim, minX, minY, invSize);
15952
+ earcutLinked(a, triangles, dim, minX, minY, invSize, 0);
15953
+ earcutLinked(c, triangles, dim, minX, minY, invSize, 0);
15814
15954
  return;
15815
15955
  }
15816
15956
  b = b.next;
@@ -15832,7 +15972,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15832
15972
  queue.sort(compareX);
15833
15973
  for (i = 0; i < queue.length; i++) {
15834
15974
  outerNode = eliminateHole(queue[i], outerNode);
15835
- outerNode = filterPoints(outerNode, outerNode.next);
15836
15975
  }
15837
15976
  return outerNode;
15838
15977
  }
@@ -15845,9 +15984,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15845
15984
  return outerNode;
15846
15985
  }
15847
15986
  var bridgeReverse = splitPolygon(bridge, hole);
15848
- var filteredBridge = filterPoints(bridge, bridge.next);
15849
15987
  filterPoints(bridgeReverse, bridgeReverse.next);
15850
- return outerNode === bridge ? filteredBridge : outerNode;
15988
+ return filterPoints(bridge, bridge.next);
15851
15989
  }
15852
15990
  function findHoleBridge(hole, outerNode) {
15853
15991
  var p = outerNode, hx = hole.x, hy = hole.y, qx = -Infinity, m;
@@ -15856,15 +15994,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15856
15994
  var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);
15857
15995
  if (x <= hx && x > qx) {
15858
15996
  qx = x;
15997
+ m = p.x < p.next.x ? p : p.next;
15859
15998
  if (x === hx) {
15860
- if (hy === p.y) {
15861
- return p;
15862
- }
15863
- if (hy === p.next.y) {
15864
- return p.next;
15865
- }
15999
+ return m;
15866
16000
  }
15867
- m = p.x < p.next.x ? p : p.next;
15868
16001
  }
15869
16002
  }
15870
16003
  p = p.next;
@@ -15872,9 +16005,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15872
16005
  if (!m) {
15873
16006
  return null;
15874
16007
  }
15875
- if (hx === qx) {
15876
- return m;
15877
- }
15878
16008
  var stop = m, mx = m.x, my = m.y, tanMin = Infinity, tan;
15879
16009
  p = m;
15880
16010
  do {
@@ -15895,7 +16025,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15895
16025
  function indexCurve(start, minX, minY, invSize) {
15896
16026
  var p = start;
15897
16027
  do {
15898
- if (p.z === null) {
16028
+ if (p.z === 0) {
15899
16029
  p.z = zOrder(p.x, p.y, minX, minY, invSize);
15900
16030
  }
15901
16031
  p.prevZ = p.prev;
@@ -15951,8 +16081,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15951
16081
  return list;
15952
16082
  }
15953
16083
  function zOrder(x, y, minX, minY, invSize) {
15954
- x = 32767 * (x - minX) * invSize;
15955
- y = 32767 * (y - minY) * invSize;
16084
+ x = (x - minX) * invSize | 0;
16085
+ y = (y - minY) * invSize | 0;
15956
16086
  x = (x | x << 8) & 16711935;
15957
16087
  x = (x | x << 4) & 252645135;
15958
16088
  x = (x | x << 2) & 858993459;
@@ -15974,7 +16104,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15974
16104
  return leftmost;
15975
16105
  }
15976
16106
  function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {
15977
- return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 && (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 && (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;
16107
+ return (cx - px) * (ay - py) >= (ax - px) * (cy - py) && (ax - px) * (by - py) >= (bx - px) * (ay - py) && (bx - px) * (cy - py) >= (cx - px) * (by - py);
15978
16108
  }
15979
16109
  function isValidDiagonal(a, b) {
15980
16110
  return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && (area(a.prev, a, b.prev) || area(a, b.prev, b)) || equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0);
@@ -16077,7 +16207,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
16077
16207
  this.y = y;
16078
16208
  this.prev = null;
16079
16209
  this.next = null;
16080
- this.z = null;
16210
+ this.z = 0;
16081
16211
  this.prevZ = null;
16082
16212
  this.nextZ = null;
16083
16213
  this.steiner = false;
@@ -19078,12 +19208,14 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19078
19208
  var stretchX = ref.stretchX;
19079
19209
  var stretchY = ref.stretchY;
19080
19210
  var content = ref.content;
19211
+ var contentMatch = ref.contentMatch;
19081
19212
  this.paddedRect = paddedRect;
19082
19213
  this.pixelRatio = pixelRatio;
19083
19214
  this.stretchX = stretchX;
19084
19215
  this.stretchY = stretchY;
19085
19216
  this.content = content;
19086
19217
  this.version = version;
19218
+ this.contentMatch = contentMatch;
19087
19219
  };
19088
19220
  var prototypeAccessors = {
19089
19221
  tl: { configurable: true },
@@ -19759,6 +19891,36 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19759
19891
  right: x2
19760
19892
  };
19761
19893
  }
19894
+ function applyContentMatch(shapedIcon) {
19895
+ var iconLeft = shapedIcon.left;
19896
+ var iconTop = shapedIcon.top;
19897
+ var iconWidth = shapedIcon.right - iconLeft;
19898
+ var iconHeight = shapedIcon.bottom - iconTop;
19899
+ var contentWidth = shapedIcon.image.content[2] - shapedIcon.image.content[0];
19900
+ var contentHeight = shapedIcon.image.content[3] - shapedIcon.image.content[1];
19901
+ if (contentHeight !== 0 && iconWidth !== 0 && iconHeight !== 0) {
19902
+ var contentAspectRatio = contentWidth / contentHeight;
19903
+ if (shapedIcon.image.contentMatch === 'height') {
19904
+ if (iconWidth / iconHeight < contentAspectRatio) {
19905
+ var newIconWidth = iconHeight * contentAspectRatio;
19906
+ iconLeft *= newIconWidth / iconWidth;
19907
+ iconWidth = newIconWidth;
19908
+ }
19909
+ } else if (shapedIcon.image.contentMatch === 'width') {
19910
+ if (contentAspectRatio !== 0 && iconWidth / iconHeight > contentAspectRatio) {
19911
+ var newIconHeight = iconWidth / contentAspectRatio;
19912
+ iconTop *= newIconHeight / newIconHeight;
19913
+ iconHeight = newIconHeight;
19914
+ }
19915
+ }
19916
+ }
19917
+ return {
19918
+ x1: iconLeft,
19919
+ y1: iconTop,
19920
+ x2: iconLeft + iconWidth,
19921
+ y2: iconTop + iconHeight
19922
+ };
19923
+ }
19762
19924
  function fitIconToText(shapedIcon, shapedText, textFit, padding, iconOffset, fontScale) {
19763
19925
  var image = shapedIcon.image;
19764
19926
  var collisionPadding;
@@ -20079,8 +20241,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
20079
20241
  var pixelRatio = image.pixelRatio;
20080
20242
  var imageWidth = image.paddedRect.w - 2 * border$1;
20081
20243
  var imageHeight = image.paddedRect.h - 2 * border$1;
20082
- var iconWidth = shapedIcon.right - shapedIcon.left;
20083
- var iconHeight = shapedIcon.bottom - shapedIcon.top;
20244
+ var icon = {
20245
+ x1: shapedIcon.left,
20246
+ y1: shapedIcon.top,
20247
+ x2: shapedIcon.right,
20248
+ y2: shapedIcon.bottom
20249
+ };
20084
20250
  var stretchX = image.stretchX || [[
20085
20251
  0,
20086
20252
  imageWidth
@@ -20106,23 +20272,32 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
20106
20272
  var fixedContentHeight = fixedHeight;
20107
20273
  if (image.content && hasIconTextFit) {
20108
20274
  var content = image.content;
20275
+ var contentWidth = content[2] - content[0];
20276
+ var contentHeight = content[3] - content[1];
20277
+ if (image.contentMatch && image.content) {
20278
+ icon = applyContentMatch(shapedIcon);
20279
+ }
20109
20280
  stretchOffsetX = sumWithinRange(stretchX, 0, content[0]);
20110
20281
  stretchOffsetY = sumWithinRange(stretchY, 0, content[1]);
20111
20282
  stretchContentWidth = sumWithinRange(stretchX, content[0], content[2]);
20112
20283
  stretchContentHeight = sumWithinRange(stretchY, content[1], content[3]);
20113
20284
  fixedOffsetX = content[0] - stretchOffsetX;
20114
20285
  fixedOffsetY = content[1] - stretchOffsetY;
20115
- fixedContentWidth = content[2] - content[0] - stretchContentWidth;
20116
- fixedContentHeight = content[3] - content[1] - stretchContentHeight;
20286
+ fixedContentWidth = contentWidth - stretchContentWidth;
20287
+ fixedContentHeight = contentHeight - stretchContentHeight;
20117
20288
  }
20289
+ var iconLeft = icon.x1;
20290
+ var iconTop = icon.y1;
20291
+ var iconWidth = icon.x2 - iconLeft;
20292
+ var iconHeight = icon.y2 - iconTop;
20118
20293
  var makeBox = function (left, top, right, bottom) {
20119
- var leftEm = getEmOffset(left.stretch - stretchOffsetX, stretchContentWidth, iconWidth, shapedIcon.left);
20294
+ var leftEm = getEmOffset(left.stretch - stretchOffsetX, stretchContentWidth, iconWidth, iconLeft);
20120
20295
  var leftPx = getPxOffset(left.fixed - fixedOffsetX, fixedContentWidth, left.stretch, stretchWidth);
20121
- var topEm = getEmOffset(top.stretch - stretchOffsetY, stretchContentHeight, iconHeight, shapedIcon.top);
20296
+ var topEm = getEmOffset(top.stretch - stretchOffsetY, stretchContentHeight, iconHeight, iconTop);
20122
20297
  var topPx = getPxOffset(top.fixed - fixedOffsetY, fixedContentHeight, top.stretch, stretchHeight);
20123
- var rightEm = getEmOffset(right.stretch - stretchOffsetX, stretchContentWidth, iconWidth, shapedIcon.left);
20298
+ var rightEm = getEmOffset(right.stretch - stretchOffsetX, stretchContentWidth, iconWidth, iconLeft);
20124
20299
  var rightPx = getPxOffset(right.fixed - fixedOffsetX, fixedContentWidth, right.stretch, stretchWidth);
20125
- var bottomEm = getEmOffset(bottom.stretch - stretchOffsetY, stretchContentHeight, iconHeight, shapedIcon.top);
20300
+ var bottomEm = getEmOffset(bottom.stretch - stretchOffsetY, stretchContentHeight, iconHeight, iconTop);
20126
20301
  var bottomPx = getPxOffset(bottom.fixed - fixedOffsetY, fixedContentHeight, bottom.stretch, stretchHeight);
20127
20302
  var tl = new pointGeometry(leftEm, topEm);
20128
20303
  var tr = new pointGeometry(rightEm, topEm);
@@ -20368,33 +20543,39 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
20368
20543
  this.circleDiameter = height;
20369
20544
  }
20370
20545
  } else {
20371
- var y1 = shaped.top * boxScale - padding;
20372
- var y2 = shaped.bottom * boxScale + padding;
20373
- var x1 = shaped.left * boxScale - padding;
20374
- var x2 = shaped.right * boxScale + padding;
20546
+ var icon = shaped.image && shaped.image.contentMatch && shaped.image.content ? applyContentMatch(shaped) : {
20547
+ x1: shaped.left,
20548
+ y1: shaped.top,
20549
+ x2: shaped.right,
20550
+ y2: shaped.bottom
20551
+ };
20552
+ icon.y1 = icon.y1 * boxScale - padding[0];
20553
+ icon.x2 = icon.x2 * boxScale + padding[1];
20554
+ icon.y2 = icon.y2 * boxScale + padding[2];
20555
+ icon.x1 = icon.x1 * boxScale - padding[3];
20375
20556
  var collisionPadding$1 = shaped.collisionPadding;
20376
20557
  if (collisionPadding$1) {
20377
- x1 -= collisionPadding$1[0] * boxScale;
20378
- y1 -= collisionPadding$1[1] * boxScale;
20379
- x2 += collisionPadding$1[2] * boxScale;
20380
- y2 += collisionPadding$1[3] * boxScale;
20558
+ icon.x1 -= collisionPadding$1[0] * boxScale;
20559
+ icon.y1 -= collisionPadding$1[1] * boxScale;
20560
+ icon.x2 += collisionPadding$1[2] * boxScale;
20561
+ icon.y2 += collisionPadding$1[3] * boxScale;
20381
20562
  }
20382
20563
  if (rotate) {
20383
- var tl = new pointGeometry(x1, y1);
20384
- var tr = new pointGeometry(x2, y1);
20385
- var bl = new pointGeometry(x1, y2);
20386
- var br = new pointGeometry(x2, y2);
20564
+ var tl = new pointGeometry(icon.x1, icon.y1);
20565
+ var tr = new pointGeometry(icon.x2, icon.y1);
20566
+ var bl = new pointGeometry(icon.x1, icon.y2);
20567
+ var br = new pointGeometry(icon.x2, icon.y2);
20387
20568
  var rotateRadians = rotate * Math.PI / 180;
20388
20569
  tl._rotate(rotateRadians);
20389
20570
  tr._rotate(rotateRadians);
20390
20571
  bl._rotate(rotateRadians);
20391
20572
  br._rotate(rotateRadians);
20392
- x1 = Math.min(tl.x, tr.x, bl.x, br.x);
20393
- x2 = Math.max(tl.x, tr.x, bl.x, br.x);
20394
- y1 = Math.min(tl.y, tr.y, bl.y, br.y);
20395
- y2 = Math.max(tl.y, tr.y, bl.y, br.y);
20573
+ icon.x1 = Math.min(tl.x, tr.x, bl.x, br.x);
20574
+ icon.x2 = Math.max(tl.x, tr.x, bl.x, br.x);
20575
+ icon.y1 = Math.min(tl.y, tr.y, bl.y, br.y);
20576
+ icon.y2 = Math.max(tl.y, tr.y, bl.y, br.y);
20396
20577
  }
20397
- collisionBoxArray.emplaceBack(anchor.x, anchor.y, x1, y1, x2, y2, featureIndex, sourceLayerIndex, bucketIndex);
20578
+ collisionBoxArray.emplaceBack(anchor.x, anchor.y, icon.x1, icon.y1, icon.x2, icon.y2, featureIndex, sourceLayerIndex, bucketIndex);
20398
20579
  }
20399
20580
  this.boxEndIndex = collisionBoxArray.length;
20400
20581
  };
@@ -20822,7 +21003,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
20822
21003
  var layout = bucket.layers[0].layout;
20823
21004
  var iconOffset = layout.get('icon-offset').evaluate(feature, {}, canonical);
20824
21005
  var defaultHorizontalShaping = getDefaultHorizontalShaping(shapedTextOrientations.horizontal);
20825
- var glyphSize = 24, fontScale = layoutTextSize / glyphSize, textBoxScale = bucket.tilePixelRatio * fontScale, textMaxBoxScale = bucket.tilePixelRatio * textMaxSize / glyphSize, iconBoxScale = bucket.tilePixelRatio * layoutIconSize, symbolMinDistance = bucket.tilePixelRatio * layout.get('symbol-spacing'), textPadding = layout.get('text-padding') * bucket.tilePixelRatio, iconPadding = layout.get('icon-padding') * bucket.tilePixelRatio, textMaxAngle = layout.get('text-max-angle') / 180 * Math.PI, textAlongLine = layout.get('text-rotation-alignment') === 'map' && layout.get('symbol-placement') !== 'point', iconAlongLine = layout.get('icon-rotation-alignment') === 'map' && layout.get('symbol-placement') !== 'point', symbolPlacement = layout.get('symbol-placement'), textRepeatDistance = symbolMinDistance / 2;
21006
+ var glyphSize = 24, fontScale = layoutTextSize / glyphSize, textBoxScale = bucket.tilePixelRatio * fontScale, textMaxBoxScale = bucket.tilePixelRatio * textMaxSize / glyphSize, iconBoxScale = bucket.tilePixelRatio * layoutIconSize, symbolMinDistance = bucket.tilePixelRatio * layout.get('symbol-spacing'), textPadding = layout.get('text-padding') * bucket.tilePixelRatio, iconPadding = getIconPadding(layout, feature, canonical, bucket.tilePixelRatio), textMaxAngle = layout.get('text-max-angle') / 180 * Math.PI, textAlongLine = layout.get('text-rotation-alignment') === 'map' && layout.get('symbol-placement') !== 'point', iconAlongLine = layout.get('icon-rotation-alignment') === 'map' && layout.get('symbol-placement') !== 'point', symbolPlacement = layout.get('symbol-placement'), textRepeatDistance = symbolMinDistance / 2;
20826
21007
  var iconTextFit = layout.get('icon-text-fit');
20827
21008
  var verticallyShapedIcon;
20828
21009
  if (shapedIcon && iconTextFit !== 'none') {
@@ -20837,7 +21018,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
20837
21018
  if (anchor.x < 0 || anchor.x >= EXTENT$1 || anchor.y < 0 || anchor.y >= EXTENT$1) {
20838
21019
  return;
20839
21020
  }
20840
- addSymbol(bucket, anchor, line, shapedTextOrientations, shapedIcon, imageMap, verticallyShapedIcon, bucket.layers[0], bucket.collisionBoxArray, feature.index, feature.sourceLayerIndex, bucket.index, textBoxScale, textPadding, textAlongLine, textOffset, iconBoxScale, iconPadding, iconAlongLine, iconOffset, feature, sizes, isSDFIcon, canonical, layoutTextSize);
21021
+ addSymbol(bucket, anchor, line, shapedTextOrientations, shapedIcon, imageMap, verticallyShapedIcon, bucket.layers[0], bucket.collisionBoxArray, feature.index, feature.sourceLayerIndex, bucket.index, textBoxScale, [
21022
+ textPadding,
21023
+ textPadding,
21024
+ textPadding,
21025
+ textPadding
21026
+ ], textAlongLine, textOffset, iconBoxScale, iconPadding, iconAlongLine, iconOffset, feature, sizes, isSDFIcon, canonical, layoutTextSize);
20841
21027
  };
20842
21028
  if (symbolPlacement === 'line') {
20843
21029
  for (var i$1 = 0, list$1 = clipLine(feature.geometry, 0, 0, EXTENT$1, EXTENT$1); i$1 < list$1.length; i$1 += 1) {
@@ -21638,7 +21824,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21638
21824
  'icon-text-fit-padding': new DataConstantProperty(spec['layout_symbol']['icon-text-fit-padding']),
21639
21825
  'icon-image': new DataDrivenProperty(spec['layout_symbol']['icon-image']),
21640
21826
  'icon-rotate': new DataDrivenProperty(spec['layout_symbol']['icon-rotate']),
21641
- 'icon-padding': new DataConstantProperty(spec['layout_symbol']['icon-padding']),
21827
+ 'icon-padding': new DataDrivenProperty(spec['layout_symbol']['icon-padding']),
21642
21828
  'icon-keep-upright': new DataConstantProperty(spec['layout_symbol']['icon-keep-upright']),
21643
21829
  'icon-offset': new DataDrivenProperty(spec['layout_symbol']['icon-offset']),
21644
21830
  'icon-anchor': new DataDrivenProperty(spec['layout_symbol']['icon-anchor']),
@@ -21851,6 +22037,18 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21851
22037
  };
21852
22038
  return SymbolStyleLayer;
21853
22039
  }(StyleLayer);
22040
+ function getIconPadding(layout, feature, canonical, pixelRatio) {
22041
+ if (pixelRatio === void 0)
22042
+ pixelRatio = 1;
22043
+ var result = layout.get('icon-padding').evaluate(feature, {}, canonical);
22044
+ var values = result && result.values;
22045
+ return [
22046
+ values[0] * pixelRatio,
22047
+ values[1] * pixelRatio,
22048
+ values[2] * pixelRatio,
22049
+ values[3] * pixelRatio
22050
+ ];
22051
+ }
21854
22052
 
21855
22053
  var paint$8 = new Properties({
21856
22054
  'background-color': new DataConstantProperty(spec['paint_background']['background-color']),
@@ -23970,6 +24168,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
23970
24168
  }
23971
24169
  workerTile.vectorTile = response.vectorTile;
23972
24170
  workerTile.parse(response.vectorTile, this$1.layerIndex, this$1.availableImages, this$1.actor, function (err, result) {
24171
+ var reloadCallback = workerTile.reloadCallback;
24172
+ if (workerTile.reloadCallback) {
24173
+ delete workerTile.reloadCallback;
24174
+ workerTile.parse(workerTile.vectorTile, this$1.layerIndex, this$1.availableImages, this$1.actor, reloadCallback);
24175
+ }
23973
24176
  if (err || !result) {
23974
24177
  return callback(err);
23975
24178
  }
@@ -24758,7 +24961,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
24758
24961
  }
24759
24962
  };
24760
24963
  Supercluster.prototype._limitZoom = function _limitZoom(z) {
24761
- return Math.max(this.options.minZoom, Math.min(+z, this.options.maxZoom + 1));
24964
+ return Math.max(this.options.minZoom, Math.min(Math.floor(+z), this.options.maxZoom + 1));
24762
24965
  };
24763
24966
  Supercluster.prototype._cluster = function _cluster(points, zoom) {
24764
24967
  var clusters = [];
@@ -24785,7 +24988,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
24785
24988
  numPoints += b.numPoints || 1;
24786
24989
  }
24787
24990
  }
24788
- if (numPoints >= minPoints) {
24991
+ if (numPoints > numPointsOrigin && numPoints >= minPoints) {
24789
24992
  var wx = p.x * numPointsOrigin;
24790
24993
  var wy = p.y * numPointsOrigin;
24791
24994
  var clusterProperties = reduce && numPointsOrigin > 1 ? this._map(p, true) : null;
@@ -26321,6 +26524,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
26321
26524
  var stretchX = ref.stretchX;
26322
26525
  var stretchY = ref.stretchY;
26323
26526
  var content = ref.content;
26527
+ var contentMatch = ref.contentMatch;
26324
26528
  var data = new performance.RGBAImage({
26325
26529
  width: width,
26326
26530
  height: height
@@ -26341,7 +26545,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
26341
26545
  sdf: sdf,
26342
26546
  stretchX: stretchX,
26343
26547
  stretchY: stretchY,
26344
- content: content
26548
+ content: content,
26549
+ contentMatch: contentMatch
26345
26550
  };
26346
26551
  }
26347
26552
  callback(null, result);
@@ -26529,6 +26734,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
26529
26734
  stretchX: image.stretchX,
26530
26735
  stretchY: image.stretchY,
26531
26736
  content: image.content,
26737
+ contentMatch: image.contentMatch,
26532
26738
  hasRenderCallback: Boolean(image.userImage && image.userImage.render)
26533
26739
  };
26534
26740
  } else {
@@ -41116,6 +41322,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
41116
41322
  var stretchX = ref.stretchX;
41117
41323
  var stretchY = ref.stretchY;
41118
41324
  var content = ref.content;
41325
+ var contentMatch = ref.contentMatch;
41119
41326
  this._lazyInitEmptyStyle();
41120
41327
  var version = 0;
41121
41328
  if (image instanceof HTMLImageElement || ImageBitmap && image instanceof ImageBitmap) {
@@ -41132,6 +41339,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
41132
41339
  stretchX: stretchX,
41133
41340
  stretchY: stretchY,
41134
41341
  content: content,
41342
+ contentMatch: contentMatch,
41135
41343
  sdf: sdf,
41136
41344
  version: version
41137
41345
  });
@@ -41151,6 +41359,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
41151
41359
  stretchX: stretchX,
41152
41360
  stretchY: stretchY,
41153
41361
  content: content,
41362
+ contentMatch: contentMatch,
41154
41363
  sdf: sdf,
41155
41364
  version: version,
41156
41365
  userImage: userImage
@@ -43410,7 +43619,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
43410
43619
  return Url;
43411
43620
  }());
43412
43621
 
43413
- var version = "2.2.2";
43622
+ var version = "2.2.4";
43414
43623
 
43415
43624
  /**
43416
43625
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -43451,27 +43660,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
43451
43660
  var tooltipContent = document.createElement("span");
43452
43661
  tooltipContent.innerText = name;
43453
43662
  tooltipContent.classList.add('tooltiptext');
43454
- // mimics default edge tooltip theming
43455
- if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
43456
- tooltipContent.classList.add('dark');
43457
- }
43458
- var themeQuery = window.matchMedia('(prefers-color-scheme: dark)');
43459
- var onThemeChange = function (e) {
43460
- var isDark = e.matches;
43461
- if (isDark && !tooltipContent.classList.contains('dark')) {
43462
- tooltipContent.classList.add('dark');
43463
- }
43464
- else if (!isDark && tooltipContent.classList.contains('dark')) {
43465
- tooltipContent.classList.remove('dark');
43466
- }
43467
- };
43468
- // compensate for browsers where MediaQueryList is not derived from EventTarget (pre iOS13 Safari)
43469
- if (typeof themeQuery.addEventListener === 'function') {
43470
- themeQuery.addEventListener('change', function (e) { return onThemeChange(e); });
43471
- }
43472
- else if (typeof themeQuery.addListener === 'function') {
43473
- themeQuery.addListener(function (e) { return onThemeChange(e); });
43474
- }
43475
43663
  if (navigator.userAgent.indexOf('Edg') != -1) {
43476
43664
  tooltipContent.classList.add('edge');
43477
43665
  }
@@ -47641,6 +47829,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
47641
47829
  }
47642
47830
  });
47643
47831
  container.addEventListener("focusout", function (event) {
47832
+ if (event.target === currStyleButton) {
47833
+ // on focusout from reveal button -> reset the tabIndex on the styleOpsGrid elements that could have been set to -1 on esc key press
47834
+ Array.from(styleOpsGrid.children).forEach(function (e) { return e.removeAttribute('tabIndex'); });
47835
+ }
47644
47836
  if (!(event.relatedTarget instanceof Node && container.contains(event.relatedTarget))) {
47645
47837
  _this.hasFocus = false;
47646
47838
  if (!_this.hasMouse) {
@@ -47655,6 +47847,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
47655
47847
  if (event.keyCode === 27) {
47656
47848
  event.stopPropagation();
47657
47849
  currStyleButton.focus();
47850
+ Array.from(styleOpsGrid.children).forEach(function (e) { return e.setAttribute('tabIndex', "-1"); });
47658
47851
  if (container.classList.contains(StyleControl.Css.inUse)) {
47659
47852
  container.classList.remove(StyleControl.Css.inUse);
47660
47853
  styleOpsGrid.classList.add("hidden-accessible-element");
@@ -57799,6 +57992,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
57799
57992
  defaultRegion: {
57800
57993
  code: "NGT",
57801
57994
  strings: "en/resource.json"
57995
+ },
57996
+ latn: {
57997
+ code: "NGT-Latn",
57998
+ strings: "en/resource.json"
57802
57999
  }
57803
58000
  },
57804
58001
  ar: {
@@ -57845,6 +58042,18 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
57845
58042
  us: {
57846
58043
  code: "en-US",
57847
58044
  strings: "en/resource.json"
58045
+ },
58046
+ au: {
58047
+ code: "en-AU",
58048
+ strings: "en/resource.json"
58049
+ },
58050
+ gb: {
58051
+ code: "en-GB",
58052
+ strings: "en/resource.json"
58053
+ },
58054
+ nz: {
58055
+ code: "en-NZ",
58056
+ strings: "en/resource.json"
57848
58057
  }
57849
58058
  },
57850
58059
  es: {
@@ -57970,14 +58179,31 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
57970
58179
  }
57971
58180
  },
57972
58181
  zh: {
58182
+ // per https://microsoft.sharepoint.com/sites/globalreadiness/SitePages/Language-fallback.aspx
58183
+ // Chinese - Neutral (zh) fallbacks to en-US
57973
58184
  defaultRegion: {
57974
- code: "zh-Hant",
57975
- strings: "zh-tw/resource.json"
58185
+ code: "zh",
58186
+ strings: "en/resource.json"
58187
+ }
58188
+ },
58189
+ "zh-hans": {
58190
+ defaultRegion: {
58191
+ code: "zh-Hans",
58192
+ strings: "zh-cn/resource.json"
58193
+ },
58194
+ cn: {
58195
+ code: "zh-Hans-CN",
58196
+ strings: "zh-cn/resource.json"
57976
58197
  }
57977
58198
  },
57978
58199
  "zh-hant": {
58200
+ // per discussion with global readiness team, we were explicitly asked to not fallback zh-hant to zh-tw
57979
58201
  defaultRegion: {
57980
58202
  code: "zh-Hant",
58203
+ strings: "en/resource.json"
58204
+ },
58205
+ tw: {
58206
+ code: "zh-Hant-TW",
57981
58207
  strings: "zh-tw/resource.json"
57982
58208
  }
57983
58209
  }
@@ -58606,7 +58832,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
58606
58832
  /**
58607
58833
  * Specifies which set of geopolitically disputed borders and labels are displayed on the map. The View parameter (also referred to as “user region parameter”) is a 2-letter ISO-3166 Country Code that will show the correct maps for that country/region. Country/Regions that are not on the View list or if unspecified will default to the “Unified” View.
58608
58834
  * Please see the supported [Views]{@link https://aka.ms/AzureMapsLocalizationViews }.
58609
- * It is your responsibility to determine the location of your users, and then set the View parameter correctly for that location. The View parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping, of the country where maps, images and other data and third party content that You are authorized to access via Azure Maps is made available.
58835
+ * It is your responsibility to determine the location of your users, and then set the View parameter correctly for that location. The View parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping, of the country/region where maps, images and other data and third party content that You are authorized to access via Azure Maps is made available.
58610
58836
  * @param view The new default view
58611
58837
  */
58612
58838
  function setView(view) {
@@ -69384,11 +69610,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
69384
69610
  // Translations for oceans: https://en.wikipedia.org/wiki/List_of_alternative_names_for_oceans
69385
69611
  this._preloadedCache.add(lang);
69386
69612
  var oceanConfig = {
69387
- source: ["Ocean label", "Ocean name"],
69613
+ source: [],
69388
69614
  labelType: "water",
69389
69615
  minZoom: 0,
69390
69616
  radius: 3950000,
69391
- polygonSources: ["Ocean", "Ocean or sea"]
69617
+ polygonSources: [] // doesn't affect the cache key
69392
69618
  };
69393
69619
  var shortLang = lang;
69394
69620
  var index = shortLang.indexOf("-");
@@ -69484,6 +69710,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
69484
69710
  }
69485
69711
  return ar;
69486
69712
  };
69713
+ var __spreadArray$2 = (window && window.__spreadArray) || function (to, from) {
69714
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
69715
+ to[j] = from[i];
69716
+ return to;
69717
+ };
69487
69718
  /**
69488
69719
  * This class analyizes the current view of a map and provides a description for use by accessibilty tools.
69489
69720
  * TODO: Use services when in GeoPol regions. (Kasmir) or when user region sensitive.
@@ -69520,8 +69751,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
69520
69751
  this._minRoadDistance = 25;
69521
69752
  // Minium distance in pixels a second road must be in order to be considered an intersection.
69522
69753
  this._minIntersectionPixelDistance = 50;
69523
- // The vector tile source id for Azure Maps.
69524
- this._baseVectorTileSourceId = "microsoft.base";
69525
69754
  /*
69526
69755
  * Show details based on zoom level.
69527
69756
  *
@@ -69544,7 +69773,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
69544
69773
  * Vector Tile source layers: https://developer.tomtom.com/maps-api/maps-api-documentation-vector/tile
69545
69774
  */
69546
69775
  // Configuration for label extraction.
69547
- this._lableConfig = [
69776
+ this._labelConfig = [
69548
69777
  // Water labels
69549
69778
  {
69550
69779
  source: ["Ocean label", "Ocean name"],
@@ -69678,10 +69907,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
69678
69907
  polygonSources: ["Reservation"]
69679
69908
  }
69680
69909
  ];
69681
- // Name of all polygon layers in which we want to do an intersection test with.
69682
- this._polygonStyleLayer = ["National or state park", "National park", "Reservation", "Airport",
69683
- "Runway", "Stadium", "University", "Zoo", "Shopping", "Hospital", "Amusement park", "Ocean", "Sea",
69684
- "Ocean or sea"];
69685
69910
  // Name of all label types to cache.
69686
69911
  this._labelCache = new Set(["city", "state", "country", "water", "majorPoi"]);
69687
69912
  // Name of all road source layers.
@@ -69943,6 +70168,20 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
69943
70168
  this._map.events.addOnce("idle", function () {
69944
70169
  if (!_this._disposed) {
69945
70170
  _this._updateCam(true);
70171
+ // Find the id of the vector tile source being used.
70172
+ _this._baseVectorTileSourceId = MapViewDescriptor._baseVectorTileSourceIds.find(function (id) { return _this._map.sources.getById(id); });
70173
+ // Set the label config based on the vector tile source.
70174
+ if (_this._baseVectorTileSourceId === "bing-mvt") {
70175
+ _this._labelConfig = MapViewDescriptor._labelConfigBing;
70176
+ _this._roadLayers = MapViewDescriptor._roadLayersBing;
70177
+ }
70178
+ // Derive polygon layers from the label config.
70179
+ _this._polygonStyleLayer = _this._labelConfig.reduce(function (acc, cur) {
70180
+ if (cur.polygonSources) {
70181
+ acc.push.apply(acc, __spreadArray$2([], __read$6(cur.polygonSources)));
70182
+ }
70183
+ return acc;
70184
+ }, []);
69946
70185
  // Add event listeners directly to mapbox because we will be using custom event data.
69947
70186
  // We don't automatically forward all properties of a mapbox event, so the custom data would be lost.
69948
70187
  var baseMap = _this._map._getMap();
@@ -70040,8 +70279,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70040
70279
  info_1 = {};
70041
70280
  cPx_1 = this._map.positionsToPixels([cam.center])[0];
70042
70281
  ErrorHandler.tryCatch(this._map, function () {
70043
- intersects_1 = _this._map._getMap().queryRenderedFeatures(cPx_1, {
70044
- layers: _this._polygonStyleLayer,
70282
+ var map = _this._map._getMap();
70283
+ intersects_1 = map.queryRenderedFeatures(cPx_1, {
70284
+ layers: _this._polygonStyleLayer.filter(function (layerId) { return map.getLayer(layerId); }),
70045
70285
  filter: ["==", ["geometry-type"], "Polygon"]
70046
70286
  });
70047
70287
  }, function () { });
@@ -70051,8 +70291,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70051
70291
  }
70052
70292
  intersectingType_1 = null;
70053
70293
  // Loop through each label config and try and retireve details about the map view.
70054
- for (i = 0, cnt = this._lableConfig.length; i < cnt; i++) {
70055
- layerInfo = this._lableConfig[i];
70294
+ for (i = 0, cnt = this._labelConfig.length; i < cnt; i++) {
70295
+ layerInfo = this._labelConfig[i];
70056
70296
  if (cam.zoom >= layerInfo.minZoom) {
70057
70297
  // If the layer info has polygons defined, do an intersection test for matching.
70058
70298
  if (layerInfo.polygonSources) {
@@ -70152,7 +70392,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70152
70392
  // Loop through the label sources.
70153
70393
  for (var i = 0, len = layerInfo.source.length; i < len; i++) {
70154
70394
  var params = {
70155
- sourceLayer: layerInfo.source[i]
70395
+ sourceLayer: layerInfo.source[i],
70396
+ filter: ["has", "name"]
70156
70397
  };
70157
70398
  var labels = this._map._getMap().querySourceFeatures(this._baseVectorTileSourceId, params);
70158
70399
  var closest = null;
@@ -70229,21 +70470,22 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70229
70470
  }
70230
70471
  if (closestRoad) {
70231
70472
  // Capture state and country codes from the closest road to ensure we have the most accurate values.
70232
- if (!info.country) {
70473
+ // Note: bing tiles do not have country_code and country_subdivision in road features.
70474
+ if (!info.country && closestRoad.properties.country_code) {
70233
70475
  info.country = closestRoad.properties.country_code;
70234
70476
  info.countryDis = 0;
70235
70477
  MapViewDescriptor._labelCache.cache(info.country, {
70236
- source: ["Country name"],
70478
+ source: [],
70237
70479
  labelType: "country",
70238
70480
  radius: 5000,
70239
70481
  minZoom: 0
70240
70482
  }, cPoint.geometry.coordinates, lang);
70241
70483
  }
70242
- if (!info.state) {
70484
+ if (!info.state && closestRoad.properties.country_subdivision) {
70243
70485
  info.state = closestRoad.properties.country_subdivision;
70244
70486
  info.stateDis = 0;
70245
70487
  MapViewDescriptor._labelCache.cache(info.state, {
70246
- source: ["State name"],
70488
+ source: [],
70247
70489
  labelType: "state",
70248
70490
  radius: 5000,
70249
70491
  minZoom: 4
@@ -70498,7 +70740,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70498
70740
  if (a.country) {
70499
70741
  info.country = a.country;
70500
70742
  MapViewDescriptor._labelCache.cache(info.country, {
70501
- source: ["Country name"],
70743
+ source: [],
70502
70744
  labelType: "country",
70503
70745
  radius: 5000,
70504
70746
  minZoom: 0
@@ -70507,7 +70749,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70507
70749
  if (a.countrySubdivision) {
70508
70750
  info.state = a.countrySubdivision;
70509
70751
  MapViewDescriptor._labelCache.cache(info.state, {
70510
- source: ["State name"],
70752
+ source: [],
70511
70753
  labelType: "state",
70512
70754
  radius: 5000,
70513
70755
  minZoom: 4
@@ -70516,7 +70758,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70516
70758
  if (a.municipality) {
70517
70759
  info.city = a.municipality;
70518
70760
  MapViewDescriptor._labelCache.cache(info.state, {
70519
- source: ["Small city"],
70761
+ source: [],
70520
70762
  labelType: "city",
70521
70763
  radius: 1000,
70522
70764
  minZoom: 10
@@ -70549,6 +70791,118 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70549
70791
  if (increment === void 0) { increment = 1; }
70550
70792
  return Math.round(val / increment) * increment;
70551
70793
  };
70794
+ // Ids of vector tile sources for different style APIs.
70795
+ MapViewDescriptor._baseVectorTileSourceIds = ["microsoft.base", "vectorTiles", "bing-mvt"];
70796
+ // Configuration for label extraction of Bing tiles.
70797
+ MapViewDescriptor._labelConfigBing = [
70798
+ // Water labels
70799
+ {
70800
+ source: ["water_feature"],
70801
+ labelType: "water",
70802
+ minZoom: 0,
70803
+ radius: 3950000,
70804
+ polygonSources: ["generic_water_fill"]
70805
+ },
70806
+ {
70807
+ source: ["water_feature"],
70808
+ labelType: "water",
70809
+ minZoom: 3,
70810
+ radius: 1000000,
70811
+ polygonSources: ["generic_water_fill"]
70812
+ },
70813
+ // Country labels
70814
+ {
70815
+ source: ["country_region"],
70816
+ labelType: "country",
70817
+ minZoom: 0,
70818
+ maxZoom: 5,
70819
+ radius: 300000
70820
+ },
70821
+ // State labels
70822
+ {
70823
+ source: ["admin_division1"],
70824
+ labelType: "state",
70825
+ minZoom: 4,
70826
+ maxZoom: 7,
70827
+ radius: 300000
70828
+ },
70829
+ // City labels
70830
+ {
70831
+ source: ["populated_place"],
70832
+ labelType: "city",
70833
+ minZoom: 8,
70834
+ radius: 40000
70835
+ },
70836
+ // Neighbourhood labels
70837
+ {
70838
+ source: ["neighborhood"],
70839
+ labelType: "neighbourhood",
70840
+ minZoom: 12,
70841
+ radius: 6000
70842
+ },
70843
+ // POI labels
70844
+ {
70845
+ source: ["amusement_park"],
70846
+ labelType: "poi",
70847
+ minZoom: 14,
70848
+ radius: 2000,
70849
+ polygonSources: ["amusement_park_fill"]
70850
+ },
70851
+ {
70852
+ source: ["hospital"],
70853
+ labelType: "poi",
70854
+ minZoom: 14,
70855
+ radius: 1000,
70856
+ polygonSources: ["hospital_fill"]
70857
+ },
70858
+ {
70859
+ source: ["shopping_center"],
70860
+ labelType: "poi",
70861
+ minZoom: 14,
70862
+ radius: 1000,
70863
+ polygonSources: ["shopping_center_fill"]
70864
+ },
70865
+ {
70866
+ source: ["stadium"],
70867
+ labelType: "poi",
70868
+ minZoom: 14,
70869
+ radius: 1000,
70870
+ polygonSources: ["stadium_fill"]
70871
+ },
70872
+ {
70873
+ source: ["higher_education_facility", "school"],
70874
+ labelType: "poi",
70875
+ minZoom: 14,
70876
+ radius: 1000,
70877
+ polygonSources: ["higher_education_facility_fill", "school_fill"]
70878
+ },
70879
+ {
70880
+ source: ["zoo"],
70881
+ labelType: "poi",
70882
+ minZoom: 14,
70883
+ radius: 1000,
70884
+ polygonSources: ["zoo_fill"]
70885
+ },
70886
+ // Major Poi labels
70887
+ {
70888
+ source: ["airport", "airport_terminal"],
70889
+ labelType: "majorPoi",
70890
+ minZoom: 11,
70891
+ radius: 3000,
70892
+ polygonSources: ["airport_terminal_fill", "airport_fill-merged7", "airport_runway_fill"]
70893
+ },
70894
+ {
70895
+ source: ["reserve"],
70896
+ labelType: "majorPoi",
70897
+ minZoom: 7,
70898
+ radius: 15000,
70899
+ polygonSources: ["generic_reserve_fill", "land_cover_forest_fill"]
70900
+ }
70901
+ ];
70902
+ // Name of all road source layers of Bing tiles.
70903
+ MapViewDescriptor._roadLayersBing = new Set([
70904
+ "road"
70905
+ ]);
70552
70906
  return MapViewDescriptor;
70553
70907
  }());
70554
70908
 
@@ -74306,7 +74660,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
74306
74660
  }
74307
74661
  return ar;
74308
74662
  };
74309
- var __spreadArray$2 = (window && window.__spreadArray) || function (to, from) {
74663
+ var __spreadArray$3 = (window && window.__spreadArray) || function (to, from) {
74310
74664
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
74311
74665
  to[j] = from[i];
74312
74666
  return to;
@@ -74324,7 +74678,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
74324
74678
  'data-azure-maps-attribution-order',
74325
74679
  'data-azure-maps-attribution-dynamic'
74326
74680
  ];
74327
- var allowedAttributionAttributes = __spreadArray$2([
74681
+ var allowedAttributionAttributes = __spreadArray$3([
74328
74682
  'href'
74329
74683
  ], __read$7(attributionRuleAttributes));
74330
74684
  var AttributionRuleProxy = /** @class */ (function () {
@@ -74549,7 +74903,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
74549
74903
  };
74550
74904
  AttributionRuleProxy.prototype.applyAttributionResponse = function (attributions) {
74551
74905
  var _this = this;
74552
- var copyrights = attributions.map(function (resp) { return resp.copyrights || []; }).reduce(function (flat, copyrights) { return __spreadArray$2(__spreadArray$2([], __read$7(flat)), __read$7(copyrights)); }, []);
74906
+ var copyrights = attributions.map(function (resp) { return resp.copyrights || []; }).reduce(function (flat, copyrights) { return __spreadArray$3(__spreadArray$3([], __read$7(flat)), __read$7(copyrights)); }, []);
74553
74907
  if (copyrights.length == 0) {
74554
74908
  // no attribution for a provided tileset/bbox/z
74555
74909
  return;
@@ -74614,7 +74968,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
74614
74968
  }
74615
74969
  return ar;
74616
74970
  };
74617
- var __spreadArray$3 = (window && window.__spreadArray) || function (to, from) {
74971
+ var __spreadArray$4 = (window && window.__spreadArray) || function (to, from) {
74618
74972
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
74619
74973
  to[j] = from[i];
74620
74974
  return to;
@@ -74735,10 +75089,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
74735
75089
  }, function () { return document.createElement('span'); });
74736
75090
  });
74737
75091
  var registeredRuleSet = new Set(Object.values(registeredRules));
74738
- var redundantRules = new Set(__spreadArray$3([], __read$8(allRules)).filter(function (rule) { return !registeredRuleSet.has(rule); }));
74739
- var redundantElements = new Set(__spreadArray$3([], __read$8(redundantRules)).map(function (rule) { return rule.getElement(); }));
75092
+ var redundantRules = new Set(__spreadArray$4([], __read$8(allRules)).filter(function (rule) { return !registeredRuleSet.has(rule); }));
75093
+ var redundantElements = new Set(__spreadArray$4([], __read$8(redundantRules)).map(function (rule) { return rule.getElement(); }));
74740
75094
  // eject redundant rules associated elements altogether
74741
- __spreadArray$3([], __read$8(redundantElements)).filter(function (elem) { return elem.parentElement !== null; })
75095
+ __spreadArray$4([], __read$8(redundantElements)).filter(function (elem) { return elem.parentElement !== null; })
74742
75096
  .forEach(function (elem) { return elem.parentElement.removeChild(elem); });
74743
75097
  _this.rules = Object.values(registeredRules);
74744
75098
  var attributionsToApply = attributions
@@ -74774,7 +75128,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
74774
75128
  var visibleTextNodes = function (elem) {
74775
75129
  return Array.from(elem.style.display != 'none' ? elem.children : [])
74776
75130
  .map(function (elem) { return visibleTextNodes(elem); })
74777
- .reduce(function (flattened, nodes) { return __spreadArray$3(__spreadArray$3([], __read$8(flattened)), __read$8(nodes)); }, Array.from(elem.style.display != 'none' ? elem.childNodes : []).filter(function (node) { return node.nodeType == node.TEXT_NODE; }));
75131
+ .reduce(function (flattened, nodes) { return __spreadArray$4(__spreadArray$4([], __read$8(flattened)), __read$8(nodes)); }, Array.from(elem.style.display != 'none' ? elem.childNodes : []).filter(function (node) { return node.nodeType == node.TEXT_NODE; }));
74778
75132
  };
74779
75133
  var newRenderContext = _this.virtualContext.cloneNode(true);
74780
75134
  var visibleNodes = visibleTextNodes(newRenderContext);
@@ -74789,7 +75143,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
74789
75143
  // }
74790
75144
  // });
74791
75145
  // strip all predefined keywords
74792
- visibleNodes.forEach(function (node) { return node.textContent = __spreadArray$3([], __read$8(attributionFilters)).reduce(function (target, filter) { return target.replace(filter, '').trim(); }, node.textContent); });
75146
+ visibleNodes.forEach(function (node) { return node.textContent = __spreadArray$4([], __read$8(attributionFilters)).reduce(function (target, filter) { return target.replace(filter, '').trim(); }, node.textContent); });
74793
75147
  // strip year from each node
74794
75148
  // visibleNodes.forEach(node => node.textContent = node.textContent.replace(copyrightYearPattern, '').trim());
74795
75149
  // deduplicate attribution text
@@ -77015,6 +77369,15 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
77015
77369
  }
77016
77370
  return this.initPromise;
77017
77371
  };
77372
+ /**
77373
+ * Cleans up any resources used by the authentication manager.
77374
+ */
77375
+ AuthenticationManager.prototype.dispose = function () {
77376
+ if (this.tokenTimeOutHandle) {
77377
+ clearTimeout(this.tokenTimeOutHandle);
77378
+ this.tokenTimeOutHandle = null;
77379
+ }
77380
+ };
77018
77381
  /**
77019
77382
  * Gets the default auth context to be shared between maps without one specified to them.
77020
77383
  */
@@ -78499,7 +78862,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
78499
78862
  }
78500
78863
  return ar;
78501
78864
  };
78502
- var __spreadArray$4 = (window && window.__spreadArray) || function (to, from) {
78865
+ var __spreadArray$5 = (window && window.__spreadArray) || function (to, from) {
78503
78866
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
78504
78867
  to[j] = from[i];
78505
78868
  return to;
@@ -78935,7 +79298,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
78935
79298
  // If a specified layer hasn't been added to the map throw an error.
78936
79299
  var index = this_1.layerIndex.findIndex(function (l) { return l.getId() === layerId; });
78937
79300
  if (index > -1) {
78938
- layerIds.push.apply(layerIds, __spreadArray$4([], __read$a(this_1.layerIndex[index]._getLayerIds()
79301
+ layerIds.push.apply(layerIds, __spreadArray$5([], __read$a(this_1.layerIndex[index]._getLayerIds()
78939
79302
  .filter(function (id) { return !!_this.map._getMap().getLayer(id); }))));
78940
79303
  }
78941
79304
  else {
@@ -79694,7 +80057,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
79694
80057
  }
79695
80058
  return ar;
79696
80059
  };
79697
- var __spreadArray$5 = (window && window.__spreadArray) || function (to, from) {
80060
+ var __spreadArray$6 = (window && window.__spreadArray) || function (to, from) {
79698
80061
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
79699
80062
  to[j] = from[i];
79700
80063
  return to;
@@ -79769,7 +80132,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
79769
80132
  }
79770
80133
  finally { if (e_1) throw e_1.error; }
79771
80134
  }
79772
- return _super.prototype.merge.apply(this, __spreadArray$5([], __read$b(valuesList)));
80135
+ return _super.prototype.merge.apply(this, __spreadArray$6([], __read$b(valuesList)));
79773
80136
  };
79774
80137
  return CameraBoundsOptions;
79775
80138
  }(Options));
@@ -80258,7 +80621,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
80258
80621
  }
80259
80622
  return ar;
80260
80623
  };
80261
- var __spreadArray$6 = (window && window.__spreadArray) || function (to, from) {
80624
+ var __spreadArray$7 = (window && window.__spreadArray) || function (to, from) {
80262
80625
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
80263
80626
  to[j] = from[i];
80264
80627
  return to;
@@ -80369,7 +80732,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
80369
80732
  /**
80370
80733
  * Specifies which set of geopolitically disputed borders and labels are displayed on the map. The View parameter (also referred to as “user region parameter”) is a 2-letter ISO-3166 Country Code that will show the correct maps for that country/region. Country/Regions that are not on the View list or if unspecified will default to the “Unified” View.
80371
80734
  * Please see the supported [Views]{@link https://aka.ms/AzureMapsLocalizationViews}
80372
- * It is your responsibility to determine the location of your users, and then set the View parameter correctly for that location. The View parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping, of the country where maps, images and other data and third party content that You are authorized to access via Azure Maps is made available.
80735
+ * It is your responsibility to determine the location of your users, and then set the View parameter correctly for that location. The View parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping, of the country/region where maps, images and other data and third party content that You are authorized to access via Azure Maps is made available.
80373
80736
  * default: `undefined`
80374
80737
  * @default undefined
80375
80738
  */
@@ -80417,7 +80780,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
80417
80780
  finally { if (e_1) throw e_1.error; }
80418
80781
  }
80419
80782
  // Then execute the standard merge behavior.
80420
- return _super.prototype.merge.apply(this, __spreadArray$6([], __read$c(valueList)));
80783
+ return _super.prototype.merge.apply(this, __spreadArray$7([], __read$c(valueList)));
80421
80784
  };
80422
80785
  return StyleOptions;
80423
80786
  }(Options));
@@ -80475,7 +80838,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
80475
80838
  }
80476
80839
  return ar;
80477
80840
  };
80478
- var __spreadArray$7 = (window && window.__spreadArray) || function (to, from) {
80841
+ var __spreadArray$8 = (window && window.__spreadArray) || function (to, from) {
80479
80842
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
80480
80843
  to[j] = from[i];
80481
80844
  return to;
@@ -80710,10 +81073,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
80710
81073
  // won't change default behavior in Options as usually that's what desired
80711
81074
  // instead capture it here and reassign.
80712
81075
  var currentTransforms = this._transformers;
80713
- var transformersToMerge = valueList ? valueList.filter(function (value) { return value !== undefined; }).reduce(function (flattened, value) { return __spreadArray$7(__spreadArray$7([], __read$d(flattened)), __read$d(value._transformers || [])); }, []) : [];
81076
+ var transformersToMerge = valueList ? valueList.filter(function (value) { return value !== undefined; }).reduce(function (flattened, value) { return __spreadArray$8(__spreadArray$8([], __read$d(flattened)), __read$d(value._transformers || [])); }, []) : [];
80714
81077
  // Then execute the standard merge behavior.
80715
81078
  // If subscription key auth method isn't being used then the subscription key property should be undefined.
80716
- var merged = _super.prototype.merge.apply(this, __spreadArray$7([], __read$d(valueList)));
81079
+ var merged = _super.prototype.merge.apply(this, __spreadArray$8([], __read$d(valueList)));
80717
81080
  if (merged.authOptions.authType !== exports.AuthenticationType.subscriptionKey) {
80718
81081
  merged["subscription-key"] = merged.subscriptionKey = undefined;
80719
81082
  }
@@ -80725,7 +81088,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
80725
81088
  if (merged.mapConfiguration && typeof merged.mapConfiguration !== 'string') {
80726
81089
  merged.mapConfiguration = __assign$7(__assign$7({}, merged.mapConfiguration), { defaultConfiguration: merged.mapConfiguration.defaultConfiguration || merged.mapConfiguration['defaultStyle'], configurations: merged.mapConfiguration.configurations || merged.mapConfiguration['styles'] });
80727
81090
  }
80728
- this._transformers = __spreadArray$7(__spreadArray$7([], __read$d(currentTransforms || [])), __read$d(transformersToMerge.filter(function (toMerge) { return !currentTransforms.includes(toMerge); })));
81091
+ this._transformers = __spreadArray$8(__spreadArray$8([], __read$d(currentTransforms || [])), __read$d(transformersToMerge.filter(function (toMerge) { return !currentTransforms.includes(toMerge); })));
80729
81092
  if (this.transformRequest && !this._transformers.includes(this.transformRequest)) {
80730
81093
  this._transformers.push(this.transformRequest);
80731
81094
  }
@@ -80973,7 +81336,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
80973
81336
  }
80974
81337
  return ar;
80975
81338
  };
80976
- var __spreadArray$8 = (window && window.__spreadArray) || function (to, from) {
81339
+ var __spreadArray$9 = (window && window.__spreadArray) || function (to, from) {
80977
81340
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
80978
81341
  to[j] = from[i];
80979
81342
  return to;
@@ -81000,6 +81363,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
81000
81363
  * Preserve the map configuration that was used before the indoor map configuration was set
81001
81364
  */
81002
81365
  this.preservedPreindoorMapConfiguration = undefined;
81366
+ /**
81367
+ * The state of the progressive loading
81368
+ */
81369
+ this._progressiveLoadingState = {
81370
+ mapStyle: undefined,
81371
+ pendingVisibilityChange: undefined,
81372
+ };
81003
81373
  this._deferLayerGroupVisibilities = function (layerGroupLayers, initLayerGroups) {
81004
81374
  var validInitLayerGroups = initLayerGroups.filter(function (groupName) { return groupName in layerGroupLayers; });
81005
81375
  // If the initial layer groups are invalid, skip the progressive loading.
@@ -81007,11 +81377,19 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
81007
81377
  return;
81008
81378
  var map = _this.map._getMap();
81009
81379
  var currentZoomLevel = map.getZoom();
81010
- // Select the layers to be deferred
81380
+ var currentMapStyle = _this.map.getStyle().style;
81381
+ // Cancel and release previous pending callback, if any.
81382
+ if (_this._progressiveLoadingState.pendingVisibilityChange) {
81383
+ _this.map.events.remove('load', _this._progressiveLoadingState.pendingVisibilityChange);
81384
+ _this._progressiveLoadingState.pendingVisibilityChange = null;
81385
+ }
81386
+ // Keep the current map style for future comparison.
81387
+ _this._progressiveLoadingState.mapStyle = currentMapStyle;
81388
+ // Select deferrable layers
81011
81389
  var deferredLayers = Object.entries(layerGroupLayers).reduce(function (deferred, _a) {
81012
81390
  var _b = __read$e(_a, 2), groupName = _b[0], layers = _b[1];
81013
81391
  var isInInitialLayerGroup = validInitLayerGroups.includes(groupName);
81014
- return __spreadArray$8(__spreadArray$8([], __read$e(deferred)), __read$e(layers.filter(function (layer) {
81392
+ return __spreadArray$9(__spreadArray$9([], __read$e(deferred)), __read$e(layers.filter(function (layer) {
81015
81393
  var _a;
81016
81394
  // Exclude custom layers
81017
81395
  if (layer.type === 'custom')
@@ -81034,22 +81412,34 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
81034
81412
  return false;
81035
81413
  }
81036
81414
  }
81037
- // Defer visible layers only.
81415
+ // Select visible layers only.
81038
81416
  return ((_a = layer.layout) === null || _a === void 0 ? void 0 : _a.visibility) !== 'none';
81039
81417
  })));
81040
81418
  }, []);
81041
- // Hide the deferred layers at initial load, therefore we can save the render time.
81419
+ // Hide the deferrable layers at initial load, therefore we can save the render time.
81042
81420
  deferredLayers.forEach(function (layer) {
81421
+ // Since this happens before sending style object into the map rendering,
81422
+ // we only need to update the style object, but not necessary to update maplibre's layout properties.
81043
81423
  layer.layout = layer.layout || {};
81044
81424
  layer.layout.visibility = 'none';
81045
81425
  });
81046
- // Make the deferred layers visible once the map instance is fully loaded
81047
- _this.map.events.addOnce('load', function () {
81426
+ // Make the deferred layers visible once the map instance is fully loaded.
81427
+ _this._progressiveLoadingState.pendingVisibilityChange = function () {
81428
+ // Release the callback.
81429
+ _this._progressiveLoadingState.pendingVisibilityChange = null;
81430
+ // Bail out the callback once map style has changed.
81431
+ var nextMapStyle = _this.map.getStyle().style;
81432
+ if (currentMapStyle !== nextMapStyle)
81433
+ return;
81434
+ // Make deferred layers visible
81048
81435
  deferredLayers.forEach(function (layer) {
81436
+ // This happens after the map rendering; Therefore, we need to update
81437
+ // both the style object and the maplibre's layout properties.
81049
81438
  layer.layout.visibility = 'visible';
81050
81439
  map.setLayoutProperty(layer.id, 'visibility', 'visible');
81051
81440
  });
81052
- });
81441
+ };
81442
+ _this.map.events.addOnce('load', _this._progressiveLoadingState.pendingVisibilityChange);
81053
81443
  };
81054
81444
  this._onStyleData = function () {
81055
81445
  _this._lookUpAsync(_this.map.getStyle()).then(function (style) {
@@ -81191,7 +81581,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
81191
81581
  domain: _this.serviceOptions.staticAssetsDomain,
81192
81582
  path: constants.stylePath + "/" + constants.styleResourcePath + "/" + style.name,
81193
81583
  queryParams: {
81194
- styleVersion: _this.serviceOptions.styleDefinitionsVersion,
81584
+ // Use the style version from the API response if it's available,
81585
+ // otherwise fallback to the version specified in the serviceOptions.
81586
+ // This is needed for flight testing the 2023-01-01 style version.
81587
+ styleVersion: definitions.version !== undefined && definitions.version !== null
81588
+ ? definitions.version
81589
+ : _this.serviceOptions.styleDefinitionsVersion
81195
81590
  // thus far we don't need to differentiate based on parameter here, as stylePatch will be called on cached styles as well
81196
81591
  //language: styleOptions.language
81197
81592
  },
@@ -81331,18 +81726,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
81331
81726
  // should be modified before they are applied to the map.
81332
81727
  var styleOptions = this.map.getStyle();
81333
81728
  var trafficOptions = this.map.getTraffic();
81334
- // force a replacement of language placeholder in the tileset url to avoid resolution to a same cache with placeholders on language change
81335
- nextStyle.sources = Object.entries(nextStyle.sources).reduce(function (newSources, _a) {
81336
- var _b = __read$e(_a, 2), sourceKey = _b[0], source = _b[1];
81337
- var newSource = __assign$8({}, source);
81338
- if ('url' in newSource && typeof newSource.url === 'string') {
81339
- if (newSource.url.includes(constants.languagePlaceHolder)) {
81340
- newSource.url = newSource.url.replace(constants.languagePlaceHolder, styleOptions.language);
81341
- }
81342
- }
81343
- newSources[sourceKey] = newSource;
81344
- return newSources;
81345
- }, {});
81346
81729
  var shouldProgressiveLoading = (styleOptions.progressiveLoading &&
81347
81730
  // The feature only effective at the initial load.
81348
81731
  !this.map._isLoaded());
@@ -81494,27 +81877,30 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
81494
81877
  * Fetches a json resource at the specified domain and path.
81495
81878
  */
81496
81879
  StyleManager.prototype._request = function (domain, path, resourceType, customQueryParams) {
81497
- var _a;
81880
+ var _a, _b;
81498
81881
  if (customQueryParams === void 0) { customQueryParams = {}; }
81499
81882
  return __awaiter$3(this, void 0, void 0, function () {
81500
81883
  var requestParams, fetchOptions;
81501
- var _b;
81502
- return __generator$3(this, function (_c) {
81503
- switch (_c.label) {
81884
+ var _c;
81885
+ return __generator$3(this, function (_d) {
81886
+ switch (_d.label) {
81504
81887
  case 0:
81505
81888
  requestParams = {
81506
81889
  url: new Url({
81507
81890
  protocol: "https",
81508
81891
  domain: domain,
81509
81892
  path: path,
81510
- queryParams: __assign$8((_b = {}, _b[constants.apiVersionQueryParameter] = this.serviceOptions.styleAPIVersion, _b), customQueryParams)
81893
+ queryParams: __assign$8((_c = {}, _c[constants.apiVersionQueryParameter] = this.serviceOptions.styleAPIVersion,
81894
+ // Generate a hash code to avoid cache conflict
81895
+ // TODO: Remove this once style version 2023-01-01 is publicly available
81896
+ _c.hash = StyleManager._hashCode((_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.getToken()), _c), customQueryParams)
81511
81897
  }).toString()
81512
81898
  };
81513
81899
  if (typeof this.serviceOptions.transformRequest === "function" && resourceType) {
81514
81900
  // If a transformRequest(...) was specified use it.
81515
81901
  requestParams = this.serviceOptions.transformRequest(requestParams.url, resourceType);
81516
81902
  }
81517
- (_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.signRequest(requestParams);
81903
+ (_b = this.map.authentication) === null || _b === void 0 ? void 0 : _b.signRequest(requestParams);
81518
81904
  fetchOptions = {
81519
81905
  method: "GET",
81520
81906
  mode: "cors",
@@ -81531,11 +81917,26 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
81531
81917
  throw new Error("HTTP " + response.status + ": " + response.statusText + " ");
81532
81918
  }
81533
81919
  })];
81534
- case 1: return [2 /*return*/, _c.sent()];
81920
+ case 1: return [2 /*return*/, _d.sent()];
81535
81921
  }
81536
81922
  });
81537
81923
  });
81538
81924
  };
81925
+ /**
81926
+ * A basic helper function to generate a hash from an input string.
81927
+ */
81928
+ StyleManager._hashCode = function (str) {
81929
+ if (str === void 0) { str = ""; }
81930
+ var chr, hash = 0;
81931
+ if (!str)
81932
+ return hash;
81933
+ for (var i = 0; i < str.length; i++) {
81934
+ chr = str.charCodeAt(i);
81935
+ hash = (hash << 5) - hash + chr;
81936
+ hash |= 0; // Convert to 32bit integer
81937
+ }
81938
+ return hash;
81939
+ };
81539
81940
  return StyleManager;
81540
81941
  }());
81541
81942
 
@@ -81622,7 +82023,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
81622
82023
  }
81623
82024
  return ar;
81624
82025
  };
81625
- var __spreadArray$9 = (window && window.__spreadArray) || function (to, from) {
82026
+ var __spreadArray$a = (window && window.__spreadArray) || function (to, from) {
81626
82027
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
81627
82028
  to[j] = from[i];
81628
82029
  return to;
@@ -81812,7 +82213,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
81812
82213
  _this.events.invoke("error", errorData);
81813
82214
  });
81814
82215
  // --> Set initial camera state of map
81815
- _this.setCamera(__assign$9(__assign$9({}, options), { type: "jump", duration: 0 }));
82216
+ _this.setCamera(__assign$9(__assign$9({
82217
+ // Default minZoom to ensure the map doesn't zoom out to unsupported zoom levels.
82218
+ minZoom: 1 }, options), { type: "jump", duration: 0 }));
81816
82219
  // Add delegates to map
81817
82220
  {
81818
82221
  _this.incidentDelegate = new IncidentServiceDelegate(_this);
@@ -81909,6 +82312,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
81909
82312
  if (!mapboxCameraOptions) {
81910
82313
  throw new Error("The map cannot be fit to the current canvas with the given CameraBoundsOptions.");
81911
82314
  }
82315
+ if ('pitch' in options) {
82316
+ mapboxCameraOptions.pitch = options.pitch;
82317
+ }
82318
+ if ('bearing' in options) {
82319
+ mapboxCameraOptions.bearing = options.bearing;
82320
+ }
81912
82321
  this.map.setMaxZoom(cameraBoundsOptions.maxZoom);
81913
82322
  this._invokeEvent("maxzoomchanged", this.map.getMaxZoom());
81914
82323
  maxBounds = this._generateSafeBounds(cameraBoundsOptions.maxBounds);
@@ -82031,8 +82440,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
82031
82440
  // If this function is restructured such that a styledata event won't always trigger
82032
82441
  // if the language is changed, then either those delegates need changed
82033
82442
  // or the styledata event manually invoked.
82443
+ var noDiffOnLanguageViewChange = diff && (this.styleOptions.language === newOptions.language && this.styleOptions.view === newOptions.view);
82034
82444
  this.styleOptions = newOptions;
82035
- this._setStyleComponents(newOptions, diff);
82445
+ this._setStyleComponents(newOptions, noDiffOnLanguageViewChange);
82036
82446
  };
82037
82447
  /**
82038
82448
  * Returns the map control's current style settings.
@@ -82423,7 +82833,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
82423
82833
  urls = layer.getOptions().subdomains || [];
82424
82834
  }
82425
82835
  // Add the tile urls to the layer, but don't update the map yet.
82426
- urls.push.apply(urls, __spreadArray$9([], __read$f(tileSources)));
82836
+ urls.push.apply(urls, __spreadArray$a([], __read$f(tileSources)));
82427
82837
  layer._setOptionsNoUpdate({
82428
82838
  subdomains: urls
82429
82839
  });
@@ -82592,9 +83002,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
82592
83002
  * Clean up the map's resources. Map will not function correctly after calling this method.
82593
83003
  */
82594
83004
  Map.prototype.dispose = function () {
83005
+ var _a;
82595
83006
  this.clear();
82596
83007
  this.map.remove();
83008
+ (_a = this.authentication) === null || _a === void 0 ? void 0 : _a.dispose();
82597
83009
  this.removed = true;
83010
+ // Remove event listeners
83011
+ window.removeEventListener("resize", this._windowResizeCallback);
82598
83012
  while (this.getMapContainer().firstChild) {
82599
83013
  var currChild = this.getMapContainer().firstChild;
82600
83014
  this.getMapContainer().removeChild(currChild);
@@ -82939,7 +83353,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
82939
83353
  }
82940
83354
  return ar;
82941
83355
  };
82942
- var __spreadArray$a = (window && window.__spreadArray) || function (to, from) {
83356
+ var __spreadArray$b = (window && window.__spreadArray) || function (to, from) {
82943
83357
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
82944
83358
  to[j] = from[i];
82945
83359
  return to;
@@ -83085,7 +83499,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
83085
83499
  lineLength = 50;
83086
83500
  }
83087
83501
  var lines = c.split(/<(tr|div|br|li|h[0-9]|p>)/);
83088
- longestStringLength = Math.max.apply(Math, __spreadArray$a([], __read$g((lines.map(function (el) { return el.replace(/<[a-zA-Z0-9\s=\/]+>/g, "").length; }))))) - 1;
83502
+ longestStringLength = Math.max.apply(Math, __spreadArray$b([], __read$g((lines.map(function (el) { return el.replace(/<[a-zA-Z0-9\s=\/]+>/g, "").length; }))))) - 1;
83089
83503
  var w = Math.ceil(longestStringLength * 3.5);
83090
83504
  if (w < width) {
83091
83505
  width = w;