@viji-dev/core 0.7.0 → 0.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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");
@@ -7366,6 +7351,15 @@ class C1 {
7366
7351
  currentSourceMap = null;
7367
7352
  /** Lifecycle marker; flipped by the runtime after first successful render. */
7368
7353
  hasProducedFirstFrame = !1;
7354
+ /**
7355
+ * Monotonic envelope sequence number. Used to give every outbound envelope
7356
+ * a unique `id` even when two fires share the same `signatureHash` and
7357
+ * `firstSeenAt` (which they do under cumulative semantics — `firstSeenAt`
7358
+ * is constant across windows for a recurring signature, so the sequence
7359
+ * counter is what disambiguates the leading-edge of burst N from the
7360
+ * trailing rollup of burst N-1).
7361
+ */
7362
+ envelopeSeq = 0;
7369
7363
  constructor(e, n = {}) {
7370
7364
  this.config = { ...R1, ...n }, this.post = e, this.errorChannel = new Ti(
7371
7365
  this.config.errorCoalescingWindowMs,
@@ -7551,7 +7545,7 @@ class C1 {
7551
7545
  postEnvelope(e, n) {
7552
7546
  this.post({
7553
7547
  type: e,
7554
- id: `${e}_${n.signatureHash}_${n.firstSeenAt}`,
7548
+ id: `${e}_${n.signatureHash}_${++this.envelopeSeq}`,
7555
7549
  timestamp: Date.now(),
7556
7550
  data: n
7557
7551
  });
@@ -7567,30 +7561,38 @@ class Ti {
7567
7561
  setWindowMs(e) {
7568
7562
  this.windowMs = e;
7569
7563
  }
7564
+ /**
7565
+ * `true` iff this signature has been observed at least once in the current
7566
+ * session. Used by the console rate-cap to charge the per-second budget
7567
+ * only for genuinely new signatures (a known signature in a fresh burst
7568
+ * is not a new signature).
7569
+ */
7570
7570
  hasPending(e) {
7571
7571
  return this.pending.has(e);
7572
7572
  }
7573
7573
  emit(e, n) {
7574
7574
  const s = Date.now(), i = this.pending.get(e);
7575
7575
  if (i) {
7576
- i.payload.count++, i.payload.lastSeenAt = s;
7576
+ if (i.payload.count++, i.payload.lastSeenAt = s, i.timer !== null) return;
7577
+ this.emitFn(i.payload), i.lastEmittedCount = i.payload.count, i.timer = setTimeout(() => this.flush(e), this.windowMs);
7577
7578
  return;
7578
7579
  }
7579
7580
  n.count = 1, n.firstSeenAt = s, n.lastSeenAt = s, this.emitFn(n);
7580
7581
  const o = setTimeout(() => this.flush(e), this.windowMs);
7581
- this.pending.set(e, { payload: n, timer: o });
7582
+ this.pending.set(e, { payload: n, timer: o, lastEmittedCount: 1 });
7582
7583
  }
7583
7584
  flush(e) {
7584
7585
  const n = this.pending.get(e);
7585
- n && (this.pending.delete(e), clearTimeout(n.timer), n.payload.count > 1 && this.emitFn(n.payload));
7586
+ !n || n.timer === null || (clearTimeout(n.timer), n.timer = null, n.payload.count > n.lastEmittedCount && (this.emitFn(n.payload), n.lastEmittedCount = n.payload.count));
7586
7587
  }
7587
7588
  flushAndClear() {
7588
- for (const [e] of this.pending)
7589
- this.flush(e);
7589
+ for (const e of this.pending.values())
7590
+ e.timer !== null && (clearTimeout(e.timer), e.timer = null, e.payload.count > e.lastEmittedCount && this.emitFn(e.payload));
7591
+ this.pending.clear();
7590
7592
  }
7591
7593
  destroy() {
7592
7594
  for (const e of this.pending.values())
7593
- clearTimeout(e.timer);
7595
+ e.timer !== null && clearTimeout(e.timer);
7594
7596
  this.pending.clear();
7595
7597
  }
7596
7598
  }
@@ -7665,9 +7667,9 @@ var d;
7665
7667
  t[t._infer = L] = "_infer";
7666
7668
  const W = L + 1;
7667
7669
  t[t._interface = W] = "_interface";
7668
- const M = W + 1;
7669
- t[t._is = M] = "_is";
7670
- const J = M + 1;
7670
+ const N = W + 1;
7671
+ t[t._is = N] = "_is";
7672
+ const J = N + 1;
7671
7673
  t[t._keyof = J] = "_keyof";
7672
7674
  const se = J + 1;
7673
7675
  t[t._mixins = se] = "_mixins";
@@ -7691,9 +7693,9 @@ var d;
7691
7693
  t[t._proto = U] = "_proto";
7692
7694
  const R = U + 1;
7693
7695
  t[t._public = R] = "_public";
7694
- const N = R + 1;
7695
- t[t._readonly = N] = "_readonly";
7696
- const P = N + 1;
7696
+ const M = R + 1;
7697
+ t[t._readonly = M] = "_readonly";
7698
+ const P = M + 1;
7697
7699
  t[t._require = P] = "_require";
7698
7700
  const O = P + 1;
7699
7701
  t[t._satisfies = O] = "_satisfies";
@@ -7749,8 +7751,8 @@ var r;
7749
7751
  t[t.braceBarL = L] = "braceBarL";
7750
7752
  const W = 11264;
7751
7753
  t[t.braceR = W] = "braceR";
7752
- const M = 12288;
7753
- t[t.braceBarR = M] = "braceBarR";
7754
+ const N = 12288;
7755
+ t[t.braceBarR = N] = "braceBarR";
7754
7756
  const J = 13824;
7755
7757
  t[t.parenL = J] = "parenL";
7756
7758
  const se = 14336;
@@ -7775,8 +7777,8 @@ var r;
7775
7777
  t[t.template = U] = "template";
7776
7778
  const R = 24576;
7777
7779
  t[t.ellipsis = R] = "ellipsis";
7778
- const N = 25600;
7779
- t[t.backQuote = N] = "backQuote";
7780
+ const M = 25600;
7781
+ t[t.backQuote = M] = "backQuote";
7780
7782
  const P = 27136;
7781
7783
  t[t.dollarBraceL = P] = "dollarBraceL";
7782
7784
  const O = 27648;
@@ -7827,98 +7829,98 @@ var r;
7827
7829
  t[t.minus = It] = "minus";
7828
7830
  const Ot = 51723;
7829
7831
  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";
7832
+ const zn = 52235;
7833
+ t[t.star = zn] = "star";
7834
+ const Yn = 53259;
7835
+ t[t.slash = Yn] = "slash";
7836
+ const Kn = 54348;
7837
+ t[t.exponent = Kn] = "exponent";
7838
+ const Zn = 55296;
7839
+ t[t.jsxName = Zn] = "jsxName";
7840
+ const Qn = 56320;
7841
+ t[t.jsxText = Qn] = "jsxText";
7842
+ const Jn = 57344;
7843
+ t[t.jsxEmptyText = Jn] = "jsxEmptyText";
7844
+ const er = 58880;
7845
+ t[t.jsxTagStart = er] = "jsxTagStart";
7846
+ const tr = 59392;
7847
+ t[t.jsxTagEnd = tr] = "jsxTagEnd";
7848
+ const nr = 60928;
7849
+ t[t.typeParameterStart = nr] = "typeParameterStart";
7850
+ const rr = 61440;
7851
+ t[t.nonNullAssertion = rr] = "nonNullAssertion";
7852
+ const sr = 62480;
7853
+ t[t._break = sr] = "_break";
7854
+ const ir = 63504;
7855
+ t[t._case = ir] = "_case";
7856
+ const or = 64528;
7857
+ t[t._catch = or] = "_catch";
7858
+ const ar = 65552;
7859
+ t[t._continue = ar] = "_continue";
7860
+ const cr = 66576;
7861
+ t[t._debugger = cr] = "_debugger";
7862
+ const ur = 67600;
7863
+ t[t._default = ur] = "_default";
7864
+ const lr = 68624;
7865
+ t[t._do = lr] = "_do";
7866
+ const hr = 69648;
7867
+ t[t._else = hr] = "_else";
7868
+ const fr = 70672;
7869
+ t[t._finally = fr] = "_finally";
7870
+ const dr = 71696;
7871
+ t[t._for = dr] = "_for";
7872
+ const mr = 73232;
7873
+ t[t._function = mr] = "_function";
7874
+ const pr = 73744;
7875
+ t[t._if = pr] = "_if";
7876
+ const gr = 74768;
7877
+ t[t._return = gr] = "_return";
7878
+ const yr = 75792;
7879
+ t[t._switch = yr] = "_switch";
7880
+ const br = 77456;
7881
+ t[t._throw = br] = "_throw";
7882
+ const _r = 77840;
7883
+ t[t._try = _r] = "_try";
7884
+ const kr = 78864;
7885
+ t[t._var = kr] = "_var";
7886
+ const wr = 79888;
7887
+ t[t._let = wr] = "_let";
7888
+ const vr = 80912;
7889
+ t[t._const = vr] = "_const";
7890
+ const Er = 81936;
7891
+ t[t._while = Er] = "_while";
7892
+ const Tr = 82960;
7893
+ t[t._with = Tr] = "_with";
7894
+ const Sr = 84496;
7895
+ t[t._new = Sr] = "_new";
7896
+ const xr = 85520;
7897
+ t[t._this = xr] = "_this";
7898
+ const Ar = 86544;
7899
+ t[t._super = Ar] = "_super";
7900
+ const Ir = 87568;
7901
+ t[t._class = Ir] = "_class";
7902
+ const Rr = 88080;
7903
+ t[t._extends = Rr] = "_extends";
7904
+ const Cr = 89104;
7905
+ t[t._export = Cr] = "_export";
7906
+ const Lr = 90640;
7907
+ t[t._import = Lr] = "_import";
7908
+ const Pr = 91664;
7909
+ t[t._yield = Pr] = "_yield";
7910
+ const Fr = 92688;
7911
+ t[t._null = Fr] = "_null";
7912
+ const Dr = 93712;
7913
+ t[t._true = Dr] = "_true";
7914
+ const Ur = 94736;
7915
+ t[t._false = Ur] = "_false";
7916
+ const Nr = 95256;
7917
+ t[t._in = Nr] = "_in";
7916
7918
  const Mr = 96280;
7917
7919
  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";
7920
+ const Or = 97936;
7921
+ t[t._typeof = Or] = "_typeof";
7922
+ const Br = 98960;
7923
+ t[t._void = Br] = "_void";
7922
7924
  const Xa = 99984;
7923
7925
  t[t._delete = Xa] = "_delete";
7924
7926
  const za = 100880;
@@ -8312,8 +8314,8 @@ var p;
8312
8314
  t[t.comma = L] = "comma";
8313
8315
  const W = 45;
8314
8316
  t[t.dash = W] = "dash";
8315
- const M = 46;
8316
- t[t.dot = M] = "dot";
8317
+ const N = 46;
8318
+ t[t.dot = N] = "dot";
8317
8319
  const J = 47;
8318
8320
  t[t.slash = J] = "slash";
8319
8321
  const se = 48;
@@ -8338,8 +8340,8 @@ var p;
8338
8340
  t[t.digit9 = U] = "digit9";
8339
8341
  const R = 58;
8340
8342
  t[t.colon = R] = "colon";
8341
- const N = 59;
8342
- t[t.semicolon = N] = "semicolon";
8343
+ const M = 59;
8344
+ t[t.semicolon = M] = "semicolon";
8343
8345
  const P = 60;
8344
8346
  t[t.lessThan = P] = "lessThan";
8345
8347
  const O = 61;
@@ -8390,123 +8392,123 @@ var p;
8390
8392
  t[t.uppercaseS = It] = "uppercaseS";
8391
8393
  const Ot = 84;
8392
8394
  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";
8395
+ const zn = 85;
8396
+ t[t.uppercaseU = zn] = "uppercaseU";
8397
+ const Yn = 86;
8398
+ t[t.uppercaseV = Yn] = "uppercaseV";
8399
+ const Kn = 87;
8400
+ t[t.uppercaseW = Kn] = "uppercaseW";
8401
+ const Zn = 88;
8402
+ t[t.uppercaseX = Zn] = "uppercaseX";
8403
+ const Qn = 89;
8404
+ t[t.uppercaseY = Qn] = "uppercaseY";
8405
+ const Jn = 90;
8406
+ t[t.uppercaseZ = Jn] = "uppercaseZ";
8407
+ const er = 91;
8408
+ t[t.leftSquareBracket = er] = "leftSquareBracket";
8409
+ const tr = 92;
8410
+ t[t.backslash = tr] = "backslash";
8411
+ const nr = 93;
8412
+ t[t.rightSquareBracket = nr] = "rightSquareBracket";
8413
+ const rr = 94;
8414
+ t[t.caret = rr] = "caret";
8415
+ const sr = 95;
8416
+ t[t.underscore = sr] = "underscore";
8417
+ const ir = 96;
8418
+ t[t.graveAccent = ir] = "graveAccent";
8419
+ const or = 97;
8420
+ t[t.lowercaseA = or] = "lowercaseA";
8421
+ const ar = 98;
8422
+ t[t.lowercaseB = ar] = "lowercaseB";
8423
+ const cr = 99;
8424
+ t[t.lowercaseC = cr] = "lowercaseC";
8425
+ const ur = 100;
8426
+ t[t.lowercaseD = ur] = "lowercaseD";
8427
+ const lr = 101;
8428
+ t[t.lowercaseE = lr] = "lowercaseE";
8429
+ const hr = 102;
8430
+ t[t.lowercaseF = hr] = "lowercaseF";
8431
+ const fr = 103;
8432
+ t[t.lowercaseG = fr] = "lowercaseG";
8433
+ const dr = 104;
8434
+ t[t.lowercaseH = dr] = "lowercaseH";
8435
+ const mr = 105;
8436
+ t[t.lowercaseI = mr] = "lowercaseI";
8437
+ const pr = 106;
8438
+ t[t.lowercaseJ = pr] = "lowercaseJ";
8439
+ const gr = 107;
8440
+ t[t.lowercaseK = gr] = "lowercaseK";
8441
+ const yr = 108;
8442
+ t[t.lowercaseL = yr] = "lowercaseL";
8443
+ const br = 109;
8444
+ t[t.lowercaseM = br] = "lowercaseM";
8445
+ const _r = 110;
8446
+ t[t.lowercaseN = _r] = "lowercaseN";
8447
+ const kr = 111;
8448
+ t[t.lowercaseO = kr] = "lowercaseO";
8449
+ const wr = 112;
8450
+ t[t.lowercaseP = wr] = "lowercaseP";
8451
+ const vr = 113;
8452
+ t[t.lowercaseQ = vr] = "lowercaseQ";
8453
+ const Er = 114;
8454
+ t[t.lowercaseR = Er] = "lowercaseR";
8455
+ const Tr = 115;
8456
+ t[t.lowercaseS = Tr] = "lowercaseS";
8457
+ const Sr = 116;
8458
+ t[t.lowercaseT = Sr] = "lowercaseT";
8459
+ const xr = 117;
8460
+ t[t.lowercaseU = xr] = "lowercaseU";
8461
+ const Ar = 118;
8462
+ t[t.lowercaseV = Ar] = "lowercaseV";
8463
+ const Ir = 119;
8464
+ t[t.lowercaseW = Ir] = "lowercaseW";
8465
+ const Rr = 120;
8466
+ t[t.lowercaseX = Rr] = "lowercaseX";
8467
+ const Cr = 121;
8468
+ t[t.lowercaseY = Cr] = "lowercaseY";
8469
+ const Lr = 122;
8470
+ t[t.lowercaseZ = Lr] = "lowercaseZ";
8471
+ const Pr = 123;
8472
+ t[t.leftCurlyBrace = Pr] = "leftCurlyBrace";
8473
+ const Fr = 124;
8474
+ t[t.verticalBar = Fr] = "verticalBar";
8475
+ const Dr = 125;
8476
+ t[t.rightCurlyBrace = Dr] = "rightCurlyBrace";
8477
+ const Ur = 126;
8478
+ t[t.tilde = Ur] = "tilde";
8479
+ const Nr = 160;
8480
+ t[t.nonBreakingSpace = Nr] = "nonBreakingSpace";
8479
8481
  const Mr = 5760;
8480
8482
  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";
8483
+ const Or = 8232;
8484
+ t[t.lineSeparator = Or] = "lineSeparator";
8485
+ const Br = 8233;
8486
+ t[t.paragraphSeparator = Br] = "paragraphSeparator";
8485
8487
  })(p || (p = {}));
8486
- let Bn, le, he, a, C, Fo;
8488
+ let Vn, le, he, a, C, Fo;
8487
8489
  function Yt() {
8488
8490
  return Fo++;
8489
8491
  }
8490
8492
  function U1(t) {
8491
8493
  if ("pos" in t) {
8492
- const e = N1(t.pos);
8494
+ const e = M1(t.pos);
8493
8495
  t.message += ` (${e.line}:${e.column})`, t.loc = e;
8494
8496
  }
8495
8497
  return t;
8496
8498
  }
8497
- class M1 {
8499
+ class N1 {
8498
8500
  constructor(e, n) {
8499
8501
  this.line = e, this.column = n;
8500
8502
  }
8501
8503
  }
8502
- function N1(t) {
8504
+ function M1(t) {
8503
8505
  let e = 1, n = 1;
8504
8506
  for (let s = 0; s < t; s++)
8505
8507
  C.charCodeAt(s) === p.lineFeed ? (e++, n = 1) : n++;
8506
- return new M1(e, n);
8508
+ return new N1(e, n);
8507
8509
  }
8508
8510
  function O1(t, e, n, s) {
8509
- C = t, a = new Ce(), Fo = 1, Bn = e, le = n, he = s;
8511
+ C = t, a = new Ce(), Fo = 1, Vn = e, le = n, he = s;
8510
8512
  }
8511
8513
  function q(t) {
8512
8514
  return a.contextualKeyword === t;
@@ -8521,7 +8523,7 @@ function ve(t) {
8521
8523
  function we(t) {
8522
8524
  ve(t) || te();
8523
8525
  }
8524
- function Ne() {
8526
+ function Me() {
8525
8527
  return l(r.eof) || l(r.braceR) || Le();
8526
8528
  }
8527
8529
  function Le() {
@@ -8543,7 +8545,7 @@ function Do() {
8543
8545
  return !1;
8544
8546
  }
8545
8547
  function Ke() {
8546
- return _(r.semi) || Ne();
8548
+ return _(r.semi) || Me();
8547
8549
  }
8548
8550
  function ye() {
8549
8551
  Ke() || te('Unexpected token, expected ";"');
@@ -8594,9 +8596,9 @@ const Uo = [
8594
8596
  // IDEOGRAPHIC SPACE
8595
8597
  65279
8596
8598
  // ZERO WIDTH NO-BREAK SPACE
8597
- ], xi = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, Mo = new Uint8Array(65536);
8599
+ ], xi = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, No = new Uint8Array(65536);
8598
8600
  for (const t of Uo)
8599
- Mo[t] = 1;
8601
+ No[t] = 1;
8600
8602
  function B1(t) {
8601
8603
  if (t < 48) return t === 36;
8602
8604
  if (t < 58) return !0;
@@ -17983,7 +17985,7 @@ var qe;
17983
17985
  const i = s + 1;
17984
17986
  t[t.KeyAfterPropSpread = i] = "KeyAfterPropSpread";
17985
17987
  })(qe || (qe = {}));
17986
- function No(t) {
17988
+ function Mo(t) {
17987
17989
  const e = t.identifierRole;
17988
17990
  return e === z.TopLevelDeclaration || e === z.FunctionScopedDeclaration || e === z.BlockScopedDeclaration || e === z.ObjectShorthandTopLevelDeclaration || e === z.ObjectShorthandFunctionScopedDeclaration || e === z.ObjectShorthandBlockScopedDeclaration;
17989
17991
  }
@@ -18006,7 +18008,7 @@ function q1(t) {
18006
18008
  function W1(t) {
18007
18009
  return t.identifierRole === z.ObjectShorthandTopLevelDeclaration || t.identifierRole === z.ObjectShorthandBlockScopedDeclaration || t.identifierRole === z.ObjectShorthandFunctionScopedDeclaration;
18008
18010
  }
18009
- class Vn {
18011
+ class $n {
18010
18012
  constructor() {
18011
18013
  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
18014
  }
@@ -18025,10 +18027,10 @@ class Vn {
18025
18027
  // Tag for `??` operators to denote the root token for this nullish coalescing call.
18026
18028
  }
18027
18029
  function T() {
18028
- a.tokens.push(new Vn()), jo();
18030
+ a.tokens.push(new $n()), jo();
18029
18031
  }
18030
18032
  function ct() {
18031
- a.tokens.push(new Vn()), a.start = a.pos, au();
18033
+ a.tokens.push(new $n()), a.start = a.pos, au();
18032
18034
  }
18033
18035
  function H1() {
18034
18036
  a.type === r.assign && --a.pos, su();
@@ -18129,7 +18131,7 @@ function Wo() {
18129
18131
  }
18130
18132
  break;
18131
18133
  default:
18132
- if (Mo[t])
18134
+ if (No[t])
18133
18135
  ++a.pos;
18134
18136
  else
18135
18137
  return;
@@ -18450,7 +18452,7 @@ function cu() {
18450
18452
  }
18451
18453
  function Kt(t, e = t.currentIndex()) {
18452
18454
  let n = e + 1;
18453
- if (fn(t, n)) {
18455
+ if (dn(t, n)) {
18454
18456
  const s = t.identifierNameAtIndex(e);
18455
18457
  return {
18456
18458
  isType: !1,
@@ -18459,21 +18461,21 @@ function Kt(t, e = t.currentIndex()) {
18459
18461
  endIndex: n
18460
18462
  };
18461
18463
  }
18462
- if (n++, fn(t, n))
18464
+ if (n++, dn(t, n))
18463
18465
  return {
18464
18466
  isType: !0,
18465
18467
  leftName: null,
18466
18468
  rightName: null,
18467
18469
  endIndex: n
18468
18470
  };
18469
- if (n++, fn(t, n))
18471
+ if (n++, dn(t, n))
18470
18472
  return {
18471
18473
  isType: !1,
18472
18474
  leftName: t.identifierNameAtIndex(e),
18473
18475
  rightName: t.identifierNameAtIndex(e + 2),
18474
18476
  endIndex: n
18475
18477
  };
18476
- if (n++, fn(t, n))
18478
+ if (n++, dn(t, n))
18477
18479
  return {
18478
18480
  isType: !0,
18479
18481
  leftName: null,
@@ -18482,7 +18484,7 @@ function Kt(t, e = t.currentIndex()) {
18482
18484
  };
18483
18485
  throw new Error(`Unexpected import/export specifier at ${e}`);
18484
18486
  }
18485
- function fn(t, e) {
18487
+ function dn(t, e) {
18486
18488
  const n = t.tokens[e];
18487
18489
  return n.type === r.braceR || n.type === r.comma;
18488
18490
  }
@@ -19283,7 +19285,7 @@ class pt {
19283
19285
  s = i - 1;
19284
19286
  } else {
19285
19287
  const i = this.tokens.tokens[s];
19286
- if (No(i)) {
19288
+ if (Mo(i)) {
19287
19289
  const o = this.tokens.identifierNameAtIndex(s);
19288
19290
  this.identifierReplacements.set(o, `exports.${o}`);
19289
19291
  }
@@ -19470,14 +19472,14 @@ var wt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
19470
19472
  return x(W[1], W[2] || "", W[3], W[4] || "", W[5] || "/", W[6] || "", W[7] || "");
19471
19473
  }
19472
19474
  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] || "");
19475
+ const W = i.exec(L), N = W[2];
19476
+ return x("file:", "", W[1] || "", "", u(N) ? N : "/" + N, W[3] || "", W[4] || "");
19475
19477
  }
19476
- function x(L, W, M, J, se, ie, H) {
19478
+ function x(L, W, N, J, se, ie, H) {
19477
19479
  return {
19478
19480
  scheme: L,
19479
19481
  user: W,
19480
- host: M,
19482
+ host: N,
19481
19483
  port: J,
19482
19484
  path: se,
19483
19485
  query: ie,
@@ -19487,12 +19489,12 @@ var wt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
19487
19489
  }
19488
19490
  function w(L) {
19489
19491
  if (c(L)) {
19490
- const M = m("http:" + L);
19491
- return M.scheme = "", M.type = 6, M;
19492
+ const N = m("http:" + L);
19493
+ return N.scheme = "", N.type = 6, N;
19492
19494
  }
19493
19495
  if (u(L)) {
19494
- const M = m("http://foo.com" + L);
19495
- return M.scheme = "", M.host = "", M.type = 5, M;
19496
+ const N = m("http://foo.com" + L);
19497
+ return N.scheme = "", N.host = "", N.type = 5, N;
19496
19498
  }
19497
19499
  if (f(L))
19498
19500
  return g(L);
@@ -19511,7 +19513,7 @@ var wt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
19511
19513
  $(W, W.type), L.path === "/" ? L.path = W.path : L.path = D(W.path) + L.path;
19512
19514
  }
19513
19515
  function $(L, W) {
19514
- const M = W <= 4, J = L.path.split("/");
19516
+ const N = W <= 4, J = L.path.split("/");
19515
19517
  let se = 1, ie = 0, H = !1;
19516
19518
  for (let b = 1; b < J.length; b++) {
19517
19519
  const y = J[b];
@@ -19521,7 +19523,7 @@ var wt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
19521
19523
  }
19522
19524
  if (H = !1, y !== ".") {
19523
19525
  if (y === "..") {
19524
- ie ? (H = !0, ie--, se--) : M && (J[se++] = y);
19526
+ ie ? (H = !0, ie--, se--) : N && (J[se++] = y);
19525
19527
  continue;
19526
19528
  }
19527
19529
  J[se++] = y, ie++;
@@ -19535,39 +19537,39 @@ var wt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
19535
19537
  function K(L, W) {
19536
19538
  if (!L && !W)
19537
19539
  return "";
19538
- const M = w(L);
19539
- let J = M.type;
19540
+ const N = w(L);
19541
+ let J = N.type;
19540
19542
  if (W && J !== 7) {
19541
19543
  const ie = w(W), H = ie.type;
19542
19544
  switch (J) {
19543
19545
  case 1:
19544
- M.hash = ie.hash;
19546
+ N.hash = ie.hash;
19545
19547
  case 2:
19546
- M.query = ie.query;
19548
+ N.query = ie.query;
19547
19549
  case 3:
19548
19550
  case 4:
19549
- V(M, ie);
19551
+ V(N, ie);
19550
19552
  case 5:
19551
- M.user = ie.user, M.host = ie.host, M.port = ie.port;
19553
+ N.user = ie.user, N.host = ie.host, N.port = ie.port;
19552
19554
  case 6:
19553
- M.scheme = ie.scheme;
19555
+ N.scheme = ie.scheme;
19554
19556
  }
19555
19557
  H > J && (J = H);
19556
19558
  }
19557
- $(M, J);
19558
- const se = M.query + M.hash;
19559
+ $(N, J);
19560
+ const se = N.query + N.hash;
19559
19561
  switch (J) {
19560
19562
  case 2:
19561
19563
  case 3:
19562
19564
  return se;
19563
19565
  case 4: {
19564
- const ie = M.path.slice(1);
19566
+ const ie = N.path.slice(1);
19565
19567
  return ie ? h(W || L) && !h(ie) ? "./" + ie + se : ie + se : se || ".";
19566
19568
  }
19567
19569
  case 5:
19568
- return M.path + se;
19570
+ return N.path + se;
19569
19571
  default:
19570
- return M.scheme + "//" + M.user + M.host + M.port + M.path + se;
19572
+ return N.scheme + "//" + N.user + N.host + N.port + N.path + se;
19571
19573
  }
19572
19574
  }
19573
19575
  return K;
@@ -19683,8 +19685,8 @@ function Uu(t, e, n, s, i, o) {
19683
19685
  const c = t[e - 1];
19684
19686
  return c.length === 1 ? !1 : n === c[Eu] && s === c[Tu] && i === c[Su] && o === (c.length === 5 ? c[xu] : ea);
19685
19687
  }
19686
- function Mu({ code: t, mappings: e }, n, s, i, o) {
19687
- const c = Nu(i, o), u = new Au({ file: s.compiledFilename });
19688
+ function Nu({ code: t, mappings: e }, n, s, i, o) {
19689
+ const c = Mu(i, o), u = new Au({ file: s.compiledFilename });
19688
19690
  let f = 0, h = e[0];
19689
19691
  for (; h === void 0 && f < e.length - 1; )
19690
19692
  f++, h = e[f];
@@ -19701,7 +19703,7 @@ function Mu({ code: t, mappings: e }, n, s, i, o) {
19701
19703
  const { sourceRoot: x, sourcesContent: w, ...D } = Ru(u);
19702
19704
  return D;
19703
19705
  }
19704
- function Nu(t, e) {
19706
+ function Mu(t, e) {
19705
19707
  const n = new Array(e.length);
19706
19708
  let s = 0, i = e[s].start, o = 0;
19707
19709
  for (let c = 0; c < t.length; c++)
@@ -19834,7 +19836,7 @@ const Ou = {
19834
19836
  }
19835
19837
  `
19836
19838
  };
19837
- class An {
19839
+ class In {
19838
19840
  __init() {
19839
19841
  this.helperNames = {};
19840
19842
  }
@@ -19842,7 +19844,7 @@ class An {
19842
19844
  this.createRequireName = null;
19843
19845
  }
19844
19846
  constructor(e) {
19845
- this.nameManager = e, An.prototype.__init.call(this), An.prototype.__init2.call(this);
19847
+ this.nameManager = e, In.prototype.__init.call(this), In.prototype.__init2.call(this);
19846
19848
  }
19847
19849
  getHelperName(e) {
19848
19850
  let n = this.helperNames[e];
@@ -20259,10 +20261,10 @@ var Wu = (
20259
20261
  }(s)
20260
20262
  );
20261
20263
  t.TEnumType = W;
20262
- function M(k, S) {
20264
+ function N(k, S) {
20263
20265
  return new J(k, S);
20264
20266
  }
20265
- t.enumlit = M;
20267
+ t.enumlit = N;
20266
20268
  var J = (
20267
20269
  /** @class */
20268
20270
  function(k) {
@@ -20384,7 +20386,7 @@ var Wu = (
20384
20386
  function B(k) {
20385
20387
  for (var S = [], I = 1; I < arguments.length; I++)
20386
20388
  S[I - 1] = arguments[I];
20387
- return new G(new N(S), i(k));
20389
+ return new G(new M(S), i(k));
20388
20390
  }
20389
20391
  t.func = B;
20390
20392
  var G = (
@@ -20417,7 +20419,7 @@ var Wu = (
20417
20419
  }()
20418
20420
  );
20419
20421
  t.TParam = R;
20420
- var N = (
20422
+ var M = (
20421
20423
  /** @class */
20422
20424
  function(k) {
20423
20425
  e(S, k);
@@ -20452,7 +20454,7 @@ var Wu = (
20452
20454
  }, S;
20453
20455
  }(s)
20454
20456
  );
20455
- t.TParamList = N;
20457
+ t.TParamList = M;
20456
20458
  var P = (
20457
20459
  /** @class */
20458
20460
  function(k) {
@@ -20720,19 +20722,19 @@ function ra() {
20720
20722
  T(), xe(!1);
20721
20723
  }
20722
20724
  function sa(t) {
20723
- T(), $n(t);
20725
+ T(), jn(t);
20724
20726
  }
20725
20727
  function ft(t) {
20726
20728
  Q(), Ds(t);
20727
20729
  }
20728
- function In() {
20730
+ function Rn() {
20729
20731
  Q(), a.tokens[a.tokens.length - 1].identifierRole = z.ImportDeclaration;
20730
20732
  }
20731
20733
  function Ds(t) {
20732
20734
  let e;
20733
20735
  a.scopeDepth === 0 ? e = z.TopLevelDeclaration : t ? e = z.BlockScopedDeclaration : e = z.FunctionScopedDeclaration, a.tokens[a.tokens.length - 1].identifierRole = e;
20734
20736
  }
20735
- function $n(t) {
20737
+ function jn(t) {
20736
20738
  switch (a.type) {
20737
20739
  case r._this: {
20738
20740
  const e = re(0);
@@ -20775,13 +20777,13 @@ function Us(t, e, n = !1, s = !1, i = 0) {
20775
20777
  }
20776
20778
  }
20777
20779
  function Zu(t, e) {
20778
- t && Ms([
20780
+ t && Ns([
20779
20781
  d._public,
20780
20782
  d._protected,
20781
20783
  d._private,
20782
20784
  d._readonly,
20783
20785
  d._override
20784
- ]), Rn(e), ia(), Rn(
20786
+ ]), Cn(e), ia(), Cn(
20785
20787
  e,
20786
20788
  !0
20787
20789
  /* leftAlreadyParsed */
@@ -20790,8 +20792,8 @@ function Zu(t, e) {
20790
20792
  function ia() {
20791
20793
  he ? gf() : le && ih();
20792
20794
  }
20793
- function Rn(t, e = !1) {
20794
- if (e || $n(t), !_(r.eq))
20795
+ function Cn(t, e = !1) {
20796
+ if (e || jn(t), !_(r.eq))
20795
20797
  return;
20796
20798
  const n = a.tokens.length - 1;
20797
20799
  xe(), a.tokens[n].rhsEndIndex = a.tokens.length;
@@ -20806,7 +20808,7 @@ function oa() {
20806
20808
  const t = a.snapshot();
20807
20809
  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
20810
  }
20809
- function Ms(t) {
20811
+ function Ns(t) {
20810
20812
  for (; aa(t) !== null; )
20811
20813
  ;
20812
20814
  }
@@ -20850,7 +20852,7 @@ function on() {
20850
20852
  Q();
20851
20853
  }
20852
20854
  function Ju() {
20853
- on(), !Le() && l(r.lessThan) && Mt();
20855
+ on(), !Le() && l(r.lessThan) && Nt();
20854
20856
  }
20855
20857
  function el() {
20856
20858
  T(), an();
@@ -20859,10 +20861,10 @@ function tl() {
20859
20861
  T();
20860
20862
  }
20861
20863
  function nl() {
20862
- E(r._typeof), l(r._import) ? ca() : on(), !Le() && l(r.lessThan) && Mt();
20864
+ E(r._typeof), l(r._import) ? ca() : on(), !Le() && l(r.lessThan) && Nt();
20863
20865
  }
20864
20866
  function ca() {
20865
- E(r._import), E(r.parenL), E(r.string), E(r.parenR), _(r.dot) && on(), l(r.lessThan) && Mt();
20867
+ E(r._import), E(r.parenL), E(r.string), E(r.parenR), _(r.dot) && on(), l(r.lessThan) && Nt();
20866
20868
  }
20867
20869
  function rl() {
20868
20870
  _(r._const);
@@ -20870,15 +20872,15 @@ function rl() {
20870
20872
  _(r._const), (t || e) && !l(r.name) ? a.tokens[a.tokens.length - 1].type = r.name : Q(), _(r._extends) && _e(), _(r.eq) && _e();
20871
20873
  }
20872
20874
  function xt() {
20873
- l(r.lessThan) && jn();
20875
+ l(r.lessThan) && qn();
20874
20876
  }
20875
- function jn() {
20877
+ function qn() {
20876
20878
  const t = re(0);
20877
20879
  for (l(r.lessThan) || l(r.typeParameterStart) ? T() : te(); !_(r.greaterThan) && !a.error; )
20878
20880
  rl(), _(r.comma);
20879
20881
  ne(t);
20880
20882
  }
20881
- function Ns(t) {
20883
+ function Ms(t) {
20882
20884
  const e = t === r.arrow;
20883
20885
  xt(), E(r.parenL), a.scopeDepth++, sl(
20884
20886
  !1
@@ -20888,11 +20890,11 @@ function Ns(t) {
20888
20890
  function sl(t) {
20889
20891
  Us(r.parenR, t);
20890
20892
  }
20891
- function Cn() {
20893
+ function Ln() {
20892
20894
  _(r.comma) || ye();
20893
20895
  }
20894
- function Mi() {
20895
- Ns(r.colon), Cn();
20896
+ function Ni() {
20897
+ Ms(r.colon), Ln();
20896
20898
  }
20897
20899
  function il() {
20898
20900
  const t = a.snapshot();
@@ -20904,25 +20906,25 @@ function ua() {
20904
20906
  if (!(l(r.bracketL) && il()))
20905
20907
  return !1;
20906
20908
  const t = re(0);
20907
- return E(r.bracketL), Q(), an(), E(r.bracketR), Ut(), Cn(), ne(t), !0;
20909
+ return E(r.bracketL), Q(), an(), E(r.bracketR), Ut(), Ln(), ne(t), !0;
20908
20910
  }
20909
- function Ni(t) {
20910
- _(r.question), !t && (l(r.parenL) || l(r.lessThan)) ? (Ns(r.colon), Cn()) : (Ut(), Cn());
20911
+ function Mi(t) {
20912
+ _(r.question), !t && (l(r.parenL) || l(r.lessThan)) ? (Ms(r.colon), Ln()) : (Ut(), Ln());
20911
20913
  }
20912
20914
  function ol() {
20913
20915
  if (l(r.parenL) || l(r.lessThan)) {
20914
- Mi();
20916
+ Ni();
20915
20917
  return;
20916
20918
  }
20917
20919
  if (l(r._new)) {
20918
- T(), l(r.parenL) || l(r.lessThan) ? Mi() : Ni(!1);
20920
+ T(), l(r.parenL) || l(r.lessThan) ? Ni() : Mi(!1);
20919
20921
  return;
20920
20922
  }
20921
20923
  const t = !!aa([d._readonly]);
20922
20924
  ua() || ((q(d._get) || q(d._set)) && oa(), Qt(
20923
20925
  -1
20924
20926
  /* Types don't need context IDs. */
20925
- ), Ni(t));
20927
+ ), Mi(t));
20926
20928
  }
20927
20929
  function al() {
20928
20930
  la();
@@ -20970,7 +20972,7 @@ var ut;
20970
20972
  function Zr(t) {
20971
20973
  t === ut.TSAbstractConstructorType && we(d._abstract), (t === ut.TSConstructorType || t === ut.TSAbstractConstructorType) && E(r._new);
20972
20974
  const e = a.inDisallowConditionalTypesContext;
20973
- a.inDisallowConditionalTypesContext = !1, Ns(r.arrow), a.inDisallowConditionalTypesContext = e;
20975
+ a.inDisallowConditionalTypesContext = !1, Ms(r.arrow), a.inDisallowConditionalTypesContext = e;
20974
20976
  }
20975
20977
  function gl() {
20976
20978
  switch (a.type) {
@@ -21138,7 +21140,7 @@ function ha() {
21138
21140
  Cl(), _(r.comma);
21139
21141
  }
21140
21142
  function Cl() {
21141
- on(), l(r.lessThan) && Mt();
21143
+ on(), l(r.lessThan) && Nt();
21142
21144
  }
21143
21145
  function Ll() {
21144
21146
  ft(!1), xt(), _(r._extends) && ha(), la();
@@ -21157,7 +21159,7 @@ function Os() {
21157
21159
  Fl(), _(r.comma);
21158
21160
  }
21159
21161
  function Bs() {
21160
- E(r.braceL), Gn(
21162
+ E(r.braceL), Xn(
21161
21163
  /* end */
21162
21164
  r.braceR
21163
21165
  );
@@ -21169,18 +21171,18 @@ function fa() {
21169
21171
  q(d._global) ? Q() : l(r.string) ? rt() : te(), l(r.braceL) ? Bs() : ye();
21170
21172
  }
21171
21173
  function hs() {
21172
- In(), E(r.eq), Ul(), ye();
21174
+ Rn(), E(r.eq), Ul(), ye();
21173
21175
  }
21174
21176
  function Dl() {
21175
21177
  return q(d._require) && be() === r.parenL;
21176
21178
  }
21177
21179
  function Ul() {
21178
- Dl() ? Ml() : on();
21180
+ Dl() ? Nl() : on();
21179
21181
  }
21180
- function Ml() {
21182
+ function Nl() {
21181
21183
  we(d._require), E(r.parenL), l(r.string) || te(), Dt(), E(r.parenR);
21182
21184
  }
21183
- function Nl() {
21185
+ function Ml() {
21184
21186
  if (Ke())
21185
21187
  return !1;
21186
21188
  switch (a.type) {
@@ -21211,12 +21213,12 @@ function Nl() {
21211
21213
  case r._var:
21212
21214
  case r._let: {
21213
21215
  const t = re(1);
21214
- return yn(a.type !== r._var), ne(t), !0;
21216
+ return bn(a.type !== r._var), ne(t), !0;
21215
21217
  }
21216
21218
  case r.name: {
21217
21219
  const t = re(1), e = a.contextualKeyword;
21218
21220
  let n = !1;
21219
- return e === d._global ? (fa(), n = !0) : n = qn(
21221
+ return e === d._global ? (fa(), n = !0) : n = Wn(
21220
21222
  e,
21221
21223
  /* isBeforeToken */
21222
21224
  !0
@@ -21227,7 +21229,7 @@ function Nl() {
21227
21229
  }
21228
21230
  }
21229
21231
  function Vi() {
21230
- return qn(
21232
+ return Wn(
21231
21233
  a.contextualKeyword,
21232
21234
  /* isBeforeToken */
21233
21235
  !0
@@ -21237,7 +21239,7 @@ function Ol(t) {
21237
21239
  switch (t) {
21238
21240
  case d._declare: {
21239
21241
  const e = a.tokens.length - 1;
21240
- if (Nl())
21242
+ if (Ml())
21241
21243
  return a.tokens[e].type = r._declare, !0;
21242
21244
  break;
21243
21245
  }
@@ -21246,7 +21248,7 @@ function Ol(t) {
21246
21248
  return Bs(), !0;
21247
21249
  break;
21248
21250
  default:
21249
- return qn(
21251
+ return Wn(
21250
21252
  t,
21251
21253
  /* isBeforeToken */
21252
21254
  !1
@@ -21254,7 +21256,7 @@ function Ol(t) {
21254
21256
  }
21255
21257
  return !1;
21256
21258
  }
21257
- function qn(t, e) {
21259
+ function Wn(t, e) {
21258
21260
  switch (t) {
21259
21261
  case d._abstract:
21260
21262
  if (Rt(e) && l(r._class))
@@ -21306,12 +21308,12 @@ function Rt(t) {
21306
21308
  }
21307
21309
  function Bl() {
21308
21310
  const t = a.snapshot();
21309
- return jn(), Nt(), Tl(), E(r.arrow), a.error ? (a.restoreFromSnapshot(t), !1) : (un(!0), !0);
21311
+ return qn(), Mt(), Tl(), E(r.arrow), a.error ? (a.restoreFromSnapshot(t), !1) : (un(!0), !0);
21310
21312
  }
21311
21313
  function Vs() {
21312
- a.type === r.bitShiftL && (a.pos -= 1, ee(r.lessThan)), Mt();
21314
+ a.type === r.bitShiftL && (a.pos -= 1, ee(r.lessThan)), Nt();
21313
21315
  }
21314
- function Mt() {
21316
+ function Nt() {
21315
21317
  const t = re(0);
21316
21318
  for (E(r.lessThan); !l(r.greaterThan) && !a.error; )
21317
21319
  _e(), _(r.comma);
@@ -21360,7 +21362,7 @@ function $l(t, e, n) {
21360
21362
  a.restoreFromSnapshot(s);
21361
21363
  else
21362
21364
  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());
21365
+ } 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
21366
  js(t, e, n);
21365
21367
  }
21366
21368
  function jl() {
@@ -21411,7 +21413,7 @@ function Hl() {
21411
21413
  return a.type = r._abstract, T(), Tt(!0, !0), !0;
21412
21414
  if (q(d._interface)) {
21413
21415
  const t = re(2);
21414
- return qn(d._interface, !0), ne(t), !0;
21416
+ return Wn(d._interface, !0), ne(t), !0;
21415
21417
  }
21416
21418
  return !1;
21417
21419
  }
@@ -21425,7 +21427,7 @@ function Gl() {
21425
21427
  }
21426
21428
  function Xl(t) {
21427
21429
  const e = a.tokens.length;
21428
- Ms([
21430
+ Ns([
21429
21431
  d._abstract,
21430
21432
  d._readonly,
21431
21433
  d._declare,
@@ -21482,7 +21484,7 @@ function eh() {
21482
21484
  l(r.colon) && an();
21483
21485
  }
21484
21486
  function th(t, e) {
21485
- return Bn ? nh(t, e) : rh(t, e);
21487
+ return Vn ? nh(t, e) : rh(t, e);
21486
21488
  }
21487
21489
  function nh(t, e) {
21488
21490
  if (!l(r.lessThan))
@@ -21493,13 +21495,13 @@ function nh(t, e) {
21493
21495
  a.restoreFromSnapshot(n);
21494
21496
  else
21495
21497
  return s;
21496
- return a.type = r.typeParameterStart, jn(), s = Qe(t, e), s || te(), s;
21498
+ return a.type = r.typeParameterStart, qn(), s = Qe(t, e), s || te(), s;
21497
21499
  }
21498
21500
  function rh(t, e) {
21499
21501
  if (!l(r.lessThan))
21500
21502
  return Qe(t, e);
21501
21503
  const n = a.snapshot();
21502
- jn();
21504
+ qn();
21503
21505
  const s = Qe(t, e);
21504
21506
  if (s || te(), a.error)
21505
21507
  a.restoreFromSnapshot(n);
@@ -21510,7 +21512,7 @@ function rh(t, e) {
21510
21512
  function sh() {
21511
21513
  if (l(r.colon)) {
21512
21514
  const t = a.snapshot();
21513
- Zt(r.colon), Ne() && te(), l(r.arrow) || te(), a.error && a.restoreFromSnapshot(t);
21515
+ Zt(r.colon), Me() && te(), l(r.arrow) || te(), a.error && a.restoreFromSnapshot(t);
21514
21516
  }
21515
21517
  return _(r.arrow);
21516
21518
  }
@@ -21658,7 +21660,7 @@ function ya() {
21658
21660
  Ve(), ga();
21659
21661
  }
21660
21662
  function Ve() {
21661
- a.tokens.push(new Vn()), Wo(), a.start = a.pos;
21663
+ a.tokens.push(new $n()), Wo(), a.start = a.pos;
21662
21664
  const t = C.charCodeAt(a.pos);
21663
21665
  if (rn[t])
21664
21666
  uh();
@@ -21692,7 +21694,7 @@ function Ve() {
21692
21694
  }
21693
21695
  }
21694
21696
  function Ct() {
21695
- a.tokens.push(new Vn()), a.start = a.pos, ah();
21697
+ a.tokens.push(new $n()), a.start = a.pos, ah();
21696
21698
  }
21697
21699
  function mh(t) {
21698
21700
  if (l(r.question)) {
@@ -21736,12 +21738,12 @@ function ba(t) {
21736
21738
  }
21737
21739
  function _h(t) {
21738
21740
  const e = a.tokens.length;
21739
- return cn() ? !0 : (pn(e, -1, t), !1);
21741
+ return cn() ? !0 : (gn(e, -1, t), !1);
21740
21742
  }
21741
- function pn(t, e, n) {
21743
+ function gn(t, e, n) {
21742
21744
  if (le && (r._in & r.PRECEDENCE_MASK) > e && !Le() && (ve(d._as) || ve(d._satisfies))) {
21743
21745
  const i = re(1);
21744
- _e(), ne(i), Go(), pn(t, e, n);
21746
+ _e(), ne(i), Go(), gn(t, e, n);
21745
21747
  return;
21746
21748
  }
21747
21749
  const s = a.type & r.PRECEDENCE_MASK;
@@ -21749,11 +21751,11 @@ function pn(t, e, n) {
21749
21751
  const i = a.type;
21750
21752
  T(), i === r.nullishCoalescing && (a.tokens[a.tokens.length - 1].nullishStartIndex = t);
21751
21753
  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);
21754
+ 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
21755
  }
21754
21756
  }
21755
21757
  function cn() {
21756
- if (le && !Bn && _(r.lessThan))
21758
+ if (le && !Vn && _(r.lessThan))
21757
21759
  return Il(), !1;
21758
21760
  if (q(d._module) && $o() === p.leftCurlyBrace && !Do())
21759
21761
  return Fh(), !1;
@@ -21761,7 +21763,7 @@ function cn() {
21761
21763
  return T(), cn(), !1;
21762
21764
  if (_a())
21763
21765
  return !0;
21764
- for (; a.type & r.IS_POSTFIX && !Ne(); )
21766
+ for (; a.type & r.IS_POSTFIX && !Me(); )
21765
21767
  a.type === r.preIncDec && (a.type = r.postIncDec), T();
21766
21768
  return !1;
21767
21769
  }
@@ -21789,9 +21791,9 @@ function js(t, e, n) {
21789
21791
  n.stop = !0;
21790
21792
  return;
21791
21793
  }
21792
- T(), a.tokens[a.tokens.length - 1].subscriptStartIndex = t, _(r.bracketL) ? (Se(), E(r.bracketR)) : _(r.parenL) ? lt() : Ln();
21794
+ T(), a.tokens[a.tokens.length - 1].subscriptStartIndex = t, _(r.bracketL) ? (Se(), E(r.bracketR)) : _(r.parenL) ? lt() : Pn();
21793
21795
  } else if (_(r.dot))
21794
- a.tokens[a.tokens.length - 1].subscriptStartIndex = t, Ln();
21796
+ a.tokens[a.tokens.length - 1].subscriptStartIndex = t, Pn();
21795
21797
  else if (_(r.bracketL))
21796
21798
  a.tokens[a.tokens.length - 1].subscriptStartIndex = t, Se(), E(r.bracketR);
21797
21799
  else if (!e && l(r.parenL))
@@ -21799,7 +21801,7 @@ function js(t, e, n) {
21799
21801
  const s = a.snapshot(), i = a.tokens.length;
21800
21802
  T(), a.tokens[a.tokens.length - 1].subscriptStartIndex = t;
21801
21803
  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));
21804
+ 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
21805
  } else {
21804
21806
  T(), a.tokens[a.tokens.length - 1].subscriptStartIndex = t;
21805
21807
  const s = Yt();
@@ -21808,7 +21810,7 @@ function js(t, e, n) {
21808
21810
  else l(r.backQuote) ? Hs() : n.stop = !0;
21809
21811
  }
21810
21812
  function wa() {
21811
- return a.tokens[a.tokens.length - 1].contextualKeyword === d._async && !Ne();
21813
+ return a.tokens[a.tokens.length - 1].contextualKeyword === d._async && !Me();
21812
21814
  }
21813
21815
  function lt() {
21814
21816
  let t = !0;
@@ -21835,7 +21837,7 @@ function rt() {
21835
21837
  return Q(), !1;
21836
21838
  if (l(r.jsxText) || l(r.jsxEmptyText))
21837
21839
  return Dt(), !1;
21838
- if (l(r.lessThan) && Bn)
21840
+ if (l(r.lessThan) && Vn)
21839
21841
  return a.type = r.jsxTagStart, ya(), T(), !1;
21840
21842
  const t = a.potentialArrowAt === a.start;
21841
21843
  switch (a.type) {
@@ -21857,7 +21859,7 @@ function rt() {
21857
21859
  return T(), l(r.dot) && (a.tokens[a.tokens.length - 1].type = r.name, T(), Q()), !1;
21858
21860
  case r.name: {
21859
21861
  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);
21862
+ 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
21863
  }
21862
21864
  case r._do:
21863
21865
  return T(), ht(), !1;
@@ -21881,13 +21883,13 @@ function rt() {
21881
21883
  return T(), qs(), !1;
21882
21884
  case r.hash: {
21883
21885
  const e = $o();
21884
- return rn[e] || e === p.backslash ? Ln() : T(), !1;
21886
+ return rn[e] || e === p.backslash ? Pn() : T(), !1;
21885
21887
  }
21886
21888
  default:
21887
21889
  return te(), !1;
21888
21890
  }
21889
21891
  }
21890
- function Ln() {
21892
+ function Pn() {
21891
21893
  _(r.hash), Q();
21892
21894
  }
21893
21895
  function Eh() {
@@ -21897,7 +21899,7 @@ function Eh() {
21897
21899
  function Dt() {
21898
21900
  T();
21899
21901
  }
21900
- function Wn() {
21902
+ function Hn() {
21901
21903
  E(r.parenL), Se(), E(r.parenR);
21902
21904
  }
21903
21905
  function va(t) {
@@ -21918,10 +21920,10 @@ function va(t) {
21918
21920
  } else
21919
21921
  xe(!1, !0);
21920
21922
  }
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;
21923
+ 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
21924
  }
21923
21925
  function Th() {
21924
- return l(r.colon) || !Ne();
21926
+ return l(r.colon) || !Me();
21925
21927
  }
21926
21928
  function ds() {
21927
21929
  return le ? sh() : he ? Ef() : _(r.arrow);
@@ -21984,23 +21986,23 @@ function Ih(t, e) {
21984
21986
  }
21985
21987
  function Rh(t, e) {
21986
21988
  if (_(r.colon)) {
21987
- t ? Rn(e) : xe(!1);
21989
+ t ? Cn(e) : xe(!1);
21988
21990
  return;
21989
21991
  }
21990
21992
  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);
21993
+ 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
21994
  }
21993
21995
  function Ch(t, e, n) {
21994
21996
  le ? Zl() : he && pf(), Ih(t, n) || Rh(t, e);
21995
21997
  }
21996
21998
  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);
21999
+ 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
22000
  }
21999
22001
  function ms(t, e) {
22000
22002
  const n = Yt();
22001
22003
  a.scopeDepth++;
22002
22004
  const s = a.tokens.length;
22003
- Nt(e, n), Ea(t, n);
22005
+ Mt(e, n), Ea(t, n);
22004
22006
  const o = a.tokens.length;
22005
22007
  a.scopes.push(new Je(s, o, !0)), a.scopeDepth--;
22006
22008
  }
@@ -22034,24 +22036,24 @@ function Lh() {
22034
22036
  cn();
22035
22037
  }
22036
22038
  function Ph() {
22037
- T(), !l(r.semi) && !Ne() && (_(r.star), xe());
22039
+ T(), !l(r.semi) && !Me() && (_(r.star), xe());
22038
22040
  }
22039
22041
  function Fh() {
22040
- we(d._module), E(r.braceL), Gn(r.braceR);
22042
+ we(d._module), E(r.braceL), Xn(r.braceR);
22041
22043
  }
22042
22044
  function Dh(t) {
22043
22045
  return (t.type === r.name || !!(t.type & r.IS_KEYWORD)) && t.contextualKeyword !== d._from;
22044
22046
  }
22045
22047
  function et(t) {
22046
22048
  const e = re(0);
22047
- E(t || r.colon), Me(), ne(e);
22049
+ E(t || r.colon), Ne(), ne(e);
22048
22050
  }
22049
22051
  function $i() {
22050
22052
  E(r.modulo), we(d._checks), _(r.parenL) && (Se(), E(r.parenR));
22051
22053
  }
22052
22054
  function Xs() {
22053
22055
  const t = re(0);
22054
- E(r.colon), l(r.modulo) ? $i() : (Me(), l(r.modulo) && $i()), ne(t);
22056
+ E(r.colon), l(r.modulo) ? $i() : (Ne(), l(r.modulo) && $i()), ne(t);
22055
22057
  }
22056
22058
  function Uh() {
22057
22059
  T(), zs(
@@ -22059,13 +22061,13 @@ function Uh() {
22059
22061
  !0
22060
22062
  );
22061
22063
  }
22062
- function Mh() {
22064
+ function Nh() {
22063
22065
  T(), Q(), l(r.lessThan) && Xe(), E(r.parenL), gs(), E(r.parenR), Xs(), ye();
22064
22066
  }
22065
22067
  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();
22068
+ 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
22069
  }
22068
- function Nh() {
22070
+ function Mh() {
22069
22071
  T(), Ra(), ye();
22070
22072
  }
22071
22073
  function Oh() {
@@ -22074,14 +22076,14 @@ function Oh() {
22074
22076
  E(r.braceR);
22075
22077
  }
22076
22078
  function Bh() {
22077
- E(r._export), _(r._default) ? l(r._function) || l(r._class) ? ps() : (Me(), ye()) : l(r._var) || // declare export var ...
22079
+ E(r._export), _(r._default) ? l(r._function) || l(r._class) ? ps() : (Ne(), ye()) : l(r._var) || // declare export var ...
22078
22080
  l(r._function) || // declare export function ...
22079
22081
  l(r._class) || // declare export class ...
22080
22082
  q(d._opaque) ? ps() : l(r.star) || // declare export * from ''
22081
22083
  l(r.braceL) || // declare export {} ...
22082
22084
  q(d._interface) || // declare export interface ...
22083
22085
  q(d._type) || // declare export type ...
22084
- q(d._opaque) ? Na() : te();
22086
+ q(d._opaque) ? Ma() : te();
22085
22087
  }
22086
22088
  function Vh() {
22087
22089
  we(d._exports), At(), ye();
@@ -22096,41 +22098,41 @@ function qh() {
22096
22098
  T(), zs();
22097
22099
  }
22098
22100
  function zs(t = !1) {
22099
- if (Hn(), l(r.lessThan) && Xe(), _(r._extends))
22101
+ if (Gn(), l(r.lessThan) && Xe(), _(r._extends))
22100
22102
  do
22101
- gn();
22103
+ yn();
22102
22104
  while (!t && _(r.comma));
22103
22105
  if (q(d._mixins)) {
22104
22106
  T();
22105
22107
  do
22106
- gn();
22108
+ yn();
22107
22109
  while (_(r.comma));
22108
22110
  }
22109
22111
  if (q(d._implements)) {
22110
22112
  T();
22111
22113
  do
22112
- gn();
22114
+ yn();
22113
22115
  while (_(r.comma));
22114
22116
  }
22115
- Pn(t, !1, t);
22117
+ Fn(t, !1, t);
22116
22118
  }
22117
- function gn() {
22119
+ function yn() {
22118
22120
  xa(!1), l(r.lessThan) && vt();
22119
22121
  }
22120
22122
  function Ys() {
22121
22123
  zs();
22122
22124
  }
22123
- function Hn() {
22125
+ function Gn() {
22124
22126
  Q();
22125
22127
  }
22126
22128
  function Ks() {
22127
- Hn(), l(r.lessThan) && Xe(), et(r.eq), ye();
22129
+ Gn(), l(r.lessThan) && Xe(), et(r.eq), ye();
22128
22130
  }
22129
22131
  function Zs(t) {
22130
- we(d._type), Hn(), l(r.lessThan) && Xe(), l(r.colon) && et(r.colon), t || et(r.eq), ye();
22132
+ we(d._type), Gn(), l(r.lessThan) && Xe(), l(r.colon) && et(r.colon), t || et(r.eq), ye();
22131
22133
  }
22132
22134
  function Wh() {
22133
- ei(), Ra(), _(r.eq) && Me();
22135
+ ei(), Ra(), _(r.eq) && Ne();
22134
22136
  }
22135
22137
  function Xe() {
22136
22138
  const t = re(0);
@@ -22143,34 +22145,34 @@ function Xe() {
22143
22145
  function vt() {
22144
22146
  const t = re(0);
22145
22147
  for (E(r.lessThan); !l(r.greaterThan) && !a.error; )
22146
- Me(), l(r.greaterThan) || E(r.comma);
22148
+ Ne(), l(r.greaterThan) || E(r.comma);
22147
22149
  E(r.greaterThan), ne(t);
22148
22150
  }
22149
22151
  function Hh() {
22150
22152
  if (we(d._interface), _(r._extends))
22151
22153
  do
22152
- gn();
22154
+ yn();
22153
22155
  while (_(r.comma));
22154
- Pn(!1, !1, !1);
22156
+ Fn(!1, !1, !1);
22155
22157
  }
22156
22158
  function Qs() {
22157
22159
  l(r.num) || l(r.string) ? rt() : Q();
22158
22160
  }
22159
22161
  function Gh() {
22160
- be() === r.colon ? (Qs(), et()) : Me(), E(r.bracketR), et();
22162
+ be() === r.colon ? (Qs(), et()) : Ne(), E(r.bracketR), et();
22161
22163
  }
22162
22164
  function Xh() {
22163
22165
  Qs(), E(r.bracketR), E(r.bracketR), l(r.lessThan) || l(r.parenL) ? Js() : (_(r.question), et());
22164
22166
  }
22165
22167
  function Js() {
22166
22168
  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();
22169
+ Dn(), l(r.parenR) || E(r.comma);
22170
+ _(r.ellipsis) && Dn(), E(r.parenR), et();
22169
22171
  }
22170
22172
  function zh() {
22171
22173
  Js();
22172
22174
  }
22173
- function Pn(t, e, n) {
22175
+ function Fn(t, e, n) {
22174
22176
  let s;
22175
22177
  for (e && l(r.braceBarL) ? (E(r.braceBarL), s = r.braceBarR) : (E(r.braceL), s = r.braceR); !l(s) && !a.error; ) {
22176
22178
  if (n && q(d._proto)) {
@@ -22200,7 +22202,7 @@ function Yh() {
22200
22202
  if (l(r.ellipsis)) {
22201
22203
  if (E(r.ellipsis), _(r.comma) || _(r.semi), l(r.braceR))
22202
22204
  return;
22203
- Me();
22205
+ Ne();
22204
22206
  } else
22205
22207
  Qs(), l(r.lessThan) || l(r.parenL) ? Js() : (_(r.question), et());
22206
22208
  }
@@ -22218,18 +22220,18 @@ function Qh() {
22218
22220
  E(r._typeof), Aa();
22219
22221
  }
22220
22222
  function Jh() {
22221
- for (E(r.bracketL); a.pos < C.length && !l(r.bracketR) && (Me(), !l(r.bracketR)); )
22223
+ for (E(r.bracketL); a.pos < C.length && !l(r.bracketR) && (Ne(), !l(r.bracketR)); )
22222
22224
  E(r.comma);
22223
22225
  E(r.bracketR);
22224
22226
  }
22225
- function Fn() {
22227
+ function Dn() {
22226
22228
  const t = be();
22227
- t === r.colon || t === r.question ? (Q(), _(r.question), et()) : Me();
22229
+ t === r.colon || t === r.question ? (Q(), _(r.question), et()) : Ne();
22228
22230
  }
22229
22231
  function gs() {
22230
22232
  for (; !l(r.parenR) && !l(r.ellipsis) && !a.error; )
22231
- Fn(), l(r.parenR) || E(r.comma);
22232
- _(r.ellipsis) && Fn();
22233
+ Dn(), l(r.parenR) || E(r.comma);
22234
+ _(r.ellipsis) && Dn();
22233
22235
  }
22234
22236
  function Aa() {
22235
22237
  let t = !1;
@@ -22244,16 +22246,16 @@ function Aa() {
22244
22246
  return;
22245
22247
  }
22246
22248
  case r.braceL:
22247
- Pn(!1, !1, !1);
22249
+ Fn(!1, !1, !1);
22248
22250
  return;
22249
22251
  case r.braceBarL:
22250
- Pn(!1, !0, !1);
22252
+ Fn(!1, !0, !1);
22251
22253
  return;
22252
22254
  case r.bracketL:
22253
22255
  Jh();
22254
22256
  return;
22255
22257
  case r.lessThan:
22256
- Xe(), E(r.parenL), gs(), E(r.parenR), E(r.arrow), Me();
22258
+ Xe(), E(r.parenL), gs(), E(r.parenR), E(r.arrow), Ne();
22257
22259
  return;
22258
22260
  case r.parenL:
22259
22261
  if (T(), !l(r.parenR) && !l(r.ellipsis))
@@ -22263,12 +22265,12 @@ function Aa() {
22263
22265
  } else
22264
22266
  t = !0;
22265
22267
  if (t)
22266
- if (a.noAnonFunctionType = !1, Me(), a.noAnonFunctionType = e, a.noAnonFunctionType || !(l(r.comma) || l(r.parenR) && be() === r.arrow)) {
22268
+ if (a.noAnonFunctionType = !1, Ne(), a.noAnonFunctionType = e, a.noAnonFunctionType || !(l(r.comma) || l(r.parenR) && be() === r.arrow)) {
22267
22269
  E(r.parenR);
22268
22270
  return;
22269
22271
  } else
22270
22272
  _(r.comma);
22271
- gs(), E(r.parenR), E(r.arrow), Me();
22273
+ gs(), E(r.parenR), E(r.arrow), Ne();
22272
22274
  return;
22273
22275
  case r.minus:
22274
22276
  T(), Dt();
@@ -22295,14 +22297,14 @@ function Aa() {
22295
22297
  te();
22296
22298
  }
22297
22299
  function ef() {
22298
- for (Aa(); !Ne() && (l(r.bracketL) || l(r.questionDot)); )
22299
- _(r.questionDot), E(r.bracketL), _(r.bracketR) || (Me(), E(r.bracketR));
22300
+ for (Aa(); !Me() && (l(r.bracketL) || l(r.questionDot)); )
22301
+ _(r.questionDot), E(r.bracketL), _(r.bracketR) || (Ne(), E(r.bracketR));
22300
22302
  }
22301
22303
  function Ia() {
22302
22304
  _(r.question) ? Ia() : ef();
22303
22305
  }
22304
22306
  function ji() {
22305
- Ia(), !a.noAnonFunctionType && _(r.arrow) && Me();
22307
+ Ia(), !a.noAnonFunctionType && _(r.arrow) && Ne();
22306
22308
  }
22307
22309
  function qi() {
22308
22310
  for (_(r.bitwiseAND), ji(); _(r.bitwiseAND); )
@@ -22312,7 +22314,7 @@ function tf() {
22312
22314
  for (_(r.bitwiseOR), qi(); _(r.bitwiseOR); )
22313
22315
  qi();
22314
22316
  }
22315
- function Me() {
22317
+ function Ne() {
22316
22318
  tf();
22317
22319
  }
22318
22320
  function At() {
@@ -22415,7 +22417,7 @@ function mf(t) {
22415
22417
  const e = re(0);
22416
22418
  T(), a.tokens[a.tokens.length - 1].type = r._implements;
22417
22419
  do
22418
- Hn(), l(r.lessThan) && vt();
22420
+ Gn(), l(r.lessThan) && vt();
22419
22421
  while (_(r.comma));
22420
22422
  ne(e);
22421
22423
  }
@@ -22470,7 +22472,7 @@ function vf(t, e) {
22470
22472
  function Ef() {
22471
22473
  if (l(r.colon)) {
22472
22474
  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);
22475
+ a.noAnonFunctionType = !0, Xs(), a.noAnonFunctionType = n, Me() && te(), l(r.arrow) || te(), a.error && a.restoreFromSnapshot(e), ne(t);
22474
22476
  }
22475
22477
  return _(r.arrow);
22476
22478
  }
@@ -22486,7 +22488,7 @@ function Tf(t, e = !1) {
22486
22488
  function Sf() {
22487
22489
  a.scopeDepth++;
22488
22490
  const t = a.tokens.length;
22489
- return Nt(), ds() ? (Jt(t), !0) : !1;
22491
+ return Mt(), ds() ? (Jt(t), !0) : !1;
22490
22492
  }
22491
22493
  function Ca() {
22492
22494
  we(d._enum), a.tokens[a.tokens.length - 1].type = r._enum, Q(), xf();
@@ -22502,7 +22504,7 @@ function If() {
22502
22504
  Q(), _(r.eq) && T();
22503
22505
  }
22504
22506
  function Rf() {
22505
- if (Gn(r.eof), a.scopes.push(new Je(0, a.tokens.length, !0)), a.scopeDepth !== 0)
22507
+ if (Xn(r.eof), a.scopes.push(new Je(0, a.tokens.length, !0)), a.scopeDepth !== 0)
22506
22508
  throw new Error(`Invalid scope depth at end of file: ${a.scopeDepth}`);
22507
22509
  return new pd(a.tokens, a.scopes);
22508
22510
  }
@@ -22553,7 +22555,7 @@ function Cf(t) {
22553
22555
  case r._const:
22554
22556
  t || te();
22555
22557
  case r._var:
22556
- yn(e !== r._var);
22558
+ bn(e !== r._var);
22557
22559
  return;
22558
22560
  case r._while:
22559
22561
  Hf();
@@ -22569,13 +22571,13 @@ function Cf(t) {
22569
22571
  const i = be();
22570
22572
  if (i === r.parenL || i === r.dot)
22571
22573
  break;
22572
- T(), e === r._import ? Ba() : Na();
22574
+ T(), e === r._import ? Ba() : Ma();
22573
22575
  return;
22574
22576
  }
22575
22577
  case r.name:
22576
22578
  if (a.contextualKeyword === d._async) {
22577
22579
  const i = a.start, o = a.snapshot();
22578
- if (T(), l(r._function) && !Ne()) {
22580
+ if (T(), l(r._function) && !Me()) {
22579
22581
  E(r._function), Et(i, !0);
22580
22582
  return;
22581
22583
  } else
@@ -22583,10 +22585,10 @@ function Cf(t) {
22583
22585
  } else if (a.contextualKeyword === d._using && !Do() && // Statements like `using[0]` and `using in foo` aren't actual using
22584
22586
  // declarations.
22585
22587
  be() === r.name) {
22586
- yn(!0);
22588
+ bn(!0);
22587
22589
  return;
22588
22590
  } else if (La()) {
22589
- we(d._await), yn(!0);
22591
+ we(d._await), bn(!0);
22590
22592
  return;
22591
22593
  }
22592
22594
  }
@@ -22635,19 +22637,19 @@ function Ff() {
22635
22637
  T(), ye();
22636
22638
  }
22637
22639
  function Df() {
22638
- T(), Oe(!1), E(r._while), Wn(), _(r.semi);
22640
+ T(), Oe(!1), E(r._while), Hn(), _(r.semi);
22639
22641
  }
22640
22642
  function Uf() {
22641
22643
  a.scopeDepth++;
22642
22644
  const t = a.tokens.length;
22643
- Nf();
22645
+ Mf();
22644
22646
  const e = a.tokens.length;
22645
22647
  a.scopes.push(new Je(t, e, !1)), a.scopeDepth--;
22646
22648
  }
22647
- function Mf() {
22649
+ function Nf() {
22648
22650
  return !(!q(d._using) || Ls(d._of));
22649
22651
  }
22650
- function Nf() {
22652
+ function Mf() {
22651
22653
  T();
22652
22654
  let t = !1;
22653
22655
  if (q(d._await) && (t = !0, T()), E(r.parenL), l(r.semi)) {
@@ -22655,7 +22657,7 @@ function Nf() {
22655
22657
  return;
22656
22658
  }
22657
22659
  const e = La();
22658
- if (e || l(r._var) || l(r._let) || l(r._const) || Mf()) {
22660
+ if (e || l(r._var) || l(r._let) || l(r._const) || Nf()) {
22659
22661
  if (e && we(d._await), T(), Da(!0, a.type !== r._var), l(r._in) || q(d._of)) {
22660
22662
  Wi(t);
22661
22663
  return;
@@ -22674,13 +22676,13 @@ function Of() {
22674
22676
  T(), Et(t, !0);
22675
22677
  }
22676
22678
  function Bf() {
22677
- T(), Wn(), Oe(!1), _(r._else) && Oe(!1);
22679
+ T(), Hn(), Oe(!1), _(r._else) && Oe(!1);
22678
22680
  }
22679
22681
  function Vf() {
22680
22682
  T(), Ke() || (Se(), ye());
22681
22683
  }
22682
22684
  function $f() {
22683
- T(), Wn(), a.scopeDepth++;
22685
+ T(), Hn(), a.scopeDepth++;
22684
22686
  const t = a.tokens.length;
22685
22687
  for (E(r.braceL); !l(r.braceR) && !a.error; )
22686
22688
  if (l(r._case) || l(r._default)) {
@@ -22696,7 +22698,7 @@ function jf() {
22696
22698
  T(), Se(), ye();
22697
22699
  }
22698
22700
  function qf() {
22699
- $n(
22701
+ jn(
22700
22702
  !0
22701
22703
  /* isBlockScope */
22702
22704
  ), le && Ut();
@@ -22712,11 +22714,11 @@ function Wf() {
22712
22714
  }
22713
22715
  _(r._finally) && ht();
22714
22716
  }
22715
- function yn(t) {
22717
+ function bn(t) {
22716
22718
  T(), Da(!1, t), ye();
22717
22719
  }
22718
22720
  function Hf() {
22719
- T(), Wn(), Oe(!1);
22721
+ T(), Hn(), Oe(!1);
22720
22722
  }
22721
22723
  function Gf() {
22722
22724
  T();
@@ -22729,11 +22731,11 @@ function zf(t) {
22729
22731
  }
22730
22732
  function ht(t = !1, e = 0) {
22731
22733
  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);
22734
+ 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
22735
  const s = a.tokens.length;
22734
22736
  a.scopes.push(new Je(n, s, t)), a.scopeDepth--;
22735
22737
  }
22736
- function Gn(t) {
22738
+ function Xn(t) {
22737
22739
  for (; !_(t) && !a.error; )
22738
22740
  Oe(!0);
22739
22741
  }
@@ -22754,18 +22756,18 @@ function Da(t, e) {
22754
22756
  }
22755
22757
  }
22756
22758
  function Yf(t) {
22757
- $n(t), le ? Jl() : he && kf();
22759
+ jn(t), le ? Jl() : he && kf();
22758
22760
  }
22759
22761
  function Et(t, e, n = !1) {
22760
22762
  l(r.star) && T(), e && !n && !l(r.name) && !l(r._yield) && te();
22761
22763
  let s = null;
22762
22764
  l(r.name) && (e || (s = a.tokens.length, a.scopeDepth++), ft(!1));
22763
22765
  const i = a.tokens.length;
22764
- a.scopeDepth++, Nt(), Ea(t);
22766
+ a.scopeDepth++, Mt(), Ea(t);
22765
22767
  const o = a.tokens.length;
22766
22768
  a.scopes.push(new Je(i, o, !0)), a.scopeDepth--, s !== null && (a.scopes.push(new Je(s, o, !0)), a.scopeDepth--);
22767
22769
  }
22768
- function Nt(t = !1, e = 0) {
22770
+ function Mt(t = !1, e = 0) {
22769
22771
  le ? Ql() : he && _f(), E(r.parenL), e && (a.tokens[a.tokens.length - 1].contextId = e), Us(
22770
22772
  r.parenR,
22771
22773
  !1,
@@ -22788,7 +22790,7 @@ function Tt(t, e = !1) {
22788
22790
  function Ua() {
22789
22791
  return l(r.eq) || l(r.semi) || l(r.braceR) || l(r.bang) || l(r.colon);
22790
22792
  }
22791
- function Ma() {
22793
+ function Na() {
22792
22794
  return l(r.parenL) || l(r.lessThan);
22793
22795
  }
22794
22796
  function Kf(t) {
@@ -22804,7 +22806,7 @@ function Kf(t) {
22804
22806
  }
22805
22807
  }
22806
22808
  function Zf(t, e) {
22807
- le && Ms([
22809
+ le && Ns([
22808
22810
  d._declare,
22809
22811
  d._public,
22810
22812
  d._protected,
@@ -22813,7 +22815,7 @@ function Zf(t, e) {
22813
22815
  ]);
22814
22816
  let n = !1;
22815
22817
  if (l(r.name) && a.contextualKeyword === d._static) {
22816
- if (Q(), Ma()) {
22818
+ if (Q(), Na()) {
22817
22819
  jt(
22818
22820
  t,
22819
22821
  /* isConstructor */
@@ -22821,7 +22823,7 @@ function Zf(t, e) {
22821
22823
  );
22822
22824
  return;
22823
22825
  } else if (Ua()) {
22824
- bn();
22826
+ _n();
22825
22827
  return;
22826
22828
  }
22827
22829
  if (a.tokens[a.tokens.length - 1].type = r._static, n = !0, l(r.braceL)) {
@@ -22845,7 +22847,7 @@ function Qf(t, e, n) {
22845
22847
  $t(n);
22846
22848
  let s = !1;
22847
22849
  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(
22850
+ 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
22851
  t,
22850
22852
  !1
22851
22853
  /* isConstructor */
@@ -22853,7 +22855,7 @@ function Qf(t, e, n) {
22853
22855
  t,
22854
22856
  /* isConstructor */
22855
22857
  !1
22856
- )) : i.contextualKeyword === d._accessor && !Ke() ? ($t(n), bn()) : Ke() ? bn() : te();
22858
+ )) : i.contextualKeyword === d._accessor && !Ke() ? ($t(n), _n()) : Ke() ? _n() : te();
22857
22859
  }
22858
22860
  function jt(t, e) {
22859
22861
  le ? xt() : he && l(r.lessThan) && Xe(), ms(t, e);
@@ -22867,7 +22869,7 @@ function Hi() {
22867
22869
  _(r.question), ne(t);
22868
22870
  }
22869
22871
  }
22870
- function bn() {
22872
+ function _n() {
22871
22873
  if (le ? (Bo(r.bang), Ut()) : he && l(r.colon) && At(), l(r.eq)) {
22872
22874
  const t = a.tokens.length;
22873
22875
  T(), xe(), a.tokens[t].rhsEndIndex = a.tokens.length;
@@ -22881,7 +22883,7 @@ function ed() {
22881
22883
  let t = !1;
22882
22884
  _(r._extends) ? (_a(), t = !0) : t = !1, le ? Kl(t) : he && mf(t);
22883
22885
  }
22884
- function Na() {
22886
+ function Ma() {
22885
22887
  const t = a.tokens.length - 1;
22886
22888
  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
22889
  }
@@ -22977,7 +22979,7 @@ function hd() {
22977
22979
  return l(r.name);
22978
22980
  }
22979
22981
  function Gi() {
22980
- In();
22982
+ Rn();
22981
22983
  }
22982
22984
  function fd() {
22983
22985
  he && yf();
@@ -23007,7 +23009,7 @@ function dd() {
23007
23009
  bf();
23008
23010
  return;
23009
23011
  }
23010
- In(), q(d._as) && (a.tokens[a.tokens.length - 1].identifierRole = z.ImportAccess, T(), In());
23012
+ Rn(), q(d._as) && (a.tokens[a.tokens.length - 1].identifierRole = z.ImportAccess, T(), Rn());
23011
23013
  }
23012
23014
  function Va() {
23013
23015
  (l(r._with) || q(d._assert) && !Le()) && (T(), Gs(!1, !1));
@@ -23264,7 +23266,7 @@ function bd(t, e, n, s) {
23264
23266
  else {
23265
23267
  const w = e.currentIndex();
23266
23268
  let D = !1, V = !1, $ = !1;
23267
- for (; Dn(e.currentToken()); )
23269
+ for (; Un(e.currentToken()); )
23268
23270
  e.matches1(r._static) && (D = !0), e.matches1(r.hash) && (V = !0), (e.matches1(r._declare) || e.matches1(r._abstract)) && ($ = !0), e.nextToken();
23269
23271
  if (D && e.matches1(r.braceL)) {
23270
23272
  Jr(e, x);
@@ -23291,9 +23293,9 @@ function bd(t, e, n, s) {
23291
23293
  throw new Error("Expected rhsEndIndex on class field assignment.");
23292
23294
  for (e.nextToken(); e.currentIndex() < W; )
23293
23295
  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,
23296
+ let N;
23297
+ D ? (N = n.claimFreeName("__initStatic"), f.push(N)) : (N = n.claimFreeName("__init"), u.push(N)), m.push({
23298
+ initializerName: N,
23297
23299
  equalsIndex: L,
23298
23300
  start: K,
23299
23301
  end: e.currentIndex()
@@ -23321,7 +23323,7 @@ function bd(t, e, n, s) {
23321
23323
  function Jr(t, e) {
23322
23324
  for (t.nextToken(); t.currentToken().contextId !== e; )
23323
23325
  t.nextToken();
23324
- for (; Dn(t.tokenAtRelativeIndex(-1)); )
23326
+ for (; Un(t.tokenAtRelativeIndex(-1)); )
23325
23327
  t.previousToken();
23326
23328
  }
23327
23329
  function _d(t) {
@@ -23344,8 +23346,8 @@ function Xi(t) {
23344
23346
  throw new Error("Expected context ID on open-paren starting constructor params.");
23345
23347
  for (; !t.matchesContextIdAndLabel(r.parenR, n); )
23346
23348
  if (t.currentToken().contextId === n) {
23347
- if (t.nextToken(), Dn(t.currentToken())) {
23348
- for (t.nextToken(); Dn(t.currentToken()); )
23349
+ if (t.nextToken(), Un(t.currentToken())) {
23350
+ for (t.nextToken(); Un(t.currentToken()); )
23349
23351
  t.nextToken();
23350
23352
  const o = t.currentToken();
23351
23353
  if (o.type !== r.name)
@@ -23372,7 +23374,7 @@ function Xi(t) {
23372
23374
  }
23373
23375
  return t.nextToken(), { constructorInitializerStatements: e, constructorInsertPos: s };
23374
23376
  }
23375
- function Dn(t) {
23377
+ function Un(t) {
23376
23378
  return [
23377
23379
  r._async,
23378
23380
  r._get,
@@ -23750,7 +23752,7 @@ module.exports = exports.default;
23750
23752
  this.rootTransformer.processToken();
23751
23753
  } else {
23752
23754
  const s = this.tokens.currentToken();
23753
- if (No(s)) {
23755
+ if (Mo(s)) {
23754
23756
  const i = this.tokens.identifierName();
23755
23757
  let o = this.importProcessor.getIdentifierReplacement(i);
23756
23758
  if (o === null)
@@ -24136,7 +24138,7 @@ function Ed(t) {
24136
24138
  }
24137
24139
  return n;
24138
24140
  }
24139
- const dn = "jest", Td = ["mock", "unmock", "enableAutomock", "disableAutomock"];
24141
+ const mn = "jest", Td = ["mock", "unmock", "enableAutomock", "disableAutomock"];
24140
24142
  class ri extends Ge {
24141
24143
  __init() {
24142
24144
  this.hoistedFunctionNames = [];
@@ -24145,7 +24147,7 @@ class ri extends Ge {
24145
24147
  super(), this.rootTransformer = e, this.tokens = n, this.nameManager = s, this.importProcessor = i, ri.prototype.__init.call(this);
24146
24148
  }
24147
24149
  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;
24150
+ 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
24151
  }
24150
24152
  getHoistedCode() {
24151
24153
  return this.hoistedFunctionNames.length > 0 ? this.hoistedFunctionNames.map((e) => `${e}();`).join("") : "";
@@ -24165,9 +24167,9 @@ class ri extends Ge {
24165
24167
  const n = this.tokens.identifierNameAtIndex(this.tokens.currentIndex() + 1);
24166
24168
  if (Td.includes(n)) {
24167
24169
  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;
24170
+ 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
24171
  } 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;
24172
+ 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
24173
  }
24172
24174
  return !0;
24173
24175
  }
@@ -24584,7 +24586,7 @@ class Cd extends Ge {
24584
24586
  );
24585
24587
  }
24586
24588
  }
24587
- class Un {
24589
+ class Nn {
24588
24590
  __init() {
24589
24591
  this.transformers = [];
24590
24592
  }
@@ -24592,7 +24594,7 @@ class Un {
24592
24594
  this.generatedVariables = [];
24593
24595
  }
24594
24596
  constructor(e, n, s, i) {
24595
- Un.prototype.__init.call(this), Un.prototype.__init2.call(this), this.nameManager = e.nameManager, this.helperManager = e.helperManager;
24597
+ Nn.prototype.__init.call(this), Nn.prototype.__init2.call(this), this.nameManager = e.nameManager, this.helperManager = e.helperManager;
24596
24598
  const { tokenProcessor: o, importProcessor: c } = e;
24597
24599
  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
24600
  new Ad(o, this.nameManager)
@@ -24922,7 +24924,7 @@ function Dd(t, e, n) {
24922
24924
  function Ud(t, e) {
24923
24925
  Ku(e);
24924
24926
  try {
24925
- const n = Md(t, e), i = new Un(
24927
+ const n = Nd(t, e), i = new Nn(
24926
24928
  n,
24927
24929
  e.transforms,
24928
24930
  !!e.enableLegacyBabel5ModuleInterop,
@@ -24934,7 +24936,7 @@ function Ud(t, e) {
24934
24936
  throw new Error("filePath must be specified when generating a source map.");
24935
24937
  o = {
24936
24938
  ...o,
24937
- sourceMap: Mu(
24939
+ sourceMap: Nu(
24938
24940
  i,
24939
24941
  e.filePath,
24940
24942
  e.sourceMapOptions,
@@ -24948,8 +24950,8 @@ function Ud(t, e) {
24948
24950
  throw e.filePath && (n.message = `Error transforming ${e.filePath}: ${n.message}`), n;
24949
24951
  }
24950
24952
  }
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(
24953
+ function Nd(t, e) {
24954
+ 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
24955
  t,
24954
24956
  u,
24955
24957
  i,
@@ -25000,7 +25002,7 @@ self.addEventListener("unhandledrejection", (t) => {
25000
25002
  ...n !== void 0 && { stack: n }
25001
25003
  }), t.preventDefault();
25002
25004
  });
25003
- const nt = new xn(), Be = new C1((t) => self.postMessage(t));
25005
+ const nt = new An(), Be = new C1((t) => self.postMessage(t));
25004
25006
  tn.current = Be;
25005
25007
  nt.setSceneErrorReporter(Be);
25006
25008
  let Yi = null;
@@ -25016,7 +25018,7 @@ function Ki(t) {
25016
25018
  mappings: e.sourceMap?.mappings ?? null
25017
25019
  };
25018
25020
  }
25019
- async function Nd(t) {
25021
+ async function Md(t) {
25020
25022
  Be.resetForSceneReload();
25021
25023
  try {
25022
25024
  nt.resetParameterState();
@@ -25090,5 +25092,5 @@ throw new Error("Scene code must define a render function");`, o = Object.getPro
25090
25092
  });
25091
25093
  }
25092
25094
  }
25093
- self.setSceneCode = Nd;
25094
- //# sourceMappingURL=viji.worker-sMAb5DcQ.js.map
25095
+ self.setSceneCode = Md;
25096
+ //# sourceMappingURL=viji.worker-CXp6CGrq.js.map