@viji-dev/core 0.7.0 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@ function es(t) {
13
13
  }
14
14
  throw new Error(`Invalid color input: expected string or object, got ${typeof t}`);
15
15
  }
16
- function _n(t) {
16
+ function kn(t) {
17
17
  const e = /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(t);
18
18
  if (!e)
19
19
  throw new Error(`Expected canonical hex '#rrggbb', got: ${t}`);
@@ -24,23 +24,23 @@ function _n(t) {
24
24
  };
25
25
  }
26
26
  function ii(t) {
27
- const { r: e, g: n, b: s } = _n(t), i = e / 255, o = n / 255, c = s / 255, u = Math.max(i, o, c), f = Math.min(i, o, c), h = u - f;
27
+ const { r: e, g: n, b: s } = kn(t), i = e / 255, o = n / 255, c = s / 255, u = Math.max(i, o, c), f = Math.min(i, o, c), h = u - f;
28
28
  let m = 0;
29
29
  h > 0 && (u === i ? m = (o - c) / h % 6 : u === o ? m = (c - i) / h + 2 : m = (i - o) / h + 4, m *= 60, m < 0 && (m += 360));
30
30
  const g = u === 0 ? 0 : h / u * 100, x = u * 100;
31
31
  return {
32
- h: $r(m, 4),
33
- s: $r(g, 4),
34
- b: $r(x, 4)
32
+ h: jr(m, 4),
33
+ s: jr(g, 4),
34
+ b: jr(x, 4)
35
35
  };
36
36
  }
37
37
  function uc(t) {
38
- const { r: e, g: n, b: s } = _n(t);
38
+ const { r: e, g: n, b: s } = kn(t);
39
39
  return [e / 255, n / 255, s / 255];
40
40
  }
41
41
  function nn(t, e, n) {
42
- const s = Br(t, "r"), i = Br(e, "g"), o = Br(n, "b");
43
- return "#" + Vr(s) + Vr(i) + Vr(o);
42
+ const s = Vr(t, "r"), i = Vr(e, "g"), o = Vr(n, "b");
43
+ return "#" + $r(s) + $r(i) + $r(o);
44
44
  }
45
45
  function Zi(t, e, n) {
46
46
  if (typeof t != "number" || typeof e != "number" || typeof n != "number" || !isFinite(t) || !isFinite(e) || !isFinite(n))
@@ -166,17 +166,17 @@ function Lt(t, e) {
166
166
  throw new Error(`Invalid color field '${e}': expected finite number, got ${t}`);
167
167
  return t;
168
168
  }
169
- function Br(t, e) {
169
+ function Vr(t, e) {
170
170
  if (typeof t != "number" || !isFinite(t))
171
171
  throw new Error(`RGB component '${e}' must be a finite number, got: ${t}`);
172
172
  if (t < 0 || t > 255)
173
173
  throw new Error(`RGB component '${e}' must be 0..255, got: ${t}`);
174
174
  return Math.round(t);
175
175
  }
176
- function Vr(t) {
176
+ function $r(t) {
177
177
  return t.toString(16).padStart(2, "0");
178
178
  }
179
- function $r(t, e) {
179
+ function jr(t, e) {
180
180
  const n = 10 ** e;
181
181
  return Math.round(t * n) / n;
182
182
  }
@@ -238,7 +238,7 @@ class _c {
238
238
  createColorParameter(e, n) {
239
239
  const s = n.label, i = es(e), o = {
240
240
  value: i,
241
- rgb: Object.freeze(_n(i)),
241
+ rgb: Object.freeze(kn(i)),
242
242
  hsb: Object.freeze(ii(i)),
243
243
  label: n.label,
244
244
  description: n.description ?? "",
@@ -417,7 +417,7 @@ class _c {
417
417
  const u = this.parameterObjects.get(e);
418
418
  if (u && (u.value = n, s.type === "color")) {
419
419
  const f = n;
420
- u.rgb = Object.freeze(_n(f)), u.hsb = Object.freeze(ii(f));
420
+ u.rgb = Object.freeze(kn(f)), u.hsb = Object.freeze(ii(f));
421
421
  }
422
422
  return !0;
423
423
  }
@@ -792,14 +792,12 @@ let processingConfig = false;\r
792
792
  let workerHealthy = true;\r
793
793
  let memoryPressureDetected = false;\r
794
794
  \r
795
- // Safe zero-defaults for face data when features are inactive\r
796
- const EMPTY_EXPRESSIONS = Object.freeze({\r
797
- neutral: 0, happy: 0, sad: 0, angry: 0, surprised: 0, disgusted: 0, fearful: 0\r
798
- });\r
799
- \r
800
- const EMPTY_HEAD_POSE = Object.freeze({ pitch: 0, yaw: 0, roll: 0 });\r
801
- \r
802
- const EMPTY_BLENDSHAPES = Object.freeze({\r
795
+ // Reference template for ARKit blendshape keys. Used by emotion-classification\r
796
+ // prototype matching (PROTOTYPE_KEYS) and as a stable key-order reference;\r
797
+ // NOT used as a fake-value fallback on face data. Per the "no fake data"\r
798
+ // contract, face fields produced by inactive models are emitted as \`null\`,\r
799
+ // not as zeroed objects.\r
800
+ const BLENDSHAPE_KEY_TEMPLATE = Object.freeze({\r
803
801
  browDownLeft: 0, browDownRight: 0, browInnerUp: 0, browOuterUpLeft: 0, browOuterUpRight: 0,\r
804
802
  cheekPuff: 0, cheekSquintLeft: 0, cheekSquintRight: 0,\r
805
803
  eyeBlinkLeft: 0, eyeBlinkRight: 0,\r
@@ -880,7 +878,7 @@ const EMOTION_PROTOTYPES = {\r
880
878
  }\r
881
879
  };\r
882
880
  \r
883
- const PROTOTYPE_KEYS = Object.keys(EMPTY_BLENDSHAPES);\r
881
+ const PROTOTYPE_KEYS = Object.keys(BLENDSHAPE_KEY_TEMPLATE);\r
884
882
  \r
885
883
  // Pre-compute prototype magnitudes for cosine similarity\r
886
884
  const PROTOTYPE_MAGNITUDES = {};\r
@@ -1304,6 +1302,7 @@ async function processFrame(imageInput, timestamp, features) {\r
1304
1302
  const detectionResult = faceDetector.detectForVideo(imageInput, timestamp);\r
1305
1303
  results.faces = detectionResult.detections.map((detection, index) => ({\r
1306
1304
  id: index,\r
1305
+ // Populated by face detection.\r
1307
1306
  bounds: {\r
1308
1307
  x: detection.boundingBox.originX / imageInput.width,\r
1309
1308
  y: detection.boundingBox.originY / imageInput.height,\r
@@ -1314,11 +1313,15 @@ async function processFrame(imageInput, timestamp, features) {\r
1314
1313
  x: (detection.boundingBox.originX + detection.boundingBox.width / 2) / imageInput.width,\r
1315
1314
  y: (detection.boundingBox.originY + detection.boundingBox.height / 2) / imageInput.height\r
1316
1315
  },\r
1316
+ confidence: detection.categories[0]?.score || 0,\r
1317
+ // Empty until face mesh runs (filled in the landmark pass below).\r
1317
1318
  landmarks: [],\r
1318
- expressions: EMPTY_EXPRESSIONS,\r
1319
- headPose: EMPTY_HEAD_POSE,\r
1320
- blendshapes: EMPTY_BLENDSHAPES,\r
1321
- confidence: detection.categories[0]?.score || 0\r
1319
+ // null until the producing model runs. headPose / blendshapes /\r
1320
+ // expressions are filled below if face mesh / emotion detection\r
1321
+ // are also enabled.\r
1322
+ headPose: null,\r
1323
+ blendshapes: null,\r
1324
+ expressions: null\r
1322
1325
  }));\r
1323
1326
  }\r
1324
1327
  \r
@@ -1329,15 +1332,21 @@ async function processFrame(imageInput, timestamp, features) {\r
1329
1332
  const landmarks = landmarkResult.faceLandmarks[0];\r
1330
1333
  \r
1331
1334
  if (!results.faces) {\r
1335
+ // Mesh ran without face detection. Create a synthetic face entry\r
1336
+ // with every "not produced by mesh" field set to null. bounds /\r
1337
+ // center / confidence require face detection; if you want them,\r
1338
+ // also enable face detection. landmarks / headPose are filled\r
1339
+ // immediately below; blendshapes / expressions are filled only\r
1340
+ // when emotion detection is also enabled.\r
1332
1341
  results.faces = [{\r
1333
1342
  id: 0,\r
1334
1343
  bounds: null,\r
1335
1344
  center: null,\r
1345
+ confidence: null,\r
1336
1346
  landmarks: [],\r
1337
- expressions: EMPTY_EXPRESSIONS,\r
1338
- headPose: EMPTY_HEAD_POSE,\r
1339
- blendshapes: EMPTY_BLENDSHAPES,\r
1340
- confidence: 0.8\r
1347
+ headPose: null,\r
1348
+ blendshapes: null,\r
1349
+ expressions: null\r
1341
1350
  }];\r
1342
1351
  }\r
1343
1352
  \r
@@ -2473,7 +2482,7 @@ class Ec {
2473
2482
  this.cvWorker && (this.cvWorker.terminate(), this.cvWorker = null), this.activeFeatures.clear(), this.faceMeshRequestedBy.clear(), this.workerRestartCount = 0, this.clearResults(), this.processing = !1, this.processingTimes = [], this.analysedCanvas = null, this.analysedCtx = null, this.pendingRequestIds.clear(), this.debugLog("✅ CVSystem cleanup complete");
2474
2483
  }
2475
2484
  }
2476
- class jr {
2485
+ class ln {
2477
2486
  // ✅ CORRECT: Worker-owned OffscreenCanvas (transferred from host)
2478
2487
  offscreenCanvas = null;
2479
2488
  ctx = null;
@@ -2522,8 +2531,34 @@ class jr {
2522
2531
  frameDataDirty = !1;
2523
2532
  // Phase 11 - CV System Integration
2524
2533
  cvSystem;
2534
+ // Stable CV surface. Built once at construction with real verbs from
2535
+ // CVSystem and live getters for the result data; never reallocated. The
2536
+ // VijiWorkerRuntime points `this.viji.video.cv` (and analogous slots on
2537
+ // device.video / videoStreams) at this reference, so artist-side
2538
+ // module-scope `viji.video.cv.enableX(true)` calls hit real verbs from
2539
+ // the very first instant the scene runs.
2540
+ cvSurface;
2525
2541
  constructor() {
2526
2542
  this.cvSystem = new Ec();
2543
+ const e = this, n = this.cvSystem.getControlInterface();
2544
+ this.cvSurface = {
2545
+ analysedFrame: null,
2546
+ getAnalysedFrameData: () => e.cvSystem.getAnalysedFrameData(),
2547
+ faces: [],
2548
+ hands: [],
2549
+ pose: null,
2550
+ segmentation: null,
2551
+ ...n
2552
+ };
2553
+ }
2554
+ /**
2555
+ * Return the stable cv surface reference. The same object is returned on
2556
+ * every call; data fields update live via getters; verbs are real
2557
+ * CVSystem methods. VijiWorkerRuntime assigns this once to
2558
+ * `viji.video.cv` (and analogous slots) instead of replacing per frame.
2559
+ */
2560
+ getCvSurface() {
2561
+ return this.cvSurface;
2527
2562
  }
2528
2563
  /**
2529
2564
  * Pass WASM URLs (resolved on the main thread) to CVSystem.
@@ -2550,34 +2585,25 @@ class jr {
2550
2585
  return this.deviceId;
2551
2586
  }
2552
2587
  /**
2553
- * Get the video API for inclusion in the viji object
2588
+ * Get the video API for inclusion in the viji object. The `cv` field is
2589
+ * a stable reference (same object on every call) so that artist-side
2590
+ * module-scope `viji.video.cv.enableX(true)` calls work from the first
2591
+ * instant the scene runs, before the first video frame arrives. CV data
2592
+ * fields on the surface are live getters into CVSystem; CV verbs are
2593
+ * direct CVSystem methods.
2554
2594
  */
2555
2595
  getVideoAPI() {
2556
- const e = this.cvSystem.getResults(), n = this.videoState.currentFrame;
2557
- return this.directGPUMode && n instanceof ImageBitmap && (this.videoState.currentFrame = null), {
2596
+ const e = this.videoState.currentFrame;
2597
+ this.directGPUMode && e instanceof ImageBitmap && (this.videoState.currentFrame = null);
2598
+ const n = this.cvSystem.getResults();
2599
+ return this.cvSurface.analysedFrame = this.cvSystem.getAnalysedFrame(), this.cvSurface.faces = n.faces, this.cvSurface.hands = n.hands, this.cvSurface.pose = n.pose, this.cvSurface.segmentation = n.segmentation, {
2558
2600
  isConnected: this.videoState.isConnected,
2559
- currentFrame: n,
2601
+ currentFrame: e,
2560
2602
  frameWidth: this.videoState.frameWidth,
2561
2603
  frameHeight: this.videoState.frameHeight,
2562
2604
  frameRate: this.videoState.frameRate,
2563
2605
  getFrameData: () => this.extractFrameDataIfNeeded(),
2564
- // Unified CV surface: paired data outputs (analysedFrame +
2565
- // faces/hands/pose/segmentation) alongside the verbs that activate
2566
- // them. Built in one synchronous pass so `cvResults`, the analysed-
2567
- // frame getters, and the control verbs all reflect the same CVSystem
2568
- // state at the same instant. Per-host-frame Object.assign from
2569
- // VijiWorkerRuntime (handleVideoFrameUpdate) locks the entire `cv`
2570
- // sub-object atomically into `viji.video.cv` for the next render
2571
- // tick.
2572
- cv: {
2573
- analysedFrame: this.cvSystem.getAnalysedFrame(),
2574
- getAnalysedFrameData: () => this.cvSystem.getAnalysedFrameData(),
2575
- faces: e.faces,
2576
- hands: e.hands,
2577
- pose: e.pose,
2578
- segmentation: e.segmentation,
2579
- ...this.cvSystem.getControlInterface()
2580
- }
2606
+ cv: this.cvSurface
2581
2607
  };
2582
2608
  }
2583
2609
  /**
@@ -4176,10 +4202,10 @@ ${c}`);
4176
4202
  this.setUniform("u_rightHandPalm", "vec3", [b?.x || 0, 1 - (b?.y || 0), b?.z || 0]), this.setUniform("u_rightHandConfidence", "float", L.confidence || 0), this.setUniform("u_rightHandBounds", "vec4", [v?.x || 0, 1 - (v?.y || 0) - (v?.height || 0), v?.width || 0, v?.height || 0]), this.setUniform("u_rightHandFist", "float", y.fist || 0), this.setUniform("u_rightHandOpen", "float", y.openPalm || 0), this.setUniform("u_rightHandPeace", "float", y.peace || 0), this.setUniform("u_rightHandThumbsUp", "float", y.thumbsUp || 0), this.setUniform("u_rightHandThumbsDown", "float", y.thumbsDown || 0), this.setUniform("u_rightHandPointing", "float", y.pointing || 0), this.setUniform("u_rightHandILoveYou", "float", y.iLoveYou || 0);
4177
4203
  } else
4178
4204
  this.setUniform("u_rightHandPalm", "vec3", [0, 0, 0]), this.setUniform("u_rightHandConfidence", "float", 0), this.setUniform("u_rightHandBounds", "vec4", [0, 0, 0, 0]), this.setUniform("u_rightHandFist", "float", 0), this.setUniform("u_rightHandOpen", "float", 0), this.setUniform("u_rightHandPeace", "float", 0), this.setUniform("u_rightHandThumbsUp", "float", 0), this.setUniform("u_rightHandThumbsDown", "float", 0), this.setUniform("u_rightHandPointing", "float", 0), this.setUniform("u_rightHandILoveYou", "float", 0);
4179
- const M = this.visibleFeatures.has("poseDetection") ? s.cv?.pose ?? null : null;
4180
- if (this.setUniform("u_poseDetected", "bool", M !== null), M && M.landmarks) {
4181
- const b = M.landmarks, y = (v) => 1 - (b[v]?.y || 0);
4182
- this.setUniform("u_poseConfidence", "float", M.confidence || 0), this.setUniform("u_nosePosition", "vec2", [b[0]?.x || 0, y(0)]), this.setUniform("u_leftShoulderPosition", "vec2", [b[11]?.x || 0, y(11)]), this.setUniform("u_rightShoulderPosition", "vec2", [b[12]?.x || 0, y(12)]), this.setUniform("u_leftElbowPosition", "vec2", [b[13]?.x || 0, y(13)]), this.setUniform("u_rightElbowPosition", "vec2", [b[14]?.x || 0, y(14)]), this.setUniform("u_leftWristPosition", "vec2", [b[15]?.x || 0, y(15)]), this.setUniform("u_rightWristPosition", "vec2", [b[16]?.x || 0, y(16)]), this.setUniform("u_leftHipPosition", "vec2", [b[23]?.x || 0, y(23)]), this.setUniform("u_rightHipPosition", "vec2", [b[24]?.x || 0, y(24)]), this.setUniform("u_leftKneePosition", "vec2", [b[25]?.x || 0, y(25)]), this.setUniform("u_rightKneePosition", "vec2", [b[26]?.x || 0, y(26)]), this.setUniform("u_leftAnklePosition", "vec2", [b[27]?.x || 0, y(27)]), this.setUniform("u_rightAnklePosition", "vec2", [b[28]?.x || 0, y(28)]);
4205
+ const N = this.visibleFeatures.has("poseDetection") ? s.cv?.pose ?? null : null;
4206
+ if (this.setUniform("u_poseDetected", "bool", N !== null), N && N.landmarks) {
4207
+ const b = N.landmarks, y = (v) => 1 - (b[v]?.y || 0);
4208
+ this.setUniform("u_poseConfidence", "float", N.confidence || 0), this.setUniform("u_nosePosition", "vec2", [b[0]?.x || 0, y(0)]), this.setUniform("u_leftShoulderPosition", "vec2", [b[11]?.x || 0, y(11)]), this.setUniform("u_rightShoulderPosition", "vec2", [b[12]?.x || 0, y(12)]), this.setUniform("u_leftElbowPosition", "vec2", [b[13]?.x || 0, y(13)]), this.setUniform("u_rightElbowPosition", "vec2", [b[14]?.x || 0, y(14)]), this.setUniform("u_leftWristPosition", "vec2", [b[15]?.x || 0, y(15)]), this.setUniform("u_rightWristPosition", "vec2", [b[16]?.x || 0, y(16)]), this.setUniform("u_leftHipPosition", "vec2", [b[23]?.x || 0, y(23)]), this.setUniform("u_rightHipPosition", "vec2", [b[24]?.x || 0, y(24)]), this.setUniform("u_leftKneePosition", "vec2", [b[25]?.x || 0, y(25)]), this.setUniform("u_rightKneePosition", "vec2", [b[26]?.x || 0, y(26)]), this.setUniform("u_leftAnklePosition", "vec2", [b[27]?.x || 0, y(27)]), this.setUniform("u_rightAnklePosition", "vec2", [b[28]?.x || 0, y(28)]);
4183
4209
  } else
4184
4210
  this.setUniform("u_poseConfidence", "float", 0), this.setUniform("u_nosePosition", "vec2", [0, 0]), this.setUniform("u_leftShoulderPosition", "vec2", [0, 0]), this.setUniform("u_rightShoulderPosition", "vec2", [0, 0]), this.setUniform("u_leftElbowPosition", "vec2", [0, 0]), this.setUniform("u_rightElbowPosition", "vec2", [0, 0]), this.setUniform("u_leftWristPosition", "vec2", [0, 0]), this.setUniform("u_rightWristPosition", "vec2", [0, 0]), this.setUniform("u_leftHipPosition", "vec2", [0, 0]), this.setUniform("u_rightHipPosition", "vec2", [0, 0]), this.setUniform("u_leftKneePosition", "vec2", [0, 0]), this.setUniform("u_rightKneePosition", "vec2", [0, 0]), this.setUniform("u_leftAnklePosition", "vec2", [0, 0]), this.setUniform("u_rightAnklePosition", "vec2", [0, 0]);
4185
4211
  const se = this.visibleFeatures.has("bodySegmentation") ? s.cv?.segmentation ?? null : null;
@@ -4612,7 +4638,7 @@ function Ji(t) {
4612
4638
  if (t.blockLen < 1)
4613
4639
  throw new Error('"blockLen" must be >= 1');
4614
4640
  }
4615
- function kn(t, e = !0) {
4641
+ function wn(t, e = !0) {
4616
4642
  if (t.destroyed)
4617
4643
  throw new Error("Hash instance has been destroyed");
4618
4644
  if (e && t.finished)
@@ -4624,7 +4650,7 @@ function eo(t, e) {
4624
4650
  if (t.length < n)
4625
4651
  throw new RangeError('"digestInto() output" expected to be of length >=' + n);
4626
4652
  }
4627
- function wn(...t) {
4653
+ function vn(...t) {
4628
4654
  for (let e = 0; e < t.length; e++)
4629
4655
  t[e].fill(0);
4630
4656
  }
@@ -4729,7 +4755,7 @@ class Fc {
4729
4755
  this.blockLen = e, this.outputLen = n, this.padOffset = s, this.isLE = i, this.buffer = new Uint8Array(e), this.view = qr(this.buffer);
4730
4756
  }
4731
4757
  update(e) {
4732
- kn(this), St(e);
4758
+ wn(this), St(e);
4733
4759
  const { view: n, buffer: s, blockLen: i } = this, o = e.length;
4734
4760
  for (let c = 0; c < o; ) {
4735
4761
  const u = Math.min(i - this.pos, o - c);
@@ -4744,10 +4770,10 @@ class Fc {
4744
4770
  return this.length += e.length, this.roundClean(), this;
4745
4771
  }
4746
4772
  digestInto(e) {
4747
- kn(this), eo(e, this), this.finished = !0;
4773
+ wn(this), eo(e, this), this.finished = !0;
4748
4774
  const { buffer: n, view: s, blockLen: i, isLE: o } = this;
4749
4775
  let { pos: c } = this;
4750
- n[c++] = 128, wn(this.buffer.subarray(c)), this.padOffset > i - c && (this.process(s, 0), c = 0);
4776
+ n[c++] = 128, vn(this.buffer.subarray(c)), this.padOffset > i - c && (this.process(s, 0), c = 0);
4751
4777
  for (let g = c; g < i; g++)
4752
4778
  n[g] = 0;
4753
4779
  s.setBigUint64(i - 8, BigInt(this.length * 8), o), this.process(s, 0);
@@ -4877,13 +4903,13 @@ class Uc extends Fc {
4877
4903
  s = s + this.A | 0, i = i + this.B | 0, o = o + this.C | 0, c = c + this.D | 0, u = u + this.E | 0, f = f + this.F | 0, h = h + this.G | 0, m = m + this.H | 0, this.set(s, i, o, c, u, f, h, m);
4878
4904
  }
4879
4905
  roundClean() {
4880
- wn(it);
4906
+ vn(it);
4881
4907
  }
4882
4908
  destroy() {
4883
- this.destroyed = !0, this.set(0, 0, 0, 0, 0, 0, 0, 0), wn(this.buffer);
4909
+ this.destroyed = !0, this.set(0, 0, 0, 0, 0, 0, 0, 0), vn(this.buffer);
4884
4910
  }
4885
4911
  }
4886
- class Mc extends Uc {
4912
+ class Nc extends Uc {
4887
4913
  // We cannot use array here since array allows indexing by variable
4888
4914
  // which means optimizer/compiler cannot use registers.
4889
4915
  A = st[0] | 0;
@@ -4898,12 +4924,12 @@ class Mc extends Uc {
4898
4924
  super(32);
4899
4925
  }
4900
4926
  }
4901
- const Nc = /* @__PURE__ */ Ic(
4902
- () => new Mc(),
4927
+ const Mc = /* @__PURE__ */ Ic(
4928
+ () => new Nc(),
4903
4929
  /* @__PURE__ */ Cc(1)
4904
4930
  );
4905
4931
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
4906
- const Re = (t, e, n) => St(t, e, n), ro = kt, so = bs, ot = (...t) => Ac(...t), ns = (t) => no(t), io = Qi, oo = (t) => Rc(t), vn = /* @__PURE__ */ BigInt(0), rs = /* @__PURE__ */ BigInt(1);
4932
+ const Re = (t, e, n) => St(t, e, n), ro = kt, so = bs, ot = (...t) => Ac(...t), ns = (t) => no(t), io = Qi, oo = (t) => Rc(t), En = /* @__PURE__ */ BigInt(0), rs = /* @__PURE__ */ BigInt(1);
4907
4933
  function Gt(t, e = "") {
4908
4934
  if (typeof t != "boolean") {
4909
4935
  const n = e && `"${e}" `;
@@ -4913,7 +4939,7 @@ function Gt(t, e = "") {
4913
4939
  }
4914
4940
  function _s(t) {
4915
4941
  if (typeof t == "bigint") {
4916
- if (!mn(t))
4942
+ if (!pn(t))
4917
4943
  throw new RangeError("positive bigint expected, got " + t);
4918
4944
  } else
4919
4945
  ro(t);
@@ -4929,16 +4955,16 @@ function ss(t, e = "") {
4929
4955
  throw new RangeError(n + "expected safe integer, got " + t);
4930
4956
  }
4931
4957
  }
4932
- function ln(t) {
4958
+ function hn(t) {
4933
4959
  const e = _s(t).toString(16);
4934
4960
  return e.length & 1 ? "0" + e : e;
4935
4961
  }
4936
4962
  function ao(t) {
4937
4963
  if (typeof t != "string")
4938
4964
  throw new TypeError("hex string expected, got " + typeof t);
4939
- return t === "" ? vn : BigInt("0x" + t);
4965
+ return t === "" ? En : BigInt("0x" + t);
4940
4966
  }
4941
- function Nn(t) {
4967
+ function On(t) {
4942
4968
  return ao(bs(t));
4943
4969
  }
4944
4970
  function co(t) {
@@ -4959,19 +4985,19 @@ function uo(t, e) {
4959
4985
  function Oc(t) {
4960
4986
  return Uint8Array.from(Re(t));
4961
4987
  }
4962
- const mn = (t) => typeof t == "bigint" && vn <= t;
4988
+ const pn = (t) => typeof t == "bigint" && En <= t;
4963
4989
  function Bc(t, e, n) {
4964
- return mn(t) && mn(e) && mn(n) && e <= t && t < n;
4990
+ return pn(t) && pn(e) && pn(n) && e <= t && t < n;
4965
4991
  }
4966
4992
  function lo(t, e, n, s) {
4967
4993
  if (!Bc(e, n, s))
4968
4994
  throw new RangeError("expected valid " + t + ": " + n + " <= n < " + s + ", got " + e);
4969
4995
  }
4970
4996
  function ws(t) {
4971
- if (t < vn)
4997
+ if (t < En)
4972
4998
  throw new Error("expected non-negative bigint, got " + t);
4973
4999
  let e;
4974
- for (e = 0; t > vn; t >>= rs, e += 1)
5000
+ for (e = 0; t > En; t >>= rs, e += 1)
4975
5001
  ;
4976
5002
  return e;
4977
5003
  }
@@ -5005,7 +5031,7 @@ function Vc(t, e, n) {
5005
5031
  return g(), L;
5006
5032
  };
5007
5033
  }
5008
- function On(t, e = {}, n = {}) {
5034
+ function Bn(t, e = {}, n = {}) {
5009
5035
  if (Object.prototype.toString.call(t) !== "[object Object]")
5010
5036
  throw new TypeError("expected valid options object");
5011
5037
  function s(o, c, u) {
@@ -5130,7 +5156,7 @@ function Xc(t) {
5130
5156
  BYTES: "number",
5131
5157
  BITS: "number"
5132
5158
  }, n = Gc.reduce((s, i) => (s[i] = "function", s), e);
5133
- if (On(t, n), ss(t.BYTES, "BYTES"), ss(t.BITS, "BITS"), t.BYTES < 1 || t.BITS < 1)
5159
+ if (Bn(t, n), ss(t.BYTES, "BYTES"), ss(t.BITS, "BITS"), t.BYTES < 1 || t.BITS < 1)
5134
5160
  throw new Error("invalid field: expected BYTES/BITS > 0");
5135
5161
  if (t.ORDER <= Ee)
5136
5162
  throw new Error("invalid field: expected ORDER > 1, got " + t.ORDER);
@@ -5266,7 +5292,7 @@ class ko {
5266
5292
  }
5267
5293
  if (e.length !== i)
5268
5294
  throw new Error("Field.fromBytes: expected " + i + " bytes, got " + e.length);
5269
- let f = o ? co(e) : Nn(e);
5295
+ let f = o ? co(e) : On(e);
5270
5296
  if (u && (f = $e(f, c)), !n && !this.isValid(f))
5271
5297
  throw new Error("invalid field element: outside of range 0..ORDER");
5272
5298
  return f;
@@ -5302,12 +5328,12 @@ function Kc(t, e, n = !1) {
5302
5328
  const s = t.length, i = wo(e), o = Math.max(vo(e), 16);
5303
5329
  if (s < o || s > 1024)
5304
5330
  throw new Error("expected " + o + "-1024 bytes of input, got " + s);
5305
- const c = n ? co(t) : Nn(t), u = $e(c, e - Ee) + Ee;
5331
+ const c = n ? co(t) : On(t), u = $e(c, e - Ee) + Ee;
5306
5332
  return n ? uo(u, i) : ks(u, i);
5307
5333
  }
5308
5334
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
5309
5335
  const Ft = /* @__PURE__ */ BigInt(0), yt = /* @__PURE__ */ BigInt(1);
5310
- function En(t, e) {
5336
+ function Tn(t, e) {
5311
5337
  const n = e.negate();
5312
5338
  return t ? n : e;
5313
5339
  }
@@ -5391,7 +5417,7 @@ class Zc {
5391
5417
  const c = Wr(e, this.bits);
5392
5418
  for (let u = 0; u < c.windows; u++) {
5393
5419
  const { nextN: f, offset: h, isZero: m, isNeg: g, isNegF: x, offsetF: w } = di(s, u, c);
5394
- s = f, m ? o = o.add(En(x, n[w])) : i = i.add(En(g, n[h]));
5420
+ s = f, m ? o = o.add(Tn(x, n[w])) : i = i.add(Tn(g, n[h]));
5395
5421
  }
5396
5422
  return mi(s), { p: i, f: o };
5397
5423
  }
@@ -5487,13 +5513,13 @@ class gi {
5487
5513
  this.iHash.update(i), this.oHash = e.create();
5488
5514
  for (let o = 0; o < i.length; o++)
5489
5515
  i[o] ^= 106;
5490
- this.oHash.update(i), wn(i);
5516
+ this.oHash.update(i), vn(i);
5491
5517
  }
5492
5518
  update(e) {
5493
- return kn(this), this.iHash.update(e), this;
5519
+ return wn(this), this.iHash.update(e), this;
5494
5520
  }
5495
5521
  digestInto(e) {
5496
- kn(this), eo(e, this), this.finished = !0;
5522
+ wn(this), eo(e, this), this.finished = !0;
5497
5523
  const n = e.subarray(0, this.outputLen);
5498
5524
  this.iHash.digestInto(n), this.oHash.update(n), this.oHash.digestInto(n), this.destroy();
5499
5525
  }
@@ -5536,7 +5562,7 @@ function is(t) {
5536
5562
  return t;
5537
5563
  }
5538
5564
  function Xr(t, e) {
5539
- On(t);
5565
+ Bn(t);
5540
5566
  const n = {};
5541
5567
  for (let s of Object.keys(e))
5542
5568
  n[s] = t[s] === void 0 ? e[s] : t[s];
@@ -5560,11 +5586,11 @@ const je = {
5560
5586
  throw new TypeError('"data" expected string, got type=' + typeof e);
5561
5587
  if (e.length & 1)
5562
5588
  throw new n("tlv.encode: unpadded data");
5563
- const s = e.length / 2, i = ln(s);
5589
+ const s = e.length / 2, i = hn(s);
5564
5590
  if (i.length / 2 & 128)
5565
5591
  throw new n("tlv.encode: long form length too big");
5566
- const o = s > 127 ? ln(i.length / 2 | 128) : "";
5567
- return ln(t) + o + i + e;
5592
+ const o = s > 127 ? hn(i.length / 2 | 128) : "";
5593
+ return hn(t) + o + i + e;
5568
5594
  },
5569
5595
  // v - value, l - left bytes (unparsed)
5570
5596
  decode(t, e) {
@@ -5610,7 +5636,7 @@ const je = {
5610
5636
  const { Err: e } = je;
5611
5637
  if (_s(t), t < Ye)
5612
5638
  throw new e("integer: negative integers are not allowed");
5613
- let n = ln(t);
5639
+ let n = hn(t);
5614
5640
  if (Number.parseInt(n[0], 16) & 8 && (n = "00" + n), n.length & 1)
5615
5641
  throw new e("unexpected DER parsing assertion: unpadded hex");
5616
5642
  return n;
@@ -5623,7 +5649,7 @@ const je = {
5623
5649
  throw new e("invalid signature integer: negative");
5624
5650
  if (t.length > 1 && t[0] === 0 && !(t[1] & 128))
5625
5651
  throw new e("invalid signature integer: unnecessary leading zero");
5626
- return Nn(t);
5652
+ return On(t);
5627
5653
  }
5628
5654
  },
5629
5655
  toSig(t) {
@@ -5643,12 +5669,12 @@ const je = {
5643
5669
  Object.freeze(je._tlv);
5644
5670
  Object.freeze(je._int);
5645
5671
  Object.freeze(je);
5646
- const Ye = /* @__PURE__ */ BigInt(0), at = /* @__PURE__ */ BigInt(1), So = /* @__PURE__ */ BigInt(2), hn = /* @__PURE__ */ BigInt(3), s1 = /* @__PURE__ */ BigInt(4);
5672
+ const Ye = /* @__PURE__ */ BigInt(0), at = /* @__PURE__ */ BigInt(1), So = /* @__PURE__ */ BigInt(2), fn = /* @__PURE__ */ BigInt(3), s1 = /* @__PURE__ */ BigInt(4);
5647
5673
  function i1(t, e = {}) {
5648
5674
  const n = Jc("weierstrass", t, e), s = n.Fp, i = n.Fn;
5649
5675
  let o = n.CURVE;
5650
5676
  const { h: c, n: u } = o;
5651
- On(e, {}, {
5677
+ Bn(e, {}, {
5652
5678
  allowInfinityPoint: "boolean",
5653
5679
  clearCofactor: "function",
5654
5680
  isTorsionFree: "function",
@@ -5670,8 +5696,8 @@ function i1(t, e = {}) {
5670
5696
  const { x: G, y: U } = v.toAffine(), R = s.toBytes(G);
5671
5697
  if (Gt(B, "isCompressed"), B) {
5672
5698
  g();
5673
- const N = !s.isOdd(U);
5674
- return ot(xo(N), R);
5699
+ const M = !s.isOdd(U);
5700
+ return ot(xo(M), R);
5675
5701
  } else
5676
5702
  return ot(Uint8Array.of(4), R, s.toBytes(U));
5677
5703
  }
@@ -5681,10 +5707,10 @@ function i1(t, e = {}) {
5681
5707
  if (h && G === 1 && U === 0)
5682
5708
  return { x: s.ZERO, y: s.ZERO };
5683
5709
  if (G === v && (U === 2 || U === 3)) {
5684
- const N = s.fromBytes(R);
5685
- if (!s.isValid(N))
5710
+ const M = s.fromBytes(R);
5711
+ if (!s.isValid(M))
5686
5712
  throw new Error("bad point: is not on curve, wrong x");
5687
- const P = $(N);
5713
+ const P = $(M);
5688
5714
  let O;
5689
5715
  try {
5690
5716
  O = s.sqrt(P);
@@ -5694,9 +5720,9 @@ function i1(t, e = {}) {
5694
5720
  }
5695
5721
  g();
5696
5722
  const j = s.isOdd(O);
5697
- return (U & 1) === 1 !== j && (O = s.neg(O)), { x: N, y: O };
5723
+ return (U & 1) === 1 !== j && (O = s.neg(O)), { x: M, y: O };
5698
5724
  } else if (G === B && U === 4) {
5699
- const N = s.BYTES, P = s.fromBytes(R.subarray(0, N)), O = s.fromBytes(R.subarray(N, N * 2));
5725
+ const M = s.BYTES, P = s.fromBytes(R.subarray(0, M)), O = s.fromBytes(R.subarray(M, M * 2));
5700
5726
  if (!K(P, O))
5701
5727
  throw new Error("bad point: is not on curve");
5702
5728
  return { x: P, y: O };
@@ -5714,10 +5740,10 @@ function i1(t, e = {}) {
5714
5740
  }
5715
5741
  if (!K(o.Gx, o.Gy))
5716
5742
  throw new Error("bad curve params: generator point");
5717
- const L = s.mul(s.pow(o.a, hn), s1), W = s.mul(s.sqr(o.b), BigInt(27));
5743
+ const L = s.mul(s.pow(o.a, fn), s1), W = s.mul(s.sqr(o.b), BigInt(27));
5718
5744
  if (s.is0(s.add(L, W)))
5719
5745
  throw new Error("bad curve params: a or b");
5720
- function M(y, v, B = !1) {
5746
+ function N(y, v, B = !1) {
5721
5747
  if (!s.isValid(v) || B && s.is0(v))
5722
5748
  throw new Error(`bad point coordinate ${y}`);
5723
5749
  return v;
@@ -5732,7 +5758,7 @@ function i1(t, e = {}) {
5732
5758
  return n1(y, f.basises, i.ORDER);
5733
5759
  }
5734
5760
  function ie(y, v, B, G, U) {
5735
- return B = new H(s.mul(B.X, y), B.Y, B.Z), v = En(G, v), B = En(U, B), v.add(B);
5761
+ return B = new H(s.mul(B.X, y), B.Y, B.Z), v = Tn(G, v), B = Tn(U, B), v.add(B);
5736
5762
  }
5737
5763
  class H {
5738
5764
  // base / generator point
@@ -5749,7 +5775,7 @@ function i1(t, e = {}) {
5749
5775
  Z;
5750
5776
  /** Does NOT validate if the point is valid. Use `.assertValidity()`. */
5751
5777
  constructor(v, B, G) {
5752
- this.X = M("x", v), this.Y = M("y", B, !0), this.Z = M("z", G), Object.freeze(this);
5778
+ this.X = N("x", v), this.Y = N("y", B, !0), this.Z = N("z", G), Object.freeze(this);
5753
5779
  }
5754
5780
  static CURVE() {
5755
5781
  return o;
@@ -5783,7 +5809,7 @@ function i1(t, e = {}) {
5783
5809
  * @returns
5784
5810
  */
5785
5811
  precompute(v = 8, B = !0) {
5786
- return b.createCache(this, v), B || this.multiply(hn), this;
5812
+ return b.createCache(this, v), B || this.multiply(fn), this;
5787
5813
  }
5788
5814
  // TODO: return `this`
5789
5815
  /** A point on curve is valid if it conforms to equation. */
@@ -5811,7 +5837,7 @@ function i1(t, e = {}) {
5811
5837
  /** Compare one point to another. */
5812
5838
  equals(v) {
5813
5839
  J(v);
5814
- const { X: B, Y: G, Z: U } = this, { X: R, Y: N, Z: P } = v, O = s.eql(s.mul(B, P), s.mul(R, U)), j = s.eql(s.mul(G, P), s.mul(N, U));
5840
+ const { X: B, Y: G, Z: U } = this, { X: R, Y: M, Z: P } = v, O = s.eql(s.mul(B, P), s.mul(R, U)), j = s.eql(s.mul(G, P), s.mul(M, U));
5815
5841
  return O && j;
5816
5842
  }
5817
5843
  /** Flips point to one corresponding to (x, -y) in Affine coordinates. */
@@ -5823,9 +5849,9 @@ function i1(t, e = {}) {
5823
5849
  // https://eprint.iacr.org/2015/1060, algorithm 3
5824
5850
  // Cost: 8M + 3S + 3*a + 2*b3 + 15add.
5825
5851
  double() {
5826
- const { a: v, b: B } = o, G = s.mul(B, hn), { X: U, Y: R, Z: N } = this;
5827
- let P = s.ZERO, O = s.ZERO, j = s.ZERO, Y = s.mul(U, U), ce = s.mul(R, R), ae = s.mul(N, N), oe = s.mul(U, R);
5828
- return oe = s.add(oe, oe), j = s.mul(U, N), j = s.add(j, j), P = s.mul(v, j), O = s.mul(G, ae), O = s.add(P, O), P = s.sub(ce, O), O = s.add(ce, O), O = s.mul(P, O), P = s.mul(oe, P), j = s.mul(G, j), ae = s.mul(v, ae), oe = s.sub(Y, ae), oe = s.mul(v, oe), oe = s.add(oe, j), j = s.add(Y, Y), Y = s.add(j, Y), Y = s.add(Y, ae), Y = s.mul(Y, oe), O = s.add(O, Y), ae = s.mul(R, N), ae = s.add(ae, ae), Y = s.mul(ae, oe), P = s.sub(P, Y), j = s.mul(ae, ce), j = s.add(j, j), j = s.add(j, j), new H(P, O, j);
5852
+ const { a: v, b: B } = o, G = s.mul(B, fn), { X: U, Y: R, Z: M } = this;
5853
+ let P = s.ZERO, O = s.ZERO, j = s.ZERO, Y = s.mul(U, U), ce = s.mul(R, R), ae = s.mul(M, M), oe = s.mul(U, R);
5854
+ return oe = s.add(oe, oe), j = s.mul(U, M), j = s.add(j, j), P = s.mul(v, j), O = s.mul(G, ae), O = s.add(P, O), P = s.sub(ce, O), O = s.add(ce, O), O = s.mul(P, O), P = s.mul(oe, P), j = s.mul(G, j), ae = s.mul(v, ae), oe = s.sub(Y, ae), oe = s.mul(v, oe), oe = s.add(oe, j), j = s.add(Y, Y), Y = s.add(j, Y), Y = s.add(Y, ae), Y = s.mul(Y, oe), O = s.add(O, Y), ae = s.mul(R, M), ae = s.add(ae, ae), Y = s.mul(ae, oe), P = s.sub(P, Y), j = s.mul(ae, ce), j = s.add(j, j), j = s.add(j, j), new H(P, O, j);
5829
5855
  }
5830
5856
  // Renes-Costello-Batina exception-free addition formula.
5831
5857
  // There is 30% faster Jacobian formula, but it is not complete.
@@ -5833,13 +5859,13 @@ function i1(t, e = {}) {
5833
5859
  // Cost: 12M + 0S + 3*a + 3*b3 + 23add.
5834
5860
  add(v) {
5835
5861
  J(v);
5836
- const { X: B, Y: G, Z: U } = this, { X: R, Y: N, Z: P } = v;
5862
+ const { X: B, Y: G, Z: U } = this, { X: R, Y: M, Z: P } = v;
5837
5863
  let O = s.ZERO, j = s.ZERO, Y = s.ZERO;
5838
- const ce = o.a, ae = s.mul(o.b, hn);
5839
- let oe = s.mul(B, R), k = s.mul(G, N), S = s.mul(U, P), I = s.add(B, G), A = s.add(R, N);
5864
+ const ce = o.a, ae = s.mul(o.b, fn);
5865
+ let oe = s.mul(B, R), k = s.mul(G, M), S = s.mul(U, P), I = s.add(B, G), A = s.add(R, M);
5840
5866
  I = s.mul(I, A), A = s.add(oe, k), I = s.sub(I, A), A = s.add(B, U);
5841
5867
  let F = s.add(R, P);
5842
- return A = s.mul(A, F), F = s.add(oe, S), A = s.sub(A, F), F = s.add(G, U), O = s.add(N, P), F = s.mul(F, O), O = s.add(k, S), F = s.sub(F, O), Y = s.mul(ce, A), O = s.mul(ae, S), Y = s.add(O, Y), O = s.sub(k, Y), Y = s.add(k, Y), j = s.mul(O, Y), k = s.add(oe, oe), k = s.add(k, oe), S = s.mul(ce, S), A = s.mul(ae, A), k = s.add(k, S), S = s.sub(oe, S), S = s.mul(ce, S), A = s.add(A, S), oe = s.mul(k, A), j = s.add(j, oe), oe = s.mul(F, A), O = s.mul(I, O), O = s.sub(O, oe), oe = s.mul(I, k), Y = s.mul(F, Y), Y = s.add(Y, oe), new H(O, j, Y);
5868
+ return A = s.mul(A, F), F = s.add(oe, S), A = s.sub(A, F), F = s.add(G, U), O = s.add(M, P), F = s.mul(F, O), O = s.add(k, S), F = s.sub(F, O), Y = s.mul(ce, A), O = s.mul(ae, S), Y = s.add(O, Y), O = s.sub(k, Y), Y = s.add(k, Y), j = s.mul(O, Y), k = s.add(oe, oe), k = s.add(k, oe), S = s.mul(ce, S), A = s.mul(ae, A), k = s.add(k, S), S = s.sub(oe, S), S = s.mul(ce, S), A = s.add(A, S), oe = s.mul(k, A), j = s.add(j, oe), oe = s.mul(F, A), O = s.mul(I, O), O = s.sub(O, oe), oe = s.mul(I, k), Y = s.mul(F, Y), Y = s.add(Y, oe), new H(O, j, Y);
5843
5869
  }
5844
5870
  subtract(v) {
5845
5871
  return J(v), this.add(v.negate());
@@ -5861,13 +5887,13 @@ function i1(t, e = {}) {
5861
5887
  if (!i.isValidNot0(v))
5862
5888
  throw new RangeError("invalid scalar: out of range");
5863
5889
  let G, U;
5864
- const R = (N) => b.cached(this, N, (P) => fi(H, P));
5890
+ const R = (M) => b.cached(this, M, (P) => fi(H, P));
5865
5891
  if (B) {
5866
- const { k1neg: N, k1: P, k2neg: O, k2: j } = se(v), { p: Y, f: ce } = R(P), { p: ae, f: oe } = R(j);
5867
- U = ce.add(oe), G = ie(B.beta, Y, ae, N, O);
5892
+ const { k1neg: M, k1: P, k2neg: O, k2: j } = se(v), { p: Y, f: ce } = R(P), { p: ae, f: oe } = R(j);
5893
+ U = ce.add(oe), G = ie(B.beta, Y, ae, M, O);
5868
5894
  } else {
5869
- const { p: N, f: P } = R(v);
5870
- G = N, U = P;
5895
+ const { p: M, f: P } = R(v);
5896
+ G = M, U = P;
5871
5897
  }
5872
5898
  return fi(H, [G, U])[0];
5873
5899
  }
@@ -5887,7 +5913,7 @@ function i1(t, e = {}) {
5887
5913
  if (b.hasCache(this))
5888
5914
  return this.multiply(U);
5889
5915
  if (B) {
5890
- const { k1neg: R, k1: N, k2neg: P, k2: O } = se(U), { p1: j, p2: Y } = Qc(H, G, N, O);
5916
+ const { k1neg: R, k1: M, k2neg: P, k2: O } = se(U), { p1: j, p2: Y } = Qc(H, G, M, O);
5891
5917
  return ie(B.beta, j, Y, R, P);
5892
5918
  } else
5893
5919
  return b.unsafe(G, U);
@@ -5900,12 +5926,12 @@ function i1(t, e = {}) {
5900
5926
  toAffine(v) {
5901
5927
  const B = this;
5902
5928
  let G = v;
5903
- const { X: U, Y: R, Z: N } = B;
5904
- if (s.eql(N, s.ONE))
5929
+ const { X: U, Y: R, Z: M } = B;
5930
+ if (s.eql(M, s.ONE))
5905
5931
  return { x: U, y: R };
5906
5932
  const P = B.is0();
5907
- G == null && (G = P ? s.ONE : s.inv(N));
5908
- const O = s.mul(U, G), j = s.mul(R, G), Y = s.mul(N, G);
5933
+ G == null && (G = P ? s.ONE : s.inv(M));
5934
+ const O = s.mul(U, G), j = s.mul(R, G), Y = s.mul(M, G);
5909
5935
  if (P)
5910
5936
  return { x: s.ZERO, y: s.ZERO };
5911
5937
  if (!s.eql(Y, s.ONE))
@@ -5985,8 +6011,8 @@ function o1(t, e = {}) {
5985
6011
  const { secretKey: D, publicKey: V, publicKeyUncompressed: $ } = i, K = n._lengths;
5986
6012
  if (!io(w))
5987
6013
  return;
5988
- const L = Re(w, void 0, "key").length, W = L === V || L === $, M = L === D || !!K?.includes(L);
5989
- if (!(W && M))
6014
+ const L = Re(w, void 0, "key").length, W = L === V || L === $, N = L === D || !!K?.includes(L);
6015
+ if (!(W && N))
5990
6016
  return W;
5991
6017
  }
5992
6018
  function m(w, D, V = !0) {
@@ -6006,7 +6032,7 @@ function o1(t, e = {}) {
6006
6032
  }
6007
6033
  function a1(t, e, n = {}) {
6008
6034
  const s = e;
6009
- Ji(s), On(n, {}, {
6035
+ Ji(s), Bn(n, {}, {
6010
6036
  hmac: "function",
6011
6037
  lowS: "boolean",
6012
6038
  randomBytes: "function",
@@ -6032,36 +6058,36 @@ function a1(t, e, n = {}) {
6032
6058
  if ($)
6033
6059
  throw new Error('"recovered" sig type is not supported for cofactor >2 curves');
6034
6060
  }
6035
- function M(U, R) {
6061
+ function N(U, R) {
6036
6062
  is(R);
6037
- const N = D.signature, P = R === "compact" ? N : R === "recovered" ? N + 1 : void 0;
6063
+ const M = D.signature, P = R === "compact" ? M : R === "recovered" ? M + 1 : void 0;
6038
6064
  return Re(U, P);
6039
6065
  }
6040
6066
  class J {
6041
6067
  r;
6042
6068
  s;
6043
6069
  recovery;
6044
- constructor(R, N, P) {
6045
- if (this.r = L("r", R), this.s = L("s", N), P != null) {
6070
+ constructor(R, M, P) {
6071
+ if (this.r = L("r", R), this.s = L("s", M), P != null) {
6046
6072
  if (W(), ![0, 1, 2, 3].includes(P))
6047
6073
  throw new Error("invalid recovery id");
6048
6074
  this.recovery = P;
6049
6075
  }
6050
6076
  Object.freeze(this);
6051
6077
  }
6052
- static fromBytes(R, N = V.format) {
6053
- M(R, N);
6078
+ static fromBytes(R, M = V.format) {
6079
+ N(R, M);
6054
6080
  let P;
6055
- if (N === "der") {
6081
+ if (M === "der") {
6056
6082
  const { r: ce, s: ae } = je.toSig(Re(R));
6057
6083
  return new J(ce, ae);
6058
6084
  }
6059
- N === "recovered" && (P = R[0], N = "compact", R = R.subarray(1));
6085
+ M === "recovered" && (P = R[0], M = "compact", R = R.subarray(1));
6060
6086
  const O = D.signature / 2, j = R.subarray(0, O), Y = R.subarray(O, O * 2);
6061
6087
  return new J(u.fromBytes(j), u.fromBytes(Y), P);
6062
6088
  }
6063
- static fromHex(R, N) {
6064
- return this.fromBytes(ns(R), N);
6089
+ static fromHex(R, M) {
6090
+ return this.fromBytes(ns(R), M);
6065
6091
  }
6066
6092
  assertRecovery() {
6067
6093
  const { recovery: R } = this;
@@ -6075,7 +6101,7 @@ function a1(t, e, n = {}) {
6075
6101
  // Unlike the top-level helper below, this method expects a digest that has
6076
6102
  // already been hashed to the curve's message representative.
6077
6103
  recoverPublicKey(R) {
6078
- const { r: N, s: P } = this, O = this.assertRecovery(), j = O === 2 || O === 3 ? N + f : N;
6104
+ const { r: M, s: P } = this, O = this.assertRecovery(), j = O === 2 || O === 3 ? M + f : M;
6079
6105
  if (!c.isValid(j))
6080
6106
  throw new Error("invalid recovery id: sig.r+curve.n != R.x");
6081
6107
  const Y = c.toBytes(j), ce = t.fromBytes(ot(xo((O & 1) === 0), Y)), ae = u.inv(j), oe = ie(Re(R, void 0, "msgHash")), k = u.create(-oe * ae), S = u.create(P * ae), I = t.BASE.multiplyUnsafe(k).add(ce.multiplyUnsafe(S));
@@ -6090,7 +6116,7 @@ function a1(t, e, n = {}) {
6090
6116
  toBytes(R = V.format) {
6091
6117
  if (is(R), R === "der")
6092
6118
  return ns(je.hexFromSig(this));
6093
- const { r: N, s: P } = this, O = u.toBytes(N), j = u.toBytes(P);
6119
+ const { r: M, s: P } = this, O = u.toBytes(M), j = u.toBytes(P);
6094
6120
  return R === "recovered" ? (W(), ot(Uint8Array.of(this.assertRecovery()), O, j)) : ot(O, j);
6095
6121
  }
6096
6122
  toHex(R) {
@@ -6101,8 +6127,8 @@ function a1(t, e, n = {}) {
6101
6127
  const se = n.bits2int === void 0 ? function(R) {
6102
6128
  if (R.length > 8192)
6103
6129
  throw new Error("input is too large");
6104
- const N = Nn(R), P = R.length * 8 - h;
6105
- return P > 0 ? N >> BigInt(P) : N;
6130
+ const M = On(R), P = R.length * 8 - h;
6131
+ return P > 0 ? M >> BigInt(P) : M;
6106
6132
  } : n.bits2int, ie = n.bits2int_modN === void 0 ? function(R) {
6107
6133
  return u.create(se(R));
6108
6134
  } : n.bits2int_modN, H = vs(h);
@@ -6112,8 +6138,8 @@ function a1(t, e, n = {}) {
6112
6138
  function b(U, R) {
6113
6139
  return Re(U, void 0, "message"), R ? Re(s(U), void 0, "prehashed message") : U;
6114
6140
  }
6115
- function y(U, R, N) {
6116
- const { lowS: P, prehash: O, extraEntropy: j } = Xr(N, V);
6141
+ function y(U, R, M) {
6142
+ const { lowS: P, prehash: O, extraEntropy: j } = Xr(M, V);
6117
6143
  U = b(U, O);
6118
6144
  const Y = ie(U), ce = u.fromBytes(R);
6119
6145
  if (!u.isValidNot0(ce))
@@ -6139,19 +6165,19 @@ function a1(t, e, n = {}) {
6139
6165
  }
6140
6166
  return { seed: oe, k2sig: S };
6141
6167
  }
6142
- function v(U, R, N = {}) {
6143
- const { seed: P, k2sig: O } = y(U, R, N);
6144
- return Vc(s.outputLen, u.BYTES, o)(P, O).toBytes(N.format);
6168
+ function v(U, R, M = {}) {
6169
+ const { seed: P, k2sig: O } = y(U, R, M);
6170
+ return Vc(s.outputLen, u.BYTES, o)(P, O).toBytes(M.format);
6145
6171
  }
6146
- function B(U, R, N, P = {}) {
6172
+ function B(U, R, M, P = {}) {
6147
6173
  const { lowS: O, prehash: j, format: Y } = Xr(P, V);
6148
- if (N = Re(N, void 0, "publicKey"), R = b(R, j), !io(U)) {
6174
+ if (M = Re(M, void 0, "publicKey"), R = b(R, j), !io(U)) {
6149
6175
  const ce = U instanceof J ? ", use sig.toBytes()" : "";
6150
6176
  throw new Error("verify expects Uint8Array signature" + ce);
6151
6177
  }
6152
- M(U, Y);
6178
+ N(U, Y);
6153
6179
  try {
6154
- const ce = J.fromBytes(U, Y), ae = t.fromBytes(N);
6180
+ const ce = J.fromBytes(U, Y), ae = t.fromBytes(M);
6155
6181
  if (O && ce.hasHighS())
6156
6182
  return !1;
6157
6183
  const { r: oe, s: k } = ce, S = ie(R), I = u.inv(k), A = u.create(S * I), F = u.create(oe * I), X = t.BASE.multiplyUnsafe(A).add(ae.multiplyUnsafe(F));
@@ -6160,8 +6186,8 @@ function a1(t, e, n = {}) {
6160
6186
  return !1;
6161
6187
  }
6162
6188
  }
6163
- function G(U, R, N = {}) {
6164
- const { prehash: P } = Xr(N, V);
6189
+ function G(U, R, M = {}) {
6190
+ const { prehash: P } = Xr(M, V);
6165
6191
  return R = b(R, P), J.fromBytes(U, "recovered").recoverPublicKey(R).toBytes();
6166
6192
  }
6167
6193
  return Object.freeze({
@@ -6187,19 +6213,19 @@ const c1 = {
6187
6213
  b: BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),
6188
6214
  Gx: BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),
6189
6215
  Gy: BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5")
6190
- }, u1 = /* @__PURE__ */ i1(c1), l1 = /* @__PURE__ */ a1(u1, Nc), bi = {
6216
+ }, u1 = /* @__PURE__ */ i1(c1), l1 = /* @__PURE__ */ a1(u1, Mc), bi = {
6191
6217
  x: "6bkPbVZXx-c08blVs6qIwm0gfSRLS2nnf2Tsz19ggtM",
6192
6218
  y: "lhi486ASKQkS8TGbVee-FpdAu7qKaO3gad_4ScX8qJI"
6193
6219
  }, h1 = 60;
6194
6220
  let os = null, Ss = !1, bt = null, Pt = 0;
6195
- function Tn(t) {
6221
+ function Sn(t) {
6196
6222
  const e = t.replace(/-/g, "+").replace(/_/g, "/"), n = atob(e), s = new Uint8Array(n.length);
6197
6223
  for (let i = 0; i < n.length; i++) s[i] = n.charCodeAt(i);
6198
6224
  return s;
6199
6225
  }
6200
6226
  async function f1() {
6201
6227
  try {
6202
- const t = Tn(bi.x), e = Tn(bi.y);
6228
+ const t = Sn(bi.x), e = Sn(bi.y);
6203
6229
  if (t.length !== 32 || e.length !== 32) throw new Error("bad key");
6204
6230
  const n = new Uint8Array(65);
6205
6231
  n[0] = 4, n.set(t, 1), n.set(e, 33), os = n;
@@ -6215,12 +6241,12 @@ async function _i(t) {
6215
6241
  try {
6216
6242
  const e = t.split(".");
6217
6243
  if (e.length !== 3) throw new Error("malformed");
6218
- const n = new TextEncoder().encode(e[0] + "." + e[1]), s = Tn(e[2]);
6244
+ const n = new TextEncoder().encode(e[0] + "." + e[1]), s = Sn(e[2]);
6219
6245
  if (s.length !== 64) throw new Error("invalid signature length");
6220
6246
  if (!l1.verify(s, n, os, {
6221
6247
  lowS: !1
6222
6248
  })) throw new Error("invalid signature");
6223
- const o = JSON.parse(new TextDecoder().decode(Tn(e[1])));
6249
+ const o = JSON.parse(new TextDecoder().decode(Sn(e[1])));
6224
6250
  bt = o.c ?? {}, Pt = o.e ?? 0;
6225
6251
  } catch {
6226
6252
  bt = null, Pt = 0;
@@ -6232,7 +6258,7 @@ function d1(t, e) {
6232
6258
  return Pt > 0 && Pt + h1 < n ? (bt = null, Pt = 0, e) : typeof bt[t] == "number" ? bt[t] : e;
6233
6259
  }
6234
6260
  const xs = 44, As = 74, Is = 44, Rs = 23, Io = "#F1F1F1";
6235
- let Xt = null, zt = null, Ro = null, Co = null, De = null, qt = null, Sn = null, ki = null, Lo = 0;
6261
+ let Xt = null, zt = null, Ro = null, Co = null, De = null, qt = null, xn = null, ki = null, Lo = 0;
6236
6262
  const m1 = `
6237
6263
  attribute vec2 a_pos;
6238
6264
  attribute vec2 a_uv;
@@ -6295,7 +6321,7 @@ function k1(t) {
6295
6321
  const s = t;
6296
6322
  if (typeof s.createVertexArray == "function") {
6297
6323
  const i = t.getParameter(Po), o = t.getParameter(t.ARRAY_BUFFER_BINDING);
6298
- Sn = s.createVertexArray(), s.bindVertexArray(Sn), t.bindBuffer(t.ARRAY_BUFFER, qt);
6324
+ xn = s.createVertexArray(), s.bindVertexArray(xn), t.bindBuffer(t.ARRAY_BUFFER, qt);
6299
6325
  const c = t.getAttribLocation(De, "a_pos"), u = t.getAttribLocation(De, "a_uv");
6300
6326
  t.enableVertexAttribArray(c), t.enableVertexAttribArray(u), t.vertexAttribPointer(c, 2, t.FLOAT, !1, 16, 0), t.vertexAttribPointer(u, 2, t.FLOAT, !1, 16, 8), s.bindVertexArray(i), t.bindBuffer(t.ARRAY_BUFFER, o);
6301
6327
  }
@@ -6310,9 +6336,9 @@ function v1(t, e, n, s) {
6310
6336
  if (k1(t), !De || !qt) return;
6311
6337
  const i = n ? Co : Ro;
6312
6338
  if (!i) return;
6313
- const o = (n ? Is : xs) * s, c = (n ? Rs : As) * s, u = e.width, f = e.height, h = Math.round(n ? (u - o) / 2 : 48 * s), m = Math.round((n ? 52 : 48) * s), g = h / u * 2 - 1, x = 1 - (m + c) / f * 2, w = (h + o) / u * 2 - 1, D = 1 - m / f * 2, V = t, $ = Sn && typeof V.bindVertexArray == "function", K = t.getParameter(t.CURRENT_PROGRAM), L = t.getParameter(t.ACTIVE_TEXTURE);
6339
+ const o = (n ? Is : xs) * s, c = (n ? Rs : As) * s, u = e.width, f = e.height, h = Math.round(n ? (u - o) / 2 : 48 * s), m = Math.round((n ? 52 : 48) * s), g = h / u * 2 - 1, x = 1 - (m + c) / f * 2, w = (h + o) / u * 2 - 1, D = 1 - m / f * 2, V = t, $ = xn && typeof V.bindVertexArray == "function", K = t.getParameter(t.CURRENT_PROGRAM), L = t.getParameter(t.ACTIVE_TEXTURE);
6314
6340
  t.activeTexture(t.TEXTURE0);
6315
- const W = t.getParameter(t.TEXTURE_BINDING_2D), M = t.getParameter(t.ARRAY_BUFFER_BINDING), J = t.getParameter(t.FRAMEBUFFER_BINDING), se = t.getParameter(t.VIEWPORT), ie = t.isEnabled(t.BLEND), H = t.getParameter(t.BLEND_SRC_RGB), de = t.getParameter(t.BLEND_DST_RGB), b = t.getParameter(t.BLEND_SRC_ALPHA), y = t.getParameter(t.BLEND_DST_ALPHA), v = t.getParameter(t.BLEND_EQUATION_RGB), B = t.getParameter(t.BLEND_EQUATION_ALPHA), G = t.isEnabled(t.DEPTH_TEST), U = t.isEnabled(t.SCISSOR_TEST), R = t.isEnabled(t.STENCIL_TEST), N = t.isEnabled(t.CULL_FACE), P = t.getParameter(t.COLOR_WRITEMASK), O = t.getParameter(t.UNPACK_FLIP_Y_WEBGL), j = $ ? t.getParameter(Po) : null;
6341
+ const W = t.getParameter(t.TEXTURE_BINDING_2D), N = t.getParameter(t.ARRAY_BUFFER_BINDING), J = t.getParameter(t.FRAMEBUFFER_BINDING), se = t.getParameter(t.VIEWPORT), ie = t.isEnabled(t.BLEND), H = t.getParameter(t.BLEND_SRC_RGB), de = t.getParameter(t.BLEND_DST_RGB), b = t.getParameter(t.BLEND_SRC_ALPHA), y = t.getParameter(t.BLEND_DST_ALPHA), v = t.getParameter(t.BLEND_EQUATION_RGB), B = t.getParameter(t.BLEND_EQUATION_ALPHA), G = t.isEnabled(t.DEPTH_TEST), U = t.isEnabled(t.SCISSOR_TEST), R = t.isEnabled(t.STENCIL_TEST), M = t.isEnabled(t.CULL_FACE), P = t.getParameter(t.COLOR_WRITEMASK), O = t.getParameter(t.UNPACK_FLIP_Y_WEBGL), j = $ ? t.getParameter(Po) : null;
6316
6342
  t.bindFramebuffer(t.FRAMEBUFFER, null), t.viewport(0, 0, u, f), t.useProgram(De), t.enable(t.BLEND), t.blendEquation(t.FUNC_ADD), t.blendFunc(t.SRC_ALPHA, t.ONE_MINUS_SRC_ALPHA), t.disable(t.DEPTH_TEST), t.disable(t.SCISSOR_TEST), t.disable(t.STENCIL_TEST), t.disable(t.CULL_FACE), t.colorMask(!0, !0, !0, !0), t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL, 0), t.bindTexture(t.TEXTURE_2D, i), t.uniform1i(t.getUniformLocation(De, "u_tex"), 0), t.uniform1f(t.getUniformLocation(De, "u_alpha"), 0.85);
6317
6343
  const Y = new Float32Array([
6318
6344
  g,
@@ -6341,15 +6367,15 @@ function v1(t, e, n, s) {
6341
6367
  1
6342
6368
  ]);
6343
6369
  if ($)
6344
- V.bindVertexArray(Sn), t.bindBuffer(t.ARRAY_BUFFER, qt), t.bufferData(t.ARRAY_BUFFER, Y, t.DYNAMIC_DRAW);
6370
+ V.bindVertexArray(xn), t.bindBuffer(t.ARRAY_BUFFER, qt), t.bufferData(t.ARRAY_BUFFER, Y, t.DYNAMIC_DRAW);
6345
6371
  else {
6346
6372
  t.bindBuffer(t.ARRAY_BUFFER, qt), t.bufferData(t.ARRAY_BUFFER, Y, t.DYNAMIC_DRAW);
6347
6373
  const ce = t.getAttribLocation(De, "a_pos"), ae = t.getAttribLocation(De, "a_uv");
6348
6374
  t.enableVertexAttribArray(ce), t.enableVertexAttribArray(ae), t.vertexAttribPointer(ce, 2, t.FLOAT, !1, 16, 0), t.vertexAttribPointer(ae, 2, t.FLOAT, !1, 16, 8);
6349
6375
  }
6350
- t.drawArrays(t.TRIANGLES, 0, 6), $ && V.bindVertexArray(j), t.bindFramebuffer(t.FRAMEBUFFER, J), t.viewport(se[0], se[1], se[2], se[3]), t.bindBuffer(t.ARRAY_BUFFER, M), t.colorMask(P[0], P[1], P[2], P[3]), t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL, O ? 1 : 0), U ? t.enable(t.SCISSOR_TEST) : t.disable(t.SCISSOR_TEST), R ? t.enable(t.STENCIL_TEST) : t.disable(t.STENCIL_TEST), N ? t.enable(t.CULL_FACE) : t.disable(t.CULL_FACE), G ? t.enable(t.DEPTH_TEST) : t.disable(t.DEPTH_TEST), ie ? t.enable(t.BLEND) : t.disable(t.BLEND), t.blendFuncSeparate(H, de, b, y), t.blendEquationSeparate(v, B), t.activeTexture(t.TEXTURE0), t.bindTexture(t.TEXTURE_2D, W), t.activeTexture(L), t.useProgram(K);
6376
+ t.drawArrays(t.TRIANGLES, 0, 6), $ && V.bindVertexArray(j), t.bindFramebuffer(t.FRAMEBUFFER, J), t.viewport(se[0], se[1], se[2], se[3]), t.bindBuffer(t.ARRAY_BUFFER, N), t.colorMask(P[0], P[1], P[2], P[3]), t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL, O ? 1 : 0), U ? t.enable(t.SCISSOR_TEST) : t.disable(t.SCISSOR_TEST), R ? t.enable(t.STENCIL_TEST) : t.disable(t.STENCIL_TEST), M ? t.enable(t.CULL_FACE) : t.disable(t.CULL_FACE), G ? t.enable(t.DEPTH_TEST) : t.disable(t.DEPTH_TEST), ie ? t.enable(t.BLEND) : t.disable(t.BLEND), t.blendFuncSeparate(H, de, b, y), t.blendEquationSeparate(v, B), t.activeTexture(t.TEXTURE0), t.bindTexture(t.TEXTURE_2D, W), t.activeTexture(L), t.useProgram(K);
6351
6377
  }
6352
- class xn {
6378
+ class An {
6353
6379
  canvas = null;
6354
6380
  ctx = null;
6355
6381
  gl = null;
@@ -6506,7 +6532,10 @@ class xn {
6506
6532
  getFrequencyData: () => new Uint8Array(0),
6507
6533
  getWaveform: () => new Float32Array(0)
6508
6534
  },
6509
- // Main video stream (index 0, CV enabled)
6535
+ // Main video stream (index 0, CV enabled). The `cv` sub-object is
6536
+ // assigned to `videoSystems[0].getCvSurface()` in the constructor
6537
+ // (after the videoSystems[0] eager allocation) so it carries real
6538
+ // CVSystem verbs from t=0 and `module-scope` artist calls work.
6510
6539
  video: {
6511
6540
  isConnected: !1,
6512
6541
  currentFrame: null,
@@ -6514,52 +6543,8 @@ class xn {
6514
6543
  frameHeight: 0,
6515
6544
  frameRate: 0,
6516
6545
  getFrameData: () => null,
6517
- // Unified CV surface: data + verbs together. Replaced wholesale by
6518
- // Object.assign with VideoSystem.getVideoAPI() once a stream
6519
- // connects. Defaults below match the empty/no-op contract for a
6520
- // stream with no CV running yet.
6521
- cv: {
6522
- // Data
6523
- analysedFrame: null,
6524
- getAnalysedFrameData: () => null,
6525
- faces: [],
6526
- hands: [],
6527
- pose: null,
6528
- segmentation: null,
6529
- // Verbs
6530
- enableFaceDetection: async () => {
6531
- },
6532
- disableFaceDetection: async () => {
6533
- },
6534
- enableFaceMesh: async () => {
6535
- },
6536
- disableFaceMesh: async () => {
6537
- },
6538
- enableEmotionDetection: async () => {
6539
- },
6540
- disableEmotionDetection: async () => {
6541
- },
6542
- enableHandTracking: async () => {
6543
- },
6544
- disableHandTracking: async () => {
6545
- },
6546
- enablePoseDetection: async () => {
6547
- },
6548
- disablePoseDetection: async () => {
6549
- },
6550
- enableBodySegmentation: async () => {
6551
- },
6552
- disableBodySegmentation: async () => {
6553
- },
6554
- getActiveFeatures: () => [],
6555
- isProcessing: () => !1,
6556
- getStats: () => ({ activeFeatures: [], processingTime: 0, effectiveFPS: 0, actualFPS: 0, isProcessing: !1 }),
6557
- getWorkerStatus: () => ({ healthy: !1, restartCount: 0, maxRestarts: 3 }),
6558
- restartWorker: async () => {
6559
- },
6560
- checkWebGLAvailability: () => !1,
6561
- getResourceUsage: () => ({ activeFeatures: 0, estimatedWebGLContexts: 0, webglAvailable: !1 })
6562
- }
6546
+ cv: null
6547
+ // overwritten in constructor with videoSystems[0].cvSurface
6563
6548
  },
6564
6549
  // Additional video streams (index 1+, no CV)
6565
6550
  videoStreams: [],
@@ -6591,7 +6576,7 @@ class xn {
6591
6576
  constructor() {
6592
6577
  this.parameterSystem = new _c((e, n) => {
6593
6578
  this.postMessage(e, n);
6594
- }), this.interactionSystem = new kc(), Object.assign(this.viji, this.interactionSystem.getInteractionAPIs()), this.viji.audio.getFrequencyData = () => this.audioFrequencyData, this.viji.audio.getWaveform = () => this.audioWaveformData, this.setupMessageHandling();
6579
+ }), this.interactionSystem = new kc(), this.videoSystems[0] = new ln(), this.viji.video.cv = this.videoSystems[0].getCvSurface(), Object.assign(this.viji, this.interactionSystem.getInteractionAPIs()), this.viji.audio.getFrequencyData = () => this.audioFrequencyData, this.viji.audio.getWaveform = () => this.audioWaveformData, this.setupMessageHandling();
6595
6580
  }
6596
6581
  /**
6597
6582
  * Initialize P5.js mode
@@ -6707,7 +6692,7 @@ class xn {
6707
6692
  updateVijiAudioStreams() {
6708
6693
  const e = [];
6709
6694
  for (const [n, s] of this.audioStreamStates)
6710
- n >= xn.AUDIO_ADDITIONAL_BASE && n < xn.AUDIO_DEVICE_BASE && e.push({ index: n, ...s });
6695
+ n >= An.AUDIO_ADDITIONAL_BASE && n < An.AUDIO_DEVICE_BASE && e.push({ index: n, ...s });
6711
6696
  e.sort((n, s) => n.index - s.index), this.viji.audioStreams.length = e.length;
6712
6697
  for (let n = 0; n < e.length; n++) {
6713
6698
  const s = e[n], i = s.frequencyData, o = s.waveformData;
@@ -6837,7 +6822,7 @@ class xn {
6837
6822
  simdBinary: URL.createObjectURL(new Blob([s.simdBinary], { type: "application/wasm" })),
6838
6823
  nosimdLoaderJs: URL.createObjectURL(new Blob([s.nosimdLoaderJs], { type: "application/javascript" })),
6839
6824
  nosimdBinary: URL.createObjectURL(new Blob([s.nosimdBinary], { type: "application/wasm" }))
6840
- };
6825
+ }, this.videoSystems[0] && this.videoSystems[0].setCVWasmUrls(this.cvWasmUrls);
6841
6826
  }
6842
6827
  e.data.controlPort && (this.controlPort = e.data.controlPort, this.controlPort.onmessage = (s) => {
6843
6828
  this.dispatchMessage(s.data);
@@ -6995,7 +6980,7 @@ class xn {
6995
6980
  const { streamIndex: n, streamType: s, deviceId: i } = e.data, o = n || 0;
6996
6981
  let c = this.videoSystems[o];
6997
6982
  const u = !!c;
6998
- switch (c || (c = new jr(), c.setDebugMode(this.debugMode), this.cvWasmUrls && c.setCVWasmUrls(this.cvWasmUrls), this.videoSystems[o] = c), c.setStreamType(s, i), c.handleCanvasSetup({
6983
+ switch (c || (c = new ln(), c.setDebugMode(this.debugMode), this.cvWasmUrls && c.setCVWasmUrls(this.cvWasmUrls), this.videoSystems[o] = c), c.setStreamType(s, i), c.handleCanvasSetup({
6999
6984
  offscreenCanvas: e.data.offscreenCanvas,
7000
6985
  width: e.data.width,
7001
6986
  height: e.data.height,
@@ -7064,13 +7049,13 @@ class xn {
7064
7049
  this.debugLog(`[Compositor] Preparing ${s} direct frame slot(s) at base index ${n}`);
7065
7050
  for (let i = 0; i < s; i++) {
7066
7051
  const o = n + i;
7067
- this.videoSystems[o] || (this.videoSystems[o] = new jr()), this.videoSystems[o].setDebugMode(this.debugMode), this.videoSystems[o].initializeForDirectFrames(this.rendererType);
7052
+ this.videoSystems[o] || (this.videoSystems[o] = new ln()), this.videoSystems[o].setDebugMode(this.debugMode), this.videoSystems[o].initializeForDirectFrames(this.rendererType);
7068
7053
  }
7069
7054
  this.updateVijiVideoStreams(), this.debugLog(`[Compositor] Prepared ${s} direct frame slot(s)`);
7070
7055
  }
7071
7056
  handleVideoFrameDirect(e) {
7072
7057
  const n = e.data.streamIndex || 0;
7073
- this.videoSystems[n] || (this.debugLog(`[Compositor] Creating new VideoSystem at index ${n} for direct frames`), this.videoSystems[n] = new jr(), this.videoSystems[n].setDebugMode(this.debugMode), this.videoSystems[n].initializeForDirectFrames(this.rendererType)), this.videoSystems[n].handleDirectFrame(e.data);
7058
+ this.videoSystems[n] || (this.debugLog(`[Compositor] Creating new VideoSystem at index ${n} for direct frames`), this.videoSystems[n] = new ln(), this.videoSystems[n].setDebugMode(this.debugMode), this.videoSystems[n].initializeForDirectFrames(this.rendererType)), this.videoSystems[n].handleDirectFrame(e.data);
7074
7059
  }
7075
7060
  handlePerformanceUpdate(e) {
7076
7061
  this.debugLog("Performance update:", e.data);
@@ -7091,15 +7076,15 @@ class xn {
7091
7076
  if (!this.canvas)
7092
7077
  throw new Error("Canvas not initialized");
7093
7078
  if ((e.data.format || "blob") === "bitmap") {
7094
- const M = this.canvas.transferToImageBitmap();
7095
- this.postMessage("capture-frame-result", { id: e.id, bitmap: M }, [M]);
7079
+ const N = this.canvas.transferToImageBitmap();
7080
+ this.postMessage("capture-frame-result", { id: e.id, bitmap: N }, [N]);
7096
7081
  return;
7097
7082
  }
7098
7083
  const s = e.data.type || "image/jpeg", i = this.canvas.width, o = this.canvas.height;
7099
7084
  let c = i, u = o;
7100
7085
  if (typeof e.data.resolution == "number") {
7101
- const M = e.data.resolution > 0 ? e.data.resolution : 1;
7102
- c = Math.max(1, Math.floor(i * M)), u = Math.max(1, Math.floor(o * M));
7086
+ const N = e.data.resolution > 0 ? e.data.resolution : 1;
7087
+ c = Math.max(1, Math.floor(i * N)), u = Math.max(1, Math.floor(o * N));
7103
7088
  } else e.data.resolution && typeof e.data.resolution == "object" && (c = Math.max(1, Math.floor(e.data.resolution.width)), u = Math.max(1, Math.floor(e.data.resolution.height)));
7104
7089
  const f = i / o, h = c / u;
7105
7090
  let m = 0, g = 0, x = i, w = o;
@@ -7108,12 +7093,12 @@ class xn {
7108
7093
  const $ = this.canvas.getContext("webgl2") || this.canvas.getContext("webgl");
7109
7094
  if ($) {
7110
7095
  $.finish();
7111
- const M = new Uint8Array(i * o * 4);
7112
- $.readPixels(0, 0, i, o, $.RGBA, $.UNSIGNED_BYTE, M);
7096
+ const N = new Uint8Array(i * o * 4);
7097
+ $.readPixels(0, 0, i, o, $.RGBA, $.UNSIGNED_BYTE, N);
7113
7098
  const J = new Uint8ClampedArray(i * o * 4);
7114
7099
  for (let H = 0; H < o; H++) {
7115
7100
  const de = (o - 1 - H) * i * 4, b = H * i * 4;
7116
- J.set(M.subarray(de, de + i * 4), b);
7101
+ J.set(N.subarray(de, de + i * 4), b);
7117
7102
  }
7118
7103
  D = new OffscreenCanvas(i, o);
7119
7104
  const se = D.getContext("2d");
@@ -7665,9 +7650,9 @@ var d;
7665
7650
  t[t._infer = L] = "_infer";
7666
7651
  const W = L + 1;
7667
7652
  t[t._interface = W] = "_interface";
7668
- const M = W + 1;
7669
- t[t._is = M] = "_is";
7670
- const J = M + 1;
7653
+ const N = W + 1;
7654
+ t[t._is = N] = "_is";
7655
+ const J = N + 1;
7671
7656
  t[t._keyof = J] = "_keyof";
7672
7657
  const se = J + 1;
7673
7658
  t[t._mixins = se] = "_mixins";
@@ -7691,9 +7676,9 @@ var d;
7691
7676
  t[t._proto = U] = "_proto";
7692
7677
  const R = U + 1;
7693
7678
  t[t._public = R] = "_public";
7694
- const N = R + 1;
7695
- t[t._readonly = N] = "_readonly";
7696
- const P = N + 1;
7679
+ const M = R + 1;
7680
+ t[t._readonly = M] = "_readonly";
7681
+ const P = M + 1;
7697
7682
  t[t._require = P] = "_require";
7698
7683
  const O = P + 1;
7699
7684
  t[t._satisfies = O] = "_satisfies";
@@ -7749,8 +7734,8 @@ var r;
7749
7734
  t[t.braceBarL = L] = "braceBarL";
7750
7735
  const W = 11264;
7751
7736
  t[t.braceR = W] = "braceR";
7752
- const M = 12288;
7753
- t[t.braceBarR = M] = "braceBarR";
7737
+ const N = 12288;
7738
+ t[t.braceBarR = N] = "braceBarR";
7754
7739
  const J = 13824;
7755
7740
  t[t.parenL = J] = "parenL";
7756
7741
  const se = 14336;
@@ -7775,8 +7760,8 @@ var r;
7775
7760
  t[t.template = U] = "template";
7776
7761
  const R = 24576;
7777
7762
  t[t.ellipsis = R] = "ellipsis";
7778
- const N = 25600;
7779
- t[t.backQuote = N] = "backQuote";
7763
+ const M = 25600;
7764
+ t[t.backQuote = M] = "backQuote";
7780
7765
  const P = 27136;
7781
7766
  t[t.dollarBraceL = P] = "dollarBraceL";
7782
7767
  const O = 27648;
@@ -7827,98 +7812,98 @@ var r;
7827
7812
  t[t.minus = It] = "minus";
7828
7813
  const Ot = 51723;
7829
7814
  t[t.modulo = Ot] = "modulo";
7830
- const Xn = 52235;
7831
- t[t.star = Xn] = "star";
7832
- const zn = 53259;
7833
- t[t.slash = zn] = "slash";
7834
- const Yn = 54348;
7835
- t[t.exponent = Yn] = "exponent";
7836
- const Kn = 55296;
7837
- t[t.jsxName = Kn] = "jsxName";
7838
- const Zn = 56320;
7839
- t[t.jsxText = Zn] = "jsxText";
7840
- const Qn = 57344;
7841
- t[t.jsxEmptyText = Qn] = "jsxEmptyText";
7842
- const Jn = 58880;
7843
- t[t.jsxTagStart = Jn] = "jsxTagStart";
7844
- const er = 59392;
7845
- t[t.jsxTagEnd = er] = "jsxTagEnd";
7846
- const tr = 60928;
7847
- t[t.typeParameterStart = tr] = "typeParameterStart";
7848
- const nr = 61440;
7849
- t[t.nonNullAssertion = nr] = "nonNullAssertion";
7850
- const rr = 62480;
7851
- t[t._break = rr] = "_break";
7852
- const sr = 63504;
7853
- t[t._case = sr] = "_case";
7854
- const ir = 64528;
7855
- t[t._catch = ir] = "_catch";
7856
- const or = 65552;
7857
- t[t._continue = or] = "_continue";
7858
- const ar = 66576;
7859
- t[t._debugger = ar] = "_debugger";
7860
- const cr = 67600;
7861
- t[t._default = cr] = "_default";
7862
- const ur = 68624;
7863
- t[t._do = ur] = "_do";
7864
- const lr = 69648;
7865
- t[t._else = lr] = "_else";
7866
- const hr = 70672;
7867
- t[t._finally = hr] = "_finally";
7868
- const fr = 71696;
7869
- t[t._for = fr] = "_for";
7870
- const dr = 73232;
7871
- t[t._function = dr] = "_function";
7872
- const mr = 73744;
7873
- t[t._if = mr] = "_if";
7874
- const pr = 74768;
7875
- t[t._return = pr] = "_return";
7876
- const gr = 75792;
7877
- t[t._switch = gr] = "_switch";
7878
- const yr = 77456;
7879
- t[t._throw = yr] = "_throw";
7880
- const br = 77840;
7881
- t[t._try = br] = "_try";
7882
- const _r = 78864;
7883
- t[t._var = _r] = "_var";
7884
- const kr = 79888;
7885
- t[t._let = kr] = "_let";
7886
- const wr = 80912;
7887
- t[t._const = wr] = "_const";
7888
- const vr = 81936;
7889
- t[t._while = vr] = "_while";
7890
- const Er = 82960;
7891
- t[t._with = Er] = "_with";
7892
- const Tr = 84496;
7893
- t[t._new = Tr] = "_new";
7894
- const Sr = 85520;
7895
- t[t._this = Sr] = "_this";
7896
- const xr = 86544;
7897
- t[t._super = xr] = "_super";
7898
- const Ar = 87568;
7899
- t[t._class = Ar] = "_class";
7900
- const Ir = 88080;
7901
- t[t._extends = Ir] = "_extends";
7902
- const Rr = 89104;
7903
- t[t._export = Rr] = "_export";
7904
- const Cr = 90640;
7905
- t[t._import = Cr] = "_import";
7906
- const Lr = 91664;
7907
- t[t._yield = Lr] = "_yield";
7908
- const Pr = 92688;
7909
- t[t._null = Pr] = "_null";
7910
- const Fr = 93712;
7911
- t[t._true = Fr] = "_true";
7912
- const Dr = 94736;
7913
- t[t._false = Dr] = "_false";
7914
- const Ur = 95256;
7915
- t[t._in = Ur] = "_in";
7815
+ const zn = 52235;
7816
+ t[t.star = zn] = "star";
7817
+ const Yn = 53259;
7818
+ t[t.slash = Yn] = "slash";
7819
+ const Kn = 54348;
7820
+ t[t.exponent = Kn] = "exponent";
7821
+ const Zn = 55296;
7822
+ t[t.jsxName = Zn] = "jsxName";
7823
+ const Qn = 56320;
7824
+ t[t.jsxText = Qn] = "jsxText";
7825
+ const Jn = 57344;
7826
+ t[t.jsxEmptyText = Jn] = "jsxEmptyText";
7827
+ const er = 58880;
7828
+ t[t.jsxTagStart = er] = "jsxTagStart";
7829
+ const tr = 59392;
7830
+ t[t.jsxTagEnd = tr] = "jsxTagEnd";
7831
+ const nr = 60928;
7832
+ t[t.typeParameterStart = nr] = "typeParameterStart";
7833
+ const rr = 61440;
7834
+ t[t.nonNullAssertion = rr] = "nonNullAssertion";
7835
+ const sr = 62480;
7836
+ t[t._break = sr] = "_break";
7837
+ const ir = 63504;
7838
+ t[t._case = ir] = "_case";
7839
+ const or = 64528;
7840
+ t[t._catch = or] = "_catch";
7841
+ const ar = 65552;
7842
+ t[t._continue = ar] = "_continue";
7843
+ const cr = 66576;
7844
+ t[t._debugger = cr] = "_debugger";
7845
+ const ur = 67600;
7846
+ t[t._default = ur] = "_default";
7847
+ const lr = 68624;
7848
+ t[t._do = lr] = "_do";
7849
+ const hr = 69648;
7850
+ t[t._else = hr] = "_else";
7851
+ const fr = 70672;
7852
+ t[t._finally = fr] = "_finally";
7853
+ const dr = 71696;
7854
+ t[t._for = dr] = "_for";
7855
+ const mr = 73232;
7856
+ t[t._function = mr] = "_function";
7857
+ const pr = 73744;
7858
+ t[t._if = pr] = "_if";
7859
+ const gr = 74768;
7860
+ t[t._return = gr] = "_return";
7861
+ const yr = 75792;
7862
+ t[t._switch = yr] = "_switch";
7863
+ const br = 77456;
7864
+ t[t._throw = br] = "_throw";
7865
+ const _r = 77840;
7866
+ t[t._try = _r] = "_try";
7867
+ const kr = 78864;
7868
+ t[t._var = kr] = "_var";
7869
+ const wr = 79888;
7870
+ t[t._let = wr] = "_let";
7871
+ const vr = 80912;
7872
+ t[t._const = vr] = "_const";
7873
+ const Er = 81936;
7874
+ t[t._while = Er] = "_while";
7875
+ const Tr = 82960;
7876
+ t[t._with = Tr] = "_with";
7877
+ const Sr = 84496;
7878
+ t[t._new = Sr] = "_new";
7879
+ const xr = 85520;
7880
+ t[t._this = xr] = "_this";
7881
+ const Ar = 86544;
7882
+ t[t._super = Ar] = "_super";
7883
+ const Ir = 87568;
7884
+ t[t._class = Ir] = "_class";
7885
+ const Rr = 88080;
7886
+ t[t._extends = Rr] = "_extends";
7887
+ const Cr = 89104;
7888
+ t[t._export = Cr] = "_export";
7889
+ const Lr = 90640;
7890
+ t[t._import = Lr] = "_import";
7891
+ const Pr = 91664;
7892
+ t[t._yield = Pr] = "_yield";
7893
+ const Fr = 92688;
7894
+ t[t._null = Fr] = "_null";
7895
+ const Dr = 93712;
7896
+ t[t._true = Dr] = "_true";
7897
+ const Ur = 94736;
7898
+ t[t._false = Ur] = "_false";
7899
+ const Nr = 95256;
7900
+ t[t._in = Nr] = "_in";
7916
7901
  const Mr = 96280;
7917
7902
  t[t._instanceof = Mr] = "_instanceof";
7918
- const Nr = 97936;
7919
- t[t._typeof = Nr] = "_typeof";
7920
- const Or = 98960;
7921
- t[t._void = Or] = "_void";
7903
+ const Or = 97936;
7904
+ t[t._typeof = Or] = "_typeof";
7905
+ const Br = 98960;
7906
+ t[t._void = Br] = "_void";
7922
7907
  const Xa = 99984;
7923
7908
  t[t._delete = Xa] = "_delete";
7924
7909
  const za = 100880;
@@ -8312,8 +8297,8 @@ var p;
8312
8297
  t[t.comma = L] = "comma";
8313
8298
  const W = 45;
8314
8299
  t[t.dash = W] = "dash";
8315
- const M = 46;
8316
- t[t.dot = M] = "dot";
8300
+ const N = 46;
8301
+ t[t.dot = N] = "dot";
8317
8302
  const J = 47;
8318
8303
  t[t.slash = J] = "slash";
8319
8304
  const se = 48;
@@ -8338,8 +8323,8 @@ var p;
8338
8323
  t[t.digit9 = U] = "digit9";
8339
8324
  const R = 58;
8340
8325
  t[t.colon = R] = "colon";
8341
- const N = 59;
8342
- t[t.semicolon = N] = "semicolon";
8326
+ const M = 59;
8327
+ t[t.semicolon = M] = "semicolon";
8343
8328
  const P = 60;
8344
8329
  t[t.lessThan = P] = "lessThan";
8345
8330
  const O = 61;
@@ -8390,123 +8375,123 @@ var p;
8390
8375
  t[t.uppercaseS = It] = "uppercaseS";
8391
8376
  const Ot = 84;
8392
8377
  t[t.uppercaseT = Ot] = "uppercaseT";
8393
- const Xn = 85;
8394
- t[t.uppercaseU = Xn] = "uppercaseU";
8395
- const zn = 86;
8396
- t[t.uppercaseV = zn] = "uppercaseV";
8397
- const Yn = 87;
8398
- t[t.uppercaseW = Yn] = "uppercaseW";
8399
- const Kn = 88;
8400
- t[t.uppercaseX = Kn] = "uppercaseX";
8401
- const Zn = 89;
8402
- t[t.uppercaseY = Zn] = "uppercaseY";
8403
- const Qn = 90;
8404
- t[t.uppercaseZ = Qn] = "uppercaseZ";
8405
- const Jn = 91;
8406
- t[t.leftSquareBracket = Jn] = "leftSquareBracket";
8407
- const er = 92;
8408
- t[t.backslash = er] = "backslash";
8409
- const tr = 93;
8410
- t[t.rightSquareBracket = tr] = "rightSquareBracket";
8411
- const nr = 94;
8412
- t[t.caret = nr] = "caret";
8413
- const rr = 95;
8414
- t[t.underscore = rr] = "underscore";
8415
- const sr = 96;
8416
- t[t.graveAccent = sr] = "graveAccent";
8417
- const ir = 97;
8418
- t[t.lowercaseA = ir] = "lowercaseA";
8419
- const or = 98;
8420
- t[t.lowercaseB = or] = "lowercaseB";
8421
- const ar = 99;
8422
- t[t.lowercaseC = ar] = "lowercaseC";
8423
- const cr = 100;
8424
- t[t.lowercaseD = cr] = "lowercaseD";
8425
- const ur = 101;
8426
- t[t.lowercaseE = ur] = "lowercaseE";
8427
- const lr = 102;
8428
- t[t.lowercaseF = lr] = "lowercaseF";
8429
- const hr = 103;
8430
- t[t.lowercaseG = hr] = "lowercaseG";
8431
- const fr = 104;
8432
- t[t.lowercaseH = fr] = "lowercaseH";
8433
- const dr = 105;
8434
- t[t.lowercaseI = dr] = "lowercaseI";
8435
- const mr = 106;
8436
- t[t.lowercaseJ = mr] = "lowercaseJ";
8437
- const pr = 107;
8438
- t[t.lowercaseK = pr] = "lowercaseK";
8439
- const gr = 108;
8440
- t[t.lowercaseL = gr] = "lowercaseL";
8441
- const yr = 109;
8442
- t[t.lowercaseM = yr] = "lowercaseM";
8443
- const br = 110;
8444
- t[t.lowercaseN = br] = "lowercaseN";
8445
- const _r = 111;
8446
- t[t.lowercaseO = _r] = "lowercaseO";
8447
- const kr = 112;
8448
- t[t.lowercaseP = kr] = "lowercaseP";
8449
- const wr = 113;
8450
- t[t.lowercaseQ = wr] = "lowercaseQ";
8451
- const vr = 114;
8452
- t[t.lowercaseR = vr] = "lowercaseR";
8453
- const Er = 115;
8454
- t[t.lowercaseS = Er] = "lowercaseS";
8455
- const Tr = 116;
8456
- t[t.lowercaseT = Tr] = "lowercaseT";
8457
- const Sr = 117;
8458
- t[t.lowercaseU = Sr] = "lowercaseU";
8459
- const xr = 118;
8460
- t[t.lowercaseV = xr] = "lowercaseV";
8461
- const Ar = 119;
8462
- t[t.lowercaseW = Ar] = "lowercaseW";
8463
- const Ir = 120;
8464
- t[t.lowercaseX = Ir] = "lowercaseX";
8465
- const Rr = 121;
8466
- t[t.lowercaseY = Rr] = "lowercaseY";
8467
- const Cr = 122;
8468
- t[t.lowercaseZ = Cr] = "lowercaseZ";
8469
- const Lr = 123;
8470
- t[t.leftCurlyBrace = Lr] = "leftCurlyBrace";
8471
- const Pr = 124;
8472
- t[t.verticalBar = Pr] = "verticalBar";
8473
- const Fr = 125;
8474
- t[t.rightCurlyBrace = Fr] = "rightCurlyBrace";
8475
- const Dr = 126;
8476
- t[t.tilde = Dr] = "tilde";
8477
- const Ur = 160;
8478
- t[t.nonBreakingSpace = Ur] = "nonBreakingSpace";
8378
+ const zn = 85;
8379
+ t[t.uppercaseU = zn] = "uppercaseU";
8380
+ const Yn = 86;
8381
+ t[t.uppercaseV = Yn] = "uppercaseV";
8382
+ const Kn = 87;
8383
+ t[t.uppercaseW = Kn] = "uppercaseW";
8384
+ const Zn = 88;
8385
+ t[t.uppercaseX = Zn] = "uppercaseX";
8386
+ const Qn = 89;
8387
+ t[t.uppercaseY = Qn] = "uppercaseY";
8388
+ const Jn = 90;
8389
+ t[t.uppercaseZ = Jn] = "uppercaseZ";
8390
+ const er = 91;
8391
+ t[t.leftSquareBracket = er] = "leftSquareBracket";
8392
+ const tr = 92;
8393
+ t[t.backslash = tr] = "backslash";
8394
+ const nr = 93;
8395
+ t[t.rightSquareBracket = nr] = "rightSquareBracket";
8396
+ const rr = 94;
8397
+ t[t.caret = rr] = "caret";
8398
+ const sr = 95;
8399
+ t[t.underscore = sr] = "underscore";
8400
+ const ir = 96;
8401
+ t[t.graveAccent = ir] = "graveAccent";
8402
+ const or = 97;
8403
+ t[t.lowercaseA = or] = "lowercaseA";
8404
+ const ar = 98;
8405
+ t[t.lowercaseB = ar] = "lowercaseB";
8406
+ const cr = 99;
8407
+ t[t.lowercaseC = cr] = "lowercaseC";
8408
+ const ur = 100;
8409
+ t[t.lowercaseD = ur] = "lowercaseD";
8410
+ const lr = 101;
8411
+ t[t.lowercaseE = lr] = "lowercaseE";
8412
+ const hr = 102;
8413
+ t[t.lowercaseF = hr] = "lowercaseF";
8414
+ const fr = 103;
8415
+ t[t.lowercaseG = fr] = "lowercaseG";
8416
+ const dr = 104;
8417
+ t[t.lowercaseH = dr] = "lowercaseH";
8418
+ const mr = 105;
8419
+ t[t.lowercaseI = mr] = "lowercaseI";
8420
+ const pr = 106;
8421
+ t[t.lowercaseJ = pr] = "lowercaseJ";
8422
+ const gr = 107;
8423
+ t[t.lowercaseK = gr] = "lowercaseK";
8424
+ const yr = 108;
8425
+ t[t.lowercaseL = yr] = "lowercaseL";
8426
+ const br = 109;
8427
+ t[t.lowercaseM = br] = "lowercaseM";
8428
+ const _r = 110;
8429
+ t[t.lowercaseN = _r] = "lowercaseN";
8430
+ const kr = 111;
8431
+ t[t.lowercaseO = kr] = "lowercaseO";
8432
+ const wr = 112;
8433
+ t[t.lowercaseP = wr] = "lowercaseP";
8434
+ const vr = 113;
8435
+ t[t.lowercaseQ = vr] = "lowercaseQ";
8436
+ const Er = 114;
8437
+ t[t.lowercaseR = Er] = "lowercaseR";
8438
+ const Tr = 115;
8439
+ t[t.lowercaseS = Tr] = "lowercaseS";
8440
+ const Sr = 116;
8441
+ t[t.lowercaseT = Sr] = "lowercaseT";
8442
+ const xr = 117;
8443
+ t[t.lowercaseU = xr] = "lowercaseU";
8444
+ const Ar = 118;
8445
+ t[t.lowercaseV = Ar] = "lowercaseV";
8446
+ const Ir = 119;
8447
+ t[t.lowercaseW = Ir] = "lowercaseW";
8448
+ const Rr = 120;
8449
+ t[t.lowercaseX = Rr] = "lowercaseX";
8450
+ const Cr = 121;
8451
+ t[t.lowercaseY = Cr] = "lowercaseY";
8452
+ const Lr = 122;
8453
+ t[t.lowercaseZ = Lr] = "lowercaseZ";
8454
+ const Pr = 123;
8455
+ t[t.leftCurlyBrace = Pr] = "leftCurlyBrace";
8456
+ const Fr = 124;
8457
+ t[t.verticalBar = Fr] = "verticalBar";
8458
+ const Dr = 125;
8459
+ t[t.rightCurlyBrace = Dr] = "rightCurlyBrace";
8460
+ const Ur = 126;
8461
+ t[t.tilde = Ur] = "tilde";
8462
+ const Nr = 160;
8463
+ t[t.nonBreakingSpace = Nr] = "nonBreakingSpace";
8479
8464
  const Mr = 5760;
8480
8465
  t[t.oghamSpaceMark = Mr] = "oghamSpaceMark";
8481
- const Nr = 8232;
8482
- t[t.lineSeparator = Nr] = "lineSeparator";
8483
- const Or = 8233;
8484
- t[t.paragraphSeparator = Or] = "paragraphSeparator";
8466
+ const Or = 8232;
8467
+ t[t.lineSeparator = Or] = "lineSeparator";
8468
+ const Br = 8233;
8469
+ t[t.paragraphSeparator = Br] = "paragraphSeparator";
8485
8470
  })(p || (p = {}));
8486
- let Bn, le, he, a, C, Fo;
8471
+ let Vn, le, he, a, C, Fo;
8487
8472
  function Yt() {
8488
8473
  return Fo++;
8489
8474
  }
8490
8475
  function U1(t) {
8491
8476
  if ("pos" in t) {
8492
- const e = N1(t.pos);
8477
+ const e = M1(t.pos);
8493
8478
  t.message += ` (${e.line}:${e.column})`, t.loc = e;
8494
8479
  }
8495
8480
  return t;
8496
8481
  }
8497
- class M1 {
8482
+ class N1 {
8498
8483
  constructor(e, n) {
8499
8484
  this.line = e, this.column = n;
8500
8485
  }
8501
8486
  }
8502
- function N1(t) {
8487
+ function M1(t) {
8503
8488
  let e = 1, n = 1;
8504
8489
  for (let s = 0; s < t; s++)
8505
8490
  C.charCodeAt(s) === p.lineFeed ? (e++, n = 1) : n++;
8506
- return new M1(e, n);
8491
+ return new N1(e, n);
8507
8492
  }
8508
8493
  function O1(t, e, n, s) {
8509
- C = t, a = new Ce(), Fo = 1, Bn = e, le = n, he = s;
8494
+ C = t, a = new Ce(), Fo = 1, Vn = e, le = n, he = s;
8510
8495
  }
8511
8496
  function q(t) {
8512
8497
  return a.contextualKeyword === t;
@@ -8521,7 +8506,7 @@ function ve(t) {
8521
8506
  function we(t) {
8522
8507
  ve(t) || te();
8523
8508
  }
8524
- function Ne() {
8509
+ function Me() {
8525
8510
  return l(r.eof) || l(r.braceR) || Le();
8526
8511
  }
8527
8512
  function Le() {
@@ -8543,7 +8528,7 @@ function Do() {
8543
8528
  return !1;
8544
8529
  }
8545
8530
  function Ke() {
8546
- return _(r.semi) || Ne();
8531
+ return _(r.semi) || Me();
8547
8532
  }
8548
8533
  function ye() {
8549
8534
  Ke() || te('Unexpected token, expected ";"');
@@ -8594,9 +8579,9 @@ const Uo = [
8594
8579
  // IDEOGRAPHIC SPACE
8595
8580
  65279
8596
8581
  // ZERO WIDTH NO-BREAK SPACE
8597
- ], xi = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, Mo = new Uint8Array(65536);
8582
+ ], xi = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, No = new Uint8Array(65536);
8598
8583
  for (const t of Uo)
8599
- Mo[t] = 1;
8584
+ No[t] = 1;
8600
8585
  function B1(t) {
8601
8586
  if (t < 48) return t === 36;
8602
8587
  if (t < 58) return !0;
@@ -17983,7 +17968,7 @@ var qe;
17983
17968
  const i = s + 1;
17984
17969
  t[t.KeyAfterPropSpread = i] = "KeyAfterPropSpread";
17985
17970
  })(qe || (qe = {}));
17986
- function No(t) {
17971
+ function Mo(t) {
17987
17972
  const e = t.identifierRole;
17988
17973
  return e === z.TopLevelDeclaration || e === z.FunctionScopedDeclaration || e === z.BlockScopedDeclaration || e === z.ObjectShorthandTopLevelDeclaration || e === z.ObjectShorthandFunctionScopedDeclaration || e === z.ObjectShorthandBlockScopedDeclaration;
17989
17974
  }
@@ -18006,7 +17991,7 @@ function q1(t) {
18006
17991
  function W1(t) {
18007
17992
  return t.identifierRole === z.ObjectShorthandTopLevelDeclaration || t.identifierRole === z.ObjectShorthandBlockScopedDeclaration || t.identifierRole === z.ObjectShorthandFunctionScopedDeclaration;
18008
17993
  }
18009
- class Vn {
17994
+ class $n {
18010
17995
  constructor() {
18011
17996
  this.type = a.type, this.contextualKeyword = a.contextualKeyword, this.start = a.start, this.end = a.end, this.scopeDepth = a.scopeDepth, this.isType = a.isType, this.identifierRole = null, this.jsxRole = null, this.shadowsGlobal = !1, this.isAsyncOperation = !1, this.contextId = null, this.rhsEndIndex = null, this.isExpression = !1, this.numNullishCoalesceStarts = 0, this.numNullishCoalesceEnds = 0, this.isOptionalChainStart = !1, this.isOptionalChainEnd = !1, this.subscriptStartIndex = null, this.nullishStartIndex = null;
18012
17997
  }
@@ -18025,10 +18010,10 @@ class Vn {
18025
18010
  // Tag for `??` operators to denote the root token for this nullish coalescing call.
18026
18011
  }
18027
18012
  function T() {
18028
- a.tokens.push(new Vn()), jo();
18013
+ a.tokens.push(new $n()), jo();
18029
18014
  }
18030
18015
  function ct() {
18031
- a.tokens.push(new Vn()), a.start = a.pos, au();
18016
+ a.tokens.push(new $n()), a.start = a.pos, au();
18032
18017
  }
18033
18018
  function H1() {
18034
18019
  a.type === r.assign && --a.pos, su();
@@ -18129,7 +18114,7 @@ function Wo() {
18129
18114
  }
18130
18115
  break;
18131
18116
  default:
18132
- if (Mo[t])
18117
+ if (No[t])
18133
18118
  ++a.pos;
18134
18119
  else
18135
18120
  return;
@@ -18450,7 +18435,7 @@ function cu() {
18450
18435
  }
18451
18436
  function Kt(t, e = t.currentIndex()) {
18452
18437
  let n = e + 1;
18453
- if (fn(t, n)) {
18438
+ if (dn(t, n)) {
18454
18439
  const s = t.identifierNameAtIndex(e);
18455
18440
  return {
18456
18441
  isType: !1,
@@ -18459,21 +18444,21 @@ function Kt(t, e = t.currentIndex()) {
18459
18444
  endIndex: n
18460
18445
  };
18461
18446
  }
18462
- if (n++, fn(t, n))
18447
+ if (n++, dn(t, n))
18463
18448
  return {
18464
18449
  isType: !0,
18465
18450
  leftName: null,
18466
18451
  rightName: null,
18467
18452
  endIndex: n
18468
18453
  };
18469
- if (n++, fn(t, n))
18454
+ if (n++, dn(t, n))
18470
18455
  return {
18471
18456
  isType: !1,
18472
18457
  leftName: t.identifierNameAtIndex(e),
18473
18458
  rightName: t.identifierNameAtIndex(e + 2),
18474
18459
  endIndex: n
18475
18460
  };
18476
- if (n++, fn(t, n))
18461
+ if (n++, dn(t, n))
18477
18462
  return {
18478
18463
  isType: !0,
18479
18464
  leftName: null,
@@ -18482,7 +18467,7 @@ function Kt(t, e = t.currentIndex()) {
18482
18467
  };
18483
18468
  throw new Error(`Unexpected import/export specifier at ${e}`);
18484
18469
  }
18485
- function fn(t, e) {
18470
+ function dn(t, e) {
18486
18471
  const n = t.tokens[e];
18487
18472
  return n.type === r.braceR || n.type === r.comma;
18488
18473
  }
@@ -19283,7 +19268,7 @@ class pt {
19283
19268
  s = i - 1;
19284
19269
  } else {
19285
19270
  const i = this.tokens.tokens[s];
19286
- if (No(i)) {
19271
+ if (Mo(i)) {
19287
19272
  const o = this.tokens.identifierNameAtIndex(s);
19288
19273
  this.identifierReplacements.set(o, `exports.${o}`);
19289
19274
  }
@@ -19470,14 +19455,14 @@ var wt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
19470
19455
  return x(W[1], W[2] || "", W[3], W[4] || "", W[5] || "/", W[6] || "", W[7] || "");
19471
19456
  }
19472
19457
  function g(L) {
19473
- const W = i.exec(L), M = W[2];
19474
- return x("file:", "", W[1] || "", "", u(M) ? M : "/" + M, W[3] || "", W[4] || "");
19458
+ const W = i.exec(L), N = W[2];
19459
+ return x("file:", "", W[1] || "", "", u(N) ? N : "/" + N, W[3] || "", W[4] || "");
19475
19460
  }
19476
- function x(L, W, M, J, se, ie, H) {
19461
+ function x(L, W, N, J, se, ie, H) {
19477
19462
  return {
19478
19463
  scheme: L,
19479
19464
  user: W,
19480
- host: M,
19465
+ host: N,
19481
19466
  port: J,
19482
19467
  path: se,
19483
19468
  query: ie,
@@ -19487,12 +19472,12 @@ var wt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
19487
19472
  }
19488
19473
  function w(L) {
19489
19474
  if (c(L)) {
19490
- const M = m("http:" + L);
19491
- return M.scheme = "", M.type = 6, M;
19475
+ const N = m("http:" + L);
19476
+ return N.scheme = "", N.type = 6, N;
19492
19477
  }
19493
19478
  if (u(L)) {
19494
- const M = m("http://foo.com" + L);
19495
- return M.scheme = "", M.host = "", M.type = 5, M;
19479
+ const N = m("http://foo.com" + L);
19480
+ return N.scheme = "", N.host = "", N.type = 5, N;
19496
19481
  }
19497
19482
  if (f(L))
19498
19483
  return g(L);
@@ -19511,7 +19496,7 @@ var wt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
19511
19496
  $(W, W.type), L.path === "/" ? L.path = W.path : L.path = D(W.path) + L.path;
19512
19497
  }
19513
19498
  function $(L, W) {
19514
- const M = W <= 4, J = L.path.split("/");
19499
+ const N = W <= 4, J = L.path.split("/");
19515
19500
  let se = 1, ie = 0, H = !1;
19516
19501
  for (let b = 1; b < J.length; b++) {
19517
19502
  const y = J[b];
@@ -19521,7 +19506,7 @@ var wt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
19521
19506
  }
19522
19507
  if (H = !1, y !== ".") {
19523
19508
  if (y === "..") {
19524
- ie ? (H = !0, ie--, se--) : M && (J[se++] = y);
19509
+ ie ? (H = !0, ie--, se--) : N && (J[se++] = y);
19525
19510
  continue;
19526
19511
  }
19527
19512
  J[se++] = y, ie++;
@@ -19535,39 +19520,39 @@ var wt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
19535
19520
  function K(L, W) {
19536
19521
  if (!L && !W)
19537
19522
  return "";
19538
- const M = w(L);
19539
- let J = M.type;
19523
+ const N = w(L);
19524
+ let J = N.type;
19540
19525
  if (W && J !== 7) {
19541
19526
  const ie = w(W), H = ie.type;
19542
19527
  switch (J) {
19543
19528
  case 1:
19544
- M.hash = ie.hash;
19529
+ N.hash = ie.hash;
19545
19530
  case 2:
19546
- M.query = ie.query;
19531
+ N.query = ie.query;
19547
19532
  case 3:
19548
19533
  case 4:
19549
- V(M, ie);
19534
+ V(N, ie);
19550
19535
  case 5:
19551
- M.user = ie.user, M.host = ie.host, M.port = ie.port;
19536
+ N.user = ie.user, N.host = ie.host, N.port = ie.port;
19552
19537
  case 6:
19553
- M.scheme = ie.scheme;
19538
+ N.scheme = ie.scheme;
19554
19539
  }
19555
19540
  H > J && (J = H);
19556
19541
  }
19557
- $(M, J);
19558
- const se = M.query + M.hash;
19542
+ $(N, J);
19543
+ const se = N.query + N.hash;
19559
19544
  switch (J) {
19560
19545
  case 2:
19561
19546
  case 3:
19562
19547
  return se;
19563
19548
  case 4: {
19564
- const ie = M.path.slice(1);
19549
+ const ie = N.path.slice(1);
19565
19550
  return ie ? h(W || L) && !h(ie) ? "./" + ie + se : ie + se : se || ".";
19566
19551
  }
19567
19552
  case 5:
19568
- return M.path + se;
19553
+ return N.path + se;
19569
19554
  default:
19570
- return M.scheme + "//" + M.user + M.host + M.port + M.path + se;
19555
+ return N.scheme + "//" + N.user + N.host + N.port + N.path + se;
19571
19556
  }
19572
19557
  }
19573
19558
  return K;
@@ -19683,8 +19668,8 @@ function Uu(t, e, n, s, i, o) {
19683
19668
  const c = t[e - 1];
19684
19669
  return c.length === 1 ? !1 : n === c[Eu] && s === c[Tu] && i === c[Su] && o === (c.length === 5 ? c[xu] : ea);
19685
19670
  }
19686
- function Mu({ code: t, mappings: e }, n, s, i, o) {
19687
- const c = Nu(i, o), u = new Au({ file: s.compiledFilename });
19671
+ function Nu({ code: t, mappings: e }, n, s, i, o) {
19672
+ const c = Mu(i, o), u = new Au({ file: s.compiledFilename });
19688
19673
  let f = 0, h = e[0];
19689
19674
  for (; h === void 0 && f < e.length - 1; )
19690
19675
  f++, h = e[f];
@@ -19701,7 +19686,7 @@ function Mu({ code: t, mappings: e }, n, s, i, o) {
19701
19686
  const { sourceRoot: x, sourcesContent: w, ...D } = Ru(u);
19702
19687
  return D;
19703
19688
  }
19704
- function Nu(t, e) {
19689
+ function Mu(t, e) {
19705
19690
  const n = new Array(e.length);
19706
19691
  let s = 0, i = e[s].start, o = 0;
19707
19692
  for (let c = 0; c < t.length; c++)
@@ -19834,7 +19819,7 @@ const Ou = {
19834
19819
  }
19835
19820
  `
19836
19821
  };
19837
- class An {
19822
+ class In {
19838
19823
  __init() {
19839
19824
  this.helperNames = {};
19840
19825
  }
@@ -19842,7 +19827,7 @@ class An {
19842
19827
  this.createRequireName = null;
19843
19828
  }
19844
19829
  constructor(e) {
19845
- this.nameManager = e, An.prototype.__init.call(this), An.prototype.__init2.call(this);
19830
+ this.nameManager = e, In.prototype.__init.call(this), In.prototype.__init2.call(this);
19846
19831
  }
19847
19832
  getHelperName(e) {
19848
19833
  let n = this.helperNames[e];
@@ -20259,10 +20244,10 @@ var Wu = (
20259
20244
  }(s)
20260
20245
  );
20261
20246
  t.TEnumType = W;
20262
- function M(k, S) {
20247
+ function N(k, S) {
20263
20248
  return new J(k, S);
20264
20249
  }
20265
- t.enumlit = M;
20250
+ t.enumlit = N;
20266
20251
  var J = (
20267
20252
  /** @class */
20268
20253
  function(k) {
@@ -20384,7 +20369,7 @@ var Wu = (
20384
20369
  function B(k) {
20385
20370
  for (var S = [], I = 1; I < arguments.length; I++)
20386
20371
  S[I - 1] = arguments[I];
20387
- return new G(new N(S), i(k));
20372
+ return new G(new M(S), i(k));
20388
20373
  }
20389
20374
  t.func = B;
20390
20375
  var G = (
@@ -20417,7 +20402,7 @@ var Wu = (
20417
20402
  }()
20418
20403
  );
20419
20404
  t.TParam = R;
20420
- var N = (
20405
+ var M = (
20421
20406
  /** @class */
20422
20407
  function(k) {
20423
20408
  e(S, k);
@@ -20452,7 +20437,7 @@ var Wu = (
20452
20437
  }, S;
20453
20438
  }(s)
20454
20439
  );
20455
- t.TParamList = N;
20440
+ t.TParamList = M;
20456
20441
  var P = (
20457
20442
  /** @class */
20458
20443
  function(k) {
@@ -20720,19 +20705,19 @@ function ra() {
20720
20705
  T(), xe(!1);
20721
20706
  }
20722
20707
  function sa(t) {
20723
- T(), $n(t);
20708
+ T(), jn(t);
20724
20709
  }
20725
20710
  function ft(t) {
20726
20711
  Q(), Ds(t);
20727
20712
  }
20728
- function In() {
20713
+ function Rn() {
20729
20714
  Q(), a.tokens[a.tokens.length - 1].identifierRole = z.ImportDeclaration;
20730
20715
  }
20731
20716
  function Ds(t) {
20732
20717
  let e;
20733
20718
  a.scopeDepth === 0 ? e = z.TopLevelDeclaration : t ? e = z.BlockScopedDeclaration : e = z.FunctionScopedDeclaration, a.tokens[a.tokens.length - 1].identifierRole = e;
20734
20719
  }
20735
- function $n(t) {
20720
+ function jn(t) {
20736
20721
  switch (a.type) {
20737
20722
  case r._this: {
20738
20723
  const e = re(0);
@@ -20775,13 +20760,13 @@ function Us(t, e, n = !1, s = !1, i = 0) {
20775
20760
  }
20776
20761
  }
20777
20762
  function Zu(t, e) {
20778
- t && Ms([
20763
+ t && Ns([
20779
20764
  d._public,
20780
20765
  d._protected,
20781
20766
  d._private,
20782
20767
  d._readonly,
20783
20768
  d._override
20784
- ]), Rn(e), ia(), Rn(
20769
+ ]), Cn(e), ia(), Cn(
20785
20770
  e,
20786
20771
  !0
20787
20772
  /* leftAlreadyParsed */
@@ -20790,8 +20775,8 @@ function Zu(t, e) {
20790
20775
  function ia() {
20791
20776
  he ? gf() : le && ih();
20792
20777
  }
20793
- function Rn(t, e = !1) {
20794
- if (e || $n(t), !_(r.eq))
20778
+ function Cn(t, e = !1) {
20779
+ if (e || jn(t), !_(r.eq))
20795
20780
  return;
20796
20781
  const n = a.tokens.length - 1;
20797
20782
  xe(), a.tokens[n].rhsEndIndex = a.tokens.length;
@@ -20806,7 +20791,7 @@ function oa() {
20806
20791
  const t = a.snapshot();
20807
20792
  return T(), (l(r.bracketL) || l(r.braceL) || l(r.star) || l(r.ellipsis) || l(r.hash) || Qu()) && !Le() ? !0 : (a.restoreFromSnapshot(t), !1);
20808
20793
  }
20809
- function Ms(t) {
20794
+ function Ns(t) {
20810
20795
  for (; aa(t) !== null; )
20811
20796
  ;
20812
20797
  }
@@ -20850,7 +20835,7 @@ function on() {
20850
20835
  Q();
20851
20836
  }
20852
20837
  function Ju() {
20853
- on(), !Le() && l(r.lessThan) && Mt();
20838
+ on(), !Le() && l(r.lessThan) && Nt();
20854
20839
  }
20855
20840
  function el() {
20856
20841
  T(), an();
@@ -20859,10 +20844,10 @@ function tl() {
20859
20844
  T();
20860
20845
  }
20861
20846
  function nl() {
20862
- E(r._typeof), l(r._import) ? ca() : on(), !Le() && l(r.lessThan) && Mt();
20847
+ E(r._typeof), l(r._import) ? ca() : on(), !Le() && l(r.lessThan) && Nt();
20863
20848
  }
20864
20849
  function ca() {
20865
- E(r._import), E(r.parenL), E(r.string), E(r.parenR), _(r.dot) && on(), l(r.lessThan) && Mt();
20850
+ E(r._import), E(r.parenL), E(r.string), E(r.parenR), _(r.dot) && on(), l(r.lessThan) && Nt();
20866
20851
  }
20867
20852
  function rl() {
20868
20853
  _(r._const);
@@ -20870,15 +20855,15 @@ function rl() {
20870
20855
  _(r._const), (t || e) && !l(r.name) ? a.tokens[a.tokens.length - 1].type = r.name : Q(), _(r._extends) && _e(), _(r.eq) && _e();
20871
20856
  }
20872
20857
  function xt() {
20873
- l(r.lessThan) && jn();
20858
+ l(r.lessThan) && qn();
20874
20859
  }
20875
- function jn() {
20860
+ function qn() {
20876
20861
  const t = re(0);
20877
20862
  for (l(r.lessThan) || l(r.typeParameterStart) ? T() : te(); !_(r.greaterThan) && !a.error; )
20878
20863
  rl(), _(r.comma);
20879
20864
  ne(t);
20880
20865
  }
20881
- function Ns(t) {
20866
+ function Ms(t) {
20882
20867
  const e = t === r.arrow;
20883
20868
  xt(), E(r.parenL), a.scopeDepth++, sl(
20884
20869
  !1
@@ -20888,11 +20873,11 @@ function Ns(t) {
20888
20873
  function sl(t) {
20889
20874
  Us(r.parenR, t);
20890
20875
  }
20891
- function Cn() {
20876
+ function Ln() {
20892
20877
  _(r.comma) || ye();
20893
20878
  }
20894
- function Mi() {
20895
- Ns(r.colon), Cn();
20879
+ function Ni() {
20880
+ Ms(r.colon), Ln();
20896
20881
  }
20897
20882
  function il() {
20898
20883
  const t = a.snapshot();
@@ -20904,25 +20889,25 @@ function ua() {
20904
20889
  if (!(l(r.bracketL) && il()))
20905
20890
  return !1;
20906
20891
  const t = re(0);
20907
- return E(r.bracketL), Q(), an(), E(r.bracketR), Ut(), Cn(), ne(t), !0;
20892
+ return E(r.bracketL), Q(), an(), E(r.bracketR), Ut(), Ln(), ne(t), !0;
20908
20893
  }
20909
- function Ni(t) {
20910
- _(r.question), !t && (l(r.parenL) || l(r.lessThan)) ? (Ns(r.colon), Cn()) : (Ut(), Cn());
20894
+ function Mi(t) {
20895
+ _(r.question), !t && (l(r.parenL) || l(r.lessThan)) ? (Ms(r.colon), Ln()) : (Ut(), Ln());
20911
20896
  }
20912
20897
  function ol() {
20913
20898
  if (l(r.parenL) || l(r.lessThan)) {
20914
- Mi();
20899
+ Ni();
20915
20900
  return;
20916
20901
  }
20917
20902
  if (l(r._new)) {
20918
- T(), l(r.parenL) || l(r.lessThan) ? Mi() : Ni(!1);
20903
+ T(), l(r.parenL) || l(r.lessThan) ? Ni() : Mi(!1);
20919
20904
  return;
20920
20905
  }
20921
20906
  const t = !!aa([d._readonly]);
20922
20907
  ua() || ((q(d._get) || q(d._set)) && oa(), Qt(
20923
20908
  -1
20924
20909
  /* Types don't need context IDs. */
20925
- ), Ni(t));
20910
+ ), Mi(t));
20926
20911
  }
20927
20912
  function al() {
20928
20913
  la();
@@ -20970,7 +20955,7 @@ var ut;
20970
20955
  function Zr(t) {
20971
20956
  t === ut.TSAbstractConstructorType && we(d._abstract), (t === ut.TSConstructorType || t === ut.TSAbstractConstructorType) && E(r._new);
20972
20957
  const e = a.inDisallowConditionalTypesContext;
20973
- a.inDisallowConditionalTypesContext = !1, Ns(r.arrow), a.inDisallowConditionalTypesContext = e;
20958
+ a.inDisallowConditionalTypesContext = !1, Ms(r.arrow), a.inDisallowConditionalTypesContext = e;
20974
20959
  }
20975
20960
  function gl() {
20976
20961
  switch (a.type) {
@@ -21138,7 +21123,7 @@ function ha() {
21138
21123
  Cl(), _(r.comma);
21139
21124
  }
21140
21125
  function Cl() {
21141
- on(), l(r.lessThan) && Mt();
21126
+ on(), l(r.lessThan) && Nt();
21142
21127
  }
21143
21128
  function Ll() {
21144
21129
  ft(!1), xt(), _(r._extends) && ha(), la();
@@ -21157,7 +21142,7 @@ function Os() {
21157
21142
  Fl(), _(r.comma);
21158
21143
  }
21159
21144
  function Bs() {
21160
- E(r.braceL), Gn(
21145
+ E(r.braceL), Xn(
21161
21146
  /* end */
21162
21147
  r.braceR
21163
21148
  );
@@ -21169,18 +21154,18 @@ function fa() {
21169
21154
  q(d._global) ? Q() : l(r.string) ? rt() : te(), l(r.braceL) ? Bs() : ye();
21170
21155
  }
21171
21156
  function hs() {
21172
- In(), E(r.eq), Ul(), ye();
21157
+ Rn(), E(r.eq), Ul(), ye();
21173
21158
  }
21174
21159
  function Dl() {
21175
21160
  return q(d._require) && be() === r.parenL;
21176
21161
  }
21177
21162
  function Ul() {
21178
- Dl() ? Ml() : on();
21163
+ Dl() ? Nl() : on();
21179
21164
  }
21180
- function Ml() {
21165
+ function Nl() {
21181
21166
  we(d._require), E(r.parenL), l(r.string) || te(), Dt(), E(r.parenR);
21182
21167
  }
21183
- function Nl() {
21168
+ function Ml() {
21184
21169
  if (Ke())
21185
21170
  return !1;
21186
21171
  switch (a.type) {
@@ -21211,12 +21196,12 @@ function Nl() {
21211
21196
  case r._var:
21212
21197
  case r._let: {
21213
21198
  const t = re(1);
21214
- return yn(a.type !== r._var), ne(t), !0;
21199
+ return bn(a.type !== r._var), ne(t), !0;
21215
21200
  }
21216
21201
  case r.name: {
21217
21202
  const t = re(1), e = a.contextualKeyword;
21218
21203
  let n = !1;
21219
- return e === d._global ? (fa(), n = !0) : n = qn(
21204
+ return e === d._global ? (fa(), n = !0) : n = Wn(
21220
21205
  e,
21221
21206
  /* isBeforeToken */
21222
21207
  !0
@@ -21227,7 +21212,7 @@ function Nl() {
21227
21212
  }
21228
21213
  }
21229
21214
  function Vi() {
21230
- return qn(
21215
+ return Wn(
21231
21216
  a.contextualKeyword,
21232
21217
  /* isBeforeToken */
21233
21218
  !0
@@ -21237,7 +21222,7 @@ function Ol(t) {
21237
21222
  switch (t) {
21238
21223
  case d._declare: {
21239
21224
  const e = a.tokens.length - 1;
21240
- if (Nl())
21225
+ if (Ml())
21241
21226
  return a.tokens[e].type = r._declare, !0;
21242
21227
  break;
21243
21228
  }
@@ -21246,7 +21231,7 @@ function Ol(t) {
21246
21231
  return Bs(), !0;
21247
21232
  break;
21248
21233
  default:
21249
- return qn(
21234
+ return Wn(
21250
21235
  t,
21251
21236
  /* isBeforeToken */
21252
21237
  !1
@@ -21254,7 +21239,7 @@ function Ol(t) {
21254
21239
  }
21255
21240
  return !1;
21256
21241
  }
21257
- function qn(t, e) {
21242
+ function Wn(t, e) {
21258
21243
  switch (t) {
21259
21244
  case d._abstract:
21260
21245
  if (Rt(e) && l(r._class))
@@ -21306,12 +21291,12 @@ function Rt(t) {
21306
21291
  }
21307
21292
  function Bl() {
21308
21293
  const t = a.snapshot();
21309
- return jn(), Nt(), Tl(), E(r.arrow), a.error ? (a.restoreFromSnapshot(t), !1) : (un(!0), !0);
21294
+ return qn(), Mt(), Tl(), E(r.arrow), a.error ? (a.restoreFromSnapshot(t), !1) : (un(!0), !0);
21310
21295
  }
21311
21296
  function Vs() {
21312
- a.type === r.bitShiftL && (a.pos -= 1, ee(r.lessThan)), Mt();
21297
+ a.type === r.bitShiftL && (a.pos -= 1, ee(r.lessThan)), Nt();
21313
21298
  }
21314
- function Mt() {
21299
+ function Nt() {
21315
21300
  const t = re(0);
21316
21301
  for (E(r.lessThan); !l(r.greaterThan) && !a.error; )
21317
21302
  _e(), _(r.comma);
@@ -21360,7 +21345,7 @@ function $l(t, e, n) {
21360
21345
  a.restoreFromSnapshot(s);
21361
21346
  else
21362
21347
  return;
21363
- } else !e && l(r.questionDot) && be() === r.lessThan && (T(), a.tokens[t].isOptionalChainStart = !0, a.tokens[a.tokens.length - 1].subscriptStartIndex = t, Mt(), E(r.parenL), lt());
21348
+ } else !e && l(r.questionDot) && be() === r.lessThan && (T(), a.tokens[t].isOptionalChainStart = !0, a.tokens[a.tokens.length - 1].subscriptStartIndex = t, Nt(), E(r.parenL), lt());
21364
21349
  js(t, e, n);
21365
21350
  }
21366
21351
  function jl() {
@@ -21411,7 +21396,7 @@ function Hl() {
21411
21396
  return a.type = r._abstract, T(), Tt(!0, !0), !0;
21412
21397
  if (q(d._interface)) {
21413
21398
  const t = re(2);
21414
- return qn(d._interface, !0), ne(t), !0;
21399
+ return Wn(d._interface, !0), ne(t), !0;
21415
21400
  }
21416
21401
  return !1;
21417
21402
  }
@@ -21425,7 +21410,7 @@ function Gl() {
21425
21410
  }
21426
21411
  function Xl(t) {
21427
21412
  const e = a.tokens.length;
21428
- Ms([
21413
+ Ns([
21429
21414
  d._abstract,
21430
21415
  d._readonly,
21431
21416
  d._declare,
@@ -21482,7 +21467,7 @@ function eh() {
21482
21467
  l(r.colon) && an();
21483
21468
  }
21484
21469
  function th(t, e) {
21485
- return Bn ? nh(t, e) : rh(t, e);
21470
+ return Vn ? nh(t, e) : rh(t, e);
21486
21471
  }
21487
21472
  function nh(t, e) {
21488
21473
  if (!l(r.lessThan))
@@ -21493,13 +21478,13 @@ function nh(t, e) {
21493
21478
  a.restoreFromSnapshot(n);
21494
21479
  else
21495
21480
  return s;
21496
- return a.type = r.typeParameterStart, jn(), s = Qe(t, e), s || te(), s;
21481
+ return a.type = r.typeParameterStart, qn(), s = Qe(t, e), s || te(), s;
21497
21482
  }
21498
21483
  function rh(t, e) {
21499
21484
  if (!l(r.lessThan))
21500
21485
  return Qe(t, e);
21501
21486
  const n = a.snapshot();
21502
- jn();
21487
+ qn();
21503
21488
  const s = Qe(t, e);
21504
21489
  if (s || te(), a.error)
21505
21490
  a.restoreFromSnapshot(n);
@@ -21510,7 +21495,7 @@ function rh(t, e) {
21510
21495
  function sh() {
21511
21496
  if (l(r.colon)) {
21512
21497
  const t = a.snapshot();
21513
- Zt(r.colon), Ne() && te(), l(r.arrow) || te(), a.error && a.restoreFromSnapshot(t);
21498
+ Zt(r.colon), Me() && te(), l(r.arrow) || te(), a.error && a.restoreFromSnapshot(t);
21514
21499
  }
21515
21500
  return _(r.arrow);
21516
21501
  }
@@ -21658,7 +21643,7 @@ function ya() {
21658
21643
  Ve(), ga();
21659
21644
  }
21660
21645
  function Ve() {
21661
- a.tokens.push(new Vn()), Wo(), a.start = a.pos;
21646
+ a.tokens.push(new $n()), Wo(), a.start = a.pos;
21662
21647
  const t = C.charCodeAt(a.pos);
21663
21648
  if (rn[t])
21664
21649
  uh();
@@ -21692,7 +21677,7 @@ function Ve() {
21692
21677
  }
21693
21678
  }
21694
21679
  function Ct() {
21695
- a.tokens.push(new Vn()), a.start = a.pos, ah();
21680
+ a.tokens.push(new $n()), a.start = a.pos, ah();
21696
21681
  }
21697
21682
  function mh(t) {
21698
21683
  if (l(r.question)) {
@@ -21736,12 +21721,12 @@ function ba(t) {
21736
21721
  }
21737
21722
  function _h(t) {
21738
21723
  const e = a.tokens.length;
21739
- return cn() ? !0 : (pn(e, -1, t), !1);
21724
+ return cn() ? !0 : (gn(e, -1, t), !1);
21740
21725
  }
21741
- function pn(t, e, n) {
21726
+ function gn(t, e, n) {
21742
21727
  if (le && (r._in & r.PRECEDENCE_MASK) > e && !Le() && (ve(d._as) || ve(d._satisfies))) {
21743
21728
  const i = re(1);
21744
- _e(), ne(i), Go(), pn(t, e, n);
21729
+ _e(), ne(i), Go(), gn(t, e, n);
21745
21730
  return;
21746
21731
  }
21747
21732
  const s = a.type & r.PRECEDENCE_MASK;
@@ -21749,11 +21734,11 @@ function pn(t, e, n) {
21749
21734
  const i = a.type;
21750
21735
  T(), i === r.nullishCoalescing && (a.tokens[a.tokens.length - 1].nullishStartIndex = t);
21751
21736
  const o = a.tokens.length;
21752
- cn(), pn(o, i & r.IS_RIGHT_ASSOCIATIVE ? s - 1 : s, n), i === r.nullishCoalescing && (a.tokens[t].numNullishCoalesceStarts++, a.tokens[a.tokens.length - 1].numNullishCoalesceEnds++), pn(t, e, n);
21737
+ cn(), gn(o, i & r.IS_RIGHT_ASSOCIATIVE ? s - 1 : s, n), i === r.nullishCoalescing && (a.tokens[t].numNullishCoalesceStarts++, a.tokens[a.tokens.length - 1].numNullishCoalesceEnds++), gn(t, e, n);
21753
21738
  }
21754
21739
  }
21755
21740
  function cn() {
21756
- if (le && !Bn && _(r.lessThan))
21741
+ if (le && !Vn && _(r.lessThan))
21757
21742
  return Il(), !1;
21758
21743
  if (q(d._module) && $o() === p.leftCurlyBrace && !Do())
21759
21744
  return Fh(), !1;
@@ -21761,7 +21746,7 @@ function cn() {
21761
21746
  return T(), cn(), !1;
21762
21747
  if (_a())
21763
21748
  return !0;
21764
- for (; a.type & r.IS_POSTFIX && !Ne(); )
21749
+ for (; a.type & r.IS_POSTFIX && !Me(); )
21765
21750
  a.type === r.preIncDec && (a.type = r.postIncDec), T();
21766
21751
  return !1;
21767
21752
  }
@@ -21789,9 +21774,9 @@ function js(t, e, n) {
21789
21774
  n.stop = !0;
21790
21775
  return;
21791
21776
  }
21792
- T(), a.tokens[a.tokens.length - 1].subscriptStartIndex = t, _(r.bracketL) ? (Se(), E(r.bracketR)) : _(r.parenL) ? lt() : Ln();
21777
+ T(), a.tokens[a.tokens.length - 1].subscriptStartIndex = t, _(r.bracketL) ? (Se(), E(r.bracketR)) : _(r.parenL) ? lt() : Pn();
21793
21778
  } else if (_(r.dot))
21794
- a.tokens[a.tokens.length - 1].subscriptStartIndex = t, Ln();
21779
+ a.tokens[a.tokens.length - 1].subscriptStartIndex = t, Pn();
21795
21780
  else if (_(r.bracketL))
21796
21781
  a.tokens[a.tokens.length - 1].subscriptStartIndex = t, Se(), E(r.bracketR);
21797
21782
  else if (!e && l(r.parenL))
@@ -21799,7 +21784,7 @@ function js(t, e, n) {
21799
21784
  const s = a.snapshot(), i = a.tokens.length;
21800
21785
  T(), a.tokens[a.tokens.length - 1].subscriptStartIndex = t;
21801
21786
  const o = Yt();
21802
- a.tokens[a.tokens.length - 1].contextId = o, lt(), a.tokens[a.tokens.length - 1].contextId = o, wh() && (a.restoreFromSnapshot(s), n.stop = !0, a.scopeDepth++, Nt(), vh(i));
21787
+ a.tokens[a.tokens.length - 1].contextId = o, lt(), a.tokens[a.tokens.length - 1].contextId = o, wh() && (a.restoreFromSnapshot(s), n.stop = !0, a.scopeDepth++, Mt(), vh(i));
21803
21788
  } else {
21804
21789
  T(), a.tokens[a.tokens.length - 1].subscriptStartIndex = t;
21805
21790
  const s = Yt();
@@ -21808,7 +21793,7 @@ function js(t, e, n) {
21808
21793
  else l(r.backQuote) ? Hs() : n.stop = !0;
21809
21794
  }
21810
21795
  function wa() {
21811
- return a.tokens[a.tokens.length - 1].contextualKeyword === d._async && !Ne();
21796
+ return a.tokens[a.tokens.length - 1].contextualKeyword === d._async && !Me();
21812
21797
  }
21813
21798
  function lt() {
21814
21799
  let t = !0;
@@ -21835,7 +21820,7 @@ function rt() {
21835
21820
  return Q(), !1;
21836
21821
  if (l(r.jsxText) || l(r.jsxEmptyText))
21837
21822
  return Dt(), !1;
21838
- if (l(r.lessThan) && Bn)
21823
+ if (l(r.lessThan) && Vn)
21839
21824
  return a.type = r.jsxTagStart, ya(), T(), !1;
21840
21825
  const t = a.potentialArrowAt === a.start;
21841
21826
  switch (a.type) {
@@ -21857,7 +21842,7 @@ function rt() {
21857
21842
  return T(), l(r.dot) && (a.tokens[a.tokens.length - 1].type = r.name, T(), Q()), !1;
21858
21843
  case r.name: {
21859
21844
  const e = a.tokens.length, n = a.start, s = a.contextualKeyword;
21860
- return Q(), s === d._await ? (Lh(), !1) : s === d._async && l(r._function) && !Ne() ? (T(), Et(n, !1), !1) : t && s === d._async && !Ne() && l(r.name) ? (a.scopeDepth++, ft(!1), E(r.arrow), Jt(e), !0) : l(r._do) && !Ne() ? (T(), ht(), !1) : t && !Ne() && l(r.arrow) ? (a.scopeDepth++, Ds(!1), E(r.arrow), Jt(e), !0) : (a.tokens[a.tokens.length - 1].identifierRole = z.Access, !1);
21845
+ return Q(), s === d._await ? (Lh(), !1) : s === d._async && l(r._function) && !Me() ? (T(), Et(n, !1), !1) : t && s === d._async && !Me() && l(r.name) ? (a.scopeDepth++, ft(!1), E(r.arrow), Jt(e), !0) : l(r._do) && !Me() ? (T(), ht(), !1) : t && !Me() && l(r.arrow) ? (a.scopeDepth++, Ds(!1), E(r.arrow), Jt(e), !0) : (a.tokens[a.tokens.length - 1].identifierRole = z.Access, !1);
21861
21846
  }
21862
21847
  case r._do:
21863
21848
  return T(), ht(), !1;
@@ -21881,13 +21866,13 @@ function rt() {
21881
21866
  return T(), qs(), !1;
21882
21867
  case r.hash: {
21883
21868
  const e = $o();
21884
- return rn[e] || e === p.backslash ? Ln() : T(), !1;
21869
+ return rn[e] || e === p.backslash ? Pn() : T(), !1;
21885
21870
  }
21886
21871
  default:
21887
21872
  return te(), !1;
21888
21873
  }
21889
21874
  }
21890
- function Ln() {
21875
+ function Pn() {
21891
21876
  _(r.hash), Q();
21892
21877
  }
21893
21878
  function Eh() {
@@ -21897,7 +21882,7 @@ function Eh() {
21897
21882
  function Dt() {
21898
21883
  T();
21899
21884
  }
21900
- function Wn() {
21885
+ function Hn() {
21901
21886
  E(r.parenL), Se(), E(r.parenR);
21902
21887
  }
21903
21888
  function va(t) {
@@ -21918,10 +21903,10 @@ function va(t) {
21918
21903
  } else
21919
21904
  xe(!1, !0);
21920
21905
  }
21921
- return E(r.parenR), t && Th() && ds() ? (a.restoreFromSnapshot(e), a.scopeDepth++, Nt(), ds(), Jt(n), a.error ? (a.restoreFromSnapshot(e), va(!1), !1) : !0) : !1;
21906
+ return E(r.parenR), t && Th() && ds() ? (a.restoreFromSnapshot(e), a.scopeDepth++, Mt(), ds(), Jt(n), a.error ? (a.restoreFromSnapshot(e), va(!1), !1) : !0) : !1;
21922
21907
  }
21923
21908
  function Th() {
21924
- return l(r.colon) || !Ne();
21909
+ return l(r.colon) || !Me();
21925
21910
  }
21926
21911
  function ds() {
21927
21912
  return le ? sh() : he ? Ef() : _(r.arrow);
@@ -21984,23 +21969,23 @@ function Ih(t, e) {
21984
21969
  }
21985
21970
  function Rh(t, e) {
21986
21971
  if (_(r.colon)) {
21987
- t ? Rn(e) : xe(!1);
21972
+ t ? Cn(e) : xe(!1);
21988
21973
  return;
21989
21974
  }
21990
21975
  let n;
21991
- t ? a.scopeDepth === 0 ? n = z.ObjectShorthandTopLevelDeclaration : e ? n = z.ObjectShorthandBlockScopedDeclaration : n = z.ObjectShorthandFunctionScopedDeclaration : n = z.ObjectShorthand, a.tokens[a.tokens.length - 1].identifierRole = n, Rn(e, !0);
21976
+ t ? a.scopeDepth === 0 ? n = z.ObjectShorthandTopLevelDeclaration : e ? n = z.ObjectShorthandBlockScopedDeclaration : n = z.ObjectShorthandFunctionScopedDeclaration : n = z.ObjectShorthand, a.tokens[a.tokens.length - 1].identifierRole = n, Cn(e, !0);
21992
21977
  }
21993
21978
  function Ch(t, e, n) {
21994
21979
  le ? Zl() : he && pf(), Ih(t, n) || Rh(t, e);
21995
21980
  }
21996
21981
  function Qt(t) {
21997
- he && ei(), _(r.bracketL) ? (a.tokens[a.tokens.length - 1].contextId = t, xe(), E(r.bracketR), a.tokens[a.tokens.length - 1].contextId = t) : (l(r.num) || l(r.string) || l(r.bigint) || l(r.decimal) ? rt() : Ln(), a.tokens[a.tokens.length - 1].identifierRole = z.ObjectKey, a.tokens[a.tokens.length - 1].contextId = t);
21982
+ he && ei(), _(r.bracketL) ? (a.tokens[a.tokens.length - 1].contextId = t, xe(), E(r.bracketR), a.tokens[a.tokens.length - 1].contextId = t) : (l(r.num) || l(r.string) || l(r.bigint) || l(r.decimal) ? rt() : Pn(), a.tokens[a.tokens.length - 1].identifierRole = z.ObjectKey, a.tokens[a.tokens.length - 1].contextId = t);
21998
21983
  }
21999
21984
  function ms(t, e) {
22000
21985
  const n = Yt();
22001
21986
  a.scopeDepth++;
22002
21987
  const s = a.tokens.length;
22003
- Nt(e, n), Ea(t, n);
21988
+ Mt(e, n), Ea(t, n);
22004
21989
  const o = a.tokens.length;
22005
21990
  a.scopes.push(new Je(s, o, !0)), a.scopeDepth--;
22006
21991
  }
@@ -22034,24 +22019,24 @@ function Lh() {
22034
22019
  cn();
22035
22020
  }
22036
22021
  function Ph() {
22037
- T(), !l(r.semi) && !Ne() && (_(r.star), xe());
22022
+ T(), !l(r.semi) && !Me() && (_(r.star), xe());
22038
22023
  }
22039
22024
  function Fh() {
22040
- we(d._module), E(r.braceL), Gn(r.braceR);
22025
+ we(d._module), E(r.braceL), Xn(r.braceR);
22041
22026
  }
22042
22027
  function Dh(t) {
22043
22028
  return (t.type === r.name || !!(t.type & r.IS_KEYWORD)) && t.contextualKeyword !== d._from;
22044
22029
  }
22045
22030
  function et(t) {
22046
22031
  const e = re(0);
22047
- E(t || r.colon), Me(), ne(e);
22032
+ E(t || r.colon), Ne(), ne(e);
22048
22033
  }
22049
22034
  function $i() {
22050
22035
  E(r.modulo), we(d._checks), _(r.parenL) && (Se(), E(r.parenR));
22051
22036
  }
22052
22037
  function Xs() {
22053
22038
  const t = re(0);
22054
- E(r.colon), l(r.modulo) ? $i() : (Me(), l(r.modulo) && $i()), ne(t);
22039
+ E(r.colon), l(r.modulo) ? $i() : (Ne(), l(r.modulo) && $i()), ne(t);
22055
22040
  }
22056
22041
  function Uh() {
22057
22042
  T(), zs(
@@ -22059,13 +22044,13 @@ function Uh() {
22059
22044
  !0
22060
22045
  );
22061
22046
  }
22062
- function Mh() {
22047
+ function Nh() {
22063
22048
  T(), Q(), l(r.lessThan) && Xe(), E(r.parenL), gs(), E(r.parenR), Xs(), ye();
22064
22049
  }
22065
22050
  function ps() {
22066
- l(r._class) ? Uh() : l(r._function) ? Mh() : l(r._var) ? Nh() : ve(d._module) ? _(r.dot) ? Vh() : Oh() : q(d._type) ? $h() : q(d._opaque) ? jh() : q(d._interface) ? qh() : l(r._export) ? Bh() : te();
22051
+ l(r._class) ? Uh() : l(r._function) ? Nh() : l(r._var) ? Mh() : ve(d._module) ? _(r.dot) ? Vh() : Oh() : q(d._type) ? $h() : q(d._opaque) ? jh() : q(d._interface) ? qh() : l(r._export) ? Bh() : te();
22067
22052
  }
22068
- function Nh() {
22053
+ function Mh() {
22069
22054
  T(), Ra(), ye();
22070
22055
  }
22071
22056
  function Oh() {
@@ -22074,14 +22059,14 @@ function Oh() {
22074
22059
  E(r.braceR);
22075
22060
  }
22076
22061
  function Bh() {
22077
- E(r._export), _(r._default) ? l(r._function) || l(r._class) ? ps() : (Me(), ye()) : l(r._var) || // declare export var ...
22062
+ E(r._export), _(r._default) ? l(r._function) || l(r._class) ? ps() : (Ne(), ye()) : l(r._var) || // declare export var ...
22078
22063
  l(r._function) || // declare export function ...
22079
22064
  l(r._class) || // declare export class ...
22080
22065
  q(d._opaque) ? ps() : l(r.star) || // declare export * from ''
22081
22066
  l(r.braceL) || // declare export {} ...
22082
22067
  q(d._interface) || // declare export interface ...
22083
22068
  q(d._type) || // declare export type ...
22084
- q(d._opaque) ? Na() : te();
22069
+ q(d._opaque) ? Ma() : te();
22085
22070
  }
22086
22071
  function Vh() {
22087
22072
  we(d._exports), At(), ye();
@@ -22096,41 +22081,41 @@ function qh() {
22096
22081
  T(), zs();
22097
22082
  }
22098
22083
  function zs(t = !1) {
22099
- if (Hn(), l(r.lessThan) && Xe(), _(r._extends))
22084
+ if (Gn(), l(r.lessThan) && Xe(), _(r._extends))
22100
22085
  do
22101
- gn();
22086
+ yn();
22102
22087
  while (!t && _(r.comma));
22103
22088
  if (q(d._mixins)) {
22104
22089
  T();
22105
22090
  do
22106
- gn();
22091
+ yn();
22107
22092
  while (_(r.comma));
22108
22093
  }
22109
22094
  if (q(d._implements)) {
22110
22095
  T();
22111
22096
  do
22112
- gn();
22097
+ yn();
22113
22098
  while (_(r.comma));
22114
22099
  }
22115
- Pn(t, !1, t);
22100
+ Fn(t, !1, t);
22116
22101
  }
22117
- function gn() {
22102
+ function yn() {
22118
22103
  xa(!1), l(r.lessThan) && vt();
22119
22104
  }
22120
22105
  function Ys() {
22121
22106
  zs();
22122
22107
  }
22123
- function Hn() {
22108
+ function Gn() {
22124
22109
  Q();
22125
22110
  }
22126
22111
  function Ks() {
22127
- Hn(), l(r.lessThan) && Xe(), et(r.eq), ye();
22112
+ Gn(), l(r.lessThan) && Xe(), et(r.eq), ye();
22128
22113
  }
22129
22114
  function Zs(t) {
22130
- we(d._type), Hn(), l(r.lessThan) && Xe(), l(r.colon) && et(r.colon), t || et(r.eq), ye();
22115
+ we(d._type), Gn(), l(r.lessThan) && Xe(), l(r.colon) && et(r.colon), t || et(r.eq), ye();
22131
22116
  }
22132
22117
  function Wh() {
22133
- ei(), Ra(), _(r.eq) && Me();
22118
+ ei(), Ra(), _(r.eq) && Ne();
22134
22119
  }
22135
22120
  function Xe() {
22136
22121
  const t = re(0);
@@ -22143,34 +22128,34 @@ function Xe() {
22143
22128
  function vt() {
22144
22129
  const t = re(0);
22145
22130
  for (E(r.lessThan); !l(r.greaterThan) && !a.error; )
22146
- Me(), l(r.greaterThan) || E(r.comma);
22131
+ Ne(), l(r.greaterThan) || E(r.comma);
22147
22132
  E(r.greaterThan), ne(t);
22148
22133
  }
22149
22134
  function Hh() {
22150
22135
  if (we(d._interface), _(r._extends))
22151
22136
  do
22152
- gn();
22137
+ yn();
22153
22138
  while (_(r.comma));
22154
- Pn(!1, !1, !1);
22139
+ Fn(!1, !1, !1);
22155
22140
  }
22156
22141
  function Qs() {
22157
22142
  l(r.num) || l(r.string) ? rt() : Q();
22158
22143
  }
22159
22144
  function Gh() {
22160
- be() === r.colon ? (Qs(), et()) : Me(), E(r.bracketR), et();
22145
+ be() === r.colon ? (Qs(), et()) : Ne(), E(r.bracketR), et();
22161
22146
  }
22162
22147
  function Xh() {
22163
22148
  Qs(), E(r.bracketR), E(r.bracketR), l(r.lessThan) || l(r.parenL) ? Js() : (_(r.question), et());
22164
22149
  }
22165
22150
  function Js() {
22166
22151
  for (l(r.lessThan) && Xe(), E(r.parenL); !l(r.parenR) && !l(r.ellipsis) && !a.error; )
22167
- Fn(), l(r.parenR) || E(r.comma);
22168
- _(r.ellipsis) && Fn(), E(r.parenR), et();
22152
+ Dn(), l(r.parenR) || E(r.comma);
22153
+ _(r.ellipsis) && Dn(), E(r.parenR), et();
22169
22154
  }
22170
22155
  function zh() {
22171
22156
  Js();
22172
22157
  }
22173
- function Pn(t, e, n) {
22158
+ function Fn(t, e, n) {
22174
22159
  let s;
22175
22160
  for (e && l(r.braceBarL) ? (E(r.braceBarL), s = r.braceBarR) : (E(r.braceL), s = r.braceR); !l(s) && !a.error; ) {
22176
22161
  if (n && q(d._proto)) {
@@ -22200,7 +22185,7 @@ function Yh() {
22200
22185
  if (l(r.ellipsis)) {
22201
22186
  if (E(r.ellipsis), _(r.comma) || _(r.semi), l(r.braceR))
22202
22187
  return;
22203
- Me();
22188
+ Ne();
22204
22189
  } else
22205
22190
  Qs(), l(r.lessThan) || l(r.parenL) ? Js() : (_(r.question), et());
22206
22191
  }
@@ -22218,18 +22203,18 @@ function Qh() {
22218
22203
  E(r._typeof), Aa();
22219
22204
  }
22220
22205
  function Jh() {
22221
- for (E(r.bracketL); a.pos < C.length && !l(r.bracketR) && (Me(), !l(r.bracketR)); )
22206
+ for (E(r.bracketL); a.pos < C.length && !l(r.bracketR) && (Ne(), !l(r.bracketR)); )
22222
22207
  E(r.comma);
22223
22208
  E(r.bracketR);
22224
22209
  }
22225
- function Fn() {
22210
+ function Dn() {
22226
22211
  const t = be();
22227
- t === r.colon || t === r.question ? (Q(), _(r.question), et()) : Me();
22212
+ t === r.colon || t === r.question ? (Q(), _(r.question), et()) : Ne();
22228
22213
  }
22229
22214
  function gs() {
22230
22215
  for (; !l(r.parenR) && !l(r.ellipsis) && !a.error; )
22231
- Fn(), l(r.parenR) || E(r.comma);
22232
- _(r.ellipsis) && Fn();
22216
+ Dn(), l(r.parenR) || E(r.comma);
22217
+ _(r.ellipsis) && Dn();
22233
22218
  }
22234
22219
  function Aa() {
22235
22220
  let t = !1;
@@ -22244,16 +22229,16 @@ function Aa() {
22244
22229
  return;
22245
22230
  }
22246
22231
  case r.braceL:
22247
- Pn(!1, !1, !1);
22232
+ Fn(!1, !1, !1);
22248
22233
  return;
22249
22234
  case r.braceBarL:
22250
- Pn(!1, !0, !1);
22235
+ Fn(!1, !0, !1);
22251
22236
  return;
22252
22237
  case r.bracketL:
22253
22238
  Jh();
22254
22239
  return;
22255
22240
  case r.lessThan:
22256
- Xe(), E(r.parenL), gs(), E(r.parenR), E(r.arrow), Me();
22241
+ Xe(), E(r.parenL), gs(), E(r.parenR), E(r.arrow), Ne();
22257
22242
  return;
22258
22243
  case r.parenL:
22259
22244
  if (T(), !l(r.parenR) && !l(r.ellipsis))
@@ -22263,12 +22248,12 @@ function Aa() {
22263
22248
  } else
22264
22249
  t = !0;
22265
22250
  if (t)
22266
- if (a.noAnonFunctionType = !1, Me(), a.noAnonFunctionType = e, a.noAnonFunctionType || !(l(r.comma) || l(r.parenR) && be() === r.arrow)) {
22251
+ if (a.noAnonFunctionType = !1, Ne(), a.noAnonFunctionType = e, a.noAnonFunctionType || !(l(r.comma) || l(r.parenR) && be() === r.arrow)) {
22267
22252
  E(r.parenR);
22268
22253
  return;
22269
22254
  } else
22270
22255
  _(r.comma);
22271
- gs(), E(r.parenR), E(r.arrow), Me();
22256
+ gs(), E(r.parenR), E(r.arrow), Ne();
22272
22257
  return;
22273
22258
  case r.minus:
22274
22259
  T(), Dt();
@@ -22295,14 +22280,14 @@ function Aa() {
22295
22280
  te();
22296
22281
  }
22297
22282
  function ef() {
22298
- for (Aa(); !Ne() && (l(r.bracketL) || l(r.questionDot)); )
22299
- _(r.questionDot), E(r.bracketL), _(r.bracketR) || (Me(), E(r.bracketR));
22283
+ for (Aa(); !Me() && (l(r.bracketL) || l(r.questionDot)); )
22284
+ _(r.questionDot), E(r.bracketL), _(r.bracketR) || (Ne(), E(r.bracketR));
22300
22285
  }
22301
22286
  function Ia() {
22302
22287
  _(r.question) ? Ia() : ef();
22303
22288
  }
22304
22289
  function ji() {
22305
- Ia(), !a.noAnonFunctionType && _(r.arrow) && Me();
22290
+ Ia(), !a.noAnonFunctionType && _(r.arrow) && Ne();
22306
22291
  }
22307
22292
  function qi() {
22308
22293
  for (_(r.bitwiseAND), ji(); _(r.bitwiseAND); )
@@ -22312,7 +22297,7 @@ function tf() {
22312
22297
  for (_(r.bitwiseOR), qi(); _(r.bitwiseOR); )
22313
22298
  qi();
22314
22299
  }
22315
- function Me() {
22300
+ function Ne() {
22316
22301
  tf();
22317
22302
  }
22318
22303
  function At() {
@@ -22415,7 +22400,7 @@ function mf(t) {
22415
22400
  const e = re(0);
22416
22401
  T(), a.tokens[a.tokens.length - 1].type = r._implements;
22417
22402
  do
22418
- Hn(), l(r.lessThan) && vt();
22403
+ Gn(), l(r.lessThan) && vt();
22419
22404
  while (_(r.comma));
22420
22405
  ne(e);
22421
22406
  }
@@ -22470,7 +22455,7 @@ function vf(t, e) {
22470
22455
  function Ef() {
22471
22456
  if (l(r.colon)) {
22472
22457
  const t = re(0), e = a.snapshot(), n = a.noAnonFunctionType;
22473
- a.noAnonFunctionType = !0, Xs(), a.noAnonFunctionType = n, Ne() && te(), l(r.arrow) || te(), a.error && a.restoreFromSnapshot(e), ne(t);
22458
+ a.noAnonFunctionType = !0, Xs(), a.noAnonFunctionType = n, Me() && te(), l(r.arrow) || te(), a.error && a.restoreFromSnapshot(e), ne(t);
22474
22459
  }
22475
22460
  return _(r.arrow);
22476
22461
  }
@@ -22486,7 +22471,7 @@ function Tf(t, e = !1) {
22486
22471
  function Sf() {
22487
22472
  a.scopeDepth++;
22488
22473
  const t = a.tokens.length;
22489
- return Nt(), ds() ? (Jt(t), !0) : !1;
22474
+ return Mt(), ds() ? (Jt(t), !0) : !1;
22490
22475
  }
22491
22476
  function Ca() {
22492
22477
  we(d._enum), a.tokens[a.tokens.length - 1].type = r._enum, Q(), xf();
@@ -22502,7 +22487,7 @@ function If() {
22502
22487
  Q(), _(r.eq) && T();
22503
22488
  }
22504
22489
  function Rf() {
22505
- if (Gn(r.eof), a.scopes.push(new Je(0, a.tokens.length, !0)), a.scopeDepth !== 0)
22490
+ if (Xn(r.eof), a.scopes.push(new Je(0, a.tokens.length, !0)), a.scopeDepth !== 0)
22506
22491
  throw new Error(`Invalid scope depth at end of file: ${a.scopeDepth}`);
22507
22492
  return new pd(a.tokens, a.scopes);
22508
22493
  }
@@ -22553,7 +22538,7 @@ function Cf(t) {
22553
22538
  case r._const:
22554
22539
  t || te();
22555
22540
  case r._var:
22556
- yn(e !== r._var);
22541
+ bn(e !== r._var);
22557
22542
  return;
22558
22543
  case r._while:
22559
22544
  Hf();
@@ -22569,13 +22554,13 @@ function Cf(t) {
22569
22554
  const i = be();
22570
22555
  if (i === r.parenL || i === r.dot)
22571
22556
  break;
22572
- T(), e === r._import ? Ba() : Na();
22557
+ T(), e === r._import ? Ba() : Ma();
22573
22558
  return;
22574
22559
  }
22575
22560
  case r.name:
22576
22561
  if (a.contextualKeyword === d._async) {
22577
22562
  const i = a.start, o = a.snapshot();
22578
- if (T(), l(r._function) && !Ne()) {
22563
+ if (T(), l(r._function) && !Me()) {
22579
22564
  E(r._function), Et(i, !0);
22580
22565
  return;
22581
22566
  } else
@@ -22583,10 +22568,10 @@ function Cf(t) {
22583
22568
  } else if (a.contextualKeyword === d._using && !Do() && // Statements like `using[0]` and `using in foo` aren't actual using
22584
22569
  // declarations.
22585
22570
  be() === r.name) {
22586
- yn(!0);
22571
+ bn(!0);
22587
22572
  return;
22588
22573
  } else if (La()) {
22589
- we(d._await), yn(!0);
22574
+ we(d._await), bn(!0);
22590
22575
  return;
22591
22576
  }
22592
22577
  }
@@ -22635,19 +22620,19 @@ function Ff() {
22635
22620
  T(), ye();
22636
22621
  }
22637
22622
  function Df() {
22638
- T(), Oe(!1), E(r._while), Wn(), _(r.semi);
22623
+ T(), Oe(!1), E(r._while), Hn(), _(r.semi);
22639
22624
  }
22640
22625
  function Uf() {
22641
22626
  a.scopeDepth++;
22642
22627
  const t = a.tokens.length;
22643
- Nf();
22628
+ Mf();
22644
22629
  const e = a.tokens.length;
22645
22630
  a.scopes.push(new Je(t, e, !1)), a.scopeDepth--;
22646
22631
  }
22647
- function Mf() {
22632
+ function Nf() {
22648
22633
  return !(!q(d._using) || Ls(d._of));
22649
22634
  }
22650
- function Nf() {
22635
+ function Mf() {
22651
22636
  T();
22652
22637
  let t = !1;
22653
22638
  if (q(d._await) && (t = !0, T()), E(r.parenL), l(r.semi)) {
@@ -22655,7 +22640,7 @@ function Nf() {
22655
22640
  return;
22656
22641
  }
22657
22642
  const e = La();
22658
- if (e || l(r._var) || l(r._let) || l(r._const) || Mf()) {
22643
+ if (e || l(r._var) || l(r._let) || l(r._const) || Nf()) {
22659
22644
  if (e && we(d._await), T(), Da(!0, a.type !== r._var), l(r._in) || q(d._of)) {
22660
22645
  Wi(t);
22661
22646
  return;
@@ -22674,13 +22659,13 @@ function Of() {
22674
22659
  T(), Et(t, !0);
22675
22660
  }
22676
22661
  function Bf() {
22677
- T(), Wn(), Oe(!1), _(r._else) && Oe(!1);
22662
+ T(), Hn(), Oe(!1), _(r._else) && Oe(!1);
22678
22663
  }
22679
22664
  function Vf() {
22680
22665
  T(), Ke() || (Se(), ye());
22681
22666
  }
22682
22667
  function $f() {
22683
- T(), Wn(), a.scopeDepth++;
22668
+ T(), Hn(), a.scopeDepth++;
22684
22669
  const t = a.tokens.length;
22685
22670
  for (E(r.braceL); !l(r.braceR) && !a.error; )
22686
22671
  if (l(r._case) || l(r._default)) {
@@ -22696,7 +22681,7 @@ function jf() {
22696
22681
  T(), Se(), ye();
22697
22682
  }
22698
22683
  function qf() {
22699
- $n(
22684
+ jn(
22700
22685
  !0
22701
22686
  /* isBlockScope */
22702
22687
  ), le && Ut();
@@ -22712,11 +22697,11 @@ function Wf() {
22712
22697
  }
22713
22698
  _(r._finally) && ht();
22714
22699
  }
22715
- function yn(t) {
22700
+ function bn(t) {
22716
22701
  T(), Da(!1, t), ye();
22717
22702
  }
22718
22703
  function Hf() {
22719
- T(), Wn(), Oe(!1);
22704
+ T(), Hn(), Oe(!1);
22720
22705
  }
22721
22706
  function Gf() {
22722
22707
  T();
@@ -22729,11 +22714,11 @@ function zf(t) {
22729
22714
  }
22730
22715
  function ht(t = !1, e = 0) {
22731
22716
  const n = a.tokens.length;
22732
- a.scopeDepth++, E(r.braceL), e && (a.tokens[a.tokens.length - 1].contextId = e), Gn(r.braceR), e && (a.tokens[a.tokens.length - 1].contextId = e);
22717
+ a.scopeDepth++, E(r.braceL), e && (a.tokens[a.tokens.length - 1].contextId = e), Xn(r.braceR), e && (a.tokens[a.tokens.length - 1].contextId = e);
22733
22718
  const s = a.tokens.length;
22734
22719
  a.scopes.push(new Je(n, s, t)), a.scopeDepth--;
22735
22720
  }
22736
- function Gn(t) {
22721
+ function Xn(t) {
22737
22722
  for (; !_(t) && !a.error; )
22738
22723
  Oe(!0);
22739
22724
  }
@@ -22754,18 +22739,18 @@ function Da(t, e) {
22754
22739
  }
22755
22740
  }
22756
22741
  function Yf(t) {
22757
- $n(t), le ? Jl() : he && kf();
22742
+ jn(t), le ? Jl() : he && kf();
22758
22743
  }
22759
22744
  function Et(t, e, n = !1) {
22760
22745
  l(r.star) && T(), e && !n && !l(r.name) && !l(r._yield) && te();
22761
22746
  let s = null;
22762
22747
  l(r.name) && (e || (s = a.tokens.length, a.scopeDepth++), ft(!1));
22763
22748
  const i = a.tokens.length;
22764
- a.scopeDepth++, Nt(), Ea(t);
22749
+ a.scopeDepth++, Mt(), Ea(t);
22765
22750
  const o = a.tokens.length;
22766
22751
  a.scopes.push(new Je(i, o, !0)), a.scopeDepth--, s !== null && (a.scopes.push(new Je(s, o, !0)), a.scopeDepth--);
22767
22752
  }
22768
- function Nt(t = !1, e = 0) {
22753
+ function Mt(t = !1, e = 0) {
22769
22754
  le ? Ql() : he && _f(), E(r.parenL), e && (a.tokens[a.tokens.length - 1].contextId = e), Us(
22770
22755
  r.parenR,
22771
22756
  !1,
@@ -22788,7 +22773,7 @@ function Tt(t, e = !1) {
22788
22773
  function Ua() {
22789
22774
  return l(r.eq) || l(r.semi) || l(r.braceR) || l(r.bang) || l(r.colon);
22790
22775
  }
22791
- function Ma() {
22776
+ function Na() {
22792
22777
  return l(r.parenL) || l(r.lessThan);
22793
22778
  }
22794
22779
  function Kf(t) {
@@ -22804,7 +22789,7 @@ function Kf(t) {
22804
22789
  }
22805
22790
  }
22806
22791
  function Zf(t, e) {
22807
- le && Ms([
22792
+ le && Ns([
22808
22793
  d._declare,
22809
22794
  d._public,
22810
22795
  d._protected,
@@ -22813,7 +22798,7 @@ function Zf(t, e) {
22813
22798
  ]);
22814
22799
  let n = !1;
22815
22800
  if (l(r.name) && a.contextualKeyword === d._static) {
22816
- if (Q(), Ma()) {
22801
+ if (Q(), Na()) {
22817
22802
  jt(
22818
22803
  t,
22819
22804
  /* isConstructor */
@@ -22821,7 +22806,7 @@ function Zf(t, e) {
22821
22806
  );
22822
22807
  return;
22823
22808
  } else if (Ua()) {
22824
- bn();
22809
+ _n();
22825
22810
  return;
22826
22811
  }
22827
22812
  if (a.tokens[a.tokens.length - 1].type = r._static, n = !0, l(r.braceL)) {
@@ -22845,7 +22830,7 @@ function Qf(t, e, n) {
22845
22830
  $t(n);
22846
22831
  let s = !1;
22847
22832
  const i = a.tokens[a.tokens.length - 1];
22848
- i.contextualKeyword === d._constructor && (s = !0), Hi(), Ma() ? jt(t, s) : Ua() ? bn() : i.contextualKeyword === d._async && !Ke() ? (a.tokens[a.tokens.length - 1].type = r._async, l(r.star) && T(), $t(n), Hi(), jt(
22833
+ i.contextualKeyword === d._constructor && (s = !0), Hi(), Na() ? jt(t, s) : Ua() ? _n() : i.contextualKeyword === d._async && !Ke() ? (a.tokens[a.tokens.length - 1].type = r._async, l(r.star) && T(), $t(n), Hi(), jt(
22849
22834
  t,
22850
22835
  !1
22851
22836
  /* isConstructor */
@@ -22853,7 +22838,7 @@ function Qf(t, e, n) {
22853
22838
  t,
22854
22839
  /* isConstructor */
22855
22840
  !1
22856
- )) : i.contextualKeyword === d._accessor && !Ke() ? ($t(n), bn()) : Ke() ? bn() : te();
22841
+ )) : i.contextualKeyword === d._accessor && !Ke() ? ($t(n), _n()) : Ke() ? _n() : te();
22857
22842
  }
22858
22843
  function jt(t, e) {
22859
22844
  le ? xt() : he && l(r.lessThan) && Xe(), ms(t, e);
@@ -22867,7 +22852,7 @@ function Hi() {
22867
22852
  _(r.question), ne(t);
22868
22853
  }
22869
22854
  }
22870
- function bn() {
22855
+ function _n() {
22871
22856
  if (le ? (Bo(r.bang), Ut()) : he && l(r.colon) && At(), l(r.eq)) {
22872
22857
  const t = a.tokens.length;
22873
22858
  T(), xe(), a.tokens[t].rhsEndIndex = a.tokens.length;
@@ -22881,7 +22866,7 @@ function ed() {
22881
22866
  let t = !1;
22882
22867
  _(r._extends) ? (_a(), t = !0) : t = !1, le ? Kl(t) : he && mf(t);
22883
22868
  }
22884
- function Na() {
22869
+ function Ma() {
22885
22870
  const t = a.tokens.length - 1;
22886
22871
  le && jl() || (sd() ? id() : rd() ? (Q(), l(r.comma) && be() === r.star ? (E(r.comma), E(r.star), we(d._as), Q()) : Oa(), en()) : _(r._default) ? td() : ad() ? nd() : (ni(), en()), a.tokens[t].rhsEndIndex = a.tokens.length);
22887
22872
  }
@@ -22977,7 +22962,7 @@ function hd() {
22977
22962
  return l(r.name);
22978
22963
  }
22979
22964
  function Gi() {
22980
- In();
22965
+ Rn();
22981
22966
  }
22982
22967
  function fd() {
22983
22968
  he && yf();
@@ -23007,7 +22992,7 @@ function dd() {
23007
22992
  bf();
23008
22993
  return;
23009
22994
  }
23010
- In(), q(d._as) && (a.tokens[a.tokens.length - 1].identifierRole = z.ImportAccess, T(), In());
22995
+ Rn(), q(d._as) && (a.tokens[a.tokens.length - 1].identifierRole = z.ImportAccess, T(), Rn());
23011
22996
  }
23012
22997
  function Va() {
23013
22998
  (l(r._with) || q(d._assert) && !Le()) && (T(), Gs(!1, !1));
@@ -23264,7 +23249,7 @@ function bd(t, e, n, s) {
23264
23249
  else {
23265
23250
  const w = e.currentIndex();
23266
23251
  let D = !1, V = !1, $ = !1;
23267
- for (; Dn(e.currentToken()); )
23252
+ for (; Un(e.currentToken()); )
23268
23253
  e.matches1(r._static) && (D = !0), e.matches1(r.hash) && (V = !0), (e.matches1(r._declare) || e.matches1(r._abstract)) && ($ = !0), e.nextToken();
23269
23254
  if (D && e.matches1(r.braceL)) {
23270
23255
  Jr(e, x);
@@ -23291,9 +23276,9 @@ function bd(t, e, n, s) {
23291
23276
  throw new Error("Expected rhsEndIndex on class field assignment.");
23292
23277
  for (e.nextToken(); e.currentIndex() < W; )
23293
23278
  t.processToken();
23294
- let M;
23295
- D ? (M = n.claimFreeName("__initStatic"), f.push(M)) : (M = n.claimFreeName("__init"), u.push(M)), m.push({
23296
- initializerName: M,
23279
+ let N;
23280
+ D ? (N = n.claimFreeName("__initStatic"), f.push(N)) : (N = n.claimFreeName("__init"), u.push(N)), m.push({
23281
+ initializerName: N,
23297
23282
  equalsIndex: L,
23298
23283
  start: K,
23299
23284
  end: e.currentIndex()
@@ -23321,7 +23306,7 @@ function bd(t, e, n, s) {
23321
23306
  function Jr(t, e) {
23322
23307
  for (t.nextToken(); t.currentToken().contextId !== e; )
23323
23308
  t.nextToken();
23324
- for (; Dn(t.tokenAtRelativeIndex(-1)); )
23309
+ for (; Un(t.tokenAtRelativeIndex(-1)); )
23325
23310
  t.previousToken();
23326
23311
  }
23327
23312
  function _d(t) {
@@ -23344,8 +23329,8 @@ function Xi(t) {
23344
23329
  throw new Error("Expected context ID on open-paren starting constructor params.");
23345
23330
  for (; !t.matchesContextIdAndLabel(r.parenR, n); )
23346
23331
  if (t.currentToken().contextId === n) {
23347
- if (t.nextToken(), Dn(t.currentToken())) {
23348
- for (t.nextToken(); Dn(t.currentToken()); )
23332
+ if (t.nextToken(), Un(t.currentToken())) {
23333
+ for (t.nextToken(); Un(t.currentToken()); )
23349
23334
  t.nextToken();
23350
23335
  const o = t.currentToken();
23351
23336
  if (o.type !== r.name)
@@ -23372,7 +23357,7 @@ function Xi(t) {
23372
23357
  }
23373
23358
  return t.nextToken(), { constructorInitializerStatements: e, constructorInsertPos: s };
23374
23359
  }
23375
- function Dn(t) {
23360
+ function Un(t) {
23376
23361
  return [
23377
23362
  r._async,
23378
23363
  r._get,
@@ -23750,7 +23735,7 @@ module.exports = exports.default;
23750
23735
  this.rootTransformer.processToken();
23751
23736
  } else {
23752
23737
  const s = this.tokens.currentToken();
23753
- if (No(s)) {
23738
+ if (Mo(s)) {
23754
23739
  const i = this.tokens.identifierName();
23755
23740
  let o = this.importProcessor.getIdentifierReplacement(i);
23756
23741
  if (o === null)
@@ -24136,7 +24121,7 @@ function Ed(t) {
24136
24121
  }
24137
24122
  return n;
24138
24123
  }
24139
- const dn = "jest", Td = ["mock", "unmock", "enableAutomock", "disableAutomock"];
24124
+ const mn = "jest", Td = ["mock", "unmock", "enableAutomock", "disableAutomock"];
24140
24125
  class ri extends Ge {
24141
24126
  __init() {
24142
24127
  this.hoistedFunctionNames = [];
@@ -24145,7 +24130,7 @@ class ri extends Ge {
24145
24130
  super(), this.rootTransformer = e, this.tokens = n, this.nameManager = s, this.importProcessor = i, ri.prototype.__init.call(this);
24146
24131
  }
24147
24132
  process() {
24148
- return this.tokens.currentToken().scopeDepth === 0 && this.tokens.matches4(r.name, r.dot, r.name, r.parenL) && this.tokens.identifierName() === dn ? Ed([this, "access", (e) => e.importProcessor, "optionalAccess", (e) => e.getGlobalNames, "call", (e) => e(), "optionalAccess", (e) => e.has, "call", (e) => e(dn)]) ? !1 : this.extractHoistedCalls() : !1;
24133
+ return this.tokens.currentToken().scopeDepth === 0 && this.tokens.matches4(r.name, r.dot, r.name, r.parenL) && this.tokens.identifierName() === mn ? Ed([this, "access", (e) => e.importProcessor, "optionalAccess", (e) => e.getGlobalNames, "call", (e) => e(), "optionalAccess", (e) => e.has, "call", (e) => e(mn)]) ? !1 : this.extractHoistedCalls() : !1;
24149
24134
  }
24150
24135
  getHoistedCode() {
24151
24136
  return this.hoistedFunctionNames.length > 0 ? this.hoistedFunctionNames.map((e) => `${e}();`).join("") : "";
@@ -24165,9 +24150,9 @@ class ri extends Ge {
24165
24150
  const n = this.tokens.identifierNameAtIndex(this.tokens.currentIndex() + 1);
24166
24151
  if (Td.includes(n)) {
24167
24152
  const i = this.nameManager.claimFreeName("__jestHoist");
24168
- this.hoistedFunctionNames.push(i), this.tokens.replaceToken(`function ${i}(){${dn}.`), this.tokens.copyToken(), this.tokens.copyToken(), this.rootTransformer.processBalancedCode(), this.tokens.copyExpectedToken(r.parenR), this.tokens.appendCode(";}"), e = !1;
24153
+ this.hoistedFunctionNames.push(i), this.tokens.replaceToken(`function ${i}(){${mn}.`), this.tokens.copyToken(), this.tokens.copyToken(), this.rootTransformer.processBalancedCode(), this.tokens.copyExpectedToken(r.parenR), this.tokens.appendCode(";}"), e = !1;
24169
24154
  } else
24170
- e ? this.tokens.copyToken() : this.tokens.replaceToken(`${dn}.`), this.tokens.copyToken(), this.tokens.copyToken(), this.rootTransformer.processBalancedCode(), this.tokens.copyExpectedToken(r.parenR), e = !0;
24155
+ e ? this.tokens.copyToken() : this.tokens.replaceToken(`${mn}.`), this.tokens.copyToken(), this.tokens.copyToken(), this.rootTransformer.processBalancedCode(), this.tokens.copyExpectedToken(r.parenR), e = !0;
24171
24156
  }
24172
24157
  return !0;
24173
24158
  }
@@ -24584,7 +24569,7 @@ class Cd extends Ge {
24584
24569
  );
24585
24570
  }
24586
24571
  }
24587
- class Un {
24572
+ class Nn {
24588
24573
  __init() {
24589
24574
  this.transformers = [];
24590
24575
  }
@@ -24592,7 +24577,7 @@ class Un {
24592
24577
  this.generatedVariables = [];
24593
24578
  }
24594
24579
  constructor(e, n, s, i) {
24595
- Un.prototype.__init.call(this), Un.prototype.__init2.call(this), this.nameManager = e.nameManager, this.helperManager = e.helperManager;
24580
+ Nn.prototype.__init.call(this), Nn.prototype.__init2.call(this), this.nameManager = e.nameManager, this.helperManager = e.helperManager;
24596
24581
  const { tokenProcessor: o, importProcessor: c } = e;
24597
24582
  this.tokens = o, this.isImportsTransformEnabled = n.includes("imports"), this.isReactHotLoaderTransformEnabled = n.includes("react-hot-loader"), this.disableESTransforms = !!i.disableESTransforms, i.disableESTransforms || (this.transformers.push(
24598
24583
  new Ad(o, this.nameManager)
@@ -24922,7 +24907,7 @@ function Dd(t, e, n) {
24922
24907
  function Ud(t, e) {
24923
24908
  Ku(e);
24924
24909
  try {
24925
- const n = Md(t, e), i = new Un(
24910
+ const n = Nd(t, e), i = new Nn(
24926
24911
  n,
24927
24912
  e.transforms,
24928
24913
  !!e.enableLegacyBabel5ModuleInterop,
@@ -24934,7 +24919,7 @@ function Ud(t, e) {
24934
24919
  throw new Error("filePath must be specified when generating a source map.");
24935
24920
  o = {
24936
24921
  ...o,
24937
- sourceMap: Mu(
24922
+ sourceMap: Nu(
24938
24923
  i,
24939
24924
  e.filePath,
24940
24925
  e.sourceMapOptions,
@@ -24948,8 +24933,8 @@ function Ud(t, e) {
24948
24933
  throw e.filePath && (n.message = `Error transforming ${e.filePath}: ${n.message}`), n;
24949
24934
  }
24950
24935
  }
24951
- function Md(t, e) {
24952
- const n = e.transforms.includes("jsx"), s = e.transforms.includes("typescript"), i = e.transforms.includes("flow"), o = e.disableESTransforms === !0, c = gd(t, n, s, i), u = c.tokens, f = c.scopes, h = new Fs(t, u), m = new An(h), g = new Wt(
24936
+ function Nd(t, e) {
24937
+ const n = e.transforms.includes("jsx"), s = e.transforms.includes("typescript"), i = e.transforms.includes("flow"), o = e.disableESTransforms === !0, c = gd(t, n, s, i), u = c.tokens, f = c.scopes, h = new Fs(t, u), m = new In(h), g = new Wt(
24953
24938
  t,
24954
24939
  u,
24955
24940
  i,
@@ -25000,7 +24985,7 @@ self.addEventListener("unhandledrejection", (t) => {
25000
24985
  ...n !== void 0 && { stack: n }
25001
24986
  }), t.preventDefault();
25002
24987
  });
25003
- const nt = new xn(), Be = new C1((t) => self.postMessage(t));
24988
+ const nt = new An(), Be = new C1((t) => self.postMessage(t));
25004
24989
  tn.current = Be;
25005
24990
  nt.setSceneErrorReporter(Be);
25006
24991
  let Yi = null;
@@ -25016,7 +25001,7 @@ function Ki(t) {
25016
25001
  mappings: e.sourceMap?.mappings ?? null
25017
25002
  };
25018
25003
  }
25019
- async function Nd(t) {
25004
+ async function Md(t) {
25020
25005
  Be.resetForSceneReload();
25021
25006
  try {
25022
25007
  nt.resetParameterState();
@@ -25090,5 +25075,5 @@ throw new Error("Scene code must define a render function");`, o = Object.getPro
25090
25075
  });
25091
25076
  }
25092
25077
  }
25093
- self.setSceneCode = Nd;
25094
- //# sourceMappingURL=viji.worker-sMAb5DcQ.js.map
25078
+ self.setSceneCode = Md;
25079
+ //# sourceMappingURL=viji.worker-Dq2EQ0Wd.js.map