@idetik/core 0.36.0 → 0.36.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- class RC {
1
+ class NC {
2
2
  canvas_;
3
3
  width_ = 0;
4
4
  height_ = 0;
@@ -27,7 +27,7 @@ class RC {
27
27
  return this.renderedObjects_;
28
28
  }
29
29
  }
30
- var NC = `#version 300 es
30
+ var cC = `#version 300 es
31
31
 
32
32
  layout (location = 0) in vec3 a_position;
33
33
  layout (location = 3) in vec3 a_prevPosition;
@@ -87,7 +87,7 @@ void main() {
87
87
 
88
88
 
89
89
  gl_PointSize = 5.0;
90
- }`, cC = `#version 300 es
90
+ }`, UC = `#version 300 es
91
91
 
92
92
  precision mediump float;
93
93
 
@@ -139,7 +139,7 @@ void main() {
139
139
  float texel = float(texture(u_imageSampler, v_texCoords).r);
140
140
  float value = (texel + u_valueOffset) * u_valueScale;
141
141
  fragColor = vec4(value * u_color, u_opacity);
142
- }`, UC = `#version 300 es
142
+ }`, kC = `#version 300 es
143
143
 
144
144
  precision mediump float;
145
145
 
@@ -159,7 +159,7 @@ void main() {
159
159
  gl_PointSize = a_size;
160
160
  v_color = a_color;
161
161
  v_marker = uint(a_marker);
162
- }`, kC = `#version 300 es
162
+ }`, LC = `#version 300 es
163
163
 
164
164
  precision mediump float;
165
165
 
@@ -179,7 +179,7 @@ void main() {
179
179
  discard;
180
180
  }
181
181
  fragColor = vec4(v_color.rgb, u_opacity * alpha * v_color.a);
182
- }`, LC = `#version 300 es
182
+ }`, JC = `#version 300 es
183
183
 
184
184
  layout (location = 0) in vec3 a_position;
185
185
  layout (location = 1) in vec3 a_normal;
@@ -189,7 +189,7 @@ uniform mat4 u_modelView;
189
189
 
190
190
  void main() {
191
191
  gl_Position = u_projection * u_modelView * vec4(a_position, 1.0);
192
- }`, JC = `#version 300 es
192
+ }`, YC = `#version 300 es
193
193
 
194
194
  precision mediump float;
195
195
 
@@ -355,7 +355,7 @@ void main() {
355
355
  }
356
356
 
357
357
  fragColor = accumulatedColor;
358
- }`, bg = `#version 300 es
358
+ }`, Zg = `#version 300 es
359
359
  #pragma inject_defines
360
360
 
361
361
  precision highp float;
@@ -454,18 +454,18 @@ void main() {
454
454
 
455
455
  fragColor = vec4(color.rgb, alpha);
456
456
  }`;
457
- const YC = {
457
+ const MC = {
458
458
  projectedLine: {
459
- vertex: NC,
460
- fragment: cC
459
+ vertex: cC,
460
+ fragment: UC
461
461
  },
462
462
  points: {
463
- vertex: UC,
464
- fragment: kC
463
+ vertex: kC,
464
+ fragment: LC
465
465
  },
466
466
  wireframe: {
467
- vertex: LC,
468
- fragment: JC
467
+ vertex: JC,
468
+ fragment: YC
469
469
  },
470
470
  floatScalarImage: {
471
471
  vertex: WA,
@@ -483,11 +483,11 @@ const YC = {
483
483
  },
484
484
  labelImage: {
485
485
  vertex: WA,
486
- fragment: bg
486
+ fragment: Zg
487
487
  },
488
488
  intLabelImage: {
489
489
  vertex: WA,
490
- fragment: bg,
490
+ fragment: Zg,
491
491
  fragmentDefines: /* @__PURE__ */ new Map([["TEXTURE_DATA_TYPE_INT", "1"]])
492
492
  },
493
493
  floatVolume: {
@@ -504,12 +504,12 @@ const YC = {
504
504
  fragment: lI,
505
505
  fragmentDefines: /* @__PURE__ */ new Map([["TEXTURE_DATA_TYPE_UINT", "1"]])
506
506
  }
507
- }, Zg = {
507
+ }, Pg = {
508
508
  debug: 10,
509
509
  info: 20,
510
510
  warn: 30,
511
511
  error: 40
512
- }, MC = {
512
+ }, dC = {
513
513
  debug: "\x1B[90m",
514
514
  // gray
515
515
  info: "\x1B[36m",
@@ -519,7 +519,7 @@ const YC = {
519
519
  error: "\x1B[31m"
520
520
  // red
521
521
  };
522
- function dC() {
522
+ function KC() {
523
523
  const g = typeof process < "u" && typeof process.env?.NODE_ENV == "string" ? process.env.NODE_ENV : void 0;
524
524
  if (g === "production" || g === "development" || g === "test")
525
525
  return g;
@@ -531,7 +531,7 @@ function dC() {
531
531
  return "development";
532
532
  }
533
533
  class k {
534
- static logLevel_ = dC() === "production" ? "warn" : "debug";
534
+ static logLevel_ = KC() === "production" ? "warn" : "debug";
535
535
  static setLogLevel(A) {
536
536
  k.logLevel_ = A;
537
537
  }
@@ -548,8 +548,8 @@ class k {
548
548
  k.log("error", A, I, ...B);
549
549
  }
550
550
  static log(A, I, B, ...C) {
551
- if (Zg[A] < Zg[k.logLevel_]) return;
552
- const Q = (/* @__PURE__ */ new Date()).toISOString(), E = MC[A], i = `[${Q}][${A.toUpperCase()}][${I}]`, o = [`${E}${i}`, B, ...C];
551
+ if (Pg[A] < Pg[k.logLevel_]) return;
552
+ const Q = (/* @__PURE__ */ new Date()).toISOString(), E = dC[A], i = `[${Q}][${A.toUpperCase()}][${I}]`, o = [`${E}${i}`, B, ...C];
553
553
  switch (A) {
554
554
  case "debug":
555
555
  console.debug(...o);
@@ -566,7 +566,7 @@ class k {
566
566
  }
567
567
  }
568
568
  }
569
- class KC {
569
+ class HC {
570
570
  gl_;
571
571
  program_;
572
572
  uniformInfo_ = /* @__PURE__ */ new Map();
@@ -648,7 +648,7 @@ class KC {
648
648
  for (let I = 0; I < A; I++) {
649
649
  const B = this.gl_.getActiveUniform(this.program_, I);
650
650
  if (B) {
651
- if (!qC.has(B.type))
651
+ if (!lC.has(B.type))
652
652
  throw new Error(
653
653
  `Unsupported uniform type "${B.type}" (GLenum) found in shader program for uniform "${B.name}"`
654
654
  );
@@ -689,7 +689,7 @@ class KC {
689
689
  return Array.from(this.uniformInfo_.keys());
690
690
  }
691
691
  }
692
- const HC = typeof window < "u" ? [
692
+ const qC = typeof window < "u" ? [
693
693
  WebGL2RenderingContext.BOOL,
694
694
  WebGL2RenderingContext.FLOAT,
695
695
  WebGL2RenderingContext.INT,
@@ -714,10 +714,10 @@ const HC = typeof window < "u" ? [
714
714
  WebGL2RenderingContext.UNSIGNED_INT_SAMPLER_3D,
715
715
  WebGL2RenderingContext.UNSIGNED_INT_SAMPLER_CUBE,
716
716
  WebGL2RenderingContext.UNSIGNED_INT_SAMPLER_2D_ARRAY
717
- ] : [], qC = new Set(
718
- HC
717
+ ] : [], lC = new Set(
718
+ qC
719
719
  ), fI = "#pragma inject_defines";
720
- class lC {
720
+ class fC {
721
721
  gl_;
722
722
  programs_ = /* @__PURE__ */ new Map();
723
723
  constructor(A) {
@@ -726,14 +726,14 @@ class lC {
726
726
  use(A) {
727
727
  let I = this.programs_.get(A);
728
728
  if (I === void 0) {
729
- const B = YC[A], C = Pg(
729
+ const B = MC[A], C = Og(
730
730
  B.vertex,
731
731
  B.vertexDefines
732
- ), Q = Pg(
732
+ ), Q = Og(
733
733
  B.fragment,
734
734
  B.fragmentDefines
735
735
  );
736
- I = new KC(
736
+ I = new HC(
737
737
  this.gl_,
738
738
  C,
739
739
  Q
@@ -747,7 +747,7 @@ class lC {
747
747
  return I;
748
748
  }
749
749
  }
750
- function Pg(g, A) {
750
+ function Og(g, A) {
751
751
  if (A === void 0 || A.size == 0) return g;
752
752
  if (!g.includes(fI))
753
753
  throw new Error(
@@ -759,25 +759,25 @@ ${C}`;
759
759
  return g.replace(fI, Q);
760
760
  }
761
761
  const CI = {};
