@idetik/core 0.27.2 → 0.27.3

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
@@ -104,30 +104,30 @@ class cQ {
104
104
  }
105
105
  var FE = `#version 300 es
106
106
 
107
- layout (location = 0) in vec3 inPosition;
108
- layout (location = 3) in vec3 inPrevPosition;
109
- layout (location = 4) in vec3 inNextPosition;
110
- layout (location = 5) in float direction;
107
+ layout (location = 0) in vec3 a_position;
108
+ layout (location = 3) in vec3 a_prevPosition;
109
+ layout (location = 4) in vec3 a_nextPosition;
110
+ layout (location = 5) in float a_direction;
111
111
 
112
- uniform mat4 Projection;
113
- uniform mat4 ModelView;
114
- uniform vec2 Resolution;
115
- uniform float LineWidth;
112
+ uniform mat4 u_projection;
113
+ uniform mat4 u_modelView;
114
+ uniform vec2 u_resolution;
115
+ uniform float u_lineWidth;
116
116
 
117
117
  void main() {
118
- mat4 projModelView = Projection * ModelView;
118
+ mat4 projModelView = u_projection * u_modelView;
119
119
 
120
- vec4 prevPos = projModelView * vec4(inPrevPosition, 1.0);
121
- vec4 currPos = projModelView * vec4(inPosition, 1.0);
122
- vec4 nextPos = projModelView * vec4(inNextPosition, 1.0);
120
+ vec4 prevPos = projModelView * vec4(a_prevPosition, 1.0);
121
+ vec4 currPos = projModelView * vec4(a_position, 1.0);
122
+ vec4 nextPos = projModelView * vec4(a_nextPosition, 1.0);
123
123
 
124
- vec2 aspectVec = vec2(Resolution.x / Resolution.y, 1.0);
124
+ vec2 aspectVec = vec2(u_resolution.x / u_resolution.y, 1.0);
125
125
  vec2 prevScreen = (prevPos.xy / prevPos.w) * aspectVec;
126
126
  vec2 currScreen = (currPos.xy / currPos.w) * aspectVec;
127
127
  vec2 nextScreen = (nextPos.xy / nextPos.w) * aspectVec;
128
128
 
129
129
 
130
- float d = sign(direction);
130
+ float d = sign(a_direction);
131
131
 
132
132
 
133
133
  vec2 normal;
@@ -154,7 +154,7 @@ void main() {
154
154
 
155
155
 
156
156
  vec4 offset = vec4(
157
- (normal * LineWidth / Resolution) * miterLength * d,
157
+ (normal * u_lineWidth / u_resolution) * miterLength * d,
158
158
  0.0,
159
159
  0.0
160
160
  );
@@ -168,25 +168,25 @@ precision mediump float;
168
168
 
169
169
  layout (location = 0) out vec4 fragColor;
170
170
 
171
- uniform vec3 LineColor;
171
+ uniform vec3 u_lineColor;
172
172
  uniform float u_opacity;
173
173
 
174
174
  void main() {
175
- fragColor = vec4(LineColor, u_opacity);
176
- }`, OI = `#version 300 es
175
+ fragColor = vec4(u_lineColor, u_opacity);
176
+ }`, VI = `#version 300 es
177
177
 
178
- layout (location = 0) in vec3 inPosition;
179
- layout (location = 1) in vec3 inNormal;
180
- layout (location = 2) in vec2 inUV;
178
+ layout (location = 0) in vec3 a_position;
179
+ layout (location = 1) in vec3 a_normal;
180
+ layout (location = 2) in vec2 a_uv;
181
181
 
182
- uniform mat4 Projection;
183
- uniform mat4 ModelView;
182
+ uniform mat4 u_projection;
183
+ uniform mat4 u_modelView;
184
184
 
185
- out vec2 TexCoords;
185
+ out vec2 v_texCoords;
186
186
 
187
187
  void main() {
188
- TexCoords = inUV;
189
- gl_Position = Projection * ModelView * vec4(inPosition, 1.0);
188
+ v_texCoords = a_uv;
189
+ gl_Position = u_projection * u_modelView * vec4(a_position, 1.0);
190
190
  }`, Yg = `#version 300 es
191
191
  #pragma inject_defines
192
192
 
@@ -195,75 +195,75 @@ precision mediump float;
195
195
  layout (location = 0) out vec4 fragColor;
196
196
 
197
197
  #if defined TEXTURE_DATA_TYPE_INT
198
- uniform mediump isampler3D ImageSampler;
198
+ uniform mediump isampler3D u_imageSampler;
199
199
  #elif defined TEXTURE_DATA_TYPE_UINT
200
- uniform mediump usampler3D ImageSampler;
200
+ uniform mediump usampler3D u_imageSampler;
201
201
  #else
202
- uniform mediump sampler3D ImageSampler;
202
+ uniform mediump sampler3D u_imageSampler;
203
203
  #endif
204
204
 
205
- uniform vec3 Color;
206
- uniform float ValueOffset;
207
- uniform float ValueScale;
205
+ uniform vec3 u_color;
206
+ uniform float u_valueOffset;
207
+ uniform float u_valueScale;
208
208
  uniform float u_opacity;
209
- uniform float ZTexCoord;
209
+ uniform float u_zTexCoord;
210
210
 
211
- in vec2 TexCoords;
211
+ in vec2 v_texCoords;
212
212
 
213
213
  void main() {
214
- float texel = float(texture(ImageSampler, vec3(TexCoords, ZTexCoord)).r);
215
- float value = (texel + ValueOffset) * ValueScale;
216
- fragColor = vec4(value * Color, u_opacity);
214
+ float texel = float(texture(u_imageSampler, vec3(v_texCoords, u_zTexCoord)).r);
215
+ float value = (texel + u_valueOffset) * u_valueScale;
216
+ fragColor = vec4(value * u_color, u_opacity);
217
217
  }`, NE = `#version 300 es
218
218
 
219
219
  precision mediump float;
220
220
 
221
- layout (location = 0) in vec3 inPosition;
222
- layout (location = 6) in vec4 inColor;
223
- layout (location = 7) in float inSize;
224
- layout (location = 8) in float inMarker;
221
+ layout (location = 0) in vec3 a_position;
222
+ layout (location = 6) in vec4 a_color;
223
+ layout (location = 7) in float a_size;
224
+ layout (location = 8) in float a_marker;
225
225
 
226
- uniform mat4 Projection;
227
- uniform mat4 ModelView;
226
+ uniform mat4 u_projection;
227
+ uniform mat4 u_modelView;
228
228
 
229
- out vec4 color;
230
- flat out uint marker;
229
+ out vec4 v_color;
230
+ flat out uint v_marker;
231
231
 
232
232
  void main() {
233
- gl_Position = Projection * ModelView * vec4(inPosition, 1.0);
234
- gl_PointSize = inSize;
235
- color = inColor;
236
- marker = uint(inMarker);
233
+ gl_Position = u_projection * u_modelView * vec4(a_position, 1.0);
234
+ gl_PointSize = a_size;
235
+ v_color = a_color;
236
+ v_marker = uint(a_marker);
237
237
  }`, RE = `#version 300 es
238
238
 
239
239
  precision mediump float;
240
240
 
241
241
  layout (location = 0) out vec4 fragColor;
242
242
 
243
- uniform mediump sampler2DArray markerAtlas;
243
+ uniform mediump sampler2DArray u_markerAtlas;
244
244
 
245
- in vec4 color;
246
- flat in uint marker;
245
+ in vec4 v_color;
246
+ flat in uint v_marker;
247
247
 
248
248
  uniform float u_opacity;
249
249
 
250
250
  void main() {
251
- float alpha = texture(markerAtlas, vec3(gl_PointCoord, marker)).r;
251
+ float alpha = texture(u_markerAtlas, vec3(gl_PointCoord, v_marker)).r;
252
252
  float alpha_threshold = 1e-2;
253
253
  if (alpha < alpha_threshold) {
254
254
  discard;
255
255
  }
256
- fragColor = vec4(color.rgb, u_opacity * alpha * color.a);
256
+ fragColor = vec4(v_color.rgb, u_opacity * alpha * v_color.a);
257
257
  }`, kE = `#version 300 es
258
258
 
259
- layout (location = 0) in vec3 inPosition;
260
- layout (location = 1) in vec3 inNormal;
259
+ layout (location = 0) in vec3 a_position;
260
+ layout (location = 1) in vec3 a_normal;
261
261
 
262
- uniform mat4 Projection;
263
- uniform mat4 ModelView;
262
+ uniform mat4 u_projection;
263
+ uniform mat4 u_modelView;
264
264
 
265
265
  void main() {
266
- gl_Position = Projection * ModelView * vec4(inPosition, 1.0);
266
+ gl_Position = u_projection * u_modelView * vec4(a_position, 1.0);
267
267
  }`, UE = `#version 300 es
268
268
 
269
269
  precision mediump float;
@@ -279,15 +279,15 @@ void main() {
279
279
 
280
280
  precision highp float;
281
281
 
282
- layout (location = 0) in vec3 inPosition;
282
+ layout (location = 0) in vec3 a_position;
283
283
 
284
- uniform mat4 Projection;
285
- uniform mat4 ModelView;
286
- out highp vec3 PositionModel;
284
+ uniform mat4 u_projection;
285
+ uniform mat4 u_modelView;
286
+ out highp vec3 v_positionModel;
287
287
 
288
288
  void main() {
289
- PositionModel = inPosition;
290
- gl_Position = Projection * ModelView * vec4(inPosition, 1.0);
289
+ v_positionModel = a_position;
290
+ gl_Position = u_projection * u_modelView * vec4(a_position, 1.0);
291
291
  }`, fg = `#version 300 es
292
292
  #pragma inject_defines
293
293
  precision highp float;
@@ -296,41 +296,41 @@ layout (location = 0) out vec4 fragColor;
296
296
 
297
297
  #if defined TEXTURE_DATA_TYPE_INT
298
298
  precision mediump isampler3D;
299
- uniform isampler3D Channel0Sampler;
300
- uniform isampler3D Channel1Sampler;
301
- uniform isampler3D Channel2Sampler;
302
- uniform isampler3D Channel3Sampler;
299
+ uniform isampler3D u_channel0Sampler;
300
+ uniform isampler3D u_channel1Sampler;
301
+ uniform isampler3D u_channel2Sampler;
302
+ uniform isampler3D u_channel3Sampler;
303
303
  #elif defined TEXTURE_DATA_TYPE_UINT
304
304
  precision mediump usampler3D;
305
- uniform usampler3D Channel0Sampler;
306
- uniform usampler3D Channel1Sampler;
307
- uniform usampler3D Channel2Sampler;
308
- uniform usampler3D Channel3Sampler;
305
+ uniform usampler3D u_channel0Sampler;
306
+ uniform usampler3D u_channel1Sampler;
307
+ uniform usampler3D u_channel2Sampler;
308
+ uniform usampler3D u_channel3Sampler;
309
309
  #else
310
310
  precision mediump sampler3D;
311
- uniform sampler3D Channel0Sampler;
312
- uniform sampler3D Channel1Sampler;
313
- uniform sampler3D Channel2Sampler;
314
- uniform sampler3D Channel3Sampler;
311
+ uniform sampler3D u_channel0Sampler;
312
+ uniform sampler3D u_channel1Sampler;
313
+ uniform sampler3D u_channel2Sampler;
314
+ uniform sampler3D u_channel3Sampler;
315
315
  #endif
316
316
 
317
- uniform highp vec3 CameraPositionModel;
318
- uniform vec3 VoxelScale;
319
- in highp vec3 PositionModel;
317
+ uniform highp vec3 u_cameraPositionModel;
318
+ uniform vec3 u_voxelScale;
319
+ in highp vec3 v_positionModel;
320
320
 
321
321
  vec3 boundingboxMin = vec3(-0.50);
322
322
  vec3 boundingboxMax = vec3(0.50);
323
323
 
324
- uniform bool DebugShowDegenerateRays;
325
- uniform float RelativeStepSize;
326
- uniform float OpacityMultiplier;
327
- uniform float EarlyTerminationAlpha;
324
+ uniform bool u_debugShowDegenerateRays;
325
+ uniform float u_relativeStepSize;
326
+ uniform float u_opacityMultiplier;
327
+ uniform float u_earlyTerminationAlpha;
328
328
 
329
- uniform vec4 Visible;
330
- uniform vec4 ValueOffset;
331
- uniform vec4 ValueScale;
332
- uniform vec4 ChannelOpacity;
333
- uniform vec3 Color[4];
329
+ uniform vec4 u_visible;
330
+ uniform vec4 u_valueOffset;
331
+ uniform vec4 u_valueScale;
332
+ uniform vec4 u_channelOpacity;
333
+ uniform vec3 u_color[4];
334
334
 
335
335
  vec2 findBoxIntersectionsAlongRay(vec3 rayOrigin, vec3 rayDir, vec3 boxMin, vec3 boxMax) {
336
336
  vec3 reciprocalRayDir = 1.0 / rayDir;
@@ -351,19 +351,19 @@ vec2 findBoxIntersectionsAlongRay(vec3 rayOrigin, vec3 rayDir, vec3 boxMin, vec3
351
351
  vec4 sampleChannels(vec3 uvw) {
352
352
  vec4 c = vec4(0.0);
353
353
 
354
- if (bool(Visible.x)) c.x = float(texture(Channel0Sampler, uvw).r);
355
- if (bool(Visible.y)) c.y = float(texture(Channel1Sampler, uvw).r);
356
- if (bool(Visible.z)) c.z = float(texture(Channel2Sampler, uvw).r);
357
- if (bool(Visible.w)) c.w = float(texture(Channel3Sampler, uvw).r);
354
+ if (bool(u_visible.x)) c.x = float(texture(u_channel0Sampler, uvw).r);
355
+ if (bool(u_visible.y)) c.y = float(texture(u_channel1Sampler, uvw).r);
356
+ if (bool(u_visible.z)) c.z = float(texture(u_channel2Sampler, uvw).r);
357
+ if (bool(u_visible.w)) c.w = float(texture(u_channel3Sampler, uvw).r);
358
358
 
359
- return (c + ValueOffset) * ValueScale;
359
+ return (c + u_valueOffset) * u_valueScale;
360
360
  }
361
361
 
362
362
  vec3 getTextureSize() {
363
- if (bool(Visible.x)) return vec3(textureSize(Channel0Sampler, 0));
364
- else if (bool(Visible.y)) return vec3(textureSize(Channel1Sampler, 0));
365
- else if (bool(Visible.z)) return vec3(textureSize(Channel2Sampler, 0));
366
- else if (bool(Visible.w)) return vec3(textureSize(Channel3Sampler, 0));
363
+ if (bool(u_visible.x)) return vec3(textureSize(u_channel0Sampler, 0));
364
+ else if (bool(u_visible.y)) return vec3(textureSize(u_channel1Sampler, 0));
365
+ else if (bool(u_visible.z)) return vec3(textureSize(u_channel2Sampler, 0));
366
+ else if (bool(u_visible.w)) return vec3(textureSize(u_channel3Sampler, 0));
367
367
  return vec3(1.0);
368
368
  }
369
369
 
@@ -371,20 +371,20 @@ void main() {
371
371
 
372
372
 
373
373
 
374
- vec3 RayDirModel = normalize(PositionModel - CameraPositionModel);
374
+ vec3 RayDirModel = normalize(v_positionModel - u_cameraPositionModel);
375
375
 
376
- vec2 rayIntersections = findBoxIntersectionsAlongRay(CameraPositionModel, RayDirModel, boundingboxMin, boundingboxMax);
376
+ vec2 rayIntersections = findBoxIntersectionsAlongRay(u_cameraPositionModel, RayDirModel, boundingboxMin, boundingboxMax);
377
377
  float tEnter = rayIntersections.x;
378
378
  float tExit = rayIntersections.y;
379
379
 
380
- if (DebugShowDegenerateRays && (tExit == tEnter)) {
380
+ if (u_debugShowDegenerateRays && (tExit == tEnter)) {
381
381
  fragColor = vec4(1.0, 0.0, 0.0, 1.0);
382
382
  return;
383
383
  }
384
384
 
385
- vec3 entryPoint = CameraPositionModel + RayDirModel * tEnter;
385
+ vec3 entryPoint = u_cameraPositionModel + RayDirModel * tEnter;
386
386
  entryPoint = clamp(entryPoint + 0.5, 0.0, 1.0);
387
- vec3 exitPoint = CameraPositionModel + RayDirModel * tExit;
387
+ vec3 exitPoint = u_cameraPositionModel + RayDirModel * tExit;
388
388
  exitPoint = clamp(exitPoint + 0.5, 0.0, 1.0);
389
389
 
390
390
 
@@ -394,16 +394,16 @@ void main() {
394
394
  vec3 textureSize = getTextureSize();
395
395
  vec3 rayInVoxels = rayWithinModel * textureSize;
396
396
  float rayLengthInVoxels = length(rayInVoxels);
397
- int numSamples = max(int(ceil(rayLengthInVoxels / RelativeStepSize)), 1);
397
+ int numSamples = max(int(ceil(rayLengthInVoxels / u_relativeStepSize)), 1);
398
398
  vec3 stepIncrement = rayWithinModel / float(numSamples);
399
399
 
400
400
 
401
401
 
402
402
 
403
403
 
404
- vec3 stepInWorldSpace = stepIncrement * textureSize * VoxelScale;
404
+ vec3 stepInWorldSpace = stepIncrement * textureSize * u_voxelScale;
405
405
  float worldSpaceStepSize = length(stepInWorldSpace);
406
- float intensityScale = OpacityMultiplier * worldSpaceStepSize;
406
+ float intensityScale = u_opacityMultiplier * worldSpaceStepSize;
407
407
 
408
408
 
409
409
  vec3 position = entryPoint;
@@ -411,14 +411,14 @@ void main() {
411
411
 
412
412
  vec3 sampleColor = vec3(0.0);
413
413
  float sampleAlpha, blendedSampleAlpha;
414
- for (int i = 0; i < numSamples && accumulatedColor.a < EarlyTerminationAlpha; i++) {
414
+ for (int i = 0; i < numSamples && accumulatedColor.a < u_earlyTerminationAlpha; i++) {
415
415
 
416
416
  vec4 sampleValues = sampleChannels(position);
417
417
 
418
418
  for (int ch = 0; ch < 4; ch++) {
419
- if (!bool(Visible[ch]) || sampleValues[ch] == 0.0) continue;
420
- sampleColor = Color[ch];
421
- sampleAlpha = clamp(sampleValues[ch] * intensityScale * ChannelOpacity[ch], 0.0, 1.0);
419
+ if (!bool(u_visible[ch]) || sampleValues[ch] == 0.0) continue;
420
+ sampleColor = u_color[ch];
421
+ sampleAlpha = clamp(sampleValues[ch] * intensityScale * u_channelOpacity[ch], 0.0, 1.0);
422
422
  blendedSampleAlpha = (1.0 - accumulatedColor.a) * sampleAlpha;
423
423
 
424
424
 
@@ -437,16 +437,16 @@ precision highp int;
437
437
 
438
438
  layout (location = 0) out vec4 fragColor;
439
439
 
440
- uniform highp usampler3D ImageSampler;
441
- uniform mediump sampler2D ColorCycleSampler;
442
- uniform highp usampler2D ColorLookupTableSampler;
440
+ uniform highp usampler3D u_imageSampler;
441
+ uniform mediump sampler2D u_colorCycleSampler;
442
+ uniform highp usampler2D u_colorLookupTableSampler;
443
443
 
444
444
  uniform float u_opacity;
445
445
  uniform float u_outlineSelected;
446
446
  uniform float u_selectedValue;
447
- uniform float ZTexCoord;
447
+ uniform float u_zTexCoord;
448
448
 
449
- in vec2 TexCoords;
449
+ in vec2 v_texCoords;
450
450
 
451
451
  vec4 unpackRgba(uint packed) {
452
452
  uint r = (packed >> 24u) & 0xFFu;
@@ -457,23 +457,23 @@ vec4 unpackRgba(uint packed) {
457
457
  }
458
458
 
459
459
  bool isEdgePixel(uint centerValue) {
460
- vec2 texSize = vec2(textureSize(ImageSampler, 0).xy);
460
+ vec2 texSize = vec2(textureSize(u_imageSampler, 0).xy);
461
461
  vec2 texelSize = 1.0 / texSize;
462
-
462
+
463
463
 
464
464
  for (int dx = -1; dx <= 1; dx++) {
465
465
  for (int dy = -1; dy <= 1; dy++) {
466
466
  if (dx == 0 && dy == 0) continue;
467
+
468
+ vec2 neighborCoords = v_texCoords + vec2(float(dx), float(dy)) * texelSize;
469
+
467
470
 
468
- vec2 neighborCoords = TexCoords + vec2(float(dx), float(dy)) * texelSize;
469
-
470
-
471
- if (neighborCoords.x < 0.0 || neighborCoords.x > 1.0 ||
471
+ if (neighborCoords.x < 0.0 || neighborCoords.x > 1.0 ||
472
472
  neighborCoords.y < 0.0 || neighborCoords.y > 1.0) {
473
473
  continue;
474
474
  }
475
-
476
- uint neighborValue = texture(ImageSampler, vec3(neighborCoords, ZTexCoord)).r;
475
+
476
+ uint neighborValue = texture(u_imageSampler, vec3(neighborCoords, u_zTexCoord)).r;
477
477
  if (neighborValue != centerValue) {
478
478
  return true;
479
479
  }
@@ -483,11 +483,11 @@ bool isEdgePixel(uint centerValue) {
483
483
  }
484
484
 
485
485
  void main() {
486
- uint texel = texture(ImageSampler, vec3(TexCoords, ZTexCoord)).r;
487
-
486
+ uint texel = texture(u_imageSampler, vec3(v_texCoords, u_zTexCoord)).r;
487
+
488
488
 
489
489
  bool isSelectedValue = u_outlineSelected > 0.5 && u_selectedValue >= 0.0 && float(texel) == u_selectedValue;
490
-
490
+
491
491
 
492
492
  if (isSelectedValue) {
493
493
  if (isEdgePixel(texel)) {
@@ -497,28 +497,28 @@ void main() {
497
497
  }
498
498
  }
499
499
 
500
- uint mapLength = uint(textureSize(ColorLookupTableSampler, 0).x);
500
+ uint mapLength = uint(textureSize(u_colorLookupTableSampler, 0).x);
501
501
  for (uint i = 0u; i < mapLength; ++i) {
502
- uint key = texelFetch(ColorLookupTableSampler, ivec2(i, 0), 0).r;
502
+ uint key = texelFetch(u_colorLookupTableSampler, ivec2(i, 0), 0).r;
503
503
  if (texel == key) {
504
- uint value = texelFetch(ColorLookupTableSampler, ivec2(i, 1), 0).r;
504
+ uint value = texelFetch(u_colorLookupTableSampler, ivec2(i, 1), 0).r;
505
505
  vec4 color = unpackRgba(value);
506
-
506
+
507
507
 
508
508
  float alpha = isSelectedValue ? u_opacity * color.a * 0.9 : u_opacity * color.a;
509
-
509
+
510
510
  fragColor = vec4(color.rgb, alpha);
511
511
  return;
512
512
  }
513
513
  }
514
514
 
515
- uint cycleLength = uint(textureSize(ColorCycleSampler, 0).x);
515
+ uint cycleLength = uint(textureSize(u_colorCycleSampler, 0).x);
516
516
  uint index = uint(texel - 1u) % cycleLength;
517
- vec4 color = texelFetch(ColorCycleSampler, ivec2(index, 0), 0);
518
-
517
+ vec4 color = texelFetch(u_colorCycleSampler, ivec2(index, 0), 0);
518
+
519
519
 
520
520
  float alpha = isSelectedValue ? u_opacity * color.a * 0.9 : u_opacity * color.a;
521
-
521
+
522
522
  fragColor = vec4(color.rgb, alpha);
523
523
  }`;
