@loaders.gl/tiles 5.0.0-alpha.3 → 5.0.0-alpha.5

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/dist.dev.js CHANGED
@@ -217,8 +217,8 @@ var __exports__ = (() => {
217
217
  }
218
218
  return zeroToTwoPi(angle2 + PI) - PI;
219
219
  }
220
- function clamp(value, min2, max2) {
221
- return map(value, (value2) => Math.max(min2, Math.min(max2, value2)));
220
+ function clamp(value, min, max) {
221
+ return map(value, (value2) => Math.max(min, Math.min(max, value2)));
222
222
  }
223
223
  function equals(a, b, epsilon) {
224
224
  const oldEpsilon = config.EPSILON;
@@ -313,10 +313,6 @@ var __exports__ = (() => {
313
313
  toTarget(target) {
314
314
  return target ? this.to(target) : this;
315
315
  }
316
- /** @deprecated */
317
- toFloat32Array() {
318
- return new Float32Array(this);
319
- }
320
316
  toString() {
321
317
  return this.formatString(config);
322
318
  }
@@ -405,14 +401,14 @@ var __exports__ = (() => {
405
401
  }
406
402
  return this.check();
407
403
  }
408
- scale(scale6) {
409
- if (typeof scale6 === "number") {
404
+ scale(scale5) {
405
+ if (typeof scale5 === "number") {
410
406
  for (let i = 0; i < this.ELEMENTS; ++i) {
411
- this[i] *= scale6;
407
+ this[i] *= scale5;
412
408
  }
413
409
  } else {
414
- for (let i = 0; i < this.ELEMENTS && i < scale6.length; ++i) {
415
- this[i] *= scale6[i];
410
+ for (let i = 0; i < this.ELEMENTS && i < scale5.length; ++i) {
411
+ this[i] *= scale5[i];
416
412
  }
417
413
  }
418
414
  return this.check();
@@ -443,51 +439,6 @@ var __exports__ = (() => {
443
439
  }
444
440
  return valid;
445
441
  }
446
- // three.js compatibility
447
- /** @deprecated */
448
- sub(a) {
449
- return this.subtract(a);
450
- }
451
- /** @deprecated */
452
- setScalar(a) {
453
- for (let i = 0; i < this.ELEMENTS; ++i) {
454
- this[i] = a;
455
- }
456
- return this.check();
457
- }
458
- /** @deprecated */
459
- addScalar(a) {
460
- for (let i = 0; i < this.ELEMENTS; ++i) {
461
- this[i] += a;
462
- }
463
- return this.check();
464
- }
465
- /** @deprecated */
466
- subScalar(a) {
467
- return this.addScalar(-a);
468
- }
469
- /** @deprecated */
470
- multiplyScalar(scalar) {
471
- for (let i = 0; i < this.ELEMENTS; ++i) {
472
- this[i] *= scalar;
473
- }
474
- return this.check();
475
- }
476
- /** @deprecated */
477
- divideScalar(a) {
478
- return this.multiplyByScalar(1 / a);
479
- }
480
- /** @deprecated */
481
- clampScalar(min2, max2) {
482
- for (let i = 0; i < this.ELEMENTS; ++i) {
483
- this[i] = Math.min(Math.max(this[i], min2), max2);
484
- }
485
- return this.check();
486
- }
487
- /** @deprecated */
488
- get elements() {
489
- return this;
490
- }
491
442
  };
492
443
 
493
444
  // ../../node_modules/@math.gl/core/dist/lib/validators.js
@@ -632,8 +583,8 @@ var __exports__ = (() => {
632
583
  distanceSquared(mathArray) {
633
584
  let length4 = 0;
634
585
  for (let i = 0; i < this.ELEMENTS; ++i) {
635
- const dist2 = this[i] - mathArray[i];
636
- length4 += dist2 * dist2;
586
+ const dist = this[i] - mathArray[i];
587
+ length4 += dist * dist;
637
588
  }
638
589
  return checkNumber(length4);
639
590
  }
@@ -699,30 +650,19 @@ var __exports__ = (() => {
699
650
  return this.copy(a).multiply(b);
700
651
  }
701
652
  addScaledVector(a, b) {
702
- return this.add(new this.constructor(a).multiplyScalar(b));
653
+ for (let i = 0; i < this.ELEMENTS; ++i) {
654
+ this[i] += a[i] * b;
655
+ }
656
+ return this.check();
703
657
  }
704
658
  };
705
659
 
706
660
  // ../../node_modules/@math.gl/core/dist/gl-matrix/common.js
707
661
  var EPSILON = 1e-6;
708
662
  var ARRAY_TYPE = typeof Float32Array !== "undefined" ? Float32Array : Array;
709
- var RANDOM = Math.random;
710
- function round2(a) {
711
- if (a >= 0)
712
- return Math.round(a);
713
- return a % 0.5 === 0 ? Math.floor(a) : Math.round(a);
714
- }
715
663
  var degree = Math.PI / 180;
716
664
 
717
665
  // ../../node_modules/@math.gl/core/dist/gl-matrix/vec2.js
718
- function create() {
719
- const out = new ARRAY_TYPE(2);
720
- if (ARRAY_TYPE !== Float32Array) {
721
- out[0] = 0;
722
- out[1] = 0;
723
- }
724
- return out;
725
- }
726
666
  function transformMat2(out, a, m) {
727
667
  const x = a[0];
728
668
  const y = a[1];
@@ -751,32 +691,6 @@ var __exports__ = (() => {
751
691
  out[1] = m[1] * x + m[5] * y + m[13];
752
692
  return out;
753
693
  }
754
- var forEach = (function() {
755
- const vec = create();
756
- return function(a, stride, offset, count, fn, arg) {
757
- let i;
758
- let l;
759
- if (!stride) {
760
- stride = 2;
761
- }
762
- if (!offset) {
763
- offset = 0;
764
- }
765
- if (count) {
766
- l = Math.min(count * stride + offset, a.length);
767
- } else {
768
- l = a.length;
769
- }
770
- for (i = offset; i < l; i += stride) {
771
- vec[0] = a[i];
772
- vec[1] = a[i + 1];
773
- fn(vec, vec, arg);
774
- a[i] = vec[0];
775
- a[i + 1] = vec[1];
776
- }
777
- return a;
778
- };
779
- })();
780
694
 
781
695
  // ../../node_modules/@math.gl/core/dist/lib/gl-matrix-extras.js
782
696
  function vec2_transformMat4AsVector(out, a, m) {
@@ -805,15 +719,6 @@ var __exports__ = (() => {
805
719
  out[2] = a[2];
806
720
  return out;
807
721
  }
808
- function vec4_transformMat2(out, a, m) {
809
- const x = a[0];
810
- const y = a[1];
811
- out[0] = m[0] * x + m[2] * y;
812
- out[1] = m[1] * x + m[3] * y;
813
- out[2] = a[2];
814
- out[3] = a[3];
815
- return out;
816
- }
817
722
  function vec4_transformMat3(out, a, m) {
818
723
  const x = a[0];
819
724
  const y = a[1];
@@ -925,59 +830,7 @@ var __exports__ = (() => {
925
830
  };
926
831
 
927
832
  // ../../node_modules/@math.gl/core/dist/gl-matrix/vec3.js
928
- var vec3_exports = {};
929
- __export(vec3_exports, {
930
- add: () => add,
931
- angle: () => angle,
932
- bezier: () => bezier,
933
- ceil: () => ceil,
934
- clone: () => clone,
935
- copy: () => copy,
936
- create: () => create2,
937
- cross: () => cross,
938
- dist: () => dist,
939
- distance: () => distance,
940
- div: () => div,
941
- divide: () => divide,
942
- dot: () => dot,
943
- equals: () => equals2,
944
- exactEquals: () => exactEquals,
945
- floor: () => floor,
946
- forEach: () => forEach2,
947
- fromValues: () => fromValues,
948
- hermite: () => hermite,
949
- inverse: () => inverse,
950
- len: () => len,
951
- length: () => length,
952
- lerp: () => lerp,
953
- max: () => max,
954
- min: () => min,
955
- mul: () => mul,
956
- multiply: () => multiply,
957
- negate: () => negate,
958
- normalize: () => normalize,
959
- random: () => random,
960
- rotateX: () => rotateX,
961
- rotateY: () => rotateY,
962
- rotateZ: () => rotateZ,
963
- round: () => round3,
964
- scale: () => scale,
965
- scaleAndAdd: () => scaleAndAdd,
966
- set: () => set,
967
- slerp: () => slerp,
968
- sqrDist: () => sqrDist,
969
- sqrLen: () => sqrLen,
970
- squaredDistance: () => squaredDistance,
971
- squaredLength: () => squaredLength,
972
- str: () => str,
973
- sub: () => sub,
974
- subtract: () => subtract,
975
- transformMat3: () => transformMat32,
976
- transformMat4: () => transformMat42,
977
- transformQuat: () => transformQuat,
978
- zero: () => zero
979
- });
980
- function create2() {
833
+ function create() {
981
834
  const out = new ARRAY_TYPE(3);
982
835
  if (ARRAY_TYPE !== Float32Array) {
983
836
  out[0] = 0;
@@ -986,13 +839,6 @@ var __exports__ = (() => {
986
839
  }
987
840
  return out;
988
841
  }
989
- function clone(a) {
990
- const out = new ARRAY_TYPE(3);
991
- out[0] = a[0];
992
- out[1] = a[1];
993
- out[2] = a[2];
994
- return out;
995
- }
996
842
  function length(a) {
997
843
  const x = a[0];
998
844
  const y = a[1];
@@ -1006,114 +852,6 @@ var __exports__ = (() => {
1006
852
  out[2] = z;
1007
853
  return out;
1008
854
  }
1009
- function copy(out, a) {
1010
- out[0] = a[0];
1011
- out[1] = a[1];
1012
- out[2] = a[2];
1013
- return out;
1014
- }
1015
- function set(out, x, y, z) {
1016
- out[0] = x;
1017
- out[1] = y;
1018
- out[2] = z;
1019
- return out;
1020
- }
1021
- function add(out, a, b) {
1022
- out[0] = a[0] + b[0];
1023
- out[1] = a[1] + b[1];
1024
- out[2] = a[2] + b[2];
1025
- return out;
1026
- }
1027
- function subtract(out, a, b) {
1028
- out[0] = a[0] - b[0];
1029
- out[1] = a[1] - b[1];
1030
- out[2] = a[2] - b[2];
1031
- return out;
1032
- }
1033
- function multiply(out, a, b) {
1034
- out[0] = a[0] * b[0];
1035
- out[1] = a[1] * b[1];
1036
- out[2] = a[2] * b[2];
1037
- return out;
1038
- }
1039
- function divide(out, a, b) {
1040
- out[0] = a[0] / b[0];
1041
- out[1] = a[1] / b[1];
1042
- out[2] = a[2] / b[2];
1043
- return out;
1044
- }
1045
- function ceil(out, a) {
1046
- out[0] = Math.ceil(a[0]);
1047
- out[1] = Math.ceil(a[1]);
1048
- out[2] = Math.ceil(a[2]);
1049
- return out;
1050
- }
1051
- function floor(out, a) {
1052
- out[0] = Math.floor(a[0]);
1053
- out[1] = Math.floor(a[1]);
1054
- out[2] = Math.floor(a[2]);
1055
- return out;
1056
- }
1057
- function min(out, a, b) {
1058
- out[0] = Math.min(a[0], b[0]);
1059
- out[1] = Math.min(a[1], b[1]);
1060
- out[2] = Math.min(a[2], b[2]);
1061
- return out;
1062
- }
1063
- function max(out, a, b) {
1064
- out[0] = Math.max(a[0], b[0]);
1065
- out[1] = Math.max(a[1], b[1]);
1066
- out[2] = Math.max(a[2], b[2]);
1067
- return out;
1068
- }
1069
- function round3(out, a) {
1070
- out[0] = round2(a[0]);
1071
- out[1] = round2(a[1]);
1072
- out[2] = round2(a[2]);
1073
- return out;
1074
- }
1075
- function scale(out, a, b) {
1076
- out[0] = a[0] * b;
1077
- out[1] = a[1] * b;
1078
- out[2] = a[2] * b;
1079
- return out;
1080
- }
1081
- function scaleAndAdd(out, a, b, scale6) {
1082
- out[0] = a[0] + b[0] * scale6;
1083
- out[1] = a[1] + b[1] * scale6;
1084
- out[2] = a[2] + b[2] * scale6;
1085
- return out;
1086
- }
1087
- function distance(a, b) {
1088
- const x = b[0] - a[0];
1089
- const y = b[1] - a[1];
1090
- const z = b[2] - a[2];
1091
- return Math.sqrt(x * x + y * y + z * z);
1092
- }
1093
- function squaredDistance(a, b) {
1094
- const x = b[0] - a[0];
1095
- const y = b[1] - a[1];
1096
- const z = b[2] - a[2];
1097
- return x * x + y * y + z * z;
1098
- }
1099
- function squaredLength(a) {
1100
- const x = a[0];
1101
- const y = a[1];
1102
- const z = a[2];
1103
- return x * x + y * y + z * z;
1104
- }
1105
- function negate(out, a) {
1106
- out[0] = -a[0];
1107
- out[1] = -a[1];
1108
- out[2] = -a[2];
1109
- return out;
1110
- }
1111
- function inverse(out, a) {
1112
- out[0] = 1 / a[0];
1113
- out[1] = 1 / a[1];
1114
- out[2] = 1 / a[2];
1115
- return out;
1116
- }
1117
855
  function normalize(out, a) {
1118
856
  const x = a[0];
1119
857
  const y = a[1];
@@ -1142,59 +880,6 @@ var __exports__ = (() => {
1142
880
  out[2] = ax * by - ay * bx;
1143
881
  return out;
1144
882
  }
1145
- function lerp(out, a, b, t) {
1146
- const ax = a[0];
1147
- const ay = a[1];
1148
- const az = a[2];
1149
- out[0] = ax + t * (b[0] - ax);
1150
- out[1] = ay + t * (b[1] - ay);
1151
- out[2] = az + t * (b[2] - az);
1152
- return out;
1153
- }
1154
- function slerp(out, a, b, t) {
1155
- const angle2 = Math.acos(Math.min(Math.max(dot(a, b), -1), 1));
1156
- const sinTotal = Math.sin(angle2);
1157
- const ratioA = Math.sin((1 - t) * angle2) / sinTotal;
1158
- const ratioB = Math.sin(t * angle2) / sinTotal;
1159
- out[0] = ratioA * a[0] + ratioB * b[0];
1160
- out[1] = ratioA * a[1] + ratioB * b[1];
1161
- out[2] = ratioA * a[2] + ratioB * b[2];
1162
- return out;
1163
- }
1164
- function hermite(out, a, b, c, d, t) {
1165
- const factorTimes2 = t * t;
1166
- const factor1 = factorTimes2 * (2 * t - 3) + 1;
1167
- const factor2 = factorTimes2 * (t - 2) + t;
1168
- const factor3 = factorTimes2 * (t - 1);
1169
- const factor4 = factorTimes2 * (3 - 2 * t);
1170
- out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;
1171
- out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;
1172
- out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;
1173
- return out;
1174
- }
1175
- function bezier(out, a, b, c, d, t) {
1176
- const inverseFactor = 1 - t;
1177
- const inverseFactorTimesTwo = inverseFactor * inverseFactor;
1178
- const factorTimes2 = t * t;
1179
- const factor1 = inverseFactorTimesTwo * inverseFactor;
1180
- const factor2 = 3 * t * inverseFactorTimesTwo;
1181
- const factor3 = 3 * factorTimes2 * inverseFactor;
1182
- const factor4 = factorTimes2 * t;
1183
- out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;
1184
- out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;
1185
- out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;
1186
- return out;
1187
- }
1188
- function random(out, scale6) {
1189
- scale6 = scale6 === void 0 ? 1 : scale6;
1190
- const r = RANDOM() * 2 * Math.PI;
1191
- const z = RANDOM() * 2 - 1;
1192
- const zScale = Math.sqrt(1 - z * z) * scale6;
1193
- out[0] = Math.cos(r) * zScale;
1194
- out[1] = Math.sin(r) * zScale;
1195
- out[2] = z * scale6;
1196
- return out;
1197
- }
1198
883
  function transformMat42(out, a, m) {
1199
884
  const x = a[0];
1200
885
  const y = a[1];
@@ -1294,62 +979,7 @@ var __exports__ = (() => {
1294
979
  const cosine = mag && dot(a, b) / mag;
1295
980
  return Math.acos(Math.min(Math.max(cosine, -1), 1));
1296
981
  }
1297
- function zero(out) {
1298
- out[0] = 0;
1299
- out[1] = 0;
1300
- out[2] = 0;
1301
- return out;
1302
- }
1303
- function str(a) {
1304
- return `vec3(${a[0]}, ${a[1]}, ${a[2]})`;
1305
- }
1306
- function exactEquals(a, b) {
1307
- return a[0] === b[0] && a[1] === b[1] && a[2] === b[2];
1308
- }
1309
- function equals2(a, b) {
1310
- const a0 = a[0];
1311
- const a1 = a[1];
1312
- const a2 = a[2];
1313
- const b0 = b[0];
1314
- const b1 = b[1];
1315
- const b2 = b[2];
1316
- return Math.abs(a0 - b0) <= EPSILON * Math.max(1, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Math.max(1, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Math.max(1, Math.abs(a2), Math.abs(b2));
1317
- }
1318
- var sub = subtract;
1319
- var mul = multiply;
1320
- var div = divide;
1321
- var dist = distance;
1322
- var sqrDist = squaredDistance;
1323
982
  var len = length;
1324
- var sqrLen = squaredLength;
1325
- var forEach2 = (function() {
1326
- const vec = create2();
1327
- return function(a, stride, offset, count, fn, arg) {
1328
- let i;
1329
- let l;
1330
- if (!stride) {
1331
- stride = 3;
1332
- }
1333
- if (!offset) {
1334
- offset = 0;
1335
- }
1336
- if (count) {
1337
- l = Math.min(count * stride + offset, a.length);
1338
- } else {
1339
- l = a.length;
1340
- }
1341
- for (i = offset; i < l; i += stride) {
1342
- vec[0] = a[i];
1343
- vec[1] = a[i + 1];
1344
- vec[2] = a[i + 2];
1345
- fn(vec, vec, arg);
1346
- a[i] = vec[0];
1347
- a[i + 1] = vec[1];
1348
- a[i + 2] = vec[2];
1349
- }
1350
- return a;
1351
- };
1352
- })();
1353
983
 
1354
984
  // ../../node_modules/@math.gl/core/dist/classes/vector3.js
1355
985
  var ORIGIN = [0, 0, 0];
@@ -1472,123 +1102,7 @@ var __exports__ = (() => {
1472
1102
  }
1473
1103
  };
1474
1104
 
1475
- // ../../node_modules/@math.gl/core/dist/classes/vector4.js
1476
- var ZERO2;
1477
- var Vector4 = class _Vector4 extends Vector {
1478
- static get ZERO() {
1479
- if (!ZERO2) {
1480
- ZERO2 = new _Vector4(0, 0, 0, 0);
1481
- Object.freeze(ZERO2);
1482
- }
1483
- return ZERO2;
1484
- }
1485
- constructor(x = 0, y = 0, z = 0, w = 0) {
1486
- super(-0, -0, -0, -0);
1487
- if (isArray(x) && arguments.length === 1) {
1488
- this.copy(x);
1489
- } else {
1490
- if (config.debug) {
1491
- checkNumber(x);
1492
- checkNumber(y);
1493
- checkNumber(z);
1494
- checkNumber(w);
1495
- }
1496
- this[0] = x;
1497
- this[1] = y;
1498
- this[2] = z;
1499
- this[3] = w;
1500
- }
1501
- }
1502
- set(x, y, z, w) {
1503
- this[0] = x;
1504
- this[1] = y;
1505
- this[2] = z;
1506
- this[3] = w;
1507
- return this.check();
1508
- }
1509
- copy(array) {
1510
- this[0] = array[0];
1511
- this[1] = array[1];
1512
- this[2] = array[2];
1513
- this[3] = array[3];
1514
- return this.check();
1515
- }
1516
- fromObject(object) {
1517
- if (config.debug) {
1518
- checkNumber(object.x);
1519
- checkNumber(object.y);
1520
- checkNumber(object.z);
1521
- checkNumber(object.w);
1522
- }
1523
- this[0] = object.x;
1524
- this[1] = object.y;
1525
- this[2] = object.z;
1526
- this[3] = object.w;
1527
- return this;
1528
- }
1529
- toObject(object) {
1530
- object.x = this[0];
1531
- object.y = this[1];
1532
- object.z = this[2];
1533
- object.w = this[3];
1534
- return object;
1535
- }
1536
- // Getters/setters
1537
- /* eslint-disable no-multi-spaces, brace-style, no-return-assign */
1538
- get ELEMENTS() {
1539
- return 4;
1540
- }
1541
- get z() {
1542
- return this[2];
1543
- }
1544
- set z(value) {
1545
- this[2] = checkNumber(value);
1546
- }
1547
- get w() {
1548
- return this[3];
1549
- }
1550
- set w(value) {
1551
- this[3] = checkNumber(value);
1552
- }
1553
- transform(matrix4) {
1554
- transformMat42(this, this, matrix4);
1555
- return this.check();
1556
- }
1557
- transformByMatrix3(matrix3) {
1558
- vec4_transformMat3(this, this, matrix3);
1559
- return this.check();
1560
- }
1561
- transformByMatrix2(matrix2) {
1562
- vec4_transformMat2(this, this, matrix2);
1563
- return this.check();
1564
- }
1565
- transformByQuaternion(quaternion) {
1566
- transformQuat(this, this, quaternion);
1567
- return this.check();
1568
- }
1569
- // three.js compatibility
1570
- applyMatrix4(m) {
1571
- m.transform(this, this);
1572
- return this;
1573
- }
1574
- };
1575
-
1576
1105
  // ../../node_modules/@math.gl/core/dist/gl-matrix/mat3.js
1577
- function create3() {
1578
- const out = new ARRAY_TYPE(9);
1579
- if (ARRAY_TYPE !== Float32Array) {
1580
- out[1] = 0;
1581
- out[2] = 0;
1582
- out[3] = 0;
1583
- out[5] = 0;
1584
- out[6] = 0;
1585
- out[7] = 0;
1586
- }
1587
- out[0] = 1;
1588
- out[4] = 1;
1589
- out[8] = 1;
1590
- return out;
1591
- }
1592
1106
  function transpose(out, a) {
1593
1107
  if (out === a) {
1594
1108
  const a01 = a[1];
@@ -1654,7 +1168,7 @@ var __exports__ = (() => {
1654
1168
  const a22 = a[8];
1655
1169
  return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);
1656
1170
  }
1657
- function multiply2(out, a, b) {
1171
+ function multiply(out, a, b) {
1658
1172
  const a00 = a[0];
1659
1173
  const a01 = a[1];
1660
1174
  const a02 = a[2];
@@ -1730,7 +1244,7 @@ var __exports__ = (() => {
1730
1244
  out[8] = a22;
1731
1245
  return out;
1732
1246
  }
1733
- function scale2(out, a, v) {
1247
+ function scale(out, a, v) {
1734
1248
  const x = v[0];
1735
1249
  const y = v[1];
1736
1250
  out[0] = x * a[0];
@@ -1803,12 +1317,10 @@ var __exports__ = (() => {
1803
1317
  get INDICES() {
1804
1318
  return INDICES;
1805
1319
  }
1806
- constructor(array, ...args) {
1320
+ constructor(array) {
1807
1321
  super(-0, -0, -0, -0, -0, -0, -0, -0, -0);
1808
1322
  if (arguments.length === 1 && Array.isArray(array)) {
1809
1323
  this.copy(array);
1810
- } else if (args.length > 0) {
1811
- this.copy([array, ...args]);
1812
1324
  } else {
1813
1325
  this.identity();
1814
1326
  }
@@ -1845,6 +1357,10 @@ var __exports__ = (() => {
1845
1357
  fromQuat(this, q);
1846
1358
  return this.check();
1847
1359
  }
1360
+ /** Sets this matrix from the upper-left 3x3 elements of a 4x4 matrix. */
1361
+ fromMatrix4(matrix4) {
1362
+ return this.set(matrix4[0], matrix4[1], matrix4[2], matrix4[4], matrix4[5], matrix4[6], matrix4[8], matrix4[9], matrix4[10]);
1363
+ }
1848
1364
  /**
1849
1365
  * accepts column major order, stores in column major order
1850
1366
  */
@@ -1893,11 +1409,11 @@ var __exports__ = (() => {
1893
1409
  }
1894
1410
  // Operations
1895
1411
  multiplyLeft(a) {
1896
- multiply2(this, a, this);
1412
+ multiply(this, a, this);
1897
1413
  return this.check();
1898
1414
  }
1899
1415
  multiplyRight(a) {
1900
- multiply2(this, this, a);
1416
+ multiply(this, this, a);
1901
1417
  return this.check();
1902
1418
  }
1903
1419
  rotate(radians2) {
@@ -1906,9 +1422,9 @@ var __exports__ = (() => {
1906
1422
  }
1907
1423
  scale(factor) {
1908
1424
  if (Array.isArray(factor)) {
1909
- scale2(this, this, factor);
1425
+ scale(this, this, factor);
1910
1426
  } else {
1911
- scale2(this, this, [factor, factor]);
1427
+ scale(this, this, [factor, factor]);
1912
1428
  }
1913
1429
  return this.check();
1914
1430
  }
@@ -1935,18 +1451,6 @@ var __exports__ = (() => {
1935
1451
  checkVector(out, vector.length);
1936
1452
  return out;
1937
1453
  }
1938
- /** @deprecated */
1939
- transformVector(vector, result) {
1940
- return this.transform(vector, result);
1941
- }
1942
- /** @deprecated */
1943
- transformVector2(vector, result) {
1944
- return this.transform(vector, result);
1945
- }
1946
- /** @deprecated */
1947
- transformVector3(vector, result) {
1948
- return this.transform(vector, result);
1949
- }
1950
1454
  };
1951
1455
  var ZERO_MATRIX3;
1952
1456
  var IDENTITY_MATRIX3 = null;
@@ -1966,167 +1470,12 @@ var __exports__ = (() => {
1966
1470
  }
1967
1471
 
1968
1472
  // ../../node_modules/@math.gl/core/dist/gl-matrix/mat4.js
1969
- var mat4_exports = {};
1970
- __export(mat4_exports, {
1971
- add: () => add2,
1972
- adjoint: () => adjoint,
1973
- clone: () => clone2,
1974
- copy: () => copy2,
1975
- create: () => create4,
1976
- decompose: () => decompose,
1977
- determinant: () => determinant2,
1978
- equals: () => equals3,
1979
- exactEquals: () => exactEquals2,
1980
- frob: () => frob,
1981
- fromQuat: () => fromQuat3,
1982
- fromQuat2: () => fromQuat2,
1983
- fromRotation: () => fromRotation,
1984
- fromRotationTranslation: () => fromRotationTranslation,
1985
- fromRotationTranslationScale: () => fromRotationTranslationScale,
1986
- fromRotationTranslationScaleOrigin: () => fromRotationTranslationScaleOrigin,
1987
- fromScaling: () => fromScaling,
1988
- fromTranslation: () => fromTranslation,
1989
- fromValues: () => fromValues2,
1990
- fromXRotation: () => fromXRotation,
1991
- fromYRotation: () => fromYRotation,
1992
- fromZRotation: () => fromZRotation,
1993
- frustum: () => frustum,
1994
- getRotation: () => getRotation,
1995
- getScaling: () => getScaling,
1996
- getTranslation: () => getTranslation,
1997
- identity: () => identity,
1998
- invert: () => invert2,
1999
- lookAt: () => lookAt,
2000
- mul: () => mul2,
2001
- multiply: () => multiply3,
2002
- multiplyScalar: () => multiplyScalar,
2003
- multiplyScalarAndAdd: () => multiplyScalarAndAdd,
2004
- ortho: () => ortho,
2005
- orthoNO: () => orthoNO,
2006
- orthoZO: () => orthoZO,
2007
- perspective: () => perspective,
2008
- perspectiveFromFieldOfView: () => perspectiveFromFieldOfView,
2009
- perspectiveNO: () => perspectiveNO,
2010
- perspectiveZO: () => perspectiveZO,
2011
- rotate: () => rotate2,
2012
- rotateX: () => rotateX2,
2013
- rotateY: () => rotateY2,
2014
- rotateZ: () => rotateZ2,
2015
- scale: () => scale3,
2016
- set: () => set2,
2017
- str: () => str2,
2018
- sub: () => sub2,
2019
- subtract: () => subtract2,
2020
- targetTo: () => targetTo,
2021
- translate: () => translate2,
2022
- transpose: () => transpose2
2023
- });
2024
- function create4() {
2025
- const out = new ARRAY_TYPE(16);
2026
- if (ARRAY_TYPE !== Float32Array) {
2027
- out[1] = 0;
2028
- out[2] = 0;
2029
- out[3] = 0;
2030
- out[4] = 0;
2031
- out[6] = 0;
2032
- out[7] = 0;
2033
- out[8] = 0;
2034
- out[9] = 0;
2035
- out[11] = 0;
2036
- out[12] = 0;
2037
- out[13] = 0;
2038
- out[14] = 0;
2039
- }
1473
+ function identity(out) {
2040
1474
  out[0] = 1;
2041
- out[5] = 1;
2042
- out[10] = 1;
2043
- out[15] = 1;
2044
- return out;
2045
- }
2046
- function clone2(a) {
2047
- const out = new ARRAY_TYPE(16);
2048
- out[0] = a[0];
2049
- out[1] = a[1];
2050
- out[2] = a[2];
2051
- out[3] = a[3];
2052
- out[4] = a[4];
2053
- out[5] = a[5];
2054
- out[6] = a[6];
2055
- out[7] = a[7];
2056
- out[8] = a[8];
2057
- out[9] = a[9];
2058
- out[10] = a[10];
2059
- out[11] = a[11];
2060
- out[12] = a[12];
2061
- out[13] = a[13];
2062
- out[14] = a[14];
2063
- out[15] = a[15];
2064
- return out;
2065
- }
2066
- function copy2(out, a) {
2067
- out[0] = a[0];
2068
- out[1] = a[1];
2069
- out[2] = a[2];
2070
- out[3] = a[3];
2071
- out[4] = a[4];
2072
- out[5] = a[5];
2073
- out[6] = a[6];
2074
- out[7] = a[7];
2075
- out[8] = a[8];
2076
- out[9] = a[9];
2077
- out[10] = a[10];
2078
- out[11] = a[11];
2079
- out[12] = a[12];
2080
- out[13] = a[13];
2081
- out[14] = a[14];
2082
- out[15] = a[15];
2083
- return out;
2084
- }
2085
- function fromValues2(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {
2086
- const out = new ARRAY_TYPE(16);
2087
- out[0] = m00;
2088
- out[1] = m01;
2089
- out[2] = m02;
2090
- out[3] = m03;
2091
- out[4] = m10;
2092
- out[5] = m11;
2093
- out[6] = m12;
2094
- out[7] = m13;
2095
- out[8] = m20;
2096
- out[9] = m21;
2097
- out[10] = m22;
2098
- out[11] = m23;
2099
- out[12] = m30;
2100
- out[13] = m31;
2101
- out[14] = m32;
2102
- out[15] = m33;
2103
- return out;
2104
- }
2105
- function set2(out, m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {
2106
- out[0] = m00;
2107
- out[1] = m01;
2108
- out[2] = m02;
2109
- out[3] = m03;
2110
- out[4] = m10;
2111
- out[5] = m11;
2112
- out[6] = m12;
2113
- out[7] = m13;
2114
- out[8] = m20;
2115
- out[9] = m21;
2116
- out[10] = m22;
2117
- out[11] = m23;
2118
- out[12] = m30;
2119
- out[13] = m31;
2120
- out[14] = m32;
2121
- out[15] = m33;
2122
- return out;
2123
- }
2124
- function identity(out) {
2125
- out[0] = 1;
2126
- out[1] = 0;
2127
- out[2] = 0;
2128
- out[3] = 0;
2129
- out[4] = 0;
1475
+ out[1] = 0;
1476
+ out[2] = 0;
1477
+ out[3] = 0;
1478
+ out[4] = 0;
2130
1479
  out[5] = 1;
2131
1480
  out[6] = 0;
2132
1481
  out[7] = 0;
@@ -2232,53 +1581,6 @@ var __exports__ = (() => {
2232
1581
  out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;
2233
1582
  return out;
2234
1583
  }
2235
- function adjoint(out, a) {
2236
- const a00 = a[0];
2237
- const a01 = a[1];
2238
- const a02 = a[2];
2239
- const a03 = a[3];
2240
- const a10 = a[4];
2241
- const a11 = a[5];
2242
- const a12 = a[6];
2243
- const a13 = a[7];
2244
- const a20 = a[8];
2245
- const a21 = a[9];
2246
- const a22 = a[10];
2247
- const a23 = a[11];
2248
- const a30 = a[12];
2249
- const a31 = a[13];
2250
- const a32 = a[14];
2251
- const a33 = a[15];
2252
- const b00 = a00 * a11 - a01 * a10;
2253
- const b01 = a00 * a12 - a02 * a10;
2254
- const b02 = a00 * a13 - a03 * a10;
2255
- const b03 = a01 * a12 - a02 * a11;
2256
- const b04 = a01 * a13 - a03 * a11;
2257
- const b05 = a02 * a13 - a03 * a12;
2258
- const b06 = a20 * a31 - a21 * a30;
2259
- const b07 = a20 * a32 - a22 * a30;
2260
- const b08 = a20 * a33 - a23 * a30;
2261
- const b09 = a21 * a32 - a22 * a31;
2262
- const b10 = a21 * a33 - a23 * a31;
2263
- const b11 = a22 * a33 - a23 * a32;
2264
- out[0] = a11 * b11 - a12 * b10 + a13 * b09;
2265
- out[1] = a02 * b10 - a01 * b11 - a03 * b09;
2266
- out[2] = a31 * b05 - a32 * b04 + a33 * b03;
2267
- out[3] = a22 * b04 - a21 * b05 - a23 * b03;
2268
- out[4] = a12 * b08 - a10 * b11 - a13 * b07;
2269
- out[5] = a00 * b11 - a02 * b08 + a03 * b07;
2270
- out[6] = a32 * b02 - a30 * b05 - a33 * b01;
2271
- out[7] = a20 * b05 - a22 * b02 + a23 * b01;
2272
- out[8] = a10 * b10 - a11 * b08 + a13 * b06;
2273
- out[9] = a01 * b08 - a00 * b10 - a03 * b06;
2274
- out[10] = a30 * b04 - a31 * b02 + a33 * b00;
2275
- out[11] = a21 * b02 - a20 * b04 - a23 * b00;
2276
- out[12] = a11 * b07 - a10 * b09 - a12 * b06;
2277
- out[13] = a00 * b09 - a01 * b07 + a02 * b06;
2278
- out[14] = a31 * b01 - a30 * b03 - a32 * b00;
2279
- out[15] = a20 * b03 - a21 * b01 + a22 * b00;
2280
- return out;
2281
- }
2282
1584
  function determinant2(a) {
2283
1585
  const a00 = a[0];
2284
1586
  const a01 = a[1];
@@ -2308,7 +1610,7 @@ var __exports__ = (() => {
2308
1610
  const b9 = a30 * b2 - a31 * b1 + a32 * b0;
2309
1611
  return a13 * b6 - a03 * b7 + a33 * b8 - a23 * b9;
2310
1612
  }
2311
- function multiply3(out, a, b) {
1613
+ function multiply2(out, a, b) {
2312
1614
  const a00 = a[0];
2313
1615
  const a01 = a[1];
2314
1616
  const a02 = a[2];
@@ -2412,7 +1714,7 @@ var __exports__ = (() => {
2412
1714
  }
2413
1715
  return out;
2414
1716
  }
2415
- function scale3(out, a, v) {
1717
+ function scale2(out, a, v) {
2416
1718
  const x = v[0];
2417
1719
  const y = v[1];
2418
1720
  const z = v[2];
@@ -2607,207 +1909,6 @@ var __exports__ = (() => {
2607
1909
  out[7] = a13 * c - a03 * s;
2608
1910
  return out;
2609
1911
  }
2610
- function fromTranslation(out, v) {
2611
- out[0] = 1;
2612
- out[1] = 0;
2613
- out[2] = 0;
2614
- out[3] = 0;
2615
- out[4] = 0;
2616
- out[5] = 1;
2617
- out[6] = 0;
2618
- out[7] = 0;
2619
- out[8] = 0;
2620
- out[9] = 0;
2621
- out[10] = 1;
2622
- out[11] = 0;
2623
- out[12] = v[0];
2624
- out[13] = v[1];
2625
- out[14] = v[2];
2626
- out[15] = 1;
2627
- return out;
2628
- }
2629
- function fromScaling(out, v) {
2630
- out[0] = v[0];
2631
- out[1] = 0;
2632
- out[2] = 0;
2633
- out[3] = 0;
2634
- out[4] = 0;
2635
- out[5] = v[1];
2636
- out[6] = 0;
2637
- out[7] = 0;
2638
- out[8] = 0;
2639
- out[9] = 0;
2640
- out[10] = v[2];
2641
- out[11] = 0;
2642
- out[12] = 0;
2643
- out[13] = 0;
2644
- out[14] = 0;
2645
- out[15] = 1;
2646
- return out;
2647
- }
2648
- function fromRotation(out, rad, axis) {
2649
- let x = axis[0];
2650
- let y = axis[1];
2651
- let z = axis[2];
2652
- let len2 = Math.sqrt(x * x + y * y + z * z);
2653
- let c;
2654
- let s;
2655
- let t;
2656
- if (len2 < EPSILON) {
2657
- return null;
2658
- }
2659
- len2 = 1 / len2;
2660
- x *= len2;
2661
- y *= len2;
2662
- z *= len2;
2663
- s = Math.sin(rad);
2664
- c = Math.cos(rad);
2665
- t = 1 - c;
2666
- out[0] = x * x * t + c;
2667
- out[1] = y * x * t + z * s;
2668
- out[2] = z * x * t - y * s;
2669
- out[3] = 0;
2670
- out[4] = x * y * t - z * s;
2671
- out[5] = y * y * t + c;
2672
- out[6] = z * y * t + x * s;
2673
- out[7] = 0;
2674
- out[8] = x * z * t + y * s;
2675
- out[9] = y * z * t - x * s;
2676
- out[10] = z * z * t + c;
2677
- out[11] = 0;
2678
- out[12] = 0;
2679
- out[13] = 0;
2680
- out[14] = 0;
2681
- out[15] = 1;
2682
- return out;
2683
- }
2684
- function fromXRotation(out, rad) {
2685
- const s = Math.sin(rad);
2686
- const c = Math.cos(rad);
2687
- out[0] = 1;
2688
- out[1] = 0;
2689
- out[2] = 0;
2690
- out[3] = 0;
2691
- out[4] = 0;
2692
- out[5] = c;
2693
- out[6] = s;
2694
- out[7] = 0;
2695
- out[8] = 0;
2696
- out[9] = -s;
2697
- out[10] = c;
2698
- out[11] = 0;
2699
- out[12] = 0;
2700
- out[13] = 0;
2701
- out[14] = 0;
2702
- out[15] = 1;
2703
- return out;
2704
- }
2705
- function fromYRotation(out, rad) {
2706
- const s = Math.sin(rad);
2707
- const c = Math.cos(rad);
2708
- out[0] = c;
2709
- out[1] = 0;
2710
- out[2] = -s;
2711
- out[3] = 0;
2712
- out[4] = 0;
2713
- out[5] = 1;
2714
- out[6] = 0;
2715
- out[7] = 0;
2716
- out[8] = s;
2717
- out[9] = 0;
2718
- out[10] = c;
2719
- out[11] = 0;
2720
- out[12] = 0;
2721
- out[13] = 0;
2722
- out[14] = 0;
2723
- out[15] = 1;
2724
- return out;
2725
- }
2726
- function fromZRotation(out, rad) {
2727
- const s = Math.sin(rad);
2728
- const c = Math.cos(rad);
2729
- out[0] = c;
2730
- out[1] = s;
2731
- out[2] = 0;
2732
- out[3] = 0;
2733
- out[4] = -s;
2734
- out[5] = c;
2735
- out[6] = 0;
2736
- out[7] = 0;
2737
- out[8] = 0;
2738
- out[9] = 0;
2739
- out[10] = 1;
2740
- out[11] = 0;
2741
- out[12] = 0;
2742
- out[13] = 0;
2743
- out[14] = 0;
2744
- out[15] = 1;
2745
- return out;
2746
- }
2747
- function fromRotationTranslation(out, q, v) {
2748
- const x = q[0];
2749
- const y = q[1];
2750
- const z = q[2];
2751
- const w = q[3];
2752
- const x2 = x + x;
2753
- const y2 = y + y;
2754
- const z2 = z + z;
2755
- const xx = x * x2;
2756
- const xy = x * y2;
2757
- const xz = x * z2;
2758
- const yy = y * y2;
2759
- const yz = y * z2;
2760
- const zz = z * z2;
2761
- const wx = w * x2;
2762
- const wy = w * y2;
2763
- const wz = w * z2;
2764
- out[0] = 1 - (yy + zz);
2765
- out[1] = xy + wz;
2766
- out[2] = xz - wy;
2767
- out[3] = 0;
2768
- out[4] = xy - wz;
2769
- out[5] = 1 - (xx + zz);
2770
- out[6] = yz + wx;
2771
- out[7] = 0;
2772
- out[8] = xz + wy;
2773
- out[9] = yz - wx;
2774
- out[10] = 1 - (xx + yy);
2775
- out[11] = 0;
2776
- out[12] = v[0];
2777
- out[13] = v[1];
2778
- out[14] = v[2];
2779
- out[15] = 1;
2780
- return out;
2781
- }
2782
- function fromQuat2(out, a) {
2783
- const translation = new ARRAY_TYPE(3);
2784
- const bx = -a[0];
2785
- const by = -a[1];
2786
- const bz = -a[2];
2787
- const bw = a[3];
2788
- const ax = a[4];
2789
- const ay = a[5];
2790
- const az = a[6];
2791
- const aw = a[7];
2792
- const magnitude = bx * bx + by * by + bz * bz + bw * bw;
2793
- if (magnitude > 0) {
2794
- translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2 / magnitude;
2795
- translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2 / magnitude;
2796
- translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2 / magnitude;
2797
- } else {
2798
- translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;
2799
- translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;
2800
- translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;
2801
- }
2802
- fromRotationTranslation(out, a, translation);
2803
- return out;
2804
- }
2805
- function getTranslation(out, mat) {
2806
- out[0] = mat[12];
2807
- out[1] = mat[13];
2808
- out[2] = mat[14];
2809
- return out;
2810
- }
2811
1912
  function getScaling(out, mat) {
2812
1913
  const m11 = mat[0];
2813
1914
  const m12 = mat[1];
@@ -2823,196 +1924,7 @@ var __exports__ = (() => {
2823
1924
  out[2] = Math.sqrt(m31 * m31 + m32 * m32 + m33 * m33);
2824
1925
  return out;
2825
1926
  }
2826
- function getRotation(out, mat) {
2827
- const scaling = new ARRAY_TYPE(3);
2828
- getScaling(scaling, mat);
2829
- const is1 = 1 / scaling[0];
2830
- const is2 = 1 / scaling[1];
2831
- const is3 = 1 / scaling[2];
2832
- const sm11 = mat[0] * is1;
2833
- const sm12 = mat[1] * is2;
2834
- const sm13 = mat[2] * is3;
2835
- const sm21 = mat[4] * is1;
2836
- const sm22 = mat[5] * is2;
2837
- const sm23 = mat[6] * is3;
2838
- const sm31 = mat[8] * is1;
2839
- const sm32 = mat[9] * is2;
2840
- const sm33 = mat[10] * is3;
2841
- const trace = sm11 + sm22 + sm33;
2842
- let S = 0;
2843
- if (trace > 0) {
2844
- S = Math.sqrt(trace + 1) * 2;
2845
- out[3] = 0.25 * S;
2846
- out[0] = (sm23 - sm32) / S;
2847
- out[1] = (sm31 - sm13) / S;
2848
- out[2] = (sm12 - sm21) / S;
2849
- } else if (sm11 > sm22 && sm11 > sm33) {
2850
- S = Math.sqrt(1 + sm11 - sm22 - sm33) * 2;
2851
- out[3] = (sm23 - sm32) / S;
2852
- out[0] = 0.25 * S;
2853
- out[1] = (sm12 + sm21) / S;
2854
- out[2] = (sm31 + sm13) / S;
2855
- } else if (sm22 > sm33) {
2856
- S = Math.sqrt(1 + sm22 - sm11 - sm33) * 2;
2857
- out[3] = (sm31 - sm13) / S;
2858
- out[0] = (sm12 + sm21) / S;
2859
- out[1] = 0.25 * S;
2860
- out[2] = (sm23 + sm32) / S;
2861
- } else {
2862
- S = Math.sqrt(1 + sm33 - sm11 - sm22) * 2;
2863
- out[3] = (sm12 - sm21) / S;
2864
- out[0] = (sm31 + sm13) / S;
2865
- out[1] = (sm23 + sm32) / S;
2866
- out[2] = 0.25 * S;
2867
- }
2868
- return out;
2869
- }
2870
- function decompose(out_r, out_t, out_s, mat) {
2871
- out_t[0] = mat[12];
2872
- out_t[1] = mat[13];
2873
- out_t[2] = mat[14];
2874
- const m11 = mat[0];
2875
- const m12 = mat[1];
2876
- const m13 = mat[2];
2877
- const m21 = mat[4];
2878
- const m22 = mat[5];
2879
- const m23 = mat[6];
2880
- const m31 = mat[8];
2881
- const m32 = mat[9];
2882
- const m33 = mat[10];
2883
- out_s[0] = Math.sqrt(m11 * m11 + m12 * m12 + m13 * m13);
2884
- out_s[1] = Math.sqrt(m21 * m21 + m22 * m22 + m23 * m23);
2885
- out_s[2] = Math.sqrt(m31 * m31 + m32 * m32 + m33 * m33);
2886
- const is1 = 1 / out_s[0];
2887
- const is2 = 1 / out_s[1];
2888
- const is3 = 1 / out_s[2];
2889
- const sm11 = m11 * is1;
2890
- const sm12 = m12 * is2;
2891
- const sm13 = m13 * is3;
2892
- const sm21 = m21 * is1;
2893
- const sm22 = m22 * is2;
2894
- const sm23 = m23 * is3;
2895
- const sm31 = m31 * is1;
2896
- const sm32 = m32 * is2;
2897
- const sm33 = m33 * is3;
2898
- const trace = sm11 + sm22 + sm33;
2899
- let S = 0;
2900
- if (trace > 0) {
2901
- S = Math.sqrt(trace + 1) * 2;
2902
- out_r[3] = 0.25 * S;
2903
- out_r[0] = (sm23 - sm32) / S;
2904
- out_r[1] = (sm31 - sm13) / S;
2905
- out_r[2] = (sm12 - sm21) / S;
2906
- } else if (sm11 > sm22 && sm11 > sm33) {
2907
- S = Math.sqrt(1 + sm11 - sm22 - sm33) * 2;
2908
- out_r[3] = (sm23 - sm32) / S;
2909
- out_r[0] = 0.25 * S;
2910
- out_r[1] = (sm12 + sm21) / S;
2911
- out_r[2] = (sm31 + sm13) / S;
2912
- } else if (sm22 > sm33) {
2913
- S = Math.sqrt(1 + sm22 - sm11 - sm33) * 2;
2914
- out_r[3] = (sm31 - sm13) / S;
2915
- out_r[0] = (sm12 + sm21) / S;
2916
- out_r[1] = 0.25 * S;
2917
- out_r[2] = (sm23 + sm32) / S;
2918
- } else {
2919
- S = Math.sqrt(1 + sm33 - sm11 - sm22) * 2;
2920
- out_r[3] = (sm12 - sm21) / S;
2921
- out_r[0] = (sm31 + sm13) / S;
2922
- out_r[1] = (sm23 + sm32) / S;
2923
- out_r[2] = 0.25 * S;
2924
- }
2925
- return out_r;
2926
- }
2927
- function fromRotationTranslationScale(out, q, v, s) {
2928
- const x = q[0];
2929
- const y = q[1];
2930
- const z = q[2];
2931
- const w = q[3];
2932
- const x2 = x + x;
2933
- const y2 = y + y;
2934
- const z2 = z + z;
2935
- const xx = x * x2;
2936
- const xy = x * y2;
2937
- const xz = x * z2;
2938
- const yy = y * y2;
2939
- const yz = y * z2;
2940
- const zz = z * z2;
2941
- const wx = w * x2;
2942
- const wy = w * y2;
2943
- const wz = w * z2;
2944
- const sx = s[0];
2945
- const sy = s[1];
2946
- const sz = s[2];
2947
- out[0] = (1 - (yy + zz)) * sx;
2948
- out[1] = (xy + wz) * sx;
2949
- out[2] = (xz - wy) * sx;
2950
- out[3] = 0;
2951
- out[4] = (xy - wz) * sy;
2952
- out[5] = (1 - (xx + zz)) * sy;
2953
- out[6] = (yz + wx) * sy;
2954
- out[7] = 0;
2955
- out[8] = (xz + wy) * sz;
2956
- out[9] = (yz - wx) * sz;
2957
- out[10] = (1 - (xx + yy)) * sz;
2958
- out[11] = 0;
2959
- out[12] = v[0];
2960
- out[13] = v[1];
2961
- out[14] = v[2];
2962
- out[15] = 1;
2963
- return out;
2964
- }
2965
- function fromRotationTranslationScaleOrigin(out, q, v, s, o) {
2966
- const x = q[0];
2967
- const y = q[1];
2968
- const z = q[2];
2969
- const w = q[3];
2970
- const x2 = x + x;
2971
- const y2 = y + y;
2972
- const z2 = z + z;
2973
- const xx = x * x2;
2974
- const xy = x * y2;
2975
- const xz = x * z2;
2976
- const yy = y * y2;
2977
- const yz = y * z2;
2978
- const zz = z * z2;
2979
- const wx = w * x2;
2980
- const wy = w * y2;
2981
- const wz = w * z2;
2982
- const sx = s[0];
2983
- const sy = s[1];
2984
- const sz = s[2];
2985
- const ox = o[0];
2986
- const oy = o[1];
2987
- const oz = o[2];
2988
- const out0 = (1 - (yy + zz)) * sx;
2989
- const out1 = (xy + wz) * sx;
2990
- const out2 = (xz - wy) * sx;
2991
- const out4 = (xy - wz) * sy;
2992
- const out5 = (1 - (xx + zz)) * sy;
2993
- const out6 = (yz + wx) * sy;
2994
- const out8 = (xz + wy) * sz;
2995
- const out9 = (yz - wx) * sz;
2996
- const out10 = (1 - (xx + yy)) * sz;
2997
- out[0] = out0;
2998
- out[1] = out1;
2999
- out[2] = out2;
3000
- out[3] = 0;
3001
- out[4] = out4;
3002
- out[5] = out5;
3003
- out[6] = out6;
3004
- out[7] = 0;
3005
- out[8] = out8;
3006
- out[9] = out9;
3007
- out[10] = out10;
3008
- out[11] = 0;
3009
- out[12] = v[0] + ox - (out0 * ox + out4 * oy + out8 * oz);
3010
- out[13] = v[1] + oy - (out1 * ox + out5 * oy + out9 * oz);
3011
- out[14] = v[2] + oz - (out2 * ox + out6 * oy + out10 * oz);
3012
- out[15] = 1;
3013
- return out;
3014
- }
3015
- function fromQuat3(out, q) {
1927
+ function fromQuat2(out, q) {
3016
1928
  const x = q[0];
3017
1929
  const y = q[1];
3018
1930
  const z = q[2];
@@ -3095,82 +2007,8 @@ var __exports__ = (() => {
3095
2007
  }
3096
2008
  return out;
3097
2009
  }
3098
- var perspective = perspectiveNO;
3099
- function perspectiveZO(out, fovy, aspect, near, far) {
3100
- const f = 1 / Math.tan(fovy / 2);
3101
- out[0] = f / aspect;
3102
- out[1] = 0;
3103
- out[2] = 0;
3104
- out[3] = 0;
3105
- out[4] = 0;
3106
- out[5] = f;
3107
- out[6] = 0;
3108
- out[7] = 0;
3109
- out[8] = 0;
3110
- out[9] = 0;
3111
- out[11] = -1;
3112
- out[12] = 0;
3113
- out[13] = 0;
3114
- out[15] = 0;
3115
- if (far != null && far !== Infinity) {
3116
- const nf = 1 / (near - far);
3117
- out[10] = far * nf;
3118
- out[14] = far * near * nf;
3119
- } else {
3120
- out[10] = -1;
3121
- out[14] = -near;
3122
- }
3123
- return out;
3124
- }
3125
- function perspectiveFromFieldOfView(out, fov, near, far) {
3126
- const upTan = Math.tan(fov.upDegrees * Math.PI / 180);
3127
- const downTan = Math.tan(fov.downDegrees * Math.PI / 180);
3128
- const leftTan = Math.tan(fov.leftDegrees * Math.PI / 180);
3129
- const rightTan = Math.tan(fov.rightDegrees * Math.PI / 180);
3130
- const xScale = 2 / (leftTan + rightTan);
3131
- const yScale = 2 / (upTan + downTan);
3132
- out[0] = xScale;
3133
- out[1] = 0;
3134
- out[2] = 0;
3135
- out[3] = 0;
3136
- out[4] = 0;
3137
- out[5] = yScale;
3138
- out[6] = 0;
3139
- out[7] = 0;
3140
- out[8] = -((leftTan - rightTan) * xScale * 0.5);
3141
- out[9] = (upTan - downTan) * yScale * 0.5;
3142
- out[10] = far / (near - far);
3143
- out[11] = -1;
3144
- out[12] = 0;
3145
- out[13] = 0;
3146
- out[14] = far * near / (near - far);
3147
- out[15] = 0;
3148
- return out;
3149
- }
3150
- function orthoNO(out, left, right, bottom, top, near, far) {
3151
- const lr = 1 / (left - right);
3152
- const bt = 1 / (bottom - top);
3153
- const nf = 1 / (near - far);
3154
- out[0] = -2 * lr;
3155
- out[1] = 0;
3156
- out[2] = 0;
3157
- out[3] = 0;
3158
- out[4] = 0;
3159
- out[5] = -2 * bt;
3160
- out[6] = 0;
3161
- out[7] = 0;
3162
- out[8] = 0;
3163
- out[9] = 0;
3164
- out[10] = 2 * nf;
3165
- out[11] = 0;
3166
- out[12] = (left + right) * lr;
3167
- out[13] = (top + bottom) * bt;
3168
- out[14] = (far + near) * nf;
3169
- out[15] = 1;
3170
- return out;
3171
- }
3172
- var ortho = orthoNO;
3173
- function orthoZO(out, left, right, bottom, top, near, far) {
2010
+ var perspective = perspectiveNO;
2011
+ function orthoNO(out, left, right, bottom, top, near, far) {
3174
2012
  const lr = 1 / (left - right);
3175
2013
  const bt = 1 / (bottom - top);
3176
2014
  const nf = 1 / (near - far);
@@ -3184,14 +2022,15 @@ var __exports__ = (() => {
3184
2022
  out[7] = 0;
3185
2023
  out[8] = 0;
3186
2024
  out[9] = 0;
3187
- out[10] = nf;
2025
+ out[10] = 2 * nf;
3188
2026
  out[11] = 0;
3189
2027
  out[12] = (left + right) * lr;
3190
2028
  out[13] = (top + bottom) * bt;
3191
- out[14] = near * nf;
2029
+ out[14] = (far + near) * nf;
3192
2030
  out[15] = 1;
3193
2031
  return out;
3194
2032
  }
2033
+ var ortho = orthoNO;
3195
2034
  function lookAt(out, eye, center, up) {
3196
2035
  let len2;
3197
2036
  let x0;
@@ -3268,193 +2107,16 @@ var __exports__ = (() => {
3268
2107
  out[15] = 1;
3269
2108
  return out;
3270
2109
  }
3271
- function targetTo(out, eye, target, up) {
3272
- const eyex = eye[0];
3273
- const eyey = eye[1];
3274
- const eyez = eye[2];
3275
- const upx = up[0];
3276
- const upy = up[1];
3277
- const upz = up[2];
3278
- let z0 = eyex - target[0];
3279
- let z1 = eyey - target[1];
3280
- let z2 = eyez - target[2];
3281
- let len2 = z0 * z0 + z1 * z1 + z2 * z2;
3282
- if (len2 > 0) {
3283
- len2 = 1 / Math.sqrt(len2);
3284
- z0 *= len2;
3285
- z1 *= len2;
3286
- z2 *= len2;
3287
- }
3288
- let x0 = upy * z2 - upz * z1;
3289
- let x1 = upz * z0 - upx * z2;
3290
- let x2 = upx * z1 - upy * z0;
3291
- len2 = x0 * x0 + x1 * x1 + x2 * x2;
3292
- if (len2 > 0) {
3293
- len2 = 1 / Math.sqrt(len2);
3294
- x0 *= len2;
3295
- x1 *= len2;
3296
- x2 *= len2;
3297
- }
3298
- out[0] = x0;
3299
- out[1] = x1;
3300
- out[2] = x2;
3301
- out[3] = 0;
3302
- out[4] = z1 * x2 - z2 * x1;
3303
- out[5] = z2 * x0 - z0 * x2;
3304
- out[6] = z0 * x1 - z1 * x0;
3305
- out[7] = 0;
3306
- out[8] = z0;
3307
- out[9] = z1;
3308
- out[10] = z2;
3309
- out[11] = 0;
3310
- out[12] = eyex;
3311
- out[13] = eyey;
3312
- out[14] = eyez;
3313
- out[15] = 1;
3314
- return out;
3315
- }
3316
- function str2(a) {
3317
- return `mat4(${a[0]}, ${a[1]}, ${a[2]}, ${a[3]}, ${a[4]}, ${a[5]}, ${a[6]}, ${a[7]}, ${a[8]}, ${a[9]}, ${a[10]}, ${a[11]}, ${a[12]}, ${a[13]}, ${a[14]}, ${a[15]})`;
3318
- }
3319
- function frob(a) {
3320
- return Math.sqrt(a[0] * a[0] + a[1] * a[1] + a[2] * a[2] + a[3] * a[3] + a[4] * a[4] + a[5] * a[5] + a[6] * a[6] + a[7] * a[7] + a[8] * a[8] + a[9] * a[9] + a[10] * a[10] + a[11] * a[11] + a[12] * a[12] + a[13] * a[13] + a[14] * a[14] + a[15] * a[15]);
3321
- }
3322
- function add2(out, a, b) {
3323
- out[0] = a[0] + b[0];
3324
- out[1] = a[1] + b[1];
3325
- out[2] = a[2] + b[2];
3326
- out[3] = a[3] + b[3];
3327
- out[4] = a[4] + b[4];
3328
- out[5] = a[5] + b[5];
3329
- out[6] = a[6] + b[6];
3330
- out[7] = a[7] + b[7];
3331
- out[8] = a[8] + b[8];
3332
- out[9] = a[9] + b[9];
3333
- out[10] = a[10] + b[10];
3334
- out[11] = a[11] + b[11];
3335
- out[12] = a[12] + b[12];
3336
- out[13] = a[13] + b[13];
3337
- out[14] = a[14] + b[14];
3338
- out[15] = a[15] + b[15];
3339
- return out;
3340
- }
3341
- function subtract2(out, a, b) {
3342
- out[0] = a[0] - b[0];
3343
- out[1] = a[1] - b[1];
3344
- out[2] = a[2] - b[2];
3345
- out[3] = a[3] - b[3];
3346
- out[4] = a[4] - b[4];
3347
- out[5] = a[5] - b[5];
3348
- out[6] = a[6] - b[6];
3349
- out[7] = a[7] - b[7];
3350
- out[8] = a[8] - b[8];
3351
- out[9] = a[9] - b[9];
3352
- out[10] = a[10] - b[10];
3353
- out[11] = a[11] - b[11];
3354
- out[12] = a[12] - b[12];
3355
- out[13] = a[13] - b[13];
3356
- out[14] = a[14] - b[14];
3357
- out[15] = a[15] - b[15];
3358
- return out;
3359
- }
3360
- function multiplyScalar(out, a, b) {
3361
- out[0] = a[0] * b;
3362
- out[1] = a[1] * b;
3363
- out[2] = a[2] * b;
3364
- out[3] = a[3] * b;
3365
- out[4] = a[4] * b;
3366
- out[5] = a[5] * b;
3367
- out[6] = a[6] * b;
3368
- out[7] = a[7] * b;
3369
- out[8] = a[8] * b;
3370
- out[9] = a[9] * b;
3371
- out[10] = a[10] * b;
3372
- out[11] = a[11] * b;
3373
- out[12] = a[12] * b;
3374
- out[13] = a[13] * b;
3375
- out[14] = a[14] * b;
3376
- out[15] = a[15] * b;
3377
- return out;
3378
- }
3379
- function multiplyScalarAndAdd(out, a, b, scale6) {
3380
- out[0] = a[0] + b[0] * scale6;
3381
- out[1] = a[1] + b[1] * scale6;
3382
- out[2] = a[2] + b[2] * scale6;
3383
- out[3] = a[3] + b[3] * scale6;
3384
- out[4] = a[4] + b[4] * scale6;
3385
- out[5] = a[5] + b[5] * scale6;
3386
- out[6] = a[6] + b[6] * scale6;
3387
- out[7] = a[7] + b[7] * scale6;
3388
- out[8] = a[8] + b[8] * scale6;
3389
- out[9] = a[9] + b[9] * scale6;
3390
- out[10] = a[10] + b[10] * scale6;
3391
- out[11] = a[11] + b[11] * scale6;
3392
- out[12] = a[12] + b[12] * scale6;
3393
- out[13] = a[13] + b[13] * scale6;
3394
- out[14] = a[14] + b[14] * scale6;
3395
- out[15] = a[15] + b[15] * scale6;
3396
- return out;
3397
- }
3398
- function exactEquals2(a, b) {
3399
- return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8] && a[9] === b[9] && a[10] === b[10] && a[11] === b[11] && a[12] === b[12] && a[13] === b[13] && a[14] === b[14] && a[15] === b[15];
3400
- }
3401
- function equals3(a, b) {
3402
- const a0 = a[0];
3403
- const a1 = a[1];
3404
- const a2 = a[2];
3405
- const a3 = a[3];
3406
- const a4 = a[4];
3407
- const a5 = a[5];
3408
- const a6 = a[6];
3409
- const a7 = a[7];
3410
- const a8 = a[8];
3411
- const a9 = a[9];
3412
- const a10 = a[10];
3413
- const a11 = a[11];
3414
- const a12 = a[12];
3415
- const a13 = a[13];
3416
- const a14 = a[14];
3417
- const a15 = a[15];
3418
- const b0 = b[0];
3419
- const b1 = b[1];
3420
- const b2 = b[2];
3421
- const b3 = b[3];
3422
- const b4 = b[4];
3423
- const b5 = b[5];
3424
- const b6 = b[6];
3425
- const b7 = b[7];
3426
- const b8 = b[8];
3427
- const b9 = b[9];
3428
- const b10 = b[10];
3429
- const b11 = b[11];
3430
- const b12 = b[12];
3431
- const b13 = b[13];
3432
- const b14 = b[14];
3433
- const b15 = b[15];
3434
- return Math.abs(a0 - b0) <= EPSILON * Math.max(1, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON * Math.max(1, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= EPSILON * Math.max(1, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= EPSILON * Math.max(1, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= EPSILON * Math.max(1, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= EPSILON * Math.max(1, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= EPSILON * Math.max(1, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= EPSILON * Math.max(1, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= EPSILON * Math.max(1, Math.abs(a8), Math.abs(b8)) && Math.abs(a9 - b9) <= EPSILON * Math.max(1, Math.abs(a9), Math.abs(b9)) && Math.abs(a10 - b10) <= EPSILON * Math.max(1, Math.abs(a10), Math.abs(b10)) && Math.abs(a11 - b11) <= EPSILON * Math.max(1, Math.abs(a11), Math.abs(b11)) && Math.abs(a12 - b12) <= EPSILON * Math.max(1, Math.abs(a12), Math.abs(b12)) && Math.abs(a13 - b13) <= EPSILON * Math.max(1, Math.abs(a13), Math.abs(b13)) && Math.abs(a14 - b14) <= EPSILON * Math.max(1, Math.abs(a14), Math.abs(b14)) && Math.abs(a15 - b15) <= EPSILON * Math.max(1, Math.abs(a15), Math.abs(b15));
3435
- }
3436
- var mul2 = multiply3;
3437
- var sub2 = subtract2;
3438
2110
 
3439
2111
  // ../../node_modules/@math.gl/core/dist/gl-matrix/vec4.js
3440
- function create5() {
3441
- const out = new ARRAY_TYPE(4);
3442
- if (ARRAY_TYPE !== Float32Array) {
3443
- out[0] = 0;
3444
- out[1] = 0;
3445
- out[2] = 0;
3446
- out[3] = 0;
3447
- }
3448
- return out;
3449
- }
3450
- function add3(out, a, b) {
2112
+ function add(out, a, b) {
3451
2113
  out[0] = a[0] + b[0];
3452
2114
  out[1] = a[1] + b[1];
3453
2115
  out[2] = a[2] + b[2];
3454
2116
  out[3] = a[3] + b[3];
3455
2117
  return out;
3456
2118
  }
3457
- function scale4(out, a, b) {
2119
+ function scale3(out, a, b) {
3458
2120
  out[0] = a[0] * b;
3459
2121
  out[1] = a[1] * b;
3460
2122
  out[2] = a[2] * b;
@@ -3468,7 +2130,7 @@ var __exports__ = (() => {
3468
2130
  const w = a[3];
3469
2131
  return Math.sqrt(x * x + y * y + z * z + w * w);
3470
2132
  }
3471
- function squaredLength2(a) {
2133
+ function squaredLength(a) {
3472
2134
  const x = a[0];
3473
2135
  const y = a[1];
3474
2136
  const z = a[2];
@@ -3493,7 +2155,7 @@ var __exports__ = (() => {
3493
2155
  function dot2(a, b) {
3494
2156
  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];
3495
2157
  }
3496
- function lerp2(out, a, b, t) {
2158
+ function lerp(out, a, b, t) {
3497
2159
  const ax = a[0];
3498
2160
  const ay = a[1];
3499
2161
  const az = a[2];
@@ -3515,54 +2177,6 @@ var __exports__ = (() => {
3515
2177
  out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;
3516
2178
  return out;
3517
2179
  }
3518
- function transformQuat2(out, a, q) {
3519
- const x = a[0];
3520
- const y = a[1];
3521
- const z = a[2];
3522
- const qx = q[0];
3523
- const qy = q[1];
3524
- const qz = q[2];
3525
- const qw = q[3];
3526
- const ix = qw * x + qy * z - qz * y;
3527
- const iy = qw * y + qz * x - qx * z;
3528
- const iz = qw * z + qx * y - qy * x;
3529
- const iw = -qx * x - qy * y - qz * z;
3530
- out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;
3531
- out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;
3532
- out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;
3533
- out[3] = a[3];
3534
- return out;
3535
- }
3536
- var forEach3 = (function() {
3537
- const vec = create5();
3538
- return function(a, stride, offset, count, fn, arg) {
3539
- let i;
3540
- let l;
3541
- if (!stride) {
3542
- stride = 4;
3543
- }
3544
- if (!offset) {
3545
- offset = 0;
3546
- }
3547
- if (count) {
3548
- l = Math.min(count * stride + offset, a.length);
3549
- } else {
3550
- l = a.length;
3551
- }
3552
- for (i = offset; i < l; i += stride) {
3553
- vec[0] = a[i];
3554
- vec[1] = a[i + 1];
3555
- vec[2] = a[i + 2];
3556
- vec[3] = a[i + 3];
3557
- fn(vec, vec, arg);
3558
- a[i] = vec[0];
3559
- a[i + 1] = vec[1];
3560
- a[i + 2] = vec[2];
3561
- a[i + 3] = vec[3];
3562
- }
3563
- return a;
3564
- };
3565
- })();
3566
2180
 
3567
2181
  // ../../node_modules/@math.gl/core/dist/classes/matrix4.js
3568
2182
  var INDICES2;
@@ -3712,9 +2326,17 @@ var __exports__ = (() => {
3712
2326
  * @returns self
3713
2327
  */
3714
2328
  fromQuaternion(quaternion) {
3715
- fromQuat3(this, quaternion);
2329
+ fromQuat2(this, quaternion);
3716
2330
  return this.check();
3717
2331
  }
2332
+ /**
2333
+ * Sets this matrix from a 3x3 matrix, with zero translation.
2334
+ * @param matrix3 - 3x3 matrix in column-major order.
2335
+ * @returns This matrix.
2336
+ */
2337
+ fromMatrix3(matrix3) {
2338
+ return this.set(matrix3[0], matrix3[1], matrix3[2], 0, matrix3[3], matrix3[4], matrix3[5], 0, matrix3[6], matrix3[7], matrix3[8], 0, 0, 0, 0, 1);
2339
+ }
3718
2340
  /**
3719
2341
  * Generates a frustum matrix with the given bounds
3720
2342
  * @param view.left - Left bound of the frustum
@@ -3838,10 +2460,10 @@ var __exports__ = (() => {
3838
2460
  getRotation(result, scaleResult) {
3839
2461
  result = result || [-0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0];
3840
2462
  scaleResult = scaleResult || [-0, -0, -0];
3841
- const scale6 = this.getScale(scaleResult);
3842
- const inverseScale0 = 1 / scale6[0];
3843
- const inverseScale1 = 1 / scale6[1];
3844
- const inverseScale2 = 1 / scale6[2];
2463
+ const scale5 = this.getScale(scaleResult);
2464
+ const inverseScale0 = 1 / scale5[0];
2465
+ const inverseScale1 = 1 / scale5[1];
2466
+ const inverseScale2 = 1 / scale5[2];
3845
2467
  result[0] = this[0] * inverseScale0;
3846
2468
  result[1] = this[1] * inverseScale1;
3847
2469
  result[2] = this[2] * inverseScale2;
@@ -3869,10 +2491,10 @@ var __exports__ = (() => {
3869
2491
  getRotationMatrix3(result, scaleResult) {
3870
2492
  result = result || [-0, -0, -0, -0, -0, -0, -0, -0, -0];
3871
2493
  scaleResult = scaleResult || [-0, -0, -0];
3872
- const scale6 = this.getScale(scaleResult);
3873
- const inverseScale0 = 1 / scale6[0];
3874
- const inverseScale1 = 1 / scale6[1];
3875
- const inverseScale2 = 1 / scale6[2];
2494
+ const scale5 = this.getScale(scaleResult);
2495
+ const inverseScale0 = 1 / scale5[0];
2496
+ const inverseScale1 = 1 / scale5[1];
2497
+ const inverseScale2 = 1 / scale5[2];
3876
2498
  result[0] = this[0] * inverseScale0;
3877
2499
  result[1] = this[1] * inverseScale1;
3878
2500
  result[2] = this[2] * inverseScale2;
@@ -3895,11 +2517,11 @@ var __exports__ = (() => {
3895
2517
  }
3896
2518
  // Operations
3897
2519
  multiplyLeft(a) {
3898
- multiply3(this, a, this);
2520
+ multiply2(this, a, this);
3899
2521
  return this.check();
3900
2522
  }
3901
2523
  multiplyRight(a) {
3902
- multiply3(this, this, a);
2524
+ multiply2(this, this, a);
3903
2525
  return this.check();
3904
2526
  }
3905
2527
  // Rotates a matrix by the given angle around the X axis
@@ -3945,7 +2567,7 @@ var __exports__ = (() => {
3945
2567
  * @returns self
3946
2568
  */
3947
2569
  scale(factor) {
3948
- scale3(this, this, Array.isArray(factor) ? factor : [factor, factor, factor]);
2570
+ scale2(this, this, Array.isArray(factor) ? factor : [factor, factor, factor]);
3949
2571
  return this.check();
3950
2572
  }
3951
2573
  /**
@@ -4015,18 +2637,6 @@ var __exports__ = (() => {
4015
2637
  checkVector(out, vector.length);
4016
2638
  return out;
4017
2639
  }
4018
- /** @deprecated */
4019
- transformPoint(vector, result) {
4020
- return this.transformAsPoint(vector, result);
4021
- }
4022
- /** @deprecated */
4023
- transformVector(vector, result) {
4024
- return this.transformAsPoint(vector, result);
4025
- }
4026
- /** @deprecated */
4027
- transformDirection(vector, result) {
4028
- return this.transformAsVector(vector, result);
4029
- }
4030
2640
  // three.js math API compatibility
4031
2641
  makeRotationX(radians2) {
4032
2642
  return this.identity().rotateX(radians2);
@@ -4035,14 +2645,14 @@ var __exports__ = (() => {
4035
2645
  return this.identity().translate([x, y, z]);
4036
2646
  }
4037
2647
  };
4038
- var ZERO3;
2648
+ var ZERO2;
4039
2649
  var IDENTITY;
4040
2650
  function getZeroMatrix2() {
4041
- if (!ZERO3) {
4042
- ZERO3 = new Matrix4([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
4043
- Object.freeze(ZERO3);
2651
+ if (!ZERO2) {
2652
+ ZERO2 = new Matrix4([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
2653
+ Object.freeze(ZERO2);
4044
2654
  }
4045
- return ZERO3;
2655
+ return ZERO2;
4046
2656
  }
4047
2657
  function getIdentityMatrix2() {
4048
2658
  if (!IDENTITY) {
@@ -4084,16 +2694,6 @@ var __exports__ = (() => {
4084
2694
  }
4085
2695
 
4086
2696
  // ../../node_modules/@math.gl/core/dist/gl-matrix/quat.js
4087
- function create6() {
4088
- const out = new ARRAY_TYPE(4);
4089
- if (ARRAY_TYPE !== Float32Array) {
4090
- out[0] = 0;
4091
- out[1] = 0;
4092
- out[2] = 0;
4093
- }
4094
- out[3] = 1;
4095
- return out;
4096
- }
4097
2697
  function identity2(out) {
4098
2698
  out[0] = 0;
4099
2699
  out[1] = 0;
@@ -4110,7 +2710,7 @@ var __exports__ = (() => {
4110
2710
  out[3] = Math.cos(rad);
4111
2711
  return out;
4112
2712
  }
4113
- function multiply4(out, a, b) {
2713
+ function multiply3(out, a, b) {
4114
2714
  const ax = a[0];
4115
2715
  const ay = a[1];
4116
2716
  const az = a[2];
@@ -4177,7 +2777,7 @@ var __exports__ = (() => {
4177
2777
  out[3] = Math.sqrt(Math.abs(1 - x * x - y * y - z * z));
4178
2778
  return out;
4179
2779
  }
4180
- function slerp2(out, a, b, t) {
2780
+ function slerp(out, a, b, t) {
4181
2781
  const ax = a[0];
4182
2782
  const ay = a[1];
4183
2783
  const az = a[2];
@@ -4261,15 +2861,15 @@ var __exports__ = (() => {
4261
2861
  }
4262
2862
  return out;
4263
2863
  }
4264
- var add4 = add3;
4265
- var scale5 = scale4;
2864
+ var add2 = add;
2865
+ var scale4 = scale3;
4266
2866
  var dot3 = dot2;
4267
- var lerp3 = lerp2;
2867
+ var lerp2 = lerp;
4268
2868
  var length3 = length2;
4269
- var squaredLength3 = squaredLength2;
2869
+ var squaredLength2 = squaredLength;
4270
2870
  var normalize3 = normalize2;
4271
- var rotationTo = (function() {
4272
- const tmpvec3 = create2();
2871
+ var rotationTo = /* @__PURE__ */ (function() {
2872
+ const tmpvec3 = create();
4273
2873
  const xUnitVec3 = fromValues(1, 0, 0);
4274
2874
  const yUnitVec3 = fromValues(0, 1, 0);
4275
2875
  return function(out, a, b) {
@@ -4296,34 +2896,8 @@ var __exports__ = (() => {
4296
2896
  return normalize3(out, out);
4297
2897
  };
4298
2898
  })();
4299
- var sqlerp = (function() {
4300
- const temp1 = create6();
4301
- const temp2 = create6();
4302
- return function(out, a, b, c, d, t) {
4303
- slerp2(temp1, a, d, t);
4304
- slerp2(temp2, b, c, t);
4305
- slerp2(out, temp1, temp2, 2 * t * (1 - t));
4306
- return out;
4307
- };
4308
- })();
4309
- var setAxes = (function() {
4310
- const matr = create3();
4311
- return function(out, view, right, up) {
4312
- matr[0] = right[0];
4313
- matr[3] = right[1];
4314
- matr[6] = right[2];
4315
- matr[1] = up[0];
4316
- matr[4] = up[1];
4317
- matr[7] = up[2];
4318
- matr[2] = -view[0];
4319
- matr[5] = -view[1];
4320
- matr[8] = -view[2];
4321
- return normalize3(out, fromMat3(out, matr));
4322
- };
4323
- })();
4324
2899
 
4325
2900
  // ../../node_modules/@math.gl/core/dist/classes/quaternion.js
4326
- var IDENTITY_QUATERNION = [0, 0, 0, 1];
4327
2901
  var Quaternion = class extends MathArray {
4328
2902
  constructor(x = 0, y = 0, z = 0, w = 1) {
4329
2903
  super(-0, -0, -0, -0);
@@ -4365,6 +2939,30 @@ var __exports__ = (() => {
4365
2939
  fromMat3(this, m);
4366
2940
  return this.check();
4367
2941
  }
2942
+ /**
2943
+ * Sets this quaternion from Euler angles.
2944
+ * @param euler - Euler angles and rotation order.
2945
+ * @returns This quaternion.
2946
+ */
2947
+ fromEuler(euler) {
2948
+ this.identity();
2949
+ switch (euler.order) {
2950
+ case "xyz":
2951
+ return this.rotateX(euler.x).rotateY(euler.y).rotateZ(euler.z);
2952
+ case "yxz":
2953
+ return this.rotateY(euler.y).rotateX(euler.x).rotateZ(euler.z);
2954
+ case "zxy":
2955
+ return this.rotateZ(euler.z).rotateX(euler.x).rotateY(euler.y);
2956
+ case "zyx":
2957
+ return this.rotateZ(euler.z).rotateY(euler.y).rotateX(euler.x);
2958
+ case "yzx":
2959
+ return this.rotateY(euler.y).rotateZ(euler.z).rotateX(euler.x);
2960
+ case "xzy":
2961
+ return this.rotateX(euler.x).rotateZ(euler.z).rotateY(euler.y);
2962
+ default:
2963
+ throw new Error("Unknown Euler angle order");
2964
+ }
2965
+ }
4368
2966
  fromAxisRotation(axis, rad) {
4369
2967
  setAxisAngle(this, axis, rad);
4370
2968
  return this.check();
@@ -4417,7 +3015,7 @@ var __exports__ = (() => {
4417
3015
  }
4418
3016
  // Calculates the squared length of a quat
4419
3017
  lengthSquared() {
4420
- return squaredLength3(this);
3018
+ return squaredLength2(this);
4421
3019
  }
4422
3020
  // Calculates the dot product of two quat's
4423
3021
  // @return {Number}
@@ -4456,7 +3054,7 @@ var __exports__ = (() => {
4456
3054
  // }
4457
3055
  // Adds two quat's
4458
3056
  add(a) {
4459
- add4(this, this, a);
3057
+ add2(this, this, a);
4460
3058
  return this.check();
4461
3059
  }
4462
3060
  // Calculates the W component of a quat from the X, Y, and Z components.
@@ -4481,16 +3079,16 @@ var __exports__ = (() => {
4481
3079
  if (t === void 0) {
4482
3080
  return this.lerp(this, a, b);
4483
3081
  }
4484
- lerp3(this, a, b, t);
3082
+ lerp2(this, a, b, t);
4485
3083
  return this.check();
4486
3084
  }
4487
3085
  // Multiplies two quat's
4488
3086
  multiplyRight(a) {
4489
- multiply4(this, this, a);
3087
+ multiply3(this, this, a);
4490
3088
  return this.check();
4491
3089
  }
4492
3090
  multiplyLeft(a) {
4493
- multiply4(this, a, this);
3091
+ multiply3(this, a, this);
4494
3092
  return this.check();
4495
3093
  }
4496
3094
  // Normalize a quat
@@ -4523,7 +3121,7 @@ var __exports__ = (() => {
4523
3121
  }
4524
3122
  // Scales a quat by a scalar number
4525
3123
  scale(b) {
4526
- scale5(this, this, b);
3124
+ scale4(this, this, b);
4527
3125
  return this.check();
4528
3126
  }
4529
3127
  // Performs a spherical linear interpolation between two quat
@@ -4532,13 +3130,6 @@ var __exports__ = (() => {
4532
3130
  let target;
4533
3131
  let ratio;
4534
3132
  switch (arguments.length) {
4535
- case 1:
4536
- ({
4537
- start: start2 = IDENTITY_QUATERNION,
4538
- target,
4539
- ratio
4540
- } = arg0);
4541
- break;
4542
3133
  case 2:
4543
3134
  start2 = this;
4544
3135
  target = arg0;
@@ -4549,13 +3140,9 @@ var __exports__ = (() => {
4549
3140
  target = arg1;
4550
3141
  ratio = arg2;
4551
3142
  }
4552
- slerp2(this, start2, target, ratio);
3143
+ slerp(this, start2, target, ratio);
4553
3144
  return this.check();
4554
3145
  }
4555
- transformVector4(vector, result = new Vector4()) {
4556
- transformQuat2(result, vector, this);
4557
- return checkVector(result, 4);
4558
- }
4559
3146
  // THREE.js Math API compatibility
4560
3147
  lengthSq() {
4561
3148
  return this.lengthSquared();
@@ -4863,7 +3450,7 @@ var __exports__ = (() => {
4863
3450
  h.copy(scratchCartesian).subtract(point);
4864
3451
  const longitude = Math.atan2(normal.y, normal.x);
4865
3452
  const latitude = Math.asin(normal.z);
4866
- const height = Math.sign(vec3_exports.dot(h, scratchCartesian)) * vec3_exports.length(h);
3453
+ const height = Math.sign(dot(h, scratchCartesian)) * length(h);
4867
3454
  return toCartographicFromRadians([longitude, latitude, height], result);
4868
3455
  }
4869
3456
  eastNorthUpToFixedFrame(origin, result = new Matrix4()) {
@@ -4903,7 +3490,7 @@ var __exports__ = (() => {
4903
3490
  const positionZ = scratchPosition.z;
4904
3491
  const oneOverRadiiSquared = this.oneOverRadiiSquared;
4905
3492
  const beta = 1 / Math.sqrt(positionX * positionX * oneOverRadiiSquared.x + positionY * positionY * oneOverRadiiSquared.y + positionZ * positionZ * oneOverRadiiSquared.z);
4906
- return scratchPosition.multiplyScalar(beta).to(result);
3493
+ return scratchPosition.multiplyByScalar(beta).to(result);
4907
3494
  }
4908
3495
  /** Transforms a Cartesian X, Y, Z position to the ellipsoid-scaled space by multiplying
4909
3496
  * its components by the result of `Ellipsoid#oneOverRadii` */
@@ -5013,8 +3600,8 @@ var __exports__ = (() => {
5013
3600
  */
5014
3601
  transform(transform2) {
5015
3602
  this.center.transform(transform2);
5016
- const scale6 = mat4_exports.getScaling(scratchVector7, transform2);
5017
- this.radius = Math.max(scale6[0], Math.max(scale6[1], scale6[2])) * this.radius;
3603
+ const scale5 = getScaling(scratchVector7, transform2);
3604
+ this.radius = Math.max(scale5[0], Math.max(scale5[1], scale5[2])) * this.radius;
5018
3605
  return this;
5019
3606
  }
5020
3607
  /** Computes the estimated distance squared from the closest point on a bounding sphere to a point. */
@@ -5269,24 +3856,24 @@ var __exports__ = (() => {
5269
3856
  var scratchPosition2 = new Vector3();
5270
3857
  var scratchNormal3 = new Vector3();
5271
3858
  var Plane = class _Plane {
5272
- constructor(normal = [0, 0, 1], distance2 = 0) {
3859
+ constructor(normal = [0, 0, 1], distance = 0) {
5273
3860
  this.normal = new Vector3();
5274
3861
  this.distance = -0;
5275
- this.fromNormalDistance(normal, distance2);
3862
+ this.fromNormalDistance(normal, distance);
5276
3863
  }
5277
3864
  /** Creates a plane from a normal and a distance from the origin. */
5278
- fromNormalDistance(normal, distance2) {
5279
- assert(Number.isFinite(distance2));
3865
+ fromNormalDistance(normal, distance) {
3866
+ assert(Number.isFinite(distance));
5280
3867
  this.normal.from(normal).normalize();
5281
- this.distance = distance2;
3868
+ this.distance = distance;
5282
3869
  return this;
5283
3870
  }
5284
3871
  /** Creates a plane from a normal and a point on the plane. */
5285
3872
  fromPointNormal(point, normal) {
5286
3873
  point = scratchPosition2.from(point);
5287
3874
  this.normal.from(normal).normalize();
5288
- const distance2 = -this.normal.dot(point);
5289
- this.distance = distance2;
3875
+ const distance = -this.normal.dot(point);
3876
+ this.distance = distance;
5290
3877
  return this;
5291
3878
  }
5292
3879
  /** Creates a plane from the general equation */
@@ -7910,8 +6497,8 @@ var __exports__ = (() => {
7910
6497
  const [longitude, latitude] = tile.header.mbs;
7911
6498
  const deltaLon = Math.abs(viewportLongitude - longitude);
7912
6499
  const deltaLat = Math.abs(viewportLatitude - latitude);
7913
- const distance2 = Math.sqrt(deltaLat * deltaLat + deltaLon * deltaLon);
7914
- tuples.push([index, distance2]);
6500
+ const distance = Math.sqrt(deltaLat * deltaLat + deltaLon * deltaLon);
6501
+ tuples.push([index, distance]);
7915
6502
  }
7916
6503
  const tuplesSorted = tuples.sort((a, b) => a[1] - b[1]);
7917
6504
  const selectedTiles = [];
@@ -9419,8 +8006,8 @@ var __exports__ = (() => {
9419
8006
  function createSphere(sphere2, transform2, result) {
9420
8007
  const center = new Vector3(sphere2[0], sphere2[1], sphere2[2]);
9421
8008
  transform2.transform(center, center);
9422
- const scale6 = transform2.getScale(scratchScale);
9423
- const uniformScale = Math.max(Math.max(scale6[0], scale6[1]), scale6[2]);
8009
+ const scale5 = transform2.getScale(scratchScale);
8010
+ const uniformScale = Math.max(Math.max(scale5[0], scale5[1]), scale5[2]);
9424
8011
  const radius = sphere2[3] * uniformScale;
9425
8012
  if (defined(result)) {
9426
8013
  result.center = center;
@@ -12321,6 +10908,9 @@ var __exports__ = (() => {
12321
10908
  lon_0: function(v) {
12322
10909
  self.long0 = v * D2R;
12323
10910
  },
10911
+ lon_wrap: function(v) {
10912
+ self.long_wrap = parseFloat(v) * D2R;
10913
+ },
12324
10914
  lon_1: function(v) {
12325
10915
  self.long1 = v * D2R;
12326
10916
  },
@@ -13641,6 +12231,7 @@ var __exports__ = (() => {
13641
12231
  if (!("y0" in this)) {
13642
12232
  this.y0 = 0;
13643
12233
  }
12234
+ this.long0 = this.long0 || 0;
13644
12235
  this.e = Math.sqrt(this.es);
13645
12236
  if (this.lat_ts) {
13646
12237
  if (this.sphere) {
@@ -13682,7 +12273,7 @@ var __exports__ = (() => {
13682
12273
  return p;
13683
12274
  }
13684
12275
  }
13685
- function inverse2(p) {
12276
+ function inverse(p) {
13686
12277
  var x = p.x - this.x0;
13687
12278
  var y = p.y - this.y0;
13688
12279
  var lon, lat;
@@ -13704,7 +12295,7 @@ var __exports__ = (() => {
13704
12295
  var merc_default = {
13705
12296
  init,
13706
12297
  forward,
13707
- inverse: inverse2,
12298
+ inverse,
13708
12299
  names
13709
12300
  };
13710
12301
 
@@ -13726,7 +12317,7 @@ var __exports__ = (() => {
13726
12317
  var projs = [merc_default, longlat_default];
13727
12318
  var names3 = {};
13728
12319
  var projStore = [];
13729
- function add5(proj, i) {
12320
+ function add3(proj, i) {
13730
12321
  var len2 = projStore.length;
13731
12322
  if (!proj.names) {
13732
12323
  console.log(i);
@@ -13755,11 +12346,11 @@ var __exports__ = (() => {
13755
12346
  }
13756
12347
  }
13757
12348
  function start() {
13758
- projs.forEach(add5);
12349
+ projs.forEach(add3);
13759
12350
  }
13760
12351
  var projections_default = {
13761
12352
  start,
13762
- add: add5,
12353
+ add: add3,
13763
12354
  get
13764
12355
  };
13765
12356
 
@@ -13943,7 +12534,7 @@ var __exports__ = (() => {
13943
12534
  },
13944
12535
  plessis: {
13945
12536
  a: 6376523,
13946
- rf: 6355863,
12537
+ b: 6355863,
13947
12538
  ellipseName: "Plessis 1817 (France)"
13948
12539
  },
13949
12540
  krass: {
@@ -14069,7 +12660,7 @@ var __exports__ = (() => {
14069
12660
  },
14070
12661
  carthage: {
14071
12662
  towgs84: "-263.0,6.0,431.0",
14072
- ellipse: "clark80",
12663
+ ellipse: "clrk80ign",
14073
12664
  datumName: "Carthage 1934 Tunisia"
14074
12665
  },
14075
12666
  hermannskogel: {
@@ -15651,7 +14242,6 @@ var __exports__ = (() => {
15651
14242
  json.datumName = datumDef.datumName ? datumDef.datumName : json.datumCode;
15652
14243
  }
15653
14244
  }
15654
- json.k0 = json.k0 || 1;
15655
14245
  json.axis = json.axis || "enu";
15656
14246
  json.ellps = json.ellps || "wgs84";
15657
14247
  json.lat1 = json.lat1 || json.lat0;
@@ -15680,6 +14270,9 @@ var __exports__ = (() => {
15680
14270
  if ("init" in this && typeof this.init === "function") {
15681
14271
  this.init();
15682
14272
  }
14273
+ if (!this.k0) {
14274
+ this.k0 = 1;
14275
+ }
15683
14276
  callback(null, this);
15684
14277
  }
15685
14278
  Projection.projections = projections_default;
@@ -15890,7 +14483,7 @@ var __exports__ = (() => {
15890
14483
  }
15891
14484
  return point;
15892
14485
  }
15893
- function applyGridShift(source, inverse36, point) {
14486
+ function applyGridShift(source, inverse35, point) {
15894
14487
  if (source.grids === null || source.grids.length === 0) {
15895
14488
  console.log("Grid shift grids not found");
15896
14489
  return -1;
@@ -15924,7 +14517,7 @@ var __exports__ = (() => {
15924
14517
  if (minY > input.y || minX > input.x || maxY < input.y || maxX < input.x) {
15925
14518
  continue;
15926
14519
  }
15927
- output = applySubgridShift(input, inverse36, subgrid);
14520
+ output = applySubgridShift(input, inverse35, subgrid);
15928
14521
  if (!isNaN(output.x)) {
15929
14522
  break outer;
15930
14523
  }
@@ -15938,7 +14531,7 @@ var __exports__ = (() => {
15938
14531
  point.y = output.y;
15939
14532
  return 0;
15940
14533
  }
15941
- function applySubgridShift(pin, inverse36, ct) {
14534
+ function applySubgridShift(pin, inverse35, ct) {
15942
14535
  var val = { x: Number.NaN, y: Number.NaN };
15943
14536
  if (isNaN(pin.x)) {
15944
14537
  return val;
@@ -15948,7 +14541,7 @@ var __exports__ = (() => {
15948
14541
  tb.y -= ct.ll[1];
15949
14542
  tb.x = adjust_lon_default(tb.x - Math.PI) + Math.PI;
15950
14543
  var t = nadInterpolate(tb, ct);
15951
- if (inverse36) {
14544
+ if (inverse35) {
15952
14545
  if (isNaN(t.x)) {
15953
14546
  return val;
15954
14547
  }
@@ -16159,6 +14752,9 @@ var __exports__ = (() => {
16159
14752
  };
16160
14753
  }
16161
14754
  if (dest.projName === "longlat") {
14755
+ if (dest.long_wrap !== void 0) {
14756
+ point.x = dest.long_wrap + adjust_lon_default(point.x - dest.long_wrap);
14757
+ }
16162
14758
  point = {
16163
14759
  x: point.x * R2D,
16164
14760
  y: point.y * R2D,
@@ -16333,7 +14929,7 @@ var __exports__ = (() => {
16333
14929
  var Z = 90;
16334
14930
  var mgrs_default = {
16335
14931
  forward: forward2,
16336
- inverse: inverse3,
14932
+ inverse: inverse2,
16337
14933
  toPoint
16338
14934
  };
16339
14935
  function forward2(ll, accuracy) {
@@ -16343,7 +14939,7 @@ var __exports__ = (() => {
16343
14939
  lon: ll[0]
16344
14940
  }), accuracy);
16345
14941
  }
16346
- function inverse3(mgrs) {
14942
+ function inverse2(mgrs) {
16347
14943
  var bbox = UTMtoLL(decode(mgrs.toUpperCase()));
16348
14944
  if (bbox.lat && bbox.lon) {
16349
14945
  return [bbox.lon, bbox.lat, bbox.lon, bbox.lat];
@@ -16602,9 +15198,9 @@ var __exports__ = (() => {
16602
15198
  throw "MGRSPoint zone letter " + zoneLetter + " not handled: " + mgrsString;
16603
15199
  }
16604
15200
  hunK = mgrsString.substring(i, i += 2);
16605
- var set4 = get100kSetForZone(zoneNumber);
16606
- var east100k = getEastingFromChar(hunK.charAt(0), set4);
16607
- var north100k = getNorthingFromChar(hunK.charAt(1), set4);
15201
+ var set2 = get100kSetForZone(zoneNumber);
15202
+ var east100k = getEastingFromChar(hunK.charAt(0), set2);
15203
+ var north100k = getNorthingFromChar(hunK.charAt(1), set2);
16608
15204
  while (north100k < getMinNorthing(zoneLetter)) {
16609
15205
  north100k += 2e6;
16610
15206
  }
@@ -16633,8 +15229,8 @@ var __exports__ = (() => {
16633
15229
  accuracy: accuracyBonus
16634
15230
  };
16635
15231
  }
16636
- function getEastingFromChar(e, set4) {
16637
- var curCol = SET_ORIGIN_COLUMN_LETTERS.charCodeAt(set4 - 1);
15232
+ function getEastingFromChar(e, set2) {
15233
+ var curCol = SET_ORIGIN_COLUMN_LETTERS.charCodeAt(set2 - 1);
16638
15234
  var eastingValue = 1e5;
16639
15235
  var rewindMarker = false;
16640
15236
  while (curCol !== e.charCodeAt(0)) {
@@ -16656,11 +15252,11 @@ var __exports__ = (() => {
16656
15252
  }
16657
15253
  return eastingValue;
16658
15254
  }
16659
- function getNorthingFromChar(n, set4) {
15255
+ function getNorthingFromChar(n, set2) {
16660
15256
  if (n > "V") {
16661
15257
  throw "MGRSPoint given invalid Northing " + n;
16662
15258
  }
16663
- var curRow = SET_ORIGIN_ROW_LETTERS.charCodeAt(set4 - 1);
15259
+ var curRow = SET_ORIGIN_ROW_LETTERS.charCodeAt(set2 - 1);
16664
15260
  var northingValue = 0;
16665
15261
  var rewindMarker = false;
16666
15262
  while (curRow !== n.charCodeAt(0)) {
@@ -16896,7 +15492,7 @@ var __exports__ = (() => {
16896
15492
  p.y = y;
16897
15493
  return p;
16898
15494
  }
16899
- function inverse4(p) {
15495
+ function inverse3(p) {
16900
15496
  var con, phi;
16901
15497
  var lat, lon;
16902
15498
  var x = (p.x - this.x0) * (1 / this.a);
@@ -16946,7 +15542,7 @@ var __exports__ = (() => {
16946
15542
  var tmerc_default = {
16947
15543
  init: init3,
16948
15544
  forward: forward3,
16949
- inverse: inverse4,
15545
+ inverse: inverse3,
16950
15546
  names: names4
16951
15547
  };
16952
15548
 
@@ -17059,6 +15655,7 @@ var __exports__ = (() => {
17059
15655
  this.y0 = this.y0 !== void 0 ? this.y0 : 0;
17060
15656
  this.long0 = this.long0 !== void 0 ? this.long0 : 0;
17061
15657
  this.lat0 = this.lat0 !== void 0 ? this.lat0 : 0;
15658
+ this.k0 = this.k0 !== void 0 ? this.k0 : 1;
17062
15659
  this.cgb = [];
17063
15660
  this.cbg = [];
17064
15661
  this.utg = [];
@@ -17131,7 +15728,7 @@ var __exports__ = (() => {
17131
15728
  p.y = y;
17132
15729
  return p;
17133
15730
  }
17134
- function inverse5(p) {
15731
+ function inverse4(p) {
17135
15732
  var Ce = (p.x - this.x0) * (1 / this.a);
17136
15733
  var Cn = (p.y - this.y0) * (1 / this.a);
17137
15734
  Cn = (Cn - this.Zb) / this.Qn;
@@ -17163,7 +15760,7 @@ var __exports__ = (() => {
17163
15760
  var etmerc_default = {
17164
15761
  init: init4,
17165
15762
  forward: forward4,
17166
- inverse: inverse5,
15763
+ inverse: inverse4,
17167
15764
  names: names5
17168
15765
  };
17169
15766
 
@@ -17227,7 +15824,7 @@ var __exports__ = (() => {
17227
15824
  p.x = this.C * lon;
17228
15825
  return p;
17229
15826
  }
17230
- function inverse6(p) {
15827
+ function inverse5(p) {
17231
15828
  var DEL_TOL = 1e-14;
17232
15829
  var lon = p.x / this.C;
17233
15830
  var lat = p.y;
@@ -17250,7 +15847,7 @@ var __exports__ = (() => {
17250
15847
  var gauss_default = {
17251
15848
  init: init6,
17252
15849
  forward: forward5,
17253
- inverse: inverse6,
15850
+ inverse: inverse5,
17254
15851
  names: names7
17255
15852
  };
17256
15853
 
@@ -17281,7 +15878,7 @@ var __exports__ = (() => {
17281
15878
  p.y = this.a * p.y + this.y0;
17282
15879
  return p;
17283
15880
  }
17284
- function inverse7(p) {
15881
+ function inverse6(p) {
17285
15882
  var sinc, cosc, lon, lat, rho;
17286
15883
  p.x = (p.x - this.x0) / this.a;
17287
15884
  p.y = (p.y - this.y0) / this.a;
@@ -17307,7 +15904,7 @@ var __exports__ = (() => {
17307
15904
  var sterea_default = {
17308
15905
  init: init7,
17309
15906
  forward: forward6,
17310
- inverse: inverse7,
15907
+ inverse: inverse6,
17311
15908
  names: names8
17312
15909
  };
17313
15910
 
@@ -17324,7 +15921,7 @@ var __exports__ = (() => {
17324
15921
  this.coslat0 = Math.cos(this.lat0);
17325
15922
  this.sinlat0 = Math.sin(this.lat0);
17326
15923
  if (this.sphere) {
17327
- if (this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= EPSLN) {
15924
+ if (!isNaN(this.lat_ts) && Math.abs(this.coslat0) <= EPSLN) {
17328
15925
  this.k0 = 0.5 * (1 + sign_default(this.lat0) * Math.sin(this.lat_ts));
17329
15926
  }
17330
15927
  } else {
@@ -17336,7 +15933,7 @@ var __exports__ = (() => {
17336
15933
  }
17337
15934
  }
17338
15935
  this.cons = Math.sqrt(Math.pow(1 + this.e, 1 + this.e) * Math.pow(1 - this.e, 1 - this.e));
17339
- if (this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= EPSLN && Math.abs(Math.cos(this.lat_ts)) > EPSLN) {
15936
+ if (!isNaN(this.lat_ts) && Math.abs(this.coslat0) <= EPSLN && Math.abs(Math.cos(this.lat_ts)) > EPSLN) {
17340
15937
  this.k0 = 0.5 * this.cons * msfnz_default(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) / tsfnz_default(this.e, this.con * this.lat_ts, this.con * Math.sin(this.lat_ts));
17341
15938
  }
17342
15939
  this.ms1 = msfnz_default(this.e, this.sinlat0, this.coslat0);
@@ -17383,7 +15980,7 @@ var __exports__ = (() => {
17383
15980
  }
17384
15981
  return p;
17385
15982
  }
17386
- function inverse8(p) {
15983
+ function inverse7(p) {
17387
15984
  p.x -= this.x0;
17388
15985
  p.y -= this.y0;
17389
15986
  var lon, lat, ts, ce, Chi;
@@ -17444,13 +16041,16 @@ var __exports__ = (() => {
17444
16041
  var stere_default = {
17445
16042
  init: init8,
17446
16043
  forward: forward7,
17447
- inverse: inverse8,
16044
+ inverse: inverse7,
17448
16045
  names: names9,
17449
16046
  ssfn_
17450
16047
  };
17451
16048
 
17452
16049
  // ../../node_modules/proj4/lib/projections/somerc.js
17453
16050
  function init9() {
16051
+ if (!this.k0) {
16052
+ this.k0 = 1;
16053
+ }
17454
16054
  var phy0 = this.lat0;
17455
16055
  this.lambda0 = this.long0;
17456
16056
  var sinPhy0 = Math.sin(phy0);
@@ -17479,7 +16079,7 @@ var __exports__ = (() => {
17479
16079
  p.x = this.R * rotI + this.x0;
17480
16080
  return p;
17481
16081
  }
17482
- function inverse9(p) {
16082
+ function inverse8(p) {
17483
16083
  var Y = p.x - this.x0;
17484
16084
  var X = p.y - this.y0;
17485
16085
  var rotI = Y / this.R;
@@ -17507,7 +16107,7 @@ var __exports__ = (() => {
17507
16107
  var somerc_default = {
17508
16108
  init: init9,
17509
16109
  forward: forward8,
17510
- inverse: inverse9,
16110
+ inverse: inverse8,
17511
16111
  names: names10
17512
16112
  };
17513
16113
 
@@ -17520,6 +16120,9 @@ var __exports__ = (() => {
17520
16120
  }
17521
16121
  function init10() {
17522
16122
  var con, com, cosph0, D, F, H, L, sinph0, p, J, gamma = 0, gamma0, lamc = 0, lam1 = 0, lam2 = 0, phi1 = 0, phi2 = 0, alpha_c = 0;
16123
+ if (!this.k0) {
16124
+ this.k0 = 1;
16125
+ }
17523
16126
  this.no_off = isTypeA(this);
17524
16127
  this.no_rot = "no_rot" in this;
17525
16128
  var alp = false;
@@ -17661,7 +16264,7 @@ var __exports__ = (() => {
17661
16264
  coords.y = this.a * coords.y + this.y0;
17662
16265
  return coords;
17663
16266
  }
17664
- function inverse10(p) {
16267
+ function inverse9(p) {
17665
16268
  var u, v, Qp, Sp, Tp, Vp, Up;
17666
16269
  var coords = {};
17667
16270
  p.x = (p.x - this.x0) * (1 / this.a);
@@ -17696,7 +16299,7 @@ var __exports__ = (() => {
17696
16299
  var omerc_default = {
17697
16300
  init: init10,
17698
16301
  forward: forward9,
17699
- inverse: inverse10,
16302
+ inverse: inverse9,
17700
16303
  names: names11
17701
16304
  };
17702
16305
 
@@ -17710,6 +16313,7 @@ var __exports__ = (() => {
17710
16313
  }
17711
16314
  this.x0 = this.x0 || 0;
17712
16315
  this.y0 = this.y0 || 0;
16316
+ this.long0 = this.long0 || 0;
17713
16317
  if (Math.abs(this.lat1 + this.lat2) < EPSLN) {
17714
16318
  return;
17715
16319
  }
@@ -17723,7 +16327,7 @@ var __exports__ = (() => {
17723
16327
  var cos2 = Math.cos(this.lat2);
17724
16328
  var ms2 = msfnz_default(this.e, sin2, cos2);
17725
16329
  var ts2 = tsfnz_default(this.e, this.lat2, sin2);
17726
- var ts0 = Math.abs(Math.abs(this.lat0) - HALF_PI) < EPSLN ? 0 : tsfnz_default(this.e, this.lat0, Math.sin(this.lat0));
16330
+ var ts0 = tsfnz_default(this.e, this.lat0, Math.sin(this.lat0));
17727
16331
  if (Math.abs(this.lat1 - this.lat2) > EPSLN) {
17728
16332
  this.ns = Math.log(ms1 / ms2) / Math.log(ts1 / ts2);
17729
16333
  } else {
@@ -17733,7 +16337,7 @@ var __exports__ = (() => {
17733
16337
  this.ns = sin1;
17734
16338
  }
17735
16339
  this.f0 = ms1 / (this.ns * Math.pow(ts1, this.ns));
17736
- this.rh = this.a * this.f0 * Math.pow(ts0, this.ns);
16340
+ this.rh = Math.abs(Math.abs(this.lat0) - HALF_PI) < EPSLN ? 0 : this.a * this.f0 * Math.pow(ts0, this.ns);
17737
16341
  if (!this.title) {
17738
16342
  this.title = "Lambert Conformal Conic";
17739
16343
  }
@@ -17761,7 +16365,7 @@ var __exports__ = (() => {
17761
16365
  p.y = this.k0 * (this.rh - rh1 * Math.cos(theta)) + this.y0;
17762
16366
  return p;
17763
16367
  }
17764
- function inverse11(p) {
16368
+ function inverse10(p) {
17765
16369
  var rh1, con, ts;
17766
16370
  var lat, lon;
17767
16371
  var x = (p.x - this.x0) / this.k0;
@@ -17804,7 +16408,7 @@ var __exports__ = (() => {
17804
16408
  var lcc_default = {
17805
16409
  init: init11,
17806
16410
  forward: forward10,
17807
- inverse: inverse11,
16411
+ inverse: inverse10,
17808
16412
  names: names12
17809
16413
  };
17810
16414
 
@@ -17859,7 +16463,7 @@ var __exports__ = (() => {
17859
16463
  }
17860
16464
  return p;
17861
16465
  }
17862
- function inverse12(p) {
16466
+ function inverse11(p) {
17863
16467
  var u, deltav, s, d, eps, ro, fi1;
17864
16468
  var ok;
17865
16469
  var tmp = p.x;
@@ -17896,7 +16500,7 @@ var __exports__ = (() => {
17896
16500
  var krovak_default = {
17897
16501
  init: init12,
17898
16502
  forward: forward11,
17899
- inverse: inverse12,
16503
+ inverse: inverse11,
17900
16504
  names: names13
17901
16505
  };
17902
16506
 
@@ -17985,7 +16589,7 @@ var __exports__ = (() => {
17985
16589
  p.y = y + this.y0;
17986
16590
  return p;
17987
16591
  }
17988
- function inverse13(p) {
16592
+ function inverse12(p) {
17989
16593
  p.x -= this.x0;
17990
16594
  p.y -= this.y0;
17991
16595
  var x = p.x / this.a;
@@ -18022,7 +16626,7 @@ var __exports__ = (() => {
18022
16626
  var cass_default = {
18023
16627
  init: init13,
18024
16628
  forward: forward12,
18025
- inverse: inverse13,
16629
+ inverse: inverse12,
18026
16630
  names: names14
18027
16631
  };
18028
16632
 
@@ -18199,7 +16803,7 @@ var __exports__ = (() => {
18199
16803
  p.y = this.a * y + this.y0;
18200
16804
  return p;
18201
16805
  }
18202
- function inverse14(p) {
16806
+ function inverse13(p) {
18203
16807
  p.x -= this.x0;
18204
16808
  p.y -= this.y0;
18205
16809
  var x = p.x / this.a;
@@ -18286,7 +16890,7 @@ var __exports__ = (() => {
18286
16890
  var laea_default = {
18287
16891
  init: init14,
18288
16892
  forward: forward13,
18289
- inverse: inverse14,
16893
+ inverse: inverse13,
18290
16894
  names: names15,
18291
16895
  S_POLE,
18292
16896
  N_POLE,
@@ -18347,7 +16951,7 @@ var __exports__ = (() => {
18347
16951
  p.y = y;
18348
16952
  return p;
18349
16953
  }
18350
- function inverse15(p) {
16954
+ function inverse14(p) {
18351
16955
  var rh1, qs, con, theta, lon, lat;
18352
16956
  p.x -= this.x0;
18353
16957
  p.y = this.rh - p.y + this.y0;
@@ -18398,7 +17002,7 @@ var __exports__ = (() => {
18398
17002
  var aea_default = {
18399
17003
  init: init15,
18400
17004
  forward: forward14,
18401
- inverse: inverse15,
17005
+ inverse: inverse14,
18402
17006
  names: names16,
18403
17007
  phi1z
18404
17008
  };
@@ -18436,7 +17040,7 @@ var __exports__ = (() => {
18436
17040
  p.y = y;
18437
17041
  return p;
18438
17042
  }
18439
- function inverse16(p) {
17043
+ function inverse15(p) {
18440
17044
  var rh;
18441
17045
  var sinc, cosc;
18442
17046
  var c;
@@ -18464,7 +17068,7 @@ var __exports__ = (() => {
18464
17068
  var gnom_default = {
18465
17069
  init: init16,
18466
17070
  forward: forward15,
18467
- inverse: inverse16,
17071
+ inverse: inverse15,
18468
17072
  names: names17
18469
17073
  };
18470
17074
 
@@ -18519,7 +17123,7 @@ var __exports__ = (() => {
18519
17123
  p.y = y;
18520
17124
  return p;
18521
17125
  }
18522
- function inverse17(p) {
17126
+ function inverse16(p) {
18523
17127
  p.x -= this.x0;
18524
17128
  p.y -= this.y0;
18525
17129
  var lon, lat;
@@ -18538,7 +17142,7 @@ var __exports__ = (() => {
18538
17142
  var cea_default = {
18539
17143
  init: init17,
18540
17144
  forward: forward16,
18541
- inverse: inverse17,
17145
+ inverse: inverse16,
18542
17146
  names: names18
18543
17147
  };
18544
17148
 
@@ -18561,7 +17165,7 @@ var __exports__ = (() => {
18561
17165
  p.y = this.y0 + this.a * dlat;
18562
17166
  return p;
18563
17167
  }
18564
- function inverse18(p) {
17168
+ function inverse17(p) {
18565
17169
  var x = p.x;
18566
17170
  var y = p.y;
18567
17171
  p.x = adjust_lon_default(this.long0 + (x - this.x0) / (this.a * this.rc), this.over);
@@ -18572,7 +17176,7 @@ var __exports__ = (() => {
18572
17176
  var eqc_default = {
18573
17177
  init: init18,
18574
17178
  forward: forward17,
18575
- inverse: inverse18,
17179
+ inverse: inverse17,
18576
17180
  names: names19
18577
17181
  };
18578
17182
 
@@ -18616,7 +17220,7 @@ var __exports__ = (() => {
18616
17220
  p.y = y + this.y0;
18617
17221
  return p;
18618
17222
  }
18619
- function inverse19(p) {
17223
+ function inverse18(p) {
18620
17224
  var lon, lat, x, y, i;
18621
17225
  var al, bl;
18622
17226
  var phi, dphi;
@@ -18677,11 +17281,12 @@ var __exports__ = (() => {
18677
17281
  var poly_default = {
18678
17282
  init: init19,
18679
17283
  forward: forward18,
18680
- inverse: inverse19,
17284
+ inverse: inverse18,
18681
17285
  names: names20
18682
17286
  };
18683
17287
 
18684
17288
  // ../../node_modules/proj4/lib/projections/nzmg.js
17289
+ var iterations = 1;
18685
17290
  function init20() {
18686
17291
  this.A = [];
18687
17292
  this.A[1] = 0.6399175073;
@@ -18767,7 +17372,7 @@ var __exports__ = (() => {
18767
17372
  p.y = z_re * this.a + this.y0;
18768
17373
  return p;
18769
17374
  }
18770
- function inverse20(p) {
17375
+ function inverse19(p) {
18771
17376
  var n;
18772
17377
  var x = p.x;
18773
17378
  var y = p.y;
@@ -18838,8 +17443,9 @@ var __exports__ = (() => {
18838
17443
  var nzmg_default = {
18839
17444
  init: init20,
18840
17445
  forward: forward19,
18841
- inverse: inverse20,
18842
- names: names21
17446
+ inverse: inverse19,
17447
+ names: names21,
17448
+ iterations
18843
17449
  };
18844
17450
 
18845
17451
  // ../../node_modules/proj4/lib/projections/mill.js
@@ -18855,7 +17461,7 @@ var __exports__ = (() => {
18855
17461
  p.y = y;
18856
17462
  return p;
18857
17463
  }
18858
- function inverse21(p) {
17464
+ function inverse20(p) {
18859
17465
  p.x -= this.x0;
18860
17466
  p.y -= this.y0;
18861
17467
  var lon = adjust_lon_default(this.long0 + p.x / this.a, this.over);
@@ -18868,7 +17474,7 @@ var __exports__ = (() => {
18868
17474
  var mill_default = {
18869
17475
  init: init21,
18870
17476
  forward: forward20,
18871
- inverse: inverse21,
17477
+ inverse: inverse20,
18872
17478
  names: names22
18873
17479
  };
18874
17480
 
@@ -18916,7 +17522,7 @@ var __exports__ = (() => {
18916
17522
  p.y = y;
18917
17523
  return p;
18918
17524
  }
18919
- function inverse22(p) {
17525
+ function inverse21(p) {
18920
17526
  var lat, temp, lon, s;
18921
17527
  p.x -= this.x0;
18922
17528
  lon = p.x / this.a;
@@ -18951,7 +17557,7 @@ var __exports__ = (() => {
18951
17557
  var sinu_default = {
18952
17558
  init: init22,
18953
17559
  forward: forward21,
18954
- inverse: inverse22,
17560
+ inverse: inverse21,
18955
17561
  names: names23
18956
17562
  };
18957
17563
 
@@ -18966,12 +17572,12 @@ var __exports__ = (() => {
18966
17572
  this.C_x = this.C_y / (this.m + 1);
18967
17573
  }
18968
17574
  var forward22 = forward21;
18969
- var inverse23 = inverse22;
17575
+ var inverse22 = inverse21;
18970
17576
  var names24 = ["Eckert_VI", "eck6"];
18971
17577
  var eck6_default = {
18972
17578
  init: init23,
18973
17579
  forward: forward22,
18974
- inverse: inverse23,
17580
+ inverse: inverse22,
18975
17581
  names: names24
18976
17582
  };
18977
17583
 
@@ -19004,7 +17610,7 @@ var __exports__ = (() => {
19004
17610
  p.y = y;
19005
17611
  return p;
19006
17612
  }
19007
- function inverse24(p) {
17613
+ function inverse23(p) {
19008
17614
  var theta;
19009
17615
  var arg;
19010
17616
  p.x -= this.x0;
@@ -19034,7 +17640,7 @@ var __exports__ = (() => {
19034
17640
  var moll_default = {
19035
17641
  init: init24,
19036
17642
  forward: forward23,
19037
- inverse: inverse24,
17643
+ inverse: inverse23,
19038
17644
  names: names25
19039
17645
  };
19040
17646
 
@@ -19085,7 +17691,7 @@ var __exports__ = (() => {
19085
17691
  p.y = y;
19086
17692
  return p;
19087
17693
  }
19088
- function inverse25(p) {
17694
+ function inverse24(p) {
19089
17695
  p.x -= this.x0;
19090
17696
  p.y = this.rh - p.y + this.y0;
19091
17697
  var con, rh1, lat, lon;
@@ -19119,7 +17725,7 @@ var __exports__ = (() => {
19119
17725
  var eqdc_default = {
19120
17726
  init: init25,
19121
17727
  forward: forward24,
19122
- inverse: inverse25,
17728
+ inverse: inverse24,
19123
17729
  names: names26
19124
17730
  };
19125
17731
 
@@ -19135,6 +17741,9 @@ var __exports__ = (() => {
19135
17741
  if (Math.abs(lat) <= EPSLN) {
19136
17742
  x = this.x0 + this.R * dlon;
19137
17743
  y = this.y0;
17744
+ p.x = x;
17745
+ p.y = y;
17746
+ return p;
19138
17747
  }
19139
17748
  var theta = asinz_default(2 * Math.abs(lat / Math.PI));
19140
17749
  if (Math.abs(dlon) <= EPSLN || Math.abs(Math.abs(lat) - HALF_PI) <= EPSLN) {
@@ -19144,6 +17753,9 @@ var __exports__ = (() => {
19144
17753
  } else {
19145
17754
  y = this.y0 + Math.PI * this.R * -Math.tan(0.5 * theta);
19146
17755
  }
17756
+ p.x = x;
17757
+ p.y = y;
17758
+ return p;
19147
17759
  }
19148
17760
  var al = 0.5 * Math.abs(Math.PI / dlon - dlon / Math.PI);
19149
17761
  var asq = al * al;
@@ -19169,7 +17781,7 @@ var __exports__ = (() => {
19169
17781
  p.y = y;
19170
17782
  return p;
19171
17783
  }
19172
- function inverse26(p) {
17784
+ function inverse25(p) {
19173
17785
  var lon, lat;
19174
17786
  var xx, yy, xys, c1, c2, c3;
19175
17787
  var a1;
@@ -19216,7 +17828,7 @@ var __exports__ = (() => {
19216
17828
  var vandg_default = {
19217
17829
  init: init26,
19218
17830
  forward: forward25,
19219
- inverse: inverse26,
17831
+ inverse: inverse25,
19220
17832
  names: names27
19221
17833
  };
19222
17834
 
@@ -19301,6 +17913,9 @@ var __exports__ = (() => {
19301
17913
  function init27() {
19302
17914
  this.sin_p12 = Math.sin(this.lat0);
19303
17915
  this.cos_p12 = Math.cos(this.lat0);
17916
+ this.x0 = this.x0 || 0;
17917
+ this.y0 = this.y0 || 0;
17918
+ this.long0 = this.long0 || 0;
19304
17919
  this.f = this.es / (1 + Math.sqrt(1 - this.es));
19305
17920
  }
19306
17921
  function forward26(p) {
@@ -19346,18 +17961,19 @@ var __exports__ = (() => {
19346
17961
  return p;
19347
17962
  } else {
19348
17963
  if (Math.abs(lon) < EPSLN && Math.abs(lat - this.lat0) < EPSLN) {
19349
- p.x = p.y = 0;
17964
+ p.x = this.x0;
17965
+ p.y = this.y0;
19350
17966
  return p;
19351
17967
  }
19352
17968
  vars = vincentyInverse(this.lat0, this.long0, lat, lon, this.a, this.f);
19353
17969
  azi1 = vars.azi1;
19354
- p.x = vars.s12 * Math.sin(azi1);
19355
- p.y = vars.s12 * Math.cos(azi1);
17970
+ p.x = this.x0 + vars.s12 * Math.sin(azi1);
17971
+ p.y = this.y0 + vars.s12 * Math.cos(azi1);
19356
17972
  return p;
19357
17973
  }
19358
17974
  }
19359
17975
  }
19360
- function inverse27(p) {
17976
+ function inverse26(p) {
19361
17977
  p.x -= this.x0;
19362
17978
  p.y -= this.y0;
19363
17979
  var rh, z, sinz, cosz, lon, lat, con, e0, e1, e2, e3, Mlp, M2, azi1, s12, vars;
@@ -19425,7 +18041,7 @@ var __exports__ = (() => {
19425
18041
  var aeqd_default = {
19426
18042
  init: init27,
19427
18043
  forward: forward26,
19428
- inverse: inverse27,
18044
+ inverse: inverse26,
19429
18045
  names: names28
19430
18046
  };
19431
18047
 
@@ -19456,7 +18072,7 @@ var __exports__ = (() => {
19456
18072
  p.y = y;
19457
18073
  return p;
19458
18074
  }
19459
- function inverse28(p) {
18075
+ function inverse27(p) {
19460
18076
  var rh;
19461
18077
  var z;
19462
18078
  var sinz, cosz;
@@ -19499,7 +18115,7 @@ var __exports__ = (() => {
19499
18115
  var ortho_default = {
19500
18116
  init: init28,
19501
18117
  forward: forward27,
19502
- inverse: inverse28,
18118
+ inverse: inverse27,
19503
18119
  names: names29
19504
18120
  };
19505
18121
 
@@ -19636,7 +18252,7 @@ var __exports__ = (() => {
19636
18252
  p.y = xy.y;
19637
18253
  return p;
19638
18254
  }
19639
- function inverse29(p) {
18255
+ function inverse28(p) {
19640
18256
  var lp = { lam: 0, phi: 0 };
19641
18257
  var mu, nu, cosmu, tannu;
19642
18258
  var tantheta, theta, cosphi, phi;
@@ -19793,7 +18409,7 @@ var __exports__ = (() => {
19793
18409
  var qsc_default = {
19794
18410
  init: init29,
19795
18411
  forward: forward28,
19796
- inverse: inverse29,
18412
+ inverse: inverse28,
19797
18413
  names: names30
19798
18414
  };
19799
18415
 
@@ -19890,7 +18506,7 @@ var __exports__ = (() => {
19890
18506
  xy.y = xy.y * this.a * FYC + this.y0;
19891
18507
  return xy;
19892
18508
  }
19893
- function inverse30(xy) {
18509
+ function inverse29(xy) {
19894
18510
  var ll = {
19895
18511
  x: (xy.x - this.x0) / (this.a * FXC),
19896
18512
  y: Math.abs(xy.y - this.y0) / (this.a * FYC)
@@ -19932,7 +18548,7 @@ var __exports__ = (() => {
19932
18548
  var robin_default = {
19933
18549
  init: init30,
19934
18550
  forward: forward29,
19935
- inverse: inverse30,
18551
+ inverse: inverse29,
19936
18552
  names: names31
19937
18553
  };
19938
18554
 
@@ -19944,7 +18560,7 @@ var __exports__ = (() => {
19944
18560
  var point = geodeticToGeocentric(p, this.es, this.a);
19945
18561
  return point;
19946
18562
  }
19947
- function inverse31(p) {
18563
+ function inverse30(p) {
19948
18564
  var point = geocentricToGeodetic(p, this.es, this.a, this.b);
19949
18565
  return point;
19950
18566
  }
@@ -19952,7 +18568,7 @@ var __exports__ = (() => {
19952
18568
  var geocent_default = {
19953
18569
  init: init31,
19954
18570
  forward: forward30,
19955
- inverse: inverse31,
18571
+ inverse: inverse30,
19956
18572
  names: names32
19957
18573
  };
19958
18574
 
@@ -20058,7 +18674,7 @@ var __exports__ = (() => {
20058
18674
  p.y = y * this.a;
20059
18675
  return p;
20060
18676
  }
20061
- function inverse32(p) {
18677
+ function inverse31(p) {
20062
18678
  p.x /= this.a;
20063
18679
  p.y /= this.a;
20064
18680
  var r = { x: p.x, y: p.y };
@@ -20106,7 +18722,7 @@ var __exports__ = (() => {
20106
18722
  var tpers_default = {
20107
18723
  init: init32,
20108
18724
  forward: forward31,
20109
- inverse: inverse32,
18725
+ inverse: inverse31,
20110
18726
  names: names33
20111
18727
  };
20112
18728
 
@@ -20179,7 +18795,7 @@ var __exports__ = (() => {
20179
18795
  p.y = p.y * this.a;
20180
18796
  return p;
20181
18797
  }
20182
- function inverse33(p) {
18798
+ function inverse32(p) {
20183
18799
  var v_x = -1;
20184
18800
  var v_y = 0;
20185
18801
  var v_z = 0;
@@ -20240,7 +18856,7 @@ var __exports__ = (() => {
20240
18856
  var geos_default = {
20241
18857
  init: init33,
20242
18858
  forward: forward32,
20243
- inverse: inverse33,
18859
+ inverse: inverse32,
20244
18860
  names: names34
20245
18861
  };
20246
18862
 
@@ -20278,7 +18894,7 @@ var __exports__ = (() => {
20278
18894
  p.y = this.a * p.y + this.y0;
20279
18895
  return p;
20280
18896
  }
20281
- function inverse34(p) {
18897
+ function inverse33(p) {
20282
18898
  p.x = (p.x - this.x0) / this.a;
20283
18899
  p.y = (p.y - this.y0) / this.a;
20284
18900
  if (this.es !== 0) {
@@ -20310,7 +18926,7 @@ var __exports__ = (() => {
20310
18926
  var eqearth_default = {
20311
18927
  init: init34,
20312
18928
  forward: forward33,
20313
- inverse: inverse34,
18929
+ inverse: inverse33,
20314
18930
  names: names35
20315
18931
  };
20316
18932
 
@@ -20473,15 +19089,15 @@ var __exports__ = (() => {
20473
19089
  };
20474
19090
  for (let i = 0; i < paramSetsKeys.length; i++) {
20475
19091
  const setKey = paramSetsKeys[i];
20476
- const set4 = paramSets[setKey];
20477
- const params2 = Object.entries(set4);
19092
+ const set2 = paramSets[setKey];
19093
+ const params2 = Object.entries(set2);
20478
19094
  const setHasParams = params2.some(
20479
19095
  ([p]) => typeof this[p] !== "undefined"
20480
19096
  );
20481
19097
  if (!setHasParams) {
20482
19098
  continue;
20483
19099
  }
20484
- matchedSet = set4;
19100
+ matchedSet = set2;
20485
19101
  for (let ii = 0; ii < params2.length; ii++) {
20486
19102
  const [inputParam, param] = params2[ii];
20487
19103
  const val = parseParam(inputParam);
@@ -20508,7 +19124,7 @@ var __exports__ = (() => {
20508
19124
  function forward34(p) {
20509
19125
  return this.projectionType.forward(this, p);
20510
19126
  }
20511
- function inverse35(p) {
19127
+ function inverse34(p) {
20512
19128
  return this.projectionType.inverse(this, p);
20513
19129
  }
20514
19130
  function createRotation(params2, how) {
@@ -20640,7 +19256,7 @@ var __exports__ = (() => {
20640
19256
  var ob_tran_default = {
20641
19257
  init: init36,
20642
19258
  forward: forward34,
20643
- inverse: inverse35,
19259
+ inverse: inverse34,
20644
19260
  names: names37
20645
19261
  };
20646
19262
 
@@ -23210,11 +21826,11 @@ var __exports__ = (() => {
23210
21826
  getParentIndex(index) {
23211
21827
  return { x: Math.floor(index.x / 2), y: Math.floor(index.y / 2), z: index.z - 1 };
23212
21828
  }
23213
- getTile(index, create7) {
21829
+ getTile(index, create2) {
23214
21830
  const id = this.getTileId(index);
23215
21831
  let tile = this._cache.get(id);
23216
21832
  let needsReload = false;
23217
- if (!tile && create7) {
21833
+ if (!tile && create2) {
23218
21834
  tile = new SharedTile2DHeader(index);
23219
21835
  Object.assign(tile, this.getTileMetadata(tile.index));
23220
21836
  Object.assign(tile, { id, zoom: this.getTileZoom(tile.index) });
@@ -23228,7 +21844,7 @@ var __exports__ = (() => {
23228
21844
  if (tile) {
23229
21845
  this._touchTile(id, tile);
23230
21846
  }
23231
- if (tile && needsReload && create7) {
21847
+ if (tile && needsReload && create2) {
23232
21848
  tile.loadData({
23233
21849
  getData: this.opts.getTileData,
23234
21850
  requestScheduler: this._requestScheduler,