762
- function bB(g) {
762
+ function ZB(g) {
763
763
  const A = g ?? "";
764
764
  return CI[A] = (CI[A] ?? 0) + 1, g ? `${g}-${CI[A]}` : String(CI[A]);
765
765
  }
766
766
  class hg {
767
- id = bB();
767
+ id = ZB();
768
768
  }
769
- var T = 1e-6, X = typeof Float32Array < "u" ? Float32Array : Array, fC = Math.PI / 180;
770
- function pC(g) {
771
- return g * fC;
769
+ var T = 1e-6, X = typeof Float32Array < "u" ? Float32Array : Array, pC = Math.PI / 180;
770
+ function mC(g) {
771
+ return g * pC;
772
772
  }
773
- function ZB() {
773
+ function PB() {
774
774
  var g = new X(9);
775
775
  return X != Float32Array && (g[1] = 0, g[2] = 0, g[3] = 0, g[5] = 0, g[6] = 0, g[7] = 0), g[0] = 1, g[4] = 1, g[8] = 1, g;
776
776
  }
777
- function mC(g, A) {
777
+ function uC(g, A) {
778
778
  return g[0] = A[0], g[1] = A[1], g[2] = A[2], g[3] = A[4], g[4] = A[5], g[5] = A[6], g[6] = A[8], g[7] = A[9], g[8] = A[10], g;
779
779
  }
780
- function uC(g, A, I, B, C, Q, E, i, o) {
780
+ function TC(g, A, I, B, C, Q, E, i, o) {
781
781
  var a = new X(9);
782
782
  return a[0] = g, a[1] = A, a[2] = I, a[3] = B, a[4] = C, a[5] = Q, a[6] = E, a[7] = i, a[8] = o, a;
783
783
  }
@@ -793,18 +793,18 @@ function vI(g, A, I) {
793
793
  var B = A[0], C = A[1], Q = A[2], E = A[3], i = A[4], o = A[5], a = A[6], D = A[7], s = A[8], h = A[9], t = A[10], y = A[11], n = A[12], F = A[13], G = A[14], J = A[15], U = I[0], S = I[1], r = I[2], c = I[3];
794
794
  return g[0] = U * B + S * i + r * s + c * n, g[1] = U * C + S * o + r * h + c * F, g[2] = U * Q + S * a + r * t + c * G, g[3] = U * E + S * D + r * y + c * J, U = I[4], S = I[5], r = I[6], c = I[7], g[4] = U * B + S * i + r * s + c * n, g[5] = U * C + S * o + r * h + c * F, g[6] = U * Q + S * a + r * t + c * G, g[7] = U * E + S * D + r * y + c * J, U = I[8], S = I[9], r = I[10], c = I[11], g[8] = U * B + S * i + r * s + c * n, g[9] = U * C + S * o + r * h + c * F, g[10] = U * Q + S * a + r * t + c * G, g[11] = U * E + S * D + r * y + c * J, U = I[12], S = I[13], r = I[14], c = I[15], g[12] = U * B + S * i + r * s + c * n, g[13] = U * C + S * o + r * h + c * F, g[14] = U * Q + S * a + r * t + c * G, g[15] = U * E + S * D + r * y + c * J, g;
795
795
  }
796
- function TC(g, A, I) {
796
+ function xC(g, A, I) {
797
797
  var B = I[0], C = I[1], Q = I[2], E, i, o, a, D, s, h, t, y, n, F, G;
798
798
  return A === g ? (g[12] = A[0] * B + A[4] * C + A[8] * Q + A[12], g[13] = A[1] * B + A[5] * C + A[9] * Q + A[13], g[14] = A[2] * B + A[6] * C + A[10] * Q + A[14], g[15] = A[3] * B + A[7] * C + A[11] * Q + A[15]) : (E = A[0], i = A[1], o = A[2], a = A[3], D = A[4], s = A[5], h = A[6], t = A[7], y = A[8], n = A[9], F = A[10], G = A[11], g[0] = E, g[1] = i, g[2] = o, g[3] = a, g[4] = D, g[5] = s, g[6] = h, g[7] = t, g[8] = y, g[9] = n, g[10] = F, g[11] = G, g[12] = E * B + D * C + y * Q + A[12], g[13] = i * B + s * C + n * Q + A[13], g[14] = o * B + h * C + F * Q + A[14], g[15] = a * B + t * C + G * Q + A[15]), g;
799
799
  }
800
- function PB(g, A) {
800
+ function OB(g, A) {
801
801
  return g[0] = A[0], g[1] = 0, g[2] = 0, g[3] = 0, g[4] = 0, g[5] = A[1], g[6] = 0, g[7] = 0, g[8] = 0, g[9] = 0, g[10] = A[2], g[11] = 0, g[12] = 0, g[13] = 0, g[14] = 0, g[15] = 1, g;
802
802
  }
803
- function xC(g, A, I, B) {
803
+ function WC(g, A, I, B) {
804
804
  var C = A[0], Q = A[1], E = A[2], i = A[3], o = C + C, a = Q + Q, D = E + E, s = C * o, h = C * a, t = C * D, y = Q * a, n = Q * D, F = E * D, G = i * o, J = i * a, U = i * D, S = B[0], r = B[1], c = B[2];
805
805
  return g[0] = (1 - (y + F)) * S, g[1] = (h + U) * S, g[2] = (t - J) * S, g[3] = 0, g[4] = (h - U) * r, g[5] = (1 - (s + F)) * r, g[6] = (n + G) * r, g[7] = 0, g[8] = (t + J) * c, g[9] = (n - G) * c, g[10] = (1 - (s + y)) * c, g[11] = 0, g[12] = I[0], g[13] = I[1], g[14] = I[2], g[15] = 1, g;
806
806
  }
807
- function WC(g, A, I, B, C) {
807
+ function bC(g, A, I, B, C) {
808
808
  var Q = 1 / Math.tan(A / 2);
809
809
  if (g[0] = Q / I, g[1] = 0, g[2] = 0, g[3] = 0, g[4] = 0, g[5] = Q, g[6] = 0, g[7] = 0, g[8] = 0, g[9] = 0, g[11] = -1, g[12] = 0, g[13] = 0, g[15] = 0, C != null && C !== 1 / 0) {
810
810
  var E = 1 / (B - C);
@@ -813,21 +813,21 @@ function WC(g, A, I, B, C) {
813
813
  g[10] = -1, g[14] = -2 * B;
814
814
  return g;
815
815
  }
816
- var bC = WC;
817
- function ZC(g, A, I, B, C, Q, E) {
816
+ var ZC = bC;
817
+ function PC(g, A, I, B, C, Q, E) {
818
818
  var i = 1 / (A - I), o = 1 / (B - C), a = 1 / (Q - E);
819
819
  return g[0] = -2 * i, g[1] = 0, g[2] = 0, g[3] = 0, g[4] = 0, g[5] = -2 * o, g[6] = 0, g[7] = 0, g[8] = 0, g[9] = 0, g[10] = 2 * a, g[11] = 0, g[12] = (A + I) * i, g[13] = (C + B) * o, g[14] = (E + Q) * a, g[15] = 1, g;
820
820
  }
821
- var PC = ZC;
822
- function OC(g, A, I, B) {
821
+ var OC = PC;
822
+ function VC(g, A, I, B) {
823
823
  var C = A[0], Q = A[1], E = A[2], i = B[0], o = B[1], a = B[2], D = C - I[0], s = Q - I[1], h = E - I[2], t = D * D + s * s + h * h;
824
824
  t > 0 && (t = 1 / Math.sqrt(t), D *= t, s *= t, h *= t);
825
825
  var y = o * h - a * s, n = a * D - i * h, F = i * s - o * D;
826
826
  return t = y * y + n * n + F * F, t > 0 && (t = 1 / Math.sqrt(t), y *= t, n *= t, F *= t), g[0] = y, g[1] = n, g[2] = F, g[3] = 0, g[4] = s * F - h * n, g[5] = h * y - D * F, g[6] = D * n - s * y, g[7] = 0, g[8] = D, g[9] = s, g[10] = h, g[11] = 0, g[12] = C, g[13] = Q, g[14] = E, g[15] = 1, g;
827
827
  }
828
- function VC(g, A) {
829
- var I = g[0], B = g[1], C = g[2], Q = g[3], E = g[4], i = g[5], o = g[6], a = g[7], D = g[8], s = g[9], h = g[10], t = g[11], y = g[12], n = g[13], F = g[14], G = g[15], J = A[0], U = A[1], S = A[2], r = A[3], c = A[4], f = A[5], Z = A[6], j = A[7], b = A[8], z = A[9], iA = A[10], oA = A[11], P = A[12], Tg = A[13], xg = A[14], Wg = A[15];
830
- return Math.abs(I - J) <= T * Math.max(1, Math.abs(I), Math.abs(J)) && Math.abs(B - U) <= T * Math.max(1, Math.abs(B), Math.abs(U)) && Math.abs(C - S) <= T * Math.max(1, Math.abs(C), Math.abs(S)) && Math.abs(Q - r) <= T * Math.max(1, Math.abs(Q), Math.abs(r)) && Math.abs(E - c) <= T * Math.max(1, Math.abs(E), Math.abs(c)) && Math.abs(i - f) <= T * Math.max(1, Math.abs(i), Math.abs(f)) && Math.abs(o - Z) <= T * Math.max(1, Math.abs(o), Math.abs(Z)) && Math.abs(a - j) <= T * Math.max(1, Math.abs(a), Math.abs(j)) && Math.abs(D - b) <= T * Math.max(1, Math.abs(D), Math.abs(b)) && Math.abs(s - z) <= T * Math.max(1, Math.abs(s), Math.abs(z)) && Math.abs(h - iA) <= T * Math.max(1, Math.abs(h), Math.abs(iA)) && Math.abs(t - oA) <= T * Math.max(1, Math.abs(t), Math.abs(oA)) && Math.abs(y - P) <= T * Math.max(1, Math.abs(y), Math.abs(P)) && Math.abs(n - Tg) <= T * Math.max(1, Math.abs(n), Math.abs(Tg)) && Math.abs(F - xg) <= T * Math.max(1, Math.abs(F), Math.abs(xg)) && Math.abs(G - Wg) <= T * Math.max(1, Math.abs(G), Math.abs(Wg));
828
+ function vC(g, A) {
829
+ var I = g[0], B = g[1], C = g[2], Q = g[3], E = g[4], i = g[5], o = g[6], a = g[7], D = g[8], s = g[9], h = g[10], t = g[11], y = g[12], n = g[13], F = g[14], G = g[15], J = A[0], U = A[1], S = A[2], r = A[3], c = A[4], f = A[5], Z = A[6], j = A[7], b = A[8], z = A[9], iA = A[10], oA = A[11], P = A[12], xg = A[13], Wg = A[14], bg = A[15];
830
+ return Math.abs(I - J) <= T * Math.max(1, Math.abs(I), Math.abs(J)) && Math.abs(B - U) <= T * Math.max(1, Math.abs(B), Math.abs(U)) && Math.abs(C - S) <= T * Math.max(1, Math.abs(C), Math.abs(S)) && Math.abs(Q - r) <= T * Math.max(1, Math.abs(Q), Math.abs(r)) && Math.abs(E - c) <= T * Math.max(1, Math.abs(E), Math.abs(c)) && Math.abs(i - f) <= T * Math.max(1, Math.abs(i), Math.abs(f)) && Math.abs(o - Z) <= T * Math.max(1, Math.abs(o), Math.abs(Z)) && Math.abs(a - j) <= T * Math.max(1, Math.abs(a), Math.abs(j)) && Math.abs(D - b) <= T * Math.max(1, Math.abs(D), Math.abs(b)) && Math.abs(s - z) <= T * Math.max(1, Math.abs(s), Math.abs(z)) && Math.abs(h - iA) <= T * Math.max(1, Math.abs(h), Math.abs(iA)) && Math.abs(t - oA) <= T * Math.max(1, Math.abs(t), Math.abs(oA)) && Math.abs(y - P) <= T * Math.max(1, Math.abs(y), Math.abs(P)) && Math.abs(n - xg) <= T * Math.max(1, Math.abs(n), Math.abs(xg)) && Math.abs(F - Wg) <= T * Math.max(1, Math.abs(F), Math.abs(Wg)) && Math.abs(G - bg) <= T * Math.max(1, Math.abs(G), Math.abs(bg));
831
831
  }
832
832
  function d() {
833
833
  var g = new X(3);
@@ -857,7 +857,7 @@ function JA(g, A, I) {
857
857
  function yg(g, A, I) {
858
858
  return g[0] = A[0] - I[0], g[1] = A[1] - I[1], g[2] = A[2] - I[2], g;
859
859
  }
860
- function vC(g, A, I) {
860
+ function XC(g, A, I) {
861
861
  return g[0] = A[0] * I[0], g[1] = A[1] * I[1], g[2] = A[2] * I[2], g;
862
862
  }
863
863
  function vA(g, A, I) {
@@ -866,11 +866,11 @@ function vA(g, A, I) {
866
866
  function jI(g, A, I, B) {
867
867
  return g[0] = A[0] + I[0] * B, g[1] = A[1] + I[1] * B, g[2] = A[2] + I[2] * B, g;
868
868
  }
869
- function Og(g, A) {
869
+ function Vg(g, A) {
870
870
  var I = A[0] - g[0], B = A[1] - g[1], C = A[2] - g[2];
871
871
  return I * I + B * B + C * C;
872
872
  }
873
- function OB(g, A) {
873
+ function VB(g, A) {
874
874
  var I = A[0], B = A[1], C = A[2], Q = I * I + B * B + C * C;
875
875
  return Q > 0 && (Q = 1 / Math.sqrt(Q)), g[0] = A[0] * Q, g[1] = A[1] * Q, g[2] = A[2] * Q, g;
876
876
  }
@@ -885,18 +885,18 @@ function eg(g, A, I) {
885
885
  var B = A[0], C = A[1], Q = A[2], E = I[3] * B + I[7] * C + I[11] * Q + I[15];
886
886
  return E = E || 1, g[0] = (I[0] * B + I[4] * C + I[8] * Q + I[12]) / E, g[1] = (I[1] * B + I[5] * C + I[9] * Q + I[13]) / E, g[2] = (I[2] * B + I[6] * C + I[10] * Q + I[14]) / E, g;
887
887
  }
888
- function VB(g, A, I) {
888
+ function vB(g, A, I) {
889
889
  var B = I[0], C = I[1], Q = I[2], E = I[3], i = A[0], o = A[1], a = A[2], D = C * a - Q * o, s = Q * i - B * a, h = B * o - C * i;
890
890
  return D = D + D, s = s + s, h = h + h, g[0] = i + E * D + C * h - Q * s, g[1] = o + E * s + Q * D - B * h, g[2] = a + E * h + B * s - C * D, g;
891
891
  }
892
- function XC(g) {
892
+ function jC(g) {
893
893
  return g[0] = 0, g[1] = 0, g[2] = 0, g;
894
894
  }
895
895
  function ng(g, A) {
896
896
  var I = g[0], B = g[1], C = g[2], Q = A[0], E = A[1], i = A[2];
897
897
  return Math.abs(I - Q) <= T * Math.max(1, Math.abs(I), Math.abs(Q)) && Math.abs(B - E) <= T * Math.max(1, Math.abs(B), Math.abs(E)) && Math.abs(C - i) <= T * Math.max(1, Math.abs(C), Math.abs(i));
898
898
  }
899
- var zI = yg, jC = tg;
899
+ var zI = yg, zC = tg;
900
900
  (function() {
901
901
  var g = d();
902
902
  return function(A, I, B, C, Q, E) {
@@ -910,7 +910,7 @@ function YA() {
910
910
  var g = new X(4);
911
911
  return X != Float32Array && (g[0] = 0, g[1] = 0, g[2] = 0, g[3] = 0), g;
912
912
  }
913
- function zC(g) {
913
+ function _C(g) {
914
914
  var A = new X(4);
915
915
  return A[0] = g[0], A[1] = g[1], A[2] = g[2], A[3] = g[3], A;
916
916
  }
@@ -918,13 +918,13 @@ function DI(g, A, I, B) {
918
918
  var C = new X(4);
919
919
  return C[0] = g, C[1] = A, C[2] = I, C[3] = B, C;
920
920
  }
921
- function _C(g, A) {
921
+ function $C(g, A) {
922
922
  return g[0] = A[0], g[1] = A[1], g[2] = A[2], g[3] = A[3], g;
923
923
  }
924
- function $C(g, A, I) {
924
+ function AQ(g, A, I) {
925
925
  return g[0] = A[0] * I, g[1] = A[1] * I, g[2] = A[2] * I, g[3] = A[3] * I, g;
926
926
  }
927
- function AQ(g, A) {
927
+ function IQ(g, A) {
928
928
  var I = A[0], B = A[1], C = A[2], Q = A[3], E = I * I + B * B + C * C + Q * Q;
929
929
  return E > 0 && (E = 1 / Math.sqrt(E)), g[0] = I * E, g[1] = B * E, g[2] = C * E, g[3] = Q * E, g;
930
930
  }
@@ -945,12 +945,12 @@ function sI() {
945
945
  var g = new X(4);
946
946
  return X != Float32Array && (g[0] = 0, g[1] = 0, g[2] = 0), g[3] = 1, g;
947
947
  }
948
- function IQ(g, A, I) {
948
+ function gQ(g, A, I) {
949
949
  I = I * 0.5;
950
950
  var B = Math.sin(I);
951
951
  return g[0] = B * A[0], g[1] = B * A[1], g[2] = B * A[2], g[3] = Math.cos(I), g;
952
952
  }
953
- function gQ(g, A, I) {
953
+ function BQ(g, A, I) {
954
954
  var B = A[0], C = A[1], Q = A[2], E = A[3], i = I[0], o = I[1], a = I[2], D = I[3];
955
955
  return g[0] = B * D + E * i + C * a - Q * o, g[1] = C * D + E * o + Q * i - B * a, g[2] = Q * D + E * a + B * o - C * i, g[3] = E * D - B * i - C * o - Q * a, g;
956
956
  }
@@ -970,12 +970,12 @@ function Gg(g, A) {
970
970
  }
971
971
  return g;
972
972
  }
973
- var BQ = zC, CQ = _C, JI = AQ;
973
+ var CQ = _C, QQ = $C, JI = IQ;
974
974
  (function() {
975
975
  var g = d(), A = p(1, 0, 0), I = p(0, 1, 0);
976
976
  return function(B, C, Q) {
977
977
  var E = aI(C, Q);
978
- return E < -0.999999 ? (EI(g, A, C), jC(g) < 1e-6 && EI(g, I, C), OB(g, g), IQ(B, g, Math.PI), B) : E > 0.999999 ? (B[0] = 0, B[1] = 0, B[2] = 0, B[3] = 1, B) : (EI(g, C, Q), B[0] = g[0], B[1] = g[1], B[2] = g[2], B[3] = 1 + E, JI(B, B));
978
+ return E < -0.999999 ? (EI(g, A, C), zC(g) < 1e-6 && EI(g, I, C), VB(g, g), gQ(B, g, Math.PI), B) : E > 0.999999 ? (B[0] = 0, B[1] = 0, B[2] = 0, B[3] = 1, B) : (EI(g, C, Q), B[0] = g[0], B[1] = g[1], B[2] = g[2], B[3] = 1 + E, JI(B, B));
979
979
  };
980
980
  })();
981
981
  (function() {
@@ -985,16 +985,16 @@ var BQ = zC, CQ = _C, JI = AQ;
985
985
  };
986
986
  })();
987
987
  (function() {
988
- var g = ZB();
988
+ var g = PB();
989
989
  return function(A, I, B, C) {
990
990
  return g[0] = B[0], g[3] = B[1], g[6] = B[2], g[1] = C[0], g[4] = C[1], g[7] = C[2], g[2] = -I[0], g[5] = -I[1], g[8] = -I[2], JI(A, Gg(A, g));
991
991
  };
992
992
  })();
993
- function vB() {
993
+ function XB() {
994
994
  var g = new X(2);
995
995
  return X != Float32Array && (g[0] = 0, g[1] = 0), g;
996
996
  }
997
- function Vg(g) {
997
+ function vg(g) {
998
998
  var A = new X(2);
999
999
  return A[0] = g[0], A[1] = g[1], A;
1000
1000
  }
@@ -1002,19 +1002,19 @@ function V(g, A) {
1002
1002
  var I = new X(2);
1003
1003
  return I[0] = g, I[1] = A, I;
1004
1004
  }
1005
- function QQ(g, A) {
1005
+ function EQ(g, A) {
1006
1006
  var I = A[0] - g[0], B = A[1] - g[1];
1007
1007
  return Math.sqrt(I * I + B * B);
1008
1008
  }
1009
- function EQ(g) {
1009
+ function iQ(g) {
1010
1010
  var A = g[0], I = g[1];
1011
1011
  return A * A + I * I;
1012
1012
  }
1013
- function iQ(g, A, I, B) {
1013
+ function oQ(g, A, I, B) {
1014
1014
  var C = A[0], Q = A[1];
1015
1015
  return g[0] = C + B * (I[0] - C), g[1] = Q + B * (I[1] - Q), g;
1016
1016
  }
1017
- function vg(g, A) {
1017
+ function Xg(g, A) {
1018
1018
  return g[0] === A[0] && g[1] === A[1];
1019
1019
  }
1020
1020
  function mI(g, A) {
@@ -1022,7 +1022,7 @@ function mI(g, A) {
1022
1022
  return Math.abs(I - C) <= T * Math.max(1, Math.abs(I), Math.abs(C)) && Math.abs(B - Q) <= T * Math.max(1, Math.abs(B), Math.abs(Q));
1023
1023
  }
1024
1024
  (function() {
1025
- var g = vB();
1025
+ var g = XB();
1026
1026
  return function(A, I, B, C, Q, E) {
1027
1027
  var i, o;
1028
1028
  for (I || (I = 2), B || (B = 0), C ? o = Math.min(C * I + B, A.length) : o = A.length, i = B; i < o; i += I)
@@ -1072,7 +1072,7 @@ class SA {
1072
1072
  eg(Q, E, A), this.expandWithPoint(Q);
1073
1073
  }
1074
1074
  }
1075
- const oQ = {
1075
+ const aQ = {
1076
1076
  position: 0,
1077
1077
  normal: 1,
1078
1078
  uv: 2,
@@ -1135,7 +1135,7 @@ class mA extends hg {
1135
1135
  return this.attributes_.find((I) => I.type === A);
1136
1136
  }
1137
1137
  }
1138
- class aQ {
1138
+ class DQ {
1139
1139
  gl_;
1140
1140
  buffers_ = /* @__PURE__ */ new Map();
1141
1141
  currentGeometry_ = null;
@@ -1171,7 +1171,7 @@ class aQ {
1171
1171
  this.gl_.bindBuffer(C, Q), this.gl_.bufferData(C, B, this.gl_.STATIC_DRAW);
1172
1172
  const { attributes: E, strideBytes: i } = A;
1173
1173
  E.forEach((D) => {
1174
- const s = oQ[D.type];
1174
+ const s = aQ[D.type];
1175
1175
  this.gl_.vertexAttribPointer(
1176
1176
  s,
1177
1177
  D.itemSize,
@@ -1190,7 +1190,7 @@ class aQ {
1190
1190
  this.buffers_.set(A, o), this.gl_.bindVertexArray(null);
1191
1191
  }
1192
1192
  }
1193
- function DQ(g) {
1193
+ function sQ(g) {
1194
1194
  return g === 1 || g === 2 || g === 4 || g === 8;
1195
1195
  }
1196
1196
  function wg(g) {
@@ -1210,7 +1210,7 @@ function wg(g) {
1210
1210
  return "float";
1211
1211
  throw new Error("Unsupported buffer type.");
1212
1212
  }
1213
- function sQ(g) {
1213
+ function hQ(g) {
1214
1214
  switch (g.dataFormat) {
1215
1215
  case "scalar":
1216
1216
  return 1;
@@ -1220,7 +1220,7 @@ function sQ(g) {
1220
1220
  return 4;
1221
1221
  }
1222
1222
  }
1223
- function hQ(g) {
1223
+ function tQ(g) {
1224
1224
  switch (g.dataType) {
1225
1225
  case "byte":
1226
1226
  case "unsigned_byte":
@@ -1235,13 +1235,13 @@ function hQ(g) {
1235
1235
  }
1236
1236
  }
1237
1237
  function _I(g) {
1238
- const A = sQ(g) * hQ(g), I = Math.max(1, g.mipmapLevels);
1238
+ const A = hQ(g) * tQ(g), I = Math.max(1, g.mipmapLevels);
1239
1239
  let B = Math.max(1, g.width), C = Math.max(1, g.height), Q = Math.max(1, g.depth), E = 0;
1240
1240
  for (let i = 0; i < I; ++i)
1241
1241
  E += A * Q * B * C, B = Math.max(1, B >> 1), C = Math.max(1, C >> 1), g.type === "Texture3D" && (Q = Math.max(1, Q >> 1));
1242
1242
  return E;
1243
1243
  }
1244
- function tQ(g) {
1244
+ function yQ(g) {
1245
1245
  if (g.dataFormat === "rgb" || g.dataFormat === "rgba")
1246
1246
  return [0, 1];
1247
1247
  switch (g.dataType) {
@@ -1292,7 +1292,7 @@ class Fg extends hg {
1292
1292
  return "Texture";
1293
1293
  }
1294
1294
  }
1295
- class yQ {
1295
+ class eQ {
1296
1296
  gl_;
1297
1297
  textures_ = /* @__PURE__ */ new Map();
1298
1298
  currentTexture_ = null;
@@ -1564,7 +1564,7 @@ class AA {
1564
1564
  * the first element, and avoids biasing toward (0,0).
1565
1565
  */
1566
1566
  constructor(A, I) {
1567
- this.min = A ? Vg(A) : V(1 / 0, 1 / 0), this.max = I ? Vg(I) : V(-1 / 0, -1 / 0);
1567
+ this.min = A ? vg(A) : V(1 / 0, 1 / 0), this.max = I ? vg(I) : V(-1 / 0, -1 / 0);
1568
1568
  }
1569
1569
  clone() {
1570
1570
  return new AA(this.min, this.max);
@@ -1577,7 +1577,7 @@ class AA {
1577
1577
  return !(A.max[0] <= I.min[0] || A.min[0] >= I.max[0] || A.max[1] <= I.min[1] || A.min[1] >= I.max[1]);
1578
1578
  }
1579
1579
  static equals(A, I) {
1580
- return vg(A.min, I.min) && vg(A.max, I.max);
1580
+ return Xg(A.min, I.min) && Xg(A.max, I.max);
1581
1581
  }
1582
1582
  floor() {
1583
1583
  return new AA(
@@ -1590,7 +1590,7 @@ class AA {
1590
1590
  return { x: A, y: I, width: B, height: C };
1591
1591
  }
1592
1592
  }
1593
- class eQ {
1593
+ class nQ {
1594
1594
  gl_;
1595
1595
  enabledCapabilities_ = /* @__PURE__ */ new Map();
1596
1596
  depthMaskEnabled_ = null;
@@ -1696,8 +1696,8 @@ class eQ {
1696
1696
  (this.stencilFunc_ !== A || this.stencilRef_ !== I || this.stencilFuncMask_ !== B) && (this.gl_.stencilFunc(A, I, B), this.stencilFunc_ = A, this.stencilRef_ = I, this.stencilFuncMask_ = B);
1697
1697
  }
1698
1698
  }
1699
- const nQ = PB($(), [1, -1, 1]);
1700
- class GQ extends RC {
1699
+ const GQ = OB($(), [1, -1, 1]);
1700
+ class wQ extends NC {
1701
1701
  gl_;
1702
1702
  programs_;
1703
1703
  bindings_;
@@ -1718,7 +1718,7 @@ class GQ extends RC {
1718
1718
  this.gl_ = I, k.info(
1719
1719
  "WebGLRenderer",
1720
1720
  `WebGL version ${I.getParameter(I.VERSION)}`
1721
- ), I.getExtension("EXT_color_buffer_float"), this.programs_ = new lC(I), this.bindings_ = new aQ(I), this.textures_ = new yQ(I), this.state_ = new eQ(I), this.initStencil(), this.resize(this.canvas.width, this.canvas.height);
1721
+ ), I.getExtension("EXT_color_buffer_float"), this.programs_ = new fC(I), this.bindings_ = new DQ(I), this.textures_ = new eQ(I), this.state_ = new nQ(I), this.initStencil(), this.resize(this.canvas.width, this.canvas.height);
1722
1722
  }
1723
1723
  get gpuTextureBytes() {
1724
1724
  return this.textures_.gpuTextureBytes;
@@ -1805,7 +1805,7 @@ class GQ extends RC {
1805
1805
  I.transform.matrix
1806
1806
  ), i = vI(
1807
1807
  $(),
1808
- nQ,
1808
+ GQ,
1809
1809
  Q.projectionMatrix
1810
1810
  ), o = this.currentViewportSize_, a = I.getUniforms(), s = {
1811
1811
  ...B.getUniforms(),
@@ -1890,7 +1890,7 @@ function ZA(g, A) {
1890
1890
  const I = g.priority ?? Number.MAX_SAFE_INTEGER, B = A.priority ?? Number.MAX_SAFE_INTEGER;
1891
1891
  return I === B ? (g.orderKey ?? Number.MAX_SAFE_INTEGER) - (A.orderKey ?? Number.MAX_SAFE_INTEGER) : I - B;
1892
1892
  }
1893
- class wQ {
1893
+ class FQ {
1894
1894
  maxConcurrent_;
1895
1895
  pending_ = [];
1896
1896
  running_ = /* @__PURE__ */ new Map();
@@ -1940,16 +1940,16 @@ class wQ {
1940
1940
  }
1941
1941
  }
1942
1942
  let hI = 0, tI = 0;
1943
- function FQ(g, A) {
1943
+ function rQ(g, A) {
1944
1944
  g.data && (hI -= g.data.byteLength, tI -= 1), g.data = A, hI += A.byteLength, tI += 1;
1945
1945
  }
1946
- function Xg(g) {
1946
+ function jg(g) {
1947
1947
  g.data && (hI -= g.data.byteLength, tI -= 1), g.data = void 0, g.texture?.releaseCpuData();
1948
1948
  }
1949
- function rQ() {
1949
+ function SQ() {
1950
1950
  return { cpuChunkBytes: hI, cpuChunkCount: tI };
1951
1951
  }
1952
- function jg(g, A, I = 1e-6) {
1952
+ function zg(g, A, I = 1e-6) {
1953
1953
  return Math.abs(g - A) <= I;
1954
1954
  }
1955
1955
  const W = {
@@ -1970,7 +1970,7 @@ function MA(g) {
1970
1970
  function dA(g) {
1971
1971
  const A = d(), I = d();
1972
1972
  A[W[g.u]] = 1, I[W[g.v]] = 1;
1973
- const B = EI(d(), A, I), C = uC(
1973
+ const B = EI(d(), A, I), C = TC(
1974
1974
  A[0],
1975
1975
  A[1],
1976
1976
  A[2],
@@ -1983,7 +1983,7 @@ function dA(g) {
1983
1983
  ), Q = Gg(sI(), C);
1984
1984
  return JI(Q, Q);
1985
1985
  }
1986
- const zg = [
1986
+ const _g = [
1987
1987
  Int8Array,
1988
1988
  Int16Array,
1989
1989
  Int32Array,
@@ -1992,32 +1992,32 @@ const zg = [
1992
1992
  Uint32Array,
1993
1993
  Float32Array
1994
1994
  ];
1995
- function SQ(g) {
1996
- if (zg.some((I) => g instanceof I))
1995
+ function RQ(g) {
1996
+ if (_g.some((I) => g instanceof I))
1997
1997
  return !0;
1998
- const A = zg.map((I) => I.name);
1998
+ const A = _g.map((I) => I.name);
1999
1999
  return k.debug(
2000
2000
  "Chunk",
2001
2001
  `Unsupported chunk data type: ${g}. Supported data types: ${A}`
2002
2002
  ), !1;
2003
2003
  }
2004
- function RQ(g, A) {
2004
+ function NQ(g, A) {
2005
2005
  return Math.round((A - g.translation) / g.scale);
2006
2006
  }
2007
- function XB(g, A) {
2007
+ function jB(g, A) {
2008
2008
  const I = d(), B = d();
2009
2009
  for (const Q of ["x", "y", "z"]) {
2010
2010
  const E = Q === A.w ? 0.5 * g.scale[Q] : 0, i = W[Q];
2011
2011
  I[i] = 1 / (g.scale[Q] * g.shape[Q]), B[i] = E - g.offset[Q];
2012
2012
  }
2013
- const C = PB($(), I);
2014
- return TC(C, C, B);
2013
+ const C = OB($(), I);
2014
+ return xC(C, C, B);
2015
2015
  }
2016
2016
  function hA(g, A, I) {
2017
2017
  return Math.max(A, Math.min(I, g));
2018
2018
  }
2019
2019
  const YI = Symbol("INTERNAL_POLICY_KEY");
2020
- class NQ {
2020
+ class cQ {
2021
2021
  store_;
2022
2022
  policy_;
2023
2023
  policyChanged_ = !1;
@@ -2044,7 +2044,7 @@ class NQ {
2044
2044
  `Source is missing dimensions for slice plane axes "${this.axes_.u}" and "${this.axes_.v}"`
2045
2045
  );
2046
2046
  const i = Q.lods[0], o = E.lods[0];
2047
- this.scale0_ = i.scale, this.sourceMaxSquareDistance2D_ = EQ(
2047
+ this.scale0_ = i.scale, this.sourceMaxSquareDistance2D_ = iQ(
2048
2048
  V(i.size * i.scale, o.size * o.scale)
2049
2049
  );
2050
2050
  }
@@ -2087,8 +2087,8 @@ class NQ {
2087
2087
  ), this.chunkViewStates_.forEach(bA);
2088
2088
  return;
2089
2089
  }
2090
- const s = vB();
2091
- iQ(s, B.min, B.max, 0.5);
2090
+ const s = XB();
2091
+ oQ(s, B.min, B.max, 0.5);
2092
2092
  const h = this.makeViewBounds3D(B, o);
2093
2093
  this.chunkViewStates_.forEach(bA);
2094
2094
  const t = this.channelsOfInterest(A), y = this.fallbackLOD(), n = this.getPaddedBounds(h), F = this.currentLOD_ === y ? [this.currentLOD_] : [this.currentLOD_, y];
@@ -2298,7 +2298,7 @@ class NQ {
2298
2298
  }
2299
2299
  timeIndex(A) {
2300
2300
  const I = this.store_.dimensions.t;
2301
- return A.t === void 0 || I === void 0 ? 0 : RQ(I.lods[0], A.t);
2301
+ return A.t === void 0 || I === void 0 ? 0 : NQ(I.lods[0], A.t);
2302
2302
  }
2303
2303
  getSliceAxisBounds(A) {
2304
2304
  const I = this.store_.dimensions[this.axes_.w];
@@ -2326,7 +2326,7 @@ class NQ {
2326
2326
  return this.lastViewBounds2D_ === null || !mI(this.lastViewBounds2D_.min, A.min) || !mI(this.lastViewBounds2D_.max, A.max);
2327
2327
  }
2328
2328
  hasViewProjectionChanged(A) {
2329
- return this.lastViewProjection_ === null || !VC(this.lastViewProjection_, A);
2329
+ return this.lastViewProjection_ === null || !vC(this.lastViewProjection_, A);
2330
2330
  }
2331
2331
  sliceBoundsChanged(A) {
2332
2332
  return !this.lastSliceBounds_ || !mI(this.lastSliceBounds_, A);
@@ -2352,7 +2352,7 @@ class NQ {
2352
2352
  function bA(g) {
2353
2353
  g.visible = !1, g.prefetch = !1, g.priority = null, g.orderKey = null;
2354
2354
  }
2355
- class cQ {
2355
+ class UQ {
2356
2356
  // Chunks indexed as chunks_[lod][t][c][z][y][x].
2357
2357
  chunks_;
2358
2358
  lowestResLOD_;
@@ -2432,7 +2432,7 @@ class cQ {
2432
2432
  return this.lowestResLOD_;
2433
2433
  }
2434
2434
  addView(A, I) {
2435
- const B = new NQ(this, A, I);
2435
+ const B = new cQ(this, A, I);
2436
2436
  return this.views_.push(B), this.hasHadViews_ = !0, B;
2437
2437
  }
2438
2438
  get views() {
@@ -2470,7 +2470,7 @@ class cQ {
2470
2470
  const A = this.dimensions_.x, I = this.dimensions_.y;
2471
2471
  for (let B = 1; B < this.dimensions_.numLods; B++) {
2472
2472
  const C = A.lods[B].scale / A.lods[B - 1].scale, Q = I.lods[B].scale / I.lods[B - 1].scale;
2473
- if (!jg(C, 2, 0.02) || !jg(Q, 2, 0.02))
2473
+ if (!zg(C, 2, 0.02) || !zg(Q, 2, 0.02))
2474
2474
  throw new Error(
2475
2475
  `Invalid downsampling factor between levels ${B - 1} → ${B}: expected (2× in X and Y), but got (${C.toFixed(2)}×, ${Q.toFixed(2)}×) from scale [${A.lods[B - 1].scale}, ${I.lods[B - 1].scale}] → [${A.lods[B].scale}, ${I.lods[B].scale}]`
2476
2476
  );
@@ -2546,8 +2546,8 @@ class rg extends Fg {
2546
2546
  return B.unpackAlignment = A.rowAlignmentBytes, B;
2547
2547
  }
2548
2548
  }
2549
- const UQ = 8, kQ = 4;
2550
- class LQ {
2549
+ const kQ = 8, LQ = 4;
2550
+ class JQ {
2551
2551
  stores_ = [];
2552
2552
  queue_;
2553
2553
  uploadTexture_;
@@ -2556,8 +2556,8 @@ class LQ {
2556
2556
  memoryLimitBytes_;
2557
2557
  maxGpuUploadsPerUpdate_;
2558
2558
  resident_ = /* @__PURE__ */ new Set();
2559
- constructor(A, I, B = () => 0, C = 1 / 0, Q = UQ, E = kQ) {
2560
- this.uploadTexture_ = A, this.disposeTexture_ = I, this.getGpuResidentBytes_ = B, this.memoryLimitBytes_ = C, this.maxGpuUploadsPerUpdate_ = Math.max(1, E), this.queue_ = new wQ(Q);
2559
+ constructor(A, I, B = () => 0, C = 1 / 0, Q = kQ, E = LQ) {
2560
+ this.uploadTexture_ = A, this.disposeTexture_ = I, this.getGpuResidentBytes_ = B, this.memoryLimitBytes_ = C, this.maxGpuUploadsPerUpdate_ = Math.max(1, E), this.queue_ = new FQ(Q);
2561
2561
  }
2562
2562
  get memoryLimitBytes() {
2563
2563
  return this.memoryLimitBytes_;
@@ -2572,11 +2572,11 @@ class LQ {
2572
2572
  };
2573
2573
  }
2574
2574
  get memoryStats() {
2575
- return rQ();
2575
+ return SQ();
2576
2576
  }
2577
2577
  addView(A, I, B) {
2578
2578
  let C = this.stores_.find((Q) => Q.source === A)?.store;
2579
- return C || (C = new cQ(A.loader.getSourceDimensionMap()), this.stores_.push({ source: A, store: C })), C.addView(I, B);
2579
+ return C || (C = new UQ(A.loader.getSourceDimensionMap()), this.stores_.push({ source: A, store: C })), C.addView(I, B);
2580
2580
  }
2581
2581
  update() {
2582
2582
  const A = [];
@@ -2595,7 +2595,7 @@ class LQ {
2595
2595
  A.releasedAt ??= performance.now();
2596
2596
  return;
2597
2597
  }
2598
- Xg(A), A.state === "loaded" && (A.state = "unloaded");
2598
+ jg(A), A.state === "loaded" && (A.state = "unloaded");
2599
2599
  }
2600
2600
  enqueueWithinBudget(A) {
2601
2601
  if (A.length === 0) return;
@@ -2644,7 +2644,7 @@ class LQ {
2644
2644
  const B = Math.min(I.length, this.maxGpuUploadsPerUpdate_);
2645
2645
  for (let C = 0; C < B; C++) {
2646
2646
  const Q = I[C], E = rg.createWithChunk(Q);
2647
- this.uploadTexture_(E), Q.texture = E, this.resident_.add(Q), Xg(Q);
2647
+ this.uploadTexture_(E), Q.texture = E, this.resident_.add(Q), jg(Q);
2648
2648
  }
2649
2649
  }
2650
2650
  disposeChunkTexture(A) {
@@ -2703,7 +2703,7 @@ VA.Panel = function(g, A, I, B) {
2703
2703
  }
2704
2704
  };
2705
2705
  };
2706
- function JQ({ scale: g } = { scale: 1.5 }) {
2706
+ function YQ({ scale: g } = { scale: 1.5 }) {
2707
2707
  const A = new VA(g);
2708
2708
  return A.showPanel(
2709
2709
  0
@@ -2717,10 +2717,10 @@ const $I = [
2717
2717
  "pointercancel",
2718
2718
  "wheel"
2719
2719
  ];
2720
- function YQ(g) {
2720
+ function MQ(g) {
2721
2721
  return $I.includes(g);
2722
2722
  }
2723
- class MQ {
2723
+ class dQ {
2724
2724
  propagationStopped_ = !1;
2725
2725
  type;
2726
2726
  event;
@@ -2737,7 +2737,7 @@ class MQ {
2737
2737
  this.propagationStopped_ = !0;
2738
2738
  }
2739
2739
  }
2740
- class dQ {
2740
+ class KQ {
2741
2741
  listeners_ = [];
2742
2742
  element_;
2743
2743
  isConnected_ = !1;
@@ -2782,31 +2782,31 @@ class dQ {
2782
2782
  });
2783
2783
  }
2784
2784
  handleEvent = (A) => {
2785
- if (!YQ(A.type)) {
2785
+ if (!MQ(A.type)) {
2786
2786
  k.error("EventDispatcher", `Unsupported event type ${A.type}`);
2787
2787
  return;
2788
2788
  }
2789
- const I = new MQ(A.type, A);
2789
+ const I = new dQ(A.type, A);
2790
2790
  for (const B of this.listeners_)
2791
2791
  if (B(I), I.propagationStopped) break;
2792
2792
  };
2793
2793
  }
2794
- const KQ = 1e-12;
2795
- class HQ {
2794
+ const HQ = 1e-12;
2795
+ class qQ {
2796
2796
  origin;
2797
2797
  direction;
2798
2798
  constructor(A, I) {
2799
- this.origin = DA(A), this.direction = OB(d(), I);
2799
+ this.origin = DA(A), this.direction = VB(d(), I);
2800
2800
  }
2801
2801
  intersectWithPlane(A) {
2802
2802
  const I = aI(this.direction, A.normal);
2803
- if (Math.abs(I) < KQ)
2803
+ if (Math.abs(I) < HQ)
2804
2804
  return null;
2805
2805
  const B = -A.signedDistanceToPoint(this.origin) / I;
2806
2806
  return jI(d(), this.origin, this.direction, B);
2807
2807
  }
2808
2808
  }
2809
- class qQ {
2809
+ class lQ {
2810
2810
  id;
2811
2811
  element;
2812
2812
  camera;
@@ -2818,12 +2818,12 @@ class qQ {
2818
2818
  context_;
2819
2819
  layers_ = [];
2820
2820
  constructor(A) {
2821
- this.id = A.id, this.element = A.element, this.camera = A.camera, this.context_ = A.context, this.cameraControls = A.cameraControls, this.updateAspectRatio(), this.events = new dQ(this.element), this.events.addEventListener((I) => {
2821
+ this.id = A.id, this.element = A.element, this.camera = A.camera, this.context_ = A.context, this.cameraControls = A.cameraControls, this.updateAspectRatio(), this.events = new KQ(this.element), this.events.addEventListener((I) => {
2822
2822
  if (I.event instanceof PointerEvent || I.event instanceof WheelEvent) {
2823
2823
  const { clientX: B, clientY: C } = I.event, Q = V(B, C);
2824
2824
  I.clipPos = this.clientToClip(Q, 0), I.worldPos = this.camera.clipToWorld(I.clipPos);
2825
2825
  const E = this.camera.clipToWorld(this.clientToClip(Q, -1)), i = this.camera.clipToWorld(this.clientToClip(Q, 1));
2826
- I.worldRay = new HQ(E, yg(d(), i, E));
2826
+ I.worldRay = new qQ(E, yg(d(), i, E));
2827
2827
  }
2828
2828
  for (const B of this.layers_)
2829
2829
  if (B.onEvent(I), I.propagationStopped) return;
@@ -2894,7 +2894,7 @@ class qQ {
2894
2894
  this.camera.setAspectRatio(B);
2895
2895
  }
2896
2896
  }
2897
- function jB(g, A) {
2897
+ function zB(g, A) {
2898
2898
  for (const I of A) {
2899
2899
  if (I.id === g.id)
2900
2900
  throw new Error(
@@ -2908,23 +2908,23 @@ function jB(g, A) {
2908
2908
  }
2909
2909
  }
2910
2910
  }
2911
- function lQ(g) {
2911
+ function fQ(g) {
2912
2912
  for (let A = 0; A < g.length; A++)
2913
- jB(g[A], g.slice(0, A));
2913
+ zB(g[A], g.slice(0, A));
2914
2914
  }
2915
- function _g(g, A, I) {
2915
+ function $g(g, A, I) {
2916
2916
  const B = g.map((C) => {
2917
2917
  const Q = C.element ?? A;
2918
2918
  return {
2919
2919
  ...C,
2920
2920
  element: Q,
2921
- id: C.id ?? Q.id ?? bB("viewport"),
2921
+ id: C.id ?? Q.id ?? ZB("viewport"),
2922
2922
  context: I
2923
2923
  };
2924
2924
  });
2925
- return lQ(B), B.map((C) => new qQ(C));
2925
+ return fQ(B), B.map((C) => new lQ(C));
2926
2926
  }
2927
- class fQ {
2927
+ class pQ {
2928
2928
  elements_;
2929
2929
  resizeObserver_;
2930
2930
  mediaQuery_;
@@ -2983,8 +2983,8 @@ class fQ {
2983
2983
  this.elements_.splice(I, 1), this.resizeObserver_ && this.resizeObserver_.unobserve(A);
2984
2984
  }
2985
2985
  }
2986
- const pQ = 2048;
2987
- class ho {
2986
+ const mQ = 2048;
2987
+ class to {
2988
2988
  chunkManager_;
2989
2989
  context_;
2990
2990
  renderer_;
@@ -3011,7 +3011,7 @@ class ho {
3011
3011
  *
3012
3012
  * @example
3013
3013
  * // Single viewport (element defaults to canvas)
3014
- * const camera = new OrthographicCamera(0, 1024, 0, 1024);
3014
+ * const camera = new OrthographicCamera({ left: 0, right: 1024, top: 0, bottom: 1024 });
3015
3015
  * const idetik = new Idetik({
3016
3016
  * canvas: document.querySelector('canvas')!,
3017
3017
  * viewports: [{
@@ -3043,30 +3043,30 @@ class ho {
3043
3043
  *
3044
3044
  * @throws {Error} If viewports have duplicate IDs or shared elements
3045
3045
  */
3046
- constructor(A, I) {
3047
- this.canvas = A.canvas, this.renderer_ = I ?? new GQ(this.canvas);
3048
- const C = (A.memoryLimitMB ?? pQ) * 1024 * 1024;
3049
- this.chunkManager_ = new LQ(
3050
- (E) => this.renderer_.uploadTexture(E),
3051
- (E) => this.renderer_.disposeTexture(E),
3046
+ constructor(A) {
3047
+ this.canvas = A.canvas, this.renderer_ = new wQ(this.canvas);
3048
+ const B = (A.memoryLimitMB ?? mQ) * 1024 * 1024;
3049
+ this.chunkManager_ = new JQ(
3050
+ (Q) => this.renderer_.uploadTexture(Q),
3051
+ (Q) => this.renderer_.disposeTexture(Q),
3052
3052
  () => this.renderer_.gpuTextureBytes,
3053
- C,
3053
+ B,
3054
3054
  A.maxConcurrentRequests,
3055
3055
  A.maxGpuUploadsPerUpdate
3056
3056
  ), this.context_ = {
3057
3057
  chunkManager: this.chunkManager_
3058
- }, this.viewports_ = _g(
3058
+ }, this.viewports_ = $g(
3059
3059
  A.viewports ?? [],
3060
3060
  this.canvas,
3061
3061
  this.context_
3062
- ), this.overlays = [...A.overlays ?? []], A.showStats && (this.stats_ = JQ());
3063
- const Q = [this.canvas];
3064
- for (const E of this.viewports_)
3065
- E.element !== this.canvas && Q.push(E.element);
3066
- this.sizeObserver_ = new fQ(Q, () => {
3062
+ ), this.overlays = [...A.overlays ?? []], A.showStats && (this.stats_ = YQ());
3063
+ const C = [this.canvas];
3064
+ for (const Q of this.viewports_)
3065
+ Q.element !== this.canvas && C.push(Q.element);
3066
+ this.sizeObserver_ = new pQ(C, () => {
3067
3067
  this.renderer_.updateSize(), this.renderer_.beginFrame();
3068
- for (const E of this.viewports_)
3069
- E.updateSize(), this.renderer_.render(E);
3068
+ for (const Q of this.viewports_)
3069
+ Q.updateSize(), this.renderer_.render(Q);
3070
3070
  });
3071
3071
  }
3072
3072
  get chunkQueueStats() {
@@ -3101,8 +3101,8 @@ class ho {
3101
3101
  return this.viewports_.find((I) => I.id === A);
3102
3102
  }
3103
3103
  addViewport(A) {
3104
- const [I] = _g([A], this.canvas, this.context_);
3105
- return jB(I, this.viewports_), this.viewports_.push(I), this.running && (I.events.connect(), I.element !== this.canvas && this.sizeObserver_.observe(I.element)), k.info("Idetik", `Added viewport "${I.id}"`), I;
3104
+ const [I] = $g([A], this.canvas, this.context_);
3105
+ return zB(I, this.viewports_), this.viewports_.push(I), this.running && (I.events.connect(), I.element !== this.canvas && this.sizeObserver_.observe(I.element)), k.info("Idetik", `Added viewport "${I.id}"`), I;
3106
3106
  }
3107
3107
  removeViewport(A) {
3108
3108
  const I = this.viewports_.indexOf(A);
@@ -3157,7 +3157,7 @@ class ho {
3157
3157
  }
3158
3158
  }
3159
3159
  }
3160
- function mQ(g, A) {
3160
+ function uQ(g, A) {
3161
3161
  return {
3162
3162
  ...g,
3163
3163
  ...A,
@@ -3167,13 +3167,13 @@ function mQ(g, A) {
3167
3167
  }
3168
3168
  };
3169
3169
  }
3170
- function $g(g, A) {
3170
+ function AB(g, A) {
3171
3171
  const I = typeof g == "string" ? new URL(g) : g;
3172
3172
  I.pathname.endsWith("/") || (I.pathname += "/");
3173
3173
  const B = new URL(A.slice(1), I);
3174
3174
  return B.search = I.search, B;
3175
3175
  }
3176
- async function AB(g) {
3176
+ async function IB(g) {
3177
3177
  if (g.status !== 404) {
3178
3178
  if (g.status === 200 || g.status === 206)
3179
3179
  return new Uint8Array(await g.arrayBuffer());
@@ -3189,14 +3189,14 @@ class $A {
3189
3189
  this.url = A, this.#A = I.fetch ?? ((B) => fetch(B)), this.#I = I.overrides ?? {}, this.#g = I.useSuffixRequest ?? !1;
3190
3190
  }
3191
3191
  #B(A, I) {
3192
- return new Request(A, mQ(this.#I, I));
3192
+ return new Request(A, uQ(this.#I, I));
3193
3193
  }
3194
3194
  async get(A, I = {}) {
3195
- let B = $g(this.url, A).href, C = this.#B(B, I), Q = await this.#A(C);
3196
- return AB(Q);
3195
+ let B = AB(this.url, A).href, C = this.#B(B, I), Q = await this.#A(C);
3196
+ return IB(Q);
3197
3197
  }
3198
3198
  async getRange(A, I, B = {}) {
3199
- let C = $g(this.url, A), Q;
3199
+ let C = AB(this.url, A), Q;
3200
3200
  if ("suffixLength" in I)
3201
3201
  Q = await this.#C(C, I.suffixLength, B);
3202
3202
  else {
@@ -3209,7 +3209,7 @@ class $A {
3209
3209
  }, i = this.#B(C, E);
3210
3210
  Q = await this.#A(i);
3211
3211
  }
3212
- return AB(Q);
3212
+ return IB(Q);
3213
3213
  }
3214
3214
  async #C(A, I, B) {
3215
3215
  if (this.#g) {
@@ -3254,7 +3254,7 @@ class v extends AI {
3254
3254
  super(A, { cause: I.cause }), this.path = I.path;
3255
3255
  }
3256
3256
  }
3257
- class uQ extends AI {
3257
+ class TQ extends AI {
3258
3258
  _tag = "UnknownCodecError";
3259
3259
  name = "UnknownCodecError";
3260
3260
  codec;
@@ -3262,7 +3262,7 @@ class uQ extends AI {
3262
3262
  super(`Unknown codec: ${A}`), this.codec = A;
3263
3263
  }
3264
3264
  }
3265
- class TQ extends AI {
3265
+ class xQ extends AI {
3266
3266
  _tag = "CodecPipelineError";
3267
3267
  name = "CodecPipelineError";
3268
3268
  direction;
@@ -3312,7 +3312,7 @@ class yI {
3312
3312
  function Rg(g) {
3313
3313
  return g instanceof ArrayBuffer || g instanceof SharedArrayBuffer;
3314
3314
  }
3315
- class zB {
3315
+ class _B {
3316
3316
  #A;
3317
3317
  constructor(A, I, B) {
3318
3318
  typeof A == "number" ? this.#A = new Uint8Array(A) : Rg(A) ? this.#A = new Uint8Array(A, I, B) : this.#A = new Uint8Array(Array.from(A, (C) => C ? 1 : 0));
@@ -3451,11 +3451,11 @@ class II {
3451
3451
  yield this.get(A);
3452
3452
  }
3453
3453
  }
3454
- function xQ() {
3454
+ function WQ() {
3455
3455
  if (typeof SharedArrayBuffer > "u")
3456
3456
  throw new Error("SharedArrayBuffer is not available. In browsers, this requires Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy headers to be set.");
3457
3457
  }
3458
- function WQ(g, A) {
3458
+ function bQ(g, A) {
3459
3459
  return new SharedArrayBuffer(g);
3460
3460
  }
3461
3461
  function gI(g) {
@@ -3466,7 +3466,7 @@ function gI(g) {
3466
3466
  throw new v("Failed to decode JSON", { cause: I });
3467
3467
  }
3468
3468
  }
3469
- function IB(g, A) {
3469
+ function gB(g, A) {
3470
3470
  const I = A / 2, B = A - 1;
3471
3471
  let C = 0;
3472
3472
  for (let Q = 0; Q < g.length; Q += A)
@@ -3495,7 +3495,7 @@ function TA(g) {
3495
3495
  float16: globalThis.Float16Array,
3496
3496
  float32: Float32Array,
3497
3497
  float64: Float64Array,
3498
- bool: zB
3498
+ bool: _B
3499
3499
  }[g];
3500
3500
  if (!I)
3501
3501
  throw new v(`Unknown or unsupported dataType: ${g}`);
@@ -3509,7 +3509,7 @@ function RA(g, A) {
3509
3509
  C[A[Q]] = B, B *= g[A[Q]];
3510
3510
  return C;
3511
3511
  }
3512
- function bQ({ name: g, configuration: A }) {
3512
+ function ZQ({ name: g, configuration: A }) {
3513
3513
  if (g === "default") {
3514
3514
  const I = A?.separator ?? "/";
3515
3515
  return (B) => ["c", ...B].join(I);
@@ -3520,7 +3520,7 @@ function bQ({ name: g, configuration: A }) {
3520
3520
  }
3521
3521
  throw new v(`Unknown chunk key encoding: ${g}`);
3522
3522
  }
3523
- function gB(g) {
3523
+ function BB(g) {
3524
3524
  if (g === "|O")
3525
3525
  return { dataType: "v2:object" };
3526
3526
  let A = g.match(/^([<|>])(.*)$/);
@@ -3544,15 +3544,15 @@ function gB(g) {
3544
3544
  throw new v(`Unsupported or unknown dtype: ${g}`);
3545
3545
  return I === "|" ? { dataType: C } : { dataType: C, endian: I === "<" ? "little" : "big" };
3546
3546
  }
3547
- function ZQ(g) {
3547
+ function PQ(g) {
3548
3548
  return (g.id === "fixedscaleoffset" || g.id === "numcodecs.fixedscaleoffset") && typeof g.scale == "number" && typeof g.offset == "number" && (g.astype === void 0 || typeof g.astype == "string") && (g.dtype === void 0 || typeof g.dtype == "string");
3549
3549
  }
3550
- function PQ(g, A = {}) {
3551
- let I = [], B = gB(g.dtype);
3550
+ function OQ(g, A = {}) {
3551
+ let I = [], B = BB(g.dtype);
3552
3552
  g.order === "F" && I.push({ name: "transpose", configuration: { order: "F" } });
3553
3553
  for (let Q of g.filters ?? []) {
3554
3554
  if (Q.id === "fixedscaleoffset" || Q.id === "numcodecs.fixedscaleoffset") {
3555
- if (!ZQ(Q))
3555
+ if (!PQ(Q))
3556
3556
  throw new v(`Invalid fixedscaleoffset filter: ${JSON.stringify(Q)}`);
3557
3557
  I.push({
3558
3558
  name: "scale_offset",
@@ -3563,7 +3563,7 @@ function PQ(g, A = {}) {
3563
3563
  });
3564
3564
  let o = Q.astype ?? Q.dtype;
3565
3565
  if (o !== void 0 && o !== g.dtype) {
3566
- let a = gB(o).dataType;
3566
+ let a = BB(o).dataType;
3567
3567
  if (!Ag(a, "number") && !Ag(a, "bigint"))
3568
3568
  throw new v(`fixedscaleoffset astype must be a numeric data type, got ${o}`);
3569
3569
  I.push({
@@ -3610,7 +3610,7 @@ function PQ(g, A = {}) {
3610
3610
  attributes: A
3611
3611
  };
3612
3612
  }
3613
- function OQ(g, A = {}) {
3613
+ function VQ(g, A = {}) {
3614
3614
  return {
3615
3615
  zarr_format: 3,
3616
3616
  node_type: "group",
@@ -3632,10 +3632,10 @@ function Ag(g, A) {
3632
3632
  let Q = g === "v2:object";
3633
3633
  return A === "object" ? Q : !B && !C && !I && !Q;
3634
3634
  }
3635
- function VQ(g) {
3635
+ function vQ(g) {
3636
3636
  return g?.name === "sharding_indexed";
3637
3637
  }
3638
- function _B(g) {
3638
+ function $B(g) {
3639
3639
  if ((g.data_type === "uint64" || g.data_type === "int64") && g.fill_value != null)
3640
3640
  return BigInt(g.fill_value);
3641
3641
  let A = g.data_type === "float16" || g.data_type === "float32" || g.data_type === "float64";
@@ -3650,7 +3650,7 @@ function _B(g) {
3650
3650
  }
3651
3651
  return g.fill_value;
3652
3652
  }
3653
- function $B(g, ...A) {
3653
+ function AC(g, ...A) {
3654
3654
  if (!A.some((I) => g instanceof I))
3655
3655
  throw g;
3656
3656
  }
@@ -3658,7 +3658,7 @@ function IA(g, A = "") {
3658
3658
  if (!g)
3659
3659
  throw new Error(A);
3660
3660
  }
3661
- async function AC(g, { format: A, signal: I }) {
3661
+ async function IC(g, { format: A, signal: I }) {
3662
3662
  let B;
3663
3663
  if (g instanceof ArrayBuffer)
3664
3664
  B = new Response(g);
@@ -3673,12 +3673,12 @@ async function AC(g, { format: A, signal: I }) {
3673
3673
  throw I?.throwIfAborted(), new Error(`Failed to decode ${A}`);
3674
3674
  }
3675
3675
  }
3676
- const BB = vQ();
3677
- function vQ() {
3676
+ const CB = XQ();
3677
+ function XQ() {
3678
3678
  const g = new Uint32Array([305419896]);
3679
3679
  return new Uint8Array(g.buffer, g.byteOffset, g.byteLength)[0] !== 18;
3680
3680
  }
3681
- function CB(g) {
3681
+ function QB(g) {
3682
3682
  return "BYTES_PER_ELEMENT" in g ? g.BYTES_PER_ELEMENT : 4;
3683
3683
  }
3684
3684
  class MI {
@@ -3698,35 +3698,35 @@ class MI {
3698
3698
  }
3699
3699
  encode(A) {
3700
3700
  let I = new Uint8Array(A.data.buffer);
3701
- return BB && this.#C === "big" && IB(I, CB(this.#I)), I;
3701
+ return CB && this.#C === "big" && gB(I, QB(this.#I)), I;
3702
3702
  }
3703
3703
  computeEncodedSize(A) {
3704
3704
  return A;
3705
3705
  }
3706
3706
  decode(A) {
3707
- return BB && this.#C === "big" && IB(A, CB(this.#I)), {
3707
+ return CB && this.#C === "big" && gB(A, QB(this.#I)), {
3708
3708
  data: new this.#I(A.buffer, A.byteOffset, A.byteLength / this.#g),
3709
3709
  shape: this.#B,
3710
3710
  stride: this.#A
3711
3711
  };
3712
3712
  }
3713
3713
  }
3714
- const QB = {
3714
+ const EB = {
3715
3715
  NaN: NaN,
3716
3716
  Infinity: 1 / 0,
3717
3717
  "-Infinity": -1 / 0
3718
- }, IC = {
3718
+ }, gC = {
3719
3719
  float16: 2,
3720
3720
  float32: 4,
3721
3721
  float64: 8
3722
3722
  };
3723
3723
  function eI(g) {
3724
- return g in IC;
3724
+ return g in gC;
3725
3725
  }
3726
3726
  function Ig(g) {
3727
3727
  return g === "int64" || g === "uint64";
3728
3728
  }
3729
- function XQ(g, A) {
3729
+ function jQ(g, A) {
3730
3730
  const I = BigInt(g), B = new ArrayBuffer(A), C = new DataView(B);
3731
3731
  if (A === 2) {
3732
3732
  if (typeof C.getFloat16 != "function")
@@ -3748,9 +3748,9 @@ function nI(g, A) {
3748
3748
  }
3749
3749
  if (!eI(g))
3750
3750
  throw new v(`String-encoded scalar "${A}" is not valid for non-float data type "${g}"`);
3751
- return A in QB ? QB[A] : XQ(A, IC[g]);
3751
+ return A in EB ? EB[A] : jQ(A, gC[g]);
3752
3752
  }
3753
- const EB = /* @__PURE__ */ new Set([
3753
+ const iB = /* @__PURE__ */ new Set([
3754
3754
  "int8",
3755
3755
  "uint8",
3756
3756
  "int16",
@@ -3773,13 +3773,13 @@ const EB = /* @__PURE__ */ new Set([
3773
3773
  int64: [-(2n ** 63n), 2n ** 63n - 1n],
3774
3774
  uint64: [0n, 2n ** 64n - 1n]
3775
3775
  };
3776
- function iB(g, A, I) {
3776
+ function oB(g, A, I) {
3777
3777
  return g.map(([B, C]) => ({
3778
3778
  src: nI(A, B),
3779
3779
  tgt: nI(I, C)
3780
3780
  }));
3781
3781
  }
3782
- function jQ(g, A) {
3782
+ function zQ(g, A) {
3783
3783
  for (const I of A)
3784
3784
  if (typeof I.src == "number" && Number.isNaN(I.src)) {
3785
3785
  if (typeof g == "number" && Number.isNaN(g))
@@ -3787,7 +3787,7 @@ function jQ(g, A) {
3787
3787
  } else if (g === I.src)
3788
3788
  return I.tgt;
3789
3789
  }
3790
- function zQ(g) {
3790
+ function _Q(g) {
3791
3791
  if (!Number.isFinite(g))
3792
3792
  return g;
3793
3793
  if (Math.abs(g - Math.trunc(g)) === 0.5) {
@@ -3796,13 +3796,13 @@ function zQ(g) {
3796
3796
  }
3797
3797
  return Math.round(g);
3798
3798
  }
3799
- function _Q(g) {
3799
+ function $Q(g) {
3800
3800
  return Math.sign(g) * Math.floor(Math.abs(g) + 0.5);
3801
3801
  }
3802
- function oB(g) {
3802
+ function aB(g) {
3803
3803
  switch (g) {
3804
3804
  case "nearest-even":
3805
- return zQ;
3805
+ return _Q;
3806
3806
  case "towards-zero":
3807
3807
  return Math.trunc;
3808
3808
  case "towards-positive":
@@ -3810,7 +3810,7 @@ function oB(g) {
3810
3810
  case "towards-negative":
3811
3811
  return Math.floor;
3812
3812
  case "nearest-away":
3813
- return _Q;
3813
+ return $Q;
3814
3814
  }
3815
3815
  }
3816
3816
  function xI(g, A, I) {
@@ -3850,7 +3850,7 @@ class cg {
3850
3850
  #g;
3851
3851
  #B;
3852
3852
  constructor(A, I, B, C, Q, E) {
3853
- this.#A = I, this.#I = TA(A), this.#g = aB(I, A, B, C, Q), this.#B = aB(A, I, B, C, E);
3853
+ this.#A = I, this.#I = TA(A), this.#g = DB(I, A, B, C, Q), this.#B = DB(A, I, B, C, E);
3854
3854
  }
3855
3855
  /** Return updated metadata reflecting the type and fill value after encoding. */
3856
3856
  getEncodedMeta(A) {
@@ -3859,11 +3859,11 @@ class cg {
3859
3859
  }
3860
3860
  static fromConfig(A, I) {
3861
3861
  const B = I.dataType, C = A.data_type;
3862
- if (!EB.has(B))
3862
+ if (!iB.has(B))
3863
3863
  throw new v(`cast_value codec does not support array data type: ${B}`);
3864
- if (!EB.has(C))
3864
+ if (!iB.has(C))
3865
3865
  throw new v(`cast_value codec does not support encoded data type: ${C}`);
3866
- const Q = A.rounding ?? "nearest-even", E = A.scalar_map?.decode ? iB(A.scalar_map.decode, C, B) : [], i = A.scalar_map?.encode ? iB(A.scalar_map.encode, B, C) : [];
3866
+ const Q = A.rounding ?? "nearest-even", E = A.scalar_map?.decode ? oB(A.scalar_map.decode, C, B) : [], i = A.scalar_map?.encode ? oB(A.scalar_map.encode, B, C) : [];
3867
3867
  return new cg(B, C, Q, A.out_of_range, E, i);
3868
3868
  }
3869
3869
  encode = UA("cast_value");
@@ -3874,7 +3874,7 @@ class cg {
3874
3874
  return { data: B, shape: A.shape, stride: A.stride };
3875
3875
  }
3876
3876
  }
3877
- function aB(g, A, I, B, C) {
3877
+ function DB(g, A, I, B, C) {
3878
3878
  const Q = eI(g), E = Ig(g), i = eI(A), o = Ig(A);
3879
3879
  let a;
3880
3880
  if (Q && i) {
@@ -3882,14 +3882,14 @@ function aB(g, A, I, B, C) {
3882
3882
  throw new v(`cast_value float -> float only supports "nearest-even" rounding, got "${I}"`);
3883
3883
  a = (s) => s;
3884
3884
  } else if (Q && !i && !o) {
3885
- const s = oB(I), h = xI(...uI[A], B);
3885
+ const s = aB(I), h = xI(...uI[A], B);
3886
3886
  a = (t) => {
3887
3887
  if (!Number.isFinite(t))
3888
3888
  throw new Error(`Cannot cast ${t} to integer type without scalar_map`);
3889
3889
  return h(s(t));
3890
3890
  };
3891
3891
  } else if (Q && o) {
3892
- const s = oB(I), h = WI(...TI[A], B);
3892
+ const s = aB(I), h = WI(...TI[A], B);
3893
3893
  a = (t) => {
3894
3894
  if (!Number.isFinite(t))
3895
3895
  throw new Error(`Cannot cast ${t} to integer type without scalar_map`);
@@ -3912,7 +3912,7 @@ function aB(g, A, I, B, C) {
3912
3912
  else
3913
3913
  throw new Error(`Unhandled type combination: ${g} -> ${A}`);
3914
3914
  return C.length === 0 ? a : (s) => {
3915
- const h = jQ(s, C);
3915
+ const h = zQ(s, C);
3916
3916
  return h !== void 0 ? h : a(s);
3917
3917
  };
3918
3918
  }
@@ -3929,7 +3929,7 @@ class Ug {
3929
3929
  return A + 4;
3930
3930
  }
3931
3931
  }
3932
- const $Q = /* @__PURE__ */ new Set([
3932
+ const AE = /* @__PURE__ */ new Set([
3933
3933
  "int8",
3934
3934
  "uint8",
3935
3935
  "int16",
@@ -3942,7 +3942,7 @@ const $Q = /* @__PURE__ */ new Set([
3942
3942
  "float32",
3943
3943
  "float64"
3944
3944
  ]);
3945
- function DB(g, A) {
3945
+ function sB(g, A) {
3946
3946
  const I = g.length;
3947
3947
  let B = I === 0 || A[I - 1] === 1;
3948
3948
  for (let Q = I - 2; Q >= 0 && B; Q--)
@@ -3962,12 +3962,12 @@ class kg {
3962
3962
  this.#A = A;
3963
3963
  }
3964
3964
  static fromConfig(A, I) {
3965
- if (!$Q.has(I.dataType))
3965
+ if (!AE.has(I.dataType))
3966
3966
  throw new v(`Delta codec does not support data type: ${I.dataType}`);
3967
3967
  return new kg(TA(I.dataType));
3968
3968
  }
3969
3969
  encode(A) {
3970
- DB(A.shape, A.stride);
3970
+ sB(A.shape, A.stride);
3971
3971
  const I = A.data, B = new this.#A(I.length);
3972
3972
  B[0] = I[0];
3973
3973
  for (let C = 1; C < I.length; C++)
@@ -3975,7 +3975,7 @@ class kg {
3975
3975
  return { data: B, shape: A.shape, stride: A.stride };
3976
3976
  }
3977
3977
  decode(A) {
3978
- DB(A.shape, A.stride);
3978
+ sB(A.shape, A.stride);
3979
3979
  const I = A.data, B = new this.#A(I.length);
3980
3980
  B[0] = I[0];
3981
3981
  for (let C = 1; C < I.length; C++)
@@ -3990,14 +3990,14 @@ class Lg {
3990
3990
  }
3991
3991
  encode = UA("gzip");
3992
3992
  async decode(A) {
3993
- const I = await AC(A, { format: "gzip" });
3993
+ const I = await IC(A, { format: "gzip" });
3994
3994
  return new Uint8Array(I);
3995
3995
  }
3996
3996
  }
3997
- function AE(g, A) {
3997
+ function IE(g, A) {
3998
3998
  return IA(!Number.isNaN(A), "JsonCodec allow_nan is false but NaN was encountered during encoding."), IA(A !== Number.POSITIVE_INFINITY, "JsonCodec allow_nan is false but Infinity was encountered during encoding."), IA(A !== Number.NEGATIVE_INFINITY, "JsonCodec allow_nan is false but -Infinity was encountered during encoding."), A;
3999
3999
  }
4000
- function IE(g, A) {
4000
+ function gE(g, A) {
4001
4001
  return A instanceof Object && !Array.isArray(A) ? Object.keys(A).sort().reduce((I, B) => (I[B] = A[B], I), {}) : A;
4002
4002
  }
4003
4003
  class GI {
@@ -4027,7 +4027,7 @@ class GI {
4027
4027
  const { indent: I, encoding: B, ensure_ascii: C, check_circular: Q, allow_nan: E, sort_keys: i } = this.#A;
4028
4028
  IA(B === "utf-8", "JsonCodec does not yet support non-utf-8 encoding.");
4029
4029
  const o = [];
4030
- IA(Q, "JsonCodec does not yet support skipping the check for circular references during encoding."), E || o.push(AE), i && o.push(IE);
4030
+ IA(Q, "JsonCodec does not yet support skipping the check for circular references during encoding."), E || o.push(IE), i && o.push(gE);
4031
4031
  const a = Array.from(A.data);
4032
4032
  a.push("|O"), a.push(A.shape);
4033
4033
  let D;
@@ -4052,7 +4052,7 @@ class GI {
4052
4052
  return { data: B, shape: C, stride: Q };
4053
4053
  }
4054
4054
  }
4055
- const gE = /* @__PURE__ */ new Set([
4055
+ const BE = /* @__PURE__ */ new Set([
4056
4056
  "int8",
4057
4057
  "uint8",
4058
4058
  "int16",
@@ -4074,7 +4074,7 @@ class Jg {
4074
4074
  this.#I = A, this.#g = I, this.#A = B;
4075
4075
  }
4076
4076
  static fromConfig(A, I) {
4077
- if (!gE.has(I.dataType))
4077
+ if (!BE.has(I.dataType))
4078
4078
  throw new v(`scale_offset codec does not support data type: ${I.dataType}`);
4079
4079
  return new Jg(nI(I.dataType, A.scale ?? 1), nI(I.dataType, A.offset ?? 0), TA(I.dataType));
4080
4080
  }
@@ -4100,28 +4100,28 @@ class Yg {
4100
4100
  return new Yg(A, I);
4101
4101
  }
4102
4102
  encode(A) {
4103
- return BE(A, this.#A);
4103
+ return CE(A, this.#A);
4104
4104
  }
4105
4105
  decode(A) {
4106
- return CE(A, this.#A);
4106
+ return QE(A, this.#A);
4107
4107
  }
4108
4108
  }
4109
- function BE(g, A) {
4109
+ function CE(g, A) {
4110
4110
  let I = g.length, B = Math.floor(I / A), C = new Uint8Array(I);
4111
4111
  for (let Q = 0; Q < A; Q++)
4112
4112
  for (let E = 0; E < B; E++)
4113
4113
  C[Q * B + E] = g[E * A + Q];
4114
4114
  return C;
4115
4115
  }
4116
- function CE(g, A) {
4116
+ function QE(g, A) {
4117
4117
  let I = g.length, B = Math.floor(I / A), C = new Uint8Array(I);
4118
4118
  for (let Q = 0; Q < A; Q++)
4119
4119
  for (let E = 0; E < B; E++)
4120
4120
  C[E * A + Q] = g[Q * B + E];
4121
4121
  return C;
4122
4122
  }
4123
- function sB(g) {
4124
- return g instanceof zB || g instanceof Ng || g instanceof II ? new Proxy(g, {
4123
+ function hB(g) {
4124
+ return g instanceof _B || g instanceof Ng || g instanceof II ? new Proxy(g, {
4125
4125
  get(I, B) {
4126
4126
  return I.get(Number(B));
4127
4127
  },
@@ -4130,7 +4130,7 @@ function sB(g) {
4130
4130
  }
4131
4131
  }) : g;
4132
4132
  }
4133
- function QE(g, A) {
4133
+ function EE(g, A) {
4134
4134
  let I;
4135
4135
  return g.data instanceof Ng || g.data instanceof II ? I = new g.constructor(
4136
4136
  // @ts-expect-error
@@ -4142,8 +4142,8 @@ function QE(g, A) {
4142
4142
  stride: RA(g.shape, A)
4143
4143
  };
4144
4144
  }
4145
- function EE(g, A) {
4146
- let I = QE(g, A), B = g.shape.length, C = g.data.length, Q = Array(B).fill(0), E = sB(g.data), i = sB(I.data);
4145
+ function iE(g, A) {
4146
+ let I = EE(g, A), B = g.shape.length, C = g.data.length, Q = Array(B).fill(0), E = hB(g.data), i = hB(I.data);
4147
4147
  for (let o = 0; o < C; o++) {
4148
4148
  let a = 0;
4149
4149
  for (let D = 0; D < B; D++)
@@ -4158,12 +4158,12 @@ function EE(g, A) {
4158
4158
  }
4159
4159
  return I;
4160
4160
  }
4161
- function iE(g) {
4161
+ function oE(g) {
4162
4162
  let A = g.shape.length;
4163
4163
  return IA(A === g.stride.length, "Shape and stride must have the same length."), g.stride.map((I, B) => ({ stride: I, index: B })).sort((I, B) => B.stride - I.stride).map((I) => I.index);
4164
4164
  }
4165
- function oE(g, A) {
4166
- let I = iE(g);
4165
+ function aE(g, A) {
4166
+ let I = oE(g);
4167
4167
  return IA(I.length === A.length, "Orders must match"), I.every((B, C) => B === A[C]);
4168
4168
  }
4169
4169
  class Mg {
@@ -4188,7 +4188,7 @@ class Mg {
4188
4188
  return new Mg(A, I);
4189
4189
  }
4190
4190
  encode(A) {
4191
- return oE(A, this.#I) ? A : EE(A, this.#I);
4191
+ return aE(A, this.#I) ? A : iE(A, this.#I);
4192
4192
  }
4193
4193
  decode(A) {
4194
4194
  return {
@@ -4225,25 +4225,25 @@ class dg {
4225
4225
  }
4226
4226
  encode = UA("zlib");
4227
4227
  async decode(A) {
4228
- const I = await AC(A, { format: "deflate" });
4228
+ const I = await IC(A, { format: "deflate" });
4229
4229
  return new Uint8Array(I);
4230
4230
  }
4231
4231
  }
4232
- function aE() {
4232
+ function DE() {
4233
4233
  let g = () => import("./blosc-D1xNXZJs.js").then((Q) => Q.default), A = () => import("./lz4-1Ws5oVWR.js").then((Q) => Q.default), I = () => import("./zstd-C4EcZnjq.js").then((Q) => Q.default), B = () => Lg, C = () => dg;
4234
4234
  return (/* @__PURE__ */ new Map()).set("blosc", g).set("lz4", A).set("zstd", I).set("gzip", B).set("zlib", C).set("transpose", () => Mg).set("bytes", () => MI).set("crc32c", () => Ug).set("vlen-utf8", () => wI).set("json2", () => GI).set("bitround", () => yI).set("cast_value", () => cg).set("scale_offset", () => Jg).set("numcodecs.blosc", g).set("numcodecs.lz4", A).set("numcodecs.zstd", I).set("numcodecs.gzip", B).set("numcodecs.zlib", C).set("numcodecs.vlen-utf8", () => wI).set("numcodecs.shuffle", () => Yg).set("numcodecs.delta", () => kg).set("numcodecs.bitround", () => yI).set("numcodecs.json2", () => GI);
4235
4235
  }
4236
- const DE = aE();
4236
+ const sE = DE();
4237
4237
  function gg(g) {
4238
4238
  let A;
4239
4239
  function I() {
4240
- return A || (A = sE(g)), A;
4240
+ return A || (A = hE(g)), A;
4241
4241
  }
4242
4242
  async function B(C, Q, E) {
4243
4243
  try {
4244
4244
  return await E();
4245
4245
  } catch (i) {
4246
- throw new TQ({ direction: C, codec: Q, cause: i });
4246
+ throw new xQ({ direction: C, codec: Q, cause: i });
4247
4247
  }
4248
4248
  }
4249
4249
  return {
@@ -4270,23 +4270,23 @@ function gg(g) {
4270
4270
  return E;
4271
4271
  },
4272
4272
  async computeEncodedSize(C) {
4273
- let Q = await I(), E = hB(Q.arrayToBytes.name, Q.arrayToBytes.codec, C);
4273
+ let Q = await I(), E = tB(Q.arrayToBytes.name, Q.arrayToBytes.codec, C);
4274
4274
  for (const { name: i, codec: o } of Q.bytesToBytes)
4275
- E = hB(i, o, E);
4275
+ E = tB(i, o, E);
4276
4276
  return E;
4277
4277
  }
4278
4278
  };
4279
4279
  }
4280
- function hB(g, A, I) {
4280
+ function tB(g, A, I) {
4281
4281
  if (!A.computeEncodedSize)
4282
4282
  throw new v(`Codec "${g}" cannot compute its encoded size; it is not a fixed-size codec and cannot be used in a sharding index pipeline`);
4283
4283
  return A.computeEncodedSize(I);
4284
4284
  }
4285
- async function sE(g) {
4285
+ async function hE(g) {
4286
4286
  let A = g.codecs.map(async (E) => {
4287
- let i = await DE.get(E.name)?.();
4287
+ let i = await sE.get(E.name)?.();
4288
4288
  if (!i)
4289
- throw new uQ(E.name);
4289
+ throw new TQ(E.name);
4290
4290
  return { Codec: i, meta: E };
4291
4291
  }), I = [], B, C = [], Q = { ...g };
4292
4292
  for await (let { Codec: E, meta: i } of A) {
@@ -4312,7 +4312,7 @@ async function sE(g) {
4312
4312
  }
4313
4313
  }
4314
4314
  if (!B) {
4315
- if (!hE(Q))
4315
+ if (!tE(Q))
4316
4316
  throw new v(`Cannot encode ${Q.dataType} to bytes without a codec`);
4317
4317
  B = {
4318
4318
  name: "bytes",
@@ -4325,11 +4325,11 @@ async function sE(g) {
4325
4325
  bytesToBytes: C
4326
4326
  };
4327
4327
  }
4328
- function hE(g) {
4328
+ function tE(g) {
4329
4329
  return g.dataType !== "v2:object" && g.dataType !== "string";
4330
4330
  }
4331
- const tB = 18446744073709551615n;
4332
- function tE(g, A, I, B) {
4331
+ const yB = 18446744073709551615n;
4332
+ function yE(g, A, I, B) {
4333
4333
  if (!g.store.getRange)
4334
4334
  throw new Sg("sharding requires a store with getRange");
4335
4335
  let C = g.store.getRange.bind(g.store), Q = A.map((a, D) => a / B.chunk_shape[D]), E = gg({
@@ -4350,7 +4350,7 @@ function tE(g, A, I, B) {
4350
4350
  if (t === null)
4351
4351
  return;
4352
4352
  let { data: y, shape: n, stride: F } = t, G = a.map((S, r) => S % n[r]).reduce((S, r, c) => S + r * F[c], 0), J = y[G], U = y[G + 1];
4353
- if (!(J === tB && U === tB))
4353
+ if (!(J === yB && U === yB))
4354
4354
  return C(h, {
4355
4355
  offset: Number(J),
4356
4356
  length: Number(U)
@@ -4378,18 +4378,18 @@ class Kg extends CA {
4378
4378
  return this.#A.attributes;
4379
4379
  }
4380
4380
  }
4381
- function yB(g) {
4381
+ function eB(g) {
4382
4382
  return g.find((I) => I.name === "transpose")?.configuration?.order ?? "C";
4383
4383
  }
4384
4384
  const QI = Symbol("zarrita.context");
4385
- function yE(g, A) {
4386
- let { configuration: I } = A.codecs.find(VQ) ?? {}, B = {
4387
- encodeChunkKey: bQ(A.chunk_key_encoding),
4385
+ function eE(g, A) {
4386
+ let { configuration: I } = A.codecs.find(vQ) ?? {}, B = {
4387
+ encodeChunkKey: ZQ(A.chunk_key_encoding),
4388
4388
  TypedArray: TA(A.data_type),
4389
4389
  fillValue: A.fill_value
4390
4390
  };
4391
4391
  if (I) {
4392
- let Q = yB(I.codecs);
4392
+ let Q = eB(I.codecs);
4393
4393
  return {
4394
4394
  ...B,
4395
4395
  kind: "sharded",
@@ -4403,10 +4403,10 @@ function yE(g, A) {
4403
4403
  getStrides(E) {
4404
4404
  return RA(E, Q);
4405
4405
  },
4406
- getChunkBytes: tE(g, A.chunk_grid.configuration.chunk_shape, B.encodeChunkKey, I)
4406
+ getChunkBytes: yE(g, A.chunk_grid.configuration.chunk_shape, B.encodeChunkKey, I)
4407
4407
  };
4408
4408
  }
4409
- let C = yB(A.codecs);
4409
+ let C = eB(A.codecs);
4410
4410
  return {
4411
4411
  ...B,
4412
4412
  kind: "regular",
@@ -4433,8 +4433,8 @@ let FI = class extends CA {
4433
4433
  constructor(A, I, B) {
4434
4434
  super(A, I), this.#A = {
4435
4435
  ...B,
4436
- fill_value: _B(B)
4437
- }, this[QI] = yE(this, this.#A);
4436
+ fill_value: $B(B)
4437
+ }, this[QI] = eE(this, this.#A);
4438
4438
  }
4439
4439
  get attrs() {
4440
4440
  return this.#A.attributes;
@@ -4455,7 +4455,7 @@ let FI = class extends CA {
4455
4455
  return this.#A.data_type;
4456
4456
  }
4457
4457
  async getChunk(A, I, B) {
4458
- B?.useSharedArrayBuffer && xQ();
4458
+ B?.useSharedArrayBuffer && WQ();
4459
4459
  let C = this[QI], Q = await C.getChunkBytes(A, I);
4460
4460
  if (!Q) {
4461
4461
  let E = C.chunkShape.reduce((o, a) => o * a, 1), i;
@@ -4464,7 +4464,7 @@ let FI = class extends CA {
4464
4464
  if (!("BYTES_PER_ELEMENT" in o))
4465
4465
  console.warn("zarrita: useSharedArrayBuffer is not supported for non-buffer-backed data types."), i = new C.TypedArray(E);
4466
4466
  else {
4467
- let a = WQ(E * o.BYTES_PER_ELEMENT);
4467
+ let a = bQ(E * o.BYTES_PER_ELEMENT);
4468
4468
  i = new C.TypedArray(a, 0, E);
4469
4469
  }
4470
4470
  } else
@@ -4498,21 +4498,21 @@ let FI = class extends CA {
4498
4498
  return Ag(this.dtype, A);
4499
4499
  }
4500
4500
  };
4501
- function eE(g, A) {
4501
+ function nE(g, A) {
4502
4502
  let I = g;
4503
4503
  for (let B of A)
4504
4504
  I instanceof Promise ? I = I.then((C) => B(C)) : I = B(I);
4505
4505
  return I;
4506
4506
  }
4507
- function nE(g, ...A) {
4508
- return eE(g, A);
4507
+ function GE(g, ...A) {
4508
+ return nE(g, A);
4509
4509
  }
4510
- async function gC(g) {
4510
+ async function BC(g) {
4511
4511
  let A = g.store.arrayExtensions;
4512
- return A?.length ? await nE(g, ...A) : g;
4512
+ return A?.length ? await GE(g, ...A) : g;
4513
4513
  }
4514
- let dI = GE();
4515
- function GE() {
4514
+ let dI = wE();
4515
+ function wE() {
4516
4516
  let g = /* @__PURE__ */ new WeakMap();
4517
4517
  function A(I) {
4518
4518
  let B = g.get(I) ?? { v2: 0, v3: 0 };
@@ -4528,37 +4528,37 @@ function GE() {
4528
4528
  }
4529
4529
  };
4530
4530
  }
4531
- async function wE(g, A) {
4531
+ async function FE(g, A) {
4532
4532
  let I = await g.store.get(g.resolve(".zattrs").path, {
4533
4533
  signal: A
4534
4534
  });
4535
4535
  return I ? gI(I) : {};
4536
4536
  }
4537
- async function FE(g, A = {}) {
4537
+ async function rE(g, A = {}) {
4538
4538
  let I = "store" in g ? g : new CA(g), { signal: B } = A, C = {};
4539
- return (A.attrs ?? !0) && (C = await wE(I, B)), B?.throwIfAborted(), A.kind === "array" ? eB(I, C, B) : A.kind === "group" ? nB(I, C, B) : eB(I, C, B).catch((Q) => ($B(Q, uA, v), nB(I, C, B)));
4539
+ return (A.attrs ?? !0) && (C = await FE(I, B)), B?.throwIfAborted(), A.kind === "array" ? nB(I, C, B) : A.kind === "group" ? GB(I, C, B) : nB(I, C, B).catch((Q) => (AC(Q, uA, v), GB(I, C, B)));
4540
4540
  }
4541
- async function eB(g, A, I) {
4541
+ async function nB(g, A, I) {
4542
4542
  let { path: B } = g.resolve(".zarray"), C = await g.store.get(B, { signal: I });
4543
4543
  if (!C)
4544
4544
  throw new uA("v2 array", { path: B });
4545
- return dI.increment(g.store, "v2"), gC(new FI(g.store, g.path, PQ(gI(C), A)));
4545
+ return dI.increment(g.store, "v2"), BC(new FI(g.store, g.path, OQ(gI(C), A)));
4546
4546
  }
4547
- async function nB(g, A, I) {
4547
+ async function GB(g, A, I) {
4548
4548
  let { path: B } = g.resolve(".zgroup"), C = await g.store.get(B, { signal: I });
4549
4549
  if (!C)
4550
4550
  throw new uA("v2 group", { path: B });
4551
- return dI.increment(g.store, "v2"), new Kg(g.store, g.path, OQ(gI(C), A));
4551
+ return dI.increment(g.store, "v2"), new Kg(g.store, g.path, VQ(gI(C), A));
4552
4552
  }
4553
- async function rE(g, A) {
4553
+ async function SE(g, A) {
4554
4554
  let { store: I, path: B } = g.resolve("zarr.json"), C = await g.store.get(B, { signal: A });
4555
4555
  if (!C)
4556
4556
  throw new uA("v3 array or group", { path: B });
4557
4557
  let Q = gI(C);
4558
- return Q.node_type === "array" && (Q.fill_value = _B(Q)), Q.node_type === "array" ? gC(new FI(I, g.path, Q)) : new Kg(I, g.path, Q);
4558
+ return Q.node_type === "array" && (Q.fill_value = $B(Q)), Q.node_type === "array" ? BC(new FI(I, g.path, Q)) : new Kg(I, g.path, Q);
4559
4559
  }
4560
- async function SE(g, A = {}) {
4561
- let I = "store" in g ? g : new CA(g), B = await rE(I, A.signal);
4560
+ async function RE(g, A = {}) {
4561
+ let I = "store" in g ? g : new CA(g), B = await SE(I, A.signal);
4562
4562
  if (dI.increment(I.store, "v3"), A.kind === void 0 || A.kind === "array" && B instanceof FI || A.kind === "group" && B instanceof Kg)
4563
4563
  return B;
4564
4564
  let C = B instanceof FI ? "array" : "group";
@@ -4569,11 +4569,11 @@ async function SE(g, A = {}) {
4569
4569
  }
4570
4570
  async function BA(g, A = {}) {
4571
4571
  let I = "store" in g ? g.store : g, B = dI.versionMax(I), C = B === "v2" ? BA.v2 : BA.v3, Q = B === "v2" ? BA.v3 : BA.v2;
4572
- return C(g, A).catch((E) => ($B(E, uA, v), Q(g, A)));
4572
+ return C(g, A).catch((E) => (AC(E, uA, v), Q(g, A)));
4573
4573
  }
4574
- BA.v2 = FE;
4575
- BA.v3 = SE;
4576
- async function RE(g, A) {
4574
+ BA.v2 = rE;
4575
+ BA.v3 = RE;
4576
+ async function NE(g, A) {
4577
4577
  const I = A.split("/"), B = I.pop();
4578
4578
  if (!B)
4579
4579
  throw new Error("Invalid path");
@@ -4590,7 +4590,7 @@ class Hg {
4590
4590
  return this.#A;
4591
4591
  }
4592
4592
  async get(A) {
4593
- const I = await RE(this.#A, A.slice(1)).catch(
4593
+ const I = await NE(this.#A, A.slice(1)).catch(
4594
4594
  () => {
4595
4595
  }
4596
4596
  );
@@ -4619,7 +4619,7 @@ async function BI(g, A) {
4619
4619
  throw new Error(`Failed to open Zarr group at ${g}`);
4620
4620
  }
4621
4621
  }
4622
- async function NE(g, A) {
4622
+ async function cE(g, A) {
4623
4623
  if (A === "v2")
4624
4624
  try {
4625
4625
  return BA.v2(g, { kind: "array", attrs: !1 });
@@ -4638,7 +4638,7 @@ async function NE(g, A) {
4638
4638
  throw new Error(`Failed to open Zarr array at ${g}`);
4639
4639
  }
4640
4640
  }
4641
- async function cE(g) {
4641
+ async function UE(g) {
4642
4642
  let A;
4643
4643
  switch (g.type) {
4644
4644
  case "fetch": {
@@ -4659,9 +4659,9 @@ async function cE(g) {
4659
4659
  }
4660
4660
  }
4661
4661
  const I = g.arrayPath ? A.resolve(g.arrayPath) : A;
4662
- return NE(I, g.zarrVersion);
4662
+ return cE(I, g.zarrVersion);
4663
4663
  }
4664
- function UE(g, A, I) {
4664
+ function kE(g, A, I) {
4665
4665
  if (g.store instanceof $A)
4666
4666
  return {
4667
4667
  type: "fetch",
@@ -4681,10 +4681,10 @@ function UE(g, A, I) {
4681
4681
  `Unsupported store type: ${g.store.constructor.name}`
4682
4682
  );
4683
4683
  }
4684
- function kE(g, A, I, B) {
4685
- return LE(g, A, I, B);
4686
- }
4687
4684
  function LE(g, A, I, B) {
4685
+ return JE(g, A, I, B);
4686
+ }
4687
+ function JE(g, A, I, B) {
4688
4688
  const { targetShape: C, chunkIndex: Q, dimIndices: E } = B;
4689
4689
  let i = 1;
4690
4690
  for (let r = A.length - 1; r >= 0; r--) {
@@ -4719,7 +4719,7 @@ function LE(g, A, I, B) {
4719
4719
  }
4720
4720
  return G;
4721
4721
  }
4722
- const BC = `function xg(B, A) {
4722
+ const CC = `function xg(B, A) {
4723
4723
  return {
4724
4724
  ...B,
4725
4725
  ...A,
@@ -8373,11 +8373,11 @@ return ret;
8373
8373
  default: IQ
8374
8374
  });
8375
8375
  //# sourceMappingURL=worker_kernel-CBlE4MBI.js.map
8376
- `, GB = typeof self < "u" && self.Blob && new Blob(["URL.revokeObjectURL(import.meta.url);", BC], { type: "text/javascript;charset=utf-8" });
8377
- function JE(g) {
8376
+ `, wB = typeof self < "u" && self.Blob && new Blob(["URL.revokeObjectURL(import.meta.url);", CC], { type: "text/javascript;charset=utf-8" });
8377
+ function YE(g) {
8378
8378
  let A;
8379
8379
  try {
8380
- if (A = GB && (self.URL || self.webkitURL).createObjectURL(GB), !A) throw "";
8380
+ if (A = wB && (self.URL || self.webkitURL).createObjectURL(wB), !A) throw "";
8381
8381
  const I = new Worker(A, {
8382
8382
  type: "module",
8383
8383
  name: g?.name
@@ -8387,7 +8387,7 @@ function JE(g) {
8387
8387
  }), I;
8388
8388
  } catch {
8389
8389
  return new Worker(
8390
- "data:text/javascript;charset=utf-8," + encodeURIComponent(BC),
8390
+ "data:text/javascript;charset=utf-8," + encodeURIComponent(CC),
8391
8391
  {
8392
8392
  type: "module",
8393
8393
  name: g?.name
@@ -8395,17 +8395,17 @@ function JE(g) {
8395
8395
  );
8396
8396
  }
8397
8397
  }
8398
- const YE = Math.max(1, navigator.hardwareConcurrency - 2);
8399
- let EA = [], ME = 0, CC = 0;
8398
+ const ME = Math.max(1, navigator.hardwareConcurrency - 2);
8399
+ let EA = [], dE = 0, QC = 0;
8400
8400
  const NA = /* @__PURE__ */ new Map(), rI = /* @__PURE__ */ new Set();
8401
- function QC(g) {
8401
+ function EC(g) {
8402
8402
  const A = EA.find((I) => I.worker === g);
8403
8403
  return A || k.error(
8404
8404
  "ZarrWorker",
8405
8405
  "Worker not found in pool - this should not happen"
8406
8406
  ), A;
8407
8407
  }
8408
- function dE(g, A) {
8408
+ function KE(g, A) {
8409
8409
  const { id: I, success: B } = g.data, C = NA.get(I);
8410
8410
  if (!C) {
8411
8411
  rI.has(I) ? rI.delete(I) : k.warn(
@@ -8416,13 +8416,13 @@ function dE(g, A) {
8416
8416
  return;
8417
8417
  }
8418
8418
  NA.delete(I), C.abortListener && C.abortSignal && C.abortSignal.removeEventListener("abort", C.abortListener);
8419
- const Q = QC(A);
8419
+ const Q = EC(A);
8420
8420
  Q && Q.pendingCount > 0 ? Q.pendingCount-- : Q && k.error(
8421
8421
  "ZarrWorker",
8422
8422
  "Received message but no pending tasks - this should not happen"
8423
8423
  ), B && g.data.type === "getChunk" ? C.resolve(g.data.data) : B || C.reject(new Error(g.data.error || "Unknown worker error"));
8424
8424
  }
8425
- function wB(g, A) {
8425
+ function FB(g, A) {
8426
8426
  if (g instanceof MessageEvent) {
8427
8427
  k.error(
8428
8428
  "ZarrWorker",
@@ -8435,7 +8435,7 @@ function wB(g, A) {
8435
8435
  "Worker failed - replacing worker and canceling its in-flight messages",
8436
8436
  g.message
8437
8437
  );
8438
- const I = QC(A);
8438
+ const I = EC(A);
8439
8439
  if (I) {
8440
8440
  const C = EA.indexOf(I);
8441
8441
  EA.splice(C, 1);
@@ -8445,31 +8445,31 @@ function wB(g, A) {
8445
8445
  for (const [C, Q] of NA.entries())
8446
8446
  Q.workerId === B && (Q.reject(new Error(`Worker error: ${g.message}`)), NA.delete(C));
8447
8447
  try {
8448
- const C = EC();
8448
+ const C = iC();
8449
8449
  EA.push({
8450
8450
  worker: C,
8451
8451
  pendingCount: 0,
8452
- workerId: CC++
8452
+ workerId: QC++
8453
8453
  }), k.debug("ZarrWorker", "Replacement worker created successfully");
8454
8454
  } catch (C) {
8455
8455
  k.error("ZarrWorker", "Failed to create replacement worker", C);
8456
8456
  }
8457
8457
  }
8458
- function EC() {
8459
- const g = new JE();
8460
- return g.addEventListener("message", (A) => dE(A, g)), g.addEventListener("error", (A) => wB(A, g)), g.addEventListener(
8458
+ function iC() {
8459
+ const g = new YE();
8460
+ return g.addEventListener("message", (A) => KE(A, g)), g.addEventListener("error", (A) => FB(A, g)), g.addEventListener(
8461
8461
  "messageerror",
8462
- (A) => wB(A, g)
8462
+ (A) => FB(A, g)
8463
8463
  ), g;
8464
8464
  }
8465
- function KE() {
8465
+ function HE() {
8466
8466
  if (EA.length === 0)
8467
8467
  throw new Error("Worker pool is not initialized");
8468
8468
  return EA.sort((g, A) => g.pendingCount - A.pendingCount)[0];
8469
8469
  }
8470
- async function HE(g, A, I, B) {
8470
+ async function qE(g, A, I, B) {
8471
8471
  return new Promise((C, Q) => {
8472
- const E = KE(), i = ME++, o = {
8472
+ const E = HE(), i = dE++, o = {
8473
8473
  resolve: C,
8474
8474
  reject: Q,
8475
8475
  workerId: E.workerId
@@ -8496,15 +8496,15 @@ async function HE(g, A, I, B) {
8496
8496
  });
8497
8497
  });
8498
8498
  }
8499
- function qE() {
8499
+ function lE() {
8500
8500
  if (!(EA.length > 0))
8501
8501
  try {
8502
- for (let g = 0; g < YE; g++) {
8503
- const A = EC();
8502
+ for (let g = 0; g < ME; g++) {
8503
+ const A = iC();
8504
8504
  EA.push({
8505
8505
  worker: A,
8506
8506
  pendingCount: 0,
8507
- workerId: CC++
8507
+ workerId: QC++
8508
8508
  });
8509
8509
  }
8510
8510
  k.debug(
@@ -8512,14 +8512,14 @@ function qE() {
8512
8512
  `Initialized worker pool with ${EA.length} workers`
8513
8513
  );
8514
8514
  } catch {
8515
- k.warn("ZarrWorker", "Failed to create workers - clearing pool"), fE();
8515
+ k.warn("ZarrWorker", "Failed to create workers - clearing pool"), pE();
8516
8516
  return;
8517
8517
  }
8518
8518
  }
8519
- async function lE(g, A, I, B, C) {
8520
- qE();
8519
+ async function fE(g, A, I, B, C) {
8520
+ lE();
8521
8521
  try {
8522
- return await HE(
8522
+ return await qE(
8523
8523
  A,
8524
8524
  I,
8525
8525
  B,
@@ -8530,11 +8530,11 @@ async function lE(g, A, I, B, C) {
8530
8530
  throw Q;
8531
8531
  k.warn("ZarrWorker", "Falling back to main thread", Q);
8532
8532
  const E = await g.getChunk(I, C);
8533
- if (!SQ(E.data))
8533
+ if (!RQ(E.data))
8534
8534
  throw new Error(
8535
8535
  `Unsupported chunk data type: ${E.data.constructor.name}`
8536
8536
  );
8537
- return kE(
8537
+ return LE(
8538
8538
  E.data,
8539
8539
  E.shape,
8540
8540
  E.stride,
@@ -8542,19 +8542,19 @@ async function lE(g, A, I, B, C) {
8542
8542
  );
8543
8543
  }
8544
8544
  }
8545
- function fE() {
8545
+ function pE() {
8546
8546
  for (const g of EA)
8547
8547
  g.worker.terminate();
8548
8548
  EA = [], NA.clear();
8549
8549
  }
8550
- class pE {
8550
+ class mE {
8551
8551
  metadata_;
8552
8552
  arrays_;
8553
8553
  arrayParams_;
8554
8554
  dimensions_;
8555
8555
  bytesPerElement_;
8556
8556
  constructor(A) {
8557
- this.metadata_ = A.metadata, this.arrays_ = A.arrays, this.arrayParams_ = A.arrayParams, this.dimensions_ = uE(this.metadata_, this.arrays_), this.bytesPerElement_ = mE(this.arrays_[0].dtype);
8557
+ this.metadata_ = A.metadata, this.arrays_ = A.arrays, this.arrayParams_ = A.arrayParams, this.dimensions_ = TE(this.metadata_, this.arrays_), this.bytesPerElement_ = uE(this.arrays_[0].dtype);
8558
8558
  }
8559
8559
  getSourceDimensionMap() {
8560
8560
  return this.dimensions_;
@@ -8588,21 +8588,21 @@ class pE {
8588
8588
  },
8589
8589
  cChunkSize: E?.chunkSize,
8590
8590
  tChunkSize: i?.chunkSize
8591
- }, a = await lE(
8591
+ }, a = await fE(
8592
8592
  C,
8593
8593
  Q,
8594
8594
  B,
8595
8595
  o,
8596
8596
  { signal: I }
8597
8597
  ), D = a.BYTES_PER_ELEMENT;
8598
- if (!DQ(D))
8598
+ if (!sQ(D))
8599
8599
  throw new Error(
8600
8600
  "Invalid row alignment value. Possible values are 1, 2, 4, or 8"
8601
8601
  );
8602
- A.rowAlignmentBytes = D, FQ(A, a);
8602
+ A.rowAlignmentBytes = D, rQ(A, a);
8603
8603
  }
8604
8604
  }
8605
- const FB = {
8605
+ const rB = {
8606
8606
  int8: 1,
8607
8607
  uint8: 1,
8608
8608
  int16: 2,
@@ -8611,16 +8611,16 @@ const FB = {
8611
8611
  uint32: 4,
8612
8612
  float32: 4
8613
8613
  };
8614
- function mE(g) {
8615
- const A = FB[g];
8614
+ function uE(g) {
8615
+ const A = rB[g];
8616
8616
  if (A === void 0)
8617
8617
  throw new Error(
8618
- `Unsupported zarr dtype "${g}". Supported dtypes: ${Object.keys(FB).join(", ")}`
8618
+ `Unsupported zarr dtype "${g}". Supported dtypes: ${Object.keys(rB).join(", ")}`
8619
8619
  );
8620
8620
  return A;
8621
8621
  }
8622
- function uE(g, A) {
8623
- const I = g.axes.map((s) => s.name), B = g.axes.length, C = rB(I, "x"), Q = rB(I, "y"), E = (s, h) => {
8622
+ function TE(g, A) {
8623
+ const I = g.axes.map((s) => s.name), B = g.axes.length, C = SB(I, "x"), Q = SB(I, "y"), E = (s, h) => {
8624
8624
  const t = [];
8625
8625
  for (let y = 0; y < g.datasets.length; y++) {
8626
8626
  const n = g.datasets[y], F = A[y], G = n.coordinateTransformations[0].scale, J = n.coordinateTransformations.length === 2 ? n.coordinateTransformations[1].translation : new Array(B).fill(0);
@@ -8631,7 +8631,7 @@ function uE(g, A) {
8631
8631
  translation: J[h]
8632
8632
  });
8633
8633
  }
8634
- if (g.axes[h].type === "space" && xE(t))
8634
+ if (g.axes[h].type === "space" && WE(t))
8635
8635
  for (const y of t) y.translation -= 0.5 * y.scale;
8636
8636
  return {
8637
8637
  name: s,
@@ -8650,10 +8650,10 @@ function uE(g, A) {
8650
8650
  const D = iI(I, "t");
8651
8651
  return D !== -1 && (i.t = E(I[D], D)), i;
8652
8652
  }
8653
- function TE(g, A) {
8653
+ function xE(g, A) {
8654
8654
  return g.toLowerCase() === A.toLowerCase();
8655
8655
  }
8656
- function rB(g, A) {
8656
+ function SB(g, A) {
8657
8657
  const I = iI(g, A);
8658
8658
  if (I === -1)
8659
8659
  throw new Error(
@@ -8662,9 +8662,9 @@ function rB(g, A) {
8662
8662
  return I;
8663
8663
  }
8664
8664
  function iI(g, A) {
8665
- return g.findIndex((I) => TE(I, A));
8665
+ return g.findIndex((I) => xE(I, A));
8666
8666
  }
8667
- function xE(g) {
8667
+ function WE(g) {
8668
8668
  if (g.length <= 1) return !1;
8669
8669
  for (let A = 1; A < g.length; A++) {
8670
8670
  const I = 0.5 * (g[A].scale - g[A - 1].scale), B = g[A].translation - g[A - 1].translation;
@@ -8709,14 +8709,14 @@ var l;
8709
8709
  }
8710
8710
  g.joinValues = B, g.jsonStringifyReplacer = (C, Q) => typeof Q == "bigint" ? Q.toString() : Q;
8711
8711
  })(l || (l = {}));
8712
- var SB;
8712
+ var RB;
8713
8713
  (function(g) {
8714
8714
  g.mergeShapes = (A, I) => ({
8715
8715
  ...A,
8716
8716
  ...I
8717
8717
  // second overwrites first
8718
8718
  });
8719
- })(SB || (SB = {}));
8719
+ })(RB || (RB = {}));
8720
8720
  const R = l.arrayToEnum([
8721
8721
  "string",
8722
8722
  "nan",
@@ -8897,11 +8897,11 @@ const Bg = (g, A) => {
8897
8897
  }
8898
8898
  return { message: I };
8899
8899
  };
8900
- let WE = Bg;
8901
- function bE() {
8902
- return WE;
8900
+ let bE = Bg;
8901
+ function ZE() {
8902
+ return bE;
8903
8903
  }
8904
- const ZE = (g) => {
8904
+ const PE = (g) => {
8905
8905
  const { data: A, path: I, errorMaps: B, issueData: C } = g, Q = [...I, ...C.path || []], E = {
8906
8906
  ...C,
8907
8907
  path: Q
@@ -8923,7 +8923,7 @@ const ZE = (g) => {
8923
8923
  };
8924
8924
  };
8925
8925
  function w(g, A) {
8926
- const I = bE(), B = ZE({
8926
+ const I = ZE(), B = PE({
8927
8927
  issueData: A,
8928
8928
  data: g.data,
8929
8929
  path: g.path,
@@ -8983,7 +8983,7 @@ class gA {
8983
8983
  }
8984
8984
  const Y = Object.freeze({
8985
8985
  status: "aborted"
8986
- }), PA = (g) => ({ status: "dirty", value: g }), QA = (g) => ({ status: "valid", value: g }), RB = (g) => g.status === "aborted", NB = (g) => g.status === "dirty", KA = (g) => g.status === "valid", SI = (g) => typeof Promise < "u" && g instanceof Promise;
8986
+ }), PA = (g) => ({ status: "dirty", value: g }), QA = (g) => ({ status: "valid", value: g }), NB = (g) => g.status === "aborted", cB = (g) => g.status === "dirty", KA = (g) => g.status === "valid", SI = (g) => typeof Promise < "u" && g instanceof Promise;
8987
8987
  var N;
8988
8988
  (function(g) {
8989
8989
  g.errToObj = (A) => typeof A == "string" ? { message: A } : A || {}, g.toString = (A) => typeof A == "string" ? A : A?.message;
@@ -8996,7 +8996,7 @@ class wA {
8996
8996
  return this._cachedPath.length || (Array.isArray(this._key) ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
8997
8997
  }
8998
8998
  }
8999
- const cB = (g, A) => {
8999
+ const UB = (g, A) => {
9000
9000
  if (KA(A))
9001
9001
  return { success: !0, data: A.value };
9002
9002
  if (!g.common.issues.length)
@@ -9081,7 +9081,7 @@ class q {
9081
9081
  data: A,
9082
9082
  parsedType: yA(A)
9083
9083
  }, C = this._parseSync({ data: A, path: B.path, parent: B });
9084
- return cB(B, C);
9084
+ return UB(B, C);
9085
9085
  }
9086
9086
  "~validate"(A) {
9087
9087
  const I = {
@@ -9134,7 +9134,7 @@ class q {
9134
9134
  data: A,
9135
9135
  parsedType: yA(A)
9136
9136
  }, C = this._parse({ data: A, path: B.path, parent: B }), Q = await (SI(C) ? C : Promise.resolve(C));
9137
- return cB(B, Q);
9137
+ return UB(B, Q);
9138
9138
  }
9139
9139
  refine(A, I) {
9140
9140
  const B = (C) => typeof I == "string" || typeof I > "u" ? { message: I } : typeof I == "function" ? I(C) : I;
@@ -9205,7 +9205,7 @@ class q {
9205
9205
  });
9206
9206
  }
9207
9207
  brand() {
9208
- return new ti({
9208
+ return new yi({
9209
9209
  typeName: M.ZodBranded,
9210
9210
  type: this,
9211
9211
  ...K(this._def)
@@ -9240,28 +9240,28 @@ class q {
9240
9240
  return this.safeParse(null).success;
9241
9241
  }
9242
9242
  }
9243
- const PE = /^c[^\s-]{8,}$/i, OE = /^[0-9a-z]+$/, VE = /^[0-9A-HJKMNP-TV-Z]{26}$/i, vE = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, XE = /^[a-z0-9_-]{21}$/i, jE = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, zE = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, _E = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, $E = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
9243
+ const OE = /^c[^\s-]{8,}$/i, VE = /^[0-9a-z]+$/, vE = /^[0-9A-HJKMNP-TV-Z]{26}$/i, XE = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, jE = /^[a-z0-9_-]{21}$/i, zE = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, _E = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, $E = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Ai = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
9244
9244
  let bI;
9245
- const Ai = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Ii = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, gi = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, Bi = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Ci = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Qi = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, iC = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", Ei = new RegExp(`^${iC}$`);
9246
- function oC(g) {
9245
+ const Ii = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, gi = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, Bi = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, Ci = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Qi = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Ei = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, oC = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", ii = new RegExp(`^${oC}$`);
9246
+ function aC(g) {
9247
9247
  let A = "[0-5]\\d";
9248
9248
  g.precision ? A = `${A}\\.\\d{${g.precision}}` : g.precision == null && (A = `${A}(\\.\\d+)?`);
9249
9249
  const I = g.precision ? "+" : "?";
9250
9250
  return `([01]\\d|2[0-3]):[0-5]\\d(:${A})${I}`;
9251
9251
  }
9252
- function ii(g) {
9253
- return new RegExp(`^${oC(g)}$`);
9254
- }
9255
9252
  function oi(g) {
9256
- let A = `${iC}T${oC(g)}`;
9253
+ return new RegExp(`^${aC(g)}$`);
9254
+ }
9255
+ function ai(g) {
9256
+ let A = `${oC}T${aC(g)}`;
9257
9257
  const I = [];
9258
9258
  return I.push(g.local ? "Z?" : "Z"), g.offset && I.push("([+-]\\d{2}:?\\d{2})"), A = `${A}(${I.join("|")})`, new RegExp(`^${A}$`);
9259
9259
  }
9260
- function ai(g, A) {
9261
- return !!((A === "v4" || !A) && Ai.test(g) || (A === "v6" || !A) && gi.test(g));
9262
- }
9263
9260
  function Di(g, A) {
9264
- if (!jE.test(g))
9261
+ return !!((A === "v4" || !A) && Ii.test(g) || (A === "v6" || !A) && Bi.test(g));
9262
+ }
9263
+ function si(g, A) {
9264
+ if (!zE.test(g))
9265
9265
  return !1;
9266
9266
  try {
9267
9267
  const [I] = g.split(".");
@@ -9273,8 +9273,8 @@ function Di(g, A) {
9273
9273
  return !1;
9274
9274
  }
9275
9275
  }
9276
- function si(g, A) {
9277
- return !!((A === "v4" || !A) && Ii.test(g) || (A === "v6" || !A) && Bi.test(g));
9276
+ function hi(g, A) {
9277
+ return !!((A === "v4" || !A) && gi.test(g) || (A === "v6" || !A) && Ci.test(g));
9278
9278
  }
9279
9279
  class eA extends q {
9280
9280
  _parse(A) {
@@ -9325,43 +9325,43 @@ class eA extends q {
9325
9325
  message: Q.message
9326
9326
  }), B.dirty());
9327
9327
  } else if (Q.kind === "email")
9328
- _E.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
9328
+ $E.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
9329
9329
  validation: "email",
9330
9330
  code: e.invalid_string,
9331
9331
  message: Q.message
9332
9332
  }), B.dirty());
9333
9333
  else if (Q.kind === "emoji")
9334
- bI || (bI = new RegExp($E, "u")), bI.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
9334
+ bI || (bI = new RegExp(Ai, "u")), bI.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
9335
9335
  validation: "emoji",
9336
9336
  code: e.invalid_string,
9337
9337
  message: Q.message
9338
9338
  }), B.dirty());
9339
9339
  else if (Q.kind === "uuid")
9340
- vE.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
9340
+ XE.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
9341
9341
  validation: "uuid",
9342
9342
  code: e.invalid_string,
9343
9343
  message: Q.message
9344
9344
  }), B.dirty());
9345
9345
  else if (Q.kind === "nanoid")
9346
- XE.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
9346
+ jE.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
9347
9347
  validation: "nanoid",
9348
9348
  code: e.invalid_string,
9349
9349
  message: Q.message
9350
9350
  }), B.dirty());
9351
9351
  else if (Q.kind === "cuid")
9352
- PE.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
9352
+ OE.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
9353
9353
  validation: "cuid",
9354
9354
  code: e.invalid_string,
9355
9355
  message: Q.message
9356
9356
  }), B.dirty());
9357
9357
  else if (Q.kind === "cuid2")
9358
- OE.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
9358
+ VE.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
9359
9359
  validation: "cuid2",
9360
9360
  code: e.invalid_string,
9361
9361
  message: Q.message
9362
9362
  }), B.dirty());
9363
9363
  else if (Q.kind === "ulid")
9364
- VE.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
9364
+ vE.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
9365
9365
  validation: "ulid",
9366
9366
  code: e.invalid_string,
9367
9367
  message: Q.message
@@ -9392,39 +9392,39 @@ class eA extends q {
9392
9392
  code: e.invalid_string,
9393
9393
  validation: { endsWith: Q.value },
9394
9394
  message: Q.message
9395
- }), B.dirty()) : Q.kind === "datetime" ? oi(Q).test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
9395
+ }), B.dirty()) : Q.kind === "datetime" ? ai(Q).test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
9396
9396
  code: e.invalid_string,
9397
9397
  validation: "datetime",
9398
9398
  message: Q.message
9399
- }), B.dirty()) : Q.kind === "date" ? Ei.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
9399
+ }), B.dirty()) : Q.kind === "date" ? ii.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
9400
9400
  code: e.invalid_string,
9401
9401
  validation: "date",
9402
9402
  message: Q.message
9403
- }), B.dirty()) : Q.kind === "time" ? ii(Q).test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
9403
+ }), B.dirty()) : Q.kind === "time" ? oi(Q).test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
9404
9404
  code: e.invalid_string,
9405
9405
  validation: "time",
9406
9406
  message: Q.message
9407
- }), B.dirty()) : Q.kind === "duration" ? zE.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
9407
+ }), B.dirty()) : Q.kind === "duration" ? _E.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
9408
9408
  validation: "duration",
9409
9409
  code: e.invalid_string,
9410
9410
  message: Q.message
9411
- }), B.dirty()) : Q.kind === "ip" ? ai(A.data, Q.version) || (C = this._getOrReturnCtx(A, C), w(C, {
9411
+ }), B.dirty()) : Q.kind === "ip" ? Di(A.data, Q.version) || (C = this._getOrReturnCtx(A, C), w(C, {
9412
9412
  validation: "ip",
9413
9413
  code: e.invalid_string,
9414
9414
  message: Q.message
9415
- }), B.dirty()) : Q.kind === "jwt" ? Di(A.data, Q.alg) || (C = this._getOrReturnCtx(A, C), w(C, {
9415
+ }), B.dirty()) : Q.kind === "jwt" ? si(A.data, Q.alg) || (C = this._getOrReturnCtx(A, C), w(C, {
9416
9416
  validation: "jwt",
9417
9417
  code: e.invalid_string,
9418
9418
  message: Q.message
9419
- }), B.dirty()) : Q.kind === "cidr" ? si(A.data, Q.version) || (C = this._getOrReturnCtx(A, C), w(C, {
9419
+ }), B.dirty()) : Q.kind === "cidr" ? hi(A.data, Q.version) || (C = this._getOrReturnCtx(A, C), w(C, {
9420
9420
  validation: "cidr",
9421
9421
  code: e.invalid_string,
9422
9422
  message: Q.message
9423
- }), B.dirty()) : Q.kind === "base64" ? Ci.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
9423
+ }), B.dirty()) : Q.kind === "base64" ? Qi.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
9424
9424
  validation: "base64",
9425
9425
  code: e.invalid_string,
9426
9426
  message: Q.message
9427
- }), B.dirty()) : Q.kind === "base64url" ? Qi.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
9427
+ }), B.dirty()) : Q.kind === "base64url" ? Ei.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
9428
9428
  validation: "base64url",
9429
9429
  code: e.invalid_string,
9430
9430
  message: Q.message
@@ -9659,7 +9659,7 @@ eA.create = (g) => new eA({
9659
9659
  coerce: g?.coerce ?? !1,
9660
9660
  ...K(g)
9661
9661
  });
9662
- function hi(g, A) {
9662
+ function ti(g, A) {
9663
9663
  const I = (g.toString().split(".")[1] || "").length, B = (A.toString().split(".")[1] || "").length, C = I > B ? I : B, Q = Number.parseInt(g.toFixed(C).replace(".", "")), E = Number.parseInt(A.toFixed(C).replace(".", ""));
9664
9664
  return Q % E / 10 ** C;
9665
9665
  }
@@ -9698,7 +9698,7 @@ class HA extends q {
9698
9698
  inclusive: Q.inclusive,
9699
9699
  exact: !1,
9700
9700
  message: Q.message
9701
- }), C.dirty()) : Q.kind === "multipleOf" ? hi(A.data, Q.value) !== 0 && (B = this._getOrReturnCtx(A, B), w(B, {
9701
+ }), C.dirty()) : Q.kind === "multipleOf" ? ti(A.data, Q.value) !== 0 && (B = this._getOrReturnCtx(A, B), w(B, {
9702
9702
  code: e.not_multiple_of,
9703
9703
  multipleOf: Q.value,
9704
9704
  message: Q.message
@@ -10064,7 +10064,7 @@ RI.create = (g) => new RI({
10064
10064
  typeName: M.ZodDate,
10065
10065
  ...K(g)
10066
10066
  });
10067
- class UB extends q {
10067
+ class kB extends q {
10068
10068
  _parse(A) {
10069
10069
  if (this._getType(A) !== R.symbol) {
10070
10070
  const B = this._getOrReturnCtx(A);
@@ -10077,11 +10077,11 @@ class UB extends q {
10077
10077
  return QA(A.data);
10078
10078
  }
10079
10079
  }
10080
- UB.create = (g) => new UB({
10080
+ kB.create = (g) => new kB({
10081
10081
  typeName: M.ZodSymbol,
10082
10082
  ...K(g)
10083
10083
  });
10084
- class kB extends q {
10084
+ class LB extends q {
10085
10085
  _parse(A) {
10086
10086
  if (this._getType(A) !== R.undefined) {
10087
10087
  const B = this._getOrReturnCtx(A);
@@ -10094,11 +10094,11 @@ class kB extends q {
10094
10094
  return QA(A.data);
10095
10095
  }
10096
10096
  }
10097
- kB.create = (g) => new kB({
10097
+ LB.create = (g) => new LB({
10098
10098
  typeName: M.ZodUndefined,
10099
10099
  ...K(g)
10100
10100
  });
10101
- class LB extends q {
10101
+ class JB extends q {
10102
10102
  _parse(A) {
10103
10103
  if (this._getType(A) !== R.null) {
10104
10104
  const B = this._getOrReturnCtx(A);
@@ -10111,7 +10111,7 @@ class LB extends q {
10111
10111
  return QA(A.data);
10112
10112
  }
10113
10113
  }
10114
- LB.create = (g) => new LB({
10114
+ JB.create = (g) => new JB({
10115
10115
  typeName: M.ZodNull,
10116
10116
  ...K(g)
10117
10117
  });
@@ -10127,7 +10127,7 @@ Qg.create = (g) => new Qg({
10127
10127
  typeName: M.ZodAny,
10128
10128
  ...K(g)
10129
10129
  });
10130
- class JB extends q {
10130
+ class YB extends q {
10131
10131
  constructor() {
10132
10132
  super(...arguments), this._unknown = !0;
10133
10133
  }
@@ -10135,7 +10135,7 @@ class JB extends q {
10135
10135
  return QA(A.data);
10136
10136
  }
10137
10137
  }
10138
- JB.create = (g) => new JB({
10138
+ YB.create = (g) => new YB({
10139
10139
  typeName: M.ZodUnknown,
10140
10140
  ...K(g)
10141
10141
  });
@@ -10153,7 +10153,7 @@ FA.create = (g) => new FA({
10153
10153
  typeName: M.ZodNever,
10154
10154
  ...K(g)
10155
10155
  });
10156
- class YB extends q {
10156
+ class MB extends q {
10157
10157
  _parse(A) {
10158
10158
  if (this._getType(A) !== R.undefined) {
10159
10159
  const B = this._getOrReturnCtx(A);
@@ -10166,7 +10166,7 @@ class YB extends q {
10166
10166
  return QA(A.data);
10167
10167
  }
10168
10168
  }
10169
- YB.create = (g) => new YB({
10169
+ MB.create = (g) => new MB({
10170
10170
  typeName: M.ZodVoid,
10171
10171
  ...K(g)
10172
10172
  });
@@ -10522,7 +10522,7 @@ class O extends q {
10522
10522
  });
10523
10523
  }
10524
10524
  keyof() {
10525
- return aC(l.objectKeys(this.shape));
10525
+ return DC(l.objectKeys(this.shape));
10526
10526
  }
10527
10527
  }
10528
10528
  O.create = (g, A) => new O({
@@ -10648,10 +10648,10 @@ function Eg(g, A) {
10648
10648
  class cI extends q {
10649
10649
  _parse(A) {
10650
10650
  const { status: I, ctx: B } = this._processInputParams(A), C = (Q, E) => {
10651
- if (RB(Q) || RB(E))
10651
+ if (NB(Q) || NB(E))
10652
10652
  return Y;
10653
10653
  const i = Eg(Q.value, E.value);
10654
- return i.valid ? ((NB(Q) || NB(E)) && I.dirty(), { status: I.value, value: i.data }) : (w(B, {
10654
+ return i.valid ? ((cB(Q) || cB(E)) && I.dirty(), { status: I.value, value: i.data }) : (w(B, {
10655
10655
  code: e.invalid_intersection_types
10656
10656
  }), Y);
10657
10657
  };
@@ -10733,7 +10733,7 @@ cA.create = (g, A) => {
10733
10733
  ...K(A)
10734
10734
  });
10735
10735
  };
10736
- class MB extends q {
10736
+ class dB extends q {
10737
10737
  get keySchema() {
10738
10738
  return this._def.keyType;
10739
10739
  }
@@ -10775,7 +10775,7 @@ class MB extends q {
10775
10775
  }
10776
10776
  }
10777
10777
  }
10778
- MB.create = (g, A, I) => new MB({
10778
+ dB.create = (g, A, I) => new dB({
10779
10779
  valueType: A,
10780
10780
  keyType: g,
10781
10781
  typeName: M.ZodMap,
@@ -10845,7 +10845,7 @@ zA.create = (g, A) => new zA({
10845
10845
  typeName: M.ZodSet,
10846
10846
  ...K(A)
10847
10847
  });
10848
- class dB extends q {
10848
+ class KB extends q {
10849
10849
  get schema() {
10850
10850
  return this._def.getter();
10851
10851
  }
@@ -10854,7 +10854,7 @@ class dB extends q {
10854
10854
  return this._def.getter()._parse({ data: I.data, path: I.path, parent: I });
10855
10855
  }
10856
10856
  }
10857
- dB.create = (g, A) => new dB({
10857
+ KB.create = (g, A) => new KB({
10858
10858
  getter: g,
10859
10859
  typeName: M.ZodLazy,
10860
10860
  ...K(A)
@@ -10880,7 +10880,7 @@ ig.create = (g, A) => new ig({
10880
10880
  typeName: M.ZodLiteral,
10881
10881
  ...K(A)
10882
10882
  });
10883
- function aC(g, A) {
10883
+ function DC(g, A) {
10884
10884
  return new qA({
10885
10885
  values: g,
10886
10886
  typeName: M.ZodEnum,
@@ -10941,8 +10941,8 @@ class qA extends q {
10941
10941
  });
10942
10942
  }
10943
10943
  }
10944
- qA.create = aC;
10945
- class KB extends q {
10944
+ qA.create = DC;
10945
+ class HB extends q {
10946
10946
  _parse(A) {
10947
10947
  const I = l.getValidEnumValues(this._def.values), B = this._getOrReturnCtx(A);
10948
10948
  if (B.parsedType !== R.string && B.parsedType !== R.number) {
@@ -10967,7 +10967,7 @@ class KB extends q {
10967
10967
  return this._def.values;
10968
10968
  }
10969
10969
  }
10970
- KB.create = (g, A) => new KB({
10970
+ HB.create = (g, A) => new HB({
10971
10971
  values: g,
10972
10972
  typeName: M.ZodNativeEnum,
10973
10973
  ...K(A)
@@ -11177,7 +11177,7 @@ ag.create = (g, A) => new ag({
11177
11177
  catchValue: typeof A.catch == "function" ? A.catch : () => A.catch,
11178
11178
  ...K(A)
11179
11179
  });
11180
- class HB extends q {
11180
+ class qB extends q {
11181
11181
  _parse(A) {
11182
11182
  if (this._getType(A) !== R.nan) {
11183
11183
  const B = this._getOrReturnCtx(A);
@@ -11190,11 +11190,11 @@ class HB extends q {
11190
11190
  return { status: "valid", value: A.data };
11191
11191
  }
11192
11192
  }
11193
- HB.create = (g) => new HB({
11193
+ qB.create = (g) => new qB({
11194
11194
  typeName: M.ZodNaN,
11195
11195
  ...K(g)
11196
11196
  });
11197
- class ti extends q {
11197
+ class yi extends q {
11198
11198
  _parse(A) {
11199
11199
  const { ctx: I } = this._processInputParams(A), B = I.data;
11200
11200
  return this._def.type._parse({
@@ -11265,7 +11265,7 @@ var M;
11265
11265
  (function(g) {
11266
11266
  g.ZodString = "ZodString", g.ZodNumber = "ZodNumber", g.ZodNaN = "ZodNaN", g.ZodBigInt = "ZodBigInt", g.ZodBoolean = "ZodBoolean", g.ZodDate = "ZodDate", g.ZodSymbol = "ZodSymbol", g.ZodUndefined = "ZodUndefined", g.ZodNull = "ZodNull", g.ZodAny = "ZodAny", g.ZodUnknown = "ZodUnknown", g.ZodNever = "ZodNever", g.ZodVoid = "ZodVoid", g.ZodArray = "ZodArray", g.ZodObject = "ZodObject", g.ZodUnion = "ZodUnion", g.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", g.ZodIntersection = "ZodIntersection", g.ZodTuple = "ZodTuple", g.ZodRecord = "ZodRecord", g.ZodMap = "ZodMap", g.ZodSet = "ZodSet", g.ZodFunction = "ZodFunction", g.ZodLazy = "ZodLazy", g.ZodLiteral = "ZodLiteral", g.ZodEnum = "ZodEnum", g.ZodEffects = "ZodEffects", g.ZodNativeEnum = "ZodNativeEnum", g.ZodOptional = "ZodOptional", g.ZodNullable = "ZodNullable", g.ZodDefault = "ZodDefault", g.ZodCatch = "ZodCatch", g.ZodPromise = "ZodPromise", g.ZodBranded = "ZodBranded", g.ZodPipeline = "ZodPipeline", g.ZodReadonly = "ZodReadonly";
11267
11267
  })(M || (M = {}));
11268
- const u = eA.create, H = HA.create, DC = Cg.create, nA = Qg.create;
11268
+ const u = eA.create, H = HA.create, sC = Cg.create, nA = Qg.create;
11269
11269
  FA.create;
11270
11270
  const m = sA.create, L = O.create;
11271
11271
  NI.create;
@@ -11275,7 +11275,7 @@ const _ = ig.create, LA = qA.create;
11275
11275
  UI.create;
11276
11276
  GA.create;
11277
11277
  fA.create;
11278
- const yi = L({
11278
+ const ei = L({
11279
11279
  /**The multiscale datasets for this image*/
11280
11280
  multiscales: m(
11281
11281
  L({
@@ -11388,7 +11388,7 @@ const yi = L({
11388
11388
  label: u().optional(),
11389
11389
  family: u().optional(),
11390
11390
  color: u(),
11391
- active: DC().optional()
11391
+ active: sC().optional()
11392
11392
  })
11393
11393
  ),
11394
11394
  // The rdefs are not in the JSON schema and are not particularly well
@@ -11403,7 +11403,7 @@ const yi = L({
11403
11403
  projection: u().optional()
11404
11404
  }).optional()
11405
11405
  }).optional()
11406
- }).describe("JSON from OME-NGFF .zattrs"), ei = L({
11406
+ }).describe("JSON from OME-NGFF .zattrs"), ni = L({
11407
11407
  plate: L({
11408
11408
  /**The acquisitions for this plate*/
11409
11409
  acquisitions: m(
@@ -11462,7 +11462,7 @@ const yi = L({
11462
11462
  })
11463
11463
  ).min(1).describe("The wells of the plate")
11464
11464
  }).optional()
11465
- }).describe("JSON from OME-NGFF .zattrs"), ni = L({
11465
+ }).describe("JSON from OME-NGFF .zattrs"), Gi = L({
11466
11466
  well: L({
11467
11467
  /**The fields of view for this well*/
11468
11468
  images: m(
@@ -11476,7 +11476,7 @@ const yi = L({
11476
11476
  /**The version of the specification*/
11477
11477
  version: _("0.4").describe("The version of the specification").optional()
11478
11478
  }).optional()
11479
- }).describe("JSON from OME-NGFF .zattrs"), Gi = L({
11479
+ }).describe("JSON from OME-NGFF .zattrs"), wi = L({
11480
11480
  /**The versioned OME-Zarr Metadata namespace*/
11481
11481
  ome: L({
11482
11482
  /**The multiscale datasets for this image*/
@@ -11588,7 +11588,7 @@ const yi = L({
11588
11588
  label: u().optional(),
11589
11589
  family: u().optional(),
11590
11590
  color: u().optional(),
11591
- active: DC().optional()
11591
+ active: sC().optional()
11592
11592
  })
11593
11593
  ),
11594
11594
  // The rdefs are not in the JSON schema and are not particularly well
@@ -11606,7 +11606,7 @@ const yi = L({
11606
11606
  /**The version of the OME-Zarr Metadata*/
11607
11607
  version: _("0.5").describe("The version of the OME-Zarr Metadata")
11608
11608
  }).describe("The versioned OME-Zarr Metadata namespace")
11609
- }).describe("The zarr.json attributes key"), wi = L({
11609
+ }).describe("The zarr.json attributes key"), Fi = L({
11610
11610
  /**The versioned OME-Zarr Metadata namespace*/
11611
11611
  ome: L({
11612
11612
  plate: L({
@@ -11668,7 +11668,7 @@ const yi = L({
11668
11668
  /**The version of the OME-Zarr Metadata*/
11669
11669
  version: _("0.5").describe("The version of the OME-Zarr Metadata")
11670
11670
  }).describe("The versioned OME-Zarr Metadata namespace")
11671
- }).describe("The zarr.json attributes key"), Fi = L({
11671
+ }).describe("The zarr.json attributes key"), ri = L({
11672
11672
  /**The versioned OME-Zarr Metadata namespace*/
11673
11673
  ome: L({
11674
11674
  well: L({
@@ -11687,15 +11687,15 @@ const yi = L({
11687
11687
  /**The version of the OME-Zarr Metadata*/
11688
11688
  version: _("0.5").describe("The version of the OME-Zarr Metadata")
11689
11689
  }).describe("The versioned OME-Zarr Metadata namespace")
11690
- }).describe("JSON from OME-Zarr zarr.json"), ri = ["0.4", "0.5"], Si = new Set(ri);
11691
- function Ri(g) {
11690
+ }).describe("JSON from OME-Zarr zarr.json"), Si = ["0.4", "0.5"], Ri = new Set(Si);
11691
+ function Ni(g) {
11692
11692
  if (!("ome" in g) || !(g.ome instanceof Object)) return;
11693
11693
  const A = g.ome;
11694
- if ("version" in A && typeof A.version == "string" && Si.has(A.version))
11694
+ if ("version" in A && typeof A.version == "string" && Ri.has(A.version))
11695
11695
  return A.version;
11696
11696
  }
11697
11697
  function lg(g) {
11698
- const A = Ri(g);
11698
+ const A = Ni(g);
11699
11699
  return A === void 0 ? "0.4" : A;
11700
11700
  }
11701
11701
  function pA(g) {
@@ -11707,14 +11707,14 @@ function pA(g) {
11707
11707
  return "v3";
11708
11708
  }
11709
11709
  }
11710
- function sC(g, A) {
11710
+ function hC(g, A) {
11711
11711
  const I = { ...g };
11712
11712
  return delete I[A], I;
11713
11713
  }
11714
- async function yo(g, A) {
11714
+ async function eo(g, A) {
11715
11715
  const I = new $A(g), B = new CA(I), C = pA(A), Q = await BI(B, C);
11716
11716
  try {
11717
- return Ni(Q.attrs);
11717
+ return ci(Q.attrs);
11718
11718
  } catch {
11719
11719
  throw Error(
11720
11720
  `Failed to parse OME-Zarr plate:
@@ -11722,58 +11722,58 @@ ${JSON.stringify(Q.attrs)}`
11722
11722
  );
11723
11723
  }
11724
11724
  }
11725
- function Ni(g) {
11725
+ function ci(g) {
11726
11726
  switch (lg(g)) {
11727
11727
  case "0.5":
11728
11728
  return {
11729
- ...wi.parse(g).ome,
11729
+ ...Fi.parse(g).ome,
11730
11730
  originalVersion: "0.5"
11731
11731
  };
11732
11732
  case "0.4":
11733
11733
  return {
11734
- ...ci(ei.parse(g)).ome,
11734
+ ...Ui(ni.parse(g)).ome,
11735
11735
  originalVersion: "0.4"
11736
11736
  };
11737
11737
  }
11738
11738
  }
11739
- function ci(g) {
11739
+ function Ui(g) {
11740
11740
  if (g.plate === void 0)
11741
11741
  throw new Error("Plate metadata is missing in OME-Zarr v0.4 plate");
11742
11742
  return {
11743
11743
  ome: {
11744
- plate: sC(g.plate, "version"),
11744
+ plate: hC(g.plate, "version"),
11745
11745
  version: "0.5"
11746
11746
  }
11747
11747
  };
11748
11748
  }
11749
- function Ui(g) {
11749
+ function ki(g) {
11750
11750
  if (g.well === void 0)
11751
11751
  throw new Error("Well metadata is missing in OME-Zarr v0.4 well");
11752
11752
  return {
11753
11753
  ome: {
11754
- well: sC(g.well, "version"),
11754
+ well: hC(g.well, "version"),
11755
11755
  version: "0.5"
11756
11756
  }
11757
11757
  };
11758
11758
  }
11759
- function ki(g) {
11759
+ function Li(g) {
11760
11760
  switch (lg(g)) {
11761
11761
  case "0.5":
11762
11762
  return {
11763
- ...Fi.parse(g).ome,
11763
+ ...ri.parse(g).ome,
11764
11764
  originalVersion: "0.5"
11765
11765
  };
11766
11766
  case "0.4":
11767
11767
  return {
11768
- ...Ui(ni.parse(g)).ome,
11768
+ ...ki(Gi.parse(g)).ome,
11769
11769
  originalVersion: "0.4"
11770
11770
  };
11771
11771
  }
11772
11772
  }
11773
- async function eo(g, A, I) {
11773
+ async function no(g, A, I) {
11774
11774
  const B = g + "/" + A, C = new $A(B), Q = new CA(C), E = pA(I), i = await BI(Q, E);
11775
11775
  try {
11776
- return ki(i.attrs);
11776
+ return Li(i.attrs);
11777
11777
  } catch {
11778
11778
  throw Error(
11779
11779
  `Failed to parse OME-Zarr well:
@@ -11781,15 +11781,15 @@ ${JSON.stringify(i.attrs)}`
11781
11781
  );
11782
11782
  }
11783
11783
  }
11784
- async function no(g) {
11784
+ async function Go(g) {
11785
11785
  const A = pA(g.version), I = await BI(g.location, A);
11786
11786
  return fg(I.attrs).omero?.channels ?? [];
11787
11787
  }
11788
- async function Go(g) {
11788
+ async function wo(g) {
11789
11789
  const A = pA(g.version), I = await BI(g.location, A);
11790
11790
  return fg(I.attrs).omero?.rdefs;
11791
11791
  }
11792
- function Li(g) {
11792
+ function Ji(g) {
11793
11793
  return {
11794
11794
  ome: {
11795
11795
  multiscales: g.multiscales,
@@ -11798,23 +11798,23 @@ function Li(g) {
11798
11798
  }
11799
11799
  };
11800
11800
  }
11801
- function Ji(g) {
11801
+ function Yi(g) {
11802
11802
  switch (lg(g)) {
11803
11803
  case "0.5":
11804
11804
  return {
11805
- ...Gi.parse(g).ome,
11805
+ ...wi.parse(g).ome,
11806
11806
  originalVersion: "0.5"
11807
11807
  };
11808
11808
  case "0.4":
11809
11809
  return {
11810
- ...Li(yi.parse(g)).ome,
11810
+ ...Ji(ei.parse(g)).ome,
11811
11811
  originalVersion: "0.4"
11812
11812
  };
11813
11813
  }
11814
11814
  }
11815
11815
  function fg(g) {
11816
11816
  try {
11817
- return Ji(g);
11817
+ return Yi(g);
11818
11818
  } catch {
11819
11819
  throw Error(`Failed to parse OME-Zarr image:
11820
11820
  ${JSON.stringify(g)}`);
@@ -11839,15 +11839,15 @@ class OA {
11839
11839
  throw new Error("No datasets found in the multiscale image.");
11840
11840
  B || (B = pA(Q.originalVersion));
11841
11841
  const o = i.datasets.map(
11842
- (h) => UE(A, h.path, B)
11842
+ (h) => kE(A, h.path, B)
11843
11843
  ), a = await Promise.all(
11844
- o.map((h) => cE(h))
11844
+ o.map((h) => UE(h))
11845
11845
  ), D = a[0].shape, s = i.axes;
11846
11846
  if (s.length !== D.length)
11847
11847
  throw new Error(
11848
11848
  `Mismatch between number of axes (${s.length}) and array shape (${D.length})`
11849
11849
  );
11850
- return new pE({ metadata: i, arrays: a, arrayParams: o });
11850
+ return new mE({ metadata: i, arrays: a, arrayParams: o });
11851
11851
  }
11852
11852
  getDimensions() {
11853
11853
  return this.loader_.getSourceDimensionMap();
@@ -11954,7 +11954,7 @@ class KI {
11954
11954
  return {};
11955
11955
  }
11956
11956
  }
11957
- class Yi extends mA {
11957
+ class Mi extends mA {
11958
11958
  // this creates the geometry for a screen-space projected line
11959
11959
  // each point on the input path is split into two vertices
11960
11960
  // these are pushed in opposite directions in screen-space to create width
@@ -12003,7 +12003,7 @@ class Yi extends mA {
12003
12003
  return I;
12004
12004
  }
12005
12005
  }
12006
- class Mi extends mA {
12006
+ class di extends mA {
12007
12007
  constructor(A) {
12008
12008
  if (super(), A.primitive != "triangles") {
12009
12009
  k.warn("WireframeGeometry", "Only indexed geometries are supported");
@@ -12028,21 +12028,21 @@ class Mi extends mA {
12028
12028
  this.indexData_ = new Uint32Array(B);
12029
12029
  }
12030
12030
  }
12031
- const di = p(0, 1, 0);
12032
- class Ki {
12031
+ const Ki = p(0, 1, 0);
12032
+ class Hi {
12033
12033
  dirty_ = !0;
12034
12034
  matrix_ = $();
12035
12035
  rotation_ = sI();
12036
12036
  translation_ = d();
12037
12037
  scale_ = p(1, 1, 1);
12038
12038
  addRotation(A) {
12039
- gQ(this.rotation_, this.rotation_, A), this.dirty_ = !0;
12039
+ BQ(this.rotation_, this.rotation_, A), this.dirty_ = !0;
12040
12040
  }
12041
12041
  setRotation(A) {
12042
- CQ(this.rotation_, A), this.dirty_ = !0;
12042
+ QQ(this.rotation_, A), this.dirty_ = !0;
12043
12043
  }
12044
12044
  get rotation() {
12045
- return BQ(this.rotation_);
12045
+ return CQ(this.rotation_);
12046
12046
  }
12047
12047
  addTranslation(A) {
12048
12048
  JA(this.translation_, this.translation_, A), this.dirty_ = !0;
@@ -12054,14 +12054,14 @@ class Ki {
12054
12054
  return DA(this.translation_);
12055
12055
  }
12056
12056
  addScale(A) {
12057
- vC(this.scale_, this.scale_, A), this.dirty_ = !0;
12057
+ XC(this.scale_, this.scale_, A), this.dirty_ = !0;
12058
12058
  }
12059
12059
  setScale(A) {
12060
12060
  XI(this.scale_, A), this.dirty_ = !0;
12061
12061
  }
12062
12062
  targetTo(A) {
12063
12063
  ng(this.translation_, A) && (A = DA(A), A[2] += T);
12064
- const I = OC($(), this.translation_, A, di), B = mC(ZB(), I);
12064
+ const I = VC($(), this.translation_, A, Ki), B = uC(PB(), I);
12065
12065
  Gg(this.rotation_, B), JI(this.rotation_, this.rotation_), this.dirty_ = !0;
12066
12066
  }
12067
12067
  get scale() {
@@ -12074,7 +12074,7 @@ class Ki {
12074
12074
  return LI($(), this.matrix);
12075
12075
  }
12076
12076
  computeMatrix() {
12077
- xC(
12077
+ WC(
12078
12078
  this.matrix_,
12079
12079
  this.rotation_,
12080
12080
  this.translation_,
@@ -12156,7 +12156,7 @@ class xA extends hg {
12156
12156
  depthTest = !0;
12157
12157
  textures_ = [];
12158
12158
  staleTextures_ = [];
12159
- transform_ = new Ki();
12159
+ transform_ = new Hi();
12160
12160
  geometry_ = new mA();
12161
12161
  wireframeGeometry_ = null;
12162
12162
  programName_ = null;
@@ -12178,7 +12178,7 @@ class xA extends hg {
12178
12178
  return this.geometry_;
12179
12179
  }
12180
12180
  get wireframeGeometry() {
12181
- return this.wireframeGeometry_ ??= new Mi(this.geometry), this.wireframeGeometry_;
12181
+ return this.wireframeGeometry_ ??= new di(this.geometry), this.wireframeGeometry_;
12182
12182
  }
12183
12183
  get textures() {
12184
12184
  return this.textures_;
@@ -12213,7 +12213,7 @@ class xA extends hg {
12213
12213
  return {};
12214
12214
  }
12215
12215
  }
12216
- class Hi extends xA {
12216
+ class qi extends xA {
12217
12217
  color_;
12218
12218
  width_;
12219
12219
  constructor({ geometry: A, color: I, width: B }) {
@@ -12241,7 +12241,7 @@ class Hi extends xA {
12241
12241
  };
12242
12242
  }
12243
12243
  }
12244
- class wo extends KI {
12244
+ class Fo extends KI {
12245
12245
  type = "AxesLayer";
12246
12246
  constructor(A) {
12247
12247
  super();
@@ -12270,16 +12270,109 @@ class wo extends KI {
12270
12270
  }
12271
12271
  }
12272
12272
  function ZI(g) {
12273
- const { end: A, width: I, color: B } = g, C = new Yi([[0, 0, 0], A]);
12274
- return new Hi({
12273
+ const { end: A, width: I, color: B } = g, C = new Mi([[0, 0, 0], A]);
12274
+ return new qi({
12275
12275
  geometry: C,
12276
12276
  color: B,
12277
12277
  width: I
12278
12278
  });
12279
12279
  }
12280
- const qB = 32;
12280
+ const tC = [
12281
+ "fallbackVisible",
12282
+ "prefetchTime",
12283
+ "visibleCurrent",
12284
+ "fallbackBackground",
12285
+ "prefetchSpace"
12286
+ ];
12287
+ function pg(g) {
12288
+ li(g);
12289
+ const A = {
12290
+ x: g.prefetch.x,
12291
+ y: g.prefetch.y,
12292
+ z: g.prefetch.z ?? 0,
12293
+ t: g.prefetch.t ?? 0
12294
+ }, I = Object.freeze(
12295
+ tC.reduce(
12296
+ (Q, E) => {
12297
+ const i = g.priorityOrder.indexOf(E);
12298
+ return Q[E] = i, Q;
12299
+ },
12300
+ {}
12301
+ )
12302
+ ), B = {
12303
+ min: g.lod?.min ?? 0,
12304
+ max: g.lod?.max ?? Number.MAX_SAFE_INTEGER,
12305
+ bias: g.lod?.bias ?? 0.5
12306
+ }, C = {
12307
+ profile: g.profile ?? "custom",
12308
+ prefetch: A,
12309
+ priorityOrder: Object.freeze([...g.priorityOrder]),
12310
+ priorityMap: I,
12311
+ lod: B
12312
+ };
12313
+ return Object.freeze(C);
12314
+ }
12315
+ function mg(g = {}) {
12316
+ return pg(ug({
12317
+ profile: "exploration",
12318
+ prefetch: { x: 1, y: 1, z: 1, t: 0 },
12319
+ priorityOrder: [
12320
+ "fallbackVisible",
12321
+ "visibleCurrent",
12322
+ "prefetchSpace",
12323
+ "prefetchTime",
12324
+ "fallbackBackground"
12325
+ ]
12326
+ }, g));
12327
+ }
12328
+ function ro(g = {}) {
12329
+ return pg(ug({
12330
+ profile: "playback",
12331
+ prefetch: { x: 0, y: 0, z: 0, t: 20 },
12332
+ priorityOrder: [
12333
+ "fallbackVisible",
12334
+ "prefetchTime",
12335
+ "visibleCurrent",
12336
+ "fallbackBackground",
12337
+ "prefetchSpace"
12338
+ ]
12339
+ }, g));
12340
+ }
12341
+ function So(g = {}) {
12342
+ return pg(ug({
12343
+ profile: "no-prefetch",
12344
+ prefetch: { x: 0, y: 0, z: 0, t: 0 },
12345
+ priorityOrder: [
12346
+ "fallbackVisible",
12347
+ "visibleCurrent",
12348
+ "fallbackBackground",
12349
+ "prefetchSpace",
12350
+ "prefetchTime"
12351
+ ]
12352
+ }, g));
12353
+ }
12354
+ function li(g) {
12355
+ for (const [B, C] of Object.entries(g.prefetch))
12356
+ if (C !== void 0 && C < 0)
12357
+ throw new Error(`prefetch.${B} must be a non-negative number`);
12358
+ const A = g.lod;
12359
+ if (A?.min !== void 0 && A?.max !== void 0 && A.min > A.max)
12360
+ throw new Error("lod.min must be <= lod.max");
12361
+ const I = g.priorityOrder;
12362
+ if (I.length !== tC.length || new Set(I).size !== I.length)
12363
+ throw new Error("priorityOrder must include all categories exactly once");
12364
+ }
12365
+ function ug(g, A = {}) {
12366
+ return {
12367
+ profile: A.profile ?? g.profile,
12368
+ prefetch: { ...g.prefetch, ...A.prefetch ?? {} },
12369
+ lod: { ...g.lod, ...A.lod ?? {} },
12370
+ priorityOrder: A.priorityOrder ?? g.priorityOrder
12371
+ };
12372
+ }
12373
+ const lB = 32;
12281
12374
  function _A(g, { visible: A, color: I, contrastLimits: B, opacity: C }) {
12282
- return A ??= !0, I = I === void 0 ? x.WHITE : x.from(I), C = C === void 0 ? 1 : hA(C, 0, 1), g !== null ? B = qi(B, g) : B === void 0 && (k.debug(
12375
+ return A ??= !0, I = I === void 0 ? x.WHITE : x.from(I), C = C === void 0 ? 1 : hA(C, 0, 1), g !== null ? B = fi(B, g) : B === void 0 && (k.debug(
12283
12376
  "Channel",
12284
12377
  "No texture provided, defaulting channel contrast limits to [0, 1]."
12285
12378
  ), B = [0, 1]), {
@@ -12290,26 +12383,26 @@ function _A(g, { visible: A, color: I, contrastLimits: B, opacity: C }) {
12290
12383
  };
12291
12384
  }
12292
12385
  function sg(g, A) {
12293
- if (A.length > qB)
12294
- throw new Error(`Maximum number of channels is ${qB}`);
12386
+ if (A.length > lB)
12387
+ throw new Error(`Maximum number of channels is ${lB}`);
12295
12388
  return A.map((I) => _A(g, I));
12296
12389
  }
12297
- function hC(g, A) {
12390
+ function yC(g, A) {
12298
12391
  if (g && g.length !== A)
12299
12392
  throw new Error(
12300
12393
  `channelProps length (${g.length}) must match source channel count (${A}).`
12301
12394
  );
12302
12395
  }
12303
- function qi(g, A) {
12396
+ function fi(g, A) {
12304
12397
  if (g === void 0)
12305
- return tQ(A);
12398
+ return yQ(A);
12306
12399
  if (g[1] <= g[0])
12307
12400
  throw new Error(
12308
12401
  `Contrast limits must be strictly increasing: ${g}.`
12309
12402
  );
12310
12403
  return g;
12311
12404
  }
12312
- class tC extends mA {
12405
+ class eC extends mA {
12313
12406
  constructor(A, I, B, C) {
12314
12407
  super();
12315
12408
  const Q = [], E = [], i = B, o = C, a = i + 1, D = o + 1, s = A / i, h = I / o;
@@ -12340,11 +12433,16 @@ class tC extends mA {
12340
12433
  });
12341
12434
  }
12342
12435
  }
12343
- class li extends xA {
12436
+ class pi extends xA {
12344
12437
  channels_;
12345
12438
  worldToTexCoord = $();
12346
- constructor(A, I, B, C = []) {
12347
- super(), this.geometry = new tC(A, I, 1, 1), this.setTexture(0, B), this.channels_ = sg(B, C), this.programName = fi(B);
12439
+ constructor({
12440
+ width: A,
12441
+ height: I,
12442
+ texture: B,
12443
+ channelProps: C = []
12444
+ }) {
12445
+ super(), this.geometry = new eC(A, I, 1, 1), this.setTexture(0, B), this.channels_ = sg(B, C), this.programName = mi(B);
12348
12446
  }
12349
12447
  get type() {
12350
12448
  return "ImageRenderable";
@@ -12374,7 +12472,7 @@ class li extends xA {
12374
12472
  };
12375
12473
  }
12376
12474
  }
12377
- function fi(g) {
12475
+ function mi(g) {
12378
12476
  switch (g.dataType) {
12379
12477
  case "byte":
12380
12478
  case "int":
@@ -12411,7 +12509,7 @@ class aA {
12411
12509
  }
12412
12510
  }
12413
12511
  }
12414
- function yC(g, A, I, B, C = 3) {
12512
+ function nC(g, A, I, B, C = 3) {
12415
12513
  switch (g.type) {
12416
12514
  case "pointerdown": {
12417
12515
  const Q = g.event;
@@ -12420,7 +12518,7 @@ function yC(g, A, I, B, C = 3) {
12420
12518
  case "pointerup": {
12421
12519
  if (!A) return A;
12422
12520
  const Q = g.event, E = V(Q.clientX, Q.clientY);
12423
- if (QQ(A, E) < C) {
12521
+ if (EQ(A, E) < C) {
12424
12522
  if (!B) return null;
12425
12523
  const o = g.worldRay;
12426
12524
  return o && I(o).then((a) => {
@@ -12437,7 +12535,7 @@ function yC(g, A, I, B, C = 3) {
12437
12535
  return A;
12438
12536
  }
12439
12537
  }
12440
- class pg {
12538
+ class Tg {
12441
12539
  bins_ = /* @__PURE__ */ new Map();
12442
12540
  acquire(A) {
12443
12541
  const B = this.bins_.get(A)?.pop();
@@ -12452,7 +12550,7 @@ class pg {
12452
12550
  this.bins_.clear();
12453
12551
  }
12454
12552
  }
12455
- class eC extends KI {
12553
+ class GC extends KI {
12456
12554
  type = "ImageLayer";
12457
12555
  source_;
12458
12556
  sliceCoords_;
@@ -12462,7 +12560,7 @@ class eC extends KI {
12462
12560
  onPickValue_;
12463
12561
  visibleChunks_ = /* @__PURE__ */ new Map();
12464
12562
  orderedChunks_ = [];
12465
- pool_ = new pg();
12563
+ pool_ = new Tg();
12466
12564
  initialChannelProps_;
12467
12565
  channelChangeCallbacks_ = [];
12468
12566
  policy_;
@@ -12489,14 +12587,14 @@ class eC extends KI {
12489
12587
  onPickValue: E,
12490
12588
  ...i
12491
12589
  }) {
12492
- super({ blendMode: "additive", ...i }), this.setState("initialized"), this.source_ = A, this.policy_ = B, this.sliceCoords_ = I, this.orientation_ = C ?? "XY", this.axes_ = MA(this.orientation_), this.planeRotation_ = dA(this.axes_), this.channelProps_ = Q, this.initialChannelProps_ = Q, this.onPickValue_ = E;
12590
+ super({ blendMode: "additive", ...i }), this.setState("initialized"), this.source_ = A, this.policy_ = B ?? mg(), this.sliceCoords_ = I, this.orientation_ = C ?? "XY", this.axes_ = MA(this.orientation_), this.planeRotation_ = dA(this.axes_), this.channelProps_ = Q, this.initialChannelProps_ = Q, this.onPickValue_ = E;
12493
12591
  }
12494
12592
  attach(A) {
12495
12593
  this.context_ = A, this.chunkStoreView_ = A.chunkManager.addView(
12496
12594
  this.source_,
12497
12595
  this.policy_,
12498
12596
  this.axes_
12499
- ), hC(
12597
+ ), yC(
12500
12598
  this.channelProps_,
12501
12599
  this.chunkStoreView_.channelCount
12502
12600
  );
@@ -12559,10 +12657,10 @@ class eC extends KI {
12559
12657
  return this.lastPresentationTimeCoord_;
12560
12658
  }
12561
12659
  isPresentationStale() {
12562
- return this.lastPresentationTimeStamp_ === void 0 ? !1 : performance.now() - this.lastPresentationTimeStamp_ > eC.STALE_PRESENTATION_MS_;
12660
+ return this.lastPresentationTimeStamp_ === void 0 ? !1 : performance.now() - this.lastPresentationTimeStamp_ > GC.STALE_PRESENTATION_MS_;
12563
12661
  }
12564
12662
  onEvent(A) {
12565
- this.pointerDownPos_ = yC(
12663
+ this.pointerDownPos_ = nC(
12566
12664
  A,
12567
12665
  this.pointerDownPos_,
12568
12666
  (I) => this.pickAtRay(I),
@@ -12572,7 +12670,7 @@ class eC extends KI {
12572
12670
  async pickAtRay(A) {
12573
12671
  const I = this.visibleChunks_.values().next();
12574
12672
  if (I.done) return null;
12575
- const B = I.value.transform, C = VB(
12673
+ const B = I.value.transform, C = vB(
12576
12674
  d(),
12577
12675
  p(0, 0, 1),
12578
12676
  B.rotation
@@ -12612,12 +12710,12 @@ class eC extends KI {
12612
12710
  return this.channelProps_ ? [this.channelProps_[A.chunkIndex.c] ?? {}] : [{}];
12613
12711
  }
12614
12712
  createImage(A, I) {
12615
- const B = new li(
12616
- A.shape[this.axes_.u],
12617
- A.shape[this.axes_.v],
12618
- I,
12619
- this.getChannelPropsForChunk(A)
12620
- );
12713
+ const B = new pi({
12714
+ width: A.shape[this.axes_.u],
12715
+ height: A.shape[this.axes_.v],
12716
+ texture: I,
12717
+ channelProps: this.getChannelPropsForChunk(A)
12718
+ });
12621
12719
  return this.updateImageChunk(B, A), B;
12622
12720
  }
12623
12721
  updateSlicePosition(A, I) {
@@ -12634,7 +12732,7 @@ class eC extends KI {
12634
12732
  updateImageChunk(A, I) {
12635
12733
  this.debugMode_ ? (A.wireframeEnabled = !0, A.wireframeColor = this.wireframeColors_[I.lod % this.wireframeColors_.length]) : A.wireframeEnabled = !1;
12636
12734
  const { u: B, v: C } = this.axes_;
12637
- A.transform.setScale([I.scale[B], I.scale[C], 1]), A.transform.setRotation(this.planeRotation_), this.updateSlicePosition(A, I), A.worldToTexCoord = XB(I, this.axes_);
12735
+ A.transform.setScale([I.scale[B], I.scale[C], 1]), A.transform.setRotation(this.planeRotation_), this.updateSlicePosition(A, I), A.worldToTexCoord = jB(I, this.axes_);
12638
12736
  }
12639
12737
  async getValueAtWorld(A) {
12640
12738
  const I = this.chunkStoreView_?.currentLOD ?? 0;
@@ -12702,7 +12800,7 @@ function kI(g, A) {
12702
12800
  `align${g.rowAlignmentBytes}`
12703
12801
  ].join(":");
12704
12802
  }
12705
- class pi extends mA {
12803
+ class ui extends mA {
12706
12804
  constructor(A, I, B, C, Q, E) {
12707
12805
  super();
12708
12806
  const i = [], o = [], a = Math.floor(C), D = Math.floor(Q), s = Math.floor(E);
@@ -12749,13 +12847,13 @@ class pi extends mA {
12749
12847
  }
12750
12848
  }
12751
12849
  }
12752
- class mi extends xA {
12850
+ class Ti extends xA {
12753
12851
  voxelScale = p(1, 1, 1);
12754
12852
  channels_;
12755
12853
  loadedChannels_ = /* @__PURE__ */ new Set();
12756
12854
  channelToTextureIndex_ = /* @__PURE__ */ new Map();
12757
- constructor() {
12758
- super(), this.geometry = new pi(1, 1, 1, 1, 1, 1), this.cullFaceMode = "front", this.depthTest = !1, this.channels_ = [];
12855
+ constructor({ channelProps: A = [] } = {}) {
12856
+ super(), this.geometry = new ui(1, 1, 1, 1, 1, 1), this.cullFaceMode = "front", this.depthTest = !1, this.channels_ = [], this.setChannelProps(A);
12759
12857
  }
12760
12858
  get type() {
12761
12859
  return "VolumeRenderable";
@@ -12768,7 +12866,7 @@ class mi extends xA {
12768
12866
  addChannelTexture(A, I) {
12769
12867
  const B = this.textures.length;
12770
12868
  this.setTexture(B, I), this.channelToTextureIndex_.set(A, B);
12771
- const C = ui(I.dataType);
12869
+ const C = xi(I.dataType);
12772
12870
  if (this.programName && this.programName !== C)
12773
12871
  throw new Error(
12774
12872
  `Volume renderable does not support multiple channels with different data types. Existing program: ${this.programName}, new channel data type: ${I.dataType} and program: ${C}`
@@ -12854,7 +12952,7 @@ class mi extends xA {
12854
12952
  this.channels_[A] = C;
12855
12953
  }
12856
12954
  }
12857
- function ui(g) {
12955
+ function xi(g) {
12858
12956
  switch (g) {
12859
12957
  case "byte":
12860
12958
  case "int":
@@ -12868,22 +12966,22 @@ function ui(g) {
12868
12966
  return "floatVolume";
12869
12967
  }
12870
12968
  }
12871
- function Ti(g, A) {
12969
+ function Wi(g, A) {
12872
12970
  const I = A.position, B = d(), C = d();
12873
12971
  return g.sort((Q, E) => {
12874
12972
  JA(B, Q.boundingBox.max, Q.boundingBox.min), vA(B, B, 0.5), JA(C, E.boundingBox.max, E.boundingBox.min), vA(C, C, 0.5);
12875
- const i = Og(I, B), o = Og(I, C);
12973
+ const i = Vg(I, B), o = Vg(I, C);
12876
12974
  return i - o;
12877
12975
  }), g;
12878
12976
  }
12879
- const xi = 2;
12880
- class Fo extends KI {
12977
+ const bi = 2;
12978
+ class Ro extends KI {
12881
12979
  type = "VolumeLayer";
12882
12980
  source_;
12883
12981
  sliceCoords_;
12884
12982
  currentVolumes_ = /* @__PURE__ */ new Map();
12885
12983
  volumeToPoolKey_ = /* @__PURE__ */ new Map();
12886
- pool_ = new pg();
12984
+ pool_ = new Tg();
12887
12985
  initialChannelProps_;
12888
12986
  channelChangeCallbacks_ = [];
12889
12987
  policy_;
@@ -12938,7 +13036,7 @@ class Fo extends KI {
12938
13036
  this.channelChangeCallbacks_.splice(I, 1);
12939
13037
  }
12940
13038
  constructor({ source: A, sliceCoords: I, policy: B, channelProps: C }) {
12941
- super({ blendMode: "premultiplied" }), this.source_ = A, this.sliceCoords_ = I, this.policy_ = B, this.initialChannelProps_ = C, this.channelProps_ = C, this.setState("initialized");
13039
+ super({ blendMode: "premultiplied" }), this.source_ = A, this.sliceCoords_ = I, this.policy_ = B ?? mg(), this.initialChannelProps_ = C, this.channelProps_ = C, this.setState("initialized");
12942
13040
  }
12943
13041
  getOrCreateVolume(A, I) {
12944
13042
  const B = this.currentVolumes_.get(A);
@@ -12946,7 +13044,7 @@ class Fo extends KI {
12946
13044
  for (const E of I) B.updateVolumeWithChunk(E);
12947
13045
  return B;
12948
13046
  }
12949
- const C = Zi(I[0]), Q = this.pool_.acquire(C) ?? new mi();
13047
+ const C = Oi(I[0]), Q = this.pool_.acquire(C) ?? new Ti();
12950
13048
  Q.setChannelProps(this.channelProps_ ?? []), this.volumeToPoolKey_.set(Q, C);
12951
13049
  for (const E of I) Q.updateVolumeWithChunk(E);
12952
13050
  return this.updateVolumeTransform(Q, I[0]), Q;
@@ -12955,7 +13053,7 @@ class Fo extends KI {
12955
13053
  this.chunkStoreView_ = A.chunkManager.addView(
12956
13054
  this.source_,
12957
13055
  this.policy_
12958
- ), hC(
13056
+ ), yC(
12959
13057
  this.channelProps_,
12960
13058
  this.chunkStoreView_.channelCount
12961
13059
  );
@@ -12968,7 +13066,7 @@ class Fo extends KI {
12968
13066
  updateChunks() {
12969
13067
  if (!this.chunkStoreView_) return;
12970
13068
  this.state !== "ready" && this.setState("ready");
12971
- const A = this.chunkStoreView_.getChunksToRender(), I = this.sliceCoords_.t ?? -1, B = bi(A);
13069
+ const A = this.chunkStoreView_.getChunksToRender(), I = this.sliceCoords_.t ?? -1, B = Pi(A);
12972
13070
  if (this.lastLoadedTime_ !== I || B.size !== this.currentVolumes_.size || this.lastNumRenderedChannelChunks_ !== A.length) {
12973
13071
  for (const [Q, E] of this.currentVolumes_)
12974
13072
  B.has(Q) || (this.releaseAndRemoveVolume(E), this.currentVolumes_.delete(Q));
@@ -13007,11 +13105,11 @@ class Fo extends KI {
13007
13105
  A.camera.getViewProjection()
13008
13106
  );
13009
13107
  const I = A.cameraControls?.isMoving ?? !1;
13010
- this.interactiveStepSizeScale_ = I ? xi : 1, this.updateChunks(), this.rebuildObjects(A.camera);
13108
+ this.interactiveStepSizeScale_ = I ? bi : 1, this.updateChunks(), this.rebuildObjects(A.camera);
13011
13109
  }
13012
13110
  rebuildObjects(A) {
13013
13111
  const I = Array.from(this.currentVolumes_.values());
13014
- Ti(I, A), this.clearObjects();
13112
+ Wi(I, A), this.clearObjects();
13015
13113
  for (const B of I)
13016
13114
  this.addObject(B);
13017
13115
  }
@@ -13024,27 +13122,27 @@ class Fo extends KI {
13024
13122
  };
13025
13123
  }
13026
13124
  }
13027
- function Wi(g) {
13125
+ function Zi(g) {
13028
13126
  const { x: A, y: I, z: B, t: C } = g.chunkIndex;
13029
13127
  return `${A}:${I}:${B}:${C}`;
13030
13128
  }
13031
- function bi(g) {
13129
+ function Pi(g) {
13032
13130
  const A = /* @__PURE__ */ new Map();
13033
13131
  for (const I of g) {
13034
- const B = Wi(I);
13132
+ const B = Zi(I);
13035
13133
  let C = A.get(B);
13036
13134
  C || (C = [], A.set(B, C)), C.push(I);
13037
13135
  }
13038
13136
  return A;
13039
13137
  }
13040
- function Zi(g) {
13138
+ function Oi(g) {
13041
13139
  return [
13042
13140
  `lod${g.lod}`,
13043
13141
  `shape${g.shape.x}x${g.shape.y}x${g.shape.z}`,
13044
13142
  `align${g.rowAlignmentBytes}`
13045
13143
  ].join(":");
13046
13144
  }
13047
- class lB extends Fg {
13145
+ class fB extends Fg {
13048
13146
  width_;
13049
13147
  height_;
13050
13148
  constructor(A, I, B) {
@@ -13060,7 +13158,7 @@ class lB extends Fg {
13060
13158
  return this.height_;
13061
13159
  }
13062
13160
  }
13063
- const Pi = [
13161
+ const Vi = [
13064
13162
  [1, 0.5, 0.5],
13065
13163
  [0.5, 1, 0.5],
13066
13164
  [0.5, 0.5, 1],
@@ -13068,7 +13166,7 @@ const Pi = [
13068
13166
  [1, 0.5, 1],
13069
13167
  [1, 1, 0.5]
13070
13168
  ];
13071
- function Oi(g) {
13169
+ function vi(g) {
13072
13170
  return g = g ?? /* @__PURE__ */ new Map(), new Map(
13073
13171
  Array.from(g.entries()).map(([A, I]) => [
13074
13172
  A,
@@ -13076,47 +13174,47 @@ function Oi(g) {
13076
13174
  ])
13077
13175
  );
13078
13176
  }
13079
- function Vi(g) {
13080
- return g = g ?? Pi, g.map(x.from);
13177
+ function Xi(g) {
13178
+ return g = g ?? Vi, g.map(x.from);
13081
13179
  }
13082
- class fB {
13180
+ class pB {
13083
13181
  lookupTable;
13084
13182
  cycle;
13085
13183
  constructor(A = {}) {
13086
- this.lookupTable = Oi(A.lookupTable), this.cycle = Vi(A.cycle);
13184
+ this.lookupTable = vi(A.lookupTable), this.cycle = Xi(A.cycle);
13087
13185
  }
13088
13186
  }
13089
- const nC = /* @__PURE__ */ new Set(["byte", "short", "int"]), vi = /* @__PURE__ */ new Set([
13187
+ const wC = /* @__PURE__ */ new Set(["byte", "short", "int"]), ji = /* @__PURE__ */ new Set([
13090
13188
  "unsigned_byte",
13091
13189
  "unsigned_short",
13092
13190
  "unsigned_int"
13093
13191
  ]);
13094
- function Xi(g) {
13192
+ function zi(g) {
13095
13193
  if (g.dataFormat !== "scalar")
13096
13194
  throw new Error(
13097
13195
  `Image data format must be scalar, instead found: ${g.dataFormat}`
13098
13196
  );
13099
- if (!nC.has(g.dataType) && !vi.has(g.dataType))
13197
+ if (!wC.has(g.dataType) && !ji.has(g.dataType))
13100
13198
  throw new Error(
13101
13199
  `Image data type must be an integer, instead found: ${g.dataType}`
13102
13200
  );
13103
13201
  return g;
13104
13202
  }
13105
- function ji(g) {
13106
- return nC.has(g.dataType) ? "intLabelImage" : "labelImage";
13203
+ function _i(g) {
13204
+ return wC.has(g.dataType) ? "intLabelImage" : "labelImage";
13107
13205
  }
13108
- class zi extends xA {
13206
+ class $i extends xA {
13109
13207
  outlineSelected_;
13110
13208
  selectedValue_;
13111
13209
  worldToTexCoord = $();
13112
13210
  constructor(A) {
13113
- super(), this.geometry = new tC(A.width, A.height, 1, 1), this.setTexture(0, Xi(A.imageData));
13211
+ super(), this.geometry = new eC(A.width, A.height, 1, 1), this.setTexture(0, zi(A.imageData));
13114
13212
  const I = this.makeColorCycleTexture(A.colorMap.cycle);
13115
13213
  this.setTexture(1, I);
13116
13214
  const B = this.makeColorLookupTableTexture(
13117
13215
  A.colorMap.lookupTable
13118
13216
  );
13119
- this.setTexture(2, B), this.outlineSelected_ = A.outlineSelected ?? !1, this.selectedValue_ = A.selectedValue ?? null, this.programName = ji(A.imageData);
13217
+ this.setTexture(2, B), this.outlineSelected_ = A.outlineSelected ?? !1, this.selectedValue_ = A.selectedValue ?? null, this.programName = _i(A.imageData);
13120
13218
  }
13121
13219
  get type() {
13122
13220
  return "LabelImageRenderable";
@@ -13140,16 +13238,16 @@ class zi extends xA {
13140
13238
  makeColorCycleTexture(A) {
13141
13239
  const I = new Uint8Array(
13142
13240
  A.flatMap((C) => C.rgba).map((C) => Math.round(C * 255))
13143
- ), B = new lB(I, A.length, 1);
13241
+ ), B = new fB(I, A.length, 1);
13144
13242
  return B.dataFormat = "rgba", B;
13145
13243
  }
13146
13244
  makeColorLookupTableTexture(A) {
13147
13245
  A === void 0 ? A = /* @__PURE__ */ new Map([[0, x.TRANSPARENT]]) : A.has(0) || (A = new Map([[0, x.TRANSPARENT], ...A]));
13148
13246
  const I = Array.from(A.keys()), B = Array.from(A.values()).map((E) => E.packed), C = A.size, Q = new Uint32Array(C * 2);
13149
- return Q.set(I, 0), Q.set(B, C), new lB(Q, C, 2);
13247
+ return Q.set(I, 0), Q.set(B, C), new fB(Q, C, 2);
13150
13248
  }
13151
13249
  }
13152
- class GC extends KI {
13250
+ class FC extends KI {
13153
13251
  type = "LabelLayer";
13154
13252
  source_;
13155
13253
  sliceCoords_;
@@ -13159,7 +13257,7 @@ class GC extends KI {
13159
13257
  onPickValue_;
13160
13258
  outlineSelected_;
13161
13259
  visibleChunks_ = /* @__PURE__ */ new Map();
13162
- pool_ = new pg();
13260
+ pool_ = new Tg();
13163
13261
  colorMap_;
13164
13262
  selectedValue_ = null;
13165
13263
  policy_;
@@ -13179,7 +13277,7 @@ class GC extends KI {
13179
13277
  outlineSelected: i = !1,
13180
13278
  ...o
13181
13279
  }) {
13182
- super(o), this.setState("initialized"), this.source_ = A, this.policy_ = B, this.sliceCoords_ = I, this.orientation_ = C ?? "XY", this.axes_ = MA(this.orientation_), this.planeRotation_ = dA(this.axes_), this.colorMap_ = new fB(Q), this.onPickValue_ = E, this.outlineSelected_ = i;
13280
+ super(o), this.setState("initialized"), this.source_ = A, this.policy_ = B ?? mg(), this.sliceCoords_ = I, this.orientation_ = C ?? "XY", this.axes_ = MA(this.orientation_), this.planeRotation_ = dA(this.axes_), this.colorMap_ = new pB(Q), this.onPickValue_ = E, this.outlineSelected_ = i;
13183
13281
  }
13184
13282
  attach(A) {
13185
13283
  if (this.context_ = A, this.chunkStoreView_ = A.chunkManager.addView(
@@ -13237,10 +13335,10 @@ class GC extends KI {
13237
13335
  }
13238
13336
  }
13239
13337
  isPresentationStale() {
13240
- return this.lastPresentationTimeStamp_ === void 0 ? !1 : performance.now() - this.lastPresentationTimeStamp_ > GC.STALE_PRESENTATION_MS_;
13338
+ return this.lastPresentationTimeStamp_ === void 0 ? !1 : performance.now() - this.lastPresentationTimeStamp_ > FC.STALE_PRESENTATION_MS_;
13241
13339
  }
13242
13340
  onEvent(A) {
13243
- this.pointerDownPos_ = yC(
13341
+ this.pointerDownPos_ = nC(
13244
13342
  A,
13245
13343
  this.pointerDownPos_,
13246
13344
  (I) => this.pickAtRay(I),
@@ -13252,7 +13350,7 @@ class GC extends KI {
13252
13350
  async pickAtRay(A) {
13253
13351
  const I = this.visibleChunks_.values().next();
13254
13352
  if (I.done) return null;
13255
- const B = I.value.transform, C = VB(
13353
+ const B = I.value.transform, C = vB(
13256
13354
  d(),
13257
13355
  p(0, 0, 1),
13258
13356
  B.rotation
@@ -13265,7 +13363,7 @@ class GC extends KI {
13265
13363
  return this.colorMap_;
13266
13364
  }
13267
13365
  setColorMap(A) {
13268
- this.colorMap_ = new fB(A), this.visibleChunks_.forEach((I) => {
13366
+ this.colorMap_ = new pB(A), this.visibleChunks_.forEach((I) => {
13269
13367
  I.setColorMap(this.colorMap_);
13270
13368
  });
13271
13369
  }
@@ -13326,7 +13424,7 @@ class GC extends KI {
13326
13424
  return C ? (C.setTexture(0, I), C.setColorMap(this.colorMap_), C.setSelectedValue(this.selectedValue_), this.updateLabelChunk(C, A), C) : this.createLabel(A, I);
13327
13425
  }
13328
13426
  createLabel(A, I) {
13329
- const B = new zi({
13427
+ const B = new $i({
13330
13428
  width: A.shape[this.axes_.u],
13331
13429
  height: A.shape[this.axes_.v],
13332
13430
  imageData: I,
@@ -13349,7 +13447,7 @@ class GC extends KI {
13349
13447
  }
13350
13448
  updateLabelChunk(A, I) {
13351
13449
  const { u: B, v: C } = this.axes_;
13352
- A.transform.setScale([I.scale[B], I.scale[C], 1]), A.transform.setRotation(this.planeRotation_), this.updateSlicePosition(A, I), A.worldToTexCoord = XB(I, this.axes_);
13450
+ A.transform.setScale([I.scale[B], I.scale[C], 1]), A.transform.setRotation(this.planeRotation_), this.updateSlicePosition(A, I), A.worldToTexCoord = jB(I, this.axes_);
13353
13451
  }
13354
13452
  releaseAndRemoveChunks(A) {
13355
13453
  for (const I of A) {
@@ -13358,7 +13456,7 @@ class GC extends KI {
13358
13456
  }
13359
13457
  }
13360
13458
  }
13361
- class _i extends Fg {
13459
+ class Ao extends Fg {
13362
13460
  width_;
13363
13461
  height_;
13364
13462
  depth_;
@@ -13378,12 +13476,12 @@ class _i extends Fg {
13378
13476
  return this.depth_;
13379
13477
  }
13380
13478
  }
13381
- const wC = {
13479
+ const rC = {
13382
13480
  circle: 0,
13383
13481
  square: 1,
13384
13482
  triangle: 2
13385
13483
  };
13386
- class ro extends xA {
13484
+ class No extends xA {
13387
13485
  constructor(A) {
13388
13486
  super(), this.programName = "points";
13389
13487
  const I = A.flatMap((C) => {
@@ -13397,7 +13495,7 @@ class ro extends xA {
13397
13495
  Q.b,
13398
13496
  Q.a,
13399
13497
  C.size,
13400
- wC[C.marker]
13498
+ rC[C.marker]
13401
13499
  ];
13402
13500
  }), B = new mA(I, [], "points");
13403
13501
  B.addAttribute({
@@ -13416,17 +13514,17 @@ class ro extends xA {
13416
13514
  type: "marker",
13417
13515
  itemSize: 1,
13418
13516
  offset: B.strideBytes
13419
- }), this.geometry = B, this.setTexture(0, $i());
13517
+ }), this.geometry = B, this.setTexture(0, Io());
13420
13518
  }
13421
13519
  get type() {
13422
13520
  return "PointsRenderable";
13423
13521
  }
13424
13522
  }
13425
13523
  let PI;
13426
- function $i() {
13427
- return PI || (PI = Ao()), PI;
13524
+ function Io() {
13525
+ return PI || (PI = go()), PI;
13428
13526
  }
13429
- function Ao() {
13527
+ function go() {
13430
13528
  const g = (a) => {
13431
13529
  const D = new Float32Array(a * a);
13432
13530
  return D.fill(1), D;
@@ -13448,11 +13546,11 @@ function Ao() {
13448
13546
  triangle: I(256)
13449
13547
  }, E = Object.keys(Q).length, i = new Float32Array(E * 65536);
13450
13548
  for (const [a, D] of Object.entries(Q))
13451
- i.set(D, wC[a] * 65536);
13452
- const o = new _i(i, 256, 256);
13549
+ i.set(D, rC[a] * 65536);
13550
+ const o = new Ao(i, 256, 256);
13453
13551
  return o.wrapR = "clamp_to_edge", o.wrapS = "clamp_to_edge", o.wrapT = "clamp_to_edge", o;
13454
13552
  }
13455
- class pB {
13553
+ class mB {
13456
13554
  radius;
13457
13555
  phi;
13458
13556
  theta;
@@ -13468,22 +13566,22 @@ class pB {
13468
13566
  );
13469
13567
  }
13470
13568
  }
13471
- const OI = -1, mB = 0, Io = 1, uB = 9e-3, go = 1e-3, Bo = 9e-4, Co = 0.5, Qo = 60;
13472
- class So {
13569
+ const OI = -1, uB = 0, Bo = 1, TB = 9e-3, Co = 1e-3, Qo = 9e-4, Eo = 0.5, io = 60;
13570
+ class co {
13473
13571
  camera_;
13474
- orbitVelocity_ = new pB(0, 0, 0);
13572
+ orbitVelocity_ = new mB(0, 0, 0);
13475
13573
  panVelocity_ = d();
13476
13574
  currPos_;
13477
13575
  currCenter_ = d();
13478
13576
  dampingFactor_;
13479
13577
  currMouseButton_ = OI;
13480
13578
  constructor(A, I) {
13481
- this.camera_ = A, this.currPos_ = new pB(
13579
+ this.camera_ = A, this.currPos_ = new mB(
13482
13580
  I?.radius ?? 1,
13483
13581
  I?.yaw ?? 0,
13484
13582
  I?.pitch ?? 0
13485
13583
  ), I?.target && XI(this.currCenter_, I.target), this.dampingFactor_ = hA(
13486
- I?.dampingFactor ?? Co,
13584
+ I?.dampingFactor ?? Eo,
13487
13585
  0,
13488
13586
  1
13489
13587
  ), this.updateCamera();
@@ -13514,7 +13612,7 @@ class So {
13514
13612
  this.currPos_.phi += this.orbitVelocity_.phi, this.currPos_.theta += this.orbitVelocity_.theta, this.currPos_.radius += this.orbitVelocity_.radius * this.currPos_.radius, JA(this.currCenter_, this.currCenter_, this.panVelocity_);
13515
13613
  const I = Math.PI / 2 - T;
13516
13614
  this.currPos_.theta = hA(this.currPos_.theta, -I, I), this.currPos_.radius = Math.max(0.01, this.currPos_.radius), this.updateCamera();
13517
- const B = Math.pow(1 - this.dampingFactor_, A * Qo);
13615
+ const B = Math.pow(1 - this.dampingFactor_, A * io);
13518
13616
  this.orbitVelocity_.phi *= B, this.orbitVelocity_.theta *= B, this.orbitVelocity_.radius *= B, vA(this.panVelocity_, this.panVelocity_, B), this.cutoffLowVelocity();
13519
13617
  }
13520
13618
  onPointerDown(A) {
@@ -13523,7 +13621,7 @@ class So {
13523
13621
  }
13524
13622
  onPointerMove(A) {
13525
13623
  if (this.currMouseButton_ == OI) return;
13526
- const I = A.event, B = I.movementX ?? 0, C = I.movementY ?? 0, Q = this.currMouseButton_ === mB && !I.shiftKey, E = this.currMouseButton_ === mB && I.shiftKey || this.currMouseButton_ === Io;
13624
+ const I = A.event, B = I.movementX ?? 0, C = I.movementY ?? 0, Q = this.currMouseButton_ === uB && !I.shiftKey, E = this.currMouseButton_ === uB && I.shiftKey || this.currMouseButton_ === Bo;
13527
13625
  Q && this.orbit(B, C), E && this.pan(B, C);
13528
13626
  }
13529
13627
  onWheel(A) {
@@ -13538,24 +13636,24 @@ class So {
13538
13636
  I.target?.releasePointerCapture?.(I.pointerId);
13539
13637
  }
13540
13638
  orbit(A, I) {
13541
- this.orbitVelocity_.phi -= A * uB, this.orbitVelocity_.theta += I * uB;
13639
+ this.orbitVelocity_.phi -= A * TB, this.orbitVelocity_.theta += I * TB;
13542
13640
  }
13543
13641
  pan(A, I) {
13544
- const B = this.currPos_.radius * go, C = d();
13642
+ const B = this.currPos_.radius * Co, C = d();
13545
13643
  jI(C, C, this.camera_.right, A), jI(C, C, this.camera_.up, I), vA(C, C, B), zI(this.panVelocity_, this.panVelocity_, C);
13546
13644
  }
13547
13645
  zoom(A) {
13548
- this.orbitVelocity_.radius += A * Bo;
13646
+ this.orbitVelocity_.radius += A * Qo;
13549
13647
  }
13550
13648
  updateCamera() {
13551
13649
  const A = JA(d(), this.currCenter_, this.currPos_.toVec3());
13552
13650
  this.camera_.transform.setTranslation(A), this.camera_.transform.targetTo(this.currCenter_);
13553
13651
  }
13554
13652
  cutoffLowVelocity() {
13555
- Math.abs(this.orbitVelocity_.phi) < T && (this.orbitVelocity_.phi = 0), Math.abs(this.orbitVelocity_.theta) < T && (this.orbitVelocity_.theta = 0), Math.abs(this.orbitVelocity_.radius) < T && (this.orbitVelocity_.radius = 0), tg(this.panVelocity_) < T && XC(this.panVelocity_);
13653
+ Math.abs(this.orbitVelocity_.phi) < T && (this.orbitVelocity_.phi = 0), Math.abs(this.orbitVelocity_.theta) < T && (this.orbitVelocity_.theta = 0), Math.abs(this.orbitVelocity_.radius) < T && (this.orbitVelocity_.radius = 0), tg(this.panVelocity_) < T && jC(this.panVelocity_);
13556
13654
  }
13557
13655
  }
13558
- class Eo {
13656
+ class oo {
13559
13657
  planes_;
13560
13658
  constructor(A) {
13561
13659
  this.planes_ = [
@@ -13601,7 +13699,7 @@ class Eo {
13601
13699
  return !0;
13602
13700
  }
13603
13701
  }
13604
- class FC extends xA {
13702
+ class SC extends xA {
13605
13703
  projectionMatrix_ = $();
13606
13704
  near_ = 0;
13607
13705
  far_ = 0;
@@ -13626,7 +13724,7 @@ class FC extends xA {
13626
13724
  return vI($(), this.projectionMatrix, this.viewMatrix);
13627
13725
  }
13628
13726
  get frustum() {
13629
- return new Eo(this.getViewProjection());
13727
+ return new oo(this.getViewProjection());
13630
13728
  }
13631
13729
  pan(A) {
13632
13730
  this.transform.addTranslation(A);
@@ -13643,7 +13741,7 @@ class FC extends xA {
13643
13741
  I,
13644
13742
  B
13645
13743
  );
13646
- $C(C, C, 1 / C[3]);
13744
+ AQ(C, C, 1 / C[3]);
13647
13745
  const Q = XA(
13648
13746
  YA(),
13649
13747
  C,
@@ -13652,28 +13750,25 @@ class FC extends xA {
13652
13750
  return p(Q[0], Q[1], Q[2]);
13653
13751
  }
13654
13752
  }
13655
- const rC = 1.77, TB = 128, xB = 128 / rC, io = -1e6, oo = 1e6;
13656
- class Ro extends FC {
13753
+ const RC = 1.77, xB = 128, WB = 128 / RC, ao = -1e6, Do = 1e6;
13754
+ class Uo extends SC {
13657
13755
  // width_ and height_ should always be defined by constructor (see setFrame)
13658
- width_ = TB;
13659
- height_ = xB;
13660
- viewportAspectRatio_ = rC;
13661
- viewportSize_ = [TB, xB];
13756
+ width_ = xB;
13757
+ height_ = WB;
13758
+ viewportAspectRatio_ = RC;
13759
+ viewportSize_ = [xB, WB];
13662
13760
  axes_;
13663
13761
  rotation_;
13664
13762
  orientation_;
13665
13763
  /**
13666
13764
  * Creates an orthographic camera framing the given world-space rectangle.
13667
13765
  *
13668
- * @param left - Left edge of the view frame, in world units.
13669
- * @param right - Right edge of the view frame, in world units.
13670
- * @param top - Top edge of the view frame, in world units.
13671
- * @param bottom - Bottom edge of the view frame, in world units.
13672
- * @param options - Near/far clipping plane distances (default `-1e6` and
13673
- * `1e6`) and the slice orientation the camera faces (default `"XY"`).
13766
+ * @param props - The view frame edges in world units, near/far clipping
13767
+ * plane distances (default `-1e6` and `1e6`), and the slice orientation
13768
+ * the camera faces (default `"XY"`).
13674
13769
  */
13675
- constructor(A, I, B, C, Q = {}) {
13676
- super(), this.near_ = Q.near ?? io, this.far_ = Q.far ?? oo, this.orientation_ = Q.orientation ?? "XY", this.axes_ = MA(this.orientation_), this.rotation_ = dA(this.axes_), this.setFrame(A, I, C, B), this.updateProjectionMatrix();
13770
+ constructor(A) {
13771
+ super(), this.near_ = A.near ?? ao, this.far_ = A.far ?? Do, this.orientation_ = A.orientation ?? "XY", this.axes_ = MA(this.orientation_), this.rotation_ = dA(this.axes_), this.setFrame(A), this.updateProjectionMatrix();
13677
13772
  }
13678
13773
  get viewportSize() {
13679
13774
  return this.viewportSize_;
@@ -13681,10 +13776,10 @@ class Ro extends FC {
13681
13776
  setAspectRatio(A) {
13682
13777
  this.viewportAspectRatio_ = A, this.updateProjectionMatrix();
13683
13778
  }
13684
- setFrame(A, I, B, C) {
13685
- this.width_ = Math.abs(I - A), this.height_ = Math.abs(C - B), this.updateProjectionMatrix();
13779
+ setFrame({ left: A, right: I, top: B, bottom: C }) {
13780
+ this.width_ = Math.abs(I - A), this.height_ = Math.abs(B - C), this.updateProjectionMatrix();
13686
13781
  const Q = d();
13687
- Q[W[this.axes_.u]] = 0.5 * (A + I), Q[W[this.axes_.v]] = 0.5 * (B + C), this.transform.setTranslation(Q), this.transform.setScale([1, 1, 1]), this.transform.setRotation(this.rotation_);
13782
+ Q[W[this.axes_.u]] = 0.5 * (A + I), Q[W[this.axes_.v]] = 0.5 * (C + B), this.transform.setTranslation(Q), this.transform.setScale([1, 1, 1]), this.transform.setRotation(this.rotation_);
13688
13783
  }
13689
13784
  get type() {
13690
13785
  return "OrthographicCamera";
@@ -13724,7 +13819,7 @@ class Ro extends FC {
13724
13819
  updateProjectionMatrix() {
13725
13820
  const A = this.width_, I = this.height_, B = A / I;
13726
13821
  let C = 0.5 * A, Q = 0.5 * I;
13727
- this.viewportAspectRatio_ > B ? C *= this.viewportAspectRatio_ / B : Q *= B / this.viewportAspectRatio_, this.viewportSize_ = [2 * C, 2 * Q], PC(
13822
+ this.viewportAspectRatio_ > B ? C *= this.viewportAspectRatio_ / B : Q *= B / this.viewportAspectRatio_, this.viewportSize_ = [2 * C, 2 * Q], OC(
13728
13823
  this.projectionMatrix_,
13729
13824
  -C,
13730
13825
  C,
@@ -13735,8 +13830,8 @@ class Ro extends FC {
13735
13830
  );
13736
13831
  }
13737
13832
  }
13738
- const WB = 0;
13739
- class No {
13833
+ const bB = 0;
13834
+ class ko {
13740
13835
  camera_;
13741
13836
  dragActive_ = !1;
13742
13837
  dragStart_ = d();
@@ -13776,7 +13871,7 @@ class No {
13776
13871
  }
13777
13872
  onPointerDown(A) {
13778
13873
  const I = A.event;
13779
- !A.worldPos || I.button !== WB || (this.dragStart_ = DA(A.worldPos), this.dragActive_ = !0, I.target?.setPointerCapture?.(I.pointerId));
13874
+ !A.worldPos || I.button !== bB || (this.dragStart_ = DA(A.worldPos), this.dragActive_ = !0, I.target?.setPointerCapture?.(I.pointerId));
13780
13875
  }
13781
13876
  onPointerMove(A) {
13782
13877
  if (!this.dragActive_ || !A.worldPos) return;
@@ -13785,17 +13880,17 @@ class No {
13785
13880
  }
13786
13881
  onPointerEnd(A) {
13787
13882
  const I = A.event;
13788
- !this.dragActive_ || I.button !== WB || (this.dragActive_ = !1, I.target?.releasePointerCapture?.(I.pointerId));
13883
+ !this.dragActive_ || I.button !== bB || (this.dragActive_ = !1, I.target?.releasePointerCapture?.(I.pointerId));
13789
13884
  }
13790
13885
  }
13791
- const ao = 60, Do = 1.77, oI = 0.1, VI = 180 - oI;
13792
- class co extends FC {
13886
+ const so = 60, ho = 1.77, oI = 0.1, VI = 180 - oI;
13887
+ class Lo extends SC {
13793
13888
  fov_;
13794
13889
  aspectRatio_;
13795
13890
  constructor(A = {}) {
13796
13891
  const {
13797
- fov: I = ao,
13798
- aspectRatio: B = Do,
13892
+ fov: I = so,
13893
+ aspectRatio: B = ho,
13799
13894
  near: C = 0.1,
13800
13895
  far: Q = 1e4,
13801
13896
  position: E = p(0, 0, 0)
@@ -13821,134 +13916,41 @@ class co extends FC {
13821
13916
  this.fov_ = Math.max(oI, Math.min(VI, this.fov_ / A)), this.updateProjectionMatrix();
13822
13917
  }
13823
13918
  updateProjectionMatrix() {
13824
- bC(
13919
+ ZC(
13825
13920
  this.projectionMatrix_,
13826
- pC(this.fov),
13921
+ mC(this.fov),
13827
13922
  this.aspectRatio_,
13828
13923
  this.near_,
13829
13924
  this.far_
13830
13925
  );
13831
13926
  }
13832
13927
  }
13833
- const SC = [
13834
- "fallbackVisible",
13835
- "prefetchTime",
13836
- "visibleCurrent",
13837
- "fallbackBackground",
13838
- "prefetchSpace"
13839
- ];
13840
- function mg(g) {
13841
- so(g);
13842
- const A = {
13843
- x: g.prefetch.x,
13844
- y: g.prefetch.y,
13845
- z: g.prefetch.z ?? 0,
13846
- t: g.prefetch.t ?? 0
13847
- }, I = Object.freeze(
13848
- SC.reduce(
13849
- (Q, E) => {
13850
- const i = g.priorityOrder.indexOf(E);
13851
- return Q[E] = i, Q;
13852
- },
13853
- {}
13854
- )
13855
- ), B = {
13856
- min: g.lod?.min ?? 0,
13857
- max: g.lod?.max ?? Number.MAX_SAFE_INTEGER,
13858
- bias: g.lod?.bias ?? 0.5
13859
- }, C = {
13860
- profile: g.profile ?? "custom",
13861
- prefetch: A,
13862
- priorityOrder: Object.freeze([...g.priorityOrder]),
13863
- priorityMap: I,
13864
- lod: B
13865
- };
13866
- return Object.freeze(C);
13867
- }
13868
- function Uo(g = {}) {
13869
- return mg(ug({
13870
- profile: "exploration",
13871
- prefetch: { x: 1, y: 1, z: 1, t: 0 },
13872
- priorityOrder: [
13873
- "fallbackVisible",
13874
- "visibleCurrent",
13875
- "prefetchSpace",
13876
- "prefetchTime",
13877
- "fallbackBackground"
13878
- ]
13879
- }, g));
13880
- }
13881
- function ko(g = {}) {
13882
- return mg(ug({
13883
- profile: "playback",
13884
- prefetch: { x: 0, y: 0, z: 0, t: 20 },
13885
- priorityOrder: [
13886
- "fallbackVisible",
13887
- "prefetchTime",
13888
- "visibleCurrent",
13889
- "fallbackBackground",
13890
- "prefetchSpace"
13891
- ]
13892
- }, g));
13893
- }
13894
- function Lo(g = {}) {
13895
- return mg(ug({
13896
- profile: "no-prefetch",
13897
- prefetch: { x: 0, y: 0, z: 0, t: 0 },
13898
- priorityOrder: [
13899
- "fallbackVisible",
13900
- "visibleCurrent",
13901
- "fallbackBackground",
13902
- "prefetchSpace",
13903
- "prefetchTime"
13904
- ]
13905
- }, g));
13906
- }
13907
- function so(g) {
13908
- for (const [B, C] of Object.entries(g.prefetch))
13909
- if (C !== void 0 && C < 0)
13910
- throw new Error(`prefetch.${B} must be a non-negative number`);
13911
- const A = g.lod;
13912
- if (A?.min !== void 0 && A?.max !== void 0 && A.min > A.max)
13913
- throw new Error("lod.min must be <= lod.max");
13914
- const I = g.priorityOrder;
13915
- if (I.length !== SC.length || new Set(I).size !== I.length)
13916
- throw new Error("priorityOrder must include all categories exactly once");
13917
- }
13918
- function ug(g, A = {}) {
13919
- return {
13920
- profile: A.profile ?? g.profile,
13921
- prefetch: { ...g.prefetch, ...A.prefetch ?? {} },
13922
- lod: { ...g.lod, ...A.lod ?? {} },
13923
- priorityOrder: A.priorityOrder ?? g.priorityOrder
13924
- };
13925
- }
13926
13928
  export {
13927
- wo as AxesLayer,
13929
+ Fo as AxesLayer,
13928
13930
  x as Color,
13929
- ho as Idetik,
13930
- eC as ImageLayer,
13931
- li as ImageRenderable,
13932
- fB as LabelColorMap,
13933
- zi as LabelImageRenderable,
13934
- GC as LabelLayer,
13931
+ to as Idetik,
13932
+ GC as ImageLayer,
13933
+ pi as ImageRenderable,
13934
+ pB as LabelColorMap,
13935
+ $i as LabelImageRenderable,
13936
+ FC as LabelLayer,
13935
13937
  KI as Layer,
13936
13938
  OA as OmeZarrImageSource,
13937
- So as OrbitControls,
13938
- Ro as OrthographicCamera,
13939
- No as PanZoomControls,
13940
- co as PerspectiveCamera,
13941
- ro as PointsRenderable,
13942
- Hi as ProjectedLineRenderable,
13943
- Fo as VolumeLayer,
13944
- mi as VolumeRenderable,
13945
- Uo as createExplorationPolicy,
13946
- mg as createImageSourcePolicy,
13947
- Lo as createNoPrefetchPolicy,
13948
- ko as createPlaybackPolicy,
13949
- yo as loadOmeZarrPlate,
13950
- eo as loadOmeZarrWell,
13951
- no as loadOmeroChannels,
13952
- Go as loadOmeroDefaults
13939
+ co as OrbitControls,
13940
+ Uo as OrthographicCamera,
13941
+ ko as PanZoomControls,
13942
+ Lo as PerspectiveCamera,
13943
+ No as PointsRenderable,
13944
+ qi as ProjectedLineRenderable,
13945
+ Ro as VolumeLayer,
13946
+ Ti as VolumeRenderable,
13947
+ mg as createExplorationPolicy,
13948
+ pg as createImageSourcePolicy,
13949
+ So as createNoPrefetchPolicy,
13950
+ ro as createPlaybackPolicy,
13951
+ eo as loadOmeZarrPlate,
13952
+ no as loadOmeZarrWell,
13953
+ Go as loadOmeroChannels,
13954
+ wo as loadOmeroDefaults
13953
13955
  };
13954
13956
  //# sourceMappingURL=index.js.map