@idetik/core 0.23.3 → 0.23.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1641,7 +1641,9 @@ class sC extends eQ {
1641
1641
  }
1642
1642
  render(A) {
1643
1643
  this.renderedObjects_ = 0, this.renderedObjectsPerFrame_ = 0;
1644
- const { opaque: I, transparent: g } = A.layerManager.partitionLayers();
1644
+ const I = [], g = [];
1645
+ for (const t of A.layers)
1646
+ (t.blendMode === "none" ? I : g).push(t);
1645
1647
  for (const t of [...I, ...g])
1646
1648
  t.update({ viewport: A });
1647
1649
  if (getComputedStyle(A.element).visibility === "hidden") return;
@@ -8275,7 +8277,9 @@ class Ro extends eQ {
8275
8277
  this.renderedObjects_ = 0, this.renderedObjectsPerFrame_ = 0, this.needsClear_ = !0;
8276
8278
  }
8277
8279
  render(A) {
8278
- const { opaque: I, transparent: g } = A.layerManager.partitionLayers();
8280
+ const I = [], g = [];
8281
+ for (const o of A.layers)
8282
+ (o.blendMode === "none" ? I : g).push(o);
8279
8283
  for (const o of [...I, ...g])
8280
8284
  o.update({ viewport: A });
8281
8285
  if (getComputedStyle(A.element).visibility === "hidden") return;
@@ -9167,56 +9171,6 @@ function Ko({ scale: C } = { scale: 1.5 }) {
9167
9171
  /* 0 = fps, 1 = ms, 2 = mb */
9168
9172
  ), document.body.appendChild(A.dom), A;
9169
9173
  }
9170
- class uo {
9171
- layers_ = [];
9172
- callbacks_ = [];
9173
- context_;
9174
- constructor(A) {
9175
- this.context_ = A;
9176
- }
9177
- partitionLayers() {
9178
- const A = [], I = [];
9179
- for (const g of this.layers)
9180
- g.blendMode === "none" ? A.push(g) : I.push(g);
9181
- return { opaque: A, transparent: I };
9182
- }
9183
- add(A) {
9184
- this.layers_ = [...this.layers_, A], A.onAttached(this.context_), this.notifyLayersChanged();
9185
- }
9186
- remove(A) {
9187
- const I = this.layers_.indexOf(A);
9188
- if (I === -1)
9189
- throw new Error(`Layer to remove not found: ${A}`);
9190
- this.removeByIndex(I);
9191
- }
9192
- removeByIndex(A) {
9193
- const I = this.layers_[A];
9194
- I && I.onDetached(this.context_), this.layers_ = this.layers_.filter((g, B) => B !== A), this.notifyLayersChanged();
9195
- }
9196
- removeAll() {
9197
- for (const A of this.layers_)
9198
- A.onDetached(this.context_);
9199
- this.layers_ = [], this.notifyLayersChanged();
9200
- }
9201
- get layers() {
9202
- return this.layers_;
9203
- }
9204
- notifyLayersChanged() {
9205
- for (const A of this.callbacks_)
9206
- A();
9207
- }
9208
- addLayersChangeCallback(A) {
9209
- return this.callbacks_.push(A), () => {
9210
- this.removeLayersChangeCallback(A);
9211
- };
9212
- }
9213
- removeLayersChangeCallback(A) {
9214
- const I = this.callbacks_.indexOf(A);
9215
- if (I === void 0)
9216
- throw new Error(`Callback to remove not found: ${A}`);
9217
- this.callbacks_.splice(I, 1);
9218
- }
9219
- }
9220
9174
  const gB = [
9221
9175
  "pointerdown",
9222
9176
  "pointermove",
@@ -9224,10 +9178,10 @@ const gB = [
9224
9178
  "pointercancel",
9225
9179
  "wheel"
9226
9180
  ];
9227
- function Ho(C) {
9181
+ function uo(C) {
9228
9182
  return gB.includes(C);
9229
9183
  }
9230
- class qo {
9184
+ class Ho {
9231
9185
  propagationStopped_ = !1;
9232
9186
  type;
9233
9187
  event;
@@ -9243,7 +9197,7 @@ class qo {
9243
9197
  this.propagationStopped_ = !0;
9244
9198
  }
9245
9199
  }
9246
- class po {
9200
+ class qo {
9247
9201
  listeners_ = [];
9248
9202
  element_;
9249
9203
  isConnected_ = !1;
@@ -9282,34 +9236,55 @@ class po {
9282
9236
  });
9283
9237
  }
9284
9238
  handleEvent = (A) => {
9285
- if (!Ho(A.type)) {
9239
+ if (!uo(A.type)) {
9286
9240
  H.error("EventDispatcher", `Unsupported event type ${A.type}`);
9287
9241
  return;
9288
9242
  }
9289
- const I = new qo(A.type, A);
9243
+ const I = new Ho(A.type, A);
9290
9244
  for (const g of this.listeners_)
9291
9245
  if (g(I), I.propagationStopped) break;
9292
9246
  };
9293
9247
  }
9294
- class mo {
9248
+ class po {
9295
9249
  id;
9296
9250
  element;
9297
9251
  camera;
9298
- layerManager;
9299
9252
  events;
9300
9253
  cameraControls;
9254
+ // Carried only to relay to `layer.onAttached` / `layer.onDetached`.
9255
+ // To be removed when the chunk-infrastructure refactor folds chunk management
9256
+ // into the source and the attach lifecycle goes away.
9257
+ context_;
9258
+ layers_ = [];
9301
9259
  constructor(A) {
9302
- this.id = A.id, this.element = A.element, this.camera = A.camera, this.layerManager = A.layerManager, this.cameraControls = A.cameraControls, this.updateAspectRatio(), this.events = new po(this.element), this.events.addEventListener((I) => {
9260
+ 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 qo(this.element), this.events.addEventListener((I) => {
9303
9261
  if (I.event instanceof PointerEvent || I.event instanceof WheelEvent) {
9304
9262
  const { clientX: g, clientY: B } = I.event, Q = eA(g, B);
9305
9263
  I.clipPos = this.clientToClip(Q, 0), I.worldPos = this.camera.clipToWorld(I.clipPos);
9306
9264
  }
9307
- for (const g of this.layerManager.layers)
9265
+ for (const g of this.layers_)
9308
9266
  if (g.onEvent(I), I.propagationStopped) return;
9309
9267
  this.cameraControls?.onEvent(I);
9310
9268
  });
9311
9269
  for (const I of A.layers ?? [])
9312
- this.layerManager.add(I);
9270
+ this.addLayer(I);
9271
+ }
9272
+ get layers() {
9273
+ return this.layers_;
9274
+ }
9275
+ addLayer(A) {
9276
+ this.layers_.push(A), A.onAttached(this.context_);
9277
+ }
9278
+ removeLayer(A) {
9279
+ const I = this.layers_.indexOf(A);
9280
+ if (I === -1)
9281
+ throw new Error(`Layer to remove not found: ${A}`);
9282
+ this.layers_.splice(I, 1), A.onDetached(this.context_);
9283
+ }
9284
+ removeAllLayers() {
9285
+ for (const A of this.layers_)
9286
+ A.onDetached(this.context_);
9287
+ this.layers_ = [];
9313
9288
  }
9314
9289
  updateSize() {
9315
9290
  this.updateAspectRatio();
@@ -9367,7 +9342,7 @@ function WQ(C, A) {
9367
9342
  }
9368
9343
  }
9369
9344
  }
9370
- function xo(C) {
9345
+ function mo(C) {
9371
9346
  for (let A = 0; A < C.length; A++)
9372
9347
  WQ(C[A], C.slice(0, A));
9373
9348
  }
@@ -9378,12 +9353,12 @@ function RC(C, A, I) {
9378
9353
  ...B,
9379
9354
  element: Q,
9380
9355
  id: B.id ?? Q.id ?? nQ("viewport"),
9381
- layerManager: new uo(I)
9356
+ context: I
9382
9357
  };
9383
9358
  });
9384
- return xo(g), g.map((B) => new mo(B));
9359
+ return mo(g), g.map((B) => new po(B));
9385
9360
  }
9386
- class bo {
9361
+ class xo {
9387
9362
  elements_;
9388
9363
  resizeObserver_;
9389
9364
  mediaQuery_;
@@ -9516,7 +9491,7 @@ class vQ {
9516
9491
  const g = [this.canvas];
9517
9492
  for (const B of this.viewports_)
9518
9493
  B.element !== this.canvas && g.push(B.element);
9519
- this.sizeObserver_ = new bo(g, () => {
9494
+ this.sizeObserver_ = new xo(g, () => {
9520
9495
  this.renderer_.updateSize(), this.renderer_.beginFrame();
9521
9496
  for (const B of this.viewports_)
9522
9497
  B.updateSize(), this.renderer_.render(B);
@@ -9594,7 +9569,7 @@ class vQ {
9594
9569
  }
9595
9570
  }
9596
9571
  }
9597
- function To(C, A) {
9572
+ function bo(C, A) {
9598
9573
  return {
9599
9574
  ...C,
9600
9575
  ...A,
@@ -9626,7 +9601,7 @@ class WI {
9626
9601
  this.url = A, this.#A = I.fetch ?? ((g) => fetch(g)), this.#I = I.overrides ?? {}, this.#g = I.useSuffixRequest ?? !1;
9627
9602
  }
9628
9603
  #B(A, I) {
9629
- return new Request(A, To(this.#I, I));
9604
+ return new Request(A, bo(this.#I, I));
9630
9605
  }
9631
9606
  async get(A, I = {}) {
9632
9607
  let g = kC(this.url, A).href, B = this.#B(g, I), Q = await this.#A(B);
@@ -9691,7 +9666,7 @@ class rA extends vI {
9691
9666
  super(A, { cause: I.cause }), this.path = I.path;
9692
9667
  }
9693
9668
  }
9694
- class Wo extends vI {
9669
+ class To extends vI {
9695
9670
  _tag = "UnknownCodecError";
9696
9671
  name = "UnknownCodecError";
9697
9672
  codec;
@@ -9699,7 +9674,7 @@ class Wo extends vI {
9699
9674
  super(`Unknown codec: ${A}`), this.codec = A;
9700
9675
  }
9701
9676
  }
9702
- class vo extends vI {
9677
+ class Wo extends vI {
9703
9678
  _tag = "CodecPipelineError";
9704
9679
  name = "CodecPipelineError";
9705
9680
  direction;
@@ -9888,11 +9863,11 @@ class ZI {
9888
9863
  yield this.get(A);
9889
9864
  }
9890
9865
  }
9891
- function Zo() {
9866
+ function vo() {
9892
9867
  if (typeof SharedArrayBuffer > "u")
9893
9868
  throw new Error("SharedArrayBuffer is not available. In browsers, this requires Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy headers to be set.");
9894
9869
  }
9895
- function Po(C, A) {
9870
+ function Zo(C, A) {
9896
9871
  return new SharedArrayBuffer(C);
9897
9872
  }
9898
9873
  function PI(C) {
@@ -9946,7 +9921,7 @@ function CI(C, A) {
9946
9921
  B[A[Q]] = g, g *= C[A[Q]];
9947
9922
  return B;
9948
9923
  }
9949
- function Vo({ name: C, configuration: A }) {
9924
+ function Po({ name: C, configuration: A }) {
9950
9925
  if (C === "default") {
9951
9926
  const I = A?.separator ?? "/";
9952
9927
  return (g) => ["c", ...g].join(I);
@@ -9981,15 +9956,15 @@ function lC(C) {
9981
9956
  throw new rA(`Unsupported or unknown dtype: ${C}`);
9982
9957
  return I === "|" ? { dataType: B } : { dataType: B, endian: I === "<" ? "little" : "big" };
9983
9958
  }
9984
- function Oo(C) {
9959
+ function Vo(C) {
9985
9960
  return (C.id === "fixedscaleoffset" || C.id === "numcodecs.fixedscaleoffset") && typeof C.scale == "number" && typeof C.offset == "number" && (C.astype === void 0 || typeof C.astype == "string") && (C.dtype === void 0 || typeof C.dtype == "string");
9986
9961
  }
9987
- function _o(C, A = {}) {
9962
+ function Oo(C, A = {}) {
9988
9963
  let I = [], g = lC(C.dtype);
9989
9964
  C.order === "F" && I.push({ name: "transpose", configuration: { order: "F" } });
9990
9965
  for (let Q of C.filters ?? []) {
9991
9966
  if (Q.id === "fixedscaleoffset" || Q.id === "numcodecs.fixedscaleoffset") {
9992
- if (!Oo(Q))
9967
+ if (!Vo(Q))
9993
9968
  throw new rA(`Invalid fixedscaleoffset filter: ${JSON.stringify(Q)}`);
9994
9969
  I.push({
9995
9970
  name: "scale_offset",
@@ -10047,7 +10022,7 @@ function _o(C, A = {}) {
10047
10022
  attributes: A
10048
10023
  };
10049
10024
  }
10050
- function Xo(C, A = {}) {
10025
+ function _o(C, A = {}) {
10051
10026
  return {
10052
10027
  zarr_format: 3,
10053
10028
  node_type: "group",
@@ -10069,7 +10044,7 @@ function BB(C, A) {
10069
10044
  let Q = C === "v2:object";
10070
10045
  return A === "object" ? Q : !g && !B && !I && !Q;
10071
10046
  }
10072
- function jo(C) {
10047
+ function Xo(C) {
10073
10048
  return C?.name === "sharding_indexed";
10074
10049
  }
10075
10050
  function PQ(C) {
@@ -10110,8 +10085,8 @@ async function OQ(C, { format: A, signal: I }) {
10110
10085
  throw I?.throwIfAborted(), new Error(`Failed to decode ${A}`);
10111
10086
  }
10112
10087
  }
10113
- const LC = zo();
10114
- function zo() {
10088
+ const LC = jo();
10089
+ function jo() {
10115
10090
  const C = new Uint32Array([305419896]);
10116
10091
  return new Uint8Array(C.buffer, C.byteOffset, C.byteLength)[0] !== 18;
10117
10092
  }
@@ -10160,7 +10135,7 @@ function tg(C) {
10160
10135
  function CB(C) {
10161
10136
  return C === "int64" || C === "uint64";
10162
10137
  }
10163
- function $o(C, A) {
10138
+ function zo(C, A) {
10164
10139
  const I = BigInt(C), g = new ArrayBuffer(A), B = new DataView(g);
10165
10140
  if (A === 2) {
10166
10141
  if (typeof B.getFloat16 != "function")
@@ -10182,7 +10157,7 @@ function ag(C, A) {
10182
10157
  }
10183
10158
  if (!tg(C))
10184
10159
  throw new rA(`String-encoded scalar "${A}" is not valid for non-float data type "${C}"`);
10185
- return A in YC ? YC[A] : $o(A, _Q[C]);
10160
+ return A in YC ? YC[A] : zo(A, _Q[C]);
10186
10161
  }
10187
10162
  const MC = /* @__PURE__ */ new Set([
10188
10163
  "int8",
@@ -10213,7 +10188,7 @@ function fC(C, A, I) {
10213
10188
  tgt: ag(I, B)
10214
10189
  }));
10215
10190
  }
10216
- function As(C, A) {
10191
+ function $o(C, A) {
10217
10192
  for (const I of A)
10218
10193
  if (typeof I.src == "number" && Number.isNaN(I.src)) {
10219
10194
  if (typeof C == "number" && Number.isNaN(C))
@@ -10221,7 +10196,7 @@ function As(C, A) {
10221
10196
  } else if (C === I.src)
10222
10197
  return I.tgt;
10223
10198
  }
10224
- function Is(C) {
10199
+ function As(C) {
10225
10200
  if (!Number.isFinite(C))
10226
10201
  return C;
10227
10202
  if (Math.abs(C - Math.trunc(C)) === 0.5) {
@@ -10230,13 +10205,13 @@ function Is(C) {
10230
10205
  }
10231
10206
  return Math.round(C);
10232
10207
  }
10233
- function gs(C) {
10208
+ function Is(C) {
10234
10209
  return Math.sign(C) * Math.floor(Math.abs(C) + 0.5);
10235
10210
  }
10236
10211
  function KC(C) {
10237
10212
  switch (C) {
10238
10213
  case "nearest-even":
10239
- return Is;
10214
+ return As;
10240
10215
  case "towards-zero":
10241
10216
  return Math.trunc;
10242
10217
  case "towards-positive":
@@ -10244,7 +10219,7 @@ function KC(C) {
10244
10219
  case "towards-negative":
10245
10220
  return Math.floor;
10246
10221
  case "nearest-away":
10247
- return gs;
10222
+ return Is;
10248
10223
  }
10249
10224
  }
10250
10225
  function Tg(C, A, I) {
@@ -10346,7 +10321,7 @@ function uC(C, A, I, g, B) {
10346
10321
  else
10347
10322
  throw new Error(`Unhandled type combination: ${C} -> ${A}`);
10348
10323
  return B.length === 0 ? s : (a) => {
10349
- const r = As(a, B);
10324
+ const r = $o(a, B);
10350
10325
  return r !== void 0 ? r : s(a);
10351
10326
  };
10352
10327
  }
@@ -10360,7 +10335,7 @@ class pB {
10360
10335
  return new Uint8Array(A.buffer, A.byteOffset, A.byteLength - 4);
10361
10336
  }
10362
10337
  }
10363
- const Bs = /* @__PURE__ */ new Set([
10338
+ const gs = /* @__PURE__ */ new Set([
10364
10339
  "int8",
10365
10340
  "uint8",
10366
10341
  "int16",
@@ -10393,7 +10368,7 @@ class mB {
10393
10368
  this.#A = A;
10394
10369
  }
10395
10370
  static fromConfig(A, I) {
10396
- if (!Bs.has(I.dataType))
10371
+ if (!gs.has(I.dataType))
10397
10372
  throw new rA(`Delta codec does not support data type: ${I.dataType}`);
10398
10373
  return new mB(UI(I.dataType));
10399
10374
  }
@@ -10425,10 +10400,10 @@ class xB {
10425
10400
  return new Uint8Array(I);
10426
10401
  }
10427
10402
  }
10428
- function Cs(C, A) {
10403
+ function Bs(C, A) {
10429
10404
  return RA(!Number.isNaN(A), "JsonCodec allow_nan is false but NaN was encountered during encoding."), RA(A !== Number.POSITIVE_INFINITY, "JsonCodec allow_nan is false but Infinity was encountered during encoding."), RA(A !== Number.NEGATIVE_INFINITY, "JsonCodec allow_nan is false but -Infinity was encountered during encoding."), A;
10430
10405
  }
10431
- function Qs(C, A) {
10406
+ function Cs(C, A) {
10432
10407
  return A instanceof Object && !Array.isArray(A) ? Object.keys(A).sort().reduce((I, g) => (I[g] = A[g], I), {}) : A;
10433
10408
  }
10434
10409
  class bB {
@@ -10458,7 +10433,7 @@ class bB {
10458
10433
  const { indent: I, encoding: g, ensure_ascii: B, check_circular: Q, allow_nan: E, sort_keys: i } = this.#A;
10459
10434
  RA(g === "utf-8", "JsonCodec does not yet support non-utf-8 encoding.");
10460
10435
  const o = [];
10461
- RA(Q, "JsonCodec does not yet support skipping the check for circular references during encoding."), E || o.push(Cs), i && o.push(Qs);
10436
+ RA(Q, "JsonCodec does not yet support skipping the check for circular references during encoding."), E || o.push(Bs), i && o.push(Cs);
10462
10437
  const s = Array.from(A.data);
10463
10438
  s.push("|O"), s.push(A.shape);
10464
10439
  let t;
@@ -10483,7 +10458,7 @@ class bB {
10483
10458
  return { data: g, shape: B, stride: Q };
10484
10459
  }
10485
10460
  }
10486
- const Es = /* @__PURE__ */ new Set([
10461
+ const Qs = /* @__PURE__ */ new Set([
10487
10462
  "int8",
10488
10463
  "uint8",
10489
10464
  "int16",
@@ -10505,7 +10480,7 @@ class TB {
10505
10480
  this.#I = A, this.#g = I, this.#A = g;
10506
10481
  }
10507
10482
  static fromConfig(A, I) {
10508
- if (!Es.has(I.dataType))
10483
+ if (!Qs.has(I.dataType))
10509
10484
  throw new rA(`scale_offset codec does not support data type: ${I.dataType}`);
10510
10485
  return new TB(ag(I.dataType, A.scale ?? 1), ag(I.dataType, A.offset ?? 0), UI(I.dataType));
10511
10486
  }
@@ -10531,20 +10506,20 @@ class WB {
10531
10506
  return new WB(A, I);
10532
10507
  }
10533
10508
  encode(A) {
10534
- return is(A, this.#A);
10509
+ return Es(A, this.#A);
10535
10510
  }
10536
10511
  decode(A) {
10537
- return os(A, this.#A);
10512
+ return is(A, this.#A);
10538
10513
  }
10539
10514
  }
10540
- function is(C, A) {
10515
+ function Es(C, A) {
10541
10516
  let I = C.length, g = Math.floor(I / A), B = new Uint8Array(I);
10542
10517
  for (let Q = 0; Q < A; Q++)
10543
10518
  for (let E = 0; E < g; E++)
10544
10519
  B[Q * g + E] = C[E * A + Q];
10545
10520
  return B;
10546
10521
  }
10547
- function os(C, A) {
10522
+ function is(C, A) {
10548
10523
  let I = C.length, g = Math.floor(I / A), B = new Uint8Array(I);
10549
10524
  for (let Q = 0; Q < A; Q++)
10550
10525
  for (let E = 0; E < g; E++)
@@ -10561,7 +10536,7 @@ function qC(C) {
10561
10536
  }
10562
10537
  }) : C;
10563
10538
  }
10564
- function ss(C, A) {
10539
+ function os(C, A) {
10565
10540
  let I;
10566
10541
  return C.data instanceof HB || C.data instanceof ZI ? I = new C.constructor(
10567
10542
  // @ts-expect-error
@@ -10573,8 +10548,8 @@ function ss(C, A) {
10573
10548
  stride: CI(C.shape, A)
10574
10549
  };
10575
10550
  }
10576
- function ts(C, A) {
10577
- let I = ss(C, A), g = C.shape.length, B = C.data.length, Q = Array(g).fill(0), E = qC(C.data), i = qC(I.data);
10551
+ function ss(C, A) {
10552
+ let I = os(C, A), g = C.shape.length, B = C.data.length, Q = Array(g).fill(0), E = qC(C.data), i = qC(I.data);
10578
10553
  for (let o = 0; o < B; o++) {
10579
10554
  let s = 0;
10580
10555
  for (let t = 0; t < g; t++)
@@ -10589,12 +10564,12 @@ function ts(C, A) {
10589
10564
  }
10590
10565
  return I;
10591
10566
  }
10592
- function as(C) {
10567
+ function ts(C) {
10593
10568
  let A = C.shape.length;
10594
10569
  return RA(A === C.stride.length, "Shape and stride must have the same length."), C.stride.map((I, g) => ({ stride: I, index: g })).sort((I, g) => g.stride - I.stride).map((I) => I.index);
10595
10570
  }
10596
- function es(C, A) {
10597
- let I = as(C);
10571
+ function as(C, A) {
10572
+ let I = ts(C);
10598
10573
  return RA(I.length === A.length, "Orders must match"), I.every((g, B) => g === A[B]);
10599
10574
  }
10600
10575
  class vB {
@@ -10619,7 +10594,7 @@ class vB {
10619
10594
  return new vB(A, I);
10620
10595
  }
10621
10596
  encode(A) {
10622
- return es(A, this.#I) ? A : ts(A, this.#I);
10597
+ return as(A, this.#I) ? A : ss(A, this.#I);
10623
10598
  }
10624
10599
  decode(A) {
10625
10600
  return {
@@ -10660,21 +10635,21 @@ class ZB {
10660
10635
  return new Uint8Array(I);
10661
10636
  }
10662
10637
  }
10663
- function ns() {
10638
+ function es() {
10664
10639
  let C = () => 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), g = () => xB, B = () => ZB;
10665
10640
  return (/* @__PURE__ */ new Map()).set("blosc", C).set("lz4", A).set("zstd", I).set("gzip", g).set("zlib", B).set("transpose", () => vB).set("bytes", () => Rg).set("crc32c", () => pB).set("vlen-utf8", () => eg).set("json2", () => bB).set("bitround", () => KB).set("cast_value", () => qB).set("scale_offset", () => TB).set("numcodecs.blosc", C).set("numcodecs.lz4", A).set("numcodecs.zstd", I).set("numcodecs.gzip", g).set("numcodecs.zlib", B).set("numcodecs.vlen-utf8", () => eg).set("numcodecs.shuffle", () => WB).set("numcodecs.delta", () => mB);
10666
10641
  }
10667
- const rs = ns();
10642
+ const ns = es();
10668
10643
  function QB(C) {
10669
10644
  let A;
10670
10645
  function I() {
10671
- return A || (A = Ds(C)), A;
10646
+ return A || (A = rs(C)), A;
10672
10647
  }
10673
10648
  async function g(B, Q, E) {
10674
10649
  try {
10675
10650
  return await E();
10676
10651
  } catch (i) {
10677
- throw new vo({ direction: B, codec: Q, cause: i });
10652
+ throw new Wo({ direction: B, codec: Q, cause: i });
10678
10653
  }
10679
10654
  }
10680
10655
  return {
@@ -10702,11 +10677,11 @@ function QB(C) {
10702
10677
  }
10703
10678
  };
10704
10679
  }
10705
- async function Ds(C) {
10680
+ async function rs(C) {
10706
10681
  let A = C.codecs.map(async (E) => {
10707
- let i = await rs.get(E.name)?.();
10682
+ let i = await ns.get(E.name)?.();
10708
10683
  if (!i)
10709
- throw new Wo(E.name);
10684
+ throw new To(E.name);
10710
10685
  return { Codec: i, meta: E };
10711
10686
  }), I = [], g, B = [], Q = { ...C };
10712
10687
  for await (let { Codec: E, meta: i } of A) {
@@ -10732,7 +10707,7 @@ async function Ds(C) {
10732
10707
  }
10733
10708
  }
10734
10709
  if (!g) {
10735
- if (!hs(Q))
10710
+ if (!Ds(Q))
10736
10711
  throw new rA(`Cannot encode ${Q.dataType} to bytes without a codec`);
10737
10712
  g = {
10738
10713
  name: "bytes",
@@ -10745,11 +10720,11 @@ async function Ds(C) {
10745
10720
  bytesToBytes: B
10746
10721
  };
10747
10722
  }
10748
- function hs(C) {
10723
+ function Ds(C) {
10749
10724
  return C.dataType !== "v2:object" && C.dataType !== "string";
10750
10725
  }
10751
10726
  const pC = 18446744073709551615n;
10752
- function ys(C, A, I, g) {
10727
+ function hs(C, A, I, g) {
10753
10728
  if (!C.store.getRange)
10754
10729
  throw new fB("sharding requires a store with getRange");
10755
10730
  let B = C.store.getRange.bind(C.store), Q = A.map((t, a) => t / g.chunk_shape[a]), E = QB({
@@ -10804,9 +10779,9 @@ function mC(C) {
10804
10779
  return C.find((I) => I.name === "transpose")?.configuration?.order ?? "C";
10805
10780
  }
10806
10781
  const jI = Symbol("zarrita.context");
10807
- function cs(C, A) {
10808
- let { configuration: I } = A.codecs.find(jo) ?? {}, g = {
10809
- encodeChunkKey: Vo(A.chunk_key_encoding),
10782
+ function ys(C, A) {
10783
+ let { configuration: I } = A.codecs.find(Xo) ?? {}, g = {
10784
+ encodeChunkKey: Po(A.chunk_key_encoding),
10810
10785
  TypedArray: UI(A.data_type),
10811
10786
  fillValue: A.fill_value
10812
10787
  };
@@ -10825,7 +10800,7 @@ function cs(C, A) {
10825
10800
  getStrides(E) {
10826
10801
  return CI(E, Q);
10827
10802
  },
10828
- getChunkBytes: ys(C, A.chunk_grid.configuration.chunk_shape, g.encodeChunkKey, I)
10803
+ getChunkBytes: hs(C, A.chunk_grid.configuration.chunk_shape, g.encodeChunkKey, I)
10829
10804
  };
10830
10805
  }
10831
10806
  let B = mC(A.codecs);
@@ -10856,7 +10831,7 @@ let ng = class extends lA {
10856
10831
  super(A, I), this.#A = {
10857
10832
  ...g,
10858
10833
  fill_value: PQ(g)
10859
- }, this[jI] = cs(this, this.#A);
10834
+ }, this[jI] = ys(this, this.#A);
10860
10835
  }
10861
10836
  get attrs() {
10862
10837
  return this.#A.attributes;
@@ -10877,7 +10852,7 @@ let ng = class extends lA {
10877
10852
  return this.#A.data_type;
10878
10853
  }
10879
10854
  async getChunk(A, I, g) {
10880
- g?.useSharedArrayBuffer && Zo();
10855
+ g?.useSharedArrayBuffer && vo();
10881
10856
  let B = this[jI], Q = await B.getChunkBytes(A, I);
10882
10857
  if (!Q) {
10883
10858
  let E = B.chunkShape.reduce((o, s) => o * s, 1), i;
@@ -10886,7 +10861,7 @@ let ng = class extends lA {
10886
10861
  if (!("BYTES_PER_ELEMENT" in o))
10887
10862
  console.warn("zarrita: useSharedArrayBuffer is not supported for non-buffer-backed data types."), i = new B.TypedArray(E);
10888
10863
  else {
10889
- let s = Po(E * o.BYTES_PER_ELEMENT);
10864
+ let s = Zo(E * o.BYTES_PER_ELEMENT);
10890
10865
  i = new B.TypedArray(s, 0, E);
10891
10866
  }
10892
10867
  } else
@@ -10920,21 +10895,21 @@ let ng = class extends lA {
10920
10895
  return BB(this.dtype, A);
10921
10896
  }
10922
10897
  };
10923
- function ws(C, A) {
10898
+ function cs(C, A) {
10924
10899
  let I = C;
10925
10900
  for (let g of A)
10926
10901
  I instanceof Promise ? I = I.then((B) => g(B)) : I = g(I);
10927
10902
  return I;
10928
10903
  }
10929
- function Gs(C, ...A) {
10930
- return ws(C, A);
10904
+ function ws(C, ...A) {
10905
+ return cs(C, A);
10931
10906
  }
10932
10907
  async function XQ(C) {
10933
10908
  let A = C.store.arrayExtensions;
10934
- return A?.length ? await Gs(C, ...A) : C;
10909
+ return A?.length ? await ws(C, ...A) : C;
10935
10910
  }
10936
- let kg = Fs();
10937
- function Fs() {
10911
+ let kg = Gs();
10912
+ function Gs() {
10938
10913
  let C = /* @__PURE__ */ new WeakMap();
10939
10914
  function A(I) {
10940
10915
  let g = C.get(I) ?? { v2: 0, v3: 0 };
@@ -10950,37 +10925,37 @@ function Fs() {
10950
10925
  }
10951
10926
  };
10952
10927
  }
10953
- async function Ss(C, A) {
10928
+ async function Fs(C, A) {
10954
10929
  let I = await C.store.get(C.resolve(".zattrs").path, {
10955
10930
  signal: A
10956
10931
  });
10957
10932
  return I ? PI(I) : {};
10958
10933
  }
10959
- async function Ns(C, A = {}) {
10934
+ async function Ss(C, A = {}) {
10960
10935
  let I = "store" in C ? C : new lA(C), { signal: g } = A, B = {};
10961
- return (A.attrs ?? !0) && (B = await Ss(I, g)), g?.throwIfAborted(), A.kind === "array" ? xC(I, B, g) : A.kind === "group" ? bC(I, B, g) : xC(I, B, g).catch((Q) => (VQ(Q, kI, rA), bC(I, B, g)));
10936
+ return (A.attrs ?? !0) && (B = await Fs(I, g)), g?.throwIfAborted(), A.kind === "array" ? xC(I, B, g) : A.kind === "group" ? bC(I, B, g) : xC(I, B, g).catch((Q) => (VQ(Q, kI, rA), bC(I, B, g)));
10962
10937
  }
10963
10938
  async function xC(C, A, I) {
10964
10939
  let { path: g } = C.resolve(".zarray"), B = await C.store.get(g, { signal: I });
10965
10940
  if (!B)
10966
10941
  throw new kI("v2 array", { path: g });
10967
- return kg.increment(C.store, "v2"), XQ(new ng(C.store, C.path, _o(PI(B), A)));
10942
+ return kg.increment(C.store, "v2"), XQ(new ng(C.store, C.path, Oo(PI(B), A)));
10968
10943
  }
10969
10944
  async function bC(C, A, I) {
10970
10945
  let { path: g } = C.resolve(".zgroup"), B = await C.store.get(g, { signal: I });
10971
10946
  if (!B)
10972
10947
  throw new kI("v2 group", { path: g });
10973
- return kg.increment(C.store, "v2"), new PB(C.store, C.path, Xo(PI(B), A));
10948
+ return kg.increment(C.store, "v2"), new PB(C.store, C.path, _o(PI(B), A));
10974
10949
  }
10975
- async function Rs(C, A) {
10950
+ async function Ns(C, A) {
10976
10951
  let { store: I, path: g } = C.resolve("zarr.json"), B = await C.store.get(g, { signal: A });
10977
10952
  if (!B)
10978
10953
  throw new kI("v3 array or group", { path: g });
10979
10954
  let Q = PI(B);
10980
10955
  return Q.node_type === "array" && (Q.fill_value = PQ(Q)), Q.node_type === "array" ? XQ(new ng(I, C.path, Q)) : new PB(I, C.path, Q);
10981
10956
  }
10982
- async function ks(C, A = {}) {
10983
- let I = "store" in C ? C : new lA(C), g = await Rs(I, A.signal);
10957
+ async function Rs(C, A = {}) {
10958
+ let I = "store" in C ? C : new lA(C), g = await Ns(I, A.signal);
10984
10959
  if (kg.increment(I.store, "v3"), A.kind === void 0 || A.kind === "array" && g instanceof ng || A.kind === "group" && g instanceof PB)
10985
10960
  return g;
10986
10961
  let B = g instanceof ng ? "array" : "group";
@@ -10993,9 +10968,9 @@ async function UA(C, A = {}) {
10993
10968
  let I = "store" in C ? C.store : C, g = kg.versionMax(I), B = g === "v2" ? UA.v2 : UA.v3, Q = g === "v2" ? UA.v3 : UA.v2;
10994
10969
  return B(C, A).catch((E) => (VQ(E, kI, rA), Q(C, A)));
10995
10970
  }
10996
- UA.v2 = Ns;
10997
- UA.v3 = ks;
10998
- async function Us(C, A) {
10971
+ UA.v2 = Ss;
10972
+ UA.v3 = Rs;
10973
+ async function ks(C, A) {
10999
10974
  const I = A.split("/"), g = I.pop();
11000
10975
  if (!g)
11001
10976
  throw new Error("Invalid path");
@@ -11012,7 +10987,7 @@ class VB {
11012
10987
  return this.#A;
11013
10988
  }
11014
10989
  async get(A) {
11015
- const I = await Us(this.#A, A.slice(1)).catch(
10990
+ const I = await ks(this.#A, A.slice(1)).catch(
11016
10991
  () => {
11017
10992
  }
11018
10993
  );
@@ -11041,7 +11016,7 @@ async function VI(C, A) {
11041
11016
  throw new Error(`Failed to open Zarr group at ${C}`);
11042
11017
  }
11043
11018
  }
11044
- async function ds(C, A) {
11019
+ async function Us(C, A) {
11045
11020
  if (A === "v2")
11046
11021
  try {
11047
11022
  return UA.v2(C, { kind: "array", attrs: !1 });
@@ -11060,7 +11035,7 @@ async function ds(C, A) {
11060
11035
  throw new Error(`Failed to open Zarr array at ${C}`);
11061
11036
  }
11062
11037
  }
11063
- async function ls(C) {
11038
+ async function ds(C) {
11064
11039
  let A;
11065
11040
  switch (C.type) {
11066
11041
  case "fetch": {
@@ -11081,9 +11056,9 @@ async function ls(C) {
11081
11056
  }
11082
11057
  }
11083
11058
  const I = C.arrayPath ? A.resolve(C.arrayPath) : A;
11084
- return ds(I, C.zarrVersion);
11059
+ return Us(I, C.zarrVersion);
11085
11060
  }
11086
- function Ls(C, A, I) {
11061
+ function ls(C, A, I) {
11087
11062
  if (C.store instanceof WI)
11088
11063
  return {
11089
11064
  type: "fetch",
@@ -11103,10 +11078,10 @@ function Ls(C, A, I) {
11103
11078
  `Unsupported store type: ${C.store.constructor.name}`
11104
11079
  );
11105
11080
  }
11106
- function Js(C, A, I, g) {
11107
- return Ys(C, A, I, g);
11081
+ function Ls(C, A, I, g) {
11082
+ return Js(C, A, I, g);
11108
11083
  }
11109
- function Ys(C, A, I, g) {
11084
+ function Js(C, A, I, g) {
11110
11085
  const { targetShape: B, chunkIndex: Q, dimIndices: E } = g;
11111
11086
  let i = 1;
11112
11087
  for (let L = A.length - 1; L >= 0; L--) {
@@ -14781,7 +14756,7 @@ return ret;
14781
14756
  });
14782
14757
  //# sourceMappingURL=worker_kernel-DFSDwCPR.js.map
14783
14758
  `, TC = typeof self < "u" && self.Blob && new Blob(["URL.revokeObjectURL(import.meta.url);", jQ], { type: "text/javascript;charset=utf-8" });
14784
- function Ms(C) {
14759
+ function Ys(C) {
14785
14760
  let A;
14786
14761
  try {
14787
14762
  if (A = TC && (self.URL || self.webkitURL).createObjectURL(TC), !A) throw "";
@@ -14802,8 +14777,8 @@ function Ms(C) {
14802
14777
  );
14803
14778
  }
14804
14779
  }
14805
- const fs = Math.max(1, navigator.hardwareConcurrency - 2);
14806
- let MA = [], Ks = 0, zQ = 0;
14780
+ const Ms = Math.max(1, navigator.hardwareConcurrency - 2);
14781
+ let MA = [], fs = 0, zQ = 0;
14807
14782
  const QI = /* @__PURE__ */ new Map(), rg = /* @__PURE__ */ new Set();
14808
14783
  function $Q(C) {
14809
14784
  const A = MA.find((I) => I.worker === C);
@@ -14812,7 +14787,7 @@ function $Q(C) {
14812
14787
  "Worker not found in pool - this should not happen"
14813
14788
  ), A;
14814
14789
  }
14815
- function us(C, A) {
14790
+ function Ks(C, A) {
14816
14791
  const { id: I, success: g } = C.data, B = QI.get(I);
14817
14792
  if (!B) {
14818
14793
  rg.has(I) ? rg.delete(I) : H.warn(
@@ -14863,20 +14838,20 @@ function WC(C, A) {
14863
14838
  }
14864
14839
  }
14865
14840
  function AE() {
14866
- const C = new Ms();
14867
- return C.addEventListener("message", (A) => us(A, C)), C.addEventListener("error", (A) => WC(A, C)), C.addEventListener(
14841
+ const C = new Ys();
14842
+ return C.addEventListener("message", (A) => Ks(A, C)), C.addEventListener("error", (A) => WC(A, C)), C.addEventListener(
14868
14843
  "messageerror",
14869
14844
  (A) => WC(A, C)
14870
14845
  ), C;
14871
14846
  }
14872
- function Hs() {
14847
+ function us() {
14873
14848
  if (MA.length === 0)
14874
14849
  throw new Error("Worker pool is not initialized");
14875
14850
  return MA.sort((C, A) => C.pendingCount - A.pendingCount)[0];
14876
14851
  }
14877
- async function qs(C, A, I, g) {
14852
+ async function Hs(C, A, I, g) {
14878
14853
  return new Promise((B, Q) => {
14879
- const E = Hs(), i = Ks++, o = {
14854
+ const E = us(), i = fs++, o = {
14880
14855
  resolve: B,
14881
14856
  reject: Q,
14882
14857
  workerId: E.workerId
@@ -14903,10 +14878,10 @@ async function qs(C, A, I, g) {
14903
14878
  });
14904
14879
  });
14905
14880
  }
14906
- function ps() {
14881
+ function qs() {
14907
14882
  if (!(MA.length > 0))
14908
14883
  try {
14909
- for (let C = 0; C < fs; C++) {
14884
+ for (let C = 0; C < Ms; C++) {
14910
14885
  const A = AE();
14911
14886
  MA.push({
14912
14887
  worker: A,
@@ -14919,14 +14894,14 @@ function ps() {
14919
14894
  `Initialized worker pool with ${MA.length} workers`
14920
14895
  );
14921
14896
  } catch {
14922
- H.warn("ZarrWorker", "Failed to create workers - clearing pool"), xs();
14897
+ H.warn("ZarrWorker", "Failed to create workers - clearing pool"), ms();
14923
14898
  return;
14924
14899
  }
14925
14900
  }
14926
- async function ms(C, A, I, g, B) {
14927
- ps();
14901
+ async function ps(C, A, I, g, B) {
14902
+ qs();
14928
14903
  try {
14929
- return await qs(
14904
+ return await Hs(
14930
14905
  A,
14931
14906
  I,
14932
14907
  g,
@@ -14941,7 +14916,7 @@ async function ms(C, A, I, g, B) {
14941
14916
  throw new Error(
14942
14917
  `Unsupported chunk data type: ${E.data.constructor.name}`
14943
14918
  );
14944
- return Js(
14919
+ return Ls(
14945
14920
  E.data,
14946
14921
  E.shape,
14947
14922
  E.stride,
@@ -14949,18 +14924,18 @@ async function ms(C, A, I, g, B) {
14949
14924
  );
14950
14925
  }
14951
14926
  }
14952
- function xs() {
14927
+ function ms() {
14953
14928
  for (const C of MA)
14954
14929
  C.worker.terminate();
14955
14930
  MA = [], QI.clear();
14956
14931
  }
14957
- class bs {
14932
+ class xs {
14958
14933
  metadata_;
14959
14934
  arrays_;
14960
14935
  arrayParams_;
14961
14936
  dimensions_;
14962
14937
  constructor(A) {
14963
- this.metadata_ = A.metadata, this.arrays_ = A.arrays, this.arrayParams_ = A.arrayParams, this.dimensions_ = Ts(this.metadata_, this.arrays_);
14938
+ this.metadata_ = A.metadata, this.arrays_ = A.arrays, this.arrayParams_ = A.arrayParams, this.dimensions_ = bs(this.metadata_, this.arrays_);
14964
14939
  }
14965
14940
  getSourceDimensionMap() {
14966
14941
  return this.dimensions_;
@@ -14991,7 +14966,7 @@ class bs {
14991
14966
  },
14992
14967
  cChunkSize: E?.chunkSize,
14993
14968
  tChunkSize: i?.chunkSize
14994
- }, s = await ms(
14969
+ }, s = await ps(
14995
14970
  B,
14996
14971
  Q,
14997
14972
  g,
@@ -15005,7 +14980,7 @@ class bs {
15005
14980
  A.rowAlignmentBytes = t, A.data = s;
15006
14981
  }
15007
14982
  }
15008
- function Ts(C, A) {
14983
+ function bs(C, A) {
15009
14984
  const I = C.axes.map((a) => a.name), g = C.axes.length, B = vC(I, "x"), Q = vC(I, "y"), E = (a, r) => {
15010
14985
  const D = [];
15011
14986
  for (let F = 0; F < C.datasets.length; F++) {
@@ -15017,7 +14992,7 @@ function Ts(C, A) {
15017
14992
  translation: u[r]
15018
14993
  });
15019
14994
  }
15020
- if (C.axes[r].type === "space" && vs(D))
14995
+ if (C.axes[r].type === "space" && Ws(D))
15021
14996
  for (const F of D) F.translation -= 0.5 * F.scale;
15022
14997
  return {
15023
14998
  name: a,
@@ -15036,7 +15011,7 @@ function Ts(C, A) {
15036
15011
  const t = Ig(I, "t");
15037
15012
  return t !== -1 && (i.t = E(I[t], t)), i;
15038
15013
  }
15039
- function Ws(C, A) {
15014
+ function Ts(C, A) {
15040
15015
  return C.toLowerCase() === A.toLowerCase();
15041
15016
  }
15042
15017
  function vC(C, A) {
@@ -15048,9 +15023,9 @@ function vC(C, A) {
15048
15023
  return I;
15049
15024
  }
15050
15025
  function Ig(C, A) {
15051
- return C.findIndex((I) => Ws(I, A));
15026
+ return C.findIndex((I) => Ts(I, A));
15052
15027
  }
15053
- function vs(C) {
15028
+ function Ws(C) {
15054
15029
  if (C.length <= 1) return !1;
15055
15030
  for (let A = 1; A < C.length; A++) {
15056
15031
  const I = 0.5 * (C[A].scale - C[A - 1].scale), g = C[A].translation - C[A - 1].translation;
@@ -15283,11 +15258,11 @@ const EB = (C, A) => {
15283
15258
  }
15284
15259
  return { message: I };
15285
15260
  };
15286
- let Zs = EB;
15287
- function Ps() {
15288
- return Zs;
15261
+ let vs = EB;
15262
+ function Zs() {
15263
+ return vs;
15289
15264
  }
15290
- const Vs = (C) => {
15265
+ const Ps = (C) => {
15291
15266
  const { data: A, path: I, errorMaps: g, issueData: B } = C, Q = [...I, ...B.path || []], E = {
15292
15267
  ...B,
15293
15268
  path: Q
@@ -15309,7 +15284,7 @@ const Vs = (C) => {
15309
15284
  };
15310
15285
  };
15311
15286
  function M(C, A) {
15312
- const I = Ps(), g = Vs({
15287
+ const I = Zs(), g = Ps({
15313
15288
  issueData: A,
15314
15289
  data: C.data,
15315
15290
  path: C.path,
@@ -15591,7 +15566,7 @@ class Z {
15591
15566
  });
15592
15567
  }
15593
15568
  brand() {
15594
- return new ht({
15569
+ return new Dt({
15595
15570
  typeName: x.ZodBranded,
15596
15571
  type: this,
15597
15572
  ...b(this._def)
@@ -15626,28 +15601,28 @@ class Z {
15626
15601
  return this.safeParse(null).success;
15627
15602
  }
15628
15603
  }
15629
- const Os = /^c[^\s-]{8,}$/i, _s = /^[0-9a-z]+$/, Xs = /^[0-9A-HJKMNP-TV-Z]{26}$/i, js = /^[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, zs = /^[a-z0-9_-]{21}$/i, $s = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, At = /^[-+]?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)?)??$/, It = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, gt = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
15604
+ const Vs = /^c[^\s-]{8,}$/i, Os = /^[0-9a-z]+$/, _s = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Xs = /^[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, js = /^[a-z0-9_-]{21}$/i, zs = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, $s = /^[-+]?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)?)??$/, At = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, It = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
15630
15605
  let vg;
15631
- const Bt = /^(?:(?: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])$/, Ct = /^(?:(?: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])$/, Qt = /^(([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]))$/, Et = /^(([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])$/, it = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, ot = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, IE = "((\\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])))", st = new RegExp(`^${IE}$`);
15606
+ const gt = /^(?:(?: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])$/, Bt = /^(?:(?: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])$/, Ct = /^(([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]))$/, Qt = /^(([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])$/, Et = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, it = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, IE = "((\\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])))", ot = new RegExp(`^${IE}$`);
15632
15607
  function gE(C) {
15633
15608
  let A = "[0-5]\\d";
15634
15609
  C.precision ? A = `${A}\\.\\d{${C.precision}}` : C.precision == null && (A = `${A}(\\.\\d+)?`);
15635
15610
  const I = C.precision ? "+" : "?";
15636
15611
  return `([01]\\d|2[0-3]):[0-5]\\d(:${A})${I}`;
15637
15612
  }
15638
- function tt(C) {
15613
+ function st(C) {
15639
15614
  return new RegExp(`^${gE(C)}$`);
15640
15615
  }
15641
- function at(C) {
15616
+ function tt(C) {
15642
15617
  let A = `${IE}T${gE(C)}`;
15643
15618
  const I = [];
15644
15619
  return I.push(C.local ? "Z?" : "Z"), C.offset && I.push("([+-]\\d{2}:?\\d{2})"), A = `${A}(${I.join("|")})`, new RegExp(`^${A}$`);
15645
15620
  }
15646
- function et(C, A) {
15647
- return !!((A === "v4" || !A) && Bt.test(C) || (A === "v6" || !A) && Qt.test(C));
15621
+ function at(C, A) {
15622
+ return !!((A === "v4" || !A) && gt.test(C) || (A === "v6" || !A) && Ct.test(C));
15648
15623
  }
15649
- function nt(C, A) {
15650
- if (!$s.test(C))
15624
+ function et(C, A) {
15625
+ if (!zs.test(C))
15651
15626
  return !1;
15652
15627
  try {
15653
15628
  const [I] = C.split(".");
@@ -15659,8 +15634,8 @@ function nt(C, A) {
15659
15634
  return !1;
15660
15635
  }
15661
15636
  }
15662
- function rt(C, A) {
15663
- return !!((A === "v4" || !A) && Ct.test(C) || (A === "v6" || !A) && Et.test(C));
15637
+ function nt(C, A) {
15638
+ return !!((A === "v4" || !A) && Bt.test(C) || (A === "v6" || !A) && Qt.test(C));
15664
15639
  }
15665
15640
  class PA extends Z {
15666
15641
  _parse(A) {
@@ -15711,43 +15686,43 @@ class PA extends Z {
15711
15686
  message: Q.message
15712
15687
  }), g.dirty());
15713
15688
  } else if (Q.kind === "email")
15714
- It.test(A.data) || (B = this._getOrReturnCtx(A, B), M(B, {
15689
+ At.test(A.data) || (B = this._getOrReturnCtx(A, B), M(B, {
15715
15690
  validation: "email",
15716
15691
  code: l.invalid_string,
15717
15692
  message: Q.message
15718
15693
  }), g.dirty());
15719
15694
  else if (Q.kind === "emoji")
15720
- vg || (vg = new RegExp(gt, "u")), vg.test(A.data) || (B = this._getOrReturnCtx(A, B), M(B, {
15695
+ vg || (vg = new RegExp(It, "u")), vg.test(A.data) || (B = this._getOrReturnCtx(A, B), M(B, {
15721
15696
  validation: "emoji",
15722
15697
  code: l.invalid_string,
15723
15698
  message: Q.message
15724
15699
  }), g.dirty());
15725
15700
  else if (Q.kind === "uuid")
15726
- js.test(A.data) || (B = this._getOrReturnCtx(A, B), M(B, {
15701
+ Xs.test(A.data) || (B = this._getOrReturnCtx(A, B), M(B, {
15727
15702
  validation: "uuid",
15728
15703
  code: l.invalid_string,
15729
15704
  message: Q.message
15730
15705
  }), g.dirty());
15731
15706
  else if (Q.kind === "nanoid")
15732
- zs.test(A.data) || (B = this._getOrReturnCtx(A, B), M(B, {
15707
+ js.test(A.data) || (B = this._getOrReturnCtx(A, B), M(B, {
15733
15708
  validation: "nanoid",
15734
15709
  code: l.invalid_string,
15735
15710
  message: Q.message
15736
15711
  }), g.dirty());
15737
15712
  else if (Q.kind === "cuid")
15738
- Os.test(A.data) || (B = this._getOrReturnCtx(A, B), M(B, {
15713
+ Vs.test(A.data) || (B = this._getOrReturnCtx(A, B), M(B, {
15739
15714
  validation: "cuid",
15740
15715
  code: l.invalid_string,
15741
15716
  message: Q.message
15742
15717
  }), g.dirty());
15743
15718
  else if (Q.kind === "cuid2")
15744
- _s.test(A.data) || (B = this._getOrReturnCtx(A, B), M(B, {
15719
+ Os.test(A.data) || (B = this._getOrReturnCtx(A, B), M(B, {
15745
15720
  validation: "cuid2",
15746
15721
  code: l.invalid_string,
15747
15722
  message: Q.message
15748
15723
  }), g.dirty());
15749
15724
  else if (Q.kind === "ulid")
15750
- Xs.test(A.data) || (B = this._getOrReturnCtx(A, B), M(B, {
15725
+ _s.test(A.data) || (B = this._getOrReturnCtx(A, B), M(B, {
15751
15726
  validation: "ulid",
15752
15727
  code: l.invalid_string,
15753
15728
  message: Q.message
@@ -15778,39 +15753,39 @@ class PA extends Z {
15778
15753
  code: l.invalid_string,
15779
15754
  validation: { endsWith: Q.value },
15780
15755
  message: Q.message
15781
- }), g.dirty()) : Q.kind === "datetime" ? at(Q).test(A.data) || (B = this._getOrReturnCtx(A, B), M(B, {
15756
+ }), g.dirty()) : Q.kind === "datetime" ? tt(Q).test(A.data) || (B = this._getOrReturnCtx(A, B), M(B, {
15782
15757
  code: l.invalid_string,
15783
15758
  validation: "datetime",
15784
15759
  message: Q.message
15785
- }), g.dirty()) : Q.kind === "date" ? st.test(A.data) || (B = this._getOrReturnCtx(A, B), M(B, {
15760
+ }), g.dirty()) : Q.kind === "date" ? ot.test(A.data) || (B = this._getOrReturnCtx(A, B), M(B, {
15786
15761
  code: l.invalid_string,
15787
15762
  validation: "date",
15788
15763
  message: Q.message
15789
- }), g.dirty()) : Q.kind === "time" ? tt(Q).test(A.data) || (B = this._getOrReturnCtx(A, B), M(B, {
15764
+ }), g.dirty()) : Q.kind === "time" ? st(Q).test(A.data) || (B = this._getOrReturnCtx(A, B), M(B, {
15790
15765
  code: l.invalid_string,
15791
15766
  validation: "time",
15792
15767
  message: Q.message
15793
- }), g.dirty()) : Q.kind === "duration" ? At.test(A.data) || (B = this._getOrReturnCtx(A, B), M(B, {
15768
+ }), g.dirty()) : Q.kind === "duration" ? $s.test(A.data) || (B = this._getOrReturnCtx(A, B), M(B, {
15794
15769
  validation: "duration",
15795
15770
  code: l.invalid_string,
15796
15771
  message: Q.message
15797
- }), g.dirty()) : Q.kind === "ip" ? et(A.data, Q.version) || (B = this._getOrReturnCtx(A, B), M(B, {
15772
+ }), g.dirty()) : Q.kind === "ip" ? at(A.data, Q.version) || (B = this._getOrReturnCtx(A, B), M(B, {
15798
15773
  validation: "ip",
15799
15774
  code: l.invalid_string,
15800
15775
  message: Q.message
15801
- }), g.dirty()) : Q.kind === "jwt" ? nt(A.data, Q.alg) || (B = this._getOrReturnCtx(A, B), M(B, {
15776
+ }), g.dirty()) : Q.kind === "jwt" ? et(A.data, Q.alg) || (B = this._getOrReturnCtx(A, B), M(B, {
15802
15777
  validation: "jwt",
15803
15778
  code: l.invalid_string,
15804
15779
  message: Q.message
15805
- }), g.dirty()) : Q.kind === "cidr" ? rt(A.data, Q.version) || (B = this._getOrReturnCtx(A, B), M(B, {
15780
+ }), g.dirty()) : Q.kind === "cidr" ? nt(A.data, Q.version) || (B = this._getOrReturnCtx(A, B), M(B, {
15806
15781
  validation: "cidr",
15807
15782
  code: l.invalid_string,
15808
15783
  message: Q.message
15809
- }), g.dirty()) : Q.kind === "base64" ? it.test(A.data) || (B = this._getOrReturnCtx(A, B), M(B, {
15784
+ }), g.dirty()) : Q.kind === "base64" ? Et.test(A.data) || (B = this._getOrReturnCtx(A, B), M(B, {
15810
15785
  validation: "base64",
15811
15786
  code: l.invalid_string,
15812
15787
  message: Q.message
15813
- }), g.dirty()) : Q.kind === "base64url" ? ot.test(A.data) || (B = this._getOrReturnCtx(A, B), M(B, {
15788
+ }), g.dirty()) : Q.kind === "base64url" ? it.test(A.data) || (B = this._getOrReturnCtx(A, B), M(B, {
15814
15789
  validation: "base64url",
15815
15790
  code: l.invalid_string,
15816
15791
  message: Q.message
@@ -16045,7 +16020,7 @@ PA.create = (C) => new PA({
16045
16020
  coerce: C?.coerce ?? !1,
16046
16021
  ...b(C)
16047
16022
  });
16048
- function Dt(C, A) {
16023
+ function rt(C, A) {
16049
16024
  const I = (C.toString().split(".")[1] || "").length, g = (A.toString().split(".")[1] || "").length, B = I > g ? I : g, Q = Number.parseInt(C.toFixed(B).replace(".", "")), E = Number.parseInt(A.toFixed(B).replace(".", ""));
16050
16025
  return Q % E / 10 ** B;
16051
16026
  }
@@ -16084,7 +16059,7 @@ class yI extends Z {
16084
16059
  inclusive: Q.inclusive,
16085
16060
  exact: !1,
16086
16061
  message: Q.message
16087
- }), B.dirty()) : Q.kind === "multipleOf" ? Dt(A.data, Q.value) !== 0 && (g = this._getOrReturnCtx(A, g), M(g, {
16062
+ }), B.dirty()) : Q.kind === "multipleOf" ? rt(A.data, Q.value) !== 0 && (g = this._getOrReturnCtx(A, g), M(g, {
16088
16063
  code: l.not_multiple_of,
16089
16064
  multipleOf: Q.value,
16090
16065
  message: Q.message
@@ -17580,7 +17555,7 @@ BQ.create = (C) => new BQ({
17580
17555
  typeName: x.ZodNaN,
17581
17556
  ...b(C)
17582
17557
  });
17583
- class ht extends Z {
17558
+ class Dt extends Z {
17584
17559
  _parse(A) {
17585
17560
  const { ctx: I } = this._processInputParams(A), g = I.data;
17586
17561
  return this._def.type._parse({
@@ -17661,7 +17636,7 @@ const yA = tB.create, eI = cI.create;
17661
17636
  wg.create;
17662
17637
  XA.create;
17663
17638
  GI.create;
17664
- const yt = q({
17639
+ const ht = q({
17665
17640
  /**The multiscale datasets for this image*/
17666
17641
  multiscales: X(
17667
17642
  q({
@@ -17789,7 +17764,7 @@ const yt = q({
17789
17764
  projection: j().optional()
17790
17765
  }).optional()
17791
17766
  }).optional()
17792
- }).describe("JSON from OME-NGFF .zattrs"), ct = q({
17767
+ }).describe("JSON from OME-NGFF .zattrs"), yt = q({
17793
17768
  plate: q({
17794
17769
  /**The acquisitions for this plate*/
17795
17770
  acquisitions: X(
@@ -17848,7 +17823,7 @@ const yt = q({
17848
17823
  })
17849
17824
  ).min(1).describe("The wells of the plate")
17850
17825
  }).optional()
17851
- }).describe("JSON from OME-NGFF .zattrs"), wt = q({
17826
+ }).describe("JSON from OME-NGFF .zattrs"), ct = q({
17852
17827
  well: q({
17853
17828
  /**The fields of view for this well*/
17854
17829
  images: X(
@@ -17862,7 +17837,7 @@ const yt = q({
17862
17837
  /**The version of the specification*/
17863
17838
  version: yA("0.4").describe("The version of the specification").optional()
17864
17839
  }).optional()
17865
- }).describe("JSON from OME-NGFF .zattrs"), Gt = q({
17840
+ }).describe("JSON from OME-NGFF .zattrs"), wt = q({
17866
17841
  /**The versioned OME-Zarr Metadata namespace*/
17867
17842
  ome: q({
17868
17843
  /**The multiscale datasets for this image*/
@@ -17992,7 +17967,7 @@ const yt = q({
17992
17967
  /**The version of the OME-Zarr Metadata*/
17993
17968
  version: yA("0.5").describe("The version of the OME-Zarr Metadata")
17994
17969
  }).describe("The versioned OME-Zarr Metadata namespace")
17995
- }).describe("The zarr.json attributes key"), Ft = q({
17970
+ }).describe("The zarr.json attributes key"), Gt = q({
17996
17971
  /**The versioned OME-Zarr Metadata namespace*/
17997
17972
  ome: q({
17998
17973
  plate: q({
@@ -18054,7 +18029,7 @@ const yt = q({
18054
18029
  /**The version of the OME-Zarr Metadata*/
18055
18030
  version: yA("0.5").describe("The version of the OME-Zarr Metadata")
18056
18031
  }).describe("The versioned OME-Zarr Metadata namespace")
18057
- }).describe("The zarr.json attributes key"), St = q({
18032
+ }).describe("The zarr.json attributes key"), Ft = q({
18058
18033
  /**The versioned OME-Zarr Metadata namespace*/
18059
18034
  ome: q({
18060
18035
  well: q({
@@ -18073,15 +18048,15 @@ const yt = q({
18073
18048
  /**The version of the OME-Zarr Metadata*/
18074
18049
  version: yA("0.5").describe("The version of the OME-Zarr Metadata")
18075
18050
  }).describe("The versioned OME-Zarr Metadata namespace")
18076
- }).describe("JSON from OME-Zarr zarr.json"), Nt = ["0.4", "0.5"], Rt = new Set(Nt);
18077
- function kt(C) {
18051
+ }).describe("JSON from OME-Zarr zarr.json"), St = ["0.4", "0.5"], Nt = new Set(St);
18052
+ function Rt(C) {
18078
18053
  if (!("ome" in C) || !(C.ome instanceof Object)) return;
18079
18054
  const A = C.ome;
18080
- if ("version" in A && typeof A.version == "string" && Rt.has(A.version))
18055
+ if ("version" in A && typeof A.version == "string" && Nt.has(A.version))
18081
18056
  return A.version;
18082
18057
  }
18083
18058
  function _B(C) {
18084
- const A = kt(C);
18059
+ const A = Rt(C);
18085
18060
  return A === void 0 ? "0.4" : A;
18086
18061
  }
18087
18062
  function FI(C) {
@@ -18097,10 +18072,10 @@ function QE(C, A) {
18097
18072
  const I = { ...C };
18098
18073
  return delete I[A], I;
18099
18074
  }
18100
- async function ta(C, A) {
18075
+ async function sa(C, A) {
18101
18076
  const I = new WI(C), g = new lA(I), B = FI(A), Q = await VI(g, B);
18102
18077
  try {
18103
- return Ut(Q.attrs);
18078
+ return kt(Q.attrs);
18104
18079
  } catch {
18105
18080
  throw Error(
18106
18081
  `Failed to parse OME-Zarr plate:
@@ -18108,21 +18083,21 @@ ${JSON.stringify(Q.attrs)}`
18108
18083
  );
18109
18084
  }
18110
18085
  }
18111
- function Ut(C) {
18086
+ function kt(C) {
18112
18087
  switch (_B(C)) {
18113
18088
  case "0.5":
18114
18089
  return {
18115
- ...Ft.parse(C).ome,
18090
+ ...Gt.parse(C).ome,
18116
18091
  originalVersion: "0.5"
18117
18092
  };
18118
18093
  case "0.4":
18119
18094
  return {
18120
- ...dt(ct.parse(C)).ome,
18095
+ ...Ut(yt.parse(C)).ome,
18121
18096
  originalVersion: "0.4"
18122
18097
  };
18123
18098
  }
18124
18099
  }
18125
- function dt(C) {
18100
+ function Ut(C) {
18126
18101
  if (C.plate === void 0)
18127
18102
  throw new Error("Plate metadata is missing in OME-Zarr v0.4 plate");
18128
18103
  return {
@@ -18132,7 +18107,7 @@ function dt(C) {
18132
18107
  }
18133
18108
  };
18134
18109
  }
18135
- function lt(C) {
18110
+ function dt(C) {
18136
18111
  if (C.well === void 0)
18137
18112
  throw new Error("Well metadata is missing in OME-Zarr v0.4 well");
18138
18113
  return {
@@ -18142,24 +18117,24 @@ function lt(C) {
18142
18117
  }
18143
18118
  };
18144
18119
  }
18145
- function Lt(C) {
18120
+ function lt(C) {
18146
18121
  switch (_B(C)) {
18147
18122
  case "0.5":
18148
18123
  return {
18149
- ...St.parse(C).ome,
18124
+ ...Ft.parse(C).ome,
18150
18125
  originalVersion: "0.5"
18151
18126
  };
18152
18127
  case "0.4":
18153
18128
  return {
18154
- ...lt(wt.parse(C)).ome,
18129
+ ...dt(ct.parse(C)).ome,
18155
18130
  originalVersion: "0.4"
18156
18131
  };
18157
18132
  }
18158
18133
  }
18159
- async function aa(C, A, I) {
18134
+ async function ta(C, A, I) {
18160
18135
  const g = C + "/" + A, B = new WI(g), Q = new lA(B), E = FI(I), i = await VI(Q, E);
18161
18136
  try {
18162
- return Lt(i.attrs);
18137
+ return lt(i.attrs);
18163
18138
  } catch {
18164
18139
  throw Error(
18165
18140
  `Failed to parse OME-Zarr well:
@@ -18167,15 +18142,15 @@ ${JSON.stringify(i.attrs)}`
18167
18142
  );
18168
18143
  }
18169
18144
  }
18170
- async function ea(C) {
18145
+ async function aa(C) {
18171
18146
  const A = FI(C.version), I = await VI(C.location, A);
18172
18147
  return XB(I.attrs).omero?.channels ?? [];
18173
18148
  }
18174
- async function na(C) {
18149
+ async function ea(C) {
18175
18150
  const A = FI(C.version), I = await VI(C.location, A);
18176
18151
  return XB(I.attrs).omero?.rdefs;
18177
18152
  }
18178
- function Jt(C) {
18153
+ function Lt(C) {
18179
18154
  return {
18180
18155
  ome: {
18181
18156
  multiscales: C.multiscales,
@@ -18184,23 +18159,23 @@ function Jt(C) {
18184
18159
  }
18185
18160
  };
18186
18161
  }
18187
- function Yt(C) {
18162
+ function Jt(C) {
18188
18163
  switch (_B(C)) {
18189
18164
  case "0.5":
18190
18165
  return {
18191
- ...Gt.parse(C).ome,
18166
+ ...wt.parse(C).ome,
18192
18167
  originalVersion: "0.5"
18193
18168
  };
18194
18169
  case "0.4":
18195
18170
  return {
18196
- ...Jt(yt.parse(C)).ome,
18171
+ ...Lt(ht.parse(C)).ome,
18197
18172
  originalVersion: "0.4"
18198
18173
  };
18199
18174
  }
18200
18175
  }
18201
18176
  function XB(C) {
18202
18177
  try {
18203
- return Yt(C);
18178
+ return Jt(C);
18204
18179
  } catch {
18205
18180
  throw Error(`Failed to parse OME-Zarr image:
18206
18181
  ${JSON.stringify(C)}`);
@@ -18224,15 +18199,15 @@ class rB {
18224
18199
  throw new Error("No datasets found in the multiscale image.");
18225
18200
  A || (A = FI(g.originalVersion));
18226
18201
  const E = Q.datasets.map(
18227
- (t) => Ls(this.location, t.path, A)
18202
+ (t) => ls(this.location, t.path, A)
18228
18203
  ), i = await Promise.all(
18229
- E.map((t) => ls(t))
18204
+ E.map((t) => ds(t))
18230
18205
  ), o = i[0].shape, s = Q.axes;
18231
18206
  if (s.length !== o.length)
18232
18207
  throw new Error(
18233
18208
  `Mismatch between number of axes (${s.length}) and array shape (${o.length})`
18234
18209
  );
18235
- return new bs({
18210
+ return new xs({
18236
18211
  metadata: Q,
18237
18212
  arrays: i,
18238
18213
  arrayParams: E
@@ -18336,7 +18311,7 @@ class Ug {
18336
18311
  return {};
18337
18312
  }
18338
18313
  }
18339
- class Mt extends NI {
18314
+ class Yt extends NI {
18340
18315
  // this creates the geometry for a screen-space projected line
18341
18316
  // each point on the input path is split into two vertices
18342
18317
  // these are pushed in opposite directions in screen-space to create width
@@ -18385,7 +18360,7 @@ class Mt extends NI {
18385
18360
  return I;
18386
18361
  }
18387
18362
  }
18388
- class ft extends NI {
18363
+ class Mt extends NI {
18389
18364
  constructor(A) {
18390
18365
  if (super(), A.primitive != "triangles") {
18391
18366
  H.warn("WireframeGeometry", "Only indexed geometries are supported");
@@ -18410,8 +18385,8 @@ class ft extends NI {
18410
18385
  this.indexData_ = new Uint32Array(g);
18411
18386
  }
18412
18387
  }
18413
- const Kt = P(0, 1, 0);
18414
- class ut {
18388
+ const ft = P(0, 1, 0);
18389
+ class Kt {
18415
18390
  dirty_ = !0;
18416
18391
  matrix_ = FA();
18417
18392
  rotation_ = Xg();
@@ -18443,7 +18418,7 @@ class ut {
18443
18418
  }
18444
18419
  targetTo(A) {
18445
18420
  wB(this.translation_, A) && (A = bA(A), A[2] += AA);
18446
- const I = mE(FA(), this.translation_, A, Kt), g = YE(rQ(), I);
18421
+ const I = mE(FA(), this.translation_, A, ft), g = YE(rQ(), I);
18447
18422
  hQ(this.rotation_, g), GB(this.rotation_, this.rotation_), this.dirty_ = !0;
18448
18423
  }
18449
18424
  get scale() {
@@ -18470,7 +18445,7 @@ class dI extends hB {
18470
18445
  depthTest = !0;
18471
18446
  textures_ = [];
18472
18447
  staleTextures_ = [];
18473
- transform_ = new ut();
18448
+ transform_ = new Kt();
18474
18449
  geometry_ = new NI();
18475
18450
  wireframeGeometry_ = null;
18476
18451
  programName_ = null;
@@ -18487,7 +18462,7 @@ class dI extends hB {
18487
18462
  return this.geometry_;
18488
18463
  }
18489
18464
  get wireframeGeometry() {
18490
- return this.wireframeGeometry_ ??= new ft(this.geometry), this.wireframeGeometry_;
18465
+ return this.wireframeGeometry_ ??= new Mt(this.geometry), this.wireframeGeometry_;
18491
18466
  }
18492
18467
  get textures() {
18493
18468
  return this.textures_;
@@ -18522,7 +18497,7 @@ class dI extends hB {
18522
18497
  return {};
18523
18498
  }
18524
18499
  }
18525
- class Ht extends dI {
18500
+ class ut extends dI {
18526
18501
  color_;
18527
18502
  width_;
18528
18503
  constructor({ geometry: A, color: I, width: g }) {
@@ -18550,7 +18525,7 @@ class Ht extends dI {
18550
18525
  };
18551
18526
  }
18552
18527
  }
18553
- class ra extends Ug {
18528
+ class na extends Ug {
18554
18529
  type = "AxesLayer";
18555
18530
  constructor(A) {
18556
18531
  super();
@@ -18579,8 +18554,8 @@ class ra extends Ug {
18579
18554
  }
18580
18555
  }
18581
18556
  function Zg(C) {
18582
- const { end: A, width: I, color: g } = C, B = new Mt([[0, 0, 0], A]);
18583
- return new Ht({
18557
+ const { end: A, width: I, color: g } = C, B = new Yt([[0, 0, 0], A]);
18558
+ return new ut({
18584
18559
  geometry: B,
18585
18560
  color: g,
18586
18561
  width: I
@@ -18588,7 +18563,7 @@ function Zg(C) {
18588
18563
  }
18589
18564
  const CQ = 32;
18590
18565
  function TI(C, { visible: A, color: I, contrastLimits: g, opacity: B }) {
18591
- return A ??= !0, I = I === void 0 ? $.WHITE : $.from(I), B = B === void 0 ? 1 : TA(B, 0, 1), C !== null ? g = qt(g, C) : g === void 0 && (H.debug(
18566
+ return A ??= !0, I = I === void 0 ? $.WHITE : $.from(I), B = B === void 0 ? 1 : TA(B, 0, 1), C !== null ? g = Ht(g, C) : g === void 0 && (H.debug(
18592
18567
  "Channel",
18593
18568
  "No texture provided, defaulting channel contrast limits to [0, 1]."
18594
18569
  ), g = [0, 1]), {
@@ -18609,7 +18584,7 @@ function EE(C, A) {
18609
18584
  `channelProps length (${C.length}) must match source channel count (${A}).`
18610
18585
  );
18611
18586
  }
18612
- function qt(C, A) {
18587
+ function Ht(C, A) {
18613
18588
  if (C === void 0)
18614
18589
  return ci(A);
18615
18590
  if (C[1] <= C[0])
@@ -18649,10 +18624,10 @@ class iE extends NI {
18649
18624
  });
18650
18625
  }
18651
18626
  }
18652
- class pt extends dI {
18627
+ class qt extends dI {
18653
18628
  channels_;
18654
18629
  constructor(A, I, g, B = []) {
18655
- super(), this.geometry = new iE(A, I, 1, 1), this.setTexture(0, g), this.channels_ = DB(g, B), this.programName = mt(g);
18630
+ super(), this.geometry = new iE(A, I, 1, 1), this.setTexture(0, g), this.channels_ = DB(g, B), this.programName = pt(g);
18656
18631
  }
18657
18632
  get type() {
18658
18633
  return "ImageRenderable";
@@ -18681,7 +18656,7 @@ class pt extends dI {
18681
18656
  };
18682
18657
  }
18683
18658
  }
18684
- function mt(C) {
18659
+ function pt(C) {
18685
18660
  switch (C.dataType) {
18686
18661
  case "byte":
18687
18662
  case "int":
@@ -18916,7 +18891,7 @@ class sE extends Ug {
18916
18891
  return this.channelProps_ ? [this.channelProps_[A.chunkIndex.c] ?? {}] : [{}];
18917
18892
  }
18918
18893
  createImage(A) {
18919
- const I = new pt(
18894
+ const I = new qt(
18920
18895
  A.shape.x,
18921
18896
  A.shape.y,
18922
18897
  SI.createWithChunk(A, this.getDataForImage(A)),
@@ -19006,7 +18981,7 @@ function Gg(C) {
19006
18981
  `align${C.rowAlignmentBytes}`
19007
18982
  ].join(":");
19008
18983
  }
19009
- class xt extends NI {
18984
+ class mt extends NI {
19010
18985
  constructor(A, I, g, B, Q, E) {
19011
18986
  super();
19012
18987
  const i = [], o = [], s = Math.floor(B), t = Math.floor(Q), a = Math.floor(E);
@@ -19106,13 +19081,13 @@ class uI extends FB {
19106
19081
  return g.unpackAlignment = A.rowAlignmentBytes, g;
19107
19082
  }
19108
19083
  }
19109
- class bt extends dI {
19084
+ class xt extends dI {
19110
19085
  voxelScale = P(1, 1, 1);
19111
19086
  channels_;
19112
19087
  channelToTextureIndex_ = /* @__PURE__ */ new Map();
19113
19088
  loadedChannels_ = /* @__PURE__ */ new Set();
19114
19089
  constructor() {
19115
- super(), this.geometry = new xt(1, 1, 1, 1, 1, 1), this.cullFaceMode = "front", this.depthTest = !1, this.channels_ = [];
19090
+ super(), this.geometry = new mt(1, 1, 1, 1, 1, 1), this.cullFaceMode = "front", this.depthTest = !1, this.channels_ = [];
19116
19091
  }
19117
19092
  get type() {
19118
19093
  return "VolumeRenderable";
@@ -19124,7 +19099,7 @@ class bt extends dI {
19124
19099
  addChannelTexture(A, I) {
19125
19100
  const g = uI.createWithChunk(I), B = this.textures.length;
19126
19101
  this.setTexture(B, g), this.channelToTextureIndex_.set(A, B);
19127
- const Q = Tt(g.dataType);
19102
+ const Q = bt(g.dataType);
19128
19103
  if (this.programName && this.programName !== Q)
19129
19104
  throw new Error(
19130
19105
  `Volume renderable does not support multiple channels with different data types. Existing program: ${this.programName}, new channel data type: ${g.dataType} and program: ${Q}`
@@ -19213,7 +19188,7 @@ class bt extends dI {
19213
19188
  this.channels_[A] = B;
19214
19189
  }
19215
19190
  }
19216
- function Tt(C) {
19191
+ function bt(C) {
19217
19192
  switch (C) {
19218
19193
  case "byte":
19219
19194
  case "int":
@@ -19227,7 +19202,7 @@ function Tt(C) {
19227
19202
  return "floatVolume";
19228
19203
  }
19229
19204
  }
19230
- function Wt(C, A) {
19205
+ function Tt(C, A) {
19231
19206
  const I = A.position, g = EA(), B = EA();
19232
19207
  return C.sort((Q, E) => {
19233
19208
  HI(g, Q.boundingBox.max, Q.boundingBox.min), qI(g, g, 0.5), HI(B, E.boundingBox.max, E.boundingBox.min), qI(B, B, 0.5);
@@ -19235,8 +19210,8 @@ function Wt(C, A) {
19235
19210
  return i - o;
19236
19211
  }), C;
19237
19212
  }
19238
- const vt = 2;
19239
- class Da extends Ug {
19213
+ const Wt = 2;
19214
+ class ra extends Ug {
19240
19215
  type = "VolumeLayer";
19241
19216
  source_;
19242
19217
  sliceCoords_;
@@ -19305,7 +19280,7 @@ class Da extends Ug {
19305
19280
  for (const E of I) g.updateVolumeWithChunk(E);
19306
19281
  return g;
19307
19282
  }
19308
- const B = Vt(I[0]), Q = this.pool_.acquire(B) ?? new bt();
19283
+ const B = Pt(I[0]), Q = this.pool_.acquire(B) ?? new xt();
19309
19284
  Q.setChannelProps(this.channelProps_ ?? []), this.volumeToPoolKey_.set(Q, B);
19310
19285
  for (const E of I) Q.updateVolumeWithChunk(E);
19311
19286
  return this.updateVolumeTransform(Q, I[0]), Q;
@@ -19328,7 +19303,7 @@ class Da extends Ug {
19328
19303
  }
19329
19304
  updateChunks() {
19330
19305
  if (!this.chunkStoreView_) return;
19331
- const A = this.chunkStoreView_.getChunksToRender(), I = this.sliceCoords_.t ?? -1, g = Pt(A);
19306
+ const A = this.chunkStoreView_.getChunksToRender(), I = this.sliceCoords_.t ?? -1, g = Zt(A);
19332
19307
  if (this.lastLoadedTime_ !== I || g.size !== this.currentVolumes_.size || this.lastNumRenderedChannelChunks_ !== A.length) {
19333
19308
  for (const [Q, E] of this.currentVolumes_)
19334
19309
  g.has(Q) || (this.releaseAndRemoveVolume(E), this.currentVolumes_.delete(Q));
@@ -19372,7 +19347,7 @@ class Da extends Ug {
19372
19347
  A.viewport
19373
19348
  );
19374
19349
  const I = A.viewport.cameraControls?.isMoving ?? !1;
19375
- this.interactiveStepSizeScale_ = I ? vt : 1, this.updateChunks(), Wt(this.objects, A.viewport.camera);
19350
+ this.interactiveStepSizeScale_ = I ? Wt : 1, this.updateChunks(), Tt(this.objects, A.viewport.camera);
19376
19351
  }
19377
19352
  getUniforms() {
19378
19353
  return {
@@ -19383,47 +19358,47 @@ class Da extends Ug {
19383
19358
  };
19384
19359
  }
19385
19360
  }
19386
- function Zt(C) {
19361
+ function vt(C) {
19387
19362
  const { x: A, y: I, z: g, t: B } = C.chunkIndex;
19388
19363
  return `${A}:${I}:${g}:${B}`;
19389
19364
  }
19390
- function Pt(C) {
19365
+ function Zt(C) {
19391
19366
  const A = /* @__PURE__ */ new Map();
19392
19367
  for (const I of C) {
19393
- const g = Zt(I);
19368
+ const g = vt(I);
19394
19369
  let B = A.get(g);
19395
19370
  B || (B = [], A.set(g, B)), B.push(I);
19396
19371
  }
19397
19372
  return A;
19398
19373
  }
19399
- function Vt(C) {
19374
+ function Pt(C) {
19400
19375
  return [
19401
19376
  `lod${C.lod}`,
19402
19377
  `shape${C.shape.x}x${C.shape.y}x${C.shape.z}`,
19403
19378
  `align${C.rowAlignmentBytes}`
19404
19379
  ].join(":");
19405
19380
  }
19406
- const Ot = /* @__PURE__ */ new Set([
19381
+ const Vt = /* @__PURE__ */ new Set([
19407
19382
  "unsigned_byte",
19408
19383
  "unsigned_short",
19409
19384
  "unsigned_int"
19410
19385
  ]);
19411
- function _t(C) {
19386
+ function Ot(C) {
19412
19387
  if (C.dataFormat !== "scalar")
19413
19388
  throw new Error(
19414
19389
  `Image data format must be scalar, instead found: ${C.dataFormat}`
19415
19390
  );
19416
- if (!Ot.has(C.dataType))
19391
+ if (!Vt.has(C.dataType))
19417
19392
  throw new Error(
19418
19393
  `Image data type must be unsigned, instead found: ${C.dataType}`
19419
19394
  );
19420
19395
  return C;
19421
19396
  }
19422
- class Xt extends dI {
19397
+ class _t extends dI {
19423
19398
  outlineSelected_;
19424
19399
  selectedValue_;
19425
19400
  constructor(A) {
19426
- super(), this.geometry = new iE(A.width, A.height, 1, 1), this.setTexture(0, _t(A.imageData));
19401
+ super(), this.geometry = new iE(A.width, A.height, 1, 1), this.setTexture(0, Ot(A.imageData));
19427
19402
  const I = this.makeColorCycleTexture(A.colorMap.cycle);
19428
19403
  this.setTexture(1, I);
19429
19404
  const g = this.makeColorLookupTableTexture(
@@ -19461,7 +19436,7 @@ class Xt extends dI {
19461
19436
  return Q.set(I, 0), Q.set(g, B), new SI(Q, B, 2);
19462
19437
  }
19463
19438
  }
19464
- const jt = [
19439
+ const Xt = [
19465
19440
  [1, 0.5, 0.5],
19466
19441
  [0.5, 1, 0.5],
19467
19442
  [0.5, 0.5, 1],
@@ -19469,7 +19444,7 @@ const jt = [
19469
19444
  [1, 0.5, 1],
19470
19445
  [1, 1, 0.5]
19471
19446
  ];
19472
- function zt(C) {
19447
+ function jt(C) {
19473
19448
  return C = C ?? /* @__PURE__ */ new Map(), new Map(
19474
19449
  Array.from(C.entries()).map(([A, I]) => [
19475
19450
  A,
@@ -19477,14 +19452,14 @@ function zt(C) {
19477
19452
  ])
19478
19453
  );
19479
19454
  }
19480
- function $t(C) {
19481
- return C = C ?? jt, C.map($.from);
19455
+ function zt(C) {
19456
+ return C = C ?? Xt, C.map($.from);
19482
19457
  }
19483
19458
  class QQ {
19484
19459
  lookupTable;
19485
19460
  cycle;
19486
19461
  constructor(A = {}) {
19487
- this.lookupTable = zt(A.lookupTable), this.cycle = $t(A.cycle);
19462
+ this.lookupTable = jt(A.lookupTable), this.cycle = zt(A.cycle);
19488
19463
  }
19489
19464
  }
19490
19465
  class tE extends Ug {
@@ -19651,7 +19626,7 @@ class tE extends Ug {
19651
19626
  return g ? (g.textures[0].updateWithChunk(A, this.getDataForLabel(A)), this.updateLabelChunk(g, A), g.setColorMap(this.colorMap_), g.setSelectedValue(this.selectedValue_), g) : this.createLabel(A);
19652
19627
  }
19653
19628
  createLabel(A) {
19654
- const I = new Xt({
19629
+ const I = new _t({
19655
19630
  width: A.shape.x,
19656
19631
  height: A.shape.y,
19657
19632
  imageData: SI.createWithChunk(A, this.getDataForLabel(A)),
@@ -19679,7 +19654,7 @@ class tE extends Ug {
19679
19654
  }
19680
19655
  }
19681
19656
  }
19682
- class ha extends dI {
19657
+ class Da extends dI {
19683
19658
  atlas_;
19684
19659
  constructor(A, I) {
19685
19660
  super(), this.programName = "points", this.atlas_ = I, A.forEach((Q) => {
@@ -19738,8 +19713,8 @@ class EQ {
19738
19713
  );
19739
19714
  }
19740
19715
  }
19741
- const Pg = -1, iQ = 0, Aa = 1, oQ = 9e-3, Ia = 1e-3, ga = 9e-4, Ba = 0.5, Ca = 60;
19742
- class ya {
19716
+ const Pg = -1, iQ = 0, $t = 1, oQ = 9e-3, Aa = 1e-3, Ia = 9e-4, ga = 0.5, Ba = 60;
19717
+ class ha {
19743
19718
  camera_;
19744
19719
  orbitVelocity_ = new EQ(0, 0, 0);
19745
19720
  panVelocity_ = EA();
@@ -19753,7 +19728,7 @@ class ya {
19753
19728
  I?.yaw ?? 0,
19754
19729
  I?.pitch ?? 0
19755
19730
  ), I?.target && Og(this.currCenter_, I.target), this.dampingFactor_ = TA(
19756
- I?.dampingFactor ?? Ba,
19731
+ I?.dampingFactor ?? ga,
19757
19732
  0,
19758
19733
  1
19759
19734
  ), this.updateCamera();
@@ -19784,7 +19759,7 @@ class ya {
19784
19759
  this.currPos_.phi += this.orbitVelocity_.phi, this.currPos_.theta += this.orbitVelocity_.theta, this.currPos_.radius += this.orbitVelocity_.radius * this.currPos_.radius, HI(this.currCenter_, this.currCenter_, this.panVelocity_);
19785
19760
  const I = Math.PI / 2 - AA;
19786
19761
  this.currPos_.theta = TA(this.currPos_.theta, -I, I), this.currPos_.radius = Math.max(0.01, this.currPos_.radius), this.updateCamera();
19787
- const g = Math.pow(1 - this.dampingFactor_, A * Ca);
19762
+ const g = Math.pow(1 - this.dampingFactor_, A * Ba);
19788
19763
  this.orbitVelocity_.phi *= g, this.orbitVelocity_.theta *= g, this.orbitVelocity_.radius *= g, qI(this.panVelocity_, this.panVelocity_, g), this.cutoffLowVelocity();
19789
19764
  }
19790
19765
  onPointerDown(A) {
@@ -19793,7 +19768,7 @@ class ya {
19793
19768
  }
19794
19769
  onPointerMove(A) {
19795
19770
  if (this.currMouseButton_ == Pg) return;
19796
- const I = A.event, g = I.movementX ?? 0, B = I.movementY ?? 0, Q = this.currMouseButton_ === iQ && !I.shiftKey, E = this.currMouseButton_ === iQ && I.shiftKey || this.currMouseButton_ === Aa;
19771
+ const I = A.event, g = I.movementX ?? 0, B = I.movementY ?? 0, Q = this.currMouseButton_ === iQ && !I.shiftKey, E = this.currMouseButton_ === iQ && I.shiftKey || this.currMouseButton_ === $t;
19797
19772
  Q && this.orbit(g, B), E && this.pan(g, B);
19798
19773
  }
19799
19774
  onWheel(A) {
@@ -19811,11 +19786,11 @@ class ya {
19811
19786
  this.orbitVelocity_.phi -= A * oQ, this.orbitVelocity_.theta += I * oQ;
19812
19787
  }
19813
19788
  pan(A, I) {
19814
- const g = this.currPos_.radius * Ia, B = EA();
19789
+ const g = this.currPos_.radius * Aa, B = EA();
19815
19790
  QC(B, B, this.camera_.right, A), QC(B, B, this.camera_.up, I), qI(B, B, g), _g(this.panVelocity_, this.panVelocity_, B);
19816
19791
  }
19817
19792
  zoom(A) {
19818
- this.orbitVelocity_.radius += A * ga;
19793
+ this.orbitVelocity_.radius += A * Ia;
19819
19794
  }
19820
19795
  updateCamera() {
19821
19796
  const A = HI(EA(), this.currCenter_, this.currPos_.toVec3());
@@ -19845,7 +19820,7 @@ class sI {
19845
19820
  }
19846
19821
  }
19847
19822
  }
19848
- class Qa {
19823
+ class Ca {
19849
19824
  planes_;
19850
19825
  constructor(A) {
19851
19826
  this.planes_ = [
@@ -19913,7 +19888,7 @@ class aE extends dI {
19913
19888
  return P(A[4], A[5], A[6]);
19914
19889
  }
19915
19890
  get frustum() {
19916
- return new Qa(
19891
+ return new Ca(
19917
19892
  OA(FA(), this.projectionMatrix, this.viewMatrix)
19918
19893
  );
19919
19894
  }
@@ -19942,7 +19917,7 @@ class aE extends dI {
19942
19917
  }
19943
19918
  }
19944
19919
  const eE = 1.77, sQ = 128, tQ = 128 / eE;
19945
- class ca extends aE {
19920
+ class ya extends aE {
19946
19921
  // width_ and height_ should always be defined by constructor (see setFrame)
19947
19922
  width_ = sQ;
19948
19923
  height_ = tQ;
@@ -19998,7 +19973,7 @@ class ca extends aE {
19998
19973
  }
19999
19974
  }
20000
19975
  const aQ = 0;
20001
- class wa {
19976
+ class ca {
20002
19977
  camera_;
20003
19978
  dragActive_ = !1;
20004
19979
  dragStart_ = EA();
@@ -20050,14 +20025,14 @@ class wa {
20050
20025
  !this.dragActive_ || I.button !== aQ || (this.dragActive_ = !1, I.target?.releasePointerCapture?.(I.pointerId));
20051
20026
  }
20052
20027
  }
20053
- const Ea = 60, ia = 1.77, gg = 0.1, Vg = 180 - gg;
20054
- class Ga extends aE {
20028
+ const Qa = 60, Ea = 1.77, gg = 0.1, Vg = 180 - gg;
20029
+ class wa extends aE {
20055
20030
  fov_;
20056
20031
  aspectRatio_;
20057
20032
  constructor(A = {}) {
20058
20033
  const {
20059
- fov: I = Ea,
20060
- aspectRatio: g = ia,
20034
+ fov: I = Qa,
20035
+ aspectRatio: g = Ea,
20061
20036
  near: B = 0.1,
20062
20037
  far: Q = 1e4,
20063
20038
  position: E = P(0, 0, 0)
@@ -20100,7 +20075,7 @@ const nE = [
20100
20075
  "prefetchSpace"
20101
20076
  ];
20102
20077
  function zB(C) {
20103
- oa(C);
20078
+ ia(C);
20104
20079
  const A = {
20105
20080
  x: C.prefetch.x,
20106
20081
  y: C.prefetch.y,
@@ -20127,7 +20102,7 @@ function zB(C) {
20127
20102
  };
20128
20103
  return Object.freeze(B);
20129
20104
  }
20130
- function Fa(C = {}) {
20105
+ function Ga(C = {}) {
20131
20106
  return zB($B({
20132
20107
  profile: "exploration",
20133
20108
  prefetch: { x: 1, y: 1, z: 1, t: 0 },
@@ -20140,7 +20115,7 @@ function Fa(C = {}) {
20140
20115
  ]
20141
20116
  }, C));
20142
20117
  }
20143
- function Sa(C = {}) {
20118
+ function Fa(C = {}) {
20144
20119
  return zB($B({
20145
20120
  profile: "playback",
20146
20121
  prefetch: { x: 0, y: 0, z: 0, t: 20 },
@@ -20153,7 +20128,7 @@ function Sa(C = {}) {
20153
20128
  ]
20154
20129
  }, C));
20155
20130
  }
20156
- function Na(C = {}) {
20131
+ function Sa(C = {}) {
20157
20132
  return zB($B({
20158
20133
  profile: "no-prefetch",
20159
20134
  prefetch: { x: 0, y: 0, z: 0, t: 0 },
@@ -20166,7 +20141,7 @@ function Na(C = {}) {
20166
20141
  ]
20167
20142
  }, C));
20168
20143
  }
20169
- function oa(C) {
20144
+ function ia(C) {
20170
20145
  for (const [g, B] of Object.entries(C.prefetch))
20171
20146
  if (B !== void 0 && B < 0)
20172
20147
  throw new Error(`prefetch.${g} must be a non-negative number`);
@@ -20234,32 +20209,32 @@ class rE extends FB {
20234
20209
  }
20235
20210
  }
20236
20211
  export {
20237
- ra as AxesLayer,
20212
+ na as AxesLayer,
20238
20213
  $ as Color,
20239
20214
  vQ as Idetik,
20240
20215
  sE as ImageLayer,
20241
- pt as ImageRenderable,
20216
+ qt as ImageRenderable,
20242
20217
  QQ as LabelColorMap,
20243
- Xt as LabelImageRenderable,
20218
+ _t as LabelImageRenderable,
20244
20219
  tE as LabelLayer,
20245
20220
  Ug as Layer,
20246
20221
  rB as OmeZarrImageSource,
20247
- ya as OrbitControls,
20248
- ca as OrthographicCamera,
20249
- wa as PanZoomControls,
20250
- Ga as PerspectiveCamera,
20251
- ha as Points,
20252
- Ht as ProjectedLine,
20222
+ ha as OrbitControls,
20223
+ ya as OrthographicCamera,
20224
+ ca as PanZoomControls,
20225
+ wa as PerspectiveCamera,
20226
+ Da as Points,
20227
+ ut as ProjectedLine,
20253
20228
  rE as Texture2DArray,
20254
- Da as VolumeLayer,
20255
- bt as VolumeRenderable,
20256
- Fa as createExplorationPolicy,
20229
+ ra as VolumeLayer,
20230
+ xt as VolumeRenderable,
20231
+ Ga as createExplorationPolicy,
20257
20232
  zB as createImageSourcePolicy,
20258
- Na as createNoPrefetchPolicy,
20259
- Sa as createPlaybackPolicy,
20260
- ta as loadOmeZarrPlate,
20261
- aa as loadOmeZarrWell,
20262
- ea as loadOmeroChannels,
20263
- na as loadOmeroDefaults
20233
+ Sa as createNoPrefetchPolicy,
20234
+ Fa as createPlaybackPolicy,
20235
+ sa as loadOmeZarrPlate,
20236
+ ta as loadOmeZarrWell,
20237
+ aa as loadOmeroChannels,
20238
+ ea as loadOmeroDefaults
20264
20239
  };
20265
20240
  //# sourceMappingURL=index.js.map