@dra2020/baseclient 1.0.155 → 1.0.157

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.
@@ -11002,9 +11002,14 @@ function polyIntersects(p1, p2) {
11002
11002
  PP.polyPackEachRing(pp2, (buffer2, iPoly2, iRing2, iOffset2, nPoints2) => {
11003
11003
  if (iRing2 == 0) {
11004
11004
  let c2 = unpackCoords(buffer2, iOffset2, nPoints2);
11005
- let result = _intersection(c1, c2);
11006
- if (result && result.length > 0)
11007
- bIntersects = true;
11005
+ try {
11006
+ let result = _intersection(c1, c2);
11007
+ if (result && result.length > 0)
11008
+ bIntersects = true;
11009
+ }
11010
+ catch (err) {
11011
+ // Ignore, treat badly formed as non-intersecting
11012
+ }
11008
11013
  }
11009
11014
  });
11010
11015
  }
@@ -11020,9 +11025,13 @@ function polyIntersectArea(p1, p2) {
11020
11025
  let c1 = unpackCoords(buffer1, iOffset1, nPoints1);
11021
11026
  PP.polyPackEachRing(pp2, (buffer2, iPoly2, iRing2, iOffset2, nPoints2) => {
11022
11027
  let c2 = unpackCoords(buffer2, iOffset2, nPoints2);
11023
- let result = _intersection(c1, c2);
11024
- if (result && result.length > 0)
11025
- area += Poly.polyArea(result) * ((!iRing1 == !iRing2) ? 1 : -1);
11028
+ try {
11029
+ let result = _intersection(c1, c2);
11030
+ if (result && result.length > 0)
11031
+ area += Poly.polyArea(result) * ((!iRing1 == !iRing2) ? 1 : -1);
11032
+ }
11033
+ catch (err) {
11034
+ }
11026
11035
  });
11027
11036
  });
11028
11037
  return area;
@@ -12350,6 +12359,32 @@ function deepEqual(o1, o2, options) {
12350
12359
  return false;
12351
12360
  if (typeof o2 !== 'object' || o2 == null)
12352
12361
  return false;
12362
+ // Special case Set
12363
+ if (o1 instanceof Set && o2 instanceof Set) {
12364
+ if (o1.size !== o2.size)
12365
+ return false;
12366
+ let eq = true;
12367
+ o1.forEach((k) => { if (!o2.has(k))
12368
+ eq = false; });
12369
+ return eq;
12370
+ }
12371
+ // Special case Map
12372
+ if (o1 instanceof Map && o2 instanceof Map) {
12373
+ if (o1.size !== o2.size)
12374
+ return false;
12375
+ let eq = true;
12376
+ o1.forEach((v1, k1) => {
12377
+ if (eq) {
12378
+ if (!o2.has(k1))
12379
+ eq = false;
12380
+ else {
12381
+ let v2 = o2.get(k1);
12382
+ eq = deepEqual(v1, v2, options);
12383
+ }
12384
+ }
12385
+ });
12386
+ return eq;
12387
+ }
12353
12388
  // Special case array
12354
12389
  if (Array.isArray(o1)) {
12355
12390
  if (!Array.isArray(o2))