@idetik/core 0.45.4 → 0.45.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +249 -206
- package/dist/index.js +292 -276
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +19 -19
- package/dist/index.umd.cjs.map +1 -1
- package/dist/types/src/core/stats.d.ts +51 -0
- package/dist/types/src/core/stats.d.ts.map +1 -0
- package/dist/types/src/idetik.d.ts +4 -31
- package/dist/types/src/idetik.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3156,7 +3156,7 @@ function Ng(g = {}) {
|
|
|
3156
3156
|
]
|
|
3157
3157
|
}, g));
|
|
3158
3158
|
}
|
|
3159
|
-
function
|
|
3159
|
+
function ko(g = {}) {
|
|
3160
3160
|
return Ug(kg({
|
|
3161
3161
|
profile: "playback",
|
|
3162
3162
|
prefetch: { x: 0, y: 0, z: 0, t: 20 },
|
|
@@ -3169,7 +3169,7 @@ function Uo(g = {}) {
|
|
|
3169
3169
|
]
|
|
3170
3170
|
}, g));
|
|
3171
3171
|
}
|
|
3172
|
-
function
|
|
3172
|
+
function Lo(g = {}) {
|
|
3173
3173
|
return Ug(kg({
|
|
3174
3174
|
profile: "no-prefetch",
|
|
3175
3175
|
prefetch: { x: 0, y: 0, z: 0, t: 0 },
|
|
@@ -4951,6 +4951,53 @@ function oE(g, A) {
|
|
|
4951
4951
|
}
|
|
4952
4952
|
g.sort((C, Q) => B.get(Q) - B.get(C));
|
|
4953
4953
|
}
|
|
4954
|
+
let aE = class {
|
|
4955
|
+
renderer_;
|
|
4956
|
+
chunkManager_;
|
|
4957
|
+
viewports_;
|
|
4958
|
+
/** @hidden */
|
|
4959
|
+
constructor(A, I, B) {
|
|
4960
|
+
this.renderer_ = A, this.chunkManager_ = I, this.viewports_ = B;
|
|
4961
|
+
}
|
|
4962
|
+
/**
|
|
4963
|
+
* CPU chunk memory shared across instances, this renderer's GPU texture
|
|
4964
|
+
* memory, and optional JS heap figures. Heap figures are not specific to
|
|
4965
|
+
* this instance. Sizes are in bytes.
|
|
4966
|
+
*/
|
|
4967
|
+
get memory() {
|
|
4968
|
+
const A = performance.memory;
|
|
4969
|
+
return {
|
|
4970
|
+
...this.chunkManager_.memoryStats,
|
|
4971
|
+
gpuTextureBytes: this.renderer_.gpuTextureBytes,
|
|
4972
|
+
gpuTextureCount: this.renderer_.gpuTextureCount,
|
|
4973
|
+
jsHeapUsedBytes: A?.usedJSHeapSize,
|
|
4974
|
+
jsHeapLimitBytes: A?.jsHeapSizeLimit
|
|
4975
|
+
};
|
|
4976
|
+
}
|
|
4977
|
+
/** Counts of queued and in-flight chunk requests for this instance. */
|
|
4978
|
+
get queue() {
|
|
4979
|
+
return this.chunkManager_.queueStats;
|
|
4980
|
+
}
|
|
4981
|
+
/**
|
|
4982
|
+
* Chunk demand and GPU residency per source, by timepoint, and loading
|
|
4983
|
+
* progress per viewport. Each read walks every view's chunk states, so poll
|
|
4984
|
+
* it at the rate you need rather than every frame.
|
|
4985
|
+
*/
|
|
4986
|
+
get chunks() {
|
|
4987
|
+
const A = [];
|
|
4988
|
+
for (const I of this.viewports_) {
|
|
4989
|
+
const B = [];
|
|
4990
|
+
for (const C of I.layers)
|
|
4991
|
+
!(C instanceof Jg) && !(C instanceof Yg) && !(C instanceof CE) || C.chunkStoreView && B.push(C.chunkStoreView);
|
|
4992
|
+
B.length !== 0 && A.push(pQ(I.id, B));
|
|
4993
|
+
}
|
|
4994
|
+
return { sources: this.chunkManager_.sourceChunkStats, viewports: A };
|
|
4995
|
+
}
|
|
4996
|
+
/** Objects reported by the renderer for the last viewport render. */
|
|
4997
|
+
get renderedObjects() {
|
|
4998
|
+
return this.renderer_.renderedObjects;
|
|
4999
|
+
}
|
|
5000
|
+
};
|
|
4954
5001
|
var ZA = function(g = 1) {
|
|
4955
5002
|
var A = 0, I = document.createElement("div");
|
|
4956
5003
|
I.style.cssText = "position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000", I.addEventListener("click", function(D) {
|
|
@@ -5003,7 +5050,7 @@ ZA.Panel = function(g, A, I, B) {
|
|
|
5003
5050
|
}
|
|
5004
5051
|
};
|
|
5005
5052
|
};
|
|
5006
|
-
function
|
|
5053
|
+
function sE({ scale: g } = { scale: 1.5 }) {
|
|
5007
5054
|
const A = new ZA(g);
|
|
5008
5055
|
return A.showPanel(
|
|
5009
5056
|
0
|
|
@@ -5017,10 +5064,10 @@ const Cg = [
|
|
|
5017
5064
|
"pointercancel",
|
|
5018
5065
|
"wheel"
|
|
5019
5066
|
];
|
|
5020
|
-
function
|
|
5067
|
+
function DE(g) {
|
|
5021
5068
|
return Cg.includes(g);
|
|
5022
5069
|
}
|
|
5023
|
-
class
|
|
5070
|
+
class hE {
|
|
5024
5071
|
propagationStopped_ = !1;
|
|
5025
5072
|
type;
|
|
5026
5073
|
event;
|
|
@@ -5037,7 +5084,7 @@ class DE {
|
|
|
5037
5084
|
this.propagationStopped_ = !0;
|
|
5038
5085
|
}
|
|
5039
5086
|
}
|
|
5040
|
-
class
|
|
5087
|
+
class tE {
|
|
5041
5088
|
listeners_ = [];
|
|
5042
5089
|
element_;
|
|
5043
5090
|
isConnected_ = !1;
|
|
@@ -5082,17 +5129,17 @@ class hE {
|
|
|
5082
5129
|
});
|
|
5083
5130
|
}
|
|
5084
5131
|
handleEvent = (A) => {
|
|
5085
|
-
if (!
|
|
5132
|
+
if (!DE(A.type)) {
|
|
5086
5133
|
k.error("EventDispatcher", `Unsupported event type ${A.type}`);
|
|
5087
5134
|
return;
|
|
5088
5135
|
}
|
|
5089
|
-
const I = new
|
|
5136
|
+
const I = new hE(A.type, A);
|
|
5090
5137
|
for (const B of this.listeners_)
|
|
5091
5138
|
if (B(I), I.propagationStopped) break;
|
|
5092
5139
|
};
|
|
5093
5140
|
}
|
|
5094
|
-
const
|
|
5095
|
-
class
|
|
5141
|
+
const yE = 1e-12;
|
|
5142
|
+
class eE {
|
|
5096
5143
|
origin;
|
|
5097
5144
|
direction;
|
|
5098
5145
|
constructor(A, I) {
|
|
@@ -5100,13 +5147,13 @@ class yE {
|
|
|
5100
5147
|
}
|
|
5101
5148
|
intersectWithPlane(A) {
|
|
5102
5149
|
const I = sI(this.direction, A.normal);
|
|
5103
|
-
if (Math.abs(I) <
|
|
5150
|
+
if (Math.abs(I) < yE)
|
|
5104
5151
|
return null;
|
|
5105
5152
|
const B = -A.signedDistanceToPoint(this.origin) / I;
|
|
5106
5153
|
return Ag(M(), this.origin, this.direction, B);
|
|
5107
5154
|
}
|
|
5108
5155
|
}
|
|
5109
|
-
class
|
|
5156
|
+
class nE {
|
|
5110
5157
|
/** The viewport's unique identifier. */
|
|
5111
5158
|
id;
|
|
5112
5159
|
/** The host element defining the viewport's area. */
|
|
@@ -5124,12 +5171,12 @@ class eE {
|
|
|
5124
5171
|
layers_ = [];
|
|
5125
5172
|
/** @hidden */
|
|
5126
5173
|
constructor(A) {
|
|
5127
|
-
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
|
|
5174
|
+
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 tE(this.element), this.events.addEventListener((I) => {
|
|
5128
5175
|
if (I.event instanceof PointerEvent || I.event instanceof WheelEvent) {
|
|
5129
5176
|
const { clientX: B, clientY: C } = I.event, Q = v(B, C);
|
|
5130
5177
|
I.clipPos = this.clientToClip(Q, 0), I.worldPos = this.camera.clipToWorld(I.clipPos);
|
|
5131
5178
|
const E = this.camera.clipToWorld(this.clientToClip(Q, -1)), i = this.camera.clipToWorld(this.clientToClip(Q, 1));
|
|
5132
|
-
I.worldRay = new
|
|
5179
|
+
I.worldRay = new eE(E, Gg(M(), i, E));
|
|
5133
5180
|
}
|
|
5134
5181
|
for (const B of this.layers_)
|
|
5135
5182
|
if (B.onEvent(I), I.propagationStopped) return;
|
|
@@ -5256,7 +5303,7 @@ function hC(g, A) {
|
|
|
5256
5303
|
}
|
|
5257
5304
|
}
|
|
5258
5305
|
}
|
|
5259
|
-
function
|
|
5306
|
+
function GE(g) {
|
|
5260
5307
|
for (let A = 0; A < g.length; A++)
|
|
5261
5308
|
hC(g[A], g.slice(0, A));
|
|
5262
5309
|
}
|
|
@@ -5270,9 +5317,9 @@ function sB(g, A, I) {
|
|
|
5270
5317
|
context: I
|
|
5271
5318
|
};
|
|
5272
5319
|
});
|
|
5273
|
-
return
|
|
5320
|
+
return GE(B), B.map((C) => new nE(C));
|
|
5274
5321
|
}
|
|
5275
|
-
class
|
|
5322
|
+
class wE {
|
|
5276
5323
|
elements_;
|
|
5277
5324
|
resizeObserver_;
|
|
5278
5325
|
mediaQuery_;
|
|
@@ -5331,12 +5378,14 @@ class GE {
|
|
|
5331
5378
|
this.elements_.splice(I, 1), this.resizeObserver_ && this.resizeObserver_.unobserve(A);
|
|
5332
5379
|
}
|
|
5333
5380
|
}
|
|
5334
|
-
const
|
|
5335
|
-
class
|
|
5381
|
+
const FE = 2048;
|
|
5382
|
+
class Yo {
|
|
5336
5383
|
/** The canvas element the renderer draws into. */
|
|
5337
5384
|
canvas;
|
|
5338
5385
|
/** The registered overlays that update once per frame in order. */
|
|
5339
5386
|
overlays;
|
|
5387
|
+
/** Memory, queue, chunk, and rendered-object statistics. */
|
|
5388
|
+
stats;
|
|
5340
5389
|
chunkManager_;
|
|
5341
5390
|
context_;
|
|
5342
5391
|
renderer_;
|
|
@@ -5352,7 +5401,7 @@ class Lo {
|
|
|
5352
5401
|
*/
|
|
5353
5402
|
constructor(A) {
|
|
5354
5403
|
this.canvas = A.canvas, this.renderer_ = new LQ(this.canvas);
|
|
5355
|
-
const B = (A.memoryLimitMB ??
|
|
5404
|
+
const B = (A.memoryLimitMB ?? FE) * 1024 * 1024;
|
|
5356
5405
|
this.chunkManager_ = new TQ(
|
|
5357
5406
|
(Q) => this.renderer_.uploadTexture(Q),
|
|
5358
5407
|
(Q) => this.renderer_.disposeTexture(Q),
|
|
@@ -5366,50 +5415,16 @@ class Lo {
|
|
|
5366
5415
|
A.viewports ?? [],
|
|
5367
5416
|
this.canvas,
|
|
5368
5417
|
this.context_
|
|
5369
|
-
), this.overlays = [...A.overlays ?? []], A.showStats && (this.stats_ =
|
|
5418
|
+
), this.overlays = [...A.overlays ?? []], this.stats = new aE(this.renderer_, this.chunkManager_, this.viewports_), A.showStats && (this.stats_ = sE());
|
|
5370
5419
|
const C = [this.canvas];
|
|
5371
5420
|
for (const Q of this.viewports_)
|
|
5372
5421
|
Q.element !== this.canvas && C.push(Q.element);
|
|
5373
|
-
this.sizeObserver_ = new
|
|
5422
|
+
this.sizeObserver_ = new wE(C, () => {
|
|
5374
5423
|
this.renderer_.updateSize(), this.renderer_.beginFrame();
|
|
5375
5424
|
for (const Q of this.viewports_)
|
|
5376
5425
|
Q.updateSize(), this.renderer_.render(Q);
|
|
5377
5426
|
});
|
|
5378
5427
|
}
|
|
5379
|
-
/** Counts of queued and in-flight chunk requests. */
|
|
5380
|
-
get chunkQueueStats() {
|
|
5381
|
-
return this.chunkManager_.queueStats;
|
|
5382
|
-
}
|
|
5383
|
-
/**
|
|
5384
|
-
* Chunk demand and GPU residency per source, by timepoint, and loading
|
|
5385
|
-
* progress per viewport. Each read walks every view's chunk states and returns a
|
|
5386
|
-
* new snapshot, so poll it at the rate you need rather than every frame.
|
|
5387
|
-
*/
|
|
5388
|
-
get chunkStats() {
|
|
5389
|
-
const A = [];
|
|
5390
|
-
for (const I of this.viewports_) {
|
|
5391
|
-
const B = [];
|
|
5392
|
-
for (const C of I.layers)
|
|
5393
|
-
!(C instanceof Jg) && !(C instanceof Yg) && !(C instanceof CE) || C.chunkStoreView && B.push(C.chunkStoreView);
|
|
5394
|
-
B.length !== 0 && A.push(pQ(I.id, B));
|
|
5395
|
-
}
|
|
5396
|
-
return { sources: this.chunkManager_.sourceChunkStats, viewports: A };
|
|
5397
|
-
}
|
|
5398
|
-
/** A snapshot of current CPU/GPU/JS heap memory usage. */
|
|
5399
|
-
get memoryStats() {
|
|
5400
|
-
const A = performance.memory;
|
|
5401
|
-
return {
|
|
5402
|
-
...this.chunkManager_.memoryStats,
|
|
5403
|
-
gpuTextureBytes: this.renderer_.gpuTextureBytes,
|
|
5404
|
-
gpuTextureCount: this.renderer_.gpuTextureCount,
|
|
5405
|
-
jsHeapUsedBytes: A?.usedJSHeapSize,
|
|
5406
|
-
jsHeapLimitBytes: A?.jsHeapSizeLimit
|
|
5407
|
-
};
|
|
5408
|
-
}
|
|
5409
|
-
/** The number of objects drawn in the last rendered frame. */
|
|
5410
|
-
get renderedObjects() {
|
|
5411
|
-
return this.renderer_.renderedObjects;
|
|
5412
|
-
}
|
|
5413
5428
|
/** The width of the rendering surface in pixels. */
|
|
5414
5429
|
get width() {
|
|
5415
5430
|
return this.renderer_.width;
|
|
@@ -5529,7 +5544,7 @@ class Lo {
|
|
|
5529
5544
|
}
|
|
5530
5545
|
}
|
|
5531
5546
|
}
|
|
5532
|
-
function
|
|
5547
|
+
function rE(g, A) {
|
|
5533
5548
|
return {
|
|
5534
5549
|
...g,
|
|
5535
5550
|
...A,
|
|
@@ -5561,7 +5576,7 @@ class _A {
|
|
|
5561
5576
|
this.url = A, this.#A = I.fetch ?? ((B) => fetch(B)), this.#I = I.overrides ?? {}, this.#g = I.useSuffixRequest ?? !1;
|
|
5562
5577
|
}
|
|
5563
5578
|
#B(A, I) {
|
|
5564
|
-
return new Request(A,
|
|
5579
|
+
return new Request(A, rE(this.#I, I));
|
|
5565
5580
|
}
|
|
5566
5581
|
async get(A, I = {}) {
|
|
5567
5582
|
let B = DB(this.url, A).href, C = this.#B(B, I), Q = await this.#A(C);
|
|
@@ -5626,7 +5641,7 @@ class X extends $A {
|
|
|
5626
5641
|
super(A, { cause: I.cause }), this.path = I.path;
|
|
5627
5642
|
}
|
|
5628
5643
|
}
|
|
5629
|
-
class
|
|
5644
|
+
class SE extends $A {
|
|
5630
5645
|
_tag = "UnknownCodecError";
|
|
5631
5646
|
name = "UnknownCodecError";
|
|
5632
5647
|
codec;
|
|
@@ -5634,7 +5649,7 @@ class rE extends $A {
|
|
|
5634
5649
|
super(`Unknown codec: ${A}`), this.codec = A;
|
|
5635
5650
|
}
|
|
5636
5651
|
}
|
|
5637
|
-
class
|
|
5652
|
+
class RE extends $A {
|
|
5638
5653
|
_tag = "CodecPipelineError";
|
|
5639
5654
|
name = "CodecPipelineError";
|
|
5640
5655
|
direction;
|
|
@@ -5823,11 +5838,11 @@ class AI {
|
|
|
5823
5838
|
yield this.get(A);
|
|
5824
5839
|
}
|
|
5825
5840
|
}
|
|
5826
|
-
function
|
|
5841
|
+
function cE() {
|
|
5827
5842
|
if (typeof SharedArrayBuffer > "u")
|
|
5828
5843
|
throw new Error("SharedArrayBuffer is not available. In browsers, this requires Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy headers to be set.");
|
|
5829
5844
|
}
|
|
5830
|
-
function
|
|
5845
|
+
function NE(g, A) {
|
|
5831
5846
|
return new SharedArrayBuffer(g);
|
|
5832
5847
|
}
|
|
5833
5848
|
function II(g) {
|
|
@@ -5881,7 +5896,7 @@ function SA(g, A) {
|
|
|
5881
5896
|
C[A[Q]] = B, B *= g[A[Q]];
|
|
5882
5897
|
return C;
|
|
5883
5898
|
}
|
|
5884
|
-
function
|
|
5899
|
+
function UE({ name: g, configuration: A }) {
|
|
5885
5900
|
if (g === "default") {
|
|
5886
5901
|
const I = A?.separator ?? "/";
|
|
5887
5902
|
return (B) => ["c", ...B].join(I);
|
|
@@ -5916,15 +5931,15 @@ function yB(g) {
|
|
|
5916
5931
|
throw new X(`Unsupported or unknown dtype: ${g}`);
|
|
5917
5932
|
return I === "|" ? { dataType: C } : { dataType: C, endian: I === "<" ? "little" : "big" };
|
|
5918
5933
|
}
|
|
5919
|
-
function
|
|
5934
|
+
function kE(g) {
|
|
5920
5935
|
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");
|
|
5921
5936
|
}
|
|
5922
|
-
function
|
|
5937
|
+
function LE(g, A = {}) {
|
|
5923
5938
|
let I = [], B = yB(g.dtype);
|
|
5924
5939
|
g.order === "F" && I.push({ name: "transpose", configuration: { order: "F" } });
|
|
5925
5940
|
for (let Q of g.filters ?? []) {
|
|
5926
5941
|
if (Q.id === "fixedscaleoffset" || Q.id === "numcodecs.fixedscaleoffset") {
|
|
5927
|
-
if (!
|
|
5942
|
+
if (!kE(Q))
|
|
5928
5943
|
throw new X(`Invalid fixedscaleoffset filter: ${JSON.stringify(Q)}`);
|
|
5929
5944
|
I.push({
|
|
5930
5945
|
name: "scale_offset",
|
|
@@ -5982,7 +5997,7 @@ function kE(g, A = {}) {
|
|
|
5982
5997
|
attributes: A
|
|
5983
5998
|
};
|
|
5984
5999
|
}
|
|
5985
|
-
function
|
|
6000
|
+
function JE(g, A = {}) {
|
|
5986
6001
|
return {
|
|
5987
6002
|
zarr_format: 3,
|
|
5988
6003
|
node_type: "group",
|
|
@@ -6004,7 +6019,7 @@ function Qg(g, A) {
|
|
|
6004
6019
|
let Q = g === "v2:object";
|
|
6005
6020
|
return A === "object" ? Q : !B && !C && !I && !Q;
|
|
6006
6021
|
}
|
|
6007
|
-
function
|
|
6022
|
+
function YE(g) {
|
|
6008
6023
|
return g?.name === "sharding_indexed";
|
|
6009
6024
|
}
|
|
6010
6025
|
function yC(g) {
|
|
@@ -6045,8 +6060,8 @@ async function nC(g, { format: A, signal: I }) {
|
|
|
6045
6060
|
throw I?.throwIfAborted(), new Error(`Failed to decode ${A}`);
|
|
6046
6061
|
}
|
|
6047
6062
|
}
|
|
6048
|
-
const eB =
|
|
6049
|
-
function
|
|
6063
|
+
const eB = dE();
|
|
6064
|
+
function dE() {
|
|
6050
6065
|
const g = new Uint32Array([305419896]);
|
|
6051
6066
|
return new Uint8Array(g.buffer, g.byteOffset, g.byteLength)[0] !== 18;
|
|
6052
6067
|
}
|
|
@@ -6098,7 +6113,7 @@ function wI(g) {
|
|
|
6098
6113
|
function Eg(g) {
|
|
6099
6114
|
return g === "int64" || g === "uint64";
|
|
6100
6115
|
}
|
|
6101
|
-
function
|
|
6116
|
+
function ME(g, A) {
|
|
6102
6117
|
const I = BigInt(g), B = new ArrayBuffer(A), C = new DataView(B);
|
|
6103
6118
|
if (A === 2) {
|
|
6104
6119
|
if (typeof C.getFloat16 != "function")
|
|
@@ -6120,7 +6135,7 @@ function FI(g, A) {
|
|
|
6120
6135
|
}
|
|
6121
6136
|
if (!wI(g))
|
|
6122
6137
|
throw new X(`String-encoded scalar "${A}" is not valid for non-float data type "${g}"`);
|
|
6123
|
-
return A in GB ? GB[A] :
|
|
6138
|
+
return A in GB ? GB[A] : ME(A, GC[g]);
|
|
6124
6139
|
}
|
|
6125
6140
|
const wB = /* @__PURE__ */ new Set([
|
|
6126
6141
|
"int8",
|
|
@@ -6151,7 +6166,7 @@ function FB(g, A, I) {
|
|
|
6151
6166
|
tgt: FI(I, C)
|
|
6152
6167
|
}));
|
|
6153
6168
|
}
|
|
6154
|
-
function
|
|
6169
|
+
function KE(g, A) {
|
|
6155
6170
|
for (const I of A)
|
|
6156
6171
|
if (typeof I.src == "number" && Number.isNaN(I.src)) {
|
|
6157
6172
|
if (typeof g == "number" && Number.isNaN(g))
|
|
@@ -6159,7 +6174,7 @@ function ME(g, A) {
|
|
|
6159
6174
|
} else if (g === I.src)
|
|
6160
6175
|
return I.tgt;
|
|
6161
6176
|
}
|
|
6162
|
-
function
|
|
6177
|
+
function HE(g) {
|
|
6163
6178
|
if (!Number.isFinite(g))
|
|
6164
6179
|
return g;
|
|
6165
6180
|
if (Math.abs(g - Math.trunc(g)) === 0.5) {
|
|
@@ -6168,13 +6183,13 @@ function KE(g) {
|
|
|
6168
6183
|
}
|
|
6169
6184
|
return Math.round(g);
|
|
6170
6185
|
}
|
|
6171
|
-
function
|
|
6186
|
+
function qE(g) {
|
|
6172
6187
|
return Math.sign(g) * Math.floor(Math.abs(g) + 0.5);
|
|
6173
6188
|
}
|
|
6174
6189
|
function rB(g) {
|
|
6175
6190
|
switch (g) {
|
|
6176
6191
|
case "nearest-even":
|
|
6177
|
-
return
|
|
6192
|
+
return HE;
|
|
6178
6193
|
case "towards-zero":
|
|
6179
6194
|
return Math.trunc;
|
|
6180
6195
|
case "towards-positive":
|
|
@@ -6182,7 +6197,7 @@ function rB(g) {
|
|
|
6182
6197
|
case "towards-negative":
|
|
6183
6198
|
return Math.floor;
|
|
6184
6199
|
case "nearest-away":
|
|
6185
|
-
return
|
|
6200
|
+
return qE;
|
|
6186
6201
|
}
|
|
6187
6202
|
}
|
|
6188
6203
|
function PI(g, A, I) {
|
|
@@ -6284,7 +6299,7 @@ function SB(g, A, I, B, C) {
|
|
|
6284
6299
|
else
|
|
6285
6300
|
throw new Error(`Unhandled type combination: ${g} -> ${A}`);
|
|
6286
6301
|
return C.length === 0 ? a : (D) => {
|
|
6287
|
-
const h =
|
|
6302
|
+
const h = KE(D, C);
|
|
6288
6303
|
return h !== void 0 ? h : a(D);
|
|
6289
6304
|
};
|
|
6290
6305
|
}
|
|
@@ -6301,7 +6316,7 @@ class qg {
|
|
|
6301
6316
|
return A + 4;
|
|
6302
6317
|
}
|
|
6303
6318
|
}
|
|
6304
|
-
const
|
|
6319
|
+
const lE = /* @__PURE__ */ new Set([
|
|
6305
6320
|
"int8",
|
|
6306
6321
|
"uint8",
|
|
6307
6322
|
"int16",
|
|
@@ -6334,7 +6349,7 @@ class lg {
|
|
|
6334
6349
|
this.#A = A;
|
|
6335
6350
|
}
|
|
6336
6351
|
static fromConfig(A, I) {
|
|
6337
|
-
if (!
|
|
6352
|
+
if (!lE.has(I.dataType))
|
|
6338
6353
|
throw new X(`Delta codec does not support data type: ${I.dataType}`);
|
|
6339
6354
|
return new lg(mA(I.dataType));
|
|
6340
6355
|
}
|
|
@@ -6366,10 +6381,10 @@ class fg {
|
|
|
6366
6381
|
return new Uint8Array(I);
|
|
6367
6382
|
}
|
|
6368
6383
|
}
|
|
6369
|
-
function
|
|
6384
|
+
function fE(g, A) {
|
|
6370
6385
|
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;
|
|
6371
6386
|
}
|
|
6372
|
-
function
|
|
6387
|
+
function pE(g, A) {
|
|
6373
6388
|
return A instanceof Object && !Array.isArray(A) ? Object.keys(A).sort().reduce((I, B) => (I[B] = A[B], I), {}) : A;
|
|
6374
6389
|
}
|
|
6375
6390
|
class rI {
|
|
@@ -6399,7 +6414,7 @@ class rI {
|
|
|
6399
6414
|
const { indent: I, encoding: B, ensure_ascii: C, check_circular: Q, allow_nan: E, sort_keys: i } = this.#A;
|
|
6400
6415
|
IA(B === "utf-8", "JsonCodec does not yet support non-utf-8 encoding.");
|
|
6401
6416
|
const o = [];
|
|
6402
|
-
IA(Q, "JsonCodec does not yet support skipping the check for circular references during encoding."), E || o.push(
|
|
6417
|
+
IA(Q, "JsonCodec does not yet support skipping the check for circular references during encoding."), E || o.push(fE), i && o.push(pE);
|
|
6403
6418
|
const a = Array.from(A.data);
|
|
6404
6419
|
a.push("|O"), a.push(A.shape);
|
|
6405
6420
|
let s;
|
|
@@ -6424,7 +6439,7 @@ class rI {
|
|
|
6424
6439
|
return { data: B, shape: C, stride: Q };
|
|
6425
6440
|
}
|
|
6426
6441
|
}
|
|
6427
|
-
const
|
|
6442
|
+
const uE = /* @__PURE__ */ new Set([
|
|
6428
6443
|
"int8",
|
|
6429
6444
|
"uint8",
|
|
6430
6445
|
"int16",
|
|
@@ -6446,7 +6461,7 @@ class pg {
|
|
|
6446
6461
|
this.#I = A, this.#g = I, this.#A = B;
|
|
6447
6462
|
}
|
|
6448
6463
|
static fromConfig(A, I) {
|
|
6449
|
-
if (!
|
|
6464
|
+
if (!uE.has(I.dataType))
|
|
6450
6465
|
throw new X(`scale_offset codec does not support data type: ${I.dataType}`);
|
|
6451
6466
|
return new pg(FI(I.dataType, A.scale ?? 1), FI(I.dataType, A.offset ?? 0), mA(I.dataType));
|
|
6452
6467
|
}
|
|
@@ -6472,20 +6487,20 @@ class ug {
|
|
|
6472
6487
|
return new ug(A, I);
|
|
6473
6488
|
}
|
|
6474
6489
|
encode(A) {
|
|
6475
|
-
return
|
|
6490
|
+
return mE(A, this.#A);
|
|
6476
6491
|
}
|
|
6477
6492
|
decode(A) {
|
|
6478
|
-
return
|
|
6493
|
+
return TE(A, this.#A);
|
|
6479
6494
|
}
|
|
6480
6495
|
}
|
|
6481
|
-
function
|
|
6496
|
+
function mE(g, A) {
|
|
6482
6497
|
let I = g.length, B = Math.floor(I / A), C = new Uint8Array(I);
|
|
6483
6498
|
for (let Q = 0; Q < A; Q++)
|
|
6484
6499
|
for (let E = 0; E < B; E++)
|
|
6485
6500
|
C[Q * B + E] = g[E * A + Q];
|
|
6486
6501
|
return C;
|
|
6487
6502
|
}
|
|
6488
|
-
function
|
|
6503
|
+
function TE(g, A) {
|
|
6489
6504
|
let I = g.length, B = Math.floor(I / A), C = new Uint8Array(I);
|
|
6490
6505
|
for (let Q = 0; Q < A; Q++)
|
|
6491
6506
|
for (let E = 0; E < B; E++)
|
|
@@ -6502,7 +6517,7 @@ function cB(g) {
|
|
|
6502
6517
|
}
|
|
6503
6518
|
}) : g;
|
|
6504
6519
|
}
|
|
6505
|
-
function
|
|
6520
|
+
function xE(g, A) {
|
|
6506
6521
|
let I;
|
|
6507
6522
|
return g.data instanceof Kg || g.data instanceof AI ? I = new g.constructor(
|
|
6508
6523
|
// @ts-expect-error
|
|
@@ -6514,8 +6529,8 @@ function TE(g, A) {
|
|
|
6514
6529
|
stride: SA(g.shape, A)
|
|
6515
6530
|
};
|
|
6516
6531
|
}
|
|
6517
|
-
function
|
|
6518
|
-
let I =
|
|
6532
|
+
function WE(g, A) {
|
|
6533
|
+
let I = xE(g, A), B = g.shape.length, C = g.data.length, Q = Array(B).fill(0), E = cB(g.data), i = cB(I.data);
|
|
6519
6534
|
for (let o = 0; o < C; o++) {
|
|
6520
6535
|
let a = 0;
|
|
6521
6536
|
for (let s = 0; s < B; s++)
|
|
@@ -6530,12 +6545,12 @@ function xE(g, A) {
|
|
|
6530
6545
|
}
|
|
6531
6546
|
return I;
|
|
6532
6547
|
}
|
|
6533
|
-
function
|
|
6548
|
+
function bE(g) {
|
|
6534
6549
|
let A = g.shape.length;
|
|
6535
6550
|
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);
|
|
6536
6551
|
}
|
|
6537
|
-
function
|
|
6538
|
-
let I =
|
|
6552
|
+
function ZE(g, A) {
|
|
6553
|
+
let I = bE(g);
|
|
6539
6554
|
return IA(I.length === A.length, "Orders must match"), I.every((B, C) => B === A[C]);
|
|
6540
6555
|
}
|
|
6541
6556
|
class mg {
|
|
@@ -6560,7 +6575,7 @@ class mg {
|
|
|
6560
6575
|
return new mg(A, I);
|
|
6561
6576
|
}
|
|
6562
6577
|
encode(A) {
|
|
6563
|
-
return
|
|
6578
|
+
return ZE(A, this.#I) ? A : WE(A, this.#I);
|
|
6564
6579
|
}
|
|
6565
6580
|
decode(A) {
|
|
6566
6581
|
return {
|
|
@@ -6601,21 +6616,21 @@ class Tg {
|
|
|
6601
6616
|
return new Uint8Array(I);
|
|
6602
6617
|
}
|
|
6603
6618
|
}
|
|
6604
|
-
function
|
|
6619
|
+
function PE() {
|
|
6605
6620
|
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 = () => fg, C = () => Tg;
|
|
6606
6621
|
return (/* @__PURE__ */ new Map()).set("blosc", g).set("lz4", A).set("zstd", I).set("gzip", B).set("zlib", C).set("transpose", () => mg).set("bytes", () => HI).set("crc32c", () => qg).set("vlen-utf8", () => SI).set("json2", () => rI).set("bitround", () => GI).set("cast_value", () => Hg).set("scale_offset", () => pg).set("numcodecs.blosc", g).set("numcodecs.lz4", A).set("numcodecs.zstd", I).set("numcodecs.gzip", B).set("numcodecs.zlib", C).set("numcodecs.vlen-utf8", () => SI).set("numcodecs.shuffle", () => ug).set("numcodecs.delta", () => lg).set("numcodecs.bitround", () => GI).set("numcodecs.json2", () => rI);
|
|
6607
6622
|
}
|
|
6608
|
-
const
|
|
6623
|
+
const OE = PE();
|
|
6609
6624
|
function ig(g) {
|
|
6610
6625
|
let A;
|
|
6611
6626
|
function I() {
|
|
6612
|
-
return A || (A =
|
|
6627
|
+
return A || (A = VE(g)), A;
|
|
6613
6628
|
}
|
|
6614
6629
|
async function B(C, Q, E) {
|
|
6615
6630
|
try {
|
|
6616
6631
|
return await E();
|
|
6617
6632
|
} catch (i) {
|
|
6618
|
-
throw new
|
|
6633
|
+
throw new RE({ direction: C, codec: Q, cause: i });
|
|
6619
6634
|
}
|
|
6620
6635
|
}
|
|
6621
6636
|
return {
|
|
@@ -6654,11 +6669,11 @@ function NB(g, A, I) {
|
|
|
6654
6669
|
throw new X(`Codec "${g}" cannot compute its encoded size; it is not a fixed-size codec and cannot be used in a sharding index pipeline`);
|
|
6655
6670
|
return A.computeEncodedSize(I);
|
|
6656
6671
|
}
|
|
6657
|
-
async function
|
|
6672
|
+
async function VE(g) {
|
|
6658
6673
|
let A = g.codecs.map(async (E) => {
|
|
6659
|
-
let i = await
|
|
6674
|
+
let i = await OE.get(E.name)?.();
|
|
6660
6675
|
if (!i)
|
|
6661
|
-
throw new
|
|
6676
|
+
throw new SE(E.name);
|
|
6662
6677
|
return { Codec: i, meta: E };
|
|
6663
6678
|
}), I = [], B, C = [], Q = { ...g };
|
|
6664
6679
|
for await (let { Codec: E, meta: i } of A) {
|
|
@@ -6684,7 +6699,7 @@ async function OE(g) {
|
|
|
6684
6699
|
}
|
|
6685
6700
|
}
|
|
6686
6701
|
if (!B) {
|
|
6687
|
-
if (!
|
|
6702
|
+
if (!vE(Q))
|
|
6688
6703
|
throw new X(`Cannot encode ${Q.dataType} to bytes without a codec`);
|
|
6689
6704
|
B = {
|
|
6690
6705
|
name: "bytes",
|
|
@@ -6697,11 +6712,11 @@ async function OE(g) {
|
|
|
6697
6712
|
bytesToBytes: C
|
|
6698
6713
|
};
|
|
6699
6714
|
}
|
|
6700
|
-
function
|
|
6715
|
+
function vE(g) {
|
|
6701
6716
|
return g.dataType !== "v2:object" && g.dataType !== "string";
|
|
6702
6717
|
}
|
|
6703
6718
|
const UB = 18446744073709551615n;
|
|
6704
|
-
function
|
|
6719
|
+
function XE(g, A, I, B) {
|
|
6705
6720
|
if (!g.store.getRange)
|
|
6706
6721
|
throw new dg("sharding requires a store with getRange");
|
|
6707
6722
|
let C = g.store.getRange.bind(g.store), Q = A.map((a, s) => a / B.chunk_shape[s]), E = ig({
|
|
@@ -6754,9 +6769,9 @@ function kB(g) {
|
|
|
6754
6769
|
return g.find((I) => I.name === "transpose")?.configuration?.order ?? "C";
|
|
6755
6770
|
}
|
|
6756
6771
|
const CI = Symbol("zarrita.context");
|
|
6757
|
-
function
|
|
6758
|
-
let { configuration: I } = A.codecs.find(
|
|
6759
|
-
encodeChunkKey:
|
|
6772
|
+
function jE(g, A) {
|
|
6773
|
+
let { configuration: I } = A.codecs.find(YE) ?? {}, B = {
|
|
6774
|
+
encodeChunkKey: UE(A.chunk_key_encoding),
|
|
6760
6775
|
TypedArray: mA(A.data_type),
|
|
6761
6776
|
fillValue: A.fill_value
|
|
6762
6777
|
};
|
|
@@ -6775,7 +6790,7 @@ function XE(g, A) {
|
|
|
6775
6790
|
getStrides(E) {
|
|
6776
6791
|
return SA(E, Q);
|
|
6777
6792
|
},
|
|
6778
|
-
getChunkBytes:
|
|
6793
|
+
getChunkBytes: XE(g, A.chunk_grid.configuration.chunk_shape, B.encodeChunkKey, I)
|
|
6779
6794
|
};
|
|
6780
6795
|
}
|
|
6781
6796
|
let C = kB(A.codecs);
|
|
@@ -6806,7 +6821,7 @@ let RI = class extends CA {
|
|
|
6806
6821
|
super(A, I), this.#A = {
|
|
6807
6822
|
...B,
|
|
6808
6823
|
fill_value: yC(B)
|
|
6809
|
-
}, this[CI] =
|
|
6824
|
+
}, this[CI] = jE(this, this.#A);
|
|
6810
6825
|
}
|
|
6811
6826
|
get attrs() {
|
|
6812
6827
|
return this.#A.attributes;
|
|
@@ -6827,7 +6842,7 @@ let RI = class extends CA {
|
|
|
6827
6842
|
return this.#A.data_type;
|
|
6828
6843
|
}
|
|
6829
6844
|
async getChunk(A, I, B) {
|
|
6830
|
-
B?.useSharedArrayBuffer &&
|
|
6845
|
+
B?.useSharedArrayBuffer && cE();
|
|
6831
6846
|
let C = this[CI], Q = await C.getChunkBytes(A, I);
|
|
6832
6847
|
if (!Q) {
|
|
6833
6848
|
let E = C.chunkShape.reduce((o, a) => o * a, 1), i;
|
|
@@ -6836,7 +6851,7 @@ let RI = class extends CA {
|
|
|
6836
6851
|
if (!("BYTES_PER_ELEMENT" in o))
|
|
6837
6852
|
console.warn("zarrita: useSharedArrayBuffer is not supported for non-buffer-backed data types."), i = new C.TypedArray(E);
|
|
6838
6853
|
else {
|
|
6839
|
-
let a =
|
|
6854
|
+
let a = NE(E * o.BYTES_PER_ELEMENT);
|
|
6840
6855
|
i = new C.TypedArray(a, 0, E);
|
|
6841
6856
|
}
|
|
6842
6857
|
} else
|
|
@@ -6870,21 +6885,21 @@ let RI = class extends CA {
|
|
|
6870
6885
|
return Qg(this.dtype, A);
|
|
6871
6886
|
}
|
|
6872
6887
|
};
|
|
6873
|
-
function
|
|
6888
|
+
function zE(g, A) {
|
|
6874
6889
|
let I = g;
|
|
6875
6890
|
for (let B of A)
|
|
6876
6891
|
I instanceof Promise ? I = I.then((C) => B(C)) : I = B(I);
|
|
6877
6892
|
return I;
|
|
6878
6893
|
}
|
|
6879
|
-
function
|
|
6880
|
-
return
|
|
6894
|
+
function _E(g, ...A) {
|
|
6895
|
+
return zE(g, A);
|
|
6881
6896
|
}
|
|
6882
6897
|
async function wC(g) {
|
|
6883
6898
|
let A = g.store.arrayExtensions;
|
|
6884
|
-
return A?.length ? await
|
|
6899
|
+
return A?.length ? await _E(g, ...A) : g;
|
|
6885
6900
|
}
|
|
6886
|
-
let qI =
|
|
6887
|
-
function
|
|
6901
|
+
let qI = $E();
|
|
6902
|
+
function $E() {
|
|
6888
6903
|
let g = /* @__PURE__ */ new WeakMap();
|
|
6889
6904
|
function A(I) {
|
|
6890
6905
|
let B = g.get(I) ?? { v2: 0, v3: 0 };
|
|
@@ -6900,37 +6915,37 @@ function _E() {
|
|
|
6900
6915
|
}
|
|
6901
6916
|
};
|
|
6902
6917
|
}
|
|
6903
|
-
async function
|
|
6918
|
+
async function Ai(g, A) {
|
|
6904
6919
|
let I = await g.store.get(g.resolve(".zattrs").path, {
|
|
6905
6920
|
signal: A
|
|
6906
6921
|
});
|
|
6907
6922
|
return I ? II(I) : {};
|
|
6908
6923
|
}
|
|
6909
|
-
async function
|
|
6924
|
+
async function Ii(g, A = {}) {
|
|
6910
6925
|
let I = "store" in g ? g : new CA(g), { signal: B } = A, C = {};
|
|
6911
|
-
return (A.attrs ?? !0) && (C = await
|
|
6926
|
+
return (A.attrs ?? !0) && (C = await Ai(I, B)), B?.throwIfAborted(), A.kind === "array" ? LB(I, C, B) : A.kind === "group" ? JB(I, C, B) : LB(I, C, B).catch((Q) => (eC(Q, uA, X), JB(I, C, B)));
|
|
6912
6927
|
}
|
|
6913
6928
|
async function LB(g, A, I) {
|
|
6914
6929
|
let { path: B } = g.resolve(".zarray"), C = await g.store.get(B, { signal: I });
|
|
6915
6930
|
if (!C)
|
|
6916
6931
|
throw new uA("v2 array", { path: B });
|
|
6917
|
-
return qI.increment(g.store, "v2"), wC(new RI(g.store, g.path,
|
|
6932
|
+
return qI.increment(g.store, "v2"), wC(new RI(g.store, g.path, LE(II(C), A)));
|
|
6918
6933
|
}
|
|
6919
6934
|
async function JB(g, A, I) {
|
|
6920
6935
|
let { path: B } = g.resolve(".zgroup"), C = await g.store.get(B, { signal: I });
|
|
6921
6936
|
if (!C)
|
|
6922
6937
|
throw new uA("v2 group", { path: B });
|
|
6923
|
-
return qI.increment(g.store, "v2"), new xg(g.store, g.path,
|
|
6938
|
+
return qI.increment(g.store, "v2"), new xg(g.store, g.path, JE(II(C), A));
|
|
6924
6939
|
}
|
|
6925
|
-
async function
|
|
6940
|
+
async function gi(g, A) {
|
|
6926
6941
|
let { store: I, path: B } = g.resolve("zarr.json"), C = await g.store.get(B, { signal: A });
|
|
6927
6942
|
if (!C)
|
|
6928
6943
|
throw new uA("v3 array or group", { path: B });
|
|
6929
6944
|
let Q = II(C);
|
|
6930
6945
|
return Q.node_type === "array" && (Q.fill_value = yC(Q)), Q.node_type === "array" ? wC(new RI(I, g.path, Q)) : new xg(I, g.path, Q);
|
|
6931
6946
|
}
|
|
6932
|
-
async function
|
|
6933
|
-
let I = "store" in g ? g : new CA(g), B = await
|
|
6947
|
+
async function Bi(g, A = {}) {
|
|
6948
|
+
let I = "store" in g ? g : new CA(g), B = await gi(I, A.signal);
|
|
6934
6949
|
if (qI.increment(I.store, "v3"), A.kind === void 0 || A.kind === "array" && B instanceof RI || A.kind === "group" && B instanceof xg)
|
|
6935
6950
|
return B;
|
|
6936
6951
|
let C = B instanceof RI ? "array" : "group";
|
|
@@ -6943,9 +6958,9 @@ async function BA(g, A = {}) {
|
|
|
6943
6958
|
let I = "store" in g ? g.store : g, B = qI.versionMax(I), C = B === "v2" ? BA.v2 : BA.v3, Q = B === "v2" ? BA.v3 : BA.v2;
|
|
6944
6959
|
return C(g, A).catch((E) => (eC(E, uA, X), Q(g, A)));
|
|
6945
6960
|
}
|
|
6946
|
-
BA.v2 =
|
|
6947
|
-
BA.v3 =
|
|
6948
|
-
async function
|
|
6961
|
+
BA.v2 = Ii;
|
|
6962
|
+
BA.v3 = Bi;
|
|
6963
|
+
async function Ci(g, A) {
|
|
6949
6964
|
const I = A.split("/"), B = I.pop();
|
|
6950
6965
|
if (!B)
|
|
6951
6966
|
throw new Error("Invalid path");
|
|
@@ -6962,7 +6977,7 @@ class Wg {
|
|
|
6962
6977
|
return this.#A;
|
|
6963
6978
|
}
|
|
6964
6979
|
async get(A) {
|
|
6965
|
-
const I = await
|
|
6980
|
+
const I = await Ci(this.#A, A.slice(1)).catch(
|
|
6966
6981
|
() => {
|
|
6967
6982
|
}
|
|
6968
6983
|
);
|
|
@@ -6991,7 +7006,7 @@ async function gI(g, A) {
|
|
|
6991
7006
|
throw new Error(`Failed to open Zarr group at ${g}`);
|
|
6992
7007
|
}
|
|
6993
7008
|
}
|
|
6994
|
-
async function
|
|
7009
|
+
async function Qi(g, A) {
|
|
6995
7010
|
if (A === "v2")
|
|
6996
7011
|
try {
|
|
6997
7012
|
return BA.v2(g, { kind: "array", attrs: !1 });
|
|
@@ -7010,7 +7025,7 @@ async function Ci(g, A) {
|
|
|
7010
7025
|
throw new Error(`Failed to open Zarr array at ${g}`);
|
|
7011
7026
|
}
|
|
7012
7027
|
}
|
|
7013
|
-
async function
|
|
7028
|
+
async function Ei(g) {
|
|
7014
7029
|
let A;
|
|
7015
7030
|
switch (g.type) {
|
|
7016
7031
|
case "fetch": {
|
|
@@ -7031,9 +7046,9 @@ async function Qi(g) {
|
|
|
7031
7046
|
}
|
|
7032
7047
|
}
|
|
7033
7048
|
const I = g.arrayPath ? A.resolve(g.arrayPath) : A;
|
|
7034
|
-
return
|
|
7049
|
+
return Qi(I, g.zarrVersion);
|
|
7035
7050
|
}
|
|
7036
|
-
function
|
|
7051
|
+
function ii(g, A, I) {
|
|
7037
7052
|
if (g.store instanceof _A)
|
|
7038
7053
|
return {
|
|
7039
7054
|
type: "fetch",
|
|
@@ -7053,10 +7068,10 @@ function Ei(g, A, I) {
|
|
|
7053
7068
|
`Unsupported store type: ${g.store.constructor.name}`
|
|
7054
7069
|
);
|
|
7055
7070
|
}
|
|
7056
|
-
function ii(g, A, I, B) {
|
|
7057
|
-
return oi(g, A, I, B);
|
|
7058
|
-
}
|
|
7059
7071
|
function oi(g, A, I, B) {
|
|
7072
|
+
return ai(g, A, I, B);
|
|
7073
|
+
}
|
|
7074
|
+
function ai(g, A, I, B) {
|
|
7060
7075
|
const { targetShape: C, chunkIndex: Q, dimIndices: E } = B;
|
|
7061
7076
|
let i = 1;
|
|
7062
7077
|
for (let r = A.length - 1; r >= 0; r--) {
|
|
@@ -10746,7 +10761,7 @@ return ret;
|
|
|
10746
10761
|
});
|
|
10747
10762
|
//# sourceMappingURL=worker_kernel-CBlE4MBI.js.map
|
|
10748
10763
|
`, YB = typeof self < "u" && self.Blob && new Blob(["URL.revokeObjectURL(import.meta.url);", FC], { type: "text/javascript;charset=utf-8" });
|
|
10749
|
-
function
|
|
10764
|
+
function si(g) {
|
|
10750
10765
|
let A;
|
|
10751
10766
|
try {
|
|
10752
10767
|
if (A = YB && (self.URL || self.webkitURL).createObjectURL(YB), !A) throw "";
|
|
@@ -10767,8 +10782,8 @@ function ai(g) {
|
|
|
10767
10782
|
);
|
|
10768
10783
|
}
|
|
10769
10784
|
}
|
|
10770
|
-
const
|
|
10771
|
-
let iA = [],
|
|
10785
|
+
const Di = Math.max(1, navigator.hardwareConcurrency - 2);
|
|
10786
|
+
let iA = [], hi = 0, rC = 0;
|
|
10772
10787
|
const RA = /* @__PURE__ */ new Map(), cI = /* @__PURE__ */ new Set();
|
|
10773
10788
|
function SC(g) {
|
|
10774
10789
|
const A = iA.find((I) => I.worker === g);
|
|
@@ -10777,7 +10792,7 @@ function SC(g) {
|
|
|
10777
10792
|
"Worker not found in pool - this should not happen"
|
|
10778
10793
|
), A;
|
|
10779
10794
|
}
|
|
10780
|
-
function
|
|
10795
|
+
function ti(g, A) {
|
|
10781
10796
|
const { id: I, success: B } = g.data, C = RA.get(I);
|
|
10782
10797
|
if (!C) {
|
|
10783
10798
|
cI.has(I) ? cI.delete(I) : k.warn(
|
|
@@ -10828,20 +10843,20 @@ function dB(g, A) {
|
|
|
10828
10843
|
}
|
|
10829
10844
|
}
|
|
10830
10845
|
function RC() {
|
|
10831
|
-
const g = new
|
|
10832
|
-
return g.addEventListener("message", (A) =>
|
|
10846
|
+
const g = new si();
|
|
10847
|
+
return g.addEventListener("message", (A) => ti(A, g)), g.addEventListener("error", (A) => dB(A, g)), g.addEventListener(
|
|
10833
10848
|
"messageerror",
|
|
10834
10849
|
(A) => dB(A, g)
|
|
10835
10850
|
), g;
|
|
10836
10851
|
}
|
|
10837
|
-
function
|
|
10852
|
+
function yi() {
|
|
10838
10853
|
if (iA.length === 0)
|
|
10839
10854
|
throw new Error("Worker pool is not initialized");
|
|
10840
10855
|
return iA.sort((g, A) => g.pendingCount - A.pendingCount)[0];
|
|
10841
10856
|
}
|
|
10842
|
-
async function
|
|
10857
|
+
async function ei(g, A, I, B) {
|
|
10843
10858
|
return new Promise((C, Q) => {
|
|
10844
|
-
const E =
|
|
10859
|
+
const E = yi(), i = hi++, o = {
|
|
10845
10860
|
resolve: C,
|
|
10846
10861
|
reject: Q,
|
|
10847
10862
|
workerId: E.workerId
|
|
@@ -10868,10 +10883,10 @@ async function yi(g, A, I, B) {
|
|
|
10868
10883
|
});
|
|
10869
10884
|
});
|
|
10870
10885
|
}
|
|
10871
|
-
function
|
|
10886
|
+
function ni() {
|
|
10872
10887
|
if (!(iA.length > 0))
|
|
10873
10888
|
try {
|
|
10874
|
-
for (let g = 0; g <
|
|
10889
|
+
for (let g = 0; g < Di; g++) {
|
|
10875
10890
|
const A = RC();
|
|
10876
10891
|
iA.push({
|
|
10877
10892
|
worker: A,
|
|
@@ -10884,14 +10899,14 @@ function ei() {
|
|
|
10884
10899
|
`Initialized worker pool with ${iA.length} workers`
|
|
10885
10900
|
);
|
|
10886
10901
|
} catch {
|
|
10887
|
-
k.warn("ZarrWorker", "Failed to create workers - clearing pool"),
|
|
10902
|
+
k.warn("ZarrWorker", "Failed to create workers - clearing pool"), wi();
|
|
10888
10903
|
return;
|
|
10889
10904
|
}
|
|
10890
10905
|
}
|
|
10891
|
-
async function
|
|
10892
|
-
|
|
10906
|
+
async function Gi(g, A, I, B, C) {
|
|
10907
|
+
ni();
|
|
10893
10908
|
try {
|
|
10894
|
-
return await
|
|
10909
|
+
return await ei(
|
|
10895
10910
|
A,
|
|
10896
10911
|
I,
|
|
10897
10912
|
B,
|
|
@@ -10906,7 +10921,7 @@ async function ni(g, A, I, B, C) {
|
|
|
10906
10921
|
throw new Error(
|
|
10907
10922
|
`Unsupported chunk data type: ${E.data.constructor.name}`
|
|
10908
10923
|
);
|
|
10909
|
-
return
|
|
10924
|
+
return oi(
|
|
10910
10925
|
E.data,
|
|
10911
10926
|
E.shape,
|
|
10912
10927
|
E.stride,
|
|
@@ -10914,19 +10929,19 @@ async function ni(g, A, I, B, C) {
|
|
|
10914
10929
|
);
|
|
10915
10930
|
}
|
|
10916
10931
|
}
|
|
10917
|
-
function
|
|
10932
|
+
function wi() {
|
|
10918
10933
|
for (const g of iA)
|
|
10919
10934
|
g.worker.terminate();
|
|
10920
10935
|
iA = [], RA.clear();
|
|
10921
10936
|
}
|
|
10922
|
-
class
|
|
10937
|
+
class Fi {
|
|
10923
10938
|
metadata_;
|
|
10924
10939
|
arrays_;
|
|
10925
10940
|
arrayParams_;
|
|
10926
10941
|
dimensions_;
|
|
10927
10942
|
bytesPerElement_;
|
|
10928
10943
|
constructor(A) {
|
|
10929
|
-
this.metadata_ = A.metadata, this.arrays_ = A.arrays, this.arrayParams_ = A.arrayParams, this.dimensions_ =
|
|
10944
|
+
this.metadata_ = A.metadata, this.arrays_ = A.arrays, this.arrayParams_ = A.arrayParams, this.dimensions_ = Si(this.metadata_, this.arrays_), this.bytesPerElement_ = ri(this.arrays_[0].dtype);
|
|
10930
10945
|
}
|
|
10931
10946
|
getSourceDimensionMap() {
|
|
10932
10947
|
return this.dimensions_;
|
|
@@ -10960,7 +10975,7 @@ class wi {
|
|
|
10960
10975
|
},
|
|
10961
10976
|
cChunkSize: E?.chunkSize,
|
|
10962
10977
|
tChunkSize: i?.chunkSize
|
|
10963
|
-
}, a = await
|
|
10978
|
+
}, a = await Gi(
|
|
10964
10979
|
C,
|
|
10965
10980
|
Q,
|
|
10966
10981
|
B,
|
|
@@ -10983,7 +10998,7 @@ const MB = {
|
|
|
10983
10998
|
uint32: 4,
|
|
10984
10999
|
float32: 4
|
|
10985
11000
|
};
|
|
10986
|
-
function
|
|
11001
|
+
function ri(g) {
|
|
10987
11002
|
const A = MB[g];
|
|
10988
11003
|
if (A === void 0)
|
|
10989
11004
|
throw new Error(
|
|
@@ -10991,7 +11006,7 @@ function Fi(g) {
|
|
|
10991
11006
|
);
|
|
10992
11007
|
return A;
|
|
10993
11008
|
}
|
|
10994
|
-
function
|
|
11009
|
+
function Si(g, A) {
|
|
10995
11010
|
const I = g.axes.map((D) => D.name), B = g.axes.length, C = KB(I, "x"), Q = KB(I, "y"), E = (D, h) => {
|
|
10996
11011
|
const t = [];
|
|
10997
11012
|
for (let e = 0; e < g.datasets.length; e++) {
|
|
@@ -11003,7 +11018,7 @@ function ri(g, A) {
|
|
|
11003
11018
|
translation: L[h]
|
|
11004
11019
|
});
|
|
11005
11020
|
}
|
|
11006
|
-
if (g.axes[h].type === "space" &&
|
|
11021
|
+
if (g.axes[h].type === "space" && ci(t))
|
|
11007
11022
|
for (const e of t) e.translation -= 0.5 * e.scale;
|
|
11008
11023
|
return {
|
|
11009
11024
|
name: D,
|
|
@@ -11022,7 +11037,7 @@ function ri(g, A) {
|
|
|
11022
11037
|
const s = iI(I, "t");
|
|
11023
11038
|
return s !== -1 && (i.t = E(I[s], s)), i;
|
|
11024
11039
|
}
|
|
11025
|
-
function
|
|
11040
|
+
function Ri(g, A) {
|
|
11026
11041
|
return g.toLowerCase() === A.toLowerCase();
|
|
11027
11042
|
}
|
|
11028
11043
|
function KB(g, A) {
|
|
@@ -11034,9 +11049,9 @@ function KB(g, A) {
|
|
|
11034
11049
|
return I;
|
|
11035
11050
|
}
|
|
11036
11051
|
function iI(g, A) {
|
|
11037
|
-
return g.findIndex((I) =>
|
|
11052
|
+
return g.findIndex((I) => Ri(I, A));
|
|
11038
11053
|
}
|
|
11039
|
-
function
|
|
11054
|
+
function ci(g) {
|
|
11040
11055
|
if (g.length <= 1) return !1;
|
|
11041
11056
|
for (let A = 1; A < g.length; A++) {
|
|
11042
11057
|
const I = 0.5 * (g[A].scale - g[A - 1].scale), B = g[A].translation - g[A - 1].translation;
|
|
@@ -11269,11 +11284,11 @@ const og = (g, A) => {
|
|
|
11269
11284
|
}
|
|
11270
11285
|
return { message: I };
|
|
11271
11286
|
};
|
|
11272
|
-
let
|
|
11273
|
-
function
|
|
11274
|
-
return
|
|
11287
|
+
let Ni = og;
|
|
11288
|
+
function Ui() {
|
|
11289
|
+
return Ni;
|
|
11275
11290
|
}
|
|
11276
|
-
const
|
|
11291
|
+
const ki = (g) => {
|
|
11277
11292
|
const { data: A, path: I, errorMaps: B, issueData: C } = g, Q = [...I, ...C.path || []], E = {
|
|
11278
11293
|
...C,
|
|
11279
11294
|
path: Q
|
|
@@ -11295,7 +11310,7 @@ const Ui = (g) => {
|
|
|
11295
11310
|
};
|
|
11296
11311
|
};
|
|
11297
11312
|
function w(g, A) {
|
|
11298
|
-
const I =
|
|
11313
|
+
const I = Ui(), B = ki({
|
|
11299
11314
|
issueData: A,
|
|
11300
11315
|
data: g.data,
|
|
11301
11316
|
path: g.path,
|
|
@@ -11577,7 +11592,7 @@ class q {
|
|
|
11577
11592
|
});
|
|
11578
11593
|
}
|
|
11579
11594
|
brand() {
|
|
11580
|
-
return new
|
|
11595
|
+
return new Xi({
|
|
11581
11596
|
typeName: d.ZodBranded,
|
|
11582
11597
|
type: this,
|
|
11583
11598
|
...K(this._def)
|
|
@@ -11612,28 +11627,28 @@ class q {
|
|
|
11612
11627
|
return this.safeParse(null).success;
|
|
11613
11628
|
}
|
|
11614
11629
|
}
|
|
11615
|
-
const
|
|
11630
|
+
const Li = /^c[^\s-]{8,}$/i, Ji = /^[0-9a-z]+$/, Yi = /^[0-9A-HJKMNP-TV-Z]{26}$/i, di = /^[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, Mi = /^[a-z0-9_-]{21}$/i, Ki = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Hi = /^[-+]?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)?)??$/, qi = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, li = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
11616
11631
|
let VI;
|
|
11617
|
-
const
|
|
11632
|
+
const fi = /^(?:(?: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])$/, pi = /^(?:(?: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])$/, ui = /^(([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]))$/, mi = /^(([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])$/, Ti = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, xi = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, cC = "((\\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])))", Wi = new RegExp(`^${cC}$`);
|
|
11618
11633
|
function NC(g) {
|
|
11619
11634
|
let A = "[0-5]\\d";
|
|
11620
11635
|
g.precision ? A = `${A}\\.\\d{${g.precision}}` : g.precision == null && (A = `${A}(\\.\\d+)?`);
|
|
11621
11636
|
const I = g.precision ? "+" : "?";
|
|
11622
11637
|
return `([01]\\d|2[0-3]):[0-5]\\d(:${A})${I}`;
|
|
11623
11638
|
}
|
|
11624
|
-
function
|
|
11639
|
+
function bi(g) {
|
|
11625
11640
|
return new RegExp(`^${NC(g)}$`);
|
|
11626
11641
|
}
|
|
11627
|
-
function
|
|
11642
|
+
function Zi(g) {
|
|
11628
11643
|
let A = `${cC}T${NC(g)}`;
|
|
11629
11644
|
const I = [];
|
|
11630
11645
|
return I.push(g.local ? "Z?" : "Z"), g.offset && I.push("([+-]\\d{2}:?\\d{2})"), A = `${A}(${I.join("|")})`, new RegExp(`^${A}$`);
|
|
11631
11646
|
}
|
|
11632
|
-
function Zi(g, A) {
|
|
11633
|
-
return !!((A === "v4" || !A) && li.test(g) || (A === "v6" || !A) && pi.test(g));
|
|
11634
|
-
}
|
|
11635
11647
|
function Pi(g, A) {
|
|
11636
|
-
|
|
11648
|
+
return !!((A === "v4" || !A) && fi.test(g) || (A === "v6" || !A) && ui.test(g));
|
|
11649
|
+
}
|
|
11650
|
+
function Oi(g, A) {
|
|
11651
|
+
if (!Ki.test(g))
|
|
11637
11652
|
return !1;
|
|
11638
11653
|
try {
|
|
11639
11654
|
const [I] = g.split(".");
|
|
@@ -11645,8 +11660,8 @@ function Pi(g, A) {
|
|
|
11645
11660
|
return !1;
|
|
11646
11661
|
}
|
|
11647
11662
|
}
|
|
11648
|
-
function
|
|
11649
|
-
return !!((A === "v4" || !A) &&
|
|
11663
|
+
function Vi(g, A) {
|
|
11664
|
+
return !!((A === "v4" || !A) && pi.test(g) || (A === "v6" || !A) && mi.test(g));
|
|
11650
11665
|
}
|
|
11651
11666
|
class eA extends q {
|
|
11652
11667
|
_parse(A) {
|
|
@@ -11697,43 +11712,43 @@ class eA extends q {
|
|
|
11697
11712
|
message: Q.message
|
|
11698
11713
|
}), B.dirty());
|
|
11699
11714
|
} else if (Q.kind === "email")
|
|
11700
|
-
|
|
11715
|
+
qi.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
|
|
11701
11716
|
validation: "email",
|
|
11702
11717
|
code: y.invalid_string,
|
|
11703
11718
|
message: Q.message
|
|
11704
11719
|
}), B.dirty());
|
|
11705
11720
|
else if (Q.kind === "emoji")
|
|
11706
|
-
VI || (VI = new RegExp(
|
|
11721
|
+
VI || (VI = new RegExp(li, "u")), VI.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
|
|
11707
11722
|
validation: "emoji",
|
|
11708
11723
|
code: y.invalid_string,
|
|
11709
11724
|
message: Q.message
|
|
11710
11725
|
}), B.dirty());
|
|
11711
11726
|
else if (Q.kind === "uuid")
|
|
11712
|
-
|
|
11727
|
+
di.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
|
|
11713
11728
|
validation: "uuid",
|
|
11714
11729
|
code: y.invalid_string,
|
|
11715
11730
|
message: Q.message
|
|
11716
11731
|
}), B.dirty());
|
|
11717
11732
|
else if (Q.kind === "nanoid")
|
|
11718
|
-
|
|
11733
|
+
Mi.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
|
|
11719
11734
|
validation: "nanoid",
|
|
11720
11735
|
code: y.invalid_string,
|
|
11721
11736
|
message: Q.message
|
|
11722
11737
|
}), B.dirty());
|
|
11723
11738
|
else if (Q.kind === "cuid")
|
|
11724
|
-
|
|
11739
|
+
Li.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
|
|
11725
11740
|
validation: "cuid",
|
|
11726
11741
|
code: y.invalid_string,
|
|
11727
11742
|
message: Q.message
|
|
11728
11743
|
}), B.dirty());
|
|
11729
11744
|
else if (Q.kind === "cuid2")
|
|
11730
|
-
|
|
11745
|
+
Ji.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
|
|
11731
11746
|
validation: "cuid2",
|
|
11732
11747
|
code: y.invalid_string,
|
|
11733
11748
|
message: Q.message
|
|
11734
11749
|
}), B.dirty());
|
|
11735
11750
|
else if (Q.kind === "ulid")
|
|
11736
|
-
|
|
11751
|
+
Yi.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
|
|
11737
11752
|
validation: "ulid",
|
|
11738
11753
|
code: y.invalid_string,
|
|
11739
11754
|
message: Q.message
|
|
@@ -11764,39 +11779,39 @@ class eA extends q {
|
|
|
11764
11779
|
code: y.invalid_string,
|
|
11765
11780
|
validation: { endsWith: Q.value },
|
|
11766
11781
|
message: Q.message
|
|
11767
|
-
}), B.dirty()) : Q.kind === "datetime" ?
|
|
11782
|
+
}), B.dirty()) : Q.kind === "datetime" ? Zi(Q).test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
|
|
11768
11783
|
code: y.invalid_string,
|
|
11769
11784
|
validation: "datetime",
|
|
11770
11785
|
message: Q.message
|
|
11771
|
-
}), B.dirty()) : Q.kind === "date" ?
|
|
11786
|
+
}), B.dirty()) : Q.kind === "date" ? Wi.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
|
|
11772
11787
|
code: y.invalid_string,
|
|
11773
11788
|
validation: "date",
|
|
11774
11789
|
message: Q.message
|
|
11775
|
-
}), B.dirty()) : Q.kind === "time" ?
|
|
11790
|
+
}), B.dirty()) : Q.kind === "time" ? bi(Q).test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
|
|
11776
11791
|
code: y.invalid_string,
|
|
11777
11792
|
validation: "time",
|
|
11778
11793
|
message: Q.message
|
|
11779
|
-
}), B.dirty()) : Q.kind === "duration" ?
|
|
11794
|
+
}), B.dirty()) : Q.kind === "duration" ? Hi.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
|
|
11780
11795
|
validation: "duration",
|
|
11781
11796
|
code: y.invalid_string,
|
|
11782
11797
|
message: Q.message
|
|
11783
|
-
}), B.dirty()) : Q.kind === "ip" ?
|
|
11798
|
+
}), B.dirty()) : Q.kind === "ip" ? Pi(A.data, Q.version) || (C = this._getOrReturnCtx(A, C), w(C, {
|
|
11784
11799
|
validation: "ip",
|
|
11785
11800
|
code: y.invalid_string,
|
|
11786
11801
|
message: Q.message
|
|
11787
|
-
}), B.dirty()) : Q.kind === "jwt" ?
|
|
11802
|
+
}), B.dirty()) : Q.kind === "jwt" ? Oi(A.data, Q.alg) || (C = this._getOrReturnCtx(A, C), w(C, {
|
|
11788
11803
|
validation: "jwt",
|
|
11789
11804
|
code: y.invalid_string,
|
|
11790
11805
|
message: Q.message
|
|
11791
|
-
}), B.dirty()) : Q.kind === "cidr" ?
|
|
11806
|
+
}), B.dirty()) : Q.kind === "cidr" ? Vi(A.data, Q.version) || (C = this._getOrReturnCtx(A, C), w(C, {
|
|
11792
11807
|
validation: "cidr",
|
|
11793
11808
|
code: y.invalid_string,
|
|
11794
11809
|
message: Q.message
|
|
11795
|
-
}), B.dirty()) : Q.kind === "base64" ?
|
|
11810
|
+
}), B.dirty()) : Q.kind === "base64" ? Ti.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
|
|
11796
11811
|
validation: "base64",
|
|
11797
11812
|
code: y.invalid_string,
|
|
11798
11813
|
message: Q.message
|
|
11799
|
-
}), B.dirty()) : Q.kind === "base64url" ?
|
|
11814
|
+
}), B.dirty()) : Q.kind === "base64url" ? xi.test(A.data) || (C = this._getOrReturnCtx(A, C), w(C, {
|
|
11800
11815
|
validation: "base64url",
|
|
11801
11816
|
code: y.invalid_string,
|
|
11802
11817
|
message: Q.message
|
|
@@ -12031,7 +12046,7 @@ eA.create = (g) => new eA({
|
|
|
12031
12046
|
coerce: g?.coerce ?? !1,
|
|
12032
12047
|
...K(g)
|
|
12033
12048
|
});
|
|
12034
|
-
function
|
|
12049
|
+
function vi(g, A) {
|
|
12035
12050
|
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(".", ""));
|
|
12036
12051
|
return Q % E / 10 ** C;
|
|
12037
12052
|
}
|
|
@@ -12070,7 +12085,7 @@ class KA extends q {
|
|
|
12070
12085
|
inclusive: Q.inclusive,
|
|
12071
12086
|
exact: !1,
|
|
12072
12087
|
message: Q.message
|
|
12073
|
-
}), C.dirty()) : Q.kind === "multipleOf" ?
|
|
12088
|
+
}), C.dirty()) : Q.kind === "multipleOf" ? vi(A.data, Q.value) !== 0 && (B = this._getOrReturnCtx(A, B), w(B, {
|
|
12074
12089
|
code: y.not_multiple_of,
|
|
12075
12090
|
multipleOf: Q.value,
|
|
12076
12091
|
message: Q.message
|
|
@@ -13566,7 +13581,7 @@ PB.create = (g) => new PB({
|
|
|
13566
13581
|
typeName: d.ZodNaN,
|
|
13567
13582
|
...K(g)
|
|
13568
13583
|
});
|
|
13569
|
-
class
|
|
13584
|
+
class Xi extends q {
|
|
13570
13585
|
_parse(A) {
|
|
13571
13586
|
const { ctx: I } = this._processInputParams(A), B = I.data;
|
|
13572
13587
|
return this._def.type._parse({
|
|
@@ -13647,7 +13662,7 @@ const _ = hg.create, LA = HA.create;
|
|
|
13647
13662
|
JI.create;
|
|
13648
13663
|
GA.create;
|
|
13649
13664
|
lA.create;
|
|
13650
|
-
const
|
|
13665
|
+
const ji = J({
|
|
13651
13666
|
/**The multiscale datasets for this image*/
|
|
13652
13667
|
multiscales: p(
|
|
13653
13668
|
J({
|
|
@@ -13775,7 +13790,7 @@ const Xi = J({
|
|
|
13775
13790
|
projection: u().optional()
|
|
13776
13791
|
}).optional()
|
|
13777
13792
|
}).optional()
|
|
13778
|
-
}).describe("JSON from OME-NGFF .zattrs"),
|
|
13793
|
+
}).describe("JSON from OME-NGFF .zattrs"), zi = J({
|
|
13779
13794
|
plate: J({
|
|
13780
13795
|
/**The acquisitions for this plate*/
|
|
13781
13796
|
acquisitions: p(
|
|
@@ -13834,7 +13849,7 @@ const Xi = J({
|
|
|
13834
13849
|
})
|
|
13835
13850
|
).min(1).describe("The wells of the plate")
|
|
13836
13851
|
}).optional()
|
|
13837
|
-
}).describe("JSON from OME-NGFF .zattrs"),
|
|
13852
|
+
}).describe("JSON from OME-NGFF .zattrs"), _i = J({
|
|
13838
13853
|
well: J({
|
|
13839
13854
|
/**The fields of view for this well*/
|
|
13840
13855
|
images: p(
|
|
@@ -13848,7 +13863,7 @@ const Xi = J({
|
|
|
13848
13863
|
/**The version of the specification*/
|
|
13849
13864
|
version: _("0.4").describe("The version of the specification").optional()
|
|
13850
13865
|
}).optional()
|
|
13851
|
-
}).describe("JSON from OME-NGFF .zattrs"),
|
|
13866
|
+
}).describe("JSON from OME-NGFF .zattrs"), $i = J({
|
|
13852
13867
|
/**The versioned OME-Zarr Metadata namespace*/
|
|
13853
13868
|
ome: J({
|
|
13854
13869
|
/**The multiscale datasets for this image*/
|
|
@@ -13978,7 +13993,7 @@ const Xi = J({
|
|
|
13978
13993
|
/**The version of the OME-Zarr Metadata*/
|
|
13979
13994
|
version: _("0.5").describe("The version of the OME-Zarr Metadata")
|
|
13980
13995
|
}).describe("The versioned OME-Zarr Metadata namespace")
|
|
13981
|
-
}).describe("The zarr.json attributes key"),
|
|
13996
|
+
}).describe("The zarr.json attributes key"), Ao = J({
|
|
13982
13997
|
/**The versioned OME-Zarr Metadata namespace*/
|
|
13983
13998
|
ome: J({
|
|
13984
13999
|
plate: J({
|
|
@@ -14040,7 +14055,7 @@ const Xi = J({
|
|
|
14040
14055
|
/**The version of the OME-Zarr Metadata*/
|
|
14041
14056
|
version: _("0.5").describe("The version of the OME-Zarr Metadata")
|
|
14042
14057
|
}).describe("The versioned OME-Zarr Metadata namespace")
|
|
14043
|
-
}).describe("The zarr.json attributes key"),
|
|
14058
|
+
}).describe("The zarr.json attributes key"), Io = J({
|
|
14044
14059
|
/**The versioned OME-Zarr Metadata namespace*/
|
|
14045
14060
|
ome: J({
|
|
14046
14061
|
well: J({
|
|
@@ -14059,15 +14074,15 @@ const Xi = J({
|
|
|
14059
14074
|
/**The version of the OME-Zarr Metadata*/
|
|
14060
14075
|
version: _("0.5").describe("The version of the OME-Zarr Metadata")
|
|
14061
14076
|
}).describe("The versioned OME-Zarr Metadata namespace")
|
|
14062
|
-
}).describe("JSON from OME-Zarr zarr.json"),
|
|
14063
|
-
function
|
|
14077
|
+
}).describe("JSON from OME-Zarr zarr.json"), go = ["0.4", "0.5"], Bo = new Set(go);
|
|
14078
|
+
function Co(g) {
|
|
14064
14079
|
if (!("ome" in g) || !(g.ome instanceof Object)) return;
|
|
14065
14080
|
const A = g.ome;
|
|
14066
|
-
if ("version" in A && typeof A.version == "string" &&
|
|
14081
|
+
if ("version" in A && typeof A.version == "string" && Bo.has(A.version))
|
|
14067
14082
|
return A.version;
|
|
14068
14083
|
}
|
|
14069
14084
|
function Zg(g) {
|
|
14070
|
-
const A =
|
|
14085
|
+
const A = Co(g);
|
|
14071
14086
|
return A === void 0 ? "0.4" : A;
|
|
14072
14087
|
}
|
|
14073
14088
|
function fA(g) {
|
|
@@ -14083,10 +14098,10 @@ function LC(g, A) {
|
|
|
14083
14098
|
const I = { ...g };
|
|
14084
14099
|
return delete I[A], I;
|
|
14085
14100
|
}
|
|
14086
|
-
async function
|
|
14101
|
+
async function Ko(g, A) {
|
|
14087
14102
|
const I = new _A(g), B = new CA(I), C = fA(A), Q = await gI(B, C);
|
|
14088
14103
|
try {
|
|
14089
|
-
return
|
|
14104
|
+
return Qo(Q.attrs);
|
|
14090
14105
|
} catch {
|
|
14091
14106
|
throw Error(
|
|
14092
14107
|
`Failed to parse OME-Zarr plate:
|
|
@@ -14094,21 +14109,21 @@ ${JSON.stringify(Q.attrs)}`
|
|
|
14094
14109
|
);
|
|
14095
14110
|
}
|
|
14096
14111
|
}
|
|
14097
|
-
function
|
|
14112
|
+
function Qo(g) {
|
|
14098
14113
|
switch (Zg(g)) {
|
|
14099
14114
|
case "0.5":
|
|
14100
14115
|
return {
|
|
14101
|
-
|
|
14116
|
+
...Ao.parse(g).ome,
|
|
14102
14117
|
originalVersion: "0.5"
|
|
14103
14118
|
};
|
|
14104
14119
|
case "0.4":
|
|
14105
14120
|
return {
|
|
14106
|
-
...
|
|
14121
|
+
...Eo(zi.parse(g)).ome,
|
|
14107
14122
|
originalVersion: "0.4"
|
|
14108
14123
|
};
|
|
14109
14124
|
}
|
|
14110
14125
|
}
|
|
14111
|
-
function
|
|
14126
|
+
function Eo(g) {
|
|
14112
14127
|
if (g.plate === void 0)
|
|
14113
14128
|
throw new Error("Plate metadata is missing in OME-Zarr v0.4 plate");
|
|
14114
14129
|
return {
|
|
@@ -14118,7 +14133,7 @@ function Qo(g) {
|
|
|
14118
14133
|
}
|
|
14119
14134
|
};
|
|
14120
14135
|
}
|
|
14121
|
-
function
|
|
14136
|
+
function io(g) {
|
|
14122
14137
|
if (g.well === void 0)
|
|
14123
14138
|
throw new Error("Well metadata is missing in OME-Zarr v0.4 well");
|
|
14124
14139
|
return {
|
|
@@ -14128,24 +14143,24 @@ function Eo(g) {
|
|
|
14128
14143
|
}
|
|
14129
14144
|
};
|
|
14130
14145
|
}
|
|
14131
|
-
function
|
|
14146
|
+
function oo(g) {
|
|
14132
14147
|
switch (Zg(g)) {
|
|
14133
14148
|
case "0.5":
|
|
14134
14149
|
return {
|
|
14135
|
-
...
|
|
14150
|
+
...Io.parse(g).ome,
|
|
14136
14151
|
originalVersion: "0.5"
|
|
14137
14152
|
};
|
|
14138
14153
|
case "0.4":
|
|
14139
14154
|
return {
|
|
14140
|
-
...
|
|
14155
|
+
...io(_i.parse(g)).ome,
|
|
14141
14156
|
originalVersion: "0.4"
|
|
14142
14157
|
};
|
|
14143
14158
|
}
|
|
14144
14159
|
}
|
|
14145
|
-
async function
|
|
14160
|
+
async function Ho(g, A, I) {
|
|
14146
14161
|
const B = g + "/" + A, C = new _A(B), Q = new CA(C), E = fA(I), i = await gI(Q, E);
|
|
14147
14162
|
try {
|
|
14148
|
-
return
|
|
14163
|
+
return oo(i.attrs);
|
|
14149
14164
|
} catch {
|
|
14150
14165
|
throw Error(
|
|
14151
14166
|
`Failed to parse OME-Zarr well:
|
|
@@ -14153,15 +14168,15 @@ ${JSON.stringify(i.attrs)}`
|
|
|
14153
14168
|
);
|
|
14154
14169
|
}
|
|
14155
14170
|
}
|
|
14156
|
-
async function
|
|
14171
|
+
async function qo(g) {
|
|
14157
14172
|
const A = fA(g.version), I = await gI(g.location, A);
|
|
14158
14173
|
return Pg(I.attrs).omero?.channels ?? [];
|
|
14159
14174
|
}
|
|
14160
|
-
async function
|
|
14175
|
+
async function lo(g) {
|
|
14161
14176
|
const A = fA(g.version), I = await gI(g.location, A);
|
|
14162
14177
|
return Pg(I.attrs).omero?.rdefs;
|
|
14163
14178
|
}
|
|
14164
|
-
function
|
|
14179
|
+
function ao(g) {
|
|
14165
14180
|
return {
|
|
14166
14181
|
ome: {
|
|
14167
14182
|
multiscales: g.multiscales,
|
|
@@ -14170,23 +14185,23 @@ function oo(g) {
|
|
|
14170
14185
|
}
|
|
14171
14186
|
};
|
|
14172
14187
|
}
|
|
14173
|
-
function
|
|
14188
|
+
function so(g) {
|
|
14174
14189
|
switch (Zg(g)) {
|
|
14175
14190
|
case "0.5":
|
|
14176
14191
|
return {
|
|
14177
|
-
|
|
14192
|
+
...$i.parse(g).ome,
|
|
14178
14193
|
originalVersion: "0.5"
|
|
14179
14194
|
};
|
|
14180
14195
|
case "0.4":
|
|
14181
14196
|
return {
|
|
14182
|
-
...
|
|
14197
|
+
...ao(ji.parse(g)).ome,
|
|
14183
14198
|
originalVersion: "0.4"
|
|
14184
14199
|
};
|
|
14185
14200
|
}
|
|
14186
14201
|
}
|
|
14187
14202
|
function Pg(g) {
|
|
14188
14203
|
try {
|
|
14189
|
-
return
|
|
14204
|
+
return so(g);
|
|
14190
14205
|
} catch {
|
|
14191
14206
|
throw Error(`Failed to parse OME-Zarr image:
|
|
14192
14207
|
${JSON.stringify(g)}`);
|
|
@@ -14213,15 +14228,15 @@ class bA {
|
|
|
14213
14228
|
throw new Error("No datasets found in the multiscale image.");
|
|
14214
14229
|
B || (B = fA(Q.originalVersion));
|
|
14215
14230
|
const o = i.datasets.map(
|
|
14216
|
-
(h) =>
|
|
14231
|
+
(h) => ii(A, h.path, B)
|
|
14217
14232
|
), a = await Promise.all(
|
|
14218
|
-
o.map((h) =>
|
|
14233
|
+
o.map((h) => Ei(h))
|
|
14219
14234
|
), s = a[0].shape, D = i.axes;
|
|
14220
14235
|
if (D.length !== s.length)
|
|
14221
14236
|
throw new Error(
|
|
14222
14237
|
`Mismatch between number of axes (${D.length}) and array shape (${s.length})`
|
|
14223
14238
|
);
|
|
14224
|
-
return new
|
|
14239
|
+
return new Fi({ metadata: i, arrays: a, arrayParams: o });
|
|
14225
14240
|
}
|
|
14226
14241
|
/**
|
|
14227
14242
|
* Returns per-axis dimension metadata for the image.
|
|
@@ -14271,7 +14286,7 @@ class bA {
|
|
|
14271
14286
|
return new bA({ location: I, version: A.version, loader: B });
|
|
14272
14287
|
}
|
|
14273
14288
|
}
|
|
14274
|
-
class
|
|
14289
|
+
class Do extends pA {
|
|
14275
14290
|
// this creates the geometry for a screen-space projected line
|
|
14276
14291
|
// each point on the input path is split into two vertices
|
|
14277
14292
|
// these are pushed in opposite directions in screen-space to create width
|
|
@@ -14320,7 +14335,7 @@ class so extends pA {
|
|
|
14320
14335
|
return I;
|
|
14321
14336
|
}
|
|
14322
14337
|
}
|
|
14323
|
-
class
|
|
14338
|
+
class ho extends zA {
|
|
14324
14339
|
color_;
|
|
14325
14340
|
width_;
|
|
14326
14341
|
/**
|
|
@@ -14359,7 +14374,7 @@ class Do extends zA {
|
|
|
14359
14374
|
};
|
|
14360
14375
|
}
|
|
14361
14376
|
}
|
|
14362
|
-
class
|
|
14377
|
+
class fo extends KI {
|
|
14363
14378
|
/** Identifies the layer type as `AxesLayer`. */
|
|
14364
14379
|
type = "AxesLayer";
|
|
14365
14380
|
/**
|
|
@@ -14395,14 +14410,14 @@ class qo extends KI {
|
|
|
14395
14410
|
}
|
|
14396
14411
|
}
|
|
14397
14412
|
function vI(g) {
|
|
14398
|
-
const { end: A, width: I, color: B } = g, C = new
|
|
14399
|
-
return new
|
|
14413
|
+
const { end: A, width: I, color: B } = g, C = new Do([[0, 0, 0], A]);
|
|
14414
|
+
return new ho({
|
|
14400
14415
|
geometry: C,
|
|
14401
14416
|
color: B,
|
|
14402
14417
|
width: I
|
|
14403
14418
|
});
|
|
14404
14419
|
}
|
|
14405
|
-
class
|
|
14420
|
+
class to extends Rg {
|
|
14406
14421
|
width_;
|
|
14407
14422
|
height_;
|
|
14408
14423
|
depth_;
|
|
@@ -14427,7 +14442,7 @@ const JC = {
|
|
|
14427
14442
|
square: 1,
|
|
14428
14443
|
triangle: 2
|
|
14429
14444
|
};
|
|
14430
|
-
class
|
|
14445
|
+
class po extends zA {
|
|
14431
14446
|
/**
|
|
14432
14447
|
* Creates a renderable drawing one marker per entry.
|
|
14433
14448
|
*
|
|
@@ -14465,7 +14480,7 @@ class lo extends zA {
|
|
|
14465
14480
|
type: "marker",
|
|
14466
14481
|
itemSize: 1,
|
|
14467
14482
|
offset: B.strideBytes
|
|
14468
|
-
}), this.geometry = B, this.setTexture(0,
|
|
14483
|
+
}), this.geometry = B, this.setTexture(0, yo());
|
|
14469
14484
|
}
|
|
14470
14485
|
/** Identifies the renderable type as `PointsRenderable`. */
|
|
14471
14486
|
get type() {
|
|
@@ -14473,10 +14488,10 @@ class lo extends zA {
|
|
|
14473
14488
|
}
|
|
14474
14489
|
}
|
|
14475
14490
|
let XI;
|
|
14476
|
-
function to() {
|
|
14477
|
-
return XI || (XI = yo()), XI;
|
|
14478
|
-
}
|
|
14479
14491
|
function yo() {
|
|
14492
|
+
return XI || (XI = eo()), XI;
|
|
14493
|
+
}
|
|
14494
|
+
function eo() {
|
|
14480
14495
|
const g = (a) => {
|
|
14481
14496
|
const s = new Float32Array(a * a);
|
|
14482
14497
|
return s.fill(1), s;
|
|
@@ -14499,10 +14514,10 @@ function yo() {
|
|
|
14499
14514
|
}, E = Object.keys(Q).length, i = new Float32Array(E * 65536);
|
|
14500
14515
|
for (const [a, s] of Object.entries(Q))
|
|
14501
14516
|
i.set(s, JC[a] * 65536);
|
|
14502
|
-
const o = new
|
|
14517
|
+
const o = new to(i, 256, 256);
|
|
14503
14518
|
return o.wrapR = "clamp_to_edge", o.wrapS = "clamp_to_edge", o.wrapT = "clamp_to_edge", o;
|
|
14504
14519
|
}
|
|
14505
|
-
class
|
|
14520
|
+
class no {
|
|
14506
14521
|
planes_;
|
|
14507
14522
|
/**
|
|
14508
14523
|
* Creates a frustum from a view-projection matrix.
|
|
@@ -14610,7 +14625,7 @@ class YC extends YI {
|
|
|
14610
14625
|
}
|
|
14611
14626
|
/** The view frustum derived from the current view-projection. */
|
|
14612
14627
|
get frustum() {
|
|
14613
|
-
return new
|
|
14628
|
+
return new no(this.getViewProjection());
|
|
14614
14629
|
}
|
|
14615
14630
|
/**
|
|
14616
14631
|
* Moves the camera by the given world-space offset.
|
|
@@ -14664,8 +14679,8 @@ class OB {
|
|
|
14664
14679
|
);
|
|
14665
14680
|
}
|
|
14666
14681
|
}
|
|
14667
|
-
const jI = -1, VB = 0,
|
|
14668
|
-
class
|
|
14682
|
+
const jI = -1, VB = 0, Go = 1, vB = 9e-3, wo = 1e-3, Fo = 9e-4, ro = 0.5, So = 60;
|
|
14683
|
+
class uo {
|
|
14669
14684
|
camera_;
|
|
14670
14685
|
orbitVelocity_ = new OB(0, 0, 0);
|
|
14671
14686
|
panVelocity_ = M();
|
|
@@ -14686,7 +14701,7 @@ class fo {
|
|
|
14686
14701
|
I?.yaw ?? 0,
|
|
14687
14702
|
I?.pitch ?? 0
|
|
14688
14703
|
), I?.target && _I(this.currCenter_, I.target), this.dampingFactor_ = hA(
|
|
14689
|
-
I?.dampingFactor ??
|
|
14704
|
+
I?.dampingFactor ?? ro,
|
|
14690
14705
|
0,
|
|
14691
14706
|
1
|
|
14692
14707
|
), this.scrollZoom_ = I?.scrollZoom ?? "always", this.updateCamera();
|
|
@@ -14746,7 +14761,7 @@ class fo {
|
|
|
14746
14761
|
this.currPos_.phi += this.orbitVelocity_.phi, this.currPos_.theta += this.orbitVelocity_.theta, this.currPos_.radius += this.orbitVelocity_.radius * this.currPos_.radius, aI(this.currCenter_, this.currCenter_, this.panVelocity_);
|
|
14747
14762
|
const I = Math.PI / 2 - m;
|
|
14748
14763
|
this.currPos_.theta = hA(this.currPos_.theta, -I, I), this.currPos_.radius = Math.max(0.01, this.currPos_.radius), this.updateCamera();
|
|
14749
|
-
const B = Math.pow(1 - this.dampingFactor_, A *
|
|
14764
|
+
const B = Math.pow(1 - this.dampingFactor_, A * So);
|
|
14750
14765
|
this.orbitVelocity_.phi *= B, this.orbitVelocity_.theta *= B, this.orbitVelocity_.radius *= B, $I(this.panVelocity_, this.panVelocity_, B), this.cutoffLowVelocity();
|
|
14751
14766
|
}
|
|
14752
14767
|
onPointerDown(A) {
|
|
@@ -14755,7 +14770,7 @@ class fo {
|
|
|
14755
14770
|
}
|
|
14756
14771
|
onPointerMove(A) {
|
|
14757
14772
|
if (this.currMouseButton_ == jI) return;
|
|
14758
|
-
const I = A.event, B = I.movementX ?? 0, C = I.movementY ?? 0, Q = this.currMouseButton_ === VB && !I.shiftKey, E = this.currMouseButton_ === VB && I.shiftKey || this.currMouseButton_ ===
|
|
14773
|
+
const I = A.event, B = I.movementX ?? 0, C = I.movementY ?? 0, Q = this.currMouseButton_ === VB && !I.shiftKey, E = this.currMouseButton_ === VB && I.shiftKey || this.currMouseButton_ === Go;
|
|
14759
14774
|
Q && this.orbit(B, C), E && this.pan(B, C);
|
|
14760
14775
|
}
|
|
14761
14776
|
onWheel(A) {
|
|
@@ -14774,11 +14789,11 @@ class fo {
|
|
|
14774
14789
|
this.orbitVelocity_.phi -= A * vB, this.orbitVelocity_.theta += I * vB;
|
|
14775
14790
|
}
|
|
14776
14791
|
pan(A, I) {
|
|
14777
|
-
const B = this.currPos_.radius *
|
|
14792
|
+
const B = this.currPos_.radius * wo, C = M();
|
|
14778
14793
|
Ag(C, C, this.camera_.right, A), Ag(C, C, this.camera_.up, I), $I(C, C, B), Ig(this.panVelocity_, this.panVelocity_, C);
|
|
14779
14794
|
}
|
|
14780
14795
|
zoom(A) {
|
|
14781
|
-
this.orbitVelocity_.radius += A *
|
|
14796
|
+
this.orbitVelocity_.radius += A * Fo;
|
|
14782
14797
|
}
|
|
14783
14798
|
updateCamera() {
|
|
14784
14799
|
const A = aI(M(), this.currCenter_, this.currPos_.toVec3());
|
|
@@ -14788,8 +14803,8 @@ class fo {
|
|
|
14788
14803
|
Math.abs(this.orbitVelocity_.phi) < m && (this.orbitVelocity_.phi = 0), Math.abs(this.orbitVelocity_.theta) < m && (this.orbitVelocity_.theta = 0), Math.abs(this.orbitVelocity_.radius) < m && (this.orbitVelocity_.radius = 0), ng(this.panVelocity_) < m && CQ(this.panVelocity_);
|
|
14789
14804
|
}
|
|
14790
14805
|
}
|
|
14791
|
-
const dC = 1.77, XB = 128, jB = 128 / dC,
|
|
14792
|
-
class
|
|
14806
|
+
const dC = 1.77, XB = 128, jB = 128 / dC, Ro = -1e6, co = 1e6;
|
|
14807
|
+
class mo extends YC {
|
|
14793
14808
|
// width_ and height_ should always be defined by constructor (see setFrame)
|
|
14794
14809
|
width_ = XB;
|
|
14795
14810
|
height_ = jB;
|
|
@@ -14804,7 +14819,7 @@ class po extends YC {
|
|
|
14804
14819
|
* @param props - Initialization properties.
|
|
14805
14820
|
*/
|
|
14806
14821
|
constructor(A) {
|
|
14807
|
-
super(), this.near_ = A.near ??
|
|
14822
|
+
super(), this.near_ = A.near ?? Ro, this.far_ = A.far ?? co, this.orientation_ = A.orientation ?? "XY", this.axes_ = YA(this.orientation_), this.rotation_ = dA(this.axes_), this.setFrame(A), this.updateProjectionMatrix();
|
|
14808
14823
|
}
|
|
14809
14824
|
/**
|
|
14810
14825
|
* The world-space size of the rendered view as `[width, height]`.
|
|
@@ -14906,7 +14921,7 @@ class po extends YC {
|
|
|
14906
14921
|
}
|
|
14907
14922
|
}
|
|
14908
14923
|
const zB = 0;
|
|
14909
|
-
class
|
|
14924
|
+
class To {
|
|
14910
14925
|
camera_;
|
|
14911
14926
|
scrollZoom_;
|
|
14912
14927
|
dragActive_ = !1;
|
|
@@ -14978,8 +14993,8 @@ class uo {
|
|
|
14978
14993
|
!this.dragActive_ || I.button !== zB || (this.dragActive_ = !1, I.target?.releasePointerCapture?.(I.pointerId));
|
|
14979
14994
|
}
|
|
14980
14995
|
}
|
|
14981
|
-
const
|
|
14982
|
-
class
|
|
14996
|
+
const No = 60, Uo = 1.77, oI = 0.1, zI = 180 - oI;
|
|
14997
|
+
class xo extends YC {
|
|
14983
14998
|
fov_;
|
|
14984
14999
|
aspectRatio_;
|
|
14985
15000
|
/**
|
|
@@ -14989,8 +15004,8 @@ class mo extends YC {
|
|
|
14989
15004
|
*/
|
|
14990
15005
|
constructor(A = {}) {
|
|
14991
15006
|
const {
|
|
14992
|
-
fov: I =
|
|
14993
|
-
aspectRatio: B =
|
|
15007
|
+
fov: I = No,
|
|
15008
|
+
aspectRatio: B = Uo,
|
|
14994
15009
|
near: C = 0.1,
|
|
14995
15010
|
far: Q = 1e4,
|
|
14996
15011
|
position: E = x(0, 0, 0)
|
|
@@ -15046,37 +15061,38 @@ class mo extends YC {
|
|
|
15046
15061
|
}
|
|
15047
15062
|
}
|
|
15048
15063
|
export {
|
|
15049
|
-
|
|
15064
|
+
fo as AxesLayer,
|
|
15050
15065
|
AA as Box2,
|
|
15051
15066
|
VA as Box3,
|
|
15052
15067
|
YC as Camera,
|
|
15053
15068
|
T as Color,
|
|
15054
|
-
|
|
15055
|
-
|
|
15069
|
+
no as Frustum,
|
|
15070
|
+
Yo as Idetik,
|
|
15056
15071
|
Jg as ImageLayer,
|
|
15057
15072
|
PQ as ImageRenderable,
|
|
15058
15073
|
$Q as LabelImageRenderable,
|
|
15059
15074
|
Yg as LabelLayer,
|
|
15060
15075
|
KI as Layer,
|
|
15061
15076
|
bA as OmeZarrImageSource,
|
|
15062
|
-
|
|
15063
|
-
|
|
15064
|
-
|
|
15065
|
-
|
|
15066
|
-
|
|
15067
|
-
|
|
15077
|
+
uo as OrbitControls,
|
|
15078
|
+
mo as OrthographicCamera,
|
|
15079
|
+
To as PanZoomControls,
|
|
15080
|
+
xo as PerspectiveCamera,
|
|
15081
|
+
po as PointsRenderable,
|
|
15082
|
+
ho as ProjectedLineRenderable,
|
|
15068
15083
|
zA as RenderableObject,
|
|
15084
|
+
aE as Stats,
|
|
15069
15085
|
oC as TrsTransform,
|
|
15070
|
-
|
|
15086
|
+
nE as Viewport,
|
|
15071
15087
|
CE as VolumeLayer,
|
|
15072
15088
|
IE as VolumeRenderable,
|
|
15073
15089
|
Ng as createExplorationPolicy,
|
|
15074
15090
|
Ug as createImageSourcePolicy,
|
|
15075
|
-
|
|
15076
|
-
|
|
15077
|
-
|
|
15078
|
-
|
|
15079
|
-
|
|
15080
|
-
|
|
15091
|
+
Lo as createNoPrefetchPolicy,
|
|
15092
|
+
ko as createPlaybackPolicy,
|
|
15093
|
+
Ko as loadOmeZarrPlate,
|
|
15094
|
+
Ho as loadOmeZarrWell,
|
|
15095
|
+
qo as loadOmeroChannels,
|
|
15096
|
+
lo as loadOmeroDefaults
|
|
15081
15097
|
};
|
|
15082
15098
|
//# sourceMappingURL=index.js.map
|