@nika-js/onlymap 0.5.6 → 0.5.8

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.
@@ -1,21 +1,21 @@
1
- import Ae from "./index-CW1n5LdO.js";
2
- import { am as Mt, an as Rt, ao as tt, ap as nt, aq as zt, b as Ft, ar as Dt, l as Ee, as as Nt, d as Ut, at as Bt, au as Gt, av as Kt, aw as rt } from "./index-G3hmIs2P.js";
3
- import { w as _t } from "./mgrs-BY9bIvp4.js";
4
- function Xt(e, t, n) {
5
- const { projectedCorners: r } = t, { topLeft: o, topRight: i, bottomRight: s, bottomLeft: a } = r, l = n(o[0], o[1]), c = n(i[0], i[1]), u = n(s[0], s[1]), h = n(a[0], a[1]), p = [
1
+ import Re from "./index-CW1n5LdO.js";
2
+ import { am as Dt, an as zt, ao as ot, ap as it, aq as Ut, b as Nt, ar as Bt, l as Me, as as Kt, d as Wt, at as _t, au as kt, av as Xt, aw as st } from "./index-C4E9YVtT.js";
3
+ import { w as Ht } from "./mgrs-BY9bIvp4.js";
4
+ function Vt(e, t, n) {
5
+ const { projectedCorners: r } = t, { topLeft: o, topRight: i, bottomRight: s, bottomLeft: a } = r, l = n(o[0], o[1]), c = n(i[0], i[1]), u = n(s[0], s[1]), d = n(a[0], a[1]), p = [
6
6
  l,
7
7
  c,
8
8
  u,
9
- h,
9
+ d,
10
10
  l
11
- ], d = [
11
+ ], h = [
12
12
  (l[0] + u[0]) / 2,
13
13
  (l[1] + u[1]) / 2
14
- ], g = new Mt({
14
+ ], g = new Dt({
15
15
  id: `${e}-label`,
16
16
  data: [
17
17
  {
18
- position: d,
18
+ position: h,
19
19
  text: `x=${t.index.x} y=${t.index.y} z=${t.index.z}`
20
20
  }
21
21
  ],
@@ -26,7 +26,7 @@ function Xt(e, t, n) {
26
26
  outlineColor: [0, 0, 0, 255],
27
27
  fontSettings: { sdf: !0 }
28
28
  });
29
- return [new Rt({
29
+ return [new zt({
30
30
  id: e,
31
31
  data: [p],
32
32
  getPath: (y) => y,
@@ -37,7 +37,7 @@ function Xt(e, t, n) {
37
37
  pickable: !1
38
38
  }), g];
39
39
  }
40
- const Wt = [
40
+ const Jt = [
41
41
  [1 / 3, 1 / 3, 1 / 3],
42
42
  // centroid
43
43
  [0.5, 0.5, 0],
@@ -46,8 +46,8 @@ const Wt = [
46
46
  // edge 0–2
47
47
  [0, 0.5, 0.5]
48
48
  // edge 1–2
49
- ], Ht = 0.125;
50
- class kt {
49
+ ], Yt = 0.125;
50
+ class Zt {
51
51
  reprojectors;
52
52
  /** Width of the image in pixels */
53
53
  width;
@@ -95,7 +95,7 @@ class kt {
95
95
  *
96
96
  * @return {[type]} [return description]
97
97
  */
98
- run(t = Ht, { maxIterations: n = 1e4 } = {}) {
98
+ run(t = Yt, { maxIterations: n = 1e4 } = {}) {
99
99
  if (t <= 0)
100
100
  throw new Error("maxError must be positive");
101
101
  let r = 0;
@@ -129,26 +129,26 @@ class kt {
129
129
  * @return Doesn't return; instead modifies internal state.
130
130
  */
131
131
  _findReprojectionCandidate(t) {
132
- const n = 2 * this.triangles[t * 3 + 0], r = 2 * this.triangles[t * 3 + 1], o = 2 * this.triangles[t * 3 + 2], i = this.uvs[n], s = this.uvs[n + 1], a = this.uvs[r], l = this.uvs[r + 1], c = this.uvs[o], u = this.uvs[o + 1], h = this.exactOutputPositions[n], p = this.exactOutputPositions[n + 1], d = this.exactOutputPositions[r], g = this.exactOutputPositions[r + 1], f = this.exactOutputPositions[o], y = this.exactOutputPositions[o + 1];
133
- let j = 0, b = 0, S = 0;
134
- for (const v of Wt) {
135
- const L = re(i, a, c, v[0], v[1], v[2]), E = re(s, l, u, v[0], v[1], v[2]), M = re(h, d, f, v[0], v[1], v[2]), z = re(p, g, y, v[0], v[1], v[2]), I = L * (this.width - 1), J = E * (this.height - 1), q = this.reprojectors.inverseReproject(M, z), te = this.reprojectors.inverseTransform(q[0], q[1]), ne = I - te[0], It = J - te[1], Oe = Math.hypot(ne, It);
136
- Oe > j && (j = Oe, b = L, S = E);
132
+ const n = 2 * this.triangles[t * 3 + 0], r = 2 * this.triangles[t * 3 + 1], o = 2 * this.triangles[t * 3 + 2], i = this.uvs[n], s = this.uvs[n + 1], a = this.uvs[r], l = this.uvs[r + 1], c = this.uvs[o], u = this.uvs[o + 1], d = this.exactOutputPositions[n], p = this.exactOutputPositions[n + 1], h = this.exactOutputPositions[r], g = this.exactOutputPositions[r + 1], f = this.exactOutputPositions[o], y = this.exactOutputPositions[o + 1];
133
+ let I = 0, b = 0, v = 0;
134
+ for (const S of Jt) {
135
+ const L = oe(i, a, c, S[0], S[1], S[2]), O = oe(s, l, u, S[0], S[1], S[2]), M = oe(d, h, f, S[0], S[1], S[2]), F = oe(p, g, y, S[0], S[1], S[2]), R = L * (this.width - 1), Z = O * (this.height - 1), T = this.reprojectors.inverseReproject(M, F), ne = this.reprojectors.inverseTransform(T[0], T[1]), re = R - ne[0], Gt = Z - ne[1], Oe = Math.hypot(re, Gt);
136
+ Oe > I && (I = Oe, b = L, v = O);
137
137
  }
138
- (b === i && S === s || b === a && S === l || b === c && S === u) && (j = 0), this._candidatesUV[2 * t] = b, this._candidatesUV[2 * t + 1] = S, this._queuePush(t, j);
138
+ (b === i && v === s || b === a && v === l || b === c && v === u) && (I = 0), this._candidatesUV[2 * t] = b, this._candidatesUV[2 * t + 1] = v, this._queuePush(t, I);
139
139
  }
140
140
  // process the next triangle in the queue, splitting it with a new point
141
141
  _step() {
142
- const t = this._queuePop(), n = t * 3 + 0, r = t * 3 + 1, o = t * 3 + 2, i = this.triangles[n], s = this.triangles[r], a = this.triangles[o], l = this.uvs[2 * i], c = this.uvs[2 * i + 1], u = this.uvs[2 * s], h = this.uvs[2 * s + 1], p = this.uvs[2 * a], d = this.uvs[2 * a + 1], g = this._candidatesUV[2 * t], f = this._candidatesUV[2 * t + 1], y = this._addPoint(g, f);
143
- if (ce(l, c, u, h, g, f) === 0)
142
+ const t = this._queuePop(), n = t * 3 + 0, r = t * 3 + 1, o = t * 3 + 2, i = this.triangles[n], s = this.triangles[r], a = this.triangles[o], l = this.uvs[2 * i], c = this.uvs[2 * i + 1], u = this.uvs[2 * s], d = this.uvs[2 * s + 1], p = this.uvs[2 * a], h = this.uvs[2 * a + 1], g = this._candidatesUV[2 * t], f = this._candidatesUV[2 * t + 1], y = this._addPoint(g, f);
143
+ if (ue(l, c, u, d, g, f) === 0)
144
144
  this._handleCollinear(y, n);
145
- else if (ce(u, h, p, d, g, f) === 0)
145
+ else if (ue(u, d, p, h, g, f) === 0)
146
146
  this._handleCollinear(y, r);
147
- else if (ce(p, d, l, c, g, f) === 0)
147
+ else if (ue(p, h, l, c, g, f) === 0)
148
148
  this._handleCollinear(y, o);
149
149
  else {
150
- const j = this._halfedges[n], b = this._halfedges[r], S = this._halfedges[o], v = this._addTriangle(i, s, y, j, -1, -1, n), L = this._addTriangle(s, a, y, b, -1, v + 1), E = this._addTriangle(a, i, y, S, v + 2, L + 1);
151
- this._legalize(v), this._legalize(L), this._legalize(E);
150
+ const I = this._halfedges[n], b = this._halfedges[r], v = this._halfedges[o], S = this._addTriangle(i, s, y, I, -1, -1, n), L = this._addTriangle(s, a, y, b, -1, S + 1), O = this._addTriangle(a, i, y, v, S + 2, L + 1);
151
+ this._legalize(S), this._legalize(L), this._legalize(O);
152
152
  }
153
153
  }
154
154
  // add coordinates for a new vertex
@@ -167,26 +167,26 @@ class kt {
167
167
  const n = this._halfedges[t];
168
168
  if (n < 0)
169
169
  return;
170
- const r = t - t % 3, o = n - n % 3, i = r + (t + 1) % 3, s = r + (t + 2) % 3, a = o + (n + 2) % 3, l = o + (n + 1) % 3, c = this.triangles[s], u = this.triangles[t], h = this.triangles[i], p = this.triangles[a], d = this.uvs;
171
- if (!Zt(d[2 * c], d[2 * c + 1], d[2 * u], d[2 * u + 1], d[2 * h], d[2 * h + 1], d[2 * p], d[2 * p + 1]))
170
+ const r = t - t % 3, o = n - n % 3, i = r + (t + 1) % 3, s = r + (t + 2) % 3, a = o + (n + 2) % 3, l = o + (n + 1) % 3, c = this.triangles[s], u = this.triangles[t], d = this.triangles[i], p = this.triangles[a], h = this.uvs;
171
+ if (!Tt(h[2 * c], h[2 * c + 1], h[2 * u], h[2 * u + 1], h[2 * d], h[2 * d + 1], h[2 * p], h[2 * p + 1]))
172
172
  return;
173
- const g = this._halfedges[i], f = this._halfedges[s], y = this._halfedges[a], j = this._halfedges[l];
173
+ const g = this._halfedges[i], f = this._halfedges[s], y = this._halfedges[a], I = this._halfedges[l];
174
174
  this._queueRemove(r / 3), this._queueRemove(o / 3);
175
- const b = this._addTriangle(c, p, h, -1, y, g, r), S = this._addTriangle(p, c, u, b, f, j, o);
176
- this._legalize(b + 1), this._legalize(S + 2);
175
+ const b = this._addTriangle(c, p, d, -1, y, g, r), v = this._addTriangle(p, c, u, b, f, I, o);
176
+ this._legalize(b + 1), this._legalize(v + 2);
177
177
  }
178
178
  // handle a case where new vertex is on the edge of a triangle
179
179
  _handleCollinear(t, n) {
180
- const r = n - n % 3, o = r + (n + 1) % 3, i = r + (n + 2) % 3, s = this.triangles[i], a = this.triangles[n], l = this.triangles[o], c = this._halfedges[o], u = this._halfedges[i], h = this._halfedges[n];
181
- if (h < 0) {
182
- const E = this._addTriangle(t, s, a, -1, u, -1, r), M = this._addTriangle(s, t, l, E, -1, c);
183
- this._legalize(E + 1), this._legalize(M + 2);
180
+ const r = n - n % 3, o = r + (n + 1) % 3, i = r + (n + 2) % 3, s = this.triangles[i], a = this.triangles[n], l = this.triangles[o], c = this._halfedges[o], u = this._halfedges[i], d = this._halfedges[n];
181
+ if (d < 0) {
182
+ const O = this._addTriangle(t, s, a, -1, u, -1, r), M = this._addTriangle(s, t, l, O, -1, c);
183
+ this._legalize(O + 1), this._legalize(M + 2);
184
184
  return;
185
185
  }
186
- const p = h - h % 3, d = p + (h + 2) % 3, g = p + (h + 1) % 3, f = this.triangles[d], y = this._halfedges[d], j = this._halfedges[g];
186
+ const p = d - d % 3, h = p + (d + 2) % 3, g = p + (d + 1) % 3, f = this.triangles[h], y = this._halfedges[h], I = this._halfedges[g];
187
187
  this._queueRemove(p / 3);
188
- const b = this._addTriangle(s, a, t, u, -1, -1, r), S = this._addTriangle(a, f, t, j, -1, b + 1, p), v = this._addTriangle(f, l, t, y, -1, S + 1), L = this._addTriangle(l, s, t, c, b + 2, v + 1);
189
- this._legalize(b), this._legalize(S), this._legalize(v), this._legalize(L);
188
+ const b = this._addTriangle(s, a, t, u, -1, -1, r), v = this._addTriangle(a, f, t, I, -1, b + 1, p), S = this._addTriangle(f, l, t, y, -1, v + 1), L = this._addTriangle(l, s, t, c, b + 2, S + 1);
189
+ this._legalize(b), this._legalize(v), this._legalize(S), this._legalize(L);
190
190
  }
191
191
  // priority queue methods
192
192
  _queuePush(t, n) {
@@ -247,17 +247,17 @@ class kt {
247
247
  return r > t;
248
248
  }
249
249
  }
250
- function ce(e, t, n, r, o, i) {
250
+ function ue(e, t, n, r, o, i) {
251
251
  return (n - o) * (t - i) - (r - i) * (e - o);
252
252
  }
253
- function Zt(e, t, n, r, o, i, s, a) {
254
- const l = e - s, c = t - a, u = n - s, h = r - a, p = o - s, d = i - a, g = l * l + c * c, f = u * u + h * h, y = p * p + d * d;
255
- return l * (h * y - f * d) - c * (u * y - f * p) + g * (u * d - h * p) < 0;
253
+ function Tt(e, t, n, r, o, i, s, a) {
254
+ const l = e - s, c = t - a, u = n - s, d = r - a, p = o - s, h = i - a, g = l * l + c * c, f = u * u + d * d, y = p * p + h * h;
255
+ return l * (d * y - f * h) - c * (u * y - f * p) + g * (u * h - d * p) < 0;
256
256
  }
257
- function re(e, t, n, r, o, i) {
257
+ function oe(e, t, n, r, o, i) {
258
258
  return r * e + o * t + i * n;
259
259
  }
260
- const Se = {
260
+ const Ce = {
261
261
  name: "create-texture-unorm",
262
262
  inject: {
263
263
  "fs:#decl": "uniform sampler2D textureName;",
@@ -271,7 +271,7 @@ const Se = {
271
271
  getUniforms: (e) => ({
272
272
  textureName: e.textureName
273
273
  })
274
- }, Vt = (
274
+ }, qt = (
275
275
  /* glsl */
276
276
  `#version 300 es
277
277
  #define SHADER_NAME simple-mesh-layer-fs
@@ -305,8 +305,8 @@ void main(void) {
305
305
  fragColor = vec4(lightColor, color.a * layer.opacity);
306
306
  }
307
307
  `
308
- ), Yt = {
309
- ...tt.defaultProps,
308
+ ), Qt = {
309
+ ...ot.defaultProps,
310
310
  // Note: putting `image` in defaultProps causes Maplibre to fail to render
311
311
  // labels in interleaved mode 🤷‍♂️
312
312
  // image: { type: "image", value: null, async: true },
@@ -319,12 +319,12 @@ void main(void) {
319
319
  specularColor: [0, 0, 0]
320
320
  }
321
321
  };
322
- class Jt extends tt {
322
+ class $t extends ot {
323
323
  static layerName = "mesh-texture-layer";
324
- static defaultProps = Yt;
324
+ static defaultProps = Qt;
325
325
  _resolveRenderPipeline() {
326
326
  const { image: t, renderPipeline: n } = this.props;
327
- return [...t ? [{ module: Se, props: { textureName: t } }] : [], ...n ?? []];
327
+ return [...t ? [{ module: Ce, props: { textureName: t } }] : [], ...n ?? []];
328
328
  }
329
329
  updateState(t) {
330
330
  this.hasRenderPipelineChanged(t) && (t.changeFlags.extensionsChanged = !0), super.updateState(t);
@@ -350,7 +350,7 @@ class Jt extends tt {
350
350
  ...t,
351
351
  // Override upstream's fragment shader with our copy with modified
352
352
  // injection points
353
- fs: Vt,
353
+ fs: qt,
354
354
  modules: n
355
355
  };
356
356
  }
@@ -363,7 +363,7 @@ class Jt extends tt {
363
363
  super.draw(t);
364
364
  }
365
365
  }
366
- const qt = 0.125, Ie = [
366
+ const en = 0.125, Ee = [
367
367
  [252, 73, 163],
368
368
  // pink
369
369
  [255, 51, 204],
@@ -408,7 +408,7 @@ const qt = 0.125, Ie = [
408
408
  // turquoise
409
409
  [0, 204, 255]
410
410
  // cyan
411
- ], Qt = {
411
+ ], tn = {
412
412
  // A prop with `type: "image"` gets converted to a texture automatically by
413
413
  // deck.gl (as long as async: true)
414
414
  image: { type: "image", value: null, async: !0 },
@@ -416,9 +416,9 @@ const qt = 0.125, Ie = [
416
416
  debug: !1,
417
417
  debugOpacity: 0.5
418
418
  };
419
- class Tt extends nt {
419
+ class nn extends it {
420
420
  static layerName = "RasterLayer";
421
- static defaultProps = Qt;
421
+ static defaultProps = tn;
422
422
  initializeState() {
423
423
  this.setState({});
424
424
  }
@@ -428,9 +428,9 @@ class Tt extends nt {
428
428
  (!!o.dataChanged || n.width !== r.width || n.height !== r.height || i || n.maxError !== r.maxError) && this._generateMesh();
429
429
  }
430
430
  _generateMesh() {
431
- const { width: t, height: n, reprojectionFns: r, maxError: o = qt } = this.props, i = new kt(r, t + 1, n + 1);
431
+ const { width: t, height: n, reprojectionFns: r, maxError: o = en } = this.props, i = new Zt(r, t + 1, n + 1);
432
432
  i.run(o);
433
- const { indices: s, positions: a, texCoords: l } = $t(i);
433
+ const { indices: s, positions: a, texCoords: l } = rn(i);
434
434
  this.setState({
435
435
  reprojector: i,
436
436
  mesh: {
@@ -444,7 +444,7 @@ class Tt extends nt {
444
444
  }
445
445
  renderDebugLayer() {
446
446
  const { reprojector: t } = this.state, { debugOpacity: n } = this.props;
447
- return t ? new zt(this.getSubLayerProps({
447
+ return t ? new Ut(this.getSubLayerProps({
448
448
  id: "polygon",
449
449
  // https://deck.gl/docs/developer-guide/performance#supply-binary-blobs-to-the-data-prop
450
450
  // This `data` gets passed into `getPolygon` with the row index.
@@ -459,7 +459,7 @@ class Tt extends nt {
459
459
  ];
460
460
  },
461
461
  getFillColor: (r, { index: o, target: i }) => {
462
- const s = Ie[o % Ie.length];
462
+ const s = Ee[o % Ee.length];
463
463
  return i[0] = s[0], i[1] = s[1], i[2] = s[2], i[3] = 255, i;
464
464
  },
465
465
  getLineColor: [0, 0, 0],
@@ -473,7 +473,7 @@ class Tt extends nt {
473
473
  const { mesh: t } = this.state, { debug: n, image: r, renderPipeline: o } = this.props;
474
474
  if (!t || !r && (o?.length ?? 0) === 0)
475
475
  return null;
476
- const s = [new Jt(this.getSubLayerProps({
476
+ const s = [new $t(this.getSubLayerProps({
477
477
  id: "raster",
478
478
  image: r,
479
479
  renderPipeline: o,
@@ -497,7 +497,7 @@ class Tt extends nt {
497
497
  return s;
498
498
  }
499
499
  }
500
- function $t(e) {
500
+ function rn(e) {
501
501
  const t = e.uvs.length / 2, n = new Float32Array(t * 3), r = new Float32Array(e.uvs);
502
502
  for (let i = 0; i < t; i++)
503
503
  n[i * 3] = e.exactOutputPositions[i * 2], n[i * 3 + 1] = e.exactOutputPositions[i * 2 + 1], n[i * 3 + 2] = 0;
@@ -507,7 +507,7 @@ function $t(e) {
507
507
  texCoords: r
508
508
  };
509
509
  }
510
- class en {
510
+ class on {
511
511
  levels;
512
512
  projectTo3857;
513
513
  projectFrom3857;
@@ -520,10 +520,10 @@ class en {
520
520
  this.levels = t.levels, this.projectTo3857 = t.projectTo3857, this.projectFrom3857 = t.projectFrom3857, this.projectTo4326 = t.projectTo4326, this.projectFrom4326 = t.projectFrom4326, this.projectedBounds = t.levels[0].projectedBounds;
521
521
  }
522
522
  }
523
- function Le(e, t) {
523
+ function Ie(e, t) {
524
524
  return [1, 0, e, 0, 1, t];
525
525
  }
526
- function tn(e, t = e) {
526
+ function sn(e, t = e) {
527
527
  return [e, 0, 0, 0, t, 0];
528
528
  }
529
529
  function A([e, t, n, r, o, i], s, a) {
@@ -532,37 +532,37 @@ function A([e, t, n, r, o, i], s, a) {
532
532
  r * s + o * a + i
533
533
  ];
534
534
  }
535
- function ae([e, t, n, r, o, i], [s, a, l, c, u, h]) {
535
+ function le([e, t, n, r, o, i], [s, a, l, c, u, d]) {
536
536
  return [
537
537
  e * s + t * c,
538
538
  e * a + t * u,
539
- e * l + t * h + n,
539
+ e * l + t * d + n,
540
540
  r * s + o * c,
541
541
  r * a + o * u,
542
- r * l + o * h + i
542
+ r * l + o * d + i
543
543
  ];
544
544
  }
545
- function de([e, t, n, r, o, i]) {
545
+ function pe([e, t, n, r, o, i]) {
546
546
  const s = e * o - t * r;
547
547
  if (s === 0)
548
548
  throw new Error("Cannot invert degenerate transform");
549
- const a = 1 / s, l = o * a, c = -t * a, u = -r * a, h = e * a;
549
+ const a = 1 / s, l = o * a, c = -t * a, u = -r * a, d = e * a;
550
550
  return [
551
551
  l,
552
552
  c,
553
553
  -n * l - i * c,
554
554
  u,
555
- h,
556
- -n * u - i * h
555
+ d,
556
+ -n * u - i * d
557
557
  ];
558
558
  }
559
- function nn(e) {
559
+ function an(e) {
560
560
  return e[0];
561
561
  }
562
- function rn(e) {
562
+ function ln(e) {
563
563
  return e[4];
564
564
  }
565
- class on {
565
+ class cn {
566
566
  tileWidth;
567
567
  tileHeight;
568
568
  matrixWidth;
@@ -576,8 +576,8 @@ class on {
576
576
  _affine;
577
577
  _invAffine;
578
578
  constructor(t) {
579
- this._affine = t.affine, this._invAffine = de(t.affine), this.tileWidth = t.tileWidth, this.tileHeight = t.tileHeight, this.matrixWidth = Math.ceil(t.arrayWidth / t.tileWidth), this.matrixHeight = Math.ceil(t.arrayHeight / t.tileHeight);
580
- const n = nn(t.affine), r = rn(t.affine);
579
+ this._affine = t.affine, this._invAffine = pe(t.affine), this.tileWidth = t.tileWidth, this.tileHeight = t.tileHeight, this.matrixWidth = Math.ceil(t.arrayWidth / t.tileWidth), this.matrixHeight = Math.ceil(t.arrayHeight / t.tileHeight);
580
+ const n = an(t.affine), r = ln(t.affine);
581
581
  this.metersPerPixel = Math.sqrt(Math.abs(n * r)) * t.mpu;
582
582
  const o = [
583
583
  A(t.affine, 0, 0),
@@ -602,7 +602,7 @@ class on {
602
602
  };
603
603
  }
604
604
  tileTransform(t, n) {
605
- const r = Le(t * this.tileWidth, n * this.tileHeight), o = ae(this._affine, r), i = de(o);
605
+ const r = Ie(t * this.tileWidth, n * this.tileHeight), o = le(this._affine, r), i = pe(o);
606
606
  return {
607
607
  forwardTransform: (s, a) => A(o, s, a),
608
608
  inverseTransform: (s, a) => A(i, s, a)
@@ -614,11 +614,11 @@ class on {
614
614
  A(i, r, n),
615
615
  A(i, t, o),
616
616
  A(i, r, o)
617
- ], a = s.map(([L]) => L), l = s.map(([, L]) => L), c = Math.min(...a), u = Math.max(...a), h = Math.min(...l), p = Math.max(...l), d = this.tileWidth, g = this.tileHeight, f = this.matrixWidth - 1, y = this.matrixHeight - 1, j = Math.max(0, Math.floor(c / d)), b = Math.min(f, Math.floor(u / d)), S = Math.max(0, Math.floor(h / g)), v = Math.min(y, Math.floor(p / g));
618
- return { minCol: j, maxCol: b, minRow: S, maxRow: v };
617
+ ], a = s.map(([L]) => L), l = s.map(([, L]) => L), c = Math.min(...a), u = Math.max(...a), d = Math.min(...l), p = Math.max(...l), h = this.tileWidth, g = this.tileHeight, f = this.matrixWidth - 1, y = this.matrixHeight - 1, I = Math.max(0, Math.floor(c / h)), b = Math.min(f, Math.floor(u / h)), v = Math.max(0, Math.floor(d / g)), S = Math.min(y, Math.floor(p / g));
618
+ return { minCol: I, maxCol: b, minRow: v, maxRow: S };
619
619
  }
620
620
  }
621
- function sn(e, { semiMajorAxis: t } = {}) {
621
+ function un(e, { semiMajorAxis: t } = {}) {
622
622
  switch (e = e.toLowerCase(), e) {
623
623
  case "m":
624
624
  case "metre":
@@ -637,55 +637,55 @@ function sn(e, { semiMajorAxis: t } = {}) {
637
637
  }
638
638
  throw new Error(`Unsupported CRS units: ${e} when computing metersPerUnit.`);
639
639
  }
640
- function ot(e) {
641
- const t = _t(e);
640
+ function at(e) {
641
+ const t = Ht(e);
642
642
  return t.projName === "longlat" && (!t.units || t.units === "unknown") && (t.units = "degree", t.to_meter = void 0), t;
643
643
  }
644
- const Me = /* @__PURE__ */ new Map();
645
- async function an(e) {
646
- const t = `EPSG:${e}`, n = Me.get(t);
644
+ const Fe = /* @__PURE__ */ new Map();
645
+ async function dn(e) {
646
+ const t = `EPSG:${e}`, n = Fe.get(t);
647
647
  if (n !== void 0)
648
648
  return n;
649
- const r = await ln(e), o = ot(r);
650
- return Me.set(t, o), o;
649
+ const r = await hn(e), o = at(r);
650
+ return Fe.set(t, o), o;
651
651
  }
652
- async function ln(e) {
652
+ async function hn(e) {
653
653
  const t = `https://epsg.io/${e}.json`, n = await fetch(t);
654
654
  if (!n.ok)
655
655
  throw new Error(`Failed to fetch PROJJSON from ${t}`);
656
656
  return await n.json();
657
657
  }
658
- function pe(e, t, n, r, o, i = {}) {
658
+ function me(e, t, n, r, o, i = {}) {
659
659
  const { densifyPts: s = 21 } = i, a = [t, r, r, t], l = [n, n, o, o];
660
- let c = 1 / 0, u = 1 / 0, h = -1 / 0, p = -1 / 0;
661
- for (let d = 0; d < 4; d++) {
662
- const g = a[d], f = l[d], y = a[(d + 1) % 4], j = l[(d + 1) % 4];
660
+ let c = 1 / 0, u = 1 / 0, d = -1 / 0, p = -1 / 0;
661
+ for (let h = 0; h < 4; h++) {
662
+ const g = a[h], f = l[h], y = a[(h + 1) % 4], I = l[(h + 1) % 4];
663
663
  for (let b = 0; b <= s; b++) {
664
- const S = b / (s + 1), [v, L] = e(g + (y - g) * S, f + (j - f) * S);
665
- v < c && (c = v), L < u && (u = L), v > h && (h = v), L > p && (p = L);
664
+ const v = b / (s + 1), [S, L] = e(g + (y - g) * v, f + (I - f) * v);
665
+ S < c && (c = S), L < u && (u = L), S > d && (d = S), L > p && (p = L);
666
666
  }
667
667
  }
668
- return [c, u, h, p];
668
+ return [c, u, d, p];
669
669
  }
670
- const Re = 6378137, ze = 85.05112877980659;
671
- function cn(e, t) {
672
- const n = e * Math.PI * Re / 180, r = t * Math.PI / 180, o = Math.log(Math.tan(Math.PI / 4 + r / 2)) * Re;
670
+ const Ge = 6378137, De = 85.05112877980659;
671
+ function pn(e, t) {
672
+ const n = e * Math.PI * Ge / 180, r = t * Math.PI / 180, o = Math.log(Math.tan(Math.PI / 4 + r / 2)) * Ge;
673
673
  return [n, o];
674
674
  }
675
- function un(e, t) {
675
+ function mn(e, t) {
676
676
  return (n, r) => {
677
677
  const [o, i] = e(n, r);
678
678
  if (Number.isFinite(o) && Number.isFinite(i))
679
679
  return [o, i];
680
- const [s, a] = t(n, r), l = Math.max(-ze, Math.min(ze, a));
681
- return cn(s, l);
680
+ const [s, a] = t(n, r), l = Math.max(-De, Math.min(De, a));
681
+ return pn(s, l);
682
682
  };
683
683
  }
684
- const hn = 65536;
685
- class it {
684
+ const gn = 65536;
685
+ class lt {
686
686
  entries = /* @__PURE__ */ new Map();
687
687
  maxEntries;
688
- constructor({ maxEntries: t = hn } = {}) {
688
+ constructor({ maxEntries: t = gn } = {}) {
689
689
  this.maxEntries = Math.max(0, t);
690
690
  }
691
691
  /** Number of cached entries. */
@@ -722,7 +722,7 @@ class it {
722
722
  this.entries.delete(o);
723
723
  }
724
724
  }
725
- const Fe = 512, dn = [
725
+ const ze = 512, fn = [
726
726
  [0.5, 0.5],
727
727
  // center
728
728
  [0, 0],
@@ -733,7 +733,7 @@ const Fe = 512, dn = [
733
733
  // top-right
734
734
  [1, 1]
735
735
  // bottom-right
736
- ], pn = dn.concat([
736
+ ], yn = fn.concat([
737
737
  [0, 0.5],
738
738
  // left edge
739
739
  [0.5, 0],
@@ -742,8 +742,8 @@ const Fe = 512, dn = [
742
742
  // right edge
743
743
  [0.5, 1]
744
744
  // bottom edge
745
- ]), me = 6378137, ge = 2 * Math.PI * me, De = ge / 2, Ne = 85.05112877980659;
746
- class ie {
745
+ ]), ge = 6378137, fe = 2 * Math.PI * ge, Ue = fe / 2, Ne = 85.05112877980659;
746
+ class se {
747
747
  /** Index across a row */
748
748
  x;
749
749
  /** Index down a column */
@@ -786,10 +786,10 @@ class ie {
786
786
  const t = this.descriptor.levels.length - 1;
787
787
  if (this.z >= t)
788
788
  return this._children = null, null;
789
- const n = this.z + 1, r = this.descriptor.levels[n], o = this.level.projectedTileCorners(this.x, this.y), i = Sn(o), { minCol: s, maxCol: a, minRow: l, maxRow: c } = r.crsBoundsToTileRange(...i), u = [], { descriptor: h } = this;
789
+ const n = this.z + 1, r = this.descriptor.levels[n], o = this.level.projectedTileCorners(this.x, this.y), i = jn(o), { minCol: s, maxCol: a, minRow: l, maxRow: c } = r.crsBoundsToTileRange(...i), u = [], { descriptor: d } = this;
790
790
  for (let p = l; p <= c; p++)
791
- for (let d = s; d <= a; d++)
792
- u.push(new ie(d, p, n, { descriptor: h }));
791
+ for (let h = s; h <= a; h++)
792
+ u.push(new se(h, p, n, { descriptor: d }));
793
793
  this._children = u.length > 0 ? u : null;
794
794
  }
795
795
  return this._children;
@@ -814,12 +814,12 @@ class ie {
814
814
  */
815
815
  update(t) {
816
816
  this.childVisible = !1, this.selected = !1;
817
- const { viewport: n, cullingVolume: r, elevationBounds: o, minZ: i, maxZ: s = this.descriptor.levels.length - 1, project: a, bounds: l, pixelRatio: c, boundingVolumeCache: u } = t, { boundingVolume: h, commonSpaceBounds: p } = this.getBoundingVolume(o, a, u);
818
- if (l && !this.insideBounds(l, p) || r.computeVisibility(h) < 0)
817
+ const { viewport: n, cullingVolume: r, elevationBounds: o, minZ: i, maxZ: s = this.descriptor.levels.length - 1, project: a, bounds: l, pixelRatio: c, boundingVolumeCache: u } = t, { boundingVolume: d, commonSpaceBounds: p } = this.getBoundingVolume(o, a, u);
818
+ if (l && !this.insideBounds(l, p) || r.computeVisibility(d) < 0)
819
819
  return !1;
820
820
  const g = this.children;
821
821
  if (!this.childVisible && this.z >= i) {
822
- const f = vn(h, n.zoom);
822
+ const f = In(d, n.zoom);
823
823
  if (this.level.metersPerPixel * c / f <= 1 || this.z >= s || g === null && this.z >= i)
824
824
  return this.selected = !0, !0;
825
825
  }
@@ -880,7 +880,7 @@ class ie {
880
880
  * tiling is already in EPSG:3857.
881
881
  */
882
882
  computeBoundingVolume(t, n) {
883
- return n && Ut(!1, "TODO: implement getBoundingVolume in Globe view"), this._getGenericBoundingVolume(t);
883
+ return n && Wt(!1, "TODO: implement getBoundingVolume in Globe view"), this._getGenericBoundingVolume(t);
884
884
  }
885
885
  /**
886
886
  * Generic case - sample reference points and reproject to Web Mercator, then
@@ -888,50 +888,50 @@ class ie {
888
888
  *
889
889
  */
890
890
  _getGenericBoundingVolume(t) {
891
- const [n, r] = t, o = this.level.projectedTileCorners(this.x, this.y), s = gn(pn, o, this.descriptor.projectTo3857, this.descriptor.projectTo4326).map((d) => fn(d)), a = [];
892
- for (const d of s)
893
- a.push([d[0], d[1], n]), n !== r && a.push([d[0], d[1], r]);
894
- let l = Number.POSITIVE_INFINITY, c = Number.POSITIVE_INFINITY, u = Number.NEGATIVE_INFINITY, h = Number.NEGATIVE_INFINITY;
895
- for (const [d, g] of s)
896
- d < l && (l = d), g < c && (c = g), d > u && (u = d), g > h && (h = g);
897
- const p = [l, c, u, h];
891
+ const [n, r] = t, o = this.level.projectedTileCorners(this.x, this.y), s = wn(yn, o, this.descriptor.projectTo3857, this.descriptor.projectTo4326).map((h) => bn(h)), a = [];
892
+ for (const h of s)
893
+ a.push([h[0], h[1], n]), n !== r && a.push([h[0], h[1], r]);
894
+ let l = Number.POSITIVE_INFINITY, c = Number.POSITIVE_INFINITY, u = Number.NEGATIVE_INFINITY, d = Number.NEGATIVE_INFINITY;
895
+ for (const [h, g] of s)
896
+ h < l && (l = h), g < c && (c = g), h > u && (u = h), g > d && (d = g);
897
+ const p = [l, c, u, d];
898
898
  return {
899
- boundingVolume: Bt(a),
899
+ boundingVolume: _t(a),
900
900
  commonSpaceBounds: p
901
901
  };
902
902
  }
903
903
  }
904
- function mn(e, t) {
904
+ function Pn(e, t) {
905
905
  return (n, r) => {
906
906
  const [o, i] = e(n, r);
907
907
  if (Number.isFinite(o) && Number.isFinite(i))
908
908
  return [o, i];
909
- const [s, a] = t(n, r), c = Math.max(-Ne, Math.min(Ne, a)) * Math.PI / 180, u = s * Math.PI * me / 180, h = Math.log(Math.tan(Math.PI / 4 + c / 2)) * me;
910
- return [u, h];
909
+ const [s, a] = t(n, r), c = Math.max(-Ne, Math.min(Ne, a)) * Math.PI / 180, u = s * Math.PI * ge / 180, d = Math.log(Math.tan(Math.PI / 4 + c / 2)) * ge;
910
+ return [u, d];
911
911
  };
912
912
  }
913
- function gn(e, t, n, r) {
914
- const { topLeft: o, topRight: i, bottomLeft: s, bottomRight: a } = t, l = mn(n, r), c = [];
915
- for (const [u, h] of e) {
916
- const [p, d] = Ln(o, i, s, a, u, h);
917
- c.push(l(p, d));
913
+ function wn(e, t, n, r) {
914
+ const { topLeft: o, topRight: i, bottomLeft: s, bottomRight: a } = t, l = Pn(n, r), c = [];
915
+ for (const [u, d] of e) {
916
+ const [p, h] = xn(o, i, s, a, u, d);
917
+ c.push(l(p, h));
918
918
  }
919
919
  return c;
920
920
  }
921
- function fn([e, t]) {
922
- const n = Math.max(-De, Math.min(De, t));
921
+ function bn([e, t]) {
922
+ const n = Math.max(-Ue, Math.min(Ue, t));
923
923
  return [
924
- (e / ge + 0.5) * Fe,
925
- (n / ge + 0.5) * Fe
924
+ (e / fe + 0.5) * ze,
925
+ (n / fe + 0.5) * ze
926
926
  ];
927
927
  }
928
- const yn = 100;
929
- function wn(e) {
928
+ const Sn = 100;
929
+ function vn(e) {
930
930
  const { descriptor: t, viewport: n, datasetWgs84Bounds: r } = e, o = t.levels[0], i = [];
931
- if (o.matrixWidth * o.matrixHeight <= yn) {
931
+ if (o.matrixWidth * o.matrixHeight <= Sn) {
932
932
  for (let g = 0; g < o.matrixHeight; g++)
933
933
  for (let f = 0; f < o.matrixWidth; f++)
934
- i.push(new ie(f, g, 0, { descriptor: t }));
934
+ i.push(new se(f, g, 0, { descriptor: t }));
935
935
  return i;
936
936
  }
937
937
  const a = n.getBounds(), l = [
@@ -942,21 +942,21 @@ function wn(e) {
942
942
  ];
943
943
  if (l[0] > l[2] || l[1] > l[3])
944
944
  return i;
945
- const [c, u, h, p] = pe(t.projectFrom4326, l[0], l[1], l[2], l[3]), d = o.crsBoundsToTileRange(c, u, h, p);
946
- for (let g = d.minRow; g <= d.maxRow; g++)
947
- for (let f = d.minCol; f <= d.maxCol; f++)
948
- i.push(new ie(f, g, 0, { descriptor: t }));
945
+ const [c, u, d, p] = me(t.projectFrom4326, l[0], l[1], l[2], l[3]), h = o.crsBoundsToTileRange(c, u, d, p);
946
+ for (let g = h.minRow; g <= h.maxRow; g++)
947
+ for (let f = h.minCol; f <= h.maxCol; f++)
948
+ i.push(new se(f, g, 0, { descriptor: t }));
949
949
  return i;
950
950
  }
951
- function Pn(e, t) {
952
- const { viewport: n, maxZ: r, zRange: o, wgs84Bounds: i, pixelRatio: s = 1 } = t, a = t.boundingVolumeCache ?? new it();
951
+ function Ln(e, t) {
952
+ const { viewport: n, maxZ: r, zRange: o, wgs84Bounds: i, pixelRatio: s = 1 } = t, a = t.boundingVolumeCache ?? new lt();
953
953
  a.sweep();
954
- const l = n instanceof Ft && n.resolution ? n.projectPosition : null, c = Object.values(n.getFrustumPlanes()).map(({ normal: I, distance: J }) => new Dt(I.clone().negate(), J)), u = new Nt(c), h = n.distanceScales.unitsPerMeter[2], p = o && o[0] * h || 0, d = o && o[1] * h || 0, g = 0, [f, y, j, b] = i, S = Ee([f, y]), v = Ee([j, b]), L = [
955
- S[0],
956
- S[1],
954
+ const l = n instanceof Nt && n.resolution ? n.projectPosition : null, c = Object.values(n.getFrustumPlanes()).map(({ normal: R, distance: Z }) => new Bt(R.clone().negate(), Z)), u = new Kt(c), d = n.distanceScales.unitsPerMeter[2], p = o && o[0] * d || 0, h = o && o[1] * d || 0, g = 0, [f, y, I, b] = i, v = Me([f, y]), S = Me([I, b]), L = [
957
955
  v[0],
958
- v[1]
959
- ], E = wn({
956
+ v[1],
957
+ S[0],
958
+ S[1]
959
+ ], O = vn({
960
960
  descriptor: e,
961
961
  viewport: n,
962
962
  datasetWgs84Bounds: i
@@ -964,76 +964,76 @@ function Pn(e, t) {
964
964
  viewport: n,
965
965
  project: l,
966
966
  cullingVolume: u,
967
- elevationBounds: [p, d],
967
+ elevationBounds: [p, h],
968
968
  minZ: g,
969
969
  maxZ: r,
970
970
  bounds: L,
971
971
  pixelRatio: s,
972
972
  boundingVolumeCache: a
973
973
  };
974
- for (const I of E)
975
- I.update(M);
976
- const z = [];
977
- for (const I of E)
978
- I.getSelected(z);
979
- return z;
980
- }
981
- function bn(e, t) {
974
+ for (const R of O)
975
+ R.update(M);
976
+ const F = [];
977
+ for (const R of O)
978
+ R.getSelected(F);
979
+ return F;
980
+ }
981
+ function Cn(e, t) {
982
982
  return 40075016686e-3 * Math.cos(e * Math.PI / 180) / 2 ** (t + 8);
983
983
  }
984
- function vn(e, t) {
985
- const [n, r] = Gt(e.center);
986
- return bn(r, t);
984
+ function In(e, t) {
985
+ const [n, r] = kt(e.center);
986
+ return Cn(r, t);
987
987
  }
988
- function Sn({ topLeft: e, topRight: t, bottomLeft: n, bottomRight: r }) {
988
+ function jn({ topLeft: e, topRight: t, bottomLeft: n, bottomRight: r }) {
989
989
  const o = [e[0], t[0], n[0], r[0]], i = [e[1], t[1], n[1], r[1]];
990
990
  return [Math.min(...o), Math.min(...i), Math.max(...o), Math.max(...i)];
991
991
  }
992
- function Ln(e, t, n, r, o, i) {
992
+ function xn(e, t, n, r, o, i) {
993
993
  const s = (1 - o) * (1 - i), a = o * (1 - i), l = (1 - o) * i, c = o * i;
994
994
  return [
995
995
  e[0] * s + t[0] * a + n[0] * l + r[0] * c,
996
996
  e[1] * s + t[1] * a + n[1] * l + r[1] * c
997
997
  ];
998
998
  }
999
- function Cn(e, t) {
999
+ function An(e, t) {
1000
1000
  const n = e.length;
1001
1001
  if (n < 2)
1002
1002
  return e;
1003
1003
  const { getCenter: r, reference: o } = t, i = o[0], s = o[1], a = new Float64Array(n);
1004
1004
  for (let u = 0; u < n; u++) {
1005
- const h = r(e[u]), p = h[0] - i, d = h[1] - s;
1006
- a[u] = p * p + d * d;
1005
+ const d = r(e[u]), p = d[0] - i, h = d[1] - s;
1006
+ a[u] = p * p + h * h;
1007
1007
  }
1008
1008
  const l = new Uint32Array(n);
1009
1009
  for (let u = 0; u < n; u++)
1010
1010
  l[u] = u;
1011
- l.sort((u, h) => a[u] - a[h]);
1011
+ l.sort((u, d) => a[u] - a[d]);
1012
1012
  const c = e.slice();
1013
1013
  for (let u = 0; u < n; u++)
1014
1014
  e[u] = c[l[u]];
1015
1015
  return e;
1016
1016
  }
1017
- function jn(e, t, n) {
1017
+ function On(e, t, n) {
1018
1018
  const [r, o, i, s] = t.getBounds(), a = [
1019
1019
  (r + i) / 2,
1020
1020
  (o + s) / 2
1021
1021
  ];
1022
- return Cn(e, {
1022
+ return An(e, {
1023
1023
  reference: a,
1024
1024
  getCenter: n
1025
1025
  });
1026
1026
  }
1027
- class xn extends Kt {
1027
+ class Rn extends Xt {
1028
1028
  descriptor;
1029
1029
  wgs84Bounds;
1030
1030
  getPixelRatio;
1031
1031
  boundingVolumeCache;
1032
1032
  constructor(t, n, { getPixelRatio: r, maxBoundingVolumeCacheSize: o } = {}) {
1033
- super(t), this.descriptor = n, this.getPixelRatio = r ?? (() => 1), this.boundingVolumeCache = new it({
1033
+ super(t), this.descriptor = n, this.getPixelRatio = r ?? (() => 1), this.boundingVolumeCache = new lt({
1034
1034
  maxEntries: o
1035
1035
  });
1036
- const i = pe(this.descriptor.projectTo4326, ...this.descriptor.projectedBounds), s = 85.0511287798066;
1036
+ const i = me(this.descriptor.projectTo4326, ...this.descriptor.projectedBounds), s = 85.0511287798066;
1037
1037
  this.wgs84Bounds = [
1038
1038
  i[0],
1039
1039
  Math.max(i[1], -s),
@@ -1062,7 +1062,7 @@ class xn extends Kt {
1062
1062
  const { viewport: n, minZoom: r } = t;
1063
1063
  if (typeof r == "number" && n.zoom < r)
1064
1064
  return [];
1065
- const o = this.descriptor.levels.length - 1, i = typeof t.maxZoom == "number" ? Math.min(t.maxZoom, o) : o, s = Pn(this.descriptor, {
1065
+ const o = this.descriptor.levels.length - 1, i = typeof t.maxZoom == "number" ? Math.min(t.maxZoom, o) : o, s = Ln(this.descriptor, {
1066
1066
  viewport: n,
1067
1067
  maxZ: i,
1068
1068
  zRange: t.zRange ?? null,
@@ -1085,12 +1085,12 @@ class xn extends Kt {
1085
1085
  if (t.length <= r)
1086
1086
  return t;
1087
1087
  const o = this.descriptor;
1088
- return jn(t, n, (i) => {
1089
- const { x: s, y: a, z: l } = i, { topLeft: c, bottomRight: u } = o.levels[l].projectedTileCorners(s, a), h = [
1088
+ return On(t, n, (i) => {
1089
+ const { x: s, y: a, z: l } = i, { topLeft: c, bottomRight: u } = o.levels[l].projectedTileCorners(s, a), d = [
1090
1090
  (c[0] + u[0]) / 2,
1091
1091
  (c[1] + u[1]) / 2
1092
1092
  ];
1093
- return o.projectTo4326(h[0], h[1]);
1093
+ return o.projectTo4326(d[0], d[1]);
1094
1094
  });
1095
1095
  }
1096
1096
  getTileId(t) {
@@ -1110,47 +1110,47 @@ class xn extends Kt {
1110
1110
  return t.z;
1111
1111
  }
1112
1112
  getTileMetadata(t) {
1113
- const { x: n, y: r, z: o } = t, i = this.descriptor.levels[o], { tileHeight: s, tileWidth: a } = i, { topLeft: l, topRight: c, bottomLeft: u, bottomRight: h } = i.projectedTileCorners(n, r), p = {
1113
+ const { x: n, y: r, z: o } = t, i = this.descriptor.levels[o], { tileHeight: s, tileWidth: a } = i, { topLeft: l, topRight: c, bottomLeft: u, bottomRight: d } = i.projectedTileCorners(n, r), p = {
1114
1114
  topLeft: l,
1115
1115
  topRight: c,
1116
1116
  bottomLeft: u,
1117
- bottomRight: h
1118
- }, d = [
1119
- Math.min(l[0], c[0], u[0], h[0]),
1120
- Math.min(l[1], c[1], u[1], h[1]),
1121
- Math.max(l[0], c[0], u[0], h[0]),
1122
- Math.max(l[1], c[1], u[1], h[1])
1123
- ], [g, f, y, j] = pe(this.descriptor.projectTo4326, ...d), { forwardTransform: b, inverseTransform: S } = i.tileTransform(n, r);
1117
+ bottomRight: d
1118
+ }, h = [
1119
+ Math.min(l[0], c[0], u[0], d[0]),
1120
+ Math.min(l[1], c[1], u[1], d[1]),
1121
+ Math.max(l[0], c[0], u[0], d[0]),
1122
+ Math.max(l[1], c[1], u[1], d[1])
1123
+ ], [g, f, y, I] = me(this.descriptor.projectTo4326, ...h), { forwardTransform: b, inverseTransform: v } = i.tileTransform(n, r);
1124
1124
  return {
1125
1125
  bbox: {
1126
1126
  west: g,
1127
1127
  south: f,
1128
1128
  east: y,
1129
- north: j
1129
+ north: I
1130
1130
  },
1131
1131
  projectedBbox: {
1132
- left: d[0],
1133
- bottom: d[1],
1134
- right: d[2],
1135
- top: d[3]
1132
+ left: h[0],
1133
+ bottom: h[1],
1134
+ right: h[2],
1135
+ top: h[3]
1136
1136
  },
1137
1137
  projectedCorners: p,
1138
1138
  tileWidth: a,
1139
1139
  tileHeight: s,
1140
1140
  forwardTransform: b,
1141
- inverseTransform: S
1141
+ inverseTransform: v
1142
1142
  };
1143
1143
  }
1144
1144
  }
1145
- const fe = 512, On = 40075016686e-3, Ue = fe / On, An = {
1146
- ...rt.defaultProps,
1145
+ const ye = 512, Mn = 40075016686e-3, Be = ye / Mn, En = {
1146
+ ...st.defaultProps,
1147
1147
  maxError: 0.125,
1148
1148
  debug: !1,
1149
1149
  debugOpacity: 0.5
1150
1150
  };
1151
- class Be extends nt {
1151
+ class Ke extends it {
1152
1152
  static layerName = "RasterTileLayer";
1153
- static defaultProps = An;
1153
+ static defaultProps = En;
1154
1154
  /**
1155
1155
  * The currently effective {@link RasterTilesetDescriptor}.
1156
1156
  *
@@ -1203,7 +1203,7 @@ class Be extends nt {
1203
1203
  */
1204
1204
  _renderDebug(t, n) {
1205
1205
  const r = this._tilesetDescriptor();
1206
- return r ? Xt(`${this.id}-${t.id}-bounds`, t, r.projectTo4326) : [];
1206
+ return r ? Vt(`${this.id}-${t.id}-bounds`, t, r.projectTo4326) : [];
1207
1207
  }
1208
1208
  renderLayers() {
1209
1209
  const t = this._tilesetDescriptor(), n = this._getTileDataCallback(), r = this._renderTileCallback();
@@ -1211,18 +1211,18 @@ class Be extends nt {
1211
1211
  }
1212
1212
  _renderTileLayer(t, n, r) {
1213
1213
  const o = this.context.device;
1214
- class i extends xn {
1215
- constructor(E) {
1216
- super(E, t, {
1214
+ class i extends Rn {
1215
+ constructor(O) {
1216
+ super(O, t, {
1217
1217
  getPixelRatio: () => {
1218
- const M = o.getDefaultCanvasContext(), [z] = M.getDrawingBufferSize(), [I] = M.getCSSSize();
1219
- return I ? z / I : 1;
1218
+ const M = o.getDefaultCanvasContext(), [F] = M.getDrawingBufferSize(), [R] = M.getCSSSize();
1219
+ return R ? F / R : 1;
1220
1220
  }
1221
1221
  });
1222
1222
  }
1223
1223
  }
1224
- const { tileSize: s, zoomOffset: a, maxZoom: l, minZoom: c, extent: u, debounceTime: h, maxCacheSize: p, maxCacheByteSize: d, maxRequests: g, refinementStrategy: f, updateTriggers: y, onTileError: j, onTileLoad: b, onTileUnload: S, onViewportLoad: v } = this.props;
1225
- return new rt({
1224
+ const { tileSize: s, zoomOffset: a, maxZoom: l, minZoom: c, extent: u, debounceTime: d, maxCacheSize: p, maxCacheByteSize: h, maxRequests: g, refinementStrategy: f, updateTriggers: y, onTileError: I, onTileLoad: b, onTileUnload: v, onViewportLoad: S } = this.props;
1225
+ return new st({
1226
1226
  id: `raster-tile-layer-${this.id}`,
1227
1227
  TilesetClass: i,
1228
1228
  getTileData: (L) => this._wrapGetTileData(L, n),
@@ -1235,15 +1235,15 @@ class Be extends nt {
1235
1235
  maxZoom: l,
1236
1236
  minZoom: c,
1237
1237
  extent: u,
1238
- debounceTime: h,
1238
+ debounceTime: d,
1239
1239
  maxCacheSize: p,
1240
- maxCacheByteSize: d,
1240
+ maxCacheByteSize: h,
1241
1241
  maxRequests: g,
1242
1242
  refinementStrategy: f,
1243
- onTileError: j,
1243
+ onTileError: I,
1244
1244
  onTileLoad: b,
1245
- onTileUnload: S,
1246
- onViewportLoad: v
1245
+ onTileUnload: v,
1246
+ onViewportLoad: S
1247
1247
  });
1248
1248
  }
1249
1249
  async _wrapGetTileData(t, n) {
@@ -1257,10 +1257,10 @@ class Be extends nt {
1257
1257
  const { maxError: o, debug: i, debugOpacity: s } = this.props, a = t.tile, l = i ? this._renderDebug(a, t.data ?? null) : [];
1258
1258
  if (!t.data)
1259
1259
  return l;
1260
- const { forwardTransform: c, inverseTransform: u } = a, h = r(t.data);
1261
- if (!h)
1260
+ const { forwardTransform: c, inverseTransform: u } = a, d = r(t.data);
1261
+ if (!d)
1262
1262
  return l;
1263
- const { image: p, renderPipeline: d } = h, { width: g, height: f } = t.data, y = this.context.viewport.resolution !== void 0, j = y ? {
1263
+ const { image: p, renderPipeline: h } = d, { width: g, height: f } = t.data, y = this.context.viewport.resolution !== void 0, I = y ? {
1264
1264
  forwardTransform: c,
1265
1265
  inverseTransform: u,
1266
1266
  forwardReproject: n.projectTo4326,
@@ -1272,15 +1272,15 @@ class Be extends nt {
1272
1272
  inverseReproject: n.projectFrom3857
1273
1273
  }, b = y ? {} : {
1274
1274
  coordinateSystem: "cartesian",
1275
- coordinateOrigin: [fe / 2, fe / 2, 0],
1275
+ coordinateOrigin: [ye / 2, ye / 2, 0],
1276
1276
  // biome-ignore format: array
1277
1277
  modelMatrix: [
1278
- Ue,
1278
+ Be,
1279
1279
  0,
1280
1280
  0,
1281
1281
  0,
1282
1282
  0,
1283
- Ue,
1283
+ Be,
1284
1284
  0,
1285
1285
  0,
1286
1286
  0,
@@ -1293,89 +1293,89 @@ class Be extends nt {
1293
1293
  1
1294
1294
  ]
1295
1295
  };
1296
- return [new Tt(this.getSubLayerProps({
1296
+ return [new nn(this.getSubLayerProps({
1297
1297
  id: `${t.id}-raster`,
1298
1298
  width: g,
1299
1299
  height: f,
1300
1300
  // Passing `image: undefined` explicitly would trip isAsyncPropLoading
1301
1301
  // and cause a transient black flash (see issue #376).
1302
1302
  ...p !== void 0 && { image: p },
1303
- renderPipeline: d,
1303
+ renderPipeline: h,
1304
1304
  maxError: o,
1305
- reprojectionFns: j,
1305
+ reprojectionFns: I,
1306
1306
  debug: i,
1307
1307
  debugOpacity: s,
1308
1308
  ...b
1309
1309
  })), ...l];
1310
1310
  }
1311
1311
  }
1312
- function En(e, t) {
1312
+ function Fn(e, t) {
1313
1313
  const n = e.length / 3, r = new Uint8ClampedArray(n * 4), o = 0, i = n, s = n * 2;
1314
1314
  for (let a = 0; a < n; a++)
1315
1315
  r[4 * a + 0] = e[o + a] >> 8, r[4 * a + 1] = e[i + a] >> 8, r[4 * a + 2] = e[s + a] >> 8, r[4 * a + 3] = 255;
1316
1316
  return new ImageData(r, n, 1);
1317
1317
  }
1318
- var ye;
1318
+ var Pe;
1319
1319
  (function(e) {
1320
1320
  e[e.Big = 19789] = "Big", e[e.Little = 18761] = "Little";
1321
- })(ye || (ye = {}));
1322
- var $;
1321
+ })(Pe || (Pe = {}));
1322
+ var ee;
1323
1323
  (function(e) {
1324
1324
  e[e.ReducedImage = 1] = "ReducedImage", e[e.Page = 2] = "Page", e[e.Mask = 4] = "Mask";
1325
- })($ || ($ = {}));
1326
- var Ge;
1325
+ })(ee || (ee = {}));
1326
+ var We;
1327
1327
  (function(e) {
1328
1328
  e[e.TopLeft = 1] = "TopLeft", e[e.TopRight = 2] = "TopRight", e[e.BottomRight = 3] = "BottomRight", e[e.BottomLeft = 4] = "BottomLeft", e[e.LeftTop = 5] = "LeftTop", e[e.RightTOP = 6] = "RightTOP", e[e.RightBottom = 7] = "RightBottom", e[e.LeftBottom = 8] = "LeftBottom";
1329
- })(Ge || (Ge = {}));
1329
+ })(We || (We = {}));
1330
1330
  var we;
1331
1331
  (function(e) {
1332
1332
  e[e.PixelIsArea = 1] = "PixelIsArea", e[e.PixelIsPoint = 2] = "PixelIsPoint";
1333
1333
  })(we || (we = {}));
1334
- var G;
1334
+ var B;
1335
1335
  (function(e) {
1336
1336
  e[e.Unknown = 0] = "Unknown", e[e.Projected = 1] = "Projected", e[e.Geographic = 2] = "Geographic", e[e.Geocentric = 3] = "Geocentric", e[e.UserDefined = 32767] = "UserDefined";
1337
- })(G || (G = {}));
1338
- var Ke;
1337
+ })(B || (B = {}));
1338
+ var _e;
1339
1339
  (function(e) {
1340
1340
  e[e.Image = 1] = "Image", e[e.ReducedImage = 2] = "ReducedImage", e[e.Page = 3] = "Page";
1341
- })(Ke || (Ke = {}));
1342
- var P;
1341
+ })(_e || (_e = {}));
1342
+ var w;
1343
1343
  (function(e) {
1344
1344
  e[e.None = 1] = "None", e[e.Ccittrle = 2] = "Ccittrle", e[e.CcittT4 = 3] = "CcittT4", e[e.CcittT6 = 4] = "CcittT6", e[e.Lzw = 5] = "Lzw", e[e.Jpeg6 = 6] = "Jpeg6", e[e.Jpeg = 7] = "Jpeg", e[e.DeflateOther = 8] = "DeflateOther", e[e.T85 = 9] = "T85", e[e.T43 = 10] = "T43", e[e.Next = 32766] = "Next", e[e.Ccittrlew = 32771] = "Ccittrlew", e[e.PackBits = 32773] = "PackBits", e[e.ThunderScan = 32809] = "ThunderScan", e[e.It8ctpad = 32895] = "It8ctpad", e[e.It8lw = 32896] = "It8lw", e[e.It8mp = 32897] = "It8mp", e[e.It8bl = 32898] = "It8bl", e[e.PixarFilm = 32908] = "PixarFilm", e[e.PixarLog = 32909] = "PixarLog", e[e.Deflate = 32946] = "Deflate", e[e.Dcs = 32947] = "Dcs", e[e.Jbig = 34661] = "Jbig", e[e.SgiLog = 34676] = "SgiLog", e[e.SgiLog24 = 34677] = "SgiLog24", e[e.Jp2000 = 34712] = "Jp2000", e[e.Lerc = 34887] = "Lerc", e[e.Lzma = 34925] = "Lzma", e[e.Zstd = 5e4] = "Zstd", e[e.Webp = 50001] = "Webp", e[e.JpegXl = 50002] = "JpegXl", e[e.JpegXlDng17 = 52546] = "JpegXlDng17";
1345
- })(P || (P = {}));
1345
+ })(w || (w = {}));
1346
1346
  var U;
1347
1347
  (function(e) {
1348
1348
  e[e.Contig = 1] = "Contig", e[e.Separate = 2] = "Separate";
1349
1349
  })(U || (U = {}));
1350
- var V;
1350
+ var J;
1351
1351
  (function(e) {
1352
1352
  e[e.None = 1] = "None", e[e.Horizontal = 2] = "Horizontal", e[e.FloatingPoint = 3] = "FloatingPoint";
1353
- })(V || (V = {}));
1354
- var F;
1353
+ })(J || (J = {}));
1354
+ var G;
1355
1355
  (function(e) {
1356
1356
  e[e.Uint = 1] = "Uint", e[e.Int = 2] = "Int", e[e.Float = 3] = "Float", e[e.Void = 4] = "Void", e[e.ComplexInt = 5] = "ComplexInt", e[e.ComplexFloat = 6] = "ComplexFloat";
1357
- })(F || (F = {}));
1358
- var R;
1357
+ })(G || (G = {}));
1358
+ var E;
1359
1359
  (function(e) {
1360
1360
  e[e.MinIsWhite = 0] = "MinIsWhite", e[e.MinIsBlack = 1] = "MinIsBlack", e[e.Rgb = 2] = "Rgb", e[e.Palette = 3] = "Palette", e[e.Mask = 4] = "Mask", e[e.Separated = 5] = "Separated", e[e.Ycbcr = 6] = "Ycbcr", e[e.Cielab = 8] = "Cielab", e[e.Icclab = 9] = "Icclab", e[e.Itulab = 10] = "Itulab", e[e.Cfa = 32803] = "Cfa", e[e.Logl = 32844] = "Logl", e[e.Logluv = 32845] = "Logluv";
1361
- })(R || (R = {}));
1361
+ })(E || (E = {}));
1362
1362
  var m;
1363
1363
  (function(e) {
1364
1364
  e[e.SubFileType = 254] = "SubFileType", e[e.OldSubFileType = 255] = "OldSubFileType", e[e.ImageWidth = 256] = "ImageWidth", e[e.ImageHeight = 257] = "ImageHeight", e[e.BitsPerSample = 258] = "BitsPerSample", e[e.SampleFormat = 339] = "SampleFormat", e[e.Compression = 259] = "Compression", e[e.Photometric = 262] = "Photometric", e[e.TileWidth = 322] = "TileWidth", e[e.TileHeight = 323] = "TileHeight", e[e.TileOffsets = 324] = "TileOffsets", e[e.TileByteCounts = 325] = "TileByteCounts", e[e.JpegTables = 347] = "JpegTables", e[e.StripOffsets = 273] = "StripOffsets", e[e.StripByteCounts = 279] = "StripByteCounts", e[e.GdalMetadata = 42112] = "GdalMetadata", e[e.GdalNoData = 42113] = "GdalNoData", e[e.ModelPixelScale = 33550] = "ModelPixelScale", e[e.ModelTiePoint = 33922] = "ModelTiePoint", e[e.ModelTransformation = 34264] = "ModelTransformation", e[e.GeoKeyDirectory = 34735] = "GeoKeyDirectory", e[e.GeoDoubleParams = 34736] = "GeoDoubleParams", e[e.GeoAsciiParams = 34737] = "GeoAsciiParams", e[e.LercParameters = 50674] = "LercParameters", e[e.PlanarConfiguration = 284] = "PlanarConfiguration", e[e.CellLength = 265] = "CellLength", e[e.CellWidth = 264] = "CellWidth", e[e.ColorMap = 320] = "ColorMap", e[e.Copyright = 33432] = "Copyright", e[e.DateTime = 306] = "DateTime", e[e.ExtraSamples = 338] = "ExtraSamples", e[e.FillOrder = 266] = "FillOrder", e[e.FreeByteCounts = 289] = "FreeByteCounts", e[e.FreeOffsets = 288] = "FreeOffsets", e[e.GrayResponseCurve = 291] = "GrayResponseCurve", e[e.GrayResponseUnit = 290] = "GrayResponseUnit", e[e.HostComputer = 316] = "HostComputer", e[e.ImageDescription = 270] = "ImageDescription", e[e.Make = 271] = "Make", e[e.MaxSampleValue = 281] = "MaxSampleValue", e[e.MinSampleValue = 280] = "MinSampleValue", e[e.Model = 272] = "Model", e[e.Orientation = 274] = "Orientation", e[e.ResolutionUnit = 296] = "ResolutionUnit", e[e.RowsPerStrip = 278] = "RowsPerStrip", e[e.SamplesPerPixel = 277] = "SamplesPerPixel", e[e.Software = 305] = "Software", e[e.Threshholding = 263] = "Threshholding", e[e.XResolution = 282] = "XResolution", e[e.YResolution = 283] = "YResolution", e[e.BadFaxLines = 326] = "BadFaxLines", e[e.CleanFaxData = 327] = "CleanFaxData", e[e.ClipPath = 343] = "ClipPath", e[e.ConsecutiveBadFaxLines = 328] = "ConsecutiveBadFaxLines", e[e.Decode = 433] = "Decode", e[e.DefaultImageColor = 434] = "DefaultImageColor", e[e.DocumentName = 269] = "DocumentName", e[e.DotRange = 336] = "DotRange", e[e.HalftoneHints = 321] = "HalftoneHints", e[e.Indexed = 346] = "Indexed", e[e.PageName = 285] = "PageName", e[e.PageNumber = 297] = "PageNumber", e[e.Predictor = 317] = "Predictor", e[e.PrimaryChromaticities = 319] = "PrimaryChromaticities", e[e.ReferenceBlackWhite = 532] = "ReferenceBlackWhite", e[e.SMinSampleValue = 340] = "SMinSampleValue", e[e.SMaxSampleValue = 341] = "SMaxSampleValue", e[e.StripRowCounts = 559] = "StripRowCounts", e[e.SubIFDs = 330] = "SubIFDs", e[e.T4Options = 292] = "T4Options", e[e.T6Options = 293] = "T6Options", e[e.TransferFunction = 301] = "TransferFunction", e[e.WhitePoint = 318] = "WhitePoint", e[e.XClipPathUnits = 344] = "XClipPathUnits", e[e.XPosition = 286] = "XPosition", e[e.YCbCrCoefficients = 529] = "YCbCrCoefficients", e[e.YCbCrPositioning = 531] = "YCbCrPositioning", e[e.YCbCrSubSampling = 530] = "YCbCrSubSampling", e[e.YClipPathUnits = 345] = "YClipPathUnits", e[e.YPosition = 287] = "YPosition", e[e.ApertureValue = 37378] = "ApertureValue", e[e.ColorSpace = 40961] = "ColorSpace", e[e.DateTimeDigitized = 36868] = "DateTimeDigitized", e[e.DateTimeOriginal = 36867] = "DateTimeOriginal", e[e.ExifIFD = 34665] = "ExifIFD", e[e.ExifVersion = 36864] = "ExifVersion", e[e.ExposureTime = 33434] = "ExposureTime", e[e.FileSource = 41728] = "FileSource", e[e.Flash = 37385] = "Flash", e[e.FlashpixVersion = 40960] = "FlashpixVersion", e[e.FNumber = 33437] = "FNumber", e[e.ImageUniqueID = 42016] = "ImageUniqueID", e[e.LightSource = 37384] = "LightSource", e[e.MakerNote = 37500] = "MakerNote", e[e.ShutterSpeedValue = 37377] = "ShutterSpeedValue", e[e.UserComment = 37510] = "UserComment", e[e.IPTC = 33723] = "IPTC", e[e.ICCProfile = 34675] = "ICCProfile", e[e.XMP = 700] = "XMP";
1365
1365
  })(m || (m = {}));
1366
- var w;
1366
+ var P;
1367
1367
  (function(e) {
1368
1368
  e[e.GTModelTypeGeoKey = 1024] = "GTModelTypeGeoKey", e[e.GTRasterTypeGeoKey = 1025] = "GTRasterTypeGeoKey", e[e.GTCitationGeoKey = 1026] = "GTCitationGeoKey", e[e.GeodeticCRSGeoKey = 2048] = "GeodeticCRSGeoKey", e[e.GeodeticCitationGeoKey = 2049] = "GeodeticCitationGeoKey", e[e.GeodeticDatumGeoKey = 2050] = "GeodeticDatumGeoKey", e[e.PrimeMeridianGeoKey = 2051] = "PrimeMeridianGeoKey", e[e.GeogLinearUnitsGeoKey = 2052] = "GeogLinearUnitsGeoKey", e[e.GeogLinearUnitSizeGeoKey = 2053] = "GeogLinearUnitSizeGeoKey", e[e.GeogAngularUnitsGeoKey = 2054] = "GeogAngularUnitsGeoKey", e[e.GeogAngularUnitSizeGeoKey = 2055] = "GeogAngularUnitSizeGeoKey", e[e.EllipsoidGeoKey = 2056] = "EllipsoidGeoKey", e[e.EllipsoidSemiMajorAxisGeoKey = 2057] = "EllipsoidSemiMajorAxisGeoKey", e[e.EllipsoidSemiMinorAxisGeoKey = 2058] = "EllipsoidSemiMinorAxisGeoKey", e[e.EllipsoidInvFlatteningGeoKey = 2059] = "EllipsoidInvFlatteningGeoKey", e[e.PrimeMeridianLongitudeGeoKey = 2061] = "PrimeMeridianLongitudeGeoKey", e[e.GeogTOWGS84GeoKey = 2062] = "GeogTOWGS84GeoKey", e[e.GeogAzimuthUnitsGeoKey = 2060] = "GeogAzimuthUnitsGeoKey", e[e.ProjectedCRSGeoKey = 3072] = "ProjectedCRSGeoKey", e[e.ProjectedCitationGeoKey = 3073] = "ProjectedCitationGeoKey", e[e.ProjectionGeoKey = 3074] = "ProjectionGeoKey", e[e.ProjMethodGeoKey = 3075] = "ProjMethodGeoKey", e[e.ProjLinearUnitsGeoKey = 3076] = "ProjLinearUnitsGeoKey", e[e.ProjLinearUnitSizeGeoKey = 3077] = "ProjLinearUnitSizeGeoKey", e[e.ProjStdParallel1GeoKey = 3078] = "ProjStdParallel1GeoKey", e[e.ProjStdParallel2GeoKey = 3079] = "ProjStdParallel2GeoKey", e[e.ProjNatOriginLongGeoKey = 3080] = "ProjNatOriginLongGeoKey", e[e.ProjNatOriginLatGeoKey = 3081] = "ProjNatOriginLatGeoKey", e[e.ProjFalseEastingGeoKey = 3082] = "ProjFalseEastingGeoKey", e[e.ProjFalseNorthingGeoKey = 3083] = "ProjFalseNorthingGeoKey", e[e.ProjFalseOriginLongGeoKey = 3084] = "ProjFalseOriginLongGeoKey", e[e.ProjFalseOriginLatGeoKey = 3085] = "ProjFalseOriginLatGeoKey", e[e.ProjFalseOriginEastingGeoKey = 3086] = "ProjFalseOriginEastingGeoKey", e[e.ProjFalseOriginNorthingGeoKey = 3087] = "ProjFalseOriginNorthingGeoKey", e[e.ProjCenterLongGeoKey = 3088] = "ProjCenterLongGeoKey", e[e.ProjCenterLatGeoKey = 3089] = "ProjCenterLatGeoKey", e[e.ProjCenterEastingGeoKey = 3090] = "ProjCenterEastingGeoKey", e[e.ProjCenterNorthingGeoKey = 3091] = "ProjCenterNorthingGeoKey", e[e.ProjScaleAtNatOriginGeoKey = 3092] = "ProjScaleAtNatOriginGeoKey", e[e.ProjScaleAtCenterGeoKey = 3093] = "ProjScaleAtCenterGeoKey", e[e.ProjAzimuthAngleGeoKey = 3094] = "ProjAzimuthAngleGeoKey", e[e.ProjStraightVertPoleLongGeoKey = 3095] = "ProjStraightVertPoleLongGeoKey", e[e.ProjRectifiedGridAngleGeoKey = 3096] = "ProjRectifiedGridAngleGeoKey", e[e.VerticalGeoKey = 4096] = "VerticalGeoKey", e[e.VerticalCitationGeoKey = 4097] = "VerticalCitationGeoKey", e[e.VerticalDatumGeoKey = 4098] = "VerticalDatumGeoKey", e[e.VerticalUnitsGeoKey = 4099] = "VerticalUnitsGeoKey";
1369
- })(w || (w = {}));
1370
- var _e;
1369
+ })(P || (P = {}));
1370
+ var ke;
1371
1371
  (function(e) {
1372
1372
  e[e.Radian = 9101] = "Radian", e[e.Degree = 9102] = "Degree", e[e.ArcMinute = 9103] = "ArcMinute", e[e.ArcDegree = 9104] = "ArcDegree", e[e.Grad = 9105] = "Grad", e[e.Gon = 9106] = "Gon", e[e.Dms = 9107] = "Dms";
1373
- })(_e || (_e = {}));
1373
+ })(ke || (ke = {}));
1374
1374
  var Xe;
1375
1375
  (function(e) {
1376
1376
  e[e.Metre = 9001] = "Metre", e[e.Foot = 9002] = "Foot", e[e.FootUsSurvey = 9003] = "FootUsSurvey", e[e.FootModifiedAmerican = 9004] = "FootModifiedAmerican", e[e.FootClarke = 9005] = "FootClarke", e[e.FootIndian = 9006] = "FootIndian", e[e.Link = 9007] = "Link", e[e.LinkBenoit = 9008] = "LinkBenoit", e[e.LinkSears = 9009] = "LinkSears", e[e.ChainBenoit = 9010] = "ChainBenoit", e[e.ChainSears = 9011] = "ChainSears", e[e.YardSears = 9012] = "YardSears", e[e.YardIndian = 9013] = "YardIndian", e[e.Fathom = 9014] = "Fathom", e[e.MileInternationalNautical = 9015] = "MileInternationalNautical";
1377
1377
  })(Xe || (Xe = {}));
1378
- const In = {
1378
+ const Gn = {
1379
1379
  [m.TileByteCounts]: !0,
1380
1380
  [m.TileOffsets]: !0,
1381
1381
  [m.StripOffsets]: !0,
@@ -1385,56 +1385,56 @@ const In = {
1385
1385
  [m.GeoKeyDirectory]: !0,
1386
1386
  [m.GeoDoubleParams]: !0
1387
1387
  };
1388
- var x;
1388
+ var j;
1389
1389
  (function(e) {
1390
1390
  e.None = "application/octet-stream", e.Jbig = "image/jbig", e.Dcs = "image/x-kodak-dcs", e.PackBits = "application/packbits", e.Jpeg = "image/jpeg", e.Jp2000 = "image/jp2", e.JpegXl = "image/jpegxl", e.Webp = "image/webp", e.Zstd = "application/zstd", e.Lzw = "application/lzw", e.Deflate = "application/deflate", e.Lerc = "application/lerc", e.Lzma = "application/x-lzma";
1391
- })(x || (x = {}));
1392
- const st = {
1393
- [P.None]: x.None,
1394
- [P.Lzw]: x.Lzw,
1395
- [P.Jpeg6]: x.Jpeg,
1396
- [P.Jpeg]: x.Jpeg,
1397
- [P.DeflateOther]: x.Deflate,
1398
- [P.Deflate]: x.Deflate,
1399
- [P.Lerc]: x.Lerc,
1400
- [P.Lzma]: x.Lzma,
1401
- [P.Jp2000]: x.Jp2000,
1402
- [P.Zstd]: x.Zstd,
1403
- [P.Webp]: x.Webp,
1404
- [P.JpegXl]: x.JpegXl,
1405
- [P.Ccittrle]: x.None,
1406
- [P.CcittT4]: x.None,
1407
- [P.CcittT6]: x.None,
1408
- [P.T85]: x.Jbig,
1409
- [P.T43]: x.Jbig,
1410
- [P.Next]: x.None,
1411
- [P.Ccittrlew]: x.None,
1412
- [P.PackBits]: x.PackBits,
1413
- [P.ThunderScan]: x.None,
1414
- [P.It8ctpad]: x.None,
1415
- [P.It8lw]: x.None,
1416
- [P.It8mp]: x.None,
1417
- [P.It8bl]: x.None,
1418
- [P.PixarFilm]: x.None,
1419
- [P.PixarLog]: x.None,
1420
- [P.Dcs]: x.Dcs,
1421
- [P.Jbig]: x.Jbig,
1422
- [P.SgiLog]: x.None,
1423
- [P.SgiLog24]: x.None,
1424
- [P.JpegXlDng17]: x.JpegXl
1391
+ })(j || (j = {}));
1392
+ const ct = {
1393
+ [w.None]: j.None,
1394
+ [w.Lzw]: j.Lzw,
1395
+ [w.Jpeg6]: j.Jpeg,
1396
+ [w.Jpeg]: j.Jpeg,
1397
+ [w.DeflateOther]: j.Deflate,
1398
+ [w.Deflate]: j.Deflate,
1399
+ [w.Lerc]: j.Lerc,
1400
+ [w.Lzma]: j.Lzma,
1401
+ [w.Jp2000]: j.Jp2000,
1402
+ [w.Zstd]: j.Zstd,
1403
+ [w.Webp]: j.Webp,
1404
+ [w.JpegXl]: j.JpegXl,
1405
+ [w.Ccittrle]: j.None,
1406
+ [w.CcittT4]: j.None,
1407
+ [w.CcittT6]: j.None,
1408
+ [w.T85]: j.Jbig,
1409
+ [w.T43]: j.Jbig,
1410
+ [w.Next]: j.None,
1411
+ [w.Ccittrlew]: j.None,
1412
+ [w.PackBits]: j.PackBits,
1413
+ [w.ThunderScan]: j.None,
1414
+ [w.It8ctpad]: j.None,
1415
+ [w.It8lw]: j.None,
1416
+ [w.It8mp]: j.None,
1417
+ [w.It8bl]: j.None,
1418
+ [w.PixarFilm]: j.None,
1419
+ [w.PixarLog]: j.None,
1420
+ [w.Dcs]: j.Dcs,
1421
+ [w.Jbig]: j.Jbig,
1422
+ [w.SgiLog]: j.None,
1423
+ [w.SgiLog24]: j.None,
1424
+ [w.JpegXlDng17]: j.JpegXl
1425
1425
  };
1426
- function Mn(e) {
1427
- return e == null ? null : st[e];
1426
+ function Dn(e) {
1427
+ return e == null ? null : ct[e];
1428
1428
  }
1429
1429
  var C;
1430
1430
  (function(e) {
1431
1431
  e[e.Uint8 = 1] = "Uint8", e[e.Ascii = 2] = "Ascii", e[e.Uint16 = 3] = "Uint16", e[e.Uint32 = 4] = "Uint32", e[e.Rational = 5] = "Rational", e[e.Int8 = 6] = "Int8", e[e.Undefined = 7] = "Undefined", e[e.Int16 = 8] = "Int16", e[e.Int32 = 9] = "Int32", e[e.SignedRational = 10] = "SignedRational", e[e.Float32 = 11] = "Float32", e[e.Float64 = 12] = "Float64", e[e.Ifd = 13] = "Ifd", e[e.Uint64 = 16] = "Uint64", e[e.Int64 = 17] = "Int64", e[e.Ifd8 = 18] = "Ifd8";
1432
1432
  })(C || (C = {}));
1433
- var N;
1433
+ var z;
1434
1434
  (function(e) {
1435
1435
  e[e.BigTiff = 43] = "BigTiff", e[e.Tiff = 42] = "Tiff";
1436
- })(N || (N = {}));
1437
- function W(e) {
1436
+ })(z || (z = {}));
1437
+ function k(e) {
1438
1438
  switch (e) {
1439
1439
  case C.Uint8:
1440
1440
  case C.Ascii:
@@ -1460,40 +1460,40 @@ function W(e) {
1460
1460
  throw new Error(`Invalid fieldType ${String(e)}`);
1461
1461
  }
1462
1462
  }
1463
- var We;
1463
+ var He;
1464
1464
  (function(e) {
1465
1465
  e[e.Double = 8] = "Double", e[e.Float32 = 4] = "Float32";
1466
- })(We || (We = {}));
1467
- var O;
1466
+ })(He || (He = {}));
1467
+ var x;
1468
1468
  (function(e) {
1469
1469
  e[e.UInt64 = 8] = "UInt64", e[e.UInt32 = 4] = "UInt32", e[e.UInt16 = 2] = "UInt16", e[e.UInt8 = 1] = "UInt8";
1470
- })(O || (O = {}));
1471
- const He = 2 ** 32;
1472
- function at(e, t, n) {
1473
- const r = e.getUint32(t, n), o = e.getUint32(t + 4, n), i = n ? r + He * o : He * r + o;
1470
+ })(x || (x = {}));
1471
+ const Ve = 2 ** 32;
1472
+ function ut(e, t, n) {
1473
+ const r = e.getUint32(t, n), o = e.getUint32(t + 4, n), i = n ? r + Ve * o : Ve * r + o;
1474
1474
  if (!Number.isSafeInteger(i))
1475
1475
  throw new Error(i + " exceeds MAX_SAFE_INTEGER. Precision may is lost");
1476
1476
  return i;
1477
1477
  }
1478
1478
  function K(e, t, n, r) {
1479
1479
  switch (n) {
1480
- case O.UInt8:
1480
+ case x.UInt8:
1481
1481
  return e.getUint8(t);
1482
- case O.UInt16:
1482
+ case x.UInt16:
1483
1483
  return e.getUint16(t, r);
1484
- case O.UInt32:
1484
+ case x.UInt32:
1485
1485
  return e.getUint32(t, r);
1486
- case O.UInt64:
1487
- return at(e, t, r);
1486
+ case x.UInt64:
1487
+ return ut(e, t, r);
1488
1488
  }
1489
1489
  }
1490
- function se(e, t, n) {
1490
+ function ae(e, t, n) {
1491
1491
  return !(t < e.sourceOffset || e.sourceOffset + e.byteLength < t + n);
1492
1492
  }
1493
- const lt = new ArrayBuffer(4), Rn = new Uint32Array(lt), zn = new Uint8Array(lt);
1494
- Rn[0] = 1;
1495
- const ke = zn[0] === 1;
1496
- function Ze(e, t, n, r) {
1493
+ const dt = new ArrayBuffer(4), zn = new Uint32Array(dt), Un = new Uint8Array(dt);
1494
+ zn[0] = 1;
1495
+ const Je = Un[0] === 1;
1496
+ function Ye(e, t, n, r) {
1497
1497
  switch (e) {
1498
1498
  case C.Ascii:
1499
1499
  return String.fromCharCode(t.getUint8(n));
@@ -1520,46 +1520,46 @@ function Ze(e, t, n, r) {
1520
1520
  case C.Float32:
1521
1521
  return t.getFloat32(n, r);
1522
1522
  case C.Uint64:
1523
- return at(t, n, r);
1523
+ return ut(t, n, r);
1524
1524
  default:
1525
1525
  throw new Error(`Unknown read type "${e}" "${C[e]}"`);
1526
1526
  }
1527
1527
  }
1528
- function ct(e, t, n, r, o) {
1528
+ function ht(e, t, n, r, o) {
1529
1529
  switch (o) {
1530
1530
  case C.Uint8:
1531
1531
  return new Uint8Array(t.buffer.slice(t.byteOffset + n, t.byteOffset + n + r));
1532
1532
  case C.Uint16:
1533
- return e.isLittleEndian !== ke ? null : new Uint16Array(t.buffer.slice(t.byteOffset + n, t.byteOffset + n + r));
1533
+ return e.isLittleEndian !== Je ? null : new Uint16Array(t.buffer.slice(t.byteOffset + n, t.byteOffset + n + r));
1534
1534
  case C.Uint32:
1535
- return e.isLittleEndian !== ke ? null : new Uint32Array(t.buffer.slice(t.byteOffset + n, t.byteOffset + n + r));
1535
+ return e.isLittleEndian !== Je ? null : new Uint32Array(t.buffer.slice(t.byteOffset + n, t.byteOffset + n + r));
1536
1536
  }
1537
1537
  return null;
1538
1538
  }
1539
- function X(e, t, n, r, o, i) {
1540
- const s = W(o), a = i * s;
1539
+ function _(e, t, n, r, o, i) {
1540
+ const s = k(o), a = i * s;
1541
1541
  if (i === 1) {
1542
- const c = Ze(o, n, r, e.isLittleEndian);
1543
- return t && In[t] ? [c] : c;
1542
+ const c = Ye(o, n, r, e.isLittleEndian);
1543
+ return t && Gn[t] ? [c] : c;
1544
1544
  }
1545
1545
  switch (o) {
1546
1546
  case C.Ascii:
1547
1547
  return String.fromCharCode.apply(null, new Uint8Array(n.buffer, r, a - 1));
1548
1548
  }
1549
1549
  if (t === m.TileOffsets || t === m.TileByteCounts || t === m.StripOffsets || t === m.StripByteCounts) {
1550
- const c = ct(e, n, r, a, o);
1550
+ const c = ht(e, n, r, a, o);
1551
1551
  if (c)
1552
1552
  return c;
1553
1553
  }
1554
1554
  const l = [];
1555
1555
  for (let c = 0; c < a; c += s)
1556
- l.push(Ze(o, n, r + c, e.isLittleEndian));
1556
+ l.push(Ye(o, n, r + c, e.isLittleEndian));
1557
1557
  return l;
1558
1558
  }
1559
- function Fn(e, t, n) {
1560
- const r = t.getUint16(n + 0, e.isLittleEndian), o = t.getUint16(n + 2, e.isLittleEndian), i = K(t, n + 4, e.ifdConfig.pointer, e.isLittleEndian), a = W(o) * i;
1559
+ function Nn(e, t, n) {
1560
+ const r = t.getUint16(n + 0, e.isLittleEndian), o = t.getUint16(n + 2, e.isLittleEndian), i = K(t, n + 4, e.ifdConfig.pointer, e.isLittleEndian), a = k(o) * i;
1561
1561
  if (a <= e.ifdConfig.pointer) {
1562
- const c = X(e, r, t, n + 4 + e.ifdConfig.pointer, o, i);
1562
+ const c = _(e, r, t, n + 4 + e.ifdConfig.pointer, o, i);
1563
1563
  return { type: "inline", id: r, name: m[r], count: i, value: c, dataType: o, tagOffset: n };
1564
1564
  }
1565
1565
  const l = K(t, n + 4 + e.ifdConfig.pointer, e.ifdConfig.pointer, e.isLittleEndian);
@@ -1579,66 +1579,66 @@ function Fn(e, t, n) {
1579
1579
  value: [],
1580
1580
  tagOffset: n
1581
1581
  };
1582
- if (se(t, l, a)) {
1583
- const u = ct(e, t, l - t.sourceOffset, a, o);
1584
- u ? (c.value = u, c.isLoaded = !0) : Un(c, t);
1582
+ if (ae(t, l, a)) {
1583
+ const u = ht(e, t, l - t.sourceOffset, a, o);
1584
+ u ? (c.value = u, c.isLoaded = !0) : Wn(c, t);
1585
1585
  }
1586
1586
  return c;
1587
1587
  }
1588
- if (se(t, l, a)) {
1589
- const c = X(e, r, t, l - t.sourceOffset, o, i);
1588
+ if (ae(t, l, a)) {
1589
+ const c = _(e, r, t, l - t.sourceOffset, o, i);
1590
1590
  return { type: "inline", id: r, name: m[r], count: i, value: c, dataType: o, tagOffset: n };
1591
1591
  }
1592
1592
  return { type: "lazy", id: r, name: m[r], count: i, dataOffset: l, dataType: o, tagOffset: n };
1593
1593
  }
1594
- async function Dn(e, t, n) {
1594
+ async function Bn(e, t, n) {
1595
1595
  if (e.value != null)
1596
1596
  return e.value;
1597
- const o = W(e.dataType) * e.count, i = await t.source.fetch(e.dataOffset, o, n), s = new DataView(i);
1598
- return e.value = X(t, e.id, s, 0, e.dataType, e.count), e.value;
1597
+ const o = k(e.dataType) * e.count, i = await t.source.fetch(e.dataOffset, o, n), s = new DataView(i);
1598
+ return e.value = _(t, e.id, s, 0, e.dataType, e.count), e.value;
1599
1599
  }
1600
- async function Nn(e, t, n) {
1601
- const r = W(t.dataType);
1600
+ async function Kn(e, t, n) {
1601
+ const r = k(t.dataType);
1602
1602
  if (t.view == null) {
1603
1603
  const o = await e.source.fetch(t.dataOffset, r * t.count, n);
1604
1604
  t.view = new DataView(o), t.view.sourceOffset = t.dataOffset;
1605
1605
  }
1606
- return t.value = X(e, t.id, t.view, 0, t.dataType, t.count), t.view = void 0, t.isLoaded = !0, t.value;
1606
+ return t.value = _(e, t.id, t.view, 0, t.dataType, t.count), t.view = void 0, t.isLoaded = !0, t.value;
1607
1607
  }
1608
- function Un(e, t) {
1609
- const n = W(e.dataType), r = t.byteOffset + e.dataOffset - t.sourceOffset;
1608
+ function Wn(e, t) {
1609
+ const n = k(e.dataType), r = t.byteOffset + e.dataOffset - t.sourceOffset;
1610
1610
  e.view = new DataView(t.buffer.slice(r, r + n * e.count)), e.view.sourceOffset = e.dataOffset;
1611
1611
  }
1612
- async function Bn(e, t, n, r) {
1612
+ async function _n(e, t, n, r) {
1613
1613
  if (n > t.count || n < 0)
1614
1614
  throw new Error("TagOffset: out of bounds :" + n);
1615
1615
  if (t.value[n] != null)
1616
1616
  return t.value[n];
1617
- const o = W(t.dataType);
1617
+ const o = k(t.dataType);
1618
1618
  if (t.view == null) {
1619
- const s = await e.source.fetch(t.dataOffset + n * o, o, r), a = new DataView(s), l = X(e, void 0, a, 0, t.dataType, 1);
1619
+ const s = await e.source.fetch(t.dataOffset + n * o, o, r), a = new DataView(s), l = _(e, void 0, a, 0, t.dataType, 1);
1620
1620
  if (typeof l != "number")
1621
1621
  throw new Error("Value is not a number");
1622
1622
  return t.value[n] = l, l;
1623
1623
  }
1624
- const i = X(e, void 0, t.view, n * o, t.dataType, 1);
1624
+ const i = _(e, void 0, t.view, n * o, t.dataType, 1);
1625
1625
  if (typeof i != "number")
1626
1626
  throw new Error("Value is not a number");
1627
1627
  return t.value[n] = i, i;
1628
1628
  }
1629
- function Gn(e, t, n) {
1629
+ function kn(e, t, n) {
1630
1630
  if (n > t.count || n < 0)
1631
1631
  throw new Error("TagOffset: out of bounds :" + n);
1632
1632
  if (t.value[n] != null)
1633
1633
  return t.value[n];
1634
1634
  if (t.view == null)
1635
1635
  return null;
1636
- const r = W(t.dataType), o = X(e, void 0, t.view, n * r, t.dataType, 1);
1636
+ const r = k(t.dataType), o = _(e, void 0, t.view, n * r, t.dataType, 1);
1637
1637
  if (typeof o != "number")
1638
1638
  throw new Error("Value is not a number");
1639
1639
  return t.value[n] = o, o;
1640
1640
  }
1641
- const Ve = 32767, Kn = /* @__PURE__ */ new Set([
1641
+ const Ze = 32767, Xn = /* @__PURE__ */ new Set([
1642
1642
  m.Compression,
1643
1643
  m.ImageHeight,
1644
1644
  m.ImageWidth,
@@ -1647,8 +1647,8 @@ const Ve = 32767, Kn = /* @__PURE__ */ new Set([
1647
1647
  m.ModelTransformation,
1648
1648
  m.TileHeight,
1649
1649
  m.TileWidth
1650
- ]), _n = /* @__PURE__ */ new Set([m.GeoKeyDirectory, m.GeoAsciiParams, m.GeoDoubleParams]);
1651
- class Xn {
1650
+ ]), Hn = /* @__PURE__ */ new Set([m.GeoKeyDirectory, m.GeoAsciiParams, m.GeoDoubleParams]);
1651
+ class Vn {
1652
1652
  /**
1653
1653
  * Id of the tif image, generally the image index inside the tif
1654
1654
  * where 0 is the root image, and every sub image is +1
@@ -1674,9 +1674,9 @@ class Xn {
1674
1674
  */
1675
1675
  async init(t = !0, n) {
1676
1676
  const r = [];
1677
- Kn.forEach((o) => {
1677
+ Xn.forEach((o) => {
1678
1678
  r.push(this.fetch(o, n));
1679
- }), t && _n.forEach((o) => {
1679
+ }), t && Hn.forEach((o) => {
1680
1680
  r.push(this.fetch(o, n));
1681
1681
  }), await Promise.all(r), t && await this.loadGeoTiffTags();
1682
1682
  }
@@ -1726,11 +1726,11 @@ class Xn {
1726
1726
  if (r.type === "inline")
1727
1727
  return r.value;
1728
1728
  if (r.type === "lazy")
1729
- return Dn(r, this.tiff, n);
1729
+ return Bn(r, this.tiff, n);
1730
1730
  if (r.isLoaded)
1731
1731
  return r.value;
1732
1732
  if (r.type === "offset")
1733
- return Nn(this.tiff, r, n);
1733
+ return Kn(this.tiff, r, n);
1734
1734
  throw new Error("Cannot fetch:" + t);
1735
1735
  }
1736
1736
  /**
@@ -1813,7 +1813,7 @@ class Xn {
1813
1813
  const n = this.value(m.ModelTransformation);
1814
1814
  if (n != null)
1815
1815
  return [n[3], n[7], n[11]];
1816
- if (this.value(m.SubFileType) === $.ReducedImage && this.id !== 0)
1816
+ if (this.value(m.SubFileType) === ee.ReducedImage && this.id !== 0)
1817
1817
  return this.tiff.images[0].origin;
1818
1818
  throw new Error("Image does not have a geo transformation.");
1819
1819
  }
@@ -1845,7 +1845,7 @@ class Xn {
1845
1845
  * @returns true if SubFileType is Reduces image, false otherwise
1846
1846
  */
1847
1847
  get isSubImage() {
1848
- return this.value(m.SubFileType) === $.ReducedImage;
1848
+ return this.value(m.SubFileType) === ee.ReducedImage;
1849
1849
  }
1850
1850
  /**
1851
1851
  * Bounding box of the image
@@ -1868,7 +1868,7 @@ class Xn {
1868
1868
  */
1869
1869
  get compression() {
1870
1870
  const t = this.value(m.Compression);
1871
- return t == null ? null : st[t];
1871
+ return t == null ? null : ct[t];
1872
1872
  }
1873
1873
  /**
1874
1874
  * Attempt to read the EPSG Code from TiffGeoTags
@@ -1878,26 +1878,26 @@ class Xn {
1878
1878
  * @returns EPSG Code if it exists and is not user defined.
1879
1879
  */
1880
1880
  get epsg() {
1881
- const t = this.valueGeo(w.ProjectionGeoKey);
1882
- if (t != null && t !== Ve)
1881
+ const t = this.valueGeo(P.ProjectionGeoKey);
1882
+ if (t != null && t !== Ze)
1883
1883
  return t;
1884
1884
  let n = null;
1885
- switch (this.valueGeo(w.GTModelTypeGeoKey)) {
1886
- case G.Unknown:
1885
+ switch (this.valueGeo(P.GTModelTypeGeoKey)) {
1886
+ case B.Unknown:
1887
1887
  return null;
1888
- case G.Projected:
1889
- n = this.valueGeo(w.ProjectedCRSGeoKey);
1888
+ case B.Projected:
1889
+ n = this.valueGeo(P.ProjectedCRSGeoKey);
1890
1890
  break;
1891
- case G.Geographic:
1892
- n = this.valueGeo(w.GeodeticCRSGeoKey);
1891
+ case B.Geographic:
1892
+ n = this.valueGeo(P.GeodeticCRSGeoKey);
1893
1893
  break;
1894
- case G.Geocentric:
1895
- n = this.valueGeo(w.GeodeticCRSGeoKey);
1894
+ case B.Geocentric:
1895
+ n = this.valueGeo(P.GeodeticCRSGeoKey);
1896
1896
  break;
1897
- case G.UserDefined:
1897
+ case B.UserDefined:
1898
1898
  return null;
1899
1899
  }
1900
- return n === Ve ? null : n;
1900
+ return n === Ze ? null : n;
1901
1901
  }
1902
1902
  /**
1903
1903
  * Get the size of the image
@@ -1974,8 +1974,8 @@ class Xn {
1974
1974
  if (t >= r.count)
1975
1975
  throw new Error("Cannot read strip, index out of bounds");
1976
1976
  const [i, s] = await Promise.all([
1977
- Q(this.tiff, o, t, n),
1978
- Q(this.tiff, r, t, n)
1977
+ q(this.tiff, o, t, n),
1978
+ q(this.tiff, r, t, n)
1979
1979
  ]);
1980
1980
  return this.getBytes(i, s, n);
1981
1981
  }
@@ -1995,9 +1995,9 @@ class Xn {
1995
1995
  if (o.byteLength < n)
1996
1996
  throw new Error(`Failed to fetch bytes from offset:${t} wanted:${n} got:${o.byteLength}`);
1997
1997
  let i = this.value(m.Compression);
1998
- i == null && (i = P.None);
1999
- const s = Mn(i) ?? x.None;
2000
- return i === P.Jpeg ? { mimeType: s, bytes: this.getJpegHeader(o), compression: i } : { mimeType: s, bytes: o, compression: i };
1998
+ i == null && (i = w.None);
1999
+ const s = Dn(i) ?? j.None;
2000
+ return i === w.Jpeg ? { mimeType: s, bytes: this.getJpegHeader(o), compression: i } : { mimeType: s, bytes: o, compression: i };
2001
2001
  }
2002
2002
  /**
2003
2003
  * Load a tile into a ArrayBuffer
@@ -2017,8 +2017,8 @@ class Xn {
2017
2017
  const l = n * a + t, c = a * s;
2018
2018
  if (l >= c)
2019
2019
  throw new Error(`Tile index is outside of tile range: ${l} >= ${c}`);
2020
- const { offset: u, imageSize: h } = await this.getTileSize(l, r);
2021
- return this.getBytes(u, h, r);
2020
+ const { offset: u, imageSize: d } = await this.getTileSize(l, r);
2021
+ return this.getBytes(u, d, r);
2022
2022
  }
2023
2023
  /**
2024
2024
  * Does this tile exist in the tiff and does it actually have a value
@@ -2050,12 +2050,12 @@ class Xn {
2050
2050
  * @returns Offset and byteCount for the tile
2051
2051
  */
2052
2052
  async getTileSize(t, n) {
2053
- const r = this.tags.get(m.TileByteCounts), o = Pe(this.tiff, this.tileOffset, t), i = Pe(this.tiff, r, t);
2053
+ const r = this.tags.get(m.TileByteCounts), o = be(this.tiff, this.tileOffset, t), i = be(this.tiff, r, t);
2054
2054
  if (o != null && i != null)
2055
2055
  return { offset: o, imageSize: i };
2056
2056
  const s = this.tiff.options?.tileLeaderByteSize;
2057
2057
  if (s) {
2058
- const c = o ?? await Q(this.tiff, this.tileOffset, t, n);
2058
+ const c = o ?? await q(this.tiff, this.tileOffset, t, n);
2059
2059
  if (c === 0)
2060
2060
  return { offset: 0, imageSize: 0 };
2061
2061
  const u = await this.tiff.source.fetch(c - s, s, n);
@@ -2064,46 +2064,46 @@ class Xn {
2064
2064
  if (r == null)
2065
2065
  throw new Error("No tile byte counts found");
2066
2066
  const [a, l] = await Promise.all([
2067
- o ?? Q(this.tiff, this.tileOffset, t, n),
2068
- i ?? Q(this.tiff, r, t, n)
2067
+ o ?? q(this.tiff, this.tileOffset, t, n),
2068
+ i ?? q(this.tiff, r, t, n)
2069
2069
  ]);
2070
2070
  return { offset: a, imageSize: l };
2071
2071
  }
2072
2072
  }
2073
- function Q(e, t, n, r) {
2074
- const o = Pe(e, t, n);
2075
- return o != null ? Promise.resolve(o) : Bn(e, t, n, r);
2073
+ function q(e, t, n, r) {
2074
+ const o = be(e, t, n);
2075
+ return o != null ? Promise.resolve(o) : _n(e, t, n, r);
2076
2076
  }
2077
- function Pe(e, t, n) {
2077
+ function be(e, t, n) {
2078
2078
  if (n < 0)
2079
2079
  throw new Error(`Tiff: ${e.source.url.href} out of bounds ${m[t.id]} index:${n} total:${t.count}`);
2080
- return n >= t.count ? 0 : t.type === "inline" || t.isLoaded ? t.value[n] : Gn(e, t, n);
2080
+ return n >= t.count ? 0 : t.type === "inline" || t.isLoaded ? t.value[n] : kn(e, t, n);
2081
2081
  }
2082
- var k;
2082
+ var H;
2083
2083
  (function(e) {
2084
2084
  e.GdalStructuralMetadataSize = "GDAL_STRUCTURAL_METADATA_SIZE", e.Layout = "LAYOUT", e.BlockOrder = "BLOCK_ORDER", e.BlockLeader = "BLOCK_LEADER", e.BlockTrailer = "BLOCK_TRAILER", e.KnownIncompatibleEdition = "KNOWN_INCOMPATIBLE_EDITION", e.MaskInterleavedWithImagery = "MASK_INTERLEAVED_WITH_IMAGERY";
2085
- })(k || (k = {}));
2086
- var Ye;
2085
+ })(H || (H = {}));
2086
+ var Te;
2087
2087
  (function(e) {
2088
2088
  e.RowMajor = "ROW_MAJOR";
2089
- })(Ye || (Ye = {}));
2090
- var be;
2089
+ })(Te || (Te = {}));
2090
+ var Se;
2091
2091
  (function(e) {
2092
2092
  e.uint32 = "SIZE_AS_UINT4";
2093
- })(be || (be = {}));
2094
- class Wn {
2093
+ })(Se || (Se = {}));
2094
+ class Jn {
2095
2095
  options = /* @__PURE__ */ new Map();
2096
2096
  /**
2097
2097
  * Has GDAL optimized this tiff
2098
2098
  */
2099
2099
  get isCogOptimized() {
2100
- return this.isBroken ? !1 : this.options.get(k.Layout) === "IFDS_BEFORE_DATA";
2100
+ return this.isBroken ? !1 : this.options.get(H.Layout) === "IFDS_BEFORE_DATA";
2101
2101
  }
2102
2102
  /**
2103
2103
  * Has GDAL determined this tiff is now broken
2104
2104
  */
2105
2105
  get isBroken() {
2106
- return this.options.get(k.KnownIncompatibleEdition) === "YES";
2106
+ return this.options.get(H.KnownIncompatibleEdition) === "YES";
2107
2107
  }
2108
2108
  /**
2109
2109
  * Load the ghost options from a source
@@ -2124,21 +2124,21 @@ class Wn {
2124
2124
  * If the tile leader is set, how many bytes are allocated to the tile size
2125
2125
  */
2126
2126
  get tileLeaderByteSize() {
2127
- switch (this.options.get(k.BlockLeader)) {
2128
- case be.uint32:
2129
- return O.UInt32;
2127
+ switch (this.options.get(H.BlockLeader)) {
2128
+ case Se.uint32:
2129
+ return x.UInt32;
2130
2130
  default:
2131
2131
  return null;
2132
2132
  }
2133
2133
  }
2134
2134
  get isMaskInterleaved() {
2135
- return this.options.get(k.MaskInterleavedWithImagery) === "YES";
2135
+ return this.options.get(H.MaskInterleavedWithImagery) === "YES";
2136
2136
  }
2137
2137
  }
2138
- const ut = {
2139
- version: N.Tiff,
2140
- pointer: O.UInt32,
2141
- offset: O.UInt16,
2138
+ const pt = {
2139
+ version: z.Tiff,
2140
+ pointer: x.UInt32,
2141
+ offset: x.UInt16,
2142
2142
  /**
2143
2143
  * Each tag entry is specified as
2144
2144
  * UInt16:TagCode
@@ -2146,13 +2146,13 @@ const ut = {
2146
2146
  * UInt32:TagCount
2147
2147
  * UInt32:Pointer To Value or value
2148
2148
  */
2149
- ifd: O.UInt16 + O.UInt16 + 2 * O.UInt32
2150
- }, ht = {
2151
- version: N.BigTiff,
2149
+ ifd: x.UInt16 + x.UInt16 + 2 * x.UInt32
2150
+ }, mt = {
2151
+ version: z.BigTiff,
2152
2152
  /** Size of most pointers */
2153
- pointer: O.UInt64,
2153
+ pointer: x.UInt64,
2154
2154
  /** Size of offsets */
2155
- offset: O.UInt64,
2155
+ offset: x.UInt64,
2156
2156
  /**
2157
2157
  * Each tag entry is specified as
2158
2158
  * UInt16:TagCode
@@ -2160,40 +2160,40 @@ const ut = {
2160
2160
  * UInt64:TagCount
2161
2161
  * UInt64:Pointer To Value or value
2162
2162
  */
2163
- ifd: O.UInt16 + O.UInt16 + 2 * O.UInt64
2163
+ ifd: x.UInt16 + x.UInt16 + 2 * x.UInt64
2164
2164
  };
2165
- N.BigTiff + "", N.Tiff + "";
2166
- function Hn(e, t = 4, n = !0) {
2165
+ z.BigTiff + "", z.Tiff + "";
2166
+ function Yn(e, t = 4, n = !0) {
2167
2167
  const r = e.toString(16).padStart(t, "0");
2168
2168
  return n ? "0x" + r : r;
2169
2169
  }
2170
- class Z {
2170
+ class V {
2171
2171
  /** Read 16KB blocks at a time */
2172
2172
  static DefaultReadSize = 16 * 1024;
2173
2173
  /** Read 16KB blocks at a time */
2174
- defaultReadSize = Z.DefaultReadSize;
2174
+ defaultReadSize = V.DefaultReadSize;
2175
2175
  /** Where this cog is fetching its data from */
2176
2176
  source;
2177
2177
  /** Big or small Tiff */
2178
- version = N.Tiff;
2178
+ version = z.Tiff;
2179
2179
  /** List of images, o is the base image */
2180
2180
  images = [];
2181
2181
  /** Ghost header options */
2182
2182
  options;
2183
2183
  /** Configuration for the size of the IFD */
2184
- ifdConfig = ut;
2184
+ ifdConfig = pt;
2185
2185
  /** Is the tiff being read is little Endian */
2186
2186
  isLittleEndian = !1;
2187
2187
  /** Has init() been called */
2188
2188
  isInitialized = !1;
2189
2189
  _initPromise;
2190
2190
  /** A Tiff constructed from a source will not be pre-initialized with {@link init}. */
2191
- constructor(t, n = { defaultReadSize: Z.DefaultReadSize }) {
2191
+ constructor(t, n = { defaultReadSize: V.DefaultReadSize }) {
2192
2192
  this.source = t, this.defaultReadSize = n.defaultReadSize;
2193
2193
  }
2194
2194
  /** Create a tiff and initialize it by reading the tiff headers */
2195
- static create(t, n = { defaultReadSize: Z.DefaultReadSize }) {
2196
- return new Z(t, n).init(n);
2195
+ static create(t, n = { defaultReadSize: V.DefaultReadSize }) {
2196
+ return new V(t, n).init(n);
2197
2197
  }
2198
2198
  /**
2199
2199
  * Initialize the tiff loading in the header and all image headers.
@@ -2222,16 +2222,16 @@ class Z {
2222
2222
  async readHeader(t) {
2223
2223
  if (this.isInitialized)
2224
2224
  return this;
2225
- const n = new DataView(await this.source.fetch(0, Je(this.source, 0, this.defaultReadSize), t));
2225
+ const n = new DataView(await this.source.fetch(0, qe(this.source, 0, this.defaultReadSize), t));
2226
2226
  if (n.byteLength === 0)
2227
2227
  throw new Error("Unable to read empty tiff");
2228
2228
  n.sourceOffset = 0;
2229
2229
  let r = 0;
2230
2230
  const o = n.getUint16(r, this.isLittleEndian);
2231
- r += 2, this.isLittleEndian = o === ye.Little, this.version = n.getUint16(r, this.isLittleEndian), r += 2;
2231
+ r += 2, this.isLittleEndian = o === Pe.Little, this.version = n.getUint16(r, this.isLittleEndian), r += 2;
2232
2232
  let i;
2233
- if (this.version === N.BigTiff) {
2234
- this.ifdConfig = ht;
2233
+ if (this.version === z.BigTiff) {
2234
+ this.ifdConfig = mt;
2235
2235
  const a = n.getUint16(r, this.isLittleEndian);
2236
2236
  if (r += 2, a !== 8)
2237
2237
  throw new Error("Only 8byte pointers are supported");
@@ -2239,15 +2239,15 @@ class Z {
2239
2239
  if (r += 2, l !== 0)
2240
2240
  throw new Error("Invalid big tiff header");
2241
2241
  i = K(n, r, this.ifdConfig.pointer, this.isLittleEndian), r += this.ifdConfig.pointer;
2242
- } else if (this.version === N.Tiff)
2242
+ } else if (this.version === z.Tiff)
2243
2243
  i = K(n, r, this.ifdConfig.pointer, this.isLittleEndian), r += this.ifdConfig.pointer;
2244
2244
  else
2245
2245
  throw new Error(`Only tiff supported version:${String(this.version)}`);
2246
2246
  const s = i - r;
2247
- for (s > 0 && s < 16 * 1024 && (this.options = new Wn(), this.options.process(n, r, s)); i !== 0; ) {
2247
+ for (s > 0 && s < 16 * 1024 && (this.options = new Jn(), this.options.process(n, r, s)); i !== 0; ) {
2248
2248
  let a = n;
2249
- if (!se(a, i, 1024)) {
2250
- const l = await this.source.fetch(i, Je(this.source, i, this.defaultReadSize), t);
2249
+ if (!ae(a, i, 1024)) {
2250
+ const l = await this.source.fetch(i, qe(this.source, i, this.defaultReadSize), t);
2251
2251
  a = new DataView(l), a.sourceOffset = i;
2252
2252
  }
2253
2253
  i = this.readIfd(i, a);
@@ -2262,57 +2262,57 @@ class Z {
2262
2262
  */
2263
2263
  readIfd(t, n) {
2264
2264
  const r = t - n.sourceOffset, o = K(n, r, this.ifdConfig.offset, this.isLittleEndian), i = /* @__PURE__ */ new Map(), s = o * this.ifdConfig.ifd;
2265
- if (!se(n, t, s))
2266
- throw new Error("IFD out of range @ " + Hn(t) + " IFD" + this.images.length);
2265
+ if (!ae(n, t, s))
2266
+ throw new Error("IFD out of range @ " + Yn(t) + " IFD" + this.images.length);
2267
2267
  const a = this.ifdConfig.ifd, l = r + this.ifdConfig.offset;
2268
2268
  for (let c = 0; c < o; c++) {
2269
- const u = Fn(this, n, l + c * a);
2269
+ const u = Nn(this, n, l + c * a);
2270
2270
  i.set(u.id, u);
2271
2271
  }
2272
- return this.images.push(new Xn(this, this.images.length, i)), K(n, l + o * a, this.ifdConfig.pointer, this.isLittleEndian);
2272
+ return this.images.push(new Vn(this, this.images.length, i)), K(n, l + o * a, this.ifdConfig.pointer, this.isLittleEndian);
2273
2273
  }
2274
2274
  }
2275
- function Je(e, t, n) {
2275
+ function qe(e, t, n) {
2276
2276
  const r = e.metadata?.size;
2277
2277
  return r == null || r < 0 ? n : t + n > r ? r - t : n;
2278
2278
  }
2279
- async function Ce(e, t) {
2279
+ async function je(e, t) {
2280
2280
  const n = new Blob([e]), r = await createImageBitmap(n), o = new OffscreenCanvas(r.width, r.height), i = o.getContext("2d");
2281
2281
  i.drawImage(r, 0, 0), r.close();
2282
2282
  const { width: s, height: a } = o, c = i.getImageData(0, 0, s, a).data, u = t.samplesPerPixel;
2283
2283
  if (u === 4)
2284
2284
  return { layout: "pixel-interleaved", data: c };
2285
2285
  if (u === 3) {
2286
- const h = s * a, p = new Uint8ClampedArray(h * 3);
2287
- for (let d = 0, g = 0; d < p.length; d += 3, g += 4)
2288
- p[d] = c[g], p[d + 1] = c[g + 1], p[d + 2] = c[g + 2];
2286
+ const d = s * a, p = new Uint8ClampedArray(d * 3);
2287
+ for (let h = 0, g = 0; h < p.length; h += 3, g += 4)
2288
+ p[h] = c[g], p[h + 1] = c[g + 1], p[h + 2] = c[g + 2];
2289
2289
  return { layout: "pixel-interleaved", data: p };
2290
2290
  }
2291
2291
  if (u === 1) {
2292
- const h = s * a, p = new Uint8ClampedArray(h);
2293
- for (let d = 0, g = 0; d < h; d++, g += 4)
2294
- p[d] = c[g];
2292
+ const d = s * a, p = new Uint8ClampedArray(d);
2293
+ for (let h = 0, g = 0; h < d; h++, g += 4)
2294
+ p[h] = c[g];
2295
2295
  return { layout: "pixel-interleaved", data: p };
2296
2296
  }
2297
2297
  throw new Error(`Unsupported SamplesPerPixel for JPEG: ${u}`);
2298
2298
  }
2299
- function kn(e, t = "") {
2299
+ function Zn(e, t = "") {
2300
2300
  if (!e)
2301
2301
  throw new Error(t);
2302
2302
  }
2303
- async function Zn(e, { format: t, signal: n }) {
2303
+ async function Tn(e, { format: t, signal: n }) {
2304
2304
  const r = e instanceof Response ? e : new Response(e);
2305
- kn(r.body, "Response does not contain body.");
2305
+ Zn(r.body, "Response does not contain body.");
2306
2306
  try {
2307
2307
  return await new Response(r.body.pipeThrough(new DecompressionStream(t), { signal: n })).arrayBuffer();
2308
2308
  } catch {
2309
2309
  throw n?.throwIfAborted(), new Error(`Failed to decode ${t}`);
2310
2310
  }
2311
2311
  }
2312
- async function dt(e) {
2313
- return Zn(e, { format: "deflate" });
2312
+ async function gt(e) {
2313
+ return Tn(e, { format: "deflate" });
2314
2314
  }
2315
- function Vn(e, t) {
2315
+ function qn(e, t) {
2316
2316
  const n = e;
2317
2317
  let r = 0, o = e.length - t;
2318
2318
  do {
@@ -2321,7 +2321,7 @@ function Vn(e, t) {
2321
2321
  o -= t;
2322
2322
  } while (o > 0);
2323
2323
  }
2324
- function Yn(e, t, n) {
2324
+ function Qn(e, t, n) {
2325
2325
  let r = 0, o = e.length;
2326
2326
  const i = o / n;
2327
2327
  for (; o > t; ) {
@@ -2334,78 +2334,78 @@ function Yn(e, t, n) {
2334
2334
  for (let l = 0; l < n; l++)
2335
2335
  e[n * a + l] = s[(n - l - 1) * i + a];
2336
2336
  }
2337
- function Jn(e, t, n, r, o, i, s) {
2338
- if (t === V.None)
2337
+ function $n(e, t, n, r, o, i, s) {
2338
+ if (t === J.None)
2339
2339
  return e;
2340
2340
  const a = o / 8, l = s === U.Separate ? 1 : i;
2341
2341
  for (let c = 0; c < r; c++) {
2342
2342
  const u = c * l * n * a;
2343
2343
  if (u >= e.byteLength)
2344
2344
  break;
2345
- if (t === V.Horizontal) {
2346
- let h;
2345
+ if (t === J.Horizontal) {
2346
+ let d;
2347
2347
  const p = l * n;
2348
2348
  switch (o) {
2349
2349
  case 8:
2350
- h = new Uint8Array(e, u, p);
2350
+ d = new Uint8Array(e, u, p);
2351
2351
  break;
2352
2352
  case 16:
2353
- h = new Uint16Array(e, u, p);
2353
+ d = new Uint16Array(e, u, p);
2354
2354
  break;
2355
2355
  case 32:
2356
- h = new Uint32Array(e, u, p);
2356
+ d = new Uint32Array(e, u, p);
2357
2357
  break;
2358
2358
  default:
2359
2359
  throw new Error(`Predictor 2 not supported for ${o} bits per sample.`);
2360
2360
  }
2361
- Vn(h, l);
2362
- } else if (t === V.FloatingPoint) {
2363
- const h = new Uint8Array(e, u, l * n * a);
2364
- Yn(h, l, a);
2361
+ qn(d, l);
2362
+ } else if (t === J.FloatingPoint) {
2363
+ const d = new Uint8Array(e, u, l * n * a);
2364
+ Qn(d, l, a);
2365
2365
  }
2366
2366
  }
2367
2367
  return e;
2368
2368
  }
2369
- async function qn(e) {
2369
+ async function er(e) {
2370
2370
  return e;
2371
2371
  }
2372
2372
  const D = /* @__PURE__ */ new Map();
2373
- D.set(P.None, () => Promise.resolve(qn));
2374
- D.set(P.Deflate, () => Promise.resolve(dt));
2375
- D.set(P.DeflateOther, () => Promise.resolve(dt));
2376
- D.set(P.Lzw, () => import("./lzw-BY5a_5nb.js").then((e) => e.decode));
2377
- D.set(P.Zstd, () => import("./zstd-jXobGRcq.js").then((e) => e.decode));
2378
- D.set(P.Jpeg, () => Promise.resolve(Ce));
2379
- D.set(P.Jpeg6, () => Promise.resolve(Ce));
2380
- D.set(P.Webp, () => Promise.resolve(Ce));
2381
- D.set(P.Lerc, () => import("./lerc-Dx3uB2j-.js").then((e) => e.l).then((e) => e.decode));
2382
- async function je(e, t, n) {
2373
+ D.set(w.None, () => Promise.resolve(er));
2374
+ D.set(w.Deflate, () => Promise.resolve(gt));
2375
+ D.set(w.DeflateOther, () => Promise.resolve(gt));
2376
+ D.set(w.Lzw, () => import("./lzw-BY5a_5nb.js").then((e) => e.decode));
2377
+ D.set(w.Zstd, () => import("./zstd-jXobGRcq.js").then((e) => e.decode));
2378
+ D.set(w.Jpeg, () => Promise.resolve(je));
2379
+ D.set(w.Jpeg6, () => Promise.resolve(je));
2380
+ D.set(w.Webp, () => Promise.resolve(je));
2381
+ D.set(w.Lerc, () => import("./lerc-BkDclmAx.js").then((e) => e.l).then((e) => e.decode));
2382
+ async function xe(e, t, n) {
2383
2383
  const r = D.get(t);
2384
2384
  if (!r)
2385
2385
  throw new Error(`Unsupported compression: ${t}`);
2386
2386
  const i = await (await r())(e, n);
2387
2387
  if (i instanceof ArrayBuffer) {
2388
- const { predictor: s, width: a, height: l, bitsPerSample: c, samplesPerPixel: u, planarConfiguration: h } = n, p = Jn(i, s, a, l, c, u, h);
2388
+ const { predictor: s, width: a, height: l, bitsPerSample: c, samplesPerPixel: u, planarConfiguration: d } = n, p = $n(i, s, a, l, c, u, d);
2389
2389
  return {
2390
2390
  layout: "pixel-interleaved",
2391
- data: Tn(p, n)
2391
+ data: nr(p, n)
2392
2392
  };
2393
2393
  }
2394
2394
  return i;
2395
2395
  }
2396
- function Qn(e, t) {
2396
+ function tr(e, t) {
2397
2397
  const n = new Uint8Array(e), r = new Uint8Array(t);
2398
2398
  for (let o = 0; o < t; o++)
2399
2399
  r[o] = n[o >> 3] >> 7 - (o & 7) & 1 ? 255 : 0;
2400
2400
  return r;
2401
2401
  }
2402
- function Tn(e, t) {
2402
+ function nr(e, t) {
2403
2403
  const { sampleFormat: n, bitsPerSample: r } = t;
2404
2404
  switch (n) {
2405
- case F.Uint:
2405
+ case G.Uint:
2406
2406
  switch (r) {
2407
2407
  case 1:
2408
- return Qn(e, t.width * t.height * t.samplesPerPixel);
2408
+ return tr(e, t.width * t.height * t.samplesPerPixel);
2409
2409
  case 8:
2410
2410
  return new Uint8Array(e);
2411
2411
  case 16:
@@ -2414,7 +2414,7 @@ function Tn(e, t) {
2414
2414
  return new Uint32Array(e);
2415
2415
  }
2416
2416
  break;
2417
- case F.Int:
2417
+ case G.Int:
2418
2418
  switch (r) {
2419
2419
  case 8:
2420
2420
  return new Int8Array(e);
@@ -2424,7 +2424,7 @@ function Tn(e, t) {
2424
2424
  return new Int32Array(e);
2425
2425
  }
2426
2426
  break;
2427
- case F.Float:
2427
+ case G.Float:
2428
2428
  switch (r) {
2429
2429
  case 32:
2430
2430
  return new Float32Array(e);
@@ -2435,7 +2435,7 @@ function Tn(e, t) {
2435
2435
  }
2436
2436
  throw new Error(`Unsupported sample format/depth: SampleFormat=${n}, BitsPerSample=${r}`);
2437
2437
  }
2438
- class $n {
2438
+ class rr {
2439
2439
  name = "source:cache";
2440
2440
  maxSize;
2441
2441
  /** Number of bytes cached in cacheA, when this overflows maxSize cacheA is moved to cacheB and cacheB is dropped */
@@ -2458,7 +2458,7 @@ class $n {
2458
2458
  return o ? (o.hits++, o.promise) : (o = this.cacheB.get(r), o ? (o.hits++, o.saves++, this.size += o.size, this.cacheA.set(r, o), o.promise) : (o = { promise: n(t), hits: 0, saves: 0, size: t.length }, this.size += o.size, this.size > this.maxSize && (this.size = o.size, this.cacheB = this.cacheA, this.cacheA = /* @__PURE__ */ new Map(), this.resets++), this.cacheA.set(r, o), o.promise));
2459
2459
  }
2460
2460
  }
2461
- class B extends Error {
2461
+ class N extends Error {
2462
2462
  /** Status code for the error eg 403 - Forbidden vs 404 Not found */
2463
2463
  code;
2464
2464
  /** URL that the status code came from */
@@ -2474,10 +2474,10 @@ class B extends Error {
2474
2474
  }
2475
2475
  /** Check that a unknown is a FsError */
2476
2476
  static is(t) {
2477
- return t instanceof B ? !0 : typeof t != "object" || t == null ? !1 : "_sourceError" in t && t._sourceError === "SourceError";
2477
+ return t instanceof N ? !0 : typeof t != "object" || t == null ? !1 : "_sourceError" in t && t._sourceError === "SourceError";
2478
2478
  }
2479
2479
  }
2480
- const le = {
2480
+ const ce = {
2481
2481
  /** Convert a offset/length to a range request
2482
2482
  *
2483
2483
  * @example
@@ -2514,7 +2514,7 @@ const le = {
2514
2514
  return o;
2515
2515
  }
2516
2516
  };
2517
- class er {
2517
+ class or {
2518
2518
  source;
2519
2519
  middleware;
2520
2520
  static is(t) {
@@ -2555,14 +2555,14 @@ class er {
2555
2555
  return t({ source: this, offset: n, length: r, signal: o?.signal });
2556
2556
  }
2557
2557
  }
2558
- function tr(e) {
2558
+ function ir(e) {
2559
2559
  try {
2560
2560
  return new URL(e);
2561
2561
  } catch {
2562
2562
  return null;
2563
2563
  }
2564
2564
  }
2565
- class nr {
2565
+ class sr {
2566
2566
  name = "source:chunk";
2567
2567
  /** Number of bytes to chunk requests into */
2568
2568
  chunkSize;
@@ -2574,15 +2574,15 @@ class nr {
2574
2574
  return n(t);
2575
2575
  const r = Math.floor(t.offset / this.chunkSize), o = Math.ceil((t.offset + t.length) / this.chunkSize), i = t.source.metadata?.size;
2576
2576
  if (i != null && t.offset + t.length > i)
2577
- throw new B(`Request outside of bounds ${le.toRange(t.offset, t.length)}`, 416, t.source);
2577
+ throw new N(`Request outside of bounds ${ce.toRange(t.offset, t.length)}`, 416, t.source);
2578
2578
  const s = r * this.chunkSize, l = (i != null ? Math.min(o * this.chunkSize, i) : o * this.chunkSize) - s, c = t.offset - s;
2579
2579
  return o - r > 1 ? (await this.fetchChunks(t, r, o)).slice(c, c + t.length) : t.offset === s && t.length === l ? n(t) : (await n({ ...t, offset: s, length: l })).slice(c, c + t.length);
2580
2580
  }
2581
2581
  async fetchChunks(t, n, r) {
2582
2582
  const o = [], i = t.source.metadata?.size ?? r * this.chunkSize;
2583
2583
  for (let l = n; l < r; l++) {
2584
- const c = l * this.chunkSize, h = Math.min(c + this.chunkSize, i) - c;
2585
- o.push(t.source.fetch(l * this.chunkSize, h, t.signal ? { signal: t.signal } : void 0));
2584
+ const c = l * this.chunkSize, d = Math.min(c + this.chunkSize, i) - c;
2585
+ o.push(t.source.fetch(l * this.chunkSize, d, t.signal ? { signal: t.signal } : void 0));
2586
2586
  }
2587
2587
  const s = await Promise.all(o), a = new Uint8Array(o.length * this.chunkSize);
2588
2588
  for (let l = 0; l < s.length; l++)
@@ -2590,11 +2590,11 @@ class nr {
2590
2590
  return a.buffer;
2591
2591
  }
2592
2592
  }
2593
- function qe(e) {
2593
+ function Qe(e) {
2594
2594
  const t = {}, n = e.headers.get("content-length");
2595
2595
  n && (t.size = parseInt(n));
2596
2596
  const r = e.headers.get("content-range");
2597
- return r != null && (t.size = le.parseSize(r)), t.eTag = e.headers.get("etag") ?? void 0, t.contentType = e.headers.get("content-type") ?? void 0, t.contentDisposition = e.headers.get("content-disposition") ?? void 0, t.cacheControl = e.headers.get("cache-control") ?? void 0, t.contentEncoding = e.headers.get("content-encoding") ?? void 0, t;
2597
+ return r != null && (t.size = ce.parseSize(r)), t.eTag = e.headers.get("etag") ?? void 0, t.contentType = e.headers.get("content-type") ?? void 0, t.contentDisposition = e.headers.get("content-disposition") ?? void 0, t.cacheControl = e.headers.get("cache-control") ?? void 0, t.contentEncoding = e.headers.get("content-encoding") ?? void 0, t;
2598
2598
  }
2599
2599
  class Y {
2600
2600
  constructor(t, n) {
@@ -2612,33 +2612,33 @@ class Y {
2612
2612
  return this._head ? this._head : (this._head = Y.fetch(this.url, { method: "HEAD", headers: this.headers }).then((t) => {
2613
2613
  if (!t.ok)
2614
2614
  throw delete this._head, new Error(`Failed to HEAD ${this.url.href}`, { cause: { statusCode: t.status, msg: t.statusText } });
2615
- return this.metadata = qe(t), this.metadata;
2615
+ return this.metadata = Qe(t), this.metadata;
2616
2616
  }), this._head);
2617
2617
  }
2618
2618
  async fetch(t, n, r) {
2619
2619
  try {
2620
- const o = { range: le.toRange(t, n), ...this.headers }, i = await Y.fetch(this.url, { headers: o, signal: r?.signal });
2620
+ const o = { range: ce.toRange(t, n), ...this.headers }, i = await Y.fetch(this.url, { headers: o, signal: r?.signal });
2621
2621
  if (!i.ok)
2622
- throw new B(`Failed to fetch ${this.url.href} ${o.range}`, i.status, this, new Error(i.statusText));
2623
- const s = qe(i);
2622
+ throw new N(`Failed to fetch ${this.url.href} ${o.range}`, i.status, this, new Error(i.statusText));
2623
+ const s = Qe(i);
2624
2624
  if (this.metadata == null)
2625
2625
  this.metadata = s;
2626
2626
  else if (this.metadata.eTag && this.metadata.eTag !== s.eTag)
2627
- throw new B(`ETag conflict ${this.url.href} ${o.range} expected: ${this.metadata.eTag} got: ${s.eTag}`, 409, this);
2627
+ throw new N(`ETag conflict ${this.url.href} ${o.range} expected: ${this.metadata.eTag} got: ${s.eTag}`, 409, this);
2628
2628
  return i.arrayBuffer();
2629
2629
  } catch (o) {
2630
- throw B.is(o) && o.source === this ? o : new B(`Failed to fetch: ${this.url.href}`, 500, this, o);
2630
+ throw N.is(o) && o.source === this ? o : new N(`Failed to fetch: ${this.url.href}`, 500, this, o);
2631
2631
  }
2632
2632
  }
2633
2633
  }
2634
2634
  Y.fetch = (e, t) => fetch(e, t);
2635
- function rr(e) {
2635
+ function ar(e) {
2636
2636
  if (typeof e != "string")
2637
2637
  return e;
2638
- const t = tr(e);
2638
+ const t = ir(e);
2639
2639
  return t || new URL("memory://" + e);
2640
2640
  }
2641
- class xe {
2641
+ class Ae {
2642
2642
  url;
2643
2643
  type = "memory";
2644
2644
  data;
@@ -2647,53 +2647,53 @@ class xe {
2647
2647
  return t instanceof ArrayBuffer ? t : t.byteLength === t.buffer.byteLength ? t.buffer : t.buffer.slice(t.byteOffset, t.byteOffset + t.byteLength);
2648
2648
  }
2649
2649
  constructor(t, n) {
2650
- const r = xe.toArrayBuffer(n ?? new Uint8Array());
2651
- this.url = rr(t), this.data = r, this.metadata = { size: r.byteLength };
2650
+ const r = Ae.toArrayBuffer(n ?? new Uint8Array());
2651
+ this.url = ar(t), this.data = r, this.metadata = { size: r.byteLength };
2652
2652
  }
2653
2653
  head() {
2654
2654
  return Promise.resolve({ size: this.data.byteLength });
2655
2655
  }
2656
2656
  fetch(t, n) {
2657
2657
  if (t < 0 && (t = this.data.byteLength + t), t > this.data.byteLength)
2658
- throw new B(`Read offset outside of file bounds range:${le.toRange(t, n)} fileSize:${this.data.byteLength}`, 416, this);
2658
+ throw new N(`Read offset outside of file bounds range:${ce.toRange(t, n)} fileSize:${this.data.byteLength}`, 416, this);
2659
2659
  return Promise.resolve(this.data.slice(t, n == null ? void 0 : t + n));
2660
2660
  }
2661
2661
  }
2662
- const pt = "https://proj.org/schemas/v0.7/projjson.schema.json", or = 1, ir = 2, ee = 32767, Qe = 1, sr = 2, ar = 3, lr = 4, cr = 5, ur = 6, hr = 7, dr = 8, pr = 9, mr = 10, gr = 11, fr = 12, yr = 14, wr = 15, Pr = 16, br = 17, vr = 18, Sr = 21, Lr = 22, Cr = 24, jr = 26, xr = 27, mt = 9102, Or = 9101, Ar = 9105, Er = {
2663
- [mt]: "degree",
2664
- [Or]: "radian",
2665
- [Ar]: "grad"
2666
- }, gt = 9001, Ir = 9002, Mr = 9003, Rr = {
2662
+ const ft = "https://proj.org/schemas/v0.7/projjson.schema.json", lr = 1, cr = 2, te = 32767, $e = 1, ur = 2, dr = 3, hr = 4, pr = 5, mr = 6, gr = 7, fr = 8, yr = 9, Pr = 10, wr = 11, br = 12, Sr = 14, vr = 15, Lr = 16, Cr = 17, Ir = 18, jr = 21, xr = 22, Ar = 24, Or = 26, Rr = 27, yt = 9102, Mr = 9101, Er = 9105, Fr = {
2663
+ [yt]: "degree",
2664
+ [Mr]: "radian",
2665
+ [Er]: "grad"
2666
+ }, Pt = 9001, Gr = 9002, Dr = 9003, zr = {
2667
2667
  type: "LinearUnit",
2668
2668
  name: "US survey foot",
2669
2669
  conversion_factor: 0.30480060960121924
2670
- }, zr = {
2671
- [gt]: "metre",
2672
- [Ir]: "foot",
2673
- [Mr]: Rr
2670
+ }, Ur = {
2671
+ [Pt]: "metre",
2672
+ [Gr]: "foot",
2673
+ [Dr]: zr
2674
2674
  };
2675
- function Fr(e) {
2675
+ function Nr(e) {
2676
2676
  const t = e.modelType;
2677
- if (t === or)
2678
- return Nr(e);
2679
- if (t === ir)
2680
- return Dr(e);
2677
+ if (t === lr)
2678
+ return Kr(e);
2679
+ if (t === cr)
2680
+ return Br(e);
2681
2681
  throw new Error(`Unsupported GeoTIFF model type: ${t}`);
2682
2682
  }
2683
- function Dr(e) {
2683
+ function Br(e) {
2684
2684
  const t = e.geodeticCRS;
2685
- return t !== null && t !== ee ? t : ft(e, pt);
2685
+ return t !== null && t !== te ? t : wt(e, ft);
2686
2686
  }
2687
- function Nr(e) {
2687
+ function Kr(e) {
2688
2688
  const t = e.projectedCRS;
2689
- return t !== null && t !== ee ? t : Ur(e);
2689
+ return t !== null && t !== te ? t : Wr(e);
2690
2690
  }
2691
- function ft(e, t) {
2692
- const n = Br(e);
2691
+ function wt(e, t) {
2692
+ const n = _r(e);
2693
2693
  let r = "Greenwich", o = 0;
2694
- e.primeMeridian !== null && e.primeMeridian !== ee ? r = `EPSG:${e.primeMeridian}` : e.primeMeridianLongitude !== null && (o = e.primeMeridianLongitude, r = "User-defined");
2694
+ e.primeMeridian !== null && e.primeMeridian !== te ? r = `EPSG:${e.primeMeridian}` : e.primeMeridianLongitude !== null && (o = e.primeMeridianLongitude, r = "User-defined");
2695
2695
  let i;
2696
- e.geodeticDatum !== null && e.geodeticDatum !== ee ? i = {
2696
+ e.geodeticDatum !== null && e.geodeticDatum !== te ? i = {
2697
2697
  type: "GeodeticReferenceFrame",
2698
2698
  name: `Unknown datum based upon EPSG ${e.geodeticDatum} ellipsoid`
2699
2699
  } : i = {
@@ -2706,23 +2706,23 @@ function ft(e, t) {
2706
2706
  type: "GeographicCRS",
2707
2707
  name: e.geodeticCitation ?? "User-defined",
2708
2708
  datum: i,
2709
- coordinate_system: Kr(e)
2709
+ coordinate_system: Xr(e)
2710
2710
  };
2711
2711
  return t !== void 0 && (s.$schema = t), s;
2712
2712
  }
2713
- function Ur(e) {
2714
- const t = ft(e), n = Gr(e), r = _r(e);
2713
+ function Wr(e) {
2714
+ const t = wt(e), n = kr(e), r = Hr(e);
2715
2715
  return {
2716
2716
  type: "ProjectedCRS",
2717
- $schema: pt,
2717
+ $schema: ft,
2718
2718
  name: e.projectedCitation ?? e.citation ?? "User-defined",
2719
2719
  base_crs: t,
2720
2720
  conversion: n,
2721
2721
  coordinate_system: r
2722
2722
  };
2723
2723
  }
2724
- function Br(e) {
2725
- if (e.ellipsoid !== null && e.ellipsoid !== ee) {
2724
+ function _r(e) {
2725
+ if (e.ellipsoid !== null && e.ellipsoid !== te) {
2726
2726
  const n = {
2727
2727
  name: `EPSG ellipsoid ${e.ellipsoid}`
2728
2728
  };
@@ -2742,7 +2742,7 @@ function Br(e) {
2742
2742
  throw new Error("User-defined ellipsoid requires ellipsoidInvFlattening or ellipsoidSemiMinorAxis");
2743
2743
  return t;
2744
2744
  }
2745
- function Gr(e) {
2745
+ function kr(e) {
2746
2746
  const t = e.projMethod;
2747
2747
  if (t === null)
2748
2748
  throw new Error("User-defined projected CRS requires projMethod");
@@ -2760,10 +2760,10 @@ function Gr(e) {
2760
2760
  unit: "unity"
2761
2761
  });
2762
2762
  switch (t) {
2763
- case Qe:
2764
- case sr:
2765
- case xr: {
2766
- const i = t === Qe ? "Transverse Mercator" : "Transverse Mercator (South Orientated)";
2763
+ case $e:
2764
+ case ur:
2765
+ case Rr: {
2766
+ const i = t === $e ? "Transverse Mercator" : "Transverse Mercator (South Orientated)";
2767
2767
  return {
2768
2768
  name: i,
2769
2769
  method: { name: i },
@@ -2776,10 +2776,10 @@ function Gr(e) {
2776
2776
  ]
2777
2777
  };
2778
2778
  }
2779
- case ar:
2780
- case lr:
2781
- case cr:
2782
- case ur: {
2779
+ case dr:
2780
+ case hr:
2781
+ case pr:
2782
+ case mr: {
2783
2783
  const i = "Hotine Oblique Mercator (variant B)";
2784
2784
  return {
2785
2785
  name: i,
@@ -2795,7 +2795,7 @@ function Gr(e) {
2795
2795
  ]
2796
2796
  };
2797
2797
  }
2798
- case hr: {
2798
+ case gr: {
2799
2799
  const i = "Mercator (variant A)";
2800
2800
  return {
2801
2801
  name: i,
@@ -2809,7 +2809,7 @@ function Gr(e) {
2809
2809
  ]
2810
2810
  };
2811
2811
  }
2812
- case dr: {
2812
+ case fr: {
2813
2813
  const i = "Lambert Conic Conformal (2SP)";
2814
2814
  return {
2815
2815
  name: i,
@@ -2824,7 +2824,7 @@ function Gr(e) {
2824
2824
  ]
2825
2825
  };
2826
2826
  }
2827
- case pr: {
2827
+ case yr: {
2828
2828
  const i = "Lambert Conic Conformal (1SP)";
2829
2829
  return {
2830
2830
  name: i,
@@ -2838,7 +2838,7 @@ function Gr(e) {
2838
2838
  ]
2839
2839
  };
2840
2840
  }
2841
- case mr: {
2841
+ case Pr: {
2842
2842
  const i = "Lambert Azimuthal Equal Area";
2843
2843
  return {
2844
2844
  name: i,
@@ -2851,7 +2851,7 @@ function Gr(e) {
2851
2851
  ]
2852
2852
  };
2853
2853
  }
2854
- case gr: {
2854
+ case wr: {
2855
2855
  const i = "Albers Equal Area";
2856
2856
  return {
2857
2857
  name: i,
@@ -2866,7 +2866,7 @@ function Gr(e) {
2866
2866
  ]
2867
2867
  };
2868
2868
  }
2869
- case fr: {
2869
+ case br: {
2870
2870
  const i = "Modified Azimuthal Equidistant";
2871
2871
  return {
2872
2872
  name: i,
@@ -2879,7 +2879,7 @@ function Gr(e) {
2879
2879
  ]
2880
2880
  };
2881
2881
  }
2882
- case yr: {
2882
+ case Sr: {
2883
2883
  const i = "Stereographic";
2884
2884
  return {
2885
2885
  name: i,
@@ -2893,7 +2893,7 @@ function Gr(e) {
2893
2893
  ]
2894
2894
  };
2895
2895
  }
2896
- case wr: {
2896
+ case vr: {
2897
2897
  const i = "Polar Stereographic (variant B)";
2898
2898
  return {
2899
2899
  name: i,
@@ -2906,7 +2906,7 @@ function Gr(e) {
2906
2906
  ]
2907
2907
  };
2908
2908
  }
2909
- case Pr: {
2909
+ case Lr: {
2910
2910
  const i = "Oblique Stereographic";
2911
2911
  return {
2912
2912
  name: i,
@@ -2920,7 +2920,7 @@ function Gr(e) {
2920
2920
  ]
2921
2921
  };
2922
2922
  }
2923
- case br: {
2923
+ case Cr: {
2924
2924
  const i = "Equidistant Cylindrical";
2925
2925
  return {
2926
2926
  name: i,
@@ -2933,7 +2933,7 @@ function Gr(e) {
2933
2933
  ]
2934
2934
  };
2935
2935
  }
2936
- case vr: {
2936
+ case Ir: {
2937
2937
  const i = "Cassini-Soldner";
2938
2938
  return {
2939
2939
  name: i,
@@ -2946,7 +2946,7 @@ function Gr(e) {
2946
2946
  ]
2947
2947
  };
2948
2948
  }
2949
- case Lr: {
2949
+ case xr: {
2950
2950
  const i = "American Polyconic";
2951
2951
  return {
2952
2952
  name: i,
@@ -2959,7 +2959,7 @@ function Gr(e) {
2959
2959
  ]
2960
2960
  };
2961
2961
  }
2962
- case Cr: {
2962
+ case Ar: {
2963
2963
  const i = "Sinusoidal";
2964
2964
  return {
2965
2965
  name: i,
@@ -2971,7 +2971,7 @@ function Gr(e) {
2971
2971
  ]
2972
2972
  };
2973
2973
  }
2974
- case Sr: {
2974
+ case jr: {
2975
2975
  const i = "Orthographic";
2976
2976
  return {
2977
2977
  name: i,
@@ -2984,7 +2984,7 @@ function Gr(e) {
2984
2984
  ]
2985
2985
  };
2986
2986
  }
2987
- case jr: {
2987
+ case Or: {
2988
2988
  const i = "New Zealand Map Grid";
2989
2989
  return {
2990
2990
  name: i,
@@ -3001,8 +3001,8 @@ function Gr(e) {
3001
3001
  throw new Error(`Unsupported coordinate transformation type: ${t}`);
3002
3002
  }
3003
3003
  }
3004
- function Kr(e) {
3005
- const t = Er[e.angularUnits ?? mt] ?? "degree";
3004
+ function Xr(e) {
3005
+ const t = Fr[e.angularUnits ?? yt] ?? "degree";
3006
3006
  return {
3007
3007
  subtype: "ellipsoidal",
3008
3008
  axis: [
@@ -3021,8 +3021,8 @@ function Kr(e) {
3021
3021
  ]
3022
3022
  };
3023
3023
  }
3024
- function _r(e) {
3025
- const t = zr[e.projLinearUnits ?? gt] ?? "metre";
3024
+ function Hr(e) {
3025
+ const t = Ur[e.projLinearUnits ?? Pt] ?? "metre";
3026
3026
  return {
3027
3027
  subtype: "Cartesian",
3028
3028
  axis: [
@@ -3031,20 +3031,20 @@ function _r(e) {
3031
3031
  ]
3032
3032
  };
3033
3033
  }
3034
- const Xr = 1024 * 1024, Wr = 16 * 1024 * 1024, Te = 6;
3035
- async function Hr(e, t, n) {
3034
+ const Vr = 1024 * 1024, Jr = 16 * 1024 * 1024, et = 6;
3035
+ async function Yr(e, t, n) {
3036
3036
  if (t.length === 0)
3037
3037
  return [];
3038
- const r = n?.coalesce ?? Xr, o = n?.maxRangeSize ?? Wr, i = n?.signal, s = kr(t, r, o), a = await Vr(e, s, i), l = new Array(t.length);
3038
+ const r = n?.coalesce ?? Vr, o = n?.maxRangeSize ?? Jr, i = n?.signal, s = Zr(t, r, o), a = await qr(e, s, i), l = new Array(t.length);
3039
3039
  for (let c = 0; c < t.length; c++) {
3040
- const u = t[c], h = Zr(s, u.offset), p = s[h], d = a[h], g = u.offset - p.offset, f = g + u.length;
3041
- if (f > d.byteLength)
3042
- throw new Error(`Failed to fetch bytes from offset:${u.offset} wanted:${u.length} got:${d.byteLength - g}`);
3043
- l[c] = d.slice(g, f);
3040
+ const u = t[c], d = Tr(s, u.offset), p = s[d], h = a[d], g = u.offset - p.offset, f = g + u.length;
3041
+ if (f > h.byteLength)
3042
+ throw new Error(`Failed to fetch bytes from offset:${u.offset} wanted:${u.length} got:${h.byteLength - g}`);
3043
+ l[c] = h.slice(g, f);
3044
3044
  }
3045
3045
  return l;
3046
3046
  }
3047
- function kr(e, t, n) {
3047
+ function Zr(e, t, n) {
3048
3048
  const r = [...e].sort((s, a) => s.offset - a.offset), o = [];
3049
3049
  let i = null;
3050
3050
  for (const s of r) {
@@ -3052,12 +3052,12 @@ function kr(e, t, n) {
3052
3052
  i = { offset: s.offset, length: s.length };
3053
3053
  continue;
3054
3054
  }
3055
- const a = i.offset + i.length, l = s.offset + s.length, c = s.offset - a, u = Math.max(a, l), h = u - i.offset;
3056
- c <= t && h <= n ? i.length = u - i.offset : (o.push(i), i = { offset: s.offset, length: s.length });
3055
+ const a = i.offset + i.length, l = s.offset + s.length, c = s.offset - a, u = Math.max(a, l), d = u - i.offset;
3056
+ c <= t && d <= n ? i.length = u - i.offset : (o.push(i), i = { offset: s.offset, length: s.length });
3057
3057
  }
3058
3058
  return i != null && o.push(i), o;
3059
3059
  }
3060
- function Zr(e, t) {
3060
+ function Tr(e, t) {
3061
3061
  let n = 0, r = e.length - 1;
3062
3062
  for (; n < r; ) {
3063
3063
  const o = n + r + 1 >>> 1;
@@ -3065,37 +3065,37 @@ function Zr(e, t) {
3065
3065
  }
3066
3066
  return n;
3067
3067
  }
3068
- async function Vr(e, t, n) {
3068
+ async function qr(e, t, n) {
3069
3069
  const r = new Array(t.length);
3070
- for (let o = 0; o < t.length; o += Te) {
3071
- const i = t.slice(o, o + Te), s = await Promise.all(i.map((a) => e.fetch(a.offset, a.length, { signal: n })));
3070
+ for (let o = 0; o < t.length; o += et) {
3071
+ const i = t.slice(o, o + et), s = await Promise.all(i.map((a) => e.fetch(a.offset, a.length, { signal: n })));
3072
3072
  for (let a = 0; a < s.length; a++)
3073
3073
  r[o + a] = s[a];
3074
3074
  }
3075
3075
  return r;
3076
3076
  }
3077
- async function yt(e, t, n, { boundless: r = !0, pool: o, signal: i } = {}) {
3078
- const s = qr(e, t, n, { signal: i }), a = e.maskImage != null ? vt(e.maskImage, t, n, e.dataSource, {
3077
+ async function bt(e, t, n, { boundless: r = !0, pool: o, signal: i } = {}) {
3078
+ const s = eo(e, t, n, { signal: i }), a = e.maskImage != null ? Ct(e.maskImage, t, n, e.dataSource, {
3079
3079
  signal: i,
3080
3080
  debug: e._debug ? { label: "mask" } : void 0
3081
3081
  }) : Promise.resolve(null), [l, c] = await Promise.all([s, a]);
3082
- return wt(e, t, n, l, c, { boundless: r, pool: o });
3082
+ return St(e, t, n, l, c, { boundless: r, pool: o });
3083
3083
  }
3084
- async function wt(e, t, n, r, o, { boundless: i, pool: s }) {
3085
- const { bitsPerSample: a, predictor: l, planarConfiguration: c, sampleFormat: u, lercParameters: h } = e.cachedTags, { sampleFormat: p, bitsPerSample: d } = jt(u, a), g = ae(e.transform, Le(t * e.tileWidth, n * e.tileHeight)), f = e.image.value(m.SamplesPerPixel) ?? 1, y = {
3084
+ async function St(e, t, n, r, o, { boundless: i, pool: s }) {
3085
+ const { bitsPerSample: a, predictor: l, planarConfiguration: c, sampleFormat: u, lercParameters: d } = e.cachedTags, { sampleFormat: p, bitsPerSample: h } = At(u, a), g = le(e.transform, Ie(t * e.tileWidth, n * e.tileHeight)), f = e.image.value(m.SamplesPerPixel) ?? 1, y = {
3086
3086
  sampleFormat: p,
3087
- bitsPerSample: d,
3087
+ bitsPerSample: h,
3088
3088
  samplesPerPixel: f,
3089
3089
  width: e.tileWidth,
3090
3090
  height: e.tileHeight,
3091
3091
  predictor: l,
3092
3092
  planarConfiguration: c,
3093
- lercParameters: h
3094
- }, [j, b] = await Promise.all([
3095
- Jr(r, y, s),
3096
- o != null && e.maskImage != null ? Yr(o, e.maskImage, s) : Promise.resolve(null)
3097
- ]), S = {
3098
- ...j,
3093
+ lercParameters: d
3094
+ }, [I, b] = await Promise.all([
3095
+ $r(r, y, s),
3096
+ o != null && e.maskImage != null ? Qr(o, e.maskImage, s) : Promise.resolve(null)
3097
+ ]), v = {
3098
+ ...I,
3099
3099
  count: f,
3100
3100
  height: e.tileHeight,
3101
3101
  width: e.tileWidth,
@@ -3107,26 +3107,26 @@ async function wt(e, t, n, r, o, { boundless: i, pool: s }) {
3107
3107
  return {
3108
3108
  x: t,
3109
3109
  y: n,
3110
- array: i === !0 ? S : eo(e, t, n, S)
3110
+ array: i === !0 ? v : oo(e, t, n, v)
3111
3111
  };
3112
3112
  }
3113
- async function Pt(e, t, { boundless: n = !0, pool: r, signal: o } = {}) {
3113
+ async function vt(e, t, { boundless: n = !0, pool: r, signal: o } = {}) {
3114
3114
  if (t.length === 0)
3115
3115
  return [];
3116
- const i = Tr(e, t, { signal: o }), s = e.maskImage != null ? Ct(e.maskImage, t, e.dataSource, {
3116
+ const i = no(e, t, { signal: o }), s = e.maskImage != null ? xt(e.maskImage, t, e.dataSource, {
3117
3117
  signal: o,
3118
3118
  debug: e._debug ? { label: "mask" } : void 0
3119
3119
  }) : Promise.resolve(t.map(() => null)), [a, l] = await Promise.all([
3120
3120
  i,
3121
3121
  s
3122
3122
  ]);
3123
- return Promise.all(t.map(([c, u], h) => wt(e, c, u, a[h], l[h] ?? null, {
3123
+ return Promise.all(t.map(([c, u], d) => St(e, c, u, a[d], l[d] ?? null, {
3124
3124
  boundless: n,
3125
3125
  pool: r
3126
3126
  })));
3127
3127
  }
3128
- async function Yr(e, t, n) {
3129
- const r = t.value(m.SampleFormat) ?? [1], o = t.value(m.BitsPerSample) ?? [8], { sampleFormat: i, bitsPerSample: s } = jt(r, new Uint16Array(o)), { width: a, height: l } = t.tileSize, c = {
3128
+ async function Qr(e, t, n) {
3129
+ const r = t.value(m.SampleFormat) ?? [1], o = t.value(m.BitsPerSample) ?? [8], { sampleFormat: i, bitsPerSample: s } = At(r, new Uint16Array(o)), { width: a, height: l } = t.tileSize, c = {
3130
3130
  sampleFormat: i,
3131
3131
  bitsPerSample: s,
3132
3132
  samplesPerPixel: t.value(m.SamplesPerPixel) ?? 1,
@@ -3134,13 +3134,13 @@ async function Yr(e, t, n) {
3134
3134
  height: l,
3135
3135
  predictor: t.value(m.Predictor) ?? 1,
3136
3136
  planarConfiguration: t.value(m.PlanarConfiguration) ?? U.Contig
3137
- }, u = (f, y, j) => n ? n.decode(f, y, j) : je(f, y, j), { bytes: h, compression: p } = e, d = await u(h, p, c), g = d.layout === "pixel-interleaved" ? d.data : d.bands[0];
3137
+ }, u = (f, y, I) => n ? n.decode(f, y, I) : xe(f, y, I), { bytes: d, compression: p } = e, h = await u(d, p, c), g = h.layout === "pixel-interleaved" ? h.data : h.bands[0];
3138
3138
  if (g instanceof Uint8Array)
3139
3139
  return g;
3140
3140
  throw new Error("Expected mask data to decode to Uint8Array");
3141
3141
  }
3142
- async function Jr(e, t, n) {
3143
- const r = (o, i, s) => n ? n.decode(o, i, s) : je(o, i, s);
3142
+ async function $r(e, t, n) {
3143
+ const r = (o, i, s) => n ? n.decode(o, i, s) : xe(o, i, s);
3144
3144
  if (Array.isArray(e)) {
3145
3145
  const o = { ...t, samplesPerPixel: 1 };
3146
3146
  return { layout: "band-separate", bands: (await Promise.all(e.map(({ bytes: a, compression: l }) => r(a, l, o)))).map((a) => a.layout === "band-separate" ? a.bands[0] : a.data) };
@@ -3149,11 +3149,11 @@ async function Jr(e, t, n) {
3149
3149
  return r(o, i, t);
3150
3150
  }
3151
3151
  }
3152
- async function qr(e, t, n, { signal: r } = {}) {
3152
+ async function eo(e, t, n, { signal: r } = {}) {
3153
3153
  const o = e._debug ? { label: "data" } : void 0;
3154
3154
  switch (e.cachedTags.planarConfiguration) {
3155
3155
  case U.Contig: {
3156
- const i = await vt(e.image, t, n, e.dataSource, {
3156
+ const i = await Ct(e.image, t, n, e.dataSource, {
3157
3157
  signal: r,
3158
3158
  debug: o
3159
3159
  });
@@ -3162,32 +3162,32 @@ async function qr(e, t, n, { signal: r } = {}) {
3162
3162
  return i;
3163
3163
  }
3164
3164
  case U.Separate:
3165
- return await Qr(e, t, n, { signal: r });
3165
+ return await to(e, t, n, { signal: r });
3166
3166
  default:
3167
3167
  throw new Error(`Unsupported PlanarConfiguration: ${e.cachedTags.planarConfiguration}`);
3168
3168
  }
3169
3169
  }
3170
- async function bt(e, t, n) {
3170
+ async function Lt(e, t, n) {
3171
3171
  const { x: r, y: o } = e.image.tileCount, i = r * o, s = e.cachedTags.samplesPerPixel, a = [...Array(s).keys()].map((l) => {
3172
3172
  const c = l * i + n * r + t;
3173
3173
  return e.image.getTileSize(c);
3174
3174
  });
3175
3175
  return Promise.all(a);
3176
3176
  }
3177
- async function Qr(e, t, n, { signal: r } = {}) {
3178
- const o = e._debug ? { label: "data" } : void 0, s = (await bt(e, t, n)).map(async ({ offset: a, imageSize: l }) => {
3179
- const c = await St(e.image, a, l, e.dataSource, { signal: r, debug: o });
3177
+ async function to(e, t, n, { signal: r } = {}) {
3178
+ const o = e._debug ? { label: "data" } : void 0, s = (await Lt(e, t, n)).map(async ({ offset: a, imageSize: l }) => {
3179
+ const c = await It(e.image, a, l, e.dataSource, { signal: r, debug: o });
3180
3180
  if (c === null)
3181
3181
  throw new Error(`Tile at (${t}, ${n}) not found`);
3182
3182
  return c;
3183
3183
  });
3184
3184
  return Promise.all(s);
3185
3185
  }
3186
- async function Tr(e, t, { signal: n } = {}) {
3186
+ async function no(e, t, { signal: n } = {}) {
3187
3187
  const r = e._debug ? { label: "data" } : void 0;
3188
3188
  switch (e.cachedTags.planarConfiguration) {
3189
3189
  case U.Contig:
3190
- return (await Ct(e.image, t, e.dataSource, {
3190
+ return (await xt(e.image, t, e.dataSource, {
3191
3191
  signal: n,
3192
3192
  debug: r
3193
3193
  })).map((i, s) => {
@@ -3198,23 +3198,23 @@ async function Tr(e, t, { signal: n } = {}) {
3198
3198
  return i;
3199
3199
  });
3200
3200
  case U.Separate:
3201
- return $r(e, t, { signal: n });
3201
+ return ro(e, t, { signal: n });
3202
3202
  default:
3203
3203
  throw new Error(`Unsupported PlanarConfiguration: ${e.cachedTags.planarConfiguration}`);
3204
3204
  }
3205
3205
  }
3206
- async function $r(e, t, { signal: n } = {}) {
3207
- const r = e._debug ? { label: "data" } : void 0, o = e.cachedTags.samplesPerPixel, s = (await Promise.all(t.map(([l, c]) => bt(e, l, c)))).flatMap((l) => l.map(({ offset: c, imageSize: u }) => ({
3206
+ async function ro(e, t, { signal: n } = {}) {
3207
+ const r = e._debug ? { label: "data" } : void 0, o = e.cachedTags.samplesPerPixel, s = (await Promise.all(t.map(([l, c]) => Lt(e, l, c)))).flatMap((l) => l.map(({ offset: c, imageSize: u }) => ({
3208
3208
  offset: c,
3209
3209
  byteCount: u
3210
- }))), a = await Lt(e.image, s, e.dataSource, { signal: n, debug: r });
3211
- return t.map(([l, c], u) => a.slice(u * o, u * o + o).map((h) => {
3212
- if (h === null)
3210
+ }))), a = await jt(e.image, s, e.dataSource, { signal: n, debug: r });
3211
+ return t.map(([l, c], u) => a.slice(u * o, u * o + o).map((d) => {
3212
+ if (d === null)
3213
3213
  throw new Error(`Tile at (${l}, ${c}) not found`);
3214
- return h;
3214
+ return d;
3215
3215
  }));
3216
3216
  }
3217
- async function vt(e, t, n, r, o) {
3217
+ async function Ct(e, t, n, r, o) {
3218
3218
  const { size: i, tileSize: s } = e;
3219
3219
  if (s == null)
3220
3220
  throw new Error("Tiff is not tiled");
@@ -3224,23 +3224,23 @@ async function vt(e, t, n, r, o) {
3224
3224
  const c = n * l + t, u = l * a;
3225
3225
  if (c >= u)
3226
3226
  throw new Error(`Tile index is outside of tile range: ${c} >= ${u}`);
3227
- const { offset: h, imageSize: p } = await e.getTileSize(c);
3228
- return St(e, h, p, r, o);
3227
+ const { offset: d, imageSize: p } = await e.getTileSize(c);
3228
+ return It(e, d, p, r, o);
3229
3229
  }
3230
- async function St(e, t, n, r, o) {
3230
+ async function It(e, t, n, r, o) {
3231
3231
  if (n === 0)
3232
3232
  return null;
3233
3233
  o?.debug !== void 0 && console.log(`[geotiff dataSource] ${o.debug.label}: offset=${t} length=${n}`);
3234
3234
  const i = await r.fetch(t, n, o);
3235
3235
  if (i.byteLength < n)
3236
3236
  throw new Error(`Failed to fetch bytes from offset:${t} wanted:${n} got:${i.byteLength}`);
3237
- const s = e.value(m.Compression) ?? P.None;
3238
- return s === P.Jpeg ? {
3237
+ const s = e.value(m.Compression) ?? w.None;
3238
+ return s === w.Jpeg ? {
3239
3239
  bytes: e.getJpegHeader(i),
3240
3240
  compression: s
3241
3241
  } : { bytes: i, compression: s };
3242
3242
  }
3243
- async function Lt(e, t, n, r) {
3243
+ async function jt(e, t, n, r) {
3244
3244
  if (t.length === 0)
3245
3245
  return [];
3246
3246
  const o = new Array(t.length), i = [], s = [];
@@ -3253,49 +3253,49 @@ async function Lt(e, t, n, r) {
3253
3253
  if (r?.debug !== void 0)
3254
3254
  for (const c of i)
3255
3255
  console.log(`[geotiff dataSource] ${r.debug.label}: offset=${c.offset} length=${c.length}`);
3256
- const a = await Hr(n, i, {
3256
+ const a = await Yr(n, i, {
3257
3257
  coalesce: r?.coalesce,
3258
3258
  maxRangeSize: r?.maxRangeSize,
3259
3259
  signal: r?.signal
3260
- }), l = e.value(m.Compression) ?? P.None;
3260
+ }), l = e.value(m.Compression) ?? w.None;
3261
3261
  for (let c = 0; c < a.length; c++) {
3262
- const u = s[c], h = a[c], p = l === P.Jpeg ? e.getJpegHeader(h) : h;
3262
+ const u = s[c], d = a[c], p = l === w.Jpeg ? e.getJpegHeader(d) : d;
3263
3263
  o[u] = { bytes: p, compression: l };
3264
3264
  }
3265
3265
  return o;
3266
3266
  }
3267
- async function Ct(e, t, n, r) {
3267
+ async function xt(e, t, n, r) {
3268
3268
  if (t.length === 0)
3269
3269
  return [];
3270
3270
  const { size: o, tileSize: i } = e;
3271
3271
  if (i == null)
3272
3272
  throw new Error("Tiff is not tiled");
3273
- const s = Math.ceil(o.height / i.height), a = Math.ceil(o.width / i.width), l = a * s, c = t.map(([h, p]) => {
3274
- if (h >= a || p >= s)
3275
- throw new Error(`Tile index is outside of range x:${h} >= ${a} or y:${p} >= ${s}`);
3276
- const d = p * a + h;
3277
- if (d >= l)
3278
- throw new Error(`Tile index is outside of tile range: ${d} >= ${l}`);
3279
- return d;
3280
- }), u = await Promise.all(c.map((h) => e.getTileSize(h)));
3281
- return Lt(e, u.map((h) => ({ offset: h.offset, byteCount: h.imageSize })), n, r);
3273
+ const s = Math.ceil(o.height / i.height), a = Math.ceil(o.width / i.width), l = a * s, c = t.map(([d, p]) => {
3274
+ if (d >= a || p >= s)
3275
+ throw new Error(`Tile index is outside of range x:${d} >= ${a} or y:${p} >= ${s}`);
3276
+ const h = p * a + d;
3277
+ if (h >= l)
3278
+ throw new Error(`Tile index is outside of tile range: ${h} >= ${l}`);
3279
+ return h;
3280
+ }), u = await Promise.all(c.map((d) => e.getTileSize(d)));
3281
+ return jt(e, u.map((d) => ({ offset: d.offset, byteCount: d.imageSize })), n, r);
3282
3282
  }
3283
- function eo(e, t, n, r) {
3283
+ function oo(e, t, n, r) {
3284
3284
  const { width: o, height: i } = e.image.getTileBounds(t, n);
3285
3285
  if (o === e.tileWidth && i === e.tileHeight)
3286
3286
  return r;
3287
- const s = r.mask ? ue(r.mask, e.tileWidth, o, i, 1) : r.mask;
3287
+ const s = r.mask ? de(r.mask, e.tileWidth, o, i, 1) : r.mask;
3288
3288
  if (r.layout === "pixel-interleaved") {
3289
- const { count: c, data: u } = r, h = ue(u, e.tileWidth, o, i, c);
3289
+ const { count: c, data: u } = r, d = de(u, e.tileWidth, o, i, c);
3290
3290
  return {
3291
3291
  ...r,
3292
3292
  width: o,
3293
3293
  height: i,
3294
- data: h,
3294
+ data: d,
3295
3295
  mask: s
3296
3296
  };
3297
3297
  }
3298
- const { bands: a } = r, l = a.map((c) => ue(c, e.tileWidth, o, i, 1));
3298
+ const { bands: a } = r, l = a.map((c) => de(c, e.tileWidth, o, i, 1));
3299
3299
  return {
3300
3300
  ...r,
3301
3301
  width: o,
@@ -3304,13 +3304,13 @@ function eo(e, t, n, r) {
3304
3304
  mask: s
3305
3305
  };
3306
3306
  }
3307
- function ue(e, t, n, r, o) {
3307
+ function de(e, t, n, r, o) {
3308
3308
  const i = t * o, s = n * o, a = new e.constructor(s * r);
3309
3309
  for (let l = 0; l < r; l++)
3310
3310
  a.set(e.subarray(l * i, l * i + s), l * s);
3311
3311
  return a;
3312
3312
  }
3313
- function jt(e, t) {
3313
+ function At(e, t) {
3314
3314
  const n = new Set(e), r = new Set(t);
3315
3315
  if (n.size > 1)
3316
3316
  throw new Error("Multiple sample formats are not supported.");
@@ -3324,7 +3324,7 @@ function jt(e, t) {
3324
3324
  bitsPerSample: i
3325
3325
  };
3326
3326
  }
3327
- function to(e, { count: t }) {
3327
+ function io(e, { count: t }) {
3328
3328
  if (e == null)
3329
3329
  return null;
3330
3330
  const o = new DOMParser().parseFromString(e, "text/xml").documentElement;
@@ -3341,39 +3341,39 @@ function to(e, { count: t }) {
3341
3341
  }), i.get(u);
3342
3342
  };
3343
3343
  for (const c of Array.from(o.querySelectorAll("Item"))) {
3344
- const u = c.getAttribute("name"), h = c.getAttribute("sample"), p = c.textContent ?? "";
3345
- if (h !== null)
3344
+ const u = c.getAttribute("name"), d = c.getAttribute("sample"), p = c.textContent ?? "";
3345
+ if (d !== null)
3346
3346
  switch (u) {
3347
3347
  case "STATISTICS_MAXIMUM":
3348
- l(h).max = parseFloat(p);
3348
+ l(d).max = parseFloat(p);
3349
3349
  break;
3350
3350
  case "STATISTICS_MEAN":
3351
- l(h).mean = parseFloat(p);
3351
+ l(d).mean = parseFloat(p);
3352
3352
  break;
3353
3353
  case "STATISTICS_MINIMUM":
3354
- l(h).min = parseFloat(p);
3354
+ l(d).min = parseFloat(p);
3355
3355
  break;
3356
3356
  case "STATISTICS_STDDEV":
3357
- l(h).std = parseFloat(p);
3357
+ l(d).std = parseFloat(p);
3358
3358
  break;
3359
3359
  case "STATISTICS_VALID_PERCENT":
3360
- l(h).validPercent = parseFloat(p);
3360
+ l(d).validPercent = parseFloat(p);
3361
3361
  break;
3362
3362
  case "OFFSET":
3363
- s[parseInt(h, 10)] = parseFloat(p);
3363
+ s[parseInt(d, 10)] = parseFloat(p);
3364
3364
  break;
3365
3365
  case "SCALE":
3366
- a[parseInt(h, 10)] = parseFloat(p);
3366
+ a[parseInt(d, 10)] = parseFloat(p);
3367
3367
  break;
3368
3368
  }
3369
3369
  }
3370
3370
  return { bandStatistics: i, offsets: s, scales: a };
3371
3371
  }
3372
- async function no(e, t = {}) {
3372
+ async function so(e, t = {}) {
3373
3373
  const { signal: n } = t, r = e.value(m.Compression);
3374
3374
  if (r === null)
3375
3375
  throw new Error("Compression tag should always exist.");
3376
- const [o, i, s, a, l, c, u, h, p, d, g, f, y] = await Promise.all([
3376
+ const [o, i, s, a, l, c, u, d, p, h, g, f, y] = await Promise.all([
3377
3377
  e.fetch(m.BitsPerSample, { signal: n }),
3378
3378
  e.fetch(m.ColorMap, { signal: n }),
3379
3379
  e.fetch(m.GdalNoData, { signal: n }),
@@ -3387,10 +3387,10 @@ async function no(e, t = {}) {
3387
3387
  e.fetch(m.Predictor, { signal: n }),
3388
3388
  e.fetch(m.SampleFormat, { signal: n }),
3389
3389
  e.fetch(m.SamplesPerPixel, { signal: n })
3390
- ]), j = (b) => {
3390
+ ]), I = (b) => {
3391
3391
  throw new Error(`${b} tag should always exist.`);
3392
3392
  };
3393
- return o === null && j("BitsPerSample"), y === null && j("SamplesPerPixel"), p === null && j("Photometric"), {
3393
+ return o === null && I("BitsPerSample"), y === null && I("SamplesPerPixel"), p === null && I("Photometric"), {
3394
3394
  bitsPerSample: new Uint16Array(o),
3395
3395
  colorMap: i ? new Uint16Array(i) : void 0,
3396
3396
  compression: r,
@@ -3398,98 +3398,98 @@ async function no(e, t = {}) {
3398
3398
  lercParameters: l,
3399
3399
  modelTiepoint: u,
3400
3400
  modelPixelScale: c,
3401
- modelTransformation: h,
3401
+ modelTransformation: d,
3402
3402
  nodata: s !== null ? Number(s) : null,
3403
3403
  photometric: p,
3404
3404
  // PlanarConfiguration defaults to interleaved/chunky/contig
3405
3405
  // https://web.archive.org/web/20240329145253/https://www.awaresystems.be/imaging/tiff/tifftags/planarconfiguration.html
3406
- planarConfiguration: d ?? U.Contig,
3407
- predictor: g ?? V.None,
3406
+ planarConfiguration: h ?? U.Contig,
3407
+ predictor: g ?? J.None,
3408
3408
  // Uint is the default sample format according to the spec
3409
3409
  // https://web.archive.org/web/20240329145340/https://www.awaresystems.be/imaging/tiff/tifftags/sampleformat.html
3410
- sampleFormat: f ?? [F.Uint],
3410
+ sampleFormat: f ?? [G.Uint],
3411
3411
  samplesPerPixel: y
3412
3412
  };
3413
3413
  }
3414
- function ro(e) {
3414
+ function ao(e) {
3415
3415
  const t = (n) => e.valueGeo(n) ?? null;
3416
3416
  return {
3417
3417
  // Configuration keys
3418
- modelType: t(w.GTModelTypeGeoKey),
3419
- rasterType: t(w.GTRasterTypeGeoKey),
3420
- citation: t(w.GTCitationGeoKey),
3418
+ modelType: t(P.GTModelTypeGeoKey),
3419
+ rasterType: t(P.GTRasterTypeGeoKey),
3420
+ citation: t(P.GTCitationGeoKey),
3421
3421
  // Geographic CRS keys
3422
- geodeticCRS: t(w.GeodeticCRSGeoKey),
3423
- geodeticCitation: t(w.GeodeticCitationGeoKey),
3424
- geodeticDatum: t(w.GeodeticDatumGeoKey),
3425
- primeMeridian: t(w.PrimeMeridianGeoKey),
3426
- linearUnits: t(w.GeogLinearUnitsGeoKey),
3427
- linearUnitSize: t(w.GeogLinearUnitSizeGeoKey),
3428
- angularUnits: t(w.GeogAngularUnitsGeoKey),
3429
- angularUnitSize: t(w.GeogAngularUnitSizeGeoKey),
3430
- ellipsoid: t(w.EllipsoidGeoKey),
3431
- ellipsoidSemiMajorAxis: t(w.EllipsoidSemiMajorAxisGeoKey),
3432
- ellipsoidSemiMinorAxis: t(w.EllipsoidSemiMinorAxisGeoKey),
3433
- ellipsoidInvFlattening: t(w.EllipsoidInvFlatteningGeoKey),
3434
- azimuthUnits: t(w.GeogAzimuthUnitsGeoKey),
3435
- primeMeridianLongitude: t(w.PrimeMeridianLongitudeGeoKey),
3436
- toWGS84: t(w.GeogTOWGS84GeoKey),
3422
+ geodeticCRS: t(P.GeodeticCRSGeoKey),
3423
+ geodeticCitation: t(P.GeodeticCitationGeoKey),
3424
+ geodeticDatum: t(P.GeodeticDatumGeoKey),
3425
+ primeMeridian: t(P.PrimeMeridianGeoKey),
3426
+ linearUnits: t(P.GeogLinearUnitsGeoKey),
3427
+ linearUnitSize: t(P.GeogLinearUnitSizeGeoKey),
3428
+ angularUnits: t(P.GeogAngularUnitsGeoKey),
3429
+ angularUnitSize: t(P.GeogAngularUnitSizeGeoKey),
3430
+ ellipsoid: t(P.EllipsoidGeoKey),
3431
+ ellipsoidSemiMajorAxis: t(P.EllipsoidSemiMajorAxisGeoKey),
3432
+ ellipsoidSemiMinorAxis: t(P.EllipsoidSemiMinorAxisGeoKey),
3433
+ ellipsoidInvFlattening: t(P.EllipsoidInvFlatteningGeoKey),
3434
+ azimuthUnits: t(P.GeogAzimuthUnitsGeoKey),
3435
+ primeMeridianLongitude: t(P.PrimeMeridianLongitudeGeoKey),
3436
+ toWGS84: t(P.GeogTOWGS84GeoKey),
3437
3437
  // Projected CRS keys
3438
- projectedCRS: t(w.ProjectedCRSGeoKey),
3439
- projectedCitation: t(w.ProjectedCitationGeoKey),
3440
- projection: t(w.ProjectionGeoKey),
3441
- projMethod: t(w.ProjMethodGeoKey),
3442
- projLinearUnits: t(w.ProjLinearUnitsGeoKey),
3443
- projLinearUnitSize: t(w.ProjLinearUnitSizeGeoKey),
3444
- projStdParallel1: t(w.ProjStdParallel1GeoKey),
3445
- projStdParallel2: t(w.ProjStdParallel2GeoKey),
3446
- projNatOriginLong: t(w.ProjNatOriginLongGeoKey),
3447
- projNatOriginLat: t(w.ProjNatOriginLatGeoKey),
3448
- projFalseEasting: t(w.ProjFalseEastingGeoKey),
3449
- projFalseNorthing: t(w.ProjFalseNorthingGeoKey),
3450
- projFalseOriginLong: t(w.ProjFalseOriginLongGeoKey),
3451
- projFalseOriginLat: t(w.ProjFalseOriginLatGeoKey),
3452
- projFalseOriginEasting: t(w.ProjFalseOriginEastingGeoKey),
3453
- projFalseOriginNorthing: t(w.ProjFalseOriginNorthingGeoKey),
3454
- projCenterLong: t(w.ProjCenterLongGeoKey),
3455
- projCenterLat: t(w.ProjCenterLatGeoKey),
3456
- projCenterEasting: t(w.ProjCenterEastingGeoKey),
3457
- projCenterNorthing: t(w.ProjCenterNorthingGeoKey),
3458
- projScaleAtNatOrigin: t(w.ProjScaleAtNatOriginGeoKey),
3459
- projScaleAtCenter: t(w.ProjScaleAtCenterGeoKey),
3460
- projAzimuthAngle: t(w.ProjAzimuthAngleGeoKey),
3461
- projStraightVertPoleLong: t(w.ProjStraightVertPoleLongGeoKey),
3462
- projRectifiedGridAngle: t(w.ProjRectifiedGridAngleGeoKey),
3438
+ projectedCRS: t(P.ProjectedCRSGeoKey),
3439
+ projectedCitation: t(P.ProjectedCitationGeoKey),
3440
+ projection: t(P.ProjectionGeoKey),
3441
+ projMethod: t(P.ProjMethodGeoKey),
3442
+ projLinearUnits: t(P.ProjLinearUnitsGeoKey),
3443
+ projLinearUnitSize: t(P.ProjLinearUnitSizeGeoKey),
3444
+ projStdParallel1: t(P.ProjStdParallel1GeoKey),
3445
+ projStdParallel2: t(P.ProjStdParallel2GeoKey),
3446
+ projNatOriginLong: t(P.ProjNatOriginLongGeoKey),
3447
+ projNatOriginLat: t(P.ProjNatOriginLatGeoKey),
3448
+ projFalseEasting: t(P.ProjFalseEastingGeoKey),
3449
+ projFalseNorthing: t(P.ProjFalseNorthingGeoKey),
3450
+ projFalseOriginLong: t(P.ProjFalseOriginLongGeoKey),
3451
+ projFalseOriginLat: t(P.ProjFalseOriginLatGeoKey),
3452
+ projFalseOriginEasting: t(P.ProjFalseOriginEastingGeoKey),
3453
+ projFalseOriginNorthing: t(P.ProjFalseOriginNorthingGeoKey),
3454
+ projCenterLong: t(P.ProjCenterLongGeoKey),
3455
+ projCenterLat: t(P.ProjCenterLatGeoKey),
3456
+ projCenterEasting: t(P.ProjCenterEastingGeoKey),
3457
+ projCenterNorthing: t(P.ProjCenterNorthingGeoKey),
3458
+ projScaleAtNatOrigin: t(P.ProjScaleAtNatOriginGeoKey),
3459
+ projScaleAtCenter: t(P.ProjScaleAtCenterGeoKey),
3460
+ projAzimuthAngle: t(P.ProjAzimuthAngleGeoKey),
3461
+ projStraightVertPoleLong: t(P.ProjStraightVertPoleLongGeoKey),
3462
+ projRectifiedGridAngle: t(P.ProjRectifiedGridAngleGeoKey),
3463
3463
  // Vertical CRS keys
3464
- verticalCRS: t(w.VerticalGeoKey),
3465
- verticalCitation: t(w.VerticalCitationGeoKey),
3466
- verticalDatum: t(w.VerticalDatumGeoKey),
3467
- verticalUnits: t(w.VerticalUnitsGeoKey)
3464
+ verticalCRS: t(P.VerticalGeoKey),
3465
+ verticalCitation: t(P.VerticalCitationGeoKey),
3466
+ verticalDatum: t(P.VerticalDatumGeoKey),
3467
+ verticalUnits: t(P.VerticalUnitsGeoKey)
3468
3468
  };
3469
3469
  }
3470
- function oo({ modelTiepoint: e, modelPixelScale: t, modelTransformation: n, rasterType: r }) {
3470
+ function lo({ modelTiepoint: e, modelPixelScale: t, modelTransformation: n, rasterType: r }) {
3471
3471
  let o;
3472
3472
  if (e && t)
3473
- o = io(e, t);
3473
+ o = co(e, t);
3474
3474
  else if (n)
3475
- o = so(n);
3475
+ o = uo(n);
3476
3476
  else
3477
3477
  throw new Error("The image does not have an affine transformation.");
3478
- return r === we.PixelIsPoint && (o = ae(o, Le(-0.5, -0.5))), o;
3478
+ return r === we.PixelIsPoint && (o = le(o, Ie(-0.5, -0.5))), o;
3479
3479
  }
3480
- function io(e, t) {
3480
+ function co(e, t) {
3481
3481
  const n = e[3], r = e[4], o = t[0], i = -t[1];
3482
3482
  return [o, 0, n, 0, i, r];
3483
3483
  }
3484
- function so(e) {
3484
+ function uo(e) {
3485
3485
  const t = e[3], n = e[7], r = e[1], o = e[4], i = e[0], s = e[5];
3486
3486
  return [i, r, t, o, s, n];
3487
3487
  }
3488
- function xt(e, t, n, r = Math.floor) {
3489
- const o = de(e.transform), [i, s] = A(o, t, n);
3488
+ function Ot(e, t, n, r = Math.floor) {
3489
+ const o = pe(e.transform), [i, s] = A(o, t, n);
3490
3490
  return [r(s), r(i)];
3491
3491
  }
3492
- function Ot(e, t, n, r = "center") {
3492
+ function Rt(e, t, n, r = "center") {
3493
3493
  let o, i;
3494
3494
  switch (r) {
3495
3495
  case "center":
@@ -3510,7 +3510,7 @@ function Ot(e, t, n, r = "center") {
3510
3510
  }
3511
3511
  return A(e.transform, o, i);
3512
3512
  }
3513
- class ao {
3513
+ class ho {
3514
3514
  cachedTags;
3515
3515
  /** The data source used for fetching tile data. */
3516
3516
  dataSource;
@@ -3565,7 +3565,7 @@ class ao {
3565
3565
  */
3566
3566
  get transform() {
3567
3567
  const t = this.geotiff.transform, n = this.geotiff.width / this.width, r = this.geotiff.height / this.height;
3568
- return ae(t, tn(n, r));
3568
+ return le(t, sn(n, r));
3569
3569
  }
3570
3570
  /** Image width in pixels. */
3571
3571
  get width() {
@@ -3581,7 +3581,7 @@ class ao {
3581
3581
  * @param options.signal An optional {@link AbortSignal} to cancel the fetch request.
3582
3582
  */
3583
3583
  async fetchTile(t, n, r = {}) {
3584
- return await yt(this, t, n, r);
3584
+ return await bt(this, t, n, r);
3585
3585
  }
3586
3586
  /**
3587
3587
  * Fetch multiple tiles in parallel.
@@ -3596,7 +3596,7 @@ class ao {
3596
3596
  * @see {@link fetchTile} for single-tile fetching.
3597
3597
  */
3598
3598
  async fetchTiles(t, n = {}) {
3599
- return await Pt(this, t, n);
3599
+ return await vt(this, t, n);
3600
3600
  }
3601
3601
  // TiledMixin
3602
3602
  // Transform mixin
@@ -3610,7 +3610,7 @@ class ao {
3610
3610
  * @returns [row, col] pixel indices.
3611
3611
  */
3612
3612
  index(t, n, r = Math.floor) {
3613
- return xt(this, t, n, r);
3613
+ return Ot(this, t, n, r);
3614
3614
  }
3615
3615
  /**
3616
3616
  * Get the geographic (x, y) coordinate of the pixel at (row, col).
@@ -3621,10 +3621,10 @@ class ao {
3621
3621
  * @returns [x, y] in the CRS.
3622
3622
  */
3623
3623
  xy(t, n, r = "center") {
3624
- return Ot(this, t, n, r);
3624
+ return Rt(this, t, n, r);
3625
3625
  }
3626
3626
  }
3627
- class _ {
3627
+ class W {
3628
3628
  /**
3629
3629
  * Reduced-resolution overview levels, sorted finest-to-coarsest.
3630
3630
  *
@@ -3677,8 +3677,8 @@ class _ {
3677
3677
  * @param options.debug When true, the returned GeoTIFF logs each tile/mask data fetch to the console. Off by default.
3678
3678
  */
3679
3679
  static async open(t) {
3680
- const { dataSource: n, headerSource: r, signal: o, debug: i } = t, s = await new Z(r).init({ signal: o });
3681
- return s.options = void 0, _.fromTiff(s, n, { signal: o, debug: i });
3680
+ const { dataSource: n, headerSource: r, signal: o, debug: i } = t, s = await new V(r).init({ signal: o });
3681
+ return s.options = void 0, W.fromTiff(s, n, { signal: o, debug: i });
3682
3682
  }
3683
3683
  /**
3684
3684
  * Create a GeoTIFF from an already-initialised Tiff instance.
@@ -3695,23 +3695,23 @@ class _ {
3695
3695
  if (s.length === 0)
3696
3696
  throw new Error("TIFF does not contain any IFDs");
3697
3697
  await Promise.all(s.map((b) => b.init(!0, { signal: o })));
3698
- const a = s[0], l = ro(a), c = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
3698
+ const a = s[0], l = ao(a), c = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
3699
3699
  for (let b = 1; b < s.length; b++) {
3700
- const S = s[b], v = S.size, L = `${v.width},${v.height}`;
3701
- lo(S) ? u.set(L, S) : c.set(L, S);
3700
+ const v = s[b], S = v.size, L = `${S.width},${S.height}`;
3701
+ po(v) ? u.set(L, v) : c.set(L, v);
3702
3702
  }
3703
- const h = `${a.size.width},${a.size.height}`, p = u.get(h) ?? null, d = Array.from(c.entries());
3704
- d.sort((b, S) => {
3705
- const v = b[1].size, L = S[1].size;
3706
- return L.width * L.height - v.width * v.height;
3703
+ const d = `${a.size.width},${a.size.height}`, p = u.get(d) ?? null, h = Array.from(c.entries());
3704
+ h.sort((b, v) => {
3705
+ const S = b[1].size, L = v[1].size;
3706
+ return L.width * L.height - S.width * S.height;
3707
3707
  });
3708
- const g = await no(a, { signal: o }), f = to(g.gdalMetadata, {
3708
+ const g = await so(a, { signal: o }), f = io(g.gdalMetadata, {
3709
3709
  count: g.samplesPerPixel
3710
- }), y = new _(t, a, p, l, [], g, n, f, i), j = d.map(([b, S]) => {
3711
- const v = u.get(b) ?? null;
3712
- return new ao(y, l, S, v, g, n);
3710
+ }), y = new W(t, a, p, l, [], g, n, f, i), I = h.map(([b, v]) => {
3711
+ const S = u.get(b) ?? null;
3712
+ return new ho(y, l, v, S, g, n);
3713
3713
  });
3714
- return y.overviews = j, y;
3714
+ return y.overviews = I, y;
3715
3715
  }
3716
3716
  /**
3717
3717
  * Create a GeoTIFF from an ArrayBuffer containing the entire file.
@@ -3725,8 +3725,8 @@ class _ {
3725
3725
  * @returns A Promise that resolves to a GeoTIFF instance.
3726
3726
  */
3727
3727
  static async fromArrayBuffer(t) {
3728
- const n = new xe("memory://input.tif", t);
3729
- return await _.open({
3728
+ const n = new Ae("memory://input.tif", t);
3729
+ return await W.open({
3730
3730
  dataSource: n,
3731
3731
  headerSource: n
3732
3732
  });
@@ -3751,11 +3751,11 @@ class _ {
3751
3751
  static async fromUrl(t, { chunkSize: n = 64 * 1024, cacheSize: r = 8 * 1024 * 1024, signal: o, debug: i } = {}) {
3752
3752
  const s = new Y(t, {});
3753
3753
  s.metadata = { size: Number.POSITIVE_INFINITY };
3754
- const a = new er(s, [
3755
- new nr({ size: n }),
3756
- new $n({ size: r })
3754
+ const a = new or(s, [
3755
+ new sr({ size: n }),
3756
+ new rr({ size: r })
3757
3757
  ]);
3758
- return await _.open({
3758
+ return await W.open({
3759
3759
  // Tile data reads bypass the header cache (raw source).
3760
3760
  dataSource: s,
3761
3761
  headerSource: a,
@@ -3773,7 +3773,7 @@ class _ {
3773
3773
  * See also {@link GeoTIFF.epsg} for the EPSG code directly from the TIFF tags.
3774
3774
  */
3775
3775
  get crs() {
3776
- return this._crs === void 0 && (this._crs = Fr(this.gkd)), this._crs;
3776
+ return this._crs === void 0 && (this._crs = Nr(this.gkd)), this._crs;
3777
3777
  }
3778
3778
  /** Image width in pixels. */
3779
3779
  get width() {
@@ -3844,7 +3844,7 @@ class _ {
3844
3844
  */
3845
3845
  get transform() {
3846
3846
  const { modelPixelScale: t, modelTiepoint: n, modelTransformation: r } = this.cachedTags;
3847
- return oo({
3847
+ return lo({
3848
3848
  modelTiepoint: n,
3849
3849
  modelPixelScale: t,
3850
3850
  modelTransformation: r,
@@ -3862,7 +3862,7 @@ class _ {
3862
3862
  * @param options.signal An optional {@link AbortSignal} to cancel the fetch request.
3863
3863
  */
3864
3864
  async fetchTile(t, n, r = {}) {
3865
- return await yt(this, t, n, r);
3865
+ return await bt(this, t, n, r);
3866
3866
  }
3867
3867
  /**
3868
3868
  * Fetch multiple tiles in parallel.
@@ -3877,7 +3877,7 @@ class _ {
3877
3877
  * @see {@link fetchTile} for single-tile fetching.
3878
3878
  */
3879
3879
  async fetchTiles(t, n = {}) {
3880
- return await Pt(this, t, n);
3880
+ return await vt(this, t, n);
3881
3881
  }
3882
3882
  // Transform mixin
3883
3883
  /**
@@ -3890,7 +3890,7 @@ class _ {
3890
3890
  * @returns [row, col] pixel indices.
3891
3891
  */
3892
3892
  index(t, n, r = Math.floor) {
3893
- return xt(this, t, n, r);
3893
+ return Ot(this, t, n, r);
3894
3894
  }
3895
3895
  /**
3896
3896
  * Get the geographic (x, y) coordinate of the pixel at (row, col).
@@ -3901,14 +3901,14 @@ class _ {
3901
3901
  * @returns [x, y] in the CRS.
3902
3902
  */
3903
3903
  xy(t, n, r = "center") {
3904
- return Ot(this, t, n, r);
3904
+ return Rt(this, t, n, r);
3905
3905
  }
3906
3906
  }
3907
- function lo(e) {
3907
+ function po(e) {
3908
3908
  const t = e.value(m.SubFileType), n = e.value(m.Photometric);
3909
- return t !== null && (t & $.Mask) !== 0 && n === R.Mask;
3909
+ return t !== null && (t & ee.Mask) !== 0 && n === E.Mask;
3910
3910
  }
3911
- class co {
3911
+ let mo = class {
3912
3912
  worker;
3913
3913
  jobIdCounter = 0;
3914
3914
  jobs = /* @__PURE__ */ new Map();
@@ -3931,15 +3931,15 @@ class co {
3931
3931
  terminate() {
3932
3932
  this.worker.terminate();
3933
3933
  }
3934
- }
3935
- const uo = typeof navigator < "u" ? navigator.hardwareConcurrency ?? 2 : 2;
3936
- class ho {
3934
+ };
3935
+ const go = typeof navigator < "u" ? navigator.hardwareConcurrency ?? 2 : 2;
3936
+ class ve {
3937
3937
  workerWrappers;
3938
3938
  constructor(t = {}) {
3939
- const { size: n = uo, createWorker: r } = t;
3939
+ const { size: n = go, createWorker: r } = t;
3940
3940
  if (this.workerWrappers = [], r && n > 0)
3941
3941
  for (let o = 0; o < n; o++)
3942
- this.workerWrappers.push(new co(r()));
3942
+ this.workerWrappers.push(new mo(r()));
3943
3943
  }
3944
3944
  /** True when workers are available for off-main-thread decoding. */
3945
3945
  get hasWorkers() {
@@ -3957,7 +3957,7 @@ class ho {
3957
3957
  */
3958
3958
  async decode(t, n, r) {
3959
3959
  if (!this.hasWorkers)
3960
- return je(t, n, r);
3960
+ return xe(t, n, r);
3961
3961
  const o = this.leastLoaded(), i = {
3962
3962
  compression: n,
3963
3963
  metadata: r,
@@ -3978,17 +3978,17 @@ class ho {
3978
3978
  return t;
3979
3979
  }
3980
3980
  }
3981
- let oe = null;
3982
- function po() {
3983
- return oe !== null || (oe = new ho({
3981
+ let ie = null;
3982
+ function fo() {
3983
+ return ie !== null || (ie = new ve({
3984
3984
  createWorker: () => new Worker(new URL(
3985
3985
  /* @vite-ignore */
3986
- "/assets/worker-DtIrTJB7.js",
3986
+ "" + new URL("assets/worker-DtIrTJB7.js", import.meta.url).href,
3987
3987
  import.meta.url
3988
3988
  ), { type: "module" })
3989
- })), oe;
3989
+ })), ie;
3990
3990
  }
3991
- function mo(e) {
3991
+ function yo(e) {
3992
3992
  const { height: t, width: n } = e;
3993
3993
  if (e.layout === "band-separate")
3994
3994
  throw new Error("Band-separate images not yet implemented.");
@@ -4006,10 +4006,10 @@ function mo(e) {
4006
4006
  } else
4007
4007
  throw new Error(`Unexpected number of channels in raster data: ${e.data.length / (t * n)}`);
4008
4008
  }
4009
- async function go(e) {
4010
- return typeof e == "string" || e instanceof URL ? await _.fromUrl(e) : e instanceof ArrayBuffer ? await _.fromArrayBuffer(e) : e;
4009
+ async function Po(e) {
4010
+ return typeof e == "string" || e instanceof URL ? await W.fromUrl(e) : e instanceof ArrayBuffer ? await W.fromArrayBuffer(e) : e;
4011
4011
  }
4012
- function fo(e, t) {
4012
+ function wo(e, t) {
4013
4013
  const [n, r, o, i] = e.bbox, s = [
4014
4014
  t.forward([n, r]),
4015
4015
  // bottom-left
@@ -4019,20 +4019,20 @@ function fo(e, t) {
4019
4019
  // top-right
4020
4020
  t.forward([n, i])
4021
4021
  // top-left
4022
- ], a = s.map((d) => d[0]), l = s.map((d) => d[1]), c = Math.min(...a), u = Math.min(...l), h = Math.max(...a), p = Math.max(...l);
4023
- return { west: c, south: u, east: h, north: p };
4022
+ ], a = s.map((h) => h[0]), l = s.map((h) => h[1]), c = Math.min(...a), u = Math.min(...l), d = Math.max(...a), p = Math.max(...l);
4023
+ return { west: c, south: u, east: d, north: p };
4024
4024
  }
4025
- const yo = (
4025
+ const bo = (
4026
4026
  /* glsl */
4027
4027
  `
4028
4028
  vec3 black_zero_to_rgb(float value) {
4029
4029
  return vec3(value, value, value);
4030
4030
  }
4031
4031
  `
4032
- ), wo = {
4032
+ ), So = {
4033
4033
  name: "black-is-zero",
4034
4034
  inject: {
4035
- "fs:#decl": yo,
4035
+ "fs:#decl": bo,
4036
4036
  "fs:DECKGL_FILTER_COLOR": (
4037
4037
  /* glsl */
4038
4038
  `
@@ -4040,7 +4040,7 @@ const yo = (
4040
4040
  `
4041
4041
  )
4042
4042
  }
4043
- }, Po = (
4043
+ }, vo = (
4044
4044
  /* glsl */
4045
4045
  `
4046
4046
  const vec3 D65 = vec3(
@@ -4085,10 +4085,10 @@ const yo = (
4085
4085
  return clamp(rgb, 0.0, 1.0);
4086
4086
  }
4087
4087
  `
4088
- ), bo = {
4088
+ ), Lo = {
4089
4089
  name: "cielab-to-rgb",
4090
4090
  inject: {
4091
- "fs:#decl": Po,
4091
+ "fs:#decl": vo,
4092
4092
  "fs:DECKGL_FILTER_COLOR": (
4093
4093
  /* glsl */
4094
4094
  `
@@ -4096,7 +4096,7 @@ const yo = (
4096
4096
  `
4097
4097
  )
4098
4098
  }
4099
- }, vo = (
4099
+ }, Co = (
4100
4100
  /* glsl */
4101
4101
  `
4102
4102
  vec3 cmykToRgb(vec4 cmyk) {
@@ -4110,10 +4110,10 @@ const yo = (
4110
4110
  );
4111
4111
  }
4112
4112
  `
4113
- ), So = {
4113
+ ), Io = {
4114
4114
  name: "cmyk-to-rgb",
4115
4115
  inject: {
4116
- "fs:#decl": vo,
4116
+ "fs:#decl": Co,
4117
4117
  "fs:DECKGL_FILTER_COLOR": (
4118
4118
  /* glsl */
4119
4119
  `
@@ -4121,17 +4121,17 @@ const yo = (
4121
4121
  `
4122
4122
  )
4123
4123
  }
4124
- }, Lo = (
4124
+ }, jo = (
4125
4125
  /* glsl */
4126
4126
  `
4127
4127
  vec3 white_zero_to_rgb(float value) {
4128
4128
  return vec3(1.0 - value, 1.0 - value, 1.0 - value);
4129
4129
  }
4130
4130
  `
4131
- ), Co = {
4131
+ ), xo = {
4132
4132
  name: "white-is-zero",
4133
4133
  inject: {
4134
- "fs:#decl": Lo,
4134
+ "fs:#decl": jo,
4135
4135
  "fs:DECKGL_FILTER_COLOR": (
4136
4136
  /* glsl */
4137
4137
  `
@@ -4139,12 +4139,12 @@ const yo = (
4139
4139
  `
4140
4140
  )
4141
4141
  }
4142
- }, T = "colormap", At = {
4143
- name: T,
4144
- fs: `uniform ${T}Uniforms {
4142
+ }, Q = "colormap", Mt = {
4143
+ name: Q,
4144
+ fs: `uniform ${Q}Uniforms {
4145
4145
  int colormapIndex;
4146
4146
  float reversed;
4147
- } ${T};
4147
+ } ${Q};
4148
4148
  `,
4149
4149
  inject: {
4150
4150
  "fs:#decl": `precision highp sampler2DArray;
@@ -4153,10 +4153,10 @@ uniform sampler2DArray colormapTexture;
4153
4153
  "fs:DECKGL_FILTER_COLOR": (
4154
4154
  /* glsl */
4155
4155
  `
4156
- float idx = mix(color.r, 1.0 - color.r, ${T}.reversed);
4156
+ float idx = mix(color.r, 1.0 - color.r, ${Q}.reversed);
4157
4157
  color = texture(
4158
4158
  colormapTexture,
4159
- vec3(idx, 0.5, float(${T}.colormapIndex))
4159
+ vec3(idx, 0.5, float(${Q}.colormapIndex))
4160
4160
  );
4161
4161
  `
4162
4162
  )
@@ -4279,7 +4279,7 @@ uniform sampler2DArray colormapTexture;
4279
4279
  ylorbr: 105,
4280
4280
  ylorrd: 106
4281
4281
  };
4282
- function jo(e, t) {
4282
+ function Ao(e, t) {
4283
4283
  if (t.width !== 256)
4284
4284
  throw new Error(`Expected a 256-pixel-wide colormap sprite, got width ${t.width}.`);
4285
4285
  const n = new Uint8Array(t.data.buffer, t.data.byteOffset, t.data.byteLength);
@@ -4302,31 +4302,31 @@ function jo(e, t) {
4302
4302
  }
4303
4303
  });
4304
4304
  }
4305
- async function xo(e) {
4306
- const t = await Oo(e);
4305
+ async function Oo(e) {
4306
+ const t = await Ro(e);
4307
4307
  try {
4308
- return Ao(t);
4308
+ return Mo(t);
4309
4309
  } finally {
4310
4310
  t.close();
4311
4311
  }
4312
4312
  }
4313
- async function Oo(e) {
4313
+ async function Ro(e) {
4314
4314
  if (e instanceof ImageBitmap)
4315
4315
  return e;
4316
4316
  const t = new Blob([e]);
4317
4317
  return createImageBitmap(t);
4318
4318
  }
4319
- function Ao(e) {
4319
+ function Mo(e) {
4320
4320
  const n = new OffscreenCanvas(e.width, e.height).getContext("2d");
4321
4321
  if (!n)
4322
4322
  throw new Error("Failed to obtain 2D context for decoding the colormap sprite.");
4323
4323
  return n.drawImage(e, 0, 0), n.getImageData(0, 0, e.width, e.height);
4324
4324
  }
4325
- const ve = "nodata", Eo = `uniform ${ve}Uniforms {
4325
+ const Le = "nodata", Eo = `uniform ${Le}Uniforms {
4326
4326
  float value;
4327
- } ${ve};
4327
+ } ${Le};
4328
4328
  `, Et = {
4329
- name: ve,
4329
+ name: Le,
4330
4330
  fs: Eo,
4331
4331
  inject: {
4332
4332
  "fs:DECKGL_FILTER_COLOR": (
@@ -4344,18 +4344,18 @@ const ve = "nodata", Eo = `uniform ${ve}Uniforms {
4344
4344
  getUniforms: (e) => ({
4345
4345
  value: e.value
4346
4346
  })
4347
- }, H = "linearRescale", Io = {
4348
- name: H,
4349
- fs: `uniform ${H}Uniforms {
4347
+ }, X = "linearRescale", Fo = {
4348
+ name: X,
4349
+ fs: `uniform ${X}Uniforms {
4350
4350
  float rescaleMin;
4351
4351
  float rescaleMax;
4352
- } ${H};
4352
+ } ${X};
4353
4353
  `,
4354
4354
  inject: {
4355
4355
  "fs:DECKGL_FILTER_COLOR": (
4356
4356
  /* glsl */
4357
4357
  `
4358
- color.rgb = clamp((color.rgb - ${H}.rescaleMin) / (${H}.rescaleMax - ${H}.rescaleMin), 0.0, 1.0);
4358
+ color.rgb = clamp((color.rgb - ${X}.rescaleMin) / (${X}.rescaleMax - ${X}.rescaleMin), 0.0, 1.0);
4359
4359
  `
4360
4360
  )
4361
4361
  },
@@ -4367,7 +4367,7 @@ const ve = "nodata", Eo = `uniform ${ve}Uniforms {
4367
4367
  rescaleMin: e.rescaleMin ?? 0,
4368
4368
  rescaleMax: e.rescaleMax ?? 1
4369
4369
  })
4370
- }, Mo = {
4370
+ }, Go = {
4371
4371
  name: "mask-texture",
4372
4372
  inject: {
4373
4373
  "fs:#decl": "uniform sampler2D maskTexture;",
@@ -4385,8 +4385,8 @@ const ve = "nodata", Eo = `uniform ${ve}Uniforms {
4385
4385
  maskTexture: e.maskTexture
4386
4386
  })
4387
4387
  };
4388
- function Ro(e, t, n) {
4389
- const r = zo(e), o = Fo(t), i = Do(n), s = `${r}:${i}:${o}`, a = No[s];
4388
+ function Do(e, t, n) {
4389
+ const r = zo(e), o = Uo(t), i = No(n), s = `${r}:${i}:${o}`, a = Bo[s];
4390
4390
  if (!a)
4391
4391
  throw new Error(`Unsupported texture format for SamplesPerPixel=${e}, BitsPerSample=${t}, SampleFormat=${n}`);
4392
4392
  return a;
@@ -4396,7 +4396,7 @@ function zo(e) {
4396
4396
  return e;
4397
4397
  throw new Error(`Unsupported SamplesPerPixel ${e}. Only 1, 2, 3, or 4 are supported.`);
4398
4398
  }
4399
- function Fo(e) {
4399
+ function Uo(e) {
4400
4400
  const t = e[0];
4401
4401
  for (let n = 1; n < e.length; n++)
4402
4402
  if (e[n] !== t)
@@ -4405,23 +4405,23 @@ function Fo(e) {
4405
4405
  throw new Error(`Unsupported BitsPerSample ${t}. Only 8, 16, or 32 are supported.`);
4406
4406
  return t;
4407
4407
  }
4408
- function Do(e) {
4408
+ function No(e) {
4409
4409
  const t = e[0];
4410
4410
  for (let n = 1; n < e.length; n++)
4411
4411
  if (e[n] !== t)
4412
4412
  throw new Error(`Unsupported varying SampleFormat ${e}. All samples must have the same format.`);
4413
4413
  switch (t) {
4414
- case F.Uint:
4414
+ case G.Uint:
4415
4415
  return "unorm";
4416
- case F.Int:
4416
+ case G.Int:
4417
4417
  return "sint";
4418
- case F.Float:
4418
+ case G.Float:
4419
4419
  return "float";
4420
4420
  default:
4421
4421
  throw new Error(`Unsupported SampleFormat ${e}`);
4422
4422
  }
4423
4423
  }
4424
- const No = {
4424
+ const Bo = {
4425
4425
  // 1 byte per pixel
4426
4426
  "1:sint:8": "r8sint",
4427
4427
  "1:uint:8": "r8uint",
@@ -4468,120 +4468,120 @@ const No = {
4468
4468
  "4:sint:32": "rgba32sint",
4469
4469
  "4:uint:32": "rgba32uint"
4470
4470
  };
4471
- function Uo(e, t) {
4471
+ function Ko(e, t) {
4472
4472
  const { sampleFormat: n } = e.cachedTags;
4473
4473
  if (n === null)
4474
4474
  throw new Error("SampleFormat tag is required to infer render pipeline");
4475
4475
  switch (n[0]) {
4476
4476
  // Unsigned integers
4477
- case F.Uint:
4478
- return Bo(e, t);
4477
+ case G.Uint:
4478
+ return Wo(e, t);
4479
4479
  }
4480
4480
  throw new Error(`Inferring render pipeline for non-unsigned integers not yet supported. Found SampleFormat: ${n}`);
4481
4481
  }
4482
- function Bo(e, t) {
4482
+ function Wo(e, t) {
4483
4483
  const { bitsPerSample: n, colorMap: r, photometric: o, sampleFormat: i, samplesPerPixel: s, nodata: a } = e.cachedTags, l = [
4484
4484
  {
4485
- module: Se,
4485
+ module: Ce,
4486
4486
  props: {
4487
- textureName: (d) => d.texture
4487
+ textureName: (h) => h.texture
4488
4488
  }
4489
4489
  }
4490
4490
  ];
4491
4491
  if (a !== null) {
4492
- const d = 2 ** n[0] - 1, g = a / d;
4492
+ const h = 2 ** n[0] - 1, g = a / h;
4493
4493
  l.push({
4494
4494
  module: Et,
4495
4495
  props: { value: g }
4496
4496
  });
4497
4497
  }
4498
4498
  e.maskImage !== null && l.push({
4499
- module: Mo,
4499
+ module: Go,
4500
4500
  props: {
4501
4501
  // TODO: how to handle if mask failed to load and is undefined here
4502
- maskTexture: (d) => d.mask
4502
+ maskTexture: (h) => h.mask
4503
4503
  }
4504
4504
  });
4505
- const c = Go({
4505
+ const c = _o({
4506
4506
  count: s,
4507
4507
  photometric: o,
4508
4508
  device: t,
4509
4509
  colorMap: r
4510
4510
  });
4511
4511
  c && l.push(c);
4512
- const u = o === R.Palette ? {
4512
+ const u = o === E.Palette ? {
4513
4513
  magFilter: "nearest",
4514
4514
  minFilter: "nearest"
4515
4515
  } : {
4516
4516
  magFilter: "linear",
4517
4517
  minFilter: "linear"
4518
4518
  };
4519
- return { getTileData: async (d, g) => {
4520
- const { device: f, x: y, y: j, signal: b, pool: S } = g, v = await d.fetchTile(y, j, {
4519
+ return { getTileData: async (h, g) => {
4520
+ const { device: f, x: y, y: I, signal: b, pool: v } = g, S = await h.fetchTile(y, I, {
4521
4521
  boundless: !1,
4522
- pool: S,
4522
+ pool: v,
4523
4523
  signal: b
4524
4524
  });
4525
- let { array: L } = v;
4526
- const { width: E, height: M, mask: z } = L;
4527
- let I = s;
4528
- if (s === 3 && (L = mo(L), I = 4), L.layout === "band-separate")
4525
+ let { array: L } = S;
4526
+ const { width: O, height: M, mask: F } = L;
4527
+ let R = s;
4528
+ if (s === 3 && (L = yo(L), R = 4), L.layout === "band-separate")
4529
4529
  throw new Error("Band-separate images not yet implemented.");
4530
- const J = Ro(
4530
+ const Z = Do(
4531
4531
  // Add one sample for added alpha channel
4532
- I,
4532
+ R,
4533
4533
  n,
4534
4534
  i
4535
4535
  );
4536
- let q = L.data.byteLength;
4537
- const te = f.createTexture({
4536
+ let T = L.data.byteLength;
4537
+ const ne = f.createTexture({
4538
4538
  data: L.data,
4539
- format: J,
4540
- width: E,
4539
+ format: Z,
4540
+ width: O,
4541
4541
  height: M,
4542
4542
  sampler: u
4543
4543
  });
4544
- let ne;
4545
- return z !== null && (ne = f.createTexture({
4546
- data: z,
4544
+ let re;
4545
+ return F !== null && (re = f.createTexture({
4546
+ data: F,
4547
4547
  // Single-channel 8-bit texture for the mask
4548
4548
  format: "r8unorm",
4549
- width: E,
4549
+ width: O,
4550
4550
  height: M,
4551
4551
  // Use nearest filtering for the mask to avoid interpolated edges/halos
4552
4552
  sampler: {
4553
4553
  minFilter: "nearest",
4554
4554
  magFilter: "nearest"
4555
4555
  }
4556
- }), q += z.byteLength), {
4557
- texture: te,
4558
- mask: ne,
4559
- byteLength: q,
4556
+ }), T += F.byteLength), {
4557
+ texture: ne,
4558
+ mask: re,
4559
+ byteLength: T,
4560
4560
  height: L.height,
4561
4561
  width: L.width
4562
4562
  };
4563
- }, renderTile: (d) => ({
4564
- renderPipeline: l.map((g, f) => Ko(g, d))
4563
+ }, renderTile: (h) => ({
4564
+ renderPipeline: l.map((g, f) => ko(g, h))
4565
4565
  }) };
4566
4566
  }
4567
- function Go({ count: e, colorMap: t, device: n, photometric: r }) {
4567
+ function _o({ count: e, colorMap: t, device: n, photometric: r }) {
4568
4568
  if (e === 3 || e === 4)
4569
4569
  return null;
4570
4570
  switch (r) {
4571
- case R.MinIsWhite:
4571
+ case E.MinIsWhite:
4572
4572
  return {
4573
- module: Co
4573
+ module: xo
4574
4574
  };
4575
- case R.MinIsBlack:
4575
+ case E.MinIsBlack:
4576
4576
  return {
4577
- module: wo
4577
+ module: So
4578
4578
  };
4579
- case R.Rgb:
4579
+ case E.Rgb:
4580
4580
  return null;
4581
- case R.Palette: {
4581
+ case E.Palette: {
4582
4582
  if (!t)
4583
4583
  throw new Error("ColorMap is required for PhotometricInterpretation Palette");
4584
- const { data: o, width: i, height: s } = En(t), a = n.createTexture({
4584
+ const { data: o, width: i, height: s } = Fn(t), a = n.createTexture({
4585
4585
  dimension: "2d-array",
4586
4586
  data: o,
4587
4587
  format: "rgba8unorm",
@@ -4598,28 +4598,28 @@ function Go({ count: e, colorMap: t, device: n, photometric: r }) {
4598
4598
  }
4599
4599
  });
4600
4600
  return {
4601
- module: At,
4601
+ module: Mt,
4602
4602
  props: {
4603
4603
  colormapTexture: a
4604
4604
  }
4605
4605
  };
4606
4606
  }
4607
4607
  // Not sure why cogeotiff calls this "Separated", but it means CMYK
4608
- case R.Separated:
4608
+ case E.Separated:
4609
4609
  return {
4610
- module: So
4610
+ module: Io
4611
4611
  };
4612
- case R.Ycbcr:
4612
+ case E.Ycbcr:
4613
4613
  return null;
4614
- case R.Cielab:
4614
+ case E.Cielab:
4615
4615
  return {
4616
- module: bo
4616
+ module: Lo
4617
4617
  };
4618
4618
  default:
4619
4619
  throw new Error(`Unsupported PhotometricInterpretation ${r}`);
4620
4620
  }
4621
4621
  }
4622
- function Ko(e, t) {
4622
+ function ko(e, t) {
4623
4623
  const { module: n, props: r } = e;
4624
4624
  if (!r)
4625
4625
  return { module: n };
@@ -4630,11 +4630,11 @@ function Ko(e, t) {
4630
4630
  }
4631
4631
  return { module: n, props: o };
4632
4632
  }
4633
- function _o(e, t) {
4633
+ function Xo(e, t) {
4634
4634
  const r = [
4635
4635
  ...[...e.overviews].reverse(),
4636
4636
  e
4637
- ].map((o) => new on({
4637
+ ].map((o) => new cn({
4638
4638
  affine: o.transform,
4639
4639
  arrayWidth: o.width,
4640
4640
  arrayHeight: o.height,
@@ -4642,7 +4642,7 @@ function _o(e, t) {
4642
4642
  tileHeight: o.tileHeight,
4643
4643
  mpu: t.mpu
4644
4644
  }));
4645
- return new en({
4645
+ return new on({
4646
4646
  levels: r,
4647
4647
  projectTo3857: t.projectTo3857,
4648
4648
  projectFrom3857: t.projectFrom3857,
@@ -4650,7 +4650,7 @@ function _o(e, t) {
4650
4650
  projectFrom4326: t.projectFrom4326
4651
4651
  });
4652
4652
  }
4653
- class Xo extends Be {
4653
+ class Ho extends Ke {
4654
4654
  static layerName = "COGLayer";
4655
4655
  // COGLayer's getTileData signature differs from the base class's, so
4656
4656
  // `DefaultProps<COGLayerProps>` is not assignable to
@@ -4658,8 +4658,8 @@ class Xo extends Be {
4658
4658
  // to keep inheritance happy. The only COG-specific default is
4659
4659
  // `epsgResolver`; all behavior still flows from the base class.
4660
4660
  static defaultProps = {
4661
- ...Be.defaultProps,
4662
- epsgResolver: an
4661
+ ...Ke.defaultProps,
4662
+ epsgResolver: dn
4663
4663
  };
4664
4664
  initializeState() {
4665
4665
  this.setState({});
@@ -4678,30 +4678,30 @@ class Xo extends Be {
4678
4678
  });
4679
4679
  }
4680
4680
  async _parseGeoTIFF() {
4681
- const t = await go(this.props.geotiff), n = t.crs, r = typeof n == "number" ? await this.props.epsgResolver(n) : ot(n), o = Ae(r, "EPSG:4326"), i = (f, y) => o.forward([f, y], !1), s = (f, y) => o.inverse([f, y], !1), a = Ae(r, "EPSG:3857"), l = un((f, y) => a.forward([f, y], !1), i), c = (f, y) => a.inverse([f, y], !1), u = r.units;
4681
+ const t = await Po(this.props.geotiff), n = t.crs, r = typeof n == "number" ? await this.props.epsgResolver(n) : at(n), o = Re(r, "EPSG:4326"), i = (f, y) => o.forward([f, y], !1), s = (f, y) => o.inverse([f, y], !1), a = Re(r, "EPSG:3857"), l = mn((f, y) => a.forward([f, y], !1), i), c = (f, y) => a.inverse([f, y], !1), u = r.units;
4682
4682
  if (!u)
4683
4683
  throw new Error("Source projection is missing 'units' property, cannot compute meters per unit");
4684
- const h = sn(u, {
4684
+ const d = un(u, {
4685
4685
  semiMajorAxis: r.datum?.a ?? r.a
4686
- }), p = _o(t, {
4686
+ }), p = Xo(t, {
4687
4687
  projectTo4326: i,
4688
4688
  projectFrom4326: s,
4689
4689
  projectTo3857: l,
4690
4690
  projectFrom3857: c,
4691
- mpu: h
4691
+ mpu: d
4692
4692
  });
4693
4693
  if (this.props.onGeoTIFFLoad) {
4694
- const f = fo(t, o);
4694
+ const f = wo(t, o);
4695
4695
  this.props.onGeoTIFFLoad(t, {
4696
4696
  projection: r,
4697
4697
  geographicBounds: f
4698
4698
  });
4699
4699
  }
4700
- let d, g;
4701
- (!this.props.getTileData || !this.props.renderTile) && ({ getTileData: d, renderTile: g } = Uo(t, this.context.device)), this.setState({
4700
+ let h, g;
4701
+ (!this.props.getTileData || !this.props.renderTile) && ({ getTileData: h, renderTile: g } = Ko(t, this.context.device)), this.setState({
4702
4702
  geotiff: t,
4703
4703
  tilesetDescriptor: p,
4704
- defaultGetTileData: d,
4704
+ defaultGetTileData: h,
4705
4705
  defaultRenderTile: g
4706
4706
  });
4707
4707
  }
@@ -4724,7 +4724,7 @@ class Xo extends Be {
4724
4724
  x: s,
4725
4725
  y: a,
4726
4726
  signal: i.signal,
4727
- pool: this.props.pool ?? po()
4727
+ pool: this.props.pool ?? fo()
4728
4728
  });
4729
4729
  } : void 0;
4730
4730
  }
@@ -4734,25 +4734,352 @@ class Xo extends Be {
4734
4734
  return t;
4735
4735
  }
4736
4736
  }
4737
- const Wo = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAABrCAYAAACYNlxLAABBh0lEQVR4nO19C7BuV1nYt/f/n3NvbhJykyBJIBAIguQBN5eIoEajqGAsZbBpJyO2jkzBR9U6SsWWkQZaio6MMlLBMiOWWhTHtLRNpUJFAxl5DZibEAiEgMGQ0BgeyQ25j3POv/fX+V5rfWvttfe/97nncRPyn1nne6+19/7/vfd6fOv7qms/di3CLn6uvOef7GbzcOVZ1+9q+/WVZ+9q+9/5C+fsavvvfeuhXW3/0I/93q62/65TX7Kr7VcAgDX9EHex0EHMdpGua4CqBpjVgpfKI1VO/K7BzOHVgKwkn2o/tY0ttq/8r8Lw5NeRyUuyh699ddvaIUREQGyBYKuwSyMgtNA6GUGhnT44/SBXHqT1JW2xzLcr7UXdIb38WNLj8HWZDteU1RFkSTslub8WUldar9Bc6AkbcM8nPUjoFgEatfH2gU/6qie8lA5FbeSYIp+6egHXYjomQ1foX8RFx5SNJ0V4ldHgaQz8Li2dz5Sfyc0Oorxbl/LsIDMdX1c4kcwWvJ47zxQOyRRmxxAvaNq2l0u1KS/wkzYdz9WJvXapvtejPz7fw1/9KtKNYAoBbyMP9EaBVqHTK/EY8q/JZFEn6kco7RV4hXrCMbl6kuMh3fBLXlZfptP6erI6tc3ONcmOP7Ub22aPvM+uc5x9543jeOEYsEN7/dyef1zelg9JHxCJjvDLuLu3MtpOMdwboVSJPOG5+6M1XuALLQ/l9PnV0uPDHoT+2eZps6VS6cM90eHbyvFxCW762K9jLx+nn8rMXmX20rE/fUmEttTGOPQQRO4d7GYB10vZDbqP980kn6r3qD08Eq5fdc75z8eqmkFVz4BhwOcpj/lzhuBw0qNxFUPlg+EqY7qeAyof6wjbmuAM2moGDcFZDYu6gsbKDKCtK2hrmqxAQKpOh25VjWEoN1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LBgzl+WJhOVmGpR7exySu8xpXKccUcyb5nAd16S4X8qINjBo72wK9jZ+ktU/cwuOOgmu9ZpLbXRH9stHOS+26d2I8/pi2K+Y7y6EA8vxgvvxputxxxhcmDuyNCNvyc26215Xbtfb+LL07JarAm1F7oCcl9KFOjJeWofX83kHs6W9RFfnCJbI429qQB6eyc7/GkvQ4e2AzMOkvuG65wAPJTcu/4z0BjA63lzuJg43lptmwDLtbsvkIZLewAPnGc5JYswtux5Rd1ydPBGT+MbH4JJpYEooBKZ0dCL3wSp9csdu3amvvqctNl9XFuP2jbRz7XtZ/FG6XKZJiZNj8uPPbfyNkdbVvXHSnKp2Y2fBDKWH5g/Qvjzb4FLgBZtQX5QH/c5GB2AZLR3OOjdPioe6453di1dL6kpv0FI8Sxdg1eJgelkm97JU1/bblNugA5gDnMbd4Sp7c4e3vM4Md2nr0pdo32vIaV+/OvB4PRzAl8rdL2wZbm2GTMKlIrPSUv/UorajSnZ3+DupxO/VLd2p2V2d2QanHdXBDLe3plyuFBeZ6mR4Xqe1VazT1V1+q+Zv/Imygbrb8jMmuU+z50n2zLJgqOlDdXR9dOdRvk53l/BcOOkQP3uBhXYDLz7QkzZgwNbVMQf4f90bLLlJem6ccAMWeEvtsxtw9AOgYDPFvu9h4V9b/sYpvrbG6GQ344CN3SzxLUK4Tt0zJD4nuC934/r4nTdNmS8ej/HXYdtHPS/rTmxSVtZJts/ajRx+ji4NuMLwLDZex051SjzXlv8ptOFri73GUgRi63lFfvoA6LUPEY679hxB2eXqy4v9JMaWKfqk+/8BV++WvQyT7iEAAAAASUVORK5CYII=", $e = /* @__PURE__ */ new WeakMap();
4738
- function Ho(e) {
4739
- const t = $e.get(e);
4737
+ const Ft = `var j;
4738
+ (function(e) {
4739
+ e[e.Big = 19789] = "Big", e[e.Little = 18761] = "Little";
4740
+ })(j || (j = {}));
4741
+ var F;
4742
+ (function(e) {
4743
+ e[e.ReducedImage = 1] = "ReducedImage", e[e.Page = 2] = "Page", e[e.Mask = 4] = "Mask";
4744
+ })(F || (F = {}));
4745
+ var m;
4746
+ (function(e) {
4747
+ e[e.TopLeft = 1] = "TopLeft", e[e.TopRight = 2] = "TopRight", e[e.BottomRight = 3] = "BottomRight", e[e.BottomLeft = 4] = "BottomLeft", e[e.LeftTop = 5] = "LeftTop", e[e.RightTOP = 6] = "RightTOP", e[e.RightBottom = 7] = "RightBottom", e[e.LeftBottom = 8] = "LeftBottom";
4748
+ })(m || (m = {}));
4749
+ var A;
4750
+ (function(e) {
4751
+ e[e.PixelIsArea = 1] = "PixelIsArea", e[e.PixelIsPoint = 2] = "PixelIsPoint";
4752
+ })(A || (A = {}));
4753
+ var G;
4754
+ (function(e) {
4755
+ e[e.Unknown = 0] = "Unknown", e[e.Projected = 1] = "Projected", e[e.Geographic = 2] = "Geographic", e[e.Geocentric = 3] = "Geocentric", e[e.UserDefined = 32767] = "UserDefined";
4756
+ })(G || (G = {}));
4757
+ var C;
4758
+ (function(e) {
4759
+ e[e.Image = 1] = "Image", e[e.ReducedImage = 2] = "ReducedImage", e[e.Page = 3] = "Page";
4760
+ })(C || (C = {}));
4761
+ var t;
4762
+ (function(e) {
4763
+ e[e.None = 1] = "None", e[e.Ccittrle = 2] = "Ccittrle", e[e.CcittT4 = 3] = "CcittT4", e[e.CcittT6 = 4] = "CcittT6", e[e.Lzw = 5] = "Lzw", e[e.Jpeg6 = 6] = "Jpeg6", e[e.Jpeg = 7] = "Jpeg", e[e.DeflateOther = 8] = "DeflateOther", e[e.T85 = 9] = "T85", e[e.T43 = 10] = "T43", e[e.Next = 32766] = "Next", e[e.Ccittrlew = 32771] = "Ccittrlew", e[e.PackBits = 32773] = "PackBits", e[e.ThunderScan = 32809] = "ThunderScan", e[e.It8ctpad = 32895] = "It8ctpad", e[e.It8lw = 32896] = "It8lw", e[e.It8mp = 32897] = "It8mp", e[e.It8bl = 32898] = "It8bl", e[e.PixarFilm = 32908] = "PixarFilm", e[e.PixarLog = 32909] = "PixarLog", e[e.Deflate = 32946] = "Deflate", e[e.Dcs = 32947] = "Dcs", e[e.Jbig = 34661] = "Jbig", e[e.SgiLog = 34676] = "SgiLog", e[e.SgiLog24 = 34677] = "SgiLog24", e[e.Jp2000 = 34712] = "Jp2000", e[e.Lerc = 34887] = "Lerc", e[e.Lzma = 34925] = "Lzma", e[e.Zstd = 5e4] = "Zstd", e[e.Webp = 50001] = "Webp", e[e.JpegXl = 50002] = "JpegXl", e[e.JpegXlDng17 = 52546] = "JpegXlDng17";
4764
+ })(t || (t = {}));
4765
+ var x;
4766
+ (function(e) {
4767
+ e[e.Contig = 1] = "Contig", e[e.Separate = 2] = "Separate";
4768
+ })(x || (x = {}));
4769
+ var L;
4770
+ (function(e) {
4771
+ e[e.None = 1] = "None", e[e.Horizontal = 2] = "Horizontal", e[e.FloatingPoint = 3] = "FloatingPoint";
4772
+ })(L || (L = {}));
4773
+ var R;
4774
+ (function(e) {
4775
+ e[e.Uint = 1] = "Uint", e[e.Int = 2] = "Int", e[e.Float = 3] = "Float", e[e.Void = 4] = "Void", e[e.ComplexInt = 5] = "ComplexInt", e[e.ComplexFloat = 6] = "ComplexFloat";
4776
+ })(R || (R = {}));
4777
+ var N;
4778
+ (function(e) {
4779
+ e[e.MinIsWhite = 0] = "MinIsWhite", e[e.MinIsBlack = 1] = "MinIsBlack", e[e.Rgb = 2] = "Rgb", e[e.Palette = 3] = "Palette", e[e.Mask = 4] = "Mask", e[e.Separated = 5] = "Separated", e[e.Ycbcr = 6] = "Ycbcr", e[e.Cielab = 8] = "Cielab", e[e.Icclab = 9] = "Icclab", e[e.Itulab = 10] = "Itulab", e[e.Cfa = 32803] = "Cfa", e[e.Logl = 32844] = "Logl", e[e.Logluv = 32845] = "Logluv";
4780
+ })(N || (N = {}));
4781
+ var s;
4782
+ (function(e) {
4783
+ e[e.SubFileType = 254] = "SubFileType", e[e.OldSubFileType = 255] = "OldSubFileType", e[e.ImageWidth = 256] = "ImageWidth", e[e.ImageHeight = 257] = "ImageHeight", e[e.BitsPerSample = 258] = "BitsPerSample", e[e.SampleFormat = 339] = "SampleFormat", e[e.Compression = 259] = "Compression", e[e.Photometric = 262] = "Photometric", e[e.TileWidth = 322] = "TileWidth", e[e.TileHeight = 323] = "TileHeight", e[e.TileOffsets = 324] = "TileOffsets", e[e.TileByteCounts = 325] = "TileByteCounts", e[e.JpegTables = 347] = "JpegTables", e[e.StripOffsets = 273] = "StripOffsets", e[e.StripByteCounts = 279] = "StripByteCounts", e[e.GdalMetadata = 42112] = "GdalMetadata", e[e.GdalNoData = 42113] = "GdalNoData", e[e.ModelPixelScale = 33550] = "ModelPixelScale", e[e.ModelTiePoint = 33922] = "ModelTiePoint", e[e.ModelTransformation = 34264] = "ModelTransformation", e[e.GeoKeyDirectory = 34735] = "GeoKeyDirectory", e[e.GeoDoubleParams = 34736] = "GeoDoubleParams", e[e.GeoAsciiParams = 34737] = "GeoAsciiParams", e[e.LercParameters = 50674] = "LercParameters", e[e.PlanarConfiguration = 284] = "PlanarConfiguration", e[e.CellLength = 265] = "CellLength", e[e.CellWidth = 264] = "CellWidth", e[e.ColorMap = 320] = "ColorMap", e[e.Copyright = 33432] = "Copyright", e[e.DateTime = 306] = "DateTime", e[e.ExtraSamples = 338] = "ExtraSamples", e[e.FillOrder = 266] = "FillOrder", e[e.FreeByteCounts = 289] = "FreeByteCounts", e[e.FreeOffsets = 288] = "FreeOffsets", e[e.GrayResponseCurve = 291] = "GrayResponseCurve", e[e.GrayResponseUnit = 290] = "GrayResponseUnit", e[e.HostComputer = 316] = "HostComputer", e[e.ImageDescription = 270] = "ImageDescription", e[e.Make = 271] = "Make", e[e.MaxSampleValue = 281] = "MaxSampleValue", e[e.MinSampleValue = 280] = "MinSampleValue", e[e.Model = 272] = "Model", e[e.Orientation = 274] = "Orientation", e[e.ResolutionUnit = 296] = "ResolutionUnit", e[e.RowsPerStrip = 278] = "RowsPerStrip", e[e.SamplesPerPixel = 277] = "SamplesPerPixel", e[e.Software = 305] = "Software", e[e.Threshholding = 263] = "Threshholding", e[e.XResolution = 282] = "XResolution", e[e.YResolution = 283] = "YResolution", e[e.BadFaxLines = 326] = "BadFaxLines", e[e.CleanFaxData = 327] = "CleanFaxData", e[e.ClipPath = 343] = "ClipPath", e[e.ConsecutiveBadFaxLines = 328] = "ConsecutiveBadFaxLines", e[e.Decode = 433] = "Decode", e[e.DefaultImageColor = 434] = "DefaultImageColor", e[e.DocumentName = 269] = "DocumentName", e[e.DotRange = 336] = "DotRange", e[e.HalftoneHints = 321] = "HalftoneHints", e[e.Indexed = 346] = "Indexed", e[e.PageName = 285] = "PageName", e[e.PageNumber = 297] = "PageNumber", e[e.Predictor = 317] = "Predictor", e[e.PrimaryChromaticities = 319] = "PrimaryChromaticities", e[e.ReferenceBlackWhite = 532] = "ReferenceBlackWhite", e[e.SMinSampleValue = 340] = "SMinSampleValue", e[e.SMaxSampleValue = 341] = "SMaxSampleValue", e[e.StripRowCounts = 559] = "StripRowCounts", e[e.SubIFDs = 330] = "SubIFDs", e[e.T4Options = 292] = "T4Options", e[e.T6Options = 293] = "T6Options", e[e.TransferFunction = 301] = "TransferFunction", e[e.WhitePoint = 318] = "WhitePoint", e[e.XClipPathUnits = 344] = "XClipPathUnits", e[e.XPosition = 286] = "XPosition", e[e.YCbCrCoefficients = 529] = "YCbCrCoefficients", e[e.YCbCrPositioning = 531] = "YCbCrPositioning", e[e.YCbCrSubSampling = 530] = "YCbCrSubSampling", e[e.YClipPathUnits = 345] = "YClipPathUnits", e[e.YPosition = 287] = "YPosition", e[e.ApertureValue = 37378] = "ApertureValue", e[e.ColorSpace = 40961] = "ColorSpace", e[e.DateTimeDigitized = 36868] = "DateTimeDigitized", e[e.DateTimeOriginal = 36867] = "DateTimeOriginal", e[e.ExifIFD = 34665] = "ExifIFD", e[e.ExifVersion = 36864] = "ExifVersion", e[e.ExposureTime = 33434] = "ExposureTime", e[e.FileSource = 41728] = "FileSource", e[e.Flash = 37385] = "Flash", e[e.FlashpixVersion = 40960] = "FlashpixVersion", e[e.FNumber = 33437] = "FNumber", e[e.ImageUniqueID = 42016] = "ImageUniqueID", e[e.LightSource = 37384] = "LightSource", e[e.MakerNote = 37500] = "MakerNote", e[e.ShutterSpeedValue = 37377] = "ShutterSpeedValue", e[e.UserComment = 37510] = "UserComment", e[e.IPTC = 33723] = "IPTC", e[e.ICCProfile = 34675] = "ICCProfile", e[e.XMP = 700] = "XMP";
4784
+ })(s || (s = {}));
4785
+ var v;
4786
+ (function(e) {
4787
+ e[e.GTModelTypeGeoKey = 1024] = "GTModelTypeGeoKey", e[e.GTRasterTypeGeoKey = 1025] = "GTRasterTypeGeoKey", e[e.GTCitationGeoKey = 1026] = "GTCitationGeoKey", e[e.GeodeticCRSGeoKey = 2048] = "GeodeticCRSGeoKey", e[e.GeodeticCitationGeoKey = 2049] = "GeodeticCitationGeoKey", e[e.GeodeticDatumGeoKey = 2050] = "GeodeticDatumGeoKey", e[e.PrimeMeridianGeoKey = 2051] = "PrimeMeridianGeoKey", e[e.GeogLinearUnitsGeoKey = 2052] = "GeogLinearUnitsGeoKey", e[e.GeogLinearUnitSizeGeoKey = 2053] = "GeogLinearUnitSizeGeoKey", e[e.GeogAngularUnitsGeoKey = 2054] = "GeogAngularUnitsGeoKey", e[e.GeogAngularUnitSizeGeoKey = 2055] = "GeogAngularUnitSizeGeoKey", e[e.EllipsoidGeoKey = 2056] = "EllipsoidGeoKey", e[e.EllipsoidSemiMajorAxisGeoKey = 2057] = "EllipsoidSemiMajorAxisGeoKey", e[e.EllipsoidSemiMinorAxisGeoKey = 2058] = "EllipsoidSemiMinorAxisGeoKey", e[e.EllipsoidInvFlatteningGeoKey = 2059] = "EllipsoidInvFlatteningGeoKey", e[e.PrimeMeridianLongitudeGeoKey = 2061] = "PrimeMeridianLongitudeGeoKey", e[e.GeogTOWGS84GeoKey = 2062] = "GeogTOWGS84GeoKey", e[e.GeogAzimuthUnitsGeoKey = 2060] = "GeogAzimuthUnitsGeoKey", e[e.ProjectedCRSGeoKey = 3072] = "ProjectedCRSGeoKey", e[e.ProjectedCitationGeoKey = 3073] = "ProjectedCitationGeoKey", e[e.ProjectionGeoKey = 3074] = "ProjectionGeoKey", e[e.ProjMethodGeoKey = 3075] = "ProjMethodGeoKey", e[e.ProjLinearUnitsGeoKey = 3076] = "ProjLinearUnitsGeoKey", e[e.ProjLinearUnitSizeGeoKey = 3077] = "ProjLinearUnitSizeGeoKey", e[e.ProjStdParallel1GeoKey = 3078] = "ProjStdParallel1GeoKey", e[e.ProjStdParallel2GeoKey = 3079] = "ProjStdParallel2GeoKey", e[e.ProjNatOriginLongGeoKey = 3080] = "ProjNatOriginLongGeoKey", e[e.ProjNatOriginLatGeoKey = 3081] = "ProjNatOriginLatGeoKey", e[e.ProjFalseEastingGeoKey = 3082] = "ProjFalseEastingGeoKey", e[e.ProjFalseNorthingGeoKey = 3083] = "ProjFalseNorthingGeoKey", e[e.ProjFalseOriginLongGeoKey = 3084] = "ProjFalseOriginLongGeoKey", e[e.ProjFalseOriginLatGeoKey = 3085] = "ProjFalseOriginLatGeoKey", e[e.ProjFalseOriginEastingGeoKey = 3086] = "ProjFalseOriginEastingGeoKey", e[e.ProjFalseOriginNorthingGeoKey = 3087] = "ProjFalseOriginNorthingGeoKey", e[e.ProjCenterLongGeoKey = 3088] = "ProjCenterLongGeoKey", e[e.ProjCenterLatGeoKey = 3089] = "ProjCenterLatGeoKey", e[e.ProjCenterEastingGeoKey = 3090] = "ProjCenterEastingGeoKey", e[e.ProjCenterNorthingGeoKey = 3091] = "ProjCenterNorthingGeoKey", e[e.ProjScaleAtNatOriginGeoKey = 3092] = "ProjScaleAtNatOriginGeoKey", e[e.ProjScaleAtCenterGeoKey = 3093] = "ProjScaleAtCenterGeoKey", e[e.ProjAzimuthAngleGeoKey = 3094] = "ProjAzimuthAngleGeoKey", e[e.ProjStraightVertPoleLongGeoKey = 3095] = "ProjStraightVertPoleLongGeoKey", e[e.ProjRectifiedGridAngleGeoKey = 3096] = "ProjRectifiedGridAngleGeoKey", e[e.VerticalGeoKey = 4096] = "VerticalGeoKey", e[e.VerticalCitationGeoKey = 4097] = "VerticalCitationGeoKey", e[e.VerticalDatumGeoKey = 4098] = "VerticalDatumGeoKey", e[e.VerticalUnitsGeoKey = 4099] = "VerticalUnitsGeoKey";
4788
+ })(v || (v = {}));
4789
+ var B;
4790
+ (function(e) {
4791
+ e[e.Radian = 9101] = "Radian", e[e.Degree = 9102] = "Degree", e[e.ArcMinute = 9103] = "ArcMinute", e[e.ArcDegree = 9104] = "ArcDegree", e[e.Grad = 9105] = "Grad", e[e.Gon = 9106] = "Gon", e[e.Dms = 9107] = "Dms";
4792
+ })(B || (B = {}));
4793
+ var M;
4794
+ (function(e) {
4795
+ e[e.Metre = 9001] = "Metre", e[e.Foot = 9002] = "Foot", e[e.FootUsSurvey = 9003] = "FootUsSurvey", e[e.FootModifiedAmerican = 9004] = "FootModifiedAmerican", e[e.FootClarke = 9005] = "FootClarke", e[e.FootIndian = 9006] = "FootIndian", e[e.Link = 9007] = "Link", e[e.LinkBenoit = 9008] = "LinkBenoit", e[e.LinkSears = 9009] = "LinkSears", e[e.ChainBenoit = 9010] = "ChainBenoit", e[e.ChainSears = 9011] = "ChainSears", e[e.YardSears = 9012] = "YardSears", e[e.YardIndian = 9013] = "YardIndian", e[e.Fathom = 9014] = "Fathom", e[e.MileInternationalNautical = 9015] = "MileInternationalNautical";
4796
+ })(M || (M = {}));
4797
+ s.TileByteCounts + "", s.TileOffsets + "", s.StripOffsets + "", s.StripByteCounts + "", s.BitsPerSample + "", s.SampleFormat + "", s.GeoKeyDirectory + "", s.GeoDoubleParams + "";
4798
+ var r;
4799
+ (function(e) {
4800
+ e.None = "application/octet-stream", e.Jbig = "image/jbig", e.Dcs = "image/x-kodak-dcs", e.PackBits = "application/packbits", e.Jpeg = "image/jpeg", e.Jp2000 = "image/jp2", e.JpegXl = "image/jpegxl", e.Webp = "image/webp", e.Zstd = "application/zstd", e.Lzw = "application/lzw", e.Deflate = "application/deflate", e.Lerc = "application/lerc", e.Lzma = "application/x-lzma";
4801
+ })(r || (r = {}));
4802
+ t.None + "", r.None, t.Lzw + "", r.Lzw, t.Jpeg6 + "", r.Jpeg, t.Jpeg + "", r.Jpeg, t.DeflateOther + "", r.Deflate, t.Deflate + "", r.Deflate, t.Lerc + "", r.Lerc, t.Lzma + "", r.Lzma, t.Jp2000 + "", r.Jp2000, t.Zstd + "", r.Zstd, t.Webp + "", r.Webp, t.JpegXl + "", r.JpegXl, t.Ccittrle + "", r.None, t.CcittT4 + "", r.None, t.CcittT6 + "", r.None, t.T85 + "", r.Jbig, t.T43 + "", r.Jbig, t.Next + "", r.None, t.Ccittrlew + "", r.None, t.PackBits + "", r.PackBits, t.ThunderScan + "", r.None, t.It8ctpad + "", r.None, t.It8lw + "", r.None, t.It8mp + "", r.None, t.It8bl + "", r.None, t.PixarFilm + "", r.None, t.PixarLog + "", r.None, t.Dcs + "", r.Dcs, t.Jbig + "", r.Jbig, t.SgiLog + "", r.None, t.SgiLog24 + "", r.None, t.JpegXlDng17 + "", r.JpegXl;
4803
+ var U;
4804
+ (function(e) {
4805
+ e[e.Uint8 = 1] = "Uint8", e[e.Ascii = 2] = "Ascii", e[e.Uint16 = 3] = "Uint16", e[e.Uint32 = 4] = "Uint32", e[e.Rational = 5] = "Rational", e[e.Int8 = 6] = "Int8", e[e.Undefined = 7] = "Undefined", e[e.Int16 = 8] = "Int16", e[e.Int32 = 9] = "Int32", e[e.SignedRational = 10] = "SignedRational", e[e.Float32 = 11] = "Float32", e[e.Float64 = 12] = "Float64", e[e.Ifd = 13] = "Ifd", e[e.Uint64 = 16] = "Uint64", e[e.Int64 = 17] = "Int64", e[e.Ifd8 = 18] = "Ifd8";
4806
+ })(U || (U = {}));
4807
+ var w;
4808
+ (function(e) {
4809
+ e[e.BigTiff = 43] = "BigTiff", e[e.Tiff = 42] = "Tiff";
4810
+ })(w || (w = {}));
4811
+ var E;
4812
+ (function(e) {
4813
+ e[e.Double = 8] = "Double", e[e.Float32 = 4] = "Float32";
4814
+ })(E || (E = {}));
4815
+ var K;
4816
+ (function(e) {
4817
+ e[e.UInt64 = 8] = "UInt64", e[e.UInt32 = 4] = "UInt32", e[e.UInt16 = 2] = "UInt16", e[e.UInt8 = 1] = "UInt8";
4818
+ })(K || (K = {}));
4819
+ const W = new ArrayBuffer(4), Y = new Uint32Array(W), X = new Uint8Array(W);
4820
+ Y[0] = 1;
4821
+ X[0];
4822
+ s.Compression, s.ImageHeight, s.ImageWidth, s.ModelPixelScale, s.ModelTiePoint, s.ModelTransformation, s.TileHeight, s.TileWidth;
4823
+ s.GeoKeyDirectory, s.GeoAsciiParams, s.GeoDoubleParams;
4824
+ var k;
4825
+ (function(e) {
4826
+ e.GdalStructuralMetadataSize = "GDAL_STRUCTURAL_METADATA_SIZE", e.Layout = "LAYOUT", e.BlockOrder = "BLOCK_ORDER", e.BlockLeader = "BLOCK_LEADER", e.BlockTrailer = "BLOCK_TRAILER", e.KnownIncompatibleEdition = "KNOWN_INCOMPATIBLE_EDITION", e.MaskInterleavedWithImagery = "MASK_INTERLEAVED_WITH_IMAGERY";
4827
+ })(k || (k = {}));
4828
+ var J;
4829
+ (function(e) {
4830
+ e.RowMajor = "ROW_MAJOR";
4831
+ })(J || (J = {}));
4832
+ var O;
4833
+ (function(e) {
4834
+ e.uint32 = "SIZE_AS_UINT4";
4835
+ })(O || (O = {}));
4836
+ const H = {
4837
+ version: w.Tiff,
4838
+ pointer: K.UInt32,
4839
+ offset: K.UInt16,
4840
+ /**
4841
+ * Each tag entry is specified as
4842
+ * UInt16:TagCode
4843
+ * UInt16:TagType
4844
+ * UInt32:TagCount
4845
+ * UInt32:Pointer To Value or value
4846
+ */
4847
+ ifd: K.UInt16 + K.UInt16 + 2 * K.UInt32
4848
+ }, _ = {
4849
+ version: w.BigTiff,
4850
+ /** Size of most pointers */
4851
+ pointer: K.UInt64,
4852
+ /** Size of offsets */
4853
+ offset: K.UInt64,
4854
+ /**
4855
+ * Each tag entry is specified as
4856
+ * UInt16:TagCode
4857
+ * UInt16:TagType
4858
+ * UInt64:TagCount
4859
+ * UInt64:Pointer To Value or value
4860
+ */
4861
+ ifd: K.UInt16 + K.UInt16 + 2 * K.UInt64
4862
+ };
4863
+ w.BigTiff + "", w.Tiff + "";
4864
+ async function b(e, n) {
4865
+ const l = new Blob([e]), o = await createImageBitmap(l), c = new OffscreenCanvas(o.width, o.height), d = c.getContext("2d");
4866
+ d.drawImage(o, 0, 0), o.close();
4867
+ const { width: P, height: a } = c, h = d.getImageData(0, 0, P, a).data, y = n.samplesPerPixel;
4868
+ if (y === 4)
4869
+ return { layout: "pixel-interleaved", data: h };
4870
+ if (y === 3) {
4871
+ const I = P * a, u = new Uint8ClampedArray(I * 3);
4872
+ for (let p = 0, D = 0; p < u.length; p += 3, D += 4)
4873
+ u[p] = h[D], u[p + 1] = h[D + 1], u[p + 2] = h[D + 2];
4874
+ return { layout: "pixel-interleaved", data: u };
4875
+ }
4876
+ if (y === 1) {
4877
+ const I = P * a, u = new Uint8ClampedArray(I);
4878
+ for (let p = 0, D = 0; p < I; p++, D += 4)
4879
+ u[p] = h[D];
4880
+ return { layout: "pixel-interleaved", data: u };
4881
+ }
4882
+ throw new Error(\`Unsupported SamplesPerPixel for JPEG: \${y}\`);
4883
+ }
4884
+ function Z(e, n = "") {
4885
+ if (!e)
4886
+ throw new Error(n);
4887
+ }
4888
+ async function $(e, { format: n, signal: l }) {
4889
+ const o = e instanceof Response ? e : new Response(e);
4890
+ Z(o.body, "Response does not contain body.");
4891
+ try {
4892
+ return await new Response(o.body.pipeThrough(new DecompressionStream(n), { signal: l })).arrayBuffer();
4893
+ } catch {
4894
+ throw l?.throwIfAborted(), new Error(\`Failed to decode \${n}\`);
4895
+ }
4896
+ }
4897
+ async function z(e) {
4898
+ return $(e, { format: "deflate" });
4899
+ }
4900
+ function q(e, n) {
4901
+ const l = e;
4902
+ let o = 0, c = e.length - n;
4903
+ do {
4904
+ for (let d = n; d > 0; d--)
4905
+ l[o + n] = (l[o + n] ?? 0) + (l[o] ?? 0), o++;
4906
+ c -= n;
4907
+ } while (c > 0);
4908
+ }
4909
+ function Q(e, n, l) {
4910
+ let o = 0, c = e.length;
4911
+ const d = c / l;
4912
+ for (; c > n; ) {
4913
+ for (let a = n; a > 0; a--)
4914
+ e[o + n] += e[o], o++;
4915
+ c -= n;
4916
+ }
4917
+ const P = e.slice();
4918
+ for (let a = 0; a < d; a++)
4919
+ for (let i = 0; i < l; i++)
4920
+ e[l * a + i] = P[(l - i - 1) * d + a];
4921
+ }
4922
+ function V(e, n, l, o, c, d, P) {
4923
+ if (n === L.None)
4924
+ return e;
4925
+ const a = c / 8, i = P === x.Separate ? 1 : d;
4926
+ for (let h = 0; h < o; h++) {
4927
+ const y = h * i * l * a;
4928
+ if (y >= e.byteLength)
4929
+ break;
4930
+ if (n === L.Horizontal) {
4931
+ let I;
4932
+ const u = i * l;
4933
+ switch (c) {
4934
+ case 8:
4935
+ I = new Uint8Array(e, y, u);
4936
+ break;
4937
+ case 16:
4938
+ I = new Uint16Array(e, y, u);
4939
+ break;
4940
+ case 32:
4941
+ I = new Uint32Array(e, y, u);
4942
+ break;
4943
+ default:
4944
+ throw new Error(\`Predictor 2 not supported for \${c} bits per sample.\`);
4945
+ }
4946
+ q(I, i);
4947
+ } else if (n === L.FloatingPoint) {
4948
+ const I = new Uint8Array(e, y, i * l * a);
4949
+ Q(I, i, a);
4950
+ }
4951
+ }
4952
+ return e;
4953
+ }
4954
+ async function g(e) {
4955
+ return e;
4956
+ }
4957
+ const S = /* @__PURE__ */ new Map();
4958
+ S.set(t.None, () => Promise.resolve(g));
4959
+ S.set(t.Deflate, () => Promise.resolve(z));
4960
+ S.set(t.DeflateOther, () => Promise.resolve(z));
4961
+ S.set(t.Lzw, () => import("./lzw-BY5a_5nb.js").then((e) => e.decode));
4962
+ S.set(t.Zstd, () => import("./zstd-QGAv3PMm.js").then((e) => e.decode));
4963
+ S.set(t.Jpeg, () => Promise.resolve(b));
4964
+ S.set(t.Jpeg6, () => Promise.resolve(b));
4965
+ S.set(t.Webp, () => Promise.resolve(b));
4966
+ S.set(t.Lerc, () => import("./__vite-browser-external-DDArsqdc.js").then(function(e) {
4967
+ return e.l;
4968
+ }).then((e) => e.decode));
4969
+ async function f(e, n, l) {
4970
+ const o = S.get(n);
4971
+ if (!o)
4972
+ throw new Error(\`Unsupported compression: \${n}\`);
4973
+ const d = await (await o())(e, l);
4974
+ if (d instanceof ArrayBuffer) {
4975
+ const { predictor: P, width: a, height: i, bitsPerSample: h, samplesPerPixel: y, planarConfiguration: I } = l, u = V(d, P, a, i, h, y, I);
4976
+ return {
4977
+ layout: "pixel-interleaved",
4978
+ data: ee(u, l)
4979
+ };
4980
+ }
4981
+ return d;
4982
+ }
4983
+ function T(e, n) {
4984
+ const l = new Uint8Array(e), o = new Uint8Array(n);
4985
+ for (let c = 0; c < n; c++)
4986
+ o[c] = l[c >> 3] >> 7 - (c & 7) & 1 ? 255 : 0;
4987
+ return o;
4988
+ }
4989
+ function ee(e, n) {
4990
+ const { sampleFormat: l, bitsPerSample: o } = n;
4991
+ switch (l) {
4992
+ case R.Uint:
4993
+ switch (o) {
4994
+ case 1:
4995
+ return T(e, n.width * n.height * n.samplesPerPixel);
4996
+ case 8:
4997
+ return new Uint8Array(e);
4998
+ case 16:
4999
+ return new Uint16Array(e);
5000
+ case 32:
5001
+ return new Uint32Array(e);
5002
+ }
5003
+ break;
5004
+ case R.Int:
5005
+ switch (o) {
5006
+ case 8:
5007
+ return new Int8Array(e);
5008
+ case 16:
5009
+ return new Int16Array(e);
5010
+ case 32:
5011
+ return new Int32Array(e);
5012
+ }
5013
+ break;
5014
+ case R.Float:
5015
+ switch (o) {
5016
+ case 32:
5017
+ return new Float32Array(e);
5018
+ case 64:
5019
+ return new Float64Array(e);
5020
+ }
5021
+ break;
5022
+ }
5023
+ throw new Error(\`Unsupported sample format/depth: SampleFormat=\${l}, BitsPerSample=\${o}\`);
5024
+ }
5025
+ function te(e) {
5026
+ return e.layout === "pixel-interleaved" ? [e.data.buffer] : e.bands.map((n) => n.buffer);
5027
+ }
5028
+ self.addEventListener("message", async (e) => {
5029
+ const { jobId: n, compression: l, metadata: o, buffer: c } = e.data;
5030
+ try {
5031
+ const d = await f(c, l, o), P = te(d), a = { jobId: n, pixels: d };
5032
+ self.postMessage(a, { transfer: P });
5033
+ } catch (d) {
5034
+ const P = { jobId: n, error: String(d) };
5035
+ self.postMessage(P);
5036
+ }
5037
+ });
5038
+ export {
5039
+ t as C,
5040
+ S as D
5041
+ };
5042
+ `, tt = typeof self < "u" && self.Blob && new Blob(["URL.revokeObjectURL(import.meta.url);", Ft], { type: "text/javascript;charset=utf-8" });
5043
+ function Vo(e) {
5044
+ let t;
5045
+ try {
5046
+ if (t = tt && (self.URL || self.webkitURL).createObjectURL(tt), !t) throw "";
5047
+ const n = new Worker(t, {
5048
+ type: "module",
5049
+ name: e?.name
5050
+ });
5051
+ return n.addEventListener("error", () => {
5052
+ (self.URL || self.webkitURL).revokeObjectURL(t);
5053
+ }), n;
5054
+ } catch {
5055
+ return new Worker(
5056
+ "data:text/javascript;charset=utf-8," + encodeURIComponent(Ft),
5057
+ {
5058
+ type: "module",
5059
+ name: e?.name
5060
+ }
5061
+ );
5062
+ }
5063
+ }
5064
+ const Jo = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAABrCAYAAACYNlxLAABBh0lEQVR4nO19C7BuV1nYt/f/n3NvbhJykyBJIBAIguQBN5eIoEajqGAsZbBpJyO2jkzBR9U6SsWWkQZaio6MMlLBMiOWWhTHtLRNpUJFAxl5DZibEAiEgMGQ0BgeyQ25j3POv/fX+V5rfWvttfe/97nncRPyn1nne6+19/7/vfd6fOv7qms/di3CLn6uvOef7GbzcOVZ1+9q+/WVZ+9q+9/5C+fsavvvfeuhXW3/0I/93q62/65TX7Kr7VcAgDX9EHex0EHMdpGua4CqBpjVgpfKI1VO/K7BzOHVgKwkn2o/tY0ttq/8r8Lw5NeRyUuyh699ddv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l8rdL2wZbm2GTMKlIrPSUv/UorajSnZ3+DupxO/VLd2p2V2d2QanHdXBDLe3plyuFBeZ6mR4Xqe1VazT1V1+q+Zv/Imygbrb8jMmuU+z50n2zLJgqOlDdXR9dOdRvk53l/BcOOkQP3uBhXYDLz7QkzZgwNbVMQf4f90bLLlJem6ccAMWeEvtsxtw9AOgYDPFvu9h4V9b/sYpvrbG6GQ344CN3SzxLUK4Tt0zJD4nuC934/r4nTdNmS8ej/HXYdtHPS/rTmxSVtZJts/ajRx+ji4NuMLwLDZex051SjzXlv8ptOFri73GUgRi63lFfvoA6LUPEY679hxB2eXqy4v9JMaWKfqk+/8BV++WvQyT7iEAAAAASUVORK5CYII=", nt = /* @__PURE__ */ new WeakMap();
5065
+ function Yo(e) {
5066
+ const t = nt.get(e);
4740
5067
  if (t) return t;
4741
5068
  const n = (async () => {
4742
- const r = await (await fetch(Wo)).arrayBuffer();
4743
- return jo(e, await xo(r));
5069
+ const r = await (await fetch(Jo)).arrayBuffer();
5070
+ return Ao(e, await Oo(r));
4744
5071
  })();
4745
- return $e.set(e, n), n;
4746
- }
4747
- const et = /* @__PURE__ */ new Set();
4748
- function ko(e) {
4749
- return e in he ? he[e] : (et.has(e) || (et.add(e), console.warn(`[onlymapjs] COGLayer: unknown colormap "${e}" — falling back to gray.`)), he.gray);
5072
+ return nt.set(e, n), n;
4750
5073
  }
5074
+ const rt = /* @__PURE__ */ new Set();
4751
5075
  function Zo(e) {
5076
+ return e in he ? he[e] : (rt.has(e) || (rt.add(e), console.warn(`[onlymapjs] COGLayer: unknown colormap "${e}" — falling back to gray.`)), he.gray);
5077
+ }
5078
+ function To(e) {
4752
5079
  const t = e.layout === "band-separate" ? e.bands[0] : e.data;
4753
5080
  return t instanceof Float32Array ? t : new Float32Array(t);
4754
5081
  }
4755
- function Vo(e) {
5082
+ function qo(e) {
4756
5083
  const t = e.width * e.height, n = new Float32Array(t * 4);
4757
5084
  if (e.layout === "band-separate") {
4758
5085
  const [r, o, i] = [e.bands[0], e.bands[1], e.bands[2]];
@@ -4765,16 +5092,16 @@ function Vo(e) {
4765
5092
  }
4766
5093
  return n;
4767
5094
  }
4768
- const Yo = async (e, { device: t, x: n, y: r, signal: o, pool: i }) => {
5095
+ const Qo = async (e, { device: t, x: n, y: r, signal: o, pool: i }) => {
4769
5096
  const s = () => {
4770
5097
  throw o?.reason ?? new DOMException("aborted", "AbortError");
4771
5098
  };
4772
5099
  o?.aborted && s();
4773
5100
  const a = await e.fetchTile(n, r, { boundless: !1, pool: i, signal: o });
4774
5101
  o?.aborted && s();
4775
- const l = a.array, c = e.cachedTags.samplesPerPixel, u = { minFilter: "nearest", magFilter: "nearest" }, h = c === 1, p = h ? Zo(l) : Vo(l), d = t.createTexture({
5102
+ const l = a.array, c = e.cachedTags.samplesPerPixel, u = { minFilter: "nearest", magFilter: "nearest" }, d = c === 1, p = d ? To(l) : qo(l), h = t.createTexture({
4776
5103
  data: p,
4777
- format: h ? "r32float" : "rgba32float",
5104
+ format: d ? "r32float" : "rgba32float",
4778
5105
  width: l.width,
4779
5106
  height: l.height,
4780
5107
  sampler: u
@@ -4783,27 +5110,37 @@ const Yo = async (e, { device: t, x: n, y: r, signal: o, pool: i }) => {
4783
5110
  width: l.width,
4784
5111
  height: l.height,
4785
5112
  byteLength: p.byteLength,
4786
- texture: d,
4787
- colormapTexture: await Ho(t),
5113
+ texture: h,
5114
+ colormapTexture: await Yo(t),
4788
5115
  bandCount: c,
4789
5116
  nodata: l.nodata
4790
5117
  };
4791
5118
  };
4792
- function Jo(e, t) {
5119
+ function $o(e, t) {
4793
5120
  const n = [
4794
5121
  // Per-tile textureName (not the layer-level `image:` shorthand — that
4795
5122
  // binds only the first tile's sampler in this setup).
4796
- { module: Se, props: { textureName: e.texture } }
5123
+ { module: Ce, props: { textureName: e.texture } }
4797
5124
  ], r = t.nodataOverride ?? e.nodata;
4798
5125
  return r != null && Number.isFinite(r) && n.push({ module: Et, props: { value: r } }), n.push({
4799
- module: Io,
5126
+ module: Fo,
4800
5127
  props: { rescaleMin: t.rescaleMin ?? 0, rescaleMax: t.rescaleMax ?? 255 }
4801
5128
  }), e.bandCount === 1 && n.push({
4802
- module: At,
4803
- props: { colormapTexture: e.colormapTexture, colormapIndex: ko(t.colormap ?? "gray") }
5129
+ module: Mt,
5130
+ props: { colormapTexture: e.colormapTexture, colormapIndex: Zo(t.colormap ?? "gray") }
4804
5131
  }), { renderPipeline: n };
4805
5132
  }
4806
- class qo extends Xo {
5133
+ let $;
5134
+ function ei() {
5135
+ if ($) return $;
5136
+ try {
5137
+ $ = new ve({ createWorker: () => new Vo() });
5138
+ } catch (e) {
5139
+ console.warn("[onlymapjs] COGLayer: worker decode unavailable — falling back to main-thread decode.", e), $ = new ve({});
5140
+ }
5141
+ return $;
5142
+ }
5143
+ class ti extends Ho {
4807
5144
  static layerName = "OmCOGLayer";
4808
5145
  // Plain nulls (not `{type:"number", value:null}` specs): deck's typed
4809
5146
  // number props reject null defaults with a console warning per instance.
@@ -4814,29 +5151,29 @@ class qo extends Xo {
4814
5151
  nodataOverride: null
4815
5152
  };
4816
5153
  constructor(t) {
4817
- const n = t;
5154
+ const n = t, r = { ...t, pool: t.pool ?? ei() };
4818
5155
  if (!(n.rescaleMin != null || n.rescaleMax != null || n.colormap != null && n.colormap !== "" || n.nodataOverride != null)) {
4819
- super(t);
5156
+ super(r);
4820
5157
  return;
4821
5158
  }
4822
- super(t, {
4823
- getTileData: Yo,
4824
- renderTile: (o) => o ? Jo(o, n) : null,
5159
+ super(r, {
5160
+ getTileData: Qo,
5161
+ renderTile: (i) => i ? $o(i, n) : null,
4825
5162
  // Free the per-tile texture on cache eviction; the sprite texture is
4826
5163
  // device-scoped (WeakMap above) and must NOT be destroyed here.
4827
- onTileUnload: (o) => {
4828
- const i = o.data;
4829
- i && typeof i == "object" && "texture" in i && i.texture.destroy();
5164
+ onTileUnload: (i) => {
5165
+ const s = i.data;
5166
+ s && typeof s == "object" && "texture" in s && s.texture.destroy();
4830
5167
  }
4831
5168
  });
4832
5169
  }
4833
5170
  }
4834
- const ei = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5171
+ const si = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4835
5172
  __proto__: null,
4836
- OmCOGLayer: qo
5173
+ OmCOGLayer: ti
4837
5174
  }, Symbol.toStringTag, { value: "Module" }));
4838
5175
  export {
4839
- P as C,
5176
+ w as C,
4840
5177
  D,
4841
- ei as r
5178
+ si as r
4842
5179
  };