524
524
  const lE = {
@@ -535,21 +535,21 @@ const lE = {
535
535
  fragment: UE
536
536
  },
537
537
  floatScalarImage: {
538
- vertex: OI,
538
+ vertex: VI,
539
539
  fragment: Yg
540
540
  },
541
541
  intScalarImage: {
542
- vertex: OI,
542
+ vertex: VI,
543
543
  fragment: Yg,
544
544
  fragmentDefines: /* @__PURE__ */ new Map([["TEXTURE_DATA_TYPE_INT", "1"]])
545
545
  },
546
546
  uintScalarImage: {
547
- vertex: OI,
547
+ vertex: VI,
548
548
  fragment: Yg,
549
549
  fragmentDefines: /* @__PURE__ */ new Map([["TEXTURE_DATA_TYPE_UINT", "1"]])
550
550
  },
551
551
  labelImage: {
552
- vertex: OI,
552
+ vertex: VI,
553
553
  fragment: dE
554
554
  },
555
555
  floatVolume: {
@@ -912,10 +912,10 @@ function AI(C, A, I, g) {
912
912
  function HI(C, A, I) {
913
913
  return C[0] = A[0] + I[0], C[1] = A[1] + I[1], C[2] = A[2] + I[2], C;
914
914
  }
915
- function VE(C, A, I) {
915
+ function OE(C, A, I) {
916
916
  return C[0] = A[0] - I[0], C[1] = A[1] - I[1], C[2] = A[2] - I[2], C;
917
917
  }
918
- function OE(C, A, I) {
918
+ function VE(C, A, I) {
919
919
  return C[0] = A[0] * I[0], C[1] = A[1] * I[1], C[2] = A[2] * I[2], C;
920
920
  }
921
921
  function qI(C, A, I) {
@@ -950,7 +950,7 @@ function NB(C, A) {
950
950
  var I = C[0], g = C[1], B = C[2], Q = A[0], E = A[1], i = A[2];
951
951
  return Math.abs(I - Q) <= AA * Math.max(1, Math.abs(I), Math.abs(Q)) && Math.abs(g - E) <= AA * Math.max(1, Math.abs(g), Math.abs(E)) && Math.abs(B - i) <= AA * Math.max(1, Math.abs(B), Math.abs(i));
952
952
  }
953
- var AB = VE, jE = FB;
953
+ var AB = OE, jE = FB;
954
954
  (function() {
955
955
  var C = QA();
956
956
  return function(A, I, g, B, Q, E) {
@@ -1779,13 +1779,13 @@ class eC extends cQ {
1779
1779
  };
1780
1780
  for (const F of B.uniformNames)
1781
1781
  switch (F) {
1782
- case "ModelView":
1782
+ case "u_modelView":
1783
1783
  B.setUniform(F, E);
1784
1784
  break;
1785
- case "Projection":
1785
+ case "u_projection":
1786
1786
  B.setUniform(F, i);
1787
1787
  break;
1788
- case "Resolution":
1788
+ case "u_resolution":
1789
1789
  B.setUniform(F, o);
1790
1790
  break;
1791
1791
  case "u_opacity":
@@ -1794,7 +1794,7 @@ class eC extends cQ {
1794
1794
  g.opacity * (s.Opacity ?? 1)
1795
1795
  );
1796
1796
  break;
1797
- case "CameraPositionModel": {
1797
+ case "u_cameraPositionModel": {
1798
1798
  const U = kg(SA(), E), S = Bg(0, 0, 0, 1), l = pI(
1799
1799
  rI(),
1800
1800
  S,
@@ -2695,114 +2695,114 @@ function Zi(C, A, I, g, B, Q, E, i, o) {
2695
2695
  const s = g * (E >>= B) * (Q >>= B) + I * E + A * i;
2696
2696
  switch (o) {
2697
2697
  case "r8unorm":
2698
- return [O(C, s, "8unorm", 1)[0]];
2698
+ return [V(C, s, "8unorm", 1)[0]];
2699
2699
  case "r8snorm":
2700
- return [O(C, s, "8snorm", 1)[0]];
2700
+ return [V(C, s, "8snorm", 1)[0]];
2701
2701
  case "r8uint":
2702
- return [O(C, s, "8uint", 1)[0]];
2702
+ return [V(C, s, "8uint", 1)[0]];
2703
2703
  case "r8sint":
2704
- return [O(C, s, "8sint", 1)[0]];
2704
+ return [V(C, s, "8sint", 1)[0]];
2705
2705
  case "rg8unorm": {
2706
- const t = O(C, s, "8unorm", 2);
2706
+ const t = V(C, s, "8unorm", 2);
2707
2707
  return [t[0], t[1]];
2708
2708
  }
2709
2709
  case "rg8snorm": {
2710
- const t = O(C, s, "8snorm", 2);
2710
+ const t = V(C, s, "8snorm", 2);
2711
2711
  return [t[0], t[1]];
2712
2712
  }
2713
2713
  case "rg8uint": {
2714
- const t = O(C, s, "8uint", 2);
2714
+ const t = V(C, s, "8uint", 2);
2715
2715
  return [t[0], t[1]];
2716
2716
  }
2717
2717
  case "rg8sint": {
2718
- const t = O(C, s, "8sint", 2);
2718
+ const t = V(C, s, "8sint", 2);
2719
2719
  return [t[0], t[1]];
2720
2720
  }
2721
2721
  case "rgba8unorm-srgb":
2722
2722
  case "rgba8unorm": {
2723
- const t = O(C, s, "8unorm", 4);
2723
+ const t = V(C, s, "8unorm", 4);
2724
2724
  return [t[0], t[1], t[2], t[3]];
2725
2725
  }
2726
2726
  case "rgba8snorm": {
2727
- const t = O(C, s, "8snorm", 4);
2727
+ const t = V(C, s, "8snorm", 4);
2728
2728
  return [t[0], t[1], t[2], t[3]];
2729
2729
  }
2730
2730
  case "rgba8uint": {
2731
- const t = O(C, s, "8uint", 4);
2731
+ const t = V(C, s, "8uint", 4);
2732
2732
  return [t[0], t[1], t[2], t[3]];
2733
2733
  }
2734
2734
  case "rgba8sint": {
2735
- const t = O(C, s, "8sint", 4);
2735
+ const t = V(C, s, "8sint", 4);
2736
2736
  return [t[0], t[1], t[2], t[3]];
2737
2737
  }
2738
2738
  case "bgra8unorm-srgb":
2739
2739
  case "bgra8unorm": {
2740
- const t = O(C, s, "8unorm", 4);
2740
+ const t = V(C, s, "8unorm", 4);
2741
2741
  return [t[2], t[1], t[0], t[3]];
2742
2742
  }
2743
2743
  case "r16uint":
2744
- return [O(C, s, "16uint", 1)[0]];
2744
+ return [V(C, s, "16uint", 1)[0]];
2745
2745
  case "r16sint":
2746
- return [O(C, s, "16sint", 1)[0]];
2746
+ return [V(C, s, "16sint", 1)[0]];
2747
2747
  case "r16float":
2748
- return [O(C, s, "16float", 1)[0]];
2748
+ return [V(C, s, "16float", 1)[0]];
2749
2749
  case "rg16uint": {
2750
- const t = O(C, s, "16uint", 2);
2750
+ const t = V(C, s, "16uint", 2);
2751
2751
  return [t[0], t[1]];
2752
2752
  }
2753
2753
  case "rg16sint": {
2754
- const t = O(C, s, "16sint", 2);
2754
+ const t = V(C, s, "16sint", 2);
2755
2755
  return [t[0], t[1]];
2756
2756
  }
2757
2757
  case "rg16float": {
2758
- const t = O(C, s, "16float", 2);
2758
+ const t = V(C, s, "16float", 2);
2759
2759
  return [t[0], t[1]];
2760
2760
  }
2761
2761
  case "rgba16uint": {
2762
- const t = O(C, s, "16uint", 4);
2762
+ const t = V(C, s, "16uint", 4);
2763
2763
  return [t[0], t[1], t[2], t[3]];
2764
2764
  }
2765
2765
  case "rgba16sint": {
2766
- const t = O(C, s, "16sint", 4);
2766
+ const t = V(C, s, "16sint", 4);
2767
2767
  return [t[0], t[1], t[2], t[3]];
2768
2768
  }
2769
2769
  case "rgba16float": {
2770
- const t = O(C, s, "16float", 4);
2770
+ const t = V(C, s, "16float", 4);
2771
2771
  return [t[0], t[1], t[2], t[3]];
2772
2772
  }
2773
2773
  case "r32uint":
2774
- return [O(C, s, "32uint", 1)[0]];
2774
+ return [V(C, s, "32uint", 1)[0]];
2775
2775
  case "r32sint":
2776
- return [O(C, s, "32sint", 1)[0]];
2776
+ return [V(C, s, "32sint", 1)[0]];
2777
2777
  case "depth16unorm":
2778
2778
  case "depth24plus":
2779
2779
  case "depth24plus-stencil8":
2780
2780
  case "depth32float":
2781
2781
  case "depth32float-stencil8":
2782
2782
  case "r32float":
2783
- return [O(C, s, "32float", 1)[0]];
2783
+ return [V(C, s, "32float", 1)[0]];
2784
2784
  case "rg32uint": {
2785
- const t = O(C, s, "32uint", 2);
2785
+ const t = V(C, s, "32uint", 2);
2786
2786
  return [t[0], t[1]];
2787
2787
  }
2788
2788
  case "rg32sint": {
2789
- const t = O(C, s, "32sint", 2);
2789
+ const t = V(C, s, "32sint", 2);
2790
2790
  return [t[0], t[1]];
2791
2791
  }
2792
2792
  case "rg32float": {
2793
- const t = O(C, s, "32float", 2);
2793
+ const t = V(C, s, "32float", 2);
2794
2794
  return [t[0], t[1]];
2795
2795
  }
2796
2796
  case "rgba32uint": {
2797
- const t = O(C, s, "32uint", 4);
2797
+ const t = V(C, s, "32uint", 4);
2798
2798
  return [t[0], t[1], t[2], t[3]];
2799
2799
  }
2800
2800
  case "rgba32sint": {
2801
- const t = O(C, s, "32sint", 4);
2801
+ const t = V(C, s, "32sint", 4);
2802
2802
  return [t[0], t[1], t[2], t[3]];
2803
2803
  }
2804
2804
  case "rgba32float": {
2805
- const t = O(C, s, "32float", 4);
2805
+ const t = V(C, s, "32float", 4);
2806
2806
  return [t[0], t[1], t[2], t[3]];
2807
2807
  }
2808
2808
  case "rg11b10ufloat": {
@@ -2815,7 +2815,7 @@ function Zi(C, A, I, g, B, Q, E, i, o) {
2815
2815
  }
2816
2816
  return null;
2817
2817
  }
2818
- function O(C, A, I, g) {
2818
+ function V(C, A, I, g) {
2819
2819
  const B = [0, 0, 0, 0];
2820
2820
  for (let Q = 0; Q < g; ++Q) switch (I) {
2821
2821
  case "8unorm":
@@ -3144,7 +3144,7 @@ class Pi extends EA {
3144
3144
  return "enable";
3145
3145
  }
3146
3146
  }
3147
- class Vi extends EA {
3147
+ class Oi extends EA {
3148
3148
  constructor(A) {
3149
3149
  super(), this.extensions = A;
3150
3150
  }
@@ -3168,7 +3168,7 @@ class JB extends EA {
3168
3168
  return "alias";
3169
3169
  }
3170
3170
  }
3171
- class Oi extends EA {
3171
+ class Vi extends EA {
3172
3172
  get astNodeType() {
3173
3173
  return "discard";
3174
3174
  }
@@ -3512,7 +3512,7 @@ class SC extends dA {
3512
3512
  return "member";
3513
3513
  }
3514
3514
  }
3515
- class VQ extends dA {
3515
+ class OQ extends dA {
3516
3516
  constructor(A, I) {
3517
3517
  super(), this.name = A, this.value = I;
3518
3518
  }
@@ -4391,7 +4391,7 @@ class qA {
4391
4391
  for (const I of this._functions.values()) I.info && (I.info.inUse = I.inUse, this._addCalls(I.node, I.info.calls));
4392
4392
  for (const I of this._functions.values()) I.node.search((g) => {
4393
4393
  var B, Q, E;
4394
- if (g instanceof VQ) {
4394
+ if (g instanceof OQ) {
4395
4395
  if (g.value) if (J(g.value)) for (const i of g.value) for (const o of this.overrides) i === o.name && ((B = I.info) === null || B === void 0 || B.overrides.push(o));
4396
4396
  else for (const i of this.overrides) g.value === i.name && ((Q = I.info) === null || Q === void 0 || Q.overrides.push(i));
4397
4397
  } else if (g instanceof wA) for (const i of this.overrides) g.name === i.name && ((E = I.info) === null || E === void 0 || E.overrides.push(i));
@@ -7167,7 +7167,7 @@ class io {
7167
7167
  let A = null;
7168
7168
  if (this._check(e.keywords.return)) A = this._return_statement();
7169
7169
  else if (this._check([e.keywords.var, e.keywords.let, e.keywords.const])) A = this._variable_statement();
7170
- else if (this._match(e.keywords.discard)) A = this._updateNode(new Oi());
7170
+ else if (this._match(e.keywords.discard)) A = this._updateNode(new Vi());
7171
7171
  else if (this._match(e.keywords.break)) {
7172
7172
  const I = this._updateNode(new mQ());
7173
7173
  if (this._currentLoop.length > 0) {
@@ -7737,7 +7737,7 @@ class io {
7737
7737
  const I = this._consume(e.tokens.ident, "identity expected.");
7738
7738
  A.push(I.toString());
7739
7739
  }
7740
- return this._updateNode(new Vi(A));
7740
+ return this._updateNode(new Oi(A));
7741
7741
  }
7742
7742
  _type_alias() {
7743
7743
  const A = this._consume(e.tokens.ident, "identity expected.");
@@ -7820,7 +7820,7 @@ class io {
7820
7820
  _attribute() {
7821
7821
  let A = [];
7822
7822
  for (; this._match(e.tokens.attr); ) {
7823
- const I = this._consume(e.attribute_name, "Expected attribute name"), g = this._updateNode(new VQ(I.toString(), null));
7823
+ const I = this._consume(e.attribute_name, "Expected attribute name"), g = this._updateNode(new OQ(I.toString(), null));
7824
7824
  if (this._match(e.tokens.paren_left)) {
7825
7825
  if (g.value = this._consume(e.literal_or_ident, "Expected attribute value").toString(), this._check(e.tokens.comma)) {
7826
7826
  this._advance();
@@ -7889,7 +7889,7 @@ function $A(C, A) {
7889
7889
  ];
7890
7890
  }));
7891
7891
  }
7892
- function OQ(C, A, I) {
7892
+ function VQ(C, A, I) {
7893
7893
  return {
7894
7894
  fields: Object.fromEntries(A.members.map((B) => [
7895
7895
  B.name,
@@ -8011,7 +8011,7 @@ function bg(C, A) {
8011
8011
  return I;
8012
8012
  }
8013
8013
  function ho(C) {
8014
- const A = new oo(C), I = Object.fromEntries(A.structs.map((a) => [a.name, OQ(A, a, 0)])), g = $A(A, A.uniforms), B = $A(A, A.immediates), Q = $A(A, A.storage.filter((a) => a.resourceType === sA.Storage)), E = $A(A, A.storage.filter((a) => a.resourceType === sA.StorageTexture)), i = $A(A, A.textures.filter((a) => a.type.name !== "texture_external")), o = $A(A, A.textures.filter((a) => a.type.name === "texture_external")), s = $A(A, A.samplers), t = {
8014
+ const A = new oo(C), I = Object.fromEntries(A.structs.map((a) => [a.name, VQ(A, a, 0)])), g = $A(A, A.uniforms), B = $A(A, A.immediates), Q = $A(A, A.storage.filter((a) => a.resourceType === sA.Storage)), E = $A(A, A.storage.filter((a) => a.resourceType === sA.StorageTexture)), i = $A(A, A.textures.filter((a) => a.type.name !== "texture_external")), o = $A(A, A.textures.filter((a) => a.type.name === "texture_external")), s = $A(A, A.samplers), t = {
8015
8015
  ...bg(A.entry.vertex, GPUShaderStage.VERTEX),
8016
8016
  ...bg(A.entry.fragment, GPUShaderStage.FRAGMENT),
8017
8017
  ...bg(A.entry.compute, GPUShaderStage.COMPUTE)
@@ -8057,7 +8057,7 @@ function HB(C, A, I) {
8057
8057
  };
8058
8058
  } else {
8059
8059
  if (A.isStruct)
8060
- return Tg(!A.isTemplate, "template struct is invalid"), OQ(C, A, I);
8060
+ return Tg(!A.isTemplate, "template struct is invalid"), VQ(C, A, I);
8061
8061
  {
8062
8062
  const g = A, B = A.isTemplate ? `${g.name}<${g.format.name}>` : A.name;
8063
8063
  return {
@@ -8614,11 +8614,11 @@ class Mo extends cQ {
8614
8614
  I.uniformsView.set({
8615
8615
  projection: this.currentProjection_,
8616
8616
  modelView: this.currentModelView_,
8617
- color: B.Color,
8618
- valueOffset: B.ValueOffset,
8619
- valueScale: B.ValueScale,
8617
+ color: B.u_color,
8618
+ valueOffset: B.u_valueOffset,
8619
+ valueScale: B.u_valueScale,
8620
8620
  opacity: this.currentLayerOpacity_ * Q,
8621
- zTexCoord: B.ZTexCoord
8621
+ zTexCoord: B.u_zTexCoord
8622
8622
  }), this.bindings_.setUniforms(this.passEncoder_, I);
8623
8623
  }
8624
8624
  setTexturesForObject(A, I) {
@@ -9371,7 +9371,7 @@ class Po {
9371
9371
  this.propagationStopped_ = !0;
9372
9372
  }
9373
9373
  }
9374
- class Vo {
9374
+ class Oo {
9375
9375
  listeners_ = [];
9376
9376
  element_;
9377
9377
  isConnected_ = !1;
@@ -9419,7 +9419,7 @@ class Vo {
9419
9419
  if (g(I), I.propagationStopped) break;
9420
9420
  };
9421
9421
  }
9422
- class Oo {
9422
+ class Vo {
9423
9423
  id;
9424
9424
  element;
9425
9425
  camera;
@@ -9431,7 +9431,7 @@ class Oo {
9431
9431
  context_;
9432
9432
  layers_ = [];
9433
9433
  constructor(A) {
9434
- 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 Vo(this.element), this.events.addEventListener((I) => {
9434
+ 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 Oo(this.element), this.events.addEventListener((I) => {
9435
9435
  if (I.event instanceof PointerEvent || I.event instanceof WheelEvent) {
9436
9436
  const { clientX: g, clientY: B } = I.event, Q = eA(g, B);
9437
9437
  I.clipPos = this.clientToClip(Q, 0), I.worldPos = this.camera.clipToWorld(I.clipPos);
@@ -9533,7 +9533,7 @@ function LC(C, A, I) {
9533
9533
  context: I
9534
9534
  };
9535
9535
  });
9536
- return _o(g), g.map((B) => new Oo(B));
9536
+ return _o(g), g.map((B) => new Vo(B));
9537
9537
  }
9538
9538
  class Xo {
9539
9539
  elements_;
@@ -10427,7 +10427,7 @@ function Pg(C, A, I) {
10427
10427
  };
10428
10428
  }
10429
10429
  }
10430
- function Vg(C, A, I) {
10430
+ function Og(C, A, I) {
10431
10431
  const g = A - C + 1n;
10432
10432
  switch (I) {
10433
10433
  case "clamp":
@@ -10488,7 +10488,7 @@ function xC(C, A, I, g, B) {
10488
10488
  return n(a(D));
10489
10489
  };
10490
10490
  } else if (Q && o) {
10491
- const a = mC(I), n = Vg(...Zg[A], g);
10491
+ const a = mC(I), n = Og(...Zg[A], g);
10492
10492
  s = (D) => {
10493
10493
  if (!Number.isFinite(D))
10494
10494
  throw new Error(`Cannot cast ${D} to integer type without scalar_map`);
@@ -10501,13 +10501,13 @@ function xC(C, A, I, g, B) {
10501
10501
  else if (!Q && !E && !i && !o)
10502
10502
  s = Pg(...vg[A], g);
10503
10503
  else if (!Q && !E && o) {
10504
- const a = Vg(...Zg[A], g);
10504
+ const a = Og(...Zg[A], g);
10505
10505
  s = (n) => a(BigInt(n));
10506
10506
  } else if (E && !i && !o) {
10507
10507
  const a = Pg(...vg[A], g);
10508
10508
  s = (n) => a(Number(n));
10509
10509
  } else if (E && o)
10510
- s = Vg(...Zg[A], g);
10510
+ s = Og(...Zg[A], g);
10511
10511
  else
10512
10512
  throw new Error(`Unhandled type combination: ${C} -> ${A}`);
10513
10513
  return B.length === 0 ? s : (a) => {
@@ -10817,10 +10817,10 @@ class Dg {
10817
10817
  return { data: B, shape: this.#A, stride: this.#I };
10818
10818
  }
10819
10819
  }
10820
- class VB {
10820
+ class OB {
10821
10821
  kind = "bytes_to_bytes";
10822
10822
  static fromConfig(A) {
10823
- return new VB();
10823
+ return new OB();
10824
10824
  }
10825
10825
  encode = iI("zlib");
10826
10826
  async decode(A) {
@@ -10829,7 +10829,7 @@ class VB {
10829
10829
  }
10830
10830
  }
10831
10831
  function Ss() {
10832
- 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 = () => WB, B = () => VB;
10832
+ 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 = () => WB, B = () => OB;
10833
10833
  return (/* @__PURE__ */ new Map()).set("blosc", C).set("lz4", A).set("zstd", I).set("gzip", g).set("zlib", B).set("transpose", () => PB).set("bytes", () => lg).set("crc32c", () => bB).set("vlen-utf8", () => Dg).set("json2", () => rg).set("bitround", () => ag).set("cast_value", () => xB).set("scale_offset", () => vB).set("numcodecs.blosc", C).set("numcodecs.lz4", A).set("numcodecs.zstd", I).set("numcodecs.gzip", g).set("numcodecs.zlib", B).set("numcodecs.vlen-utf8", () => Dg).set("numcodecs.shuffle", () => ZB).set("numcodecs.delta", () => TB).set("numcodecs.bitround", () => ag).set("numcodecs.json2", () => rg);
10834
10834
  }
10835
10835
  const Ns = Ss();
@@ -10967,7 +10967,7 @@ class UA {
10967
10967
  return new UA(this.store, decodeURIComponent(new URL(A, I).pathname));
10968
10968
  }
10969
10969
  }
10970
- class OB extends UA {
10970
+ class VB extends UA {
10971
10971
  kind = "group";
10972
10972
  #A;
10973
10973
  constructor(A, I, g) {
@@ -11135,7 +11135,7 @@ async function Ys(C, A) {
11135
11135
  }
11136
11136
  async function Ms(C, A = {}) {
11137
11137
  let I = "store" in C ? C : new UA(C), { signal: g } = A, B = {};
11138
- return (A.attrs ?? !0) && (B = await Ys(I, g)), g?.throwIfAborted(), A.kind === "array" ? PC(I, B, g) : A.kind === "group" ? VC(I, B, g) : PC(I, B, g).catch((Q) => ($Q(Q, kI, nA), VC(I, B, g)));
11138
+ return (A.attrs ?? !0) && (B = await Ys(I, g)), g?.throwIfAborted(), A.kind === "array" ? PC(I, B, g) : A.kind === "group" ? OC(I, B, g) : PC(I, B, g).catch((Q) => ($Q(Q, kI, nA), OC(I, B, g)));
11139
11139
  }
11140
11140
  async function PC(C, A, I) {
11141
11141
  let { path: g } = C.resolve(".zarray"), B = await C.store.get(g, { signal: I });
@@ -11143,22 +11143,22 @@ async function PC(C, A, I) {
11143
11143
  throw new kI("v2 array", { path: g });
11144
11144
  return Lg.increment(C.store, "v2"), gE(new hg(C.store, C.path, Cs(PI(B), A)));
11145
11145
  }
11146
- async function VC(C, A, I) {
11146
+ async function OC(C, A, I) {
11147
11147
  let { path: g } = C.resolve(".zgroup"), B = await C.store.get(g, { signal: I });
11148
11148
  if (!B)
11149
11149
  throw new kI("v2 group", { path: g });
11150
- return Lg.increment(C.store, "v2"), new OB(C.store, C.path, Qs(PI(B), A));
11150
+ return Lg.increment(C.store, "v2"), new VB(C.store, C.path, Qs(PI(B), A));
11151
11151
  }
11152
11152
  async function fs(C, A) {
11153
11153
  let { store: I, path: g } = C.resolve("zarr.json"), B = await C.store.get(g, { signal: A });
11154
11154
  if (!B)
11155
11155
  throw new kI("v3 array or group", { path: g });
11156
11156
  let Q = PI(B);
11157
- return Q.node_type === "array" && (Q.fill_value = zQ(Q)), Q.node_type === "array" ? gE(new hg(I, C.path, Q)) : new OB(I, C.path, Q);
11157
+ return Q.node_type === "array" && (Q.fill_value = zQ(Q)), Q.node_type === "array" ? gE(new hg(I, C.path, Q)) : new VB(I, C.path, Q);
11158
11158
  }
11159
11159
  async function us(C, A = {}) {
11160
11160
  let I = "store" in C ? C : new UA(C), g = await fs(I, A.signal);
11161
- if (Lg.increment(I.store, "v3"), A.kind === void 0 || A.kind === "array" && g instanceof hg || A.kind === "group" && g instanceof OB)
11161
+ if (Lg.increment(I.store, "v3"), A.kind === void 0 || A.kind === "array" && g instanceof hg || A.kind === "group" && g instanceof VB)
11162
11162
  return g;
11163
11163
  let B = g instanceof hg ? "array" : "group";
11164
11164
  throw new kI(`${A.kind} at ${I.path}`, {
@@ -11199,7 +11199,7 @@ class _B {
11199
11199
  return new Uint8Array(B);
11200
11200
  }
11201
11201
  }
11202
- async function VI(C, A) {
11202
+ async function OI(C, A) {
11203
11203
  if (A === "v2")
11204
11204
  try {
11205
11205
  return RA.v2(C, { kind: "group", attrs: !0 });
@@ -14972,11 +14972,11 @@ return ret;
14972
14972
  default: IQ
14973
14973
  });
14974
14974
  //# sourceMappingURL=worker_kernel-CBlE4MBI.js.map
14975
- `, OC = typeof self < "u" && self.Blob && new Blob(["URL.revokeObjectURL(import.meta.url);", BE], { type: "text/javascript;charset=utf-8" });
14975
+ `, VC = typeof self < "u" && self.Blob && new Blob(["URL.revokeObjectURL(import.meta.url);", BE], { type: "text/javascript;charset=utf-8" });
14976
14976
  function bs(C) {
14977
14977
  let A;
14978
14978
  try {
14979
- if (A = OC && (self.URL || self.webkitURL).createObjectURL(OC), !A) throw "";
14979
+ if (A = VC && (self.URL || self.webkitURL).createObjectURL(VC), !A) throw "";
14980
14980
  const I = new Worker(A, {
14981
14981
  type: "module",
14982
14982
  name: C?.name
@@ -15095,7 +15095,7 @@ async function Ps(C, A, I, g) {
15095
15095
  });
15096
15096
  });
15097
15097
  }
15098
- function Vs() {
15098
+ function Os() {
15099
15099
  if (!(JA.length > 0))
15100
15100
  try {
15101
15101
  for (let C = 0; C < Ts; C++) {
@@ -15115,8 +15115,8 @@ function Vs() {
15115
15115
  return;
15116
15116
  }
15117
15117
  }
15118
- async function Os(C, A, I, g, B) {
15119
- Vs();
15118
+ async function Vs(C, A, I, g, B) {
15119
+ Os();
15120
15120
  try {
15121
15121
  return await Ps(
15122
15122
  A,
@@ -15183,7 +15183,7 @@ class Xs {
15183
15183
  },
15184
15184
  cChunkSize: E?.chunkSize,
15185
15185
  tChunkSize: i?.chunkSize
15186
- }, s = await Os(
15186
+ }, s = await Vs(
15187
15187
  B,
15188
15188
  Q,
15189
15189
  g,
@@ -15250,7 +15250,7 @@ function $s(C) {
15250
15250
  }
15251
15251
  return !0;
15252
15252
  }
15253
- var V;
15253
+ var O;
15254
15254
  (function(C) {
15255
15255
  C.assertEqual = (B) => {
15256
15256
  };
@@ -15286,7 +15286,7 @@ var V;
15286
15286
  return B.map((E) => typeof E == "string" ? `'${E}'` : E).join(Q);
15287
15287
  }
15288
15288
  C.joinValues = g, C.jsonStringifyReplacer = (B, Q) => typeof Q == "bigint" ? Q.toString() : Q;
15289
- })(V || (V = {}));
15289
+ })(O || (O = {}));
15290
15290
  var jC;
15291
15291
  (function(C) {
15292
15292
  C.mergeShapes = (A, I) => ({
@@ -15295,7 +15295,7 @@ var jC;
15295
15295
  // second overwrites first
15296
15296
  });
15297
15297
  })(jC || (jC = {}));
15298
- const f = V.arrayToEnum([
15298
+ const f = O.arrayToEnum([
15299
15299
  "string",
15300
15300
  "nan",
15301
15301
  "number",
@@ -15337,7 +15337,7 @@ const f = V.arrayToEnum([
15337
15337
  default:
15338
15338
  return f.unknown;
15339
15339
  }
15340
- }, d = V.arrayToEnum([
15340
+ }, d = O.arrayToEnum([
15341
15341
  "invalid_type",
15342
15342
  "invalid_literal",
15343
15343
  "custom",
@@ -15399,7 +15399,7 @@ class vA extends Error {
15399
15399
  return this.message;
15400
15400
  }
15401
15401
  get message() {
15402
- return JSON.stringify(this.issues, V.jsonStringifyReplacer, 2);
15402
+ return JSON.stringify(this.issues, O.jsonStringifyReplacer, 2);
15403
15403
  }
15404
15404
  get isEmpty() {
15405
15405
  return this.issues.length === 0;
@@ -15426,19 +15426,19 @@ const aB = (C, A) => {
15426
15426
  C.received === f.undefined ? I = "Required" : I = `Expected ${C.expected}, received ${C.received}`;
15427
15427
  break;
15428
15428
  case d.invalid_literal:
15429
- I = `Invalid literal value, expected ${JSON.stringify(C.expected, V.jsonStringifyReplacer)}`;
15429
+ I = `Invalid literal value, expected ${JSON.stringify(C.expected, O.jsonStringifyReplacer)}`;
15430
15430
  break;
15431
15431
  case d.unrecognized_keys:
15432
- I = `Unrecognized key(s) in object: ${V.joinValues(C.keys, ", ")}`;
15432
+ I = `Unrecognized key(s) in object: ${O.joinValues(C.keys, ", ")}`;
15433
15433
  break;
15434
15434
  case d.invalid_union:
15435
15435
  I = "Invalid input";
15436
15436
  break;
15437
15437
  case d.invalid_union_discriminator:
15438
- I = `Invalid discriminator value. Expected ${V.joinValues(C.options)}`;
15438
+ I = `Invalid discriminator value. Expected ${O.joinValues(C.options)}`;
15439
15439
  break;
15440
15440
  case d.invalid_enum_value:
15441
- I = `Invalid enum value. Expected ${V.joinValues(C.options)}, received '${C.received}'`;
15441
+ I = `Invalid enum value. Expected ${O.joinValues(C.options)}, received '${C.received}'`;
15442
15442
  break;
15443
15443
  case d.invalid_arguments:
15444
15444
  I = "Invalid function arguments";
@@ -15450,7 +15450,7 @@ const aB = (C, A) => {
15450
15450
  I = "Invalid date";
15451
15451
  break;
15452
15452
  case d.invalid_string:
15453
- typeof C.validation == "object" ? "includes" in C.validation ? (I = `Invalid input: must include "${C.validation.includes}"`, typeof C.validation.position == "number" && (I = `${I} at one or more positions greater than or equal to ${C.validation.position}`)) : "startsWith" in C.validation ? I = `Invalid input: must start with "${C.validation.startsWith}"` : "endsWith" in C.validation ? I = `Invalid input: must end with "${C.validation.endsWith}"` : V.assertNever(C.validation) : C.validation !== "regex" ? I = `Invalid ${C.validation}` : I = "Invalid";
15453
+ typeof C.validation == "object" ? "includes" in C.validation ? (I = `Invalid input: must include "${C.validation.includes}"`, typeof C.validation.position == "number" && (I = `${I} at one or more positions greater than or equal to ${C.validation.position}`)) : "startsWith" in C.validation ? I = `Invalid input: must start with "${C.validation.startsWith}"` : "endsWith" in C.validation ? I = `Invalid input: must end with "${C.validation.endsWith}"` : O.assertNever(C.validation) : C.validation !== "regex" ? I = `Invalid ${C.validation}` : I = "Invalid";
15454
15454
  break;
15455
15455
  case d.too_small:
15456
15456
  C.type === "array" ? I = `Array must contain ${C.exact ? "exactly" : C.inclusive ? "at least" : "more than"} ${C.minimum} element(s)` : C.type === "string" ? I = `String must contain ${C.exact ? "exactly" : C.inclusive ? "at least" : "over"} ${C.minimum} character(s)` : C.type === "number" ? I = `Number must be ${C.exact ? "exactly equal to " : C.inclusive ? "greater than or equal to " : "greater than "}${C.minimum}` : C.type === "bigint" ? I = `Number must be ${C.exact ? "exactly equal to " : C.inclusive ? "greater than or equal to " : "greater than "}${C.minimum}` : C.type === "date" ? I = `Date must be ${C.exact ? "exactly equal to " : C.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(C.minimum))}` : I = "Invalid input";
@@ -15471,7 +15471,7 @@ const aB = (C, A) => {
15471
15471
  I = "Number must be finite";
15472
15472
  break;
15473
15473
  default:
15474
- I = A.defaultError, V.assertNever(C);
15474
+ I = A.defaultError, O.assertNever(C);
15475
15475
  }
15476
15476
  return { message: I };
15477
15477
  };
@@ -15819,7 +15819,7 @@ class Z {
15819
15819
  }
15820
15820
  }
15821
15821
  const Bt = /^c[^\s-]{8,}$/i, Ct = /^[0-9a-z]+$/, Qt = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Et = /^[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, it = /^[a-z0-9_-]{21}$/i, ot = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, st = /^[-+]?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)?)??$/, tt = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, at = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
15822
- let Og;
15822
+ let Vg;
15823
15823
  const et = /^(?:(?: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])$/, nt = /^(?:(?: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])$/, rt = /^(([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]))$/, Dt = /^(([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])$/, ht = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, yt = /^([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])))", ct = new RegExp(`^${iE}$`);
15824
15824
  function oE(C) {
15825
15825
  let A = "[0-5]\\d";
@@ -15854,7 +15854,7 @@ function St(C, A) {
15854
15854
  function Nt(C, A) {
15855
15855
  return !!((A === "v4" || !A) && nt.test(C) || (A === "v6" || !A) && Dt.test(C));
15856
15856
  }
15857
- class VA extends Z {
15857
+ class OA extends Z {
15858
15858
  _parse(A) {
15859
15859
  if (this._def.coerce && (A.data = String(A.data)), this._getType(A) !== f.string) {
15860
15860
  const Q = this._getOrReturnCtx(A);
@@ -15909,7 +15909,7 @@ class VA extends Z {
15909
15909
  message: Q.message
15910
15910
  }), g.dirty());
15911
15911
  else if (Q.kind === "emoji")
15912
- Og || (Og = new RegExp(at, "u")), Og.test(A.data) || (B = this._getOrReturnCtx(A, B), Y(B, {
15912
+ Vg || (Vg = new RegExp(at, "u")), Vg.test(A.data) || (B = this._getOrReturnCtx(A, B), Y(B, {
15913
15913
  validation: "emoji",
15914
15914
  code: d.invalid_string,
15915
15915
  message: Q.message
@@ -16006,7 +16006,7 @@ class VA extends Z {
16006
16006
  validation: "base64url",
16007
16007
  code: d.invalid_string,
16008
16008
  message: Q.message
16009
- }), g.dirty()) : V.assertNever(Q);
16009
+ }), g.dirty()) : O.assertNever(Q);
16010
16010
  return { status: g.value, value: A.data };
16011
16011
  }
16012
16012
  _regex(A, I, g) {
@@ -16017,7 +16017,7 @@ class VA extends Z {
16017
16017
  });
16018
16018
  }
16019
16019
  _addCheck(A) {
16020
- return new VA({
16020
+ return new OA({
16021
16021
  ...this._def,
16022
16022
  checks: [...this._def.checks, A]
16023
16023
  });
@@ -16153,19 +16153,19 @@ class VA extends Z {
16153
16153
  return this.min(1, K.errToObj(A));
16154
16154
  }
16155
16155
  trim() {
16156
- return new VA({
16156
+ return new OA({
16157
16157
  ...this._def,
16158
16158
  checks: [...this._def.checks, { kind: "trim" }]
16159
16159
  });
16160
16160
  }
16161
16161
  toLowerCase() {
16162
- return new VA({
16162
+ return new OA({
16163
16163
  ...this._def,
16164
16164
  checks: [...this._def.checks, { kind: "toLowerCase" }]
16165
16165
  });
16166
16166
  }
16167
16167
  toUpperCase() {
16168
- return new VA({
16168
+ return new OA({
16169
16169
  ...this._def,
16170
16170
  checks: [...this._def.checks, { kind: "toUpperCase" }]
16171
16171
  });
@@ -16231,7 +16231,7 @@ class VA extends Z {
16231
16231
  return A;
16232
16232
  }
16233
16233
  }
16234
- VA.create = (C) => new VA({
16234
+ OA.create = (C) => new OA({
16235
16235
  checks: [],
16236
16236
  typeName: x.ZodString,
16237
16237
  coerce: C?.coerce ?? !1,
@@ -16257,7 +16257,7 @@ class cI extends Z {
16257
16257
  let g;
16258
16258
  const B = new NA();
16259
16259
  for (const Q of this._def.checks)
16260
- Q.kind === "int" ? V.isInteger(A.data) || (g = this._getOrReturnCtx(A, g), Y(g, {
16260
+ Q.kind === "int" ? O.isInteger(A.data) || (g = this._getOrReturnCtx(A, g), Y(g, {
16261
16261
  code: d.invalid_type,
16262
16262
  expected: "integer",
16263
16263
  received: "float",
@@ -16283,7 +16283,7 @@ class cI extends Z {
16283
16283
  }), B.dirty()) : Q.kind === "finite" ? Number.isFinite(A.data) || (g = this._getOrReturnCtx(A, g), Y(g, {
16284
16284
  code: d.not_finite,
16285
16285
  message: Q.message
16286
- }), B.dirty()) : V.assertNever(Q);
16286
+ }), B.dirty()) : O.assertNever(Q);
16287
16287
  return { status: B.value, value: A.data };
16288
16288
  }
16289
16289
  gte(A, I) {
@@ -16395,7 +16395,7 @@ class cI extends Z {
16395
16395
  return A;
16396
16396
  }
16397
16397
  get isInt() {
16398
- return !!this._def.checks.find((A) => A.kind === "int" || A.kind === "multipleOf" && V.isInteger(A.value));
16398
+ return !!this._def.checks.find((A) => A.kind === "int" || A.kind === "multipleOf" && O.isInteger(A.value));
16399
16399
  }
16400
16400
  get isFinite() {
16401
16401
  let A = null, I = null;
@@ -16445,7 +16445,7 @@ class xI extends Z {
16445
16445
  code: d.not_multiple_of,
16446
16446
  multipleOf: Q.value,
16447
16447
  message: Q.message
16448
- }), B.dirty()) : V.assertNever(Q);
16448
+ }), B.dirty()) : O.assertNever(Q);
16449
16449
  return { status: B.value, value: A.data };
16450
16450
  }
16451
16451
  _getInvalidInput(A) {
@@ -16597,7 +16597,7 @@ class wg extends Z {
16597
16597
  exact: !1,
16598
16598
  maximum: Q.value,
16599
16599
  type: "date"
16600
- }), g.dirty()) : V.assertNever(Q);
16600
+ }), g.dirty()) : O.assertNever(Q);
16601
16601
  return {
16602
16602
  status: g.value,
16603
16603
  value: new Date(A.data.getTime())
@@ -16844,7 +16844,7 @@ class aA extends Z {
16844
16844
  _getCached() {
16845
16845
  if (this._cached !== null)
16846
16846
  return this._cached;
16847
- const A = this._def.shape(), I = V.objectKeys(A);
16847
+ const A = this._def.shape(), I = O.objectKeys(A);
16848
16848
  return this._cached = { shape: A, keys: I }, this._cached;
16849
16849
  }
16850
16850
  _parse(A) {
@@ -17050,7 +17050,7 @@ class aA extends Z {
17050
17050
  }
17051
17051
  pick(A) {
17052
17052
  const I = {};
17053
- for (const g of V.objectKeys(A))
17053
+ for (const g of O.objectKeys(A))
17054
17054
  A[g] && this.shape[g] && (I[g] = this.shape[g]);
17055
17055
  return new aA({
17056
17056
  ...this._def,
@@ -17059,7 +17059,7 @@ class aA extends Z {
17059
17059
  }
17060
17060
  omit(A) {
17061
17061
  const I = {};
17062
- for (const g of V.objectKeys(this.shape))
17062
+ for (const g of O.objectKeys(this.shape))
17063
17063
  A[g] || (I[g] = this.shape[g]);
17064
17064
  return new aA({
17065
17065
  ...this._def,
@@ -17074,7 +17074,7 @@ class aA extends Z {
17074
17074
  }
17075
17075
  partial(A) {
17076
17076
  const I = {};
17077
- for (const g of V.objectKeys(this.shape)) {
17077
+ for (const g of O.objectKeys(this.shape)) {
17078
17078
  const B = this.shape[g];
17079
17079
  A && !A[g] ? I[g] = B : I[g] = B.optional();
17080
17080
  }
@@ -17085,7 +17085,7 @@ class aA extends Z {
17085
17085
  }
17086
17086
  required(A) {
17087
17087
  const I = {};
17088
- for (const g of V.objectKeys(this.shape))
17088
+ for (const g of O.objectKeys(this.shape))
17089
17089
  if (A && !A[g])
17090
17090
  I[g] = this.shape[g];
17091
17091
  else {
@@ -17100,7 +17100,7 @@ class aA extends Z {
17100
17100
  });
17101
17101
  }
17102
17102
  keyof() {
17103
- return sE(V.objectKeys(this.shape));
17103
+ return sE(O.objectKeys(this.shape));
17104
17104
  }
17105
17105
  }
17106
17106
  aA.create = (C, A) => new aA({
@@ -17202,7 +17202,7 @@ function rB(C, A) {
17202
17202
  if (C === A)
17203
17203
  return { valid: !0, data: C };
17204
17204
  if (I === f.object && g === f.object) {
17205
- const B = V.objectKeys(A), Q = V.objectKeys(C).filter((i) => B.indexOf(i) !== -1), E = { ...C, ...A };
17205
+ const B = O.objectKeys(A), Q = O.objectKeys(C).filter((i) => B.indexOf(i) !== -1), E = { ...C, ...A };
17206
17206
  for (const i of Q) {
17207
17207
  const o = rB(C[i], A[i]);
17208
17208
  if (!o.valid)
@@ -17470,7 +17470,7 @@ class wI extends Z {
17470
17470
  if (typeof A.data != "string") {
17471
17471
  const I = this._getOrReturnCtx(A), g = this._def.values;
17472
17472
  return Y(I, {
17473
- expected: V.joinValues(g),
17473
+ expected: O.joinValues(g),
17474
17474
  received: I.parsedType,
17475
17475
  code: d.invalid_type
17476
17476
  }), m;
@@ -17522,17 +17522,17 @@ class wI extends Z {
17522
17522
  wI.create = sE;
17523
17523
  class oQ extends Z {
17524
17524
  _parse(A) {
17525
- const I = V.getValidEnumValues(this._def.values), g = this._getOrReturnCtx(A);
17525
+ const I = O.getValidEnumValues(this._def.values), g = this._getOrReturnCtx(A);
17526
17526
  if (g.parsedType !== f.string && g.parsedType !== f.number) {
17527
- const B = V.objectValues(I);
17527
+ const B = O.objectValues(I);
17528
17528
  return Y(g, {
17529
- expected: V.joinValues(B),
17529
+ expected: O.joinValues(B),
17530
17530
  received: g.parsedType,
17531
17531
  code: d.invalid_type
17532
17532
  }), m;
17533
17533
  }
17534
- if (this._cache || (this._cache = new Set(V.getValidEnumValues(this._def.values))), !this._cache.has(A.data)) {
17535
- const B = V.objectValues(I);
17534
+ if (this._cache || (this._cache = new Set(O.getValidEnumValues(this._def.values))), !this._cache.has(A.data)) {
17535
+ const B = O.objectValues(I);
17536
17536
  return Y(g, {
17537
17537
  received: g.data,
17538
17538
  code: d.invalid_enum_value,
@@ -17651,7 +17651,7 @@ class GI extends Z {
17651
17651
  status: I.value,
17652
17652
  value: i
17653
17653
  })) : m);
17654
- V.assertNever(B);
17654
+ O.assertNever(B);
17655
17655
  }
17656
17656
  }
17657
17657
  GI.create = (C, A, I) => new GI({
@@ -17843,7 +17843,7 @@ var x;
17843
17843
  (function(C) {
17844
17844
  C.ZodString = "ZodString", C.ZodNumber = "ZodNumber", C.ZodNaN = "ZodNaN", C.ZodBigInt = "ZodBigInt", C.ZodBoolean = "ZodBoolean", C.ZodDate = "ZodDate", C.ZodSymbol = "ZodSymbol", C.ZodUndefined = "ZodUndefined", C.ZodNull = "ZodNull", C.ZodAny = "ZodAny", C.ZodUnknown = "ZodUnknown", C.ZodNever = "ZodNever", C.ZodVoid = "ZodVoid", C.ZodArray = "ZodArray", C.ZodObject = "ZodObject", C.ZodUnion = "ZodUnion", C.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", C.ZodIntersection = "ZodIntersection", C.ZodTuple = "ZodTuple", C.ZodRecord = "ZodRecord", C.ZodMap = "ZodMap", C.ZodSet = "ZodSet", C.ZodFunction = "ZodFunction", C.ZodLazy = "ZodLazy", C.ZodLiteral = "ZodLiteral", C.ZodEnum = "ZodEnum", C.ZodEffects = "ZodEffects", C.ZodNativeEnum = "ZodNativeEnum", C.ZodOptional = "ZodOptional", C.ZodNullable = "ZodNullable", C.ZodDefault = "ZodDefault", C.ZodCatch = "ZodCatch", C.ZodPromise = "ZodPromise", C.ZodBranded = "ZodBranded", C.ZodPipeline = "ZodPipeline", C.ZodReadonly = "ZodReadonly";
17845
17845
  })(x || (x = {}));
17846
- const z = VA.create, T = cI.create, tE = eB.create, OA = nB.create;
17846
+ const z = OA.create, T = cI.create, tE = eB.create, VA = nB.create;
17847
17847
  zA.create;
17848
17848
  const j = pA.create, q = aA.create;
17849
17849
  Gg.create;
@@ -17862,7 +17862,7 @@ const Ut = q({
17862
17862
  q({
17863
17863
  path: z(),
17864
17864
  coordinateTransformations: j(
17865
- OA().superRefine((C, A) => {
17865
+ VA().superRefine((C, A) => {
17866
17866
  const I = [
17867
17867
  q({
17868
17868
  type: yA("scale"),
@@ -17890,7 +17890,7 @@ const Ut = q({
17890
17890
  ).min(1),
17891
17891
  version: yA("0.4").optional(),
17892
17892
  axes: j(
17893
- OA().superRefine((C, A) => {
17893
+ VA().superRefine((C, A) => {
17894
17894
  const I = [
17895
17895
  q({
17896
17896
  name: z(),
@@ -17898,7 +17898,7 @@ const Ut = q({
17898
17898
  }),
17899
17899
  q({
17900
17900
  name: z(),
17901
- type: OA().refine(
17901
+ type: VA().refine(
17902
17902
  (B) => !nI(["space", "time", "channel"]).safeParse(B).success,
17903
17903
  "Invalid input: Should NOT be valid against schema"
17904
17904
  ).optional()
@@ -17918,7 +17918,7 @@ const Ut = q({
17918
17918
  })
17919
17919
  ).min(2).max(5),
17920
17920
  coordinateTransformations: j(
17921
- OA().superRefine((C, A) => {
17921
+ VA().superRefine((C, A) => {
17922
17922
  const I = [
17923
17923
  q({
17924
17924
  type: yA("scale"),
@@ -18065,7 +18065,7 @@ const Ut = q({
18065
18065
  q({
18066
18066
  path: z(),
18067
18067
  coordinateTransformations: j(
18068
- OA().superRefine((C, A) => {
18068
+ VA().superRefine((C, A) => {
18069
18069
  const I = [
18070
18070
  q({
18071
18071
  type: yA("scale"),
@@ -18090,7 +18090,7 @@ const Ut = q({
18090
18090
  })
18091
18091
  ).min(1),
18092
18092
  axes: j(
18093
- OA().superRefine((C, A) => {
18093
+ VA().superRefine((C, A) => {
18094
18094
  const I = [
18095
18095
  q({
18096
18096
  name: z(),
@@ -18098,7 +18098,7 @@ const Ut = q({
18098
18098
  }),
18099
18099
  q({
18100
18100
  name: z(),
18101
- type: OA().refine(
18101
+ type: VA().refine(
18102
18102
  (B) => !nI(["space", "time", "channel"]).safeParse(B).success,
18103
18103
  "Invalid input: Should NOT be valid against schema"
18104
18104
  ).optional()
@@ -18118,7 +18118,7 @@ const Ut = q({
18118
18118
  })
18119
18119
  ).min(2).max(5),
18120
18120
  coordinateTransformations: j(
18121
- OA().superRefine((C, A) => {
18121
+ VA().superRefine((C, A) => {
18122
18122
  const I = [
18123
18123
  q({
18124
18124
  type: yA("scale"),
@@ -18290,7 +18290,7 @@ function aE(C, A) {
18290
18290
  return delete I[A], I;
18291
18291
  }
18292
18292
  async function Fa(C, A) {
18293
- const I = new WI(C), g = new UA(I), B = SI(A), Q = await VI(g, B);
18293
+ const I = new WI(C), g = new UA(I), B = SI(A), Q = await OI(g, B);
18294
18294
  try {
18295
18295
  return Kt(Q.attrs);
18296
18296
  } catch {
@@ -18349,7 +18349,7 @@ function pt(C) {
18349
18349
  }
18350
18350
  }
18351
18351
  async function Sa(C, A, I) {
18352
- const g = C + "/" + A, B = new WI(g), Q = new UA(B), E = SI(I), i = await VI(Q, E);
18352
+ const g = C + "/" + A, B = new WI(g), Q = new UA(B), E = SI(I), i = await OI(Q, E);
18353
18353
  try {
18354
18354
  return pt(i.attrs);
18355
18355
  } catch {
@@ -18360,11 +18360,11 @@ ${JSON.stringify(i.attrs)}`
18360
18360
  }
18361
18361
  }
18362
18362
  async function Na(C) {
18363
- const A = SI(C.version), I = await VI(C.location, A);
18363
+ const A = SI(C.version), I = await OI(C.location, A);
18364
18364
  return zB(I.attrs).omero?.channels ?? [];
18365
18365
  }
18366
18366
  async function Ra(C) {
18367
- const A = SI(C.version), I = await VI(C.location, A);
18367
+ const A = SI(C.version), I = await OI(C.location, A);
18368
18368
  return zB(I.attrs).omero?.rdefs;
18369
18369
  }
18370
18370
  function mt(C) {
@@ -18407,7 +18407,7 @@ class MI {
18407
18407
  }
18408
18408
  static async openLoader(A, I) {
18409
18409
  let g = SI(I);
18410
- const B = await VI(A, g), Q = zB(B.attrs), E = Q.multiscales;
18410
+ const B = await OI(A, g), Q = zB(B.attrs), E = Q.multiscales;
18411
18411
  if (E.length !== 1)
18412
18412
  throw new Error(
18413
18413
  `Exactly one multiscale image is supported. Found ${E.length} images.`
@@ -18638,7 +18638,7 @@ class vt {
18638
18638
  return bA(this.translation_);
18639
18639
  }
18640
18640
  addScale(A) {
18641
- OE(this.scale_, this.scale_, A), this.dirty_ = !0;
18641
+ VE(this.scale_, this.scale_, A), this.dirty_ = !0;
18642
18642
  }
18643
18643
  setScale(A) {
18644
18644
  $g(this.scale_, A), this.dirty_ = !0;
@@ -18747,8 +18747,8 @@ class Zt extends dI {
18747
18747
  }
18748
18748
  getUniforms() {
18749
18749
  return {
18750
- LineColor: this.color.rgb,
18751
- LineWidth: this.width
18750
+ u_lineColor: this.color.rgb,
18751
+ u_lineWidth: this.width
18752
18752
  };
18753
18753
  }
18754
18754
  }
@@ -18851,13 +18851,13 @@ class nE extends NI {
18851
18851
  });
18852
18852
  }
18853
18853
  }
18854
- class Vt extends dI {
18854
+ class Ot extends dI {
18855
18855
  channels_;
18856
18856
  // The layer overwrites this per chunk with a texel-centered slice coordinate.
18857
18857
  // 0.5 (the texture's center) is a safe placeholder until it does.
18858
18858
  zTexCoord = 0.5;
18859
18859
  constructor(A, I, g, B = []) {
18860
- super(), this.geometry = new nE(A, I, 1, 1), this.setTexture(0, g), this.channels_ = wB(g, B), this.programName = Ot(g);
18860
+ super(), this.geometry = new nE(A, I, 1, 1), this.setTexture(0, g), this.channels_ = wB(g, B), this.programName = Vt(g);
18861
18861
  }
18862
18862
  get type() {
18863
18863
  return "ImageRenderable";
@@ -18878,16 +18878,16 @@ class Vt extends dI {
18878
18878
  throw new Error("No texture set");
18879
18879
  const { color: I, contrastLimits: g, opacity: B } = this.channels_[0] ?? TI(A, {});
18880
18880
  return {
18881
- ImageSampler: 0,
18882
- Color: I.rgb,
18883
- ValueOffset: -g[0],
18884
- ValueScale: 1 / (g[1] - g[0]),
18881
+ u_imageSampler: 0,
18882
+ u_color: I.rgb,
18883
+ u_valueOffset: -g[0],
18884
+ u_valueScale: 1 / (g[1] - g[0]),
18885
18885
  Opacity: B,
18886
- ZTexCoord: this.zTexCoord
18886
+ u_zTexCoord: this.zTexCoord
18887
18887
  };
18888
18888
  }
18889
18889
  }
18890
- function Ot(C) {
18890
+ function Vt(C) {
18891
18891
  switch (C.dataType) {
18892
18892
  case "byte":
18893
18893
  case "int":
@@ -19063,7 +19063,7 @@ class DE extends Jg {
19063
19063
  return this.channelProps_ ? [this.channelProps_[A.chunkIndex.c] ?? {}] : [{}];
19064
19064
  }
19065
19065
  createImage(A) {
19066
- const I = new Vt(
19066
+ const I = new Ot(
19067
19067
  A.shape.x,
19068
19068
  A.shape.y,
19069
19069
  TA.createWithChunk(A),
@@ -19259,14 +19259,14 @@ class Xt extends dI {
19259
19259
  I[n * 3] = a.color.rgb[0], I[n * 3 + 1] = a.color.rgb[1], I[n * 3 + 2] = a.color.rgb[2], E.push(s), g[n] = -a.contrastLimits[0], B[n] = 1 / (a.contrastLimits[1] - a.contrastLimits[0]), A[n] = 1, Q[n] = a.opacity;
19260
19260
  }
19261
19261
  return E.reduce(
19262
- (o, s, t) => (o[`Channel${t}Sampler`] = s, o),
19262
+ (o, s, t) => (o[`u_channel${t}Sampler`] = s, o),
19263
19263
  {
19264
- Visible: A,
19265
- "Color[0]": I,
19266
- ValueOffset: g,
19267
- ValueScale: B,
19268
- ChannelOpacity: Q,
19269
- VoxelScale: [
19264
+ u_visible: A,
19265
+ "u_color[0]": I,
19266
+ u_valueOffset: g,
19267
+ u_valueScale: B,
19268
+ u_channelOpacity: Q,
19269
+ u_voxelScale: [
19270
19270
  this.voxelScale[0],
19271
19271
  this.voxelScale[1],
19272
19272
  this.voxelScale[2]
@@ -19459,10 +19459,10 @@ class Ua extends Jg {
19459
19459
  }
19460
19460
  getUniforms() {
19461
19461
  return {
19462
- DebugShowDegenerateRays: Number(this.debugShowDegenerateRays),
19463
- RelativeStepSize: this.relativeStepSize * this.interactiveStepSizeScale_,
19464
- OpacityMultiplier: this.opacityMultiplier,
19465
- EarlyTerminationAlpha: this.earlyTerminationAlpha
19462
+ u_debugShowDegenerateRays: Number(this.debugShowDegenerateRays),
19463
+ u_relativeStepSize: this.relativeStepSize * this.interactiveStepSizeScale_,
19464
+ u_opacityMultiplier: this.opacityMultiplier,
19465
+ u_earlyTerminationAlpha: this.earlyTerminationAlpha
19466
19466
  };
19467
19467
  }
19468
19468
  }
@@ -19566,12 +19566,12 @@ class Qa extends dI {
19566
19566
  }
19567
19567
  getUniforms() {
19568
19568
  return {
19569
- ImageSampler: 0,
19570
- ColorCycleSampler: 1,
19571
- ColorLookupTableSampler: 2,
19569
+ u_imageSampler: 0,
19570
+ u_colorCycleSampler: 1,
19571
+ u_colorLookupTableSampler: 2,
19572
19572
  u_outlineSelected: this.outlineSelected_ ? 1 : 0,
19573
19573
  u_selectedValue: this.selectedValue_ ?? -1,
19574
- ZTexCoord: this.zTexCoord
19574
+ u_zTexCoord: this.zTexCoord
19575
19575
  };
19576
19576
  }
19577
19577
  setColorMap(A) {
@@ -20377,7 +20377,7 @@ export {
20377
20377
  X as Color,
20378
20378
  XQ as Idetik,
20379
20379
  DE as ImageLayer,
20380
- Vt as ImageRenderable,
20380
+ Ot as ImageRenderable,
20381
20381
  aQ as LabelColorMap,
20382
20382
  Qa as LabelImageRenderable,
20383
20383
  hE as LabelLayer,