@instantdb/platform 0.22.98 → 0.22.99-experimental.add-user-perm-rules.20792844601.1

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.
Files changed (48) hide show
  1. package/.turbo/turbo-build.log +8 -8
  2. package/dist/commonjs/ProgressPromise.js +58 -45
  3. package/dist/commonjs/ProgressPromise.js.map +1 -1
  4. package/dist/commonjs/api.js +412 -366
  5. package/dist/commonjs/api.js.map +1 -1
  6. package/dist/commonjs/migrationUtils.js +4 -16
  7. package/dist/commonjs/migrationUtils.js.map +1 -1
  8. package/dist/commonjs/migrations.js +21 -10
  9. package/dist/commonjs/migrations.js.map +1 -1
  10. package/dist/commonjs/oauth.js +55 -52
  11. package/dist/commonjs/oauth.js.map +1 -1
  12. package/dist/commonjs/oauthCommon.js +0 -2
  13. package/dist/commonjs/oauthCommon.js.map +1 -1
  14. package/dist/commonjs/perms.js +1 -1
  15. package/dist/commonjs/perms.js.map +1 -1
  16. package/dist/commonjs/schema.js +14 -8
  17. package/dist/commonjs/schema.js.map +1 -1
  18. package/dist/commonjs/serverOAuth.js +68 -55
  19. package/dist/commonjs/serverOAuth.js.map +1 -1
  20. package/dist/commonjs/typescript-schema.js +2 -1
  21. package/dist/commonjs/typescript-schema.js.map +1 -1
  22. package/dist/commonjs/util.js +1 -1
  23. package/dist/commonjs/util.js.map +1 -1
  24. package/dist/esm/ProgressPromise.js +58 -45
  25. package/dist/esm/ProgressPromise.js.map +1 -1
  26. package/dist/esm/api.js +412 -366
  27. package/dist/esm/api.js.map +1 -1
  28. package/dist/esm/migrationUtils.js +4 -16
  29. package/dist/esm/migrationUtils.js.map +1 -1
  30. package/dist/esm/migrations.js +21 -10
  31. package/dist/esm/migrations.js.map +1 -1
  32. package/dist/esm/oauth.js +55 -52
  33. package/dist/esm/oauth.js.map +1 -1
  34. package/dist/esm/oauthCommon.js +0 -2
  35. package/dist/esm/oauthCommon.js.map +1 -1
  36. package/dist/esm/perms.js +1 -1
  37. package/dist/esm/perms.js.map +1 -1
  38. package/dist/esm/schema.js +14 -8
  39. package/dist/esm/schema.js.map +1 -1
  40. package/dist/esm/serverOAuth.js +68 -55
  41. package/dist/esm/serverOAuth.js.map +1 -1
  42. package/dist/esm/typescript-schema.js +2 -1
  43. package/dist/esm/typescript-schema.js.map +1 -1
  44. package/dist/esm/util.js +1 -1
  45. package/dist/esm/util.js.map +1 -1
  46. package/dist/standalone/index.js +660 -690
  47. package/dist/standalone/index.umd.cjs +16 -16
  48. package/package.json +3 -3
@@ -4,20 +4,18 @@ var ss = (r) => {
4
4
  };
5
5
  var mi = (r, t, s) => t in r ? di(r, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : r[t] = s;
6
6
  var m = (r, t, s) => mi(r, typeof t != "symbol" ? t + "" : t, s), is = (r, t, s) => t.has(r) || ss("Cannot " + s);
7
- var w = (r, t, s) => (is(r, t, "read from private field"), s ? s.call(r) : t.get(r)), oe = (r, t, s) => t.has(r) ? ss("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, s), ce = (r, t, s, e) => (is(r, t, "write to private field"), e ? e.call(r, s) : t.set(r, s), s);
7
+ var T = (r, t, s) => (is(r, t, "read from private field"), s ? s.call(r) : t.get(r)), oe = (r, t, s) => t.has(r) ? ss("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, s), ce = (r, t, s, e) => (is(r, t, "write to private field"), e ? e.call(r, s) : t.set(r, s), s);
8
8
  class pe extends Error {
9
- constructor(s) {
10
- super(s.message);
11
- m(this, "error");
12
- m(this, "errorDescription");
13
- const e = new.target.prototype;
14
- Object.setPrototypeOf && Object.setPrototypeOf(this, e), Error.captureStackTrace && Error.captureStackTrace(this, pe), this.name = "InstantOAuthError", this.error = s.error, this.errorDescription = s.errorDescription;
9
+ constructor(t) {
10
+ super(t.message);
11
+ const s = new.target.prototype;
12
+ Object.setPrototypeOf && Object.setPrototypeOf(this, s), Error.captureStackTrace && Error.captureStackTrace(this, pe), this.name = "InstantOAuthError", this.error = t.error, this.errorDescription = t.errorDescription;
15
13
  }
16
14
  get [Symbol.toStringTag]() {
17
15
  return "InstantAPIError";
18
16
  }
19
17
  }
20
- const _ = {
18
+ const j = {
21
19
  Remove: "remove",
22
20
  Replace: "replace",
23
21
  Add: "add"
@@ -25,7 +23,7 @@ const _ = {
25
23
  mutable: "mutable",
26
24
  immutable: "immutable"
27
25
  }, Bt = {};
28
- function Re(r, t) {
26
+ function _e(r, t) {
29
27
  return r instanceof Map ? r.has(t) : Object.prototype.hasOwnProperty.call(r, t);
30
28
  }
31
29
  function rs(r, t) {
@@ -55,7 +53,7 @@ function St(r) {
55
53
  function v(r) {
56
54
  return typeof r != "object" ? null : r == null ? void 0 : r[Ms];
57
55
  }
58
- function Rt(r) {
56
+ function _t(r) {
59
57
  var t;
60
58
  const s = v(r);
61
59
  return s ? (t = s.copy) !== null && t !== void 0 ? t : s.original : r;
@@ -66,18 +64,18 @@ function Se(r, t) {
66
64
  let s;
67
65
  return Object.getPrototypeOf(r) === Object.prototype || Array.isArray(r) || r instanceof Map || r instanceof Set || !!(t != null && t.mark) && ((s = t.mark(r, ee)) === ee.immutable || typeof s == "function");
68
66
  }
69
- function Rs(r, t = []) {
67
+ function _s(r, t = []) {
70
68
  if (Object.hasOwnProperty.call(r, "key")) {
71
69
  const s = r.parent.copy, e = v(me(s, r.key));
72
70
  if (e !== null && (e == null ? void 0 : e.original) !== r.original)
73
71
  return null;
74
72
  const i = r.parent.type === 3, a = i ? Array.from(r.parent.setMap.keys()).indexOf(r.key) : r.key;
75
- if (!(i && s.size > a || Re(s, a)))
73
+ if (!(i && s.size > a || _e(s, a)))
76
74
  return null;
77
75
  t.push(a);
78
76
  }
79
77
  if (r.parent)
80
- return Rs(r.parent, t);
78
+ return _s(r.parent, t);
81
79
  t.reverse();
82
80
  try {
83
81
  yi(r.copy, t);
@@ -92,7 +90,7 @@ function Ve(r) {
92
90
  function me(r, t) {
93
91
  return Ve(r) === 2 ? r.get(t) : r[t];
94
92
  }
95
- function jt(r, t, s) {
93
+ function Rt(r, t, s) {
96
94
  Ve(r) === 2 ? r.set(t, s) : r[t] = s;
97
95
  }
98
96
  function yt(r, t) {
@@ -102,7 +100,7 @@ function yt(r, t) {
102
100
  function Ae(r, t) {
103
101
  return r === t ? r !== 0 || 1 / r === 1 / t : r !== r && t !== t;
104
102
  }
105
- function we(r, t) {
103
+ function Te(r, t) {
106
104
  return t ? r : [""].concat(r).map((s) => {
107
105
  const e = `${s}`;
108
106
  return e.indexOf("/") === -1 && e.indexOf("~") === -1 ? e : e.replace(/~/g, "~0").replace(/\//g, "~1");
@@ -133,7 +131,7 @@ function xi(r) {
133
131
  }), t;
134
132
  }
135
133
  const Pi = Object.prototype.propertyIsEnumerable;
136
- function gi(r, t) {
134
+ function bi(r, t) {
137
135
  let s;
138
136
  if (Array.isArray(r))
139
137
  return Array.prototype.concat.call(r);
@@ -169,11 +167,11 @@ function gi(r, t) {
169
167
  throw new Error("Please check mark() to ensure that it is a stable marker draftable function.");
170
168
  }
171
169
  function V(r) {
172
- r.copy || (r.copy = gi(r.original, r.options));
170
+ r.copy || (r.copy = bi(r.original, r.options));
173
171
  }
174
172
  function Fe(r) {
175
173
  if (!Se(r))
176
- return Rt(r);
174
+ return _t(r);
177
175
  if (Array.isArray(r))
178
176
  return r.map(Fe);
179
177
  if (r instanceof Map) {
@@ -207,7 +205,7 @@ function se(r) {
207
205
  var t;
208
206
  r.assignedMap = (t = r.assignedMap) !== null && t !== void 0 ? t : /* @__PURE__ */ new Map(), r.operated || (r.operated = !0, r.parent && se(r.parent));
209
207
  }
210
- function bi(r, t) {
208
+ function gi(r, t) {
211
209
  const s = Ve(r);
212
210
  if (s === 0)
213
211
  Reflect.ownKeys(r).forEach((e) => {
@@ -220,19 +218,19 @@ function bi(r, t) {
220
218
  } else
221
219
  r.forEach((e, i) => t(i, e, r));
222
220
  }
223
- function js(r, t, s) {
221
+ function Rs(r, t, s) {
224
222
  if (St(r) || !Se(r, s) || t.has(r) || Object.isFrozen(r))
225
223
  return;
226
224
  const e = r instanceof Set, i = e ? /* @__PURE__ */ new Map() : void 0;
227
- if (t.add(r), bi(r, (a, n) => {
225
+ if (t.add(r), gi(r, (a, n) => {
228
226
  var o;
229
227
  if (St(n)) {
230
228
  const c = v(n);
231
229
  V(c);
232
230
  const h = !((o = c.assignedMap) === null || o === void 0) && o.size || c.operated ? c.copy : c.original;
233
- jt(e ? i : r, a, h);
231
+ Rt(e ? i : r, a, h);
234
232
  } else
235
- js(n, t, s);
233
+ Rs(n, t, s);
236
234
  }), i) {
237
235
  const a = r, n = Array.from(a);
238
236
  a.clear(), n.forEach((o) => {
@@ -240,60 +238,60 @@ function js(r, t, s) {
240
238
  });
241
239
  }
242
240
  }
243
- function Ti(r, t) {
241
+ function wi(r, t) {
244
242
  const s = r.type === 3 ? r.setMap : r.copy;
245
- r.finalities.revoke.length > 1 && r.assignedMap.get(t) && s && js(me(s, t), r.finalities.handledSet, r.options);
243
+ r.finalities.revoke.length > 1 && r.assignedMap.get(t) && s && Rs(me(s, t), r.finalities.handledSet, r.options);
246
244
  }
247
245
  function It(r) {
248
246
  r.type === 3 && r.copy && (r.copy.clear(), r.setMap.forEach((t) => {
249
- r.copy.add(Rt(t));
247
+ r.copy.add(_t(t));
250
248
  }));
251
249
  }
252
250
  function Et(r, t, s, e) {
253
251
  if (r.operated && r.assignedMap && r.assignedMap.size > 0 && !r.finalized) {
254
252
  if (s && e) {
255
- const a = Rs(r);
253
+ const a = _s(r);
256
254
  a && t(r, a, s, e);
257
255
  }
258
256
  r.finalized = !0;
259
257
  }
260
258
  }
261
- function _t(r, t, s, e) {
259
+ function jt(r, t, s, e) {
262
260
  const i = v(s);
263
261
  i && (i.callbacks || (i.callbacks = []), i.callbacks.push((a, n) => {
264
262
  var o;
265
263
  const c = r.type === 3 ? r.setMap : r.copy;
266
264
  if (Ae(me(c, t), s)) {
267
265
  let h = i.original;
268
- i.copy && (h = i.copy), It(r), Et(r, e, a, n), r.options.enableAutoFreeze && (r.options.updatedValues = (o = r.options.updatedValues) !== null && o !== void 0 ? o : /* @__PURE__ */ new WeakMap(), r.options.updatedValues.set(h, i.original)), jt(c, t, h);
266
+ i.copy && (h = i.copy), It(r), Et(r, e, a, n), r.options.enableAutoFreeze && (r.options.updatedValues = (o = r.options.updatedValues) !== null && o !== void 0 ? o : /* @__PURE__ */ new WeakMap(), r.options.updatedValues.set(h, i.original)), Rt(c, t, h);
269
267
  }
270
268
  }), r.options.enableAutoFreeze && i.finalities !== r.finalities && (r.options.enableAutoFreeze = !1)), Se(s, r.options) && r.finalities.draft.push(() => {
271
269
  const a = r.type === 3 ? r.setMap : r.copy;
272
- Ae(me(a, t), s) && Ti(r, t);
270
+ Ae(me(a, t), s) && wi(r, t);
273
271
  });
274
272
  }
275
- function wi(r, t, s, e, i) {
273
+ function Ti(r, t, s, e, i) {
276
274
  let { original: a, assignedMap: n, options: o } = r, c = r.copy;
277
275
  c.length < a.length && ([a, c] = [c, a], [s, e] = [e, s]);
278
276
  for (let h = 0; h < a.length; h += 1)
279
277
  if (n.get(h.toString()) && c[h] !== a[h]) {
280
- const l = t.concat([h]), p = we(l, i);
278
+ const l = t.concat([h]), p = Te(l, i);
281
279
  s.push({
282
- op: _.Replace,
280
+ op: j.Replace,
283
281
  path: p,
284
282
  // If it is a draft, it needs to be deep cloned, and it may also be non-draft.
285
283
  value: Ye(c[h])
286
284
  }), e.push({
287
- op: _.Replace,
285
+ op: j.Replace,
288
286
  path: p,
289
287
  // If it is a draft, it needs to be deep cloned, and it may also be non-draft.
290
288
  value: Ye(a[h])
291
289
  });
292
290
  }
293
291
  for (let h = a.length; h < c.length; h += 1) {
294
- const l = t.concat([h]), p = we(l, i);
292
+ const l = t.concat([h]), p = Te(l, i);
295
293
  s.push({
296
- op: _.Add,
294
+ op: j.Add,
297
295
  path: p,
298
296
  // If it is a draft, it needs to be deep cloned, and it may also be non-draft.
299
297
  value: Ye(c[h])
@@ -302,17 +300,17 @@ function wi(r, t, s, e, i) {
302
300
  if (a.length < c.length) {
303
301
  const { arrayLengthAssignment: h = !0 } = o.enablePatches;
304
302
  if (h) {
305
- const l = t.concat(["length"]), p = we(l, i);
303
+ const l = t.concat(["length"]), p = Te(l, i);
306
304
  e.push({
307
- op: _.Replace,
305
+ op: j.Replace,
308
306
  path: p,
309
307
  value: a.length
310
308
  });
311
309
  } else
312
310
  for (let l = c.length; a.length < l; l -= 1) {
313
- const p = t.concat([l - 1]), d = we(p, i);
311
+ const p = t.concat([l - 1]), d = Te(p, i);
314
312
  e.push({
315
- op: _.Remove,
313
+ op: j.Remove,
316
314
  path: d
317
315
  });
318
316
  }
@@ -320,24 +318,24 @@ function wi(r, t, s, e, i) {
320
318
  }
321
319
  function Ai({ original: r, copy: t, assignedMap: s }, e, i, a, n) {
322
320
  s.forEach((o, c) => {
323
- const h = me(r, c), l = Ye(me(t, c)), p = o ? Re(r, c) ? _.Replace : _.Add : _.Remove;
324
- if (Ae(h, l) && p === _.Replace)
321
+ const h = me(r, c), l = Ye(me(t, c)), p = o ? _e(r, c) ? j.Replace : j.Add : j.Remove;
322
+ if (Ae(h, l) && p === j.Replace)
325
323
  return;
326
- const d = e.concat(c), f = we(d, n);
327
- i.push(p === _.Remove ? { op: p, path: f } : { op: p, path: f, value: l }), a.push(p === _.Add ? { op: _.Remove, path: f } : p === _.Remove ? { op: _.Add, path: f, value: h } : { op: _.Replace, path: f, value: h });
324
+ const d = e.concat(c), f = Te(d, n);
325
+ i.push(p === j.Remove ? { op: p, path: f } : { op: p, path: f, value: l }), a.push(p === j.Add ? { op: j.Remove, path: f } : p === j.Remove ? { op: j.Add, path: f, value: h } : { op: j.Replace, path: f, value: h });
328
326
  });
329
327
  }
330
328
  function Si({ original: r, copy: t }, s, e, i, a) {
331
329
  let n = 0;
332
330
  r.forEach((o) => {
333
331
  if (!t.has(o)) {
334
- const c = s.concat([n]), h = we(c, a);
332
+ const c = s.concat([n]), h = Te(c, a);
335
333
  e.push({
336
- op: _.Remove,
334
+ op: j.Remove,
337
335
  path: h,
338
336
  value: o
339
337
  }), i.unshift({
340
- op: _.Add,
338
+ op: j.Add,
341
339
  path: h,
342
340
  value: o
343
341
  });
@@ -345,13 +343,13 @@ function Si({ original: r, copy: t }, s, e, i, a) {
345
343
  n += 1;
346
344
  }), n = 0, t.forEach((o) => {
347
345
  if (!r.has(o)) {
348
- const c = s.concat([n]), h = we(c, a);
346
+ const c = s.concat([n]), h = Te(c, a);
349
347
  e.push({
350
- op: _.Add,
348
+ op: j.Add,
351
349
  path: h,
352
350
  value: o
353
351
  }), i.unshift({
354
- op: _.Remove,
352
+ op: j.Remove,
355
353
  path: h,
356
354
  value: o
357
355
  });
@@ -366,7 +364,7 @@ function Ue(r, t, s, e) {
366
364
  case 2:
367
365
  return Ai(r, t, s, e, i);
368
366
  case 1:
369
- return wi(r, t, s, e, i);
367
+ return Ti(r, t, s, e, i);
370
368
  case 3:
371
369
  return Si(r, t, s, e, i);
372
370
  }
@@ -383,7 +381,7 @@ const rt = (r, t, s = !1) => {
383
381
  },
384
382
  set(r, t) {
385
383
  const s = v(this), e = X(s);
386
- return (!e.has(r) || !Ae(e.get(r), t)) && (V(s), se(s), s.assignedMap.set(r, !0), s.copy.set(r, t), _t(s, r, t, Ue)), this;
384
+ return (!e.has(r) || !Ae(e.get(r), t)) && (V(s), se(s), s.assignedMap.set(r, !0), s.copy.set(r, t), jt(s, r, t, Ue)), this;
387
385
  },
388
386
  delete(r) {
389
387
  if (!this.has(r))
@@ -491,7 +489,7 @@ const rt = (r, t, s = !1) => {
491
489
  },
492
490
  add(r) {
493
491
  const t = v(this);
494
- return this.has(r) || (V(t), se(t), t.assignedMap.set(r, !0), t.setMap.set(r, r), _t(t, r, r, Ue)), this;
492
+ return this.has(r) || (V(t), se(t), t.assignedMap.set(r, !0), t.setMap.set(r, r), jt(t, r, r, Ue)), this;
495
493
  },
496
494
  delete(r) {
497
495
  if (!this.has(r))
@@ -566,11 +564,11 @@ Set.prototype.difference && Object.assign(at, {
566
564
  return Set.prototype.isDisjointFrom.call(new Set(this.values()), r);
567
565
  }
568
566
  });
569
- const Ei = Reflect.ownKeys(at), _s = /* @__PURE__ */ new WeakSet(), Us = {
567
+ const Ei = Reflect.ownKeys(at), js = /* @__PURE__ */ new WeakSet(), Us = {
570
568
  get(r, t, s) {
571
569
  var e, i;
572
570
  const a = (e = r.copy) === null || e === void 0 ? void 0 : e[t];
573
- if (a && _s.has(a))
571
+ if (a && js.has(a))
574
572
  return a;
575
573
  if (t === Ms)
576
574
  return r;
@@ -595,7 +593,7 @@ const Ei = Reflect.ownKeys(at), _s = /* @__PURE__ */ new WeakSet(), Us = {
595
593
  if (h)
596
594
  return h.bind(r.proxy);
597
595
  }
598
- if (!Re(o, t)) {
596
+ if (!_e(o, t)) {
599
597
  const h = rs(o, t);
600
598
  return h ? "value" in h ? h.value : (
601
599
  // !case: support for getter
@@ -631,7 +629,7 @@ const Ei = Reflect.ownKeys(at), _s = /* @__PURE__ */ new WeakSet(), Us = {
631
629
  if (a != null && a.set)
632
630
  return a.set.call(r.proxy, s), !0;
633
631
  const n = yt(X(r), t), o = v(n);
634
- return o && Ae(o.original, s) ? (r.copy[t] = s, r.assignedMap = (e = r.assignedMap) !== null && e !== void 0 ? e : /* @__PURE__ */ new Map(), r.assignedMap.set(t, !1), !0) : (Ae(s, n) && (s !== void 0 || Re(r.original, t)) || (V(r), se(r), Re(r.original, t) && Ae(s, r.original[t]) ? r.assignedMap.delete(t) : r.assignedMap.set(t, !0), r.copy[t] = s, _t(r, t, s, Ue)), !0);
632
+ return o && Ae(o.original, s) ? (r.copy[t] = s, r.assignedMap = (e = r.assignedMap) !== null && e !== void 0 ? e : /* @__PURE__ */ new Map(), r.assignedMap.set(t, !1), !0) : (Ae(s, n) && (s !== void 0 || _e(r.original, t)) || (V(r), se(r), _e(r.original, t) && Ae(s, r.original[t]) ? r.assignedMap.delete(t) : r.assignedMap.set(t, !0), r.copy[t] = s, jt(r, t, s, Ue)), !0);
635
633
  },
636
634
  has(r, t) {
637
635
  return t in X(r);
@@ -677,7 +675,7 @@ function $s(r) {
677
675
  };
678
676
  (e || "key" in r) && (o.key = e);
679
677
  const { proxy: c, revoke: h } = Proxy.revocable(n === 1 ? Object.assign([], o) : o, Us);
680
- if (i.revoke.push(h), _s.add(c), o.proxy = c, s) {
678
+ if (i.revoke.push(h), js.add(c), o.proxy = c, s) {
681
679
  const l = s;
682
680
  l.finalities.draft.push((p, d) => {
683
681
  var f, x;
@@ -686,7 +684,7 @@ function $s(r) {
686
684
  const E = me(F, e), k = v(E);
687
685
  if (k) {
688
686
  let B = k.original;
689
- k.operated && (B = Rt(E)), It(k), Et(k, Ue, p, d), l.options.enableAutoFreeze && (l.options.updatedValues = (f = l.options.updatedValues) !== null && f !== void 0 ? f : /* @__PURE__ */ new WeakMap(), l.options.updatedValues.set(B, k.original)), jt(F, e, B);
687
+ k.operated && (B = _t(E)), It(k), Et(k, Ue, p, d), l.options.enableAutoFreeze && (l.options.updatedValues = (f = l.options.updatedValues) !== null && f !== void 0 ? f : /* @__PURE__ */ new WeakMap(), l.options.updatedValues.set(B, k.original)), Rt(F, e, B);
690
688
  }
691
689
  (x = A.callbacks) === null || x === void 0 || x.forEach((B) => {
692
690
  B(p, d);
@@ -719,7 +717,7 @@ function ki() {
719
717
  return xt(Ni);
720
718
  }
721
719
  const vi = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ns = { randomUUID: vi };
722
- function Di(r, t, s) {
720
+ function Oi(r, t, s) {
723
721
  var i;
724
722
  if (ns.randomUUID && !r)
725
723
  return ns.randomUUID();
@@ -730,13 +728,13 @@ function Di(r, t, s) {
730
728
  return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, Ci(e);
731
729
  }
732
730
  function os() {
733
- return Di();
731
+ return Oi();
734
732
  }
735
- function Oi(r, t) {
733
+ function Di(r, t) {
736
734
  return r.localeCompare(t);
737
735
  }
738
736
  function Li() {
739
- let r = Oi;
737
+ let r = Di;
740
738
  if (typeof Intl == "object" && Intl.hasOwnProperty("Collator"))
741
739
  try {
742
740
  r = Intl.Collator("en-US").compare;
@@ -782,11 +780,11 @@ function Nt(r, t, s) {
782
780
  function Bi(r) {
783
781
  return r.startsWith("lookup__");
784
782
  }
785
- function Ri(r) {
783
+ function _i(r) {
786
784
  const [t, s, ...e] = r.split("__");
787
785
  return [s, JSON.parse(e.join("__"))];
788
786
  }
789
- function ji(r) {
787
+ function Ri(r) {
790
788
  return new Proxy({
791
789
  __etype: r
792
790
  }, {
@@ -794,54 +792,47 @@ function ji(r) {
794
792
  if (s === "__etype")
795
793
  return r;
796
794
  const e = s;
797
- return Bi(e) ? Nt(r, Ri(e), []) : Nt(r, e, []);
795
+ return Bi(e) ? Nt(r, _i(e), []) : Nt(r, e, []);
798
796
  }
799
797
  });
800
798
  }
801
- function _i() {
799
+ function ji() {
802
800
  return new Proxy({}, {
803
801
  get(r, t) {
804
- return ji(t);
802
+ return Ri(t);
805
803
  }
806
804
  });
807
805
  }
808
- _i();
806
+ ji();
807
+ const Ui = { "unique?": !0, "index?": !0 };
808
+ Object.assign(Object.assign({}, Ui), { cardinality: "one" });
809
809
  class Ut extends Error {
810
- constructor(s, e) {
811
- super(s);
812
- m(this, "hint");
813
- this.hint = e;
814
- const i = new.target.prototype;
815
- Object.setPrototypeOf && Object.setPrototypeOf(this, i), Error.captureStackTrace && Error.captureStackTrace(this, Ut), this.name = "InstantError";
810
+ constructor(t, s) {
811
+ super(t), this.hint = s;
812
+ const e = new.target.prototype;
813
+ Object.setPrototypeOf && Object.setPrototypeOf(this, e), Error.captureStackTrace && Error.captureStackTrace(this, Ut), this.name = "InstantError";
816
814
  }
817
815
  get [Symbol.toStringTag]() {
818
816
  return "InstantError";
819
817
  }
820
818
  }
821
819
  class $e extends Ut {
822
- constructor(s) {
823
- var a;
824
- const e = ((a = s.body) == null ? void 0 : a.message) || `API Error (${s.status})`;
825
- super(e, s.body.hint);
826
- m(this, "body");
827
- m(this, "status");
820
+ constructor(t) {
821
+ var s;
822
+ const e = ((s = t.body) === null || s === void 0 ? void 0 : s.message) || `API Error (${t.status})`;
823
+ super(e, t.body.hint);
828
824
  const i = new.target.prototype;
829
- Object.setPrototypeOf && Object.setPrototypeOf(this, i), Error.captureStackTrace && Error.captureStackTrace(this, $e), this.name = "InstantAPIError", this.status = s.status, this.body = s.body;
825
+ Object.setPrototypeOf && Object.setPrototypeOf(this, i), Error.captureStackTrace && Error.captureStackTrace(this, $e), this.name = "InstantAPIError", this.status = t.status, this.body = t.body;
830
826
  }
831
827
  get [Symbol.toStringTag]() {
832
828
  return "InstantAPIError";
833
829
  }
834
830
  }
835
831
  typeof window < "u" && typeof window.localStorage < "u" && (window.localStorage.getItem("devBackend"), window.localStorage.getItem("__instantLogging"), window.localStorage.getItem("__devtoolLocalDash"));
836
- const je = "v0.22.98";
832
+ const Re = "v0.22.99-experimental.add-user-perm-rules.20792844601.1";
837
833
  class Q {
838
834
  constructor(t, s, e, i = { indexed: !1, unique: !1 }) {
839
- m(this, "valueType");
840
- m(this, "required");
841
- m(this, "isIndexed");
842
- m(this, "config");
843
- m(this, "metadata", {});
844
- this.valueType = t, this.required = s, this.isIndexed = e, this.config = i;
835
+ this.valueType = t, this.required = s, this.isIndexed = e, this.config = i, this.metadata = {};
845
836
  }
846
837
  /**
847
838
  * @deprecated Only use this temporarily for attributes that you want
@@ -855,22 +846,14 @@ class Q {
855
846
  return new Q(this.valueType, !1, this.isIndexed, this.config);
856
847
  }
857
848
  unique() {
858
- return new Q(this.valueType, this.required, this.isIndexed, {
859
- ...this.config,
860
- unique: !0
861
- });
849
+ return new Q(this.valueType, this.required, this.isIndexed, Object.assign(Object.assign({}, this.config), { unique: !0 }));
862
850
  }
863
851
  indexed() {
864
- return new Q(this.valueType, this.required, !0, {
865
- ...this.config,
866
- indexed: !0
867
- });
852
+ return new Q(this.valueType, this.required, !0, Object.assign(Object.assign({}, this.config), { indexed: !0 }));
868
853
  }
869
854
  }
870
855
  class pt {
871
856
  constructor(t, s) {
872
- m(this, "attrs");
873
- m(this, "links");
874
857
  this.attrs = t, this.links = s;
875
858
  }
876
859
  asType() {
@@ -879,9 +862,6 @@ class pt {
879
862
  }
880
863
  class ft {
881
864
  constructor(t, s, e) {
882
- m(this, "entities");
883
- m(this, "links");
884
- m(this, "rooms");
885
865
  this.entities = t, this.links = s, this.rooms = e;
886
866
  }
887
867
  /**
@@ -911,7 +891,7 @@ var cs;
911
891
  (function(r) {
912
892
  r.InitialSyncBatch = "InitialSyncBatch", r.InitialSyncComplete = "InitialSyncComplete", r.LoadFromStorage = "LoadFromStorage", r.SyncTransaction = "SyncTransaction", r.Error = "Error";
913
893
  })(cs || (cs = {}));
914
- function Ui(r, t) {
894
+ function $i(r, t) {
915
895
  return new ft(
916
896
  qs(r, t),
917
897
  // (XXX): LinksDef<any> stems from TypeScript’s inability to reconcile the
@@ -923,47 +903,44 @@ function Ui(r, t) {
923
903
  void 0
924
904
  );
925
905
  }
926
- function $i(r) {
906
+ function qi(r) {
927
907
  return new pt(r, {});
928
908
  }
929
- function qi() {
909
+ function zi() {
930
910
  return new Q("string", !0, !1);
931
911
  }
932
- function zi() {
912
+ function Vi() {
933
913
  return new Q("number", !0, !1);
934
914
  }
935
- function Vi() {
915
+ function Hi() {
936
916
  return new Q("boolean", !0, !1);
937
917
  }
938
- function Hi() {
918
+ function Ki() {
939
919
  return new Q("date", !0, !1);
940
920
  }
941
- function Ki() {
921
+ function Ji() {
942
922
  return new Q("json", !0, !1);
943
923
  }
944
- function Ji() {
924
+ function Wi() {
945
925
  return new Q("json", !0, !1);
946
926
  }
947
927
  function qs(r, t) {
948
- var i, a, n, o;
949
- const s = { fwd: {}, rev: {} };
928
+ var s, e, i, a;
929
+ const n = { fwd: {}, rev: {} };
950
930
  for (const c of Object.values(t))
951
- (i = s.fwd)[a = c.forward.on] || (i[a] = {}), (n = s.rev)[o = c.reverse.on] || (n[o] = {}), s.fwd[c.forward.on][c.forward.label] = {
931
+ (s = n.fwd)[e = c.forward.on] || (s[e] = {}), (i = n.rev)[a = c.reverse.on] || (i[a] = {}), n.fwd[c.forward.on][c.forward.label] = {
952
932
  entityName: c.reverse.on,
953
933
  cardinality: c.forward.has
954
- }, s.rev[c.reverse.on][c.reverse.label] = {
934
+ }, n.rev[c.reverse.on][c.reverse.label] = {
955
935
  entityName: c.forward.on,
956
936
  cardinality: c.reverse.has
957
937
  };
958
938
  return Object.fromEntries(Object.entries(r).map(([c, h]) => [
959
939
  c,
960
- new pt(h.attrs, {
961
- ...s.fwd[c],
962
- ...s.rev[c]
963
- })
940
+ new pt(h.attrs, Object.assign(Object.assign({}, n.fwd[c]), n.rev[c]))
964
941
  ]));
965
942
  }
966
- function Wi({ entities: r, links: t, rooms: s }) {
943
+ function Xi({ entities: r, links: t, rooms: s }) {
967
944
  const e = t ?? {}, i = s ?? {};
968
945
  return new ft(
969
946
  qs(r, e),
@@ -978,44 +955,46 @@ function Wi({ entities: r, links: t, rooms: s }) {
978
955
  }
979
956
  const q = {
980
957
  // constructs
981
- graph: Ui,
982
- schema: Wi,
983
- entity: $i,
958
+ graph: $i,
959
+ schema: Xi,
960
+ entity: qi,
984
961
  // value types
985
- string: qi,
986
- number: zi,
987
- boolean: Vi,
988
- date: Hi,
989
- json: Ki,
990
- any: Ji
962
+ string: zi,
963
+ number: Vi,
964
+ boolean: Hi,
965
+ date: Ki,
966
+ json: Ji,
967
+ any: Wi
991
968
  };
992
- function Xi() {
993
- return globalThis.__instantDbSchemaHashStore = globalThis.__instantDbSchemaHashStore ?? /* @__PURE__ */ new WeakMap(), globalThis.__instantDbSchemaHashStore;
994
- }
995
969
  function Gi() {
996
- return globalThis.__instantDbStore = globalThis.__instantDbStore ?? {}, globalThis.__instantDbStore;
970
+ var r;
971
+ return globalThis.__instantDbSchemaHashStore = (r = globalThis.__instantDbSchemaHashStore) !== null && r !== void 0 ? r : /* @__PURE__ */ new WeakMap(), globalThis.__instantDbSchemaHashStore;
997
972
  }
998
- Gi();
999
- Xi();
1000
973
  function Yi() {
974
+ var r;
975
+ return globalThis.__instantDbStore = (r = globalThis.__instantDbStore) !== null && r !== void 0 ? r : {}, globalThis.__instantDbStore;
976
+ }
977
+ Yi();
978
+ Gi();
979
+ function Qi() {
1001
980
  const r = "0123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz-._~";
1002
981
  let t = "";
1003
982
  for (const s of crypto.getRandomValues(new Uint8Array(64)))
1004
983
  t = t + r[s % r.length];
1005
984
  return t;
1006
985
  }
1007
- function Qi(r) {
986
+ function Zi(r) {
1008
987
  return crypto.subtle.digest({ name: "SHA-256" }, new TextEncoder().encode(r));
1009
988
  }
1010
- function Zi(r) {
989
+ function er(r) {
1011
990
  return r.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
1012
991
  }
1013
- function er(r) {
1014
- return Qi(r).then((t) => Zi(
992
+ function tr(r) {
993
+ return Zi(r).then((t) => er(
1015
994
  btoa(String.fromCharCode(...Array.from(new Uint8Array(t))))
1016
995
  ));
1017
996
  }
1018
- function tr() {
997
+ function sr() {
1019
998
  const r = Math.min(800, Math.floor(window.outerWidth * 0.8)), t = Math.min(630, Math.floor(window.outerHeight * 0.5)), s = {
1020
999
  width: r,
1021
1000
  height: t,
@@ -1036,7 +1015,7 @@ function tr() {
1036
1015
  return Object.keys(e).map((i) => `${i}=${e[i]}`).join(",");
1037
1016
  }
1038
1017
  let hs = null;
1039
- function sr({
1018
+ function ir({
1040
1019
  clientId: r,
1041
1020
  state: t,
1042
1021
  codeChallenge: s,
@@ -1047,7 +1026,7 @@ function sr({
1047
1026
  const n = new URL(`${e}/platform/oauth/start`);
1048
1027
  return n.searchParams.set("client_id", r), n.searchParams.set("redirect_uri", i), n.searchParams.set("scope", a.join(" ")), n.searchParams.set("state", t), n.searchParams.set("response_type", "code"), n.searchParams.set("code_challenge", s), n.searchParams.set("code_challenge_method", "S256"), n.toString();
1049
1028
  }
1050
- async function ir({
1029
+ async function rr({
1051
1030
  code: r,
1052
1031
  clientId: t,
1053
1032
  verifier: s,
@@ -1058,8 +1037,8 @@ async function ir({
1058
1037
  method: "POST",
1059
1038
  headers: {
1060
1039
  "Content-type": "application/json",
1061
- "Instant-Platform-Version": je,
1062
- "Instant-Core-Version": je
1040
+ "Instant-Platform-Version": Re,
1041
+ "Instant-Core-Version": Re
1063
1042
  },
1064
1043
  body: JSON.stringify({
1065
1044
  grant_type: "authorization_code",
@@ -1093,7 +1072,7 @@ async function ir({
1093
1072
  expiresAt: new Date(Date.now() + (n.expires_in - 30) * 1e3)
1094
1073
  };
1095
1074
  }
1096
- function rr() {
1075
+ function ar() {
1097
1076
  if (typeof window > "u")
1098
1077
  throw new Error("This function may only be used in a browser context.");
1099
1078
  const r = new URL(window.location.href).searchParams, t = r.get("state"), s = r.get("error"), e = r.get("error_description"), i = r.get("code");
@@ -1112,7 +1091,7 @@ function rr() {
1112
1091
  a.close();
1113
1092
  };
1114
1093
  }
1115
- function ar({
1094
+ function nr({
1116
1095
  clientId: r,
1117
1096
  apiURI: t,
1118
1097
  redirectUri: s,
@@ -1122,7 +1101,7 @@ function ar({
1122
1101
  throw new Error("OAuth flow can only be started on the client.");
1123
1102
  const i = hs;
1124
1103
  i && i.close();
1125
- const a = crypto.randomUUID(), n = Yi(), o = new BroadcastChannel(a), c = new Promise(
1104
+ const a = crypto.randomUUID(), n = Qi(), o = new BroadcastChannel(a), c = new Promise(
1126
1105
  (l, p) => {
1127
1106
  o.addEventListener("message", async (d) => {
1128
1107
  if (d.data.type !== "oauth-redirect")
@@ -1136,7 +1115,7 @@ function ar({
1136
1115
  if (!(!f || f !== a)) {
1137
1116
  if (A)
1138
1117
  try {
1139
- const E = await ir({
1118
+ const E = await rr({
1140
1119
  clientId: r,
1141
1120
  code: A,
1142
1121
  verifier: n,
@@ -1171,10 +1150,10 @@ function ar({
1171
1150
  "",
1172
1151
  // A unqiue name prevents orphaned popups from stealing our window.open
1173
1152
  `instantdb_oauth_${Math.random()}`.replace(".", ""),
1174
- tr()
1153
+ sr()
1175
1154
  );
1176
- return h ? (hs = h, er(n).then((l) => {
1177
- const p = sr({
1155
+ return h ? (hs = h, tr(n).then((l) => {
1156
+ const p = ir({
1178
1157
  clientId: r,
1179
1158
  state: a,
1180
1159
  codeChallenge: l,
@@ -1187,15 +1166,6 @@ function ar({
1187
1166
  }
1188
1167
  class Dn {
1189
1168
  constructor(t) {
1190
- /** Redirect URI that the provider will call back into. */
1191
- m(this, "redirectUri");
1192
- /** OAuth client ID. */
1193
- m(this, "clientId");
1194
- /**
1195
- * Base URL for InstantDB’s REST API.
1196
- * Defaults to `https://api.instantdb.com`.
1197
- */
1198
- m(this, "apiURI");
1199
1169
  this.redirectUri = t.redirectUri, this.apiURI = t.apiURI ?? "https://api.instantdb.com", this.clientId = t.clientId;
1200
1170
  }
1201
1171
  /**
@@ -1223,7 +1193,7 @@ class Dn {
1223
1193
  * }
1224
1194
  */
1225
1195
  startClientOnlyFlow(t) {
1226
- return ar({
1196
+ return nr({
1227
1197
  clientId: this.clientId,
1228
1198
  apiURI: this.apiURI,
1229
1199
  redirectUri: this.redirectUri,
@@ -1251,10 +1221,10 @@ class Dn {
1251
1221
  * ```
1252
1222
  */
1253
1223
  handleClientRedirect() {
1254
- return rr();
1224
+ return ar();
1255
1225
  }
1256
1226
  }
1257
- function On(r, t) {
1227
+ function Ln(r, t) {
1258
1228
  const s = r && Object.keys(r).length ? JSON.stringify(r, null, 2) : `{
1259
1229
  /**
1260
1230
  * Welcome to Instant's permission system!
@@ -1286,10 +1256,10 @@ export default rules;
1286
1256
  function qe(r) {
1287
1257
  return Object.entries(r).sort(([t], [s]) => t.localeCompare(s));
1288
1258
  }
1289
- function nr(r) {
1259
+ function or(r) {
1290
1260
  return r.charAt(0).toUpperCase() + r.slice(1);
1291
1261
  }
1292
- const or = {
1262
+ const cr = {
1293
1263
  "many-false": ["many", "many"],
1294
1264
  "one-true": ["one", "one"],
1295
1265
  "many-true": ["many", "one"],
@@ -1307,29 +1277,29 @@ function zs(r, t, s = t) {
1307
1277
  const e = r.join(t);
1308
1278
  return r.length ? e + s : e;
1309
1279
  }
1310
- function cr(r) {
1280
+ function hr(r) {
1311
1281
  if (r.catalog === "system")
1312
1282
  return null;
1313
1283
  const t = r["inferred-types"];
1314
1284
  return (t == null ? void 0 : t.length) === 1 ? t[0] : null;
1315
1285
  }
1316
- function hr(r, t) {
1286
+ function lr(r, t) {
1317
1287
  if (r["checked-data-type"])
1318
1288
  return { type: r["checked-data-type"], origin: "checked" };
1319
- const s = cr(r);
1289
+ const s = hr(r);
1320
1290
  return s && !t ? { type: s, origin: "inferred" } : { type: "any", origin: "unknown" };
1321
1291
  }
1322
1292
  function $t(r) {
1323
1293
  return `"${r}"`;
1324
1294
  }
1325
- function lr([r, t]) {
1295
+ function ur([r, t]) {
1326
1296
  var n;
1327
1297
  const s = ((n = t.metadata.derivedType) == null ? void 0 : n.type) || t.valueType || "any", e = t.config.unique ? ".unique()" : "", i = t.config.indexed ? ".indexed()" : "", a = t.required ? "" : ".optional()";
1328
1298
  return `${$t(r)}: i.${s}()${e}${i}${a}`;
1329
1299
  }
1330
1300
  function kt(r, t) {
1331
1301
  const s = zs(
1332
- qe(t.attrs).map(lr),
1302
+ qe(t.attrs).map(ur),
1333
1303
  `,
1334
1304
  `,
1335
1305
  ","
@@ -1338,42 +1308,42 @@ function kt(r, t) {
1338
1308
  ` : ""}${ze(s, 2)}${s.length ? `
1339
1309
  ` : ""}})`;
1340
1310
  }
1341
- function ur(r) {
1311
+ function pr(r) {
1342
1312
  return r[1];
1343
1313
  }
1344
- function pr(r) {
1314
+ function fr(r) {
1345
1315
  return r[2];
1346
1316
  }
1347
1317
  function he(r) {
1348
- return `${ur(r)}.${pr(r)}`;
1318
+ return `${pr(r)}.${fr(r)}`;
1349
1319
  }
1350
1320
  function Vs(r) {
1351
1321
  var t;
1352
1322
  return (t = r["forward-identity"]) == null ? void 0 : t[2];
1353
1323
  }
1354
- function fr(r) {
1324
+ function dr(r) {
1355
1325
  var t;
1356
1326
  return (t = r["forward-identity"]) == null ? void 0 : t[1];
1357
1327
  }
1358
- function dr(r) {
1328
+ function mr(r) {
1359
1329
  var t;
1360
1330
  return (t = r["reverse-identity"]) == null ? void 0 : t[2];
1361
1331
  }
1362
- function mr(r) {
1332
+ function yr(r) {
1363
1333
  var t;
1364
1334
  return (t = r["reverse-identity"]) == null ? void 0 : t[1];
1365
1335
  }
1366
1336
  function ls(r) {
1367
- return `${fr(r)}.${Vs(r)}`;
1337
+ return `${dr(r)}.${Vs(r)}`;
1368
1338
  }
1369
- function yr(r) {
1339
+ function xr(r) {
1370
1340
  if (r["reverse-identity"])
1371
- return `${mr(r)}.${dr(r)}`;
1341
+ return `${yr(r)}.${mr(r)}`;
1372
1342
  }
1373
- function xr(r, t) {
1343
+ function Pr(r, t) {
1374
1344
  return t === 1 ? r : r + "s";
1375
1345
  }
1376
- function Pr(r) {
1346
+ function br(r) {
1377
1347
  let t = "{";
1378
1348
  if (r.presence && (t += `
1379
1349
  ${ze(kt("presence", r.presence), 4)},`), r.topics) {
@@ -1392,11 +1362,11 @@ function gr(r) {
1392
1362
  let t = "{";
1393
1363
  for (const [s, e] of Object.entries(r))
1394
1364
  t += `
1395
- ${$t(s)}: ${Pr(e)},`;
1365
+ ${$t(s)}: ${br(e)},`;
1396
1366
  return t += t === "{" ? "}" : `
1397
1367
  }`, t;
1398
1368
  }
1399
- function Ln(r, t, s) {
1369
+ function Mn(r, t, s) {
1400
1370
  var d;
1401
1371
  const e = zs(
1402
1372
  qe(t.entities).map(
@@ -1411,7 +1381,7 @@ function Ln(r, t, s) {
1411
1381
  ((d = x.metadata.derivedType) == null ? void 0 : d.origin) === "inferred" && i.push(x);
1412
1382
  const a = `{
1413
1383
  ${ze(e, 2)}
1414
- }`, n = i.length > 0 ? `// We inferred ${i.length} ${xr("attribute", i.length)}!
1384
+ }`, n = i.length > 0 ? `// We inferred ${i.length} ${Pr("attribute", i.length)}!
1415
1385
  // Take a look at this schema, and if everything looks good,
1416
1386
  // run \`push schema\` again to enforce the types.` : "", o = JSON.stringify(t.links, null, 2).trim(), c = (r == null ? void 0 : r.rooms) || {}, h = gr(c), l = (f, x, A) => {
1417
1387
  const F = A ? `${A}
@@ -1437,23 +1407,23 @@ export type { AppSchema }
1437
1407
  export default schema;
1438
1408
  `;
1439
1409
  }
1440
- class ge extends Error {
1410
+ class be extends Error {
1441
1411
  constructor(t) {
1442
1412
  super(t), this.name = "SchemaValidationError";
1443
1413
  }
1444
1414
  }
1445
- const Mn = (r, t) => {
1415
+ const Fn = (r, t) => {
1446
1416
  const s = Object.keys(r.entities);
1447
1417
  for (const [e, i] of Object.entries(r.entities))
1448
1418
  if (e.startsWith("$")) {
1449
1419
  if (!t[e])
1450
- throw new ge(
1420
+ throw new be(
1451
1421
  `The $ keyword is reserved for system namespaces.
1452
1422
  You can't create '${e}'. Perhaps call it '${e.slice(1)}' instead?`
1453
1423
  );
1454
1424
  for (const [a, n] of Object.entries(i.attrs))
1455
1425
  if (!t[e].has(a) && n.required)
1456
- throw new ge(
1426
+ throw new be(
1457
1427
  `The '${e}' namespace is managed by the system and can't modify required constraints yet.
1458
1428
  Make sure to set ${e}.${a} as optional.
1459
1429
  i.e { ${a}: i.${n.valueType}().optional() }`
@@ -1461,26 +1431,26 @@ Make sure to set ${e}.${a} as optional.
1461
1431
  }
1462
1432
  for (const e of Object.values(r.links)) {
1463
1433
  if (t[e.forward.on] && !t[e.forward.on].has(e.forward.label) && e.forward.required)
1464
- throw new ge(
1434
+ throw new be(
1465
1435
  `The ${e.forward.on} namespace is managed by the system and can't modify required constraints yet.
1466
1436
  Make sure to set ${e.forward.on}${e.forward.label} as 'optional'.
1467
1437
  i.e { 'on': '${e.forward.on}', 'label': ${e.forward.label}, 'required': false }`
1468
1438
  );
1469
1439
  if (e.forward.has === "many" && e.forward.onDelete === "cascade")
1470
- throw new ge(
1440
+ throw new be(
1471
1441
  `${e.forward.on}${e.forward.label} -> ${e.reverse.on}${e.reverse.label} has onDelete: "cascade" with has: "many"`
1472
1442
  );
1473
1443
  if (e.reverse.has === "many" && e.reverse.onDelete === "cascade")
1474
- throw new ge(
1444
+ throw new be(
1475
1445
  `${e.forward.on}${e.forward.label} -> ${e.reverse.on}${e.reverse.label} has onDelete: "cascade" with has: "many"`
1476
1446
  );
1477
1447
  const i = `${e.forward.on}${e.forward.label} -> ${e.reverse.on}${e.reverse.label}`;
1478
1448
  if (!s.includes(e.forward.on))
1479
- throw new ge(
1449
+ throw new be(
1480
1450
  `${i} connects to non existing entity "${e.forward.on}".`
1481
1451
  );
1482
1452
  if (!s.includes(e.reverse.on))
1483
- throw new ge(
1453
+ throw new be(
1484
1454
  `${i} connects to non existing entity "${e.forward.on}".`
1485
1455
  );
1486
1456
  }
@@ -1491,17 +1461,17 @@ class Hs {
1491
1461
  oe(this, Y, []);
1492
1462
  oe(this, W, null);
1493
1463
  oe(this, ht, (t) => {
1494
- if (!w(this, W))
1495
- for (const s of w(this, Y))
1464
+ if (!T(this, W))
1465
+ for (const s of T(this, Y))
1496
1466
  try {
1497
1467
  s.next && s.next(t);
1498
1468
  } catch {
1499
1469
  }
1500
1470
  });
1501
1471
  oe(this, lt, (t) => {
1502
- if (!w(this, W)) {
1472
+ if (!T(this, W)) {
1503
1473
  ce(this, W, { type: "error", error: t });
1504
- for (const s of w(this, Y))
1474
+ for (const s of T(this, Y))
1505
1475
  try {
1506
1476
  s.error && s.error(t);
1507
1477
  } catch {
@@ -1510,9 +1480,9 @@ class Hs {
1510
1480
  }
1511
1481
  });
1512
1482
  oe(this, ut, (t) => {
1513
- if (!w(this, W)) {
1483
+ if (!T(this, W)) {
1514
1484
  ce(this, W, { type: "complete", result: t });
1515
- for (const s of w(this, Y))
1485
+ for (const s of T(this, Y))
1516
1486
  try {
1517
1487
  s.complete && s.complete(t);
1518
1488
  } catch {
@@ -1520,19 +1490,19 @@ class Hs {
1520
1490
  ce(this, Y, []);
1521
1491
  }
1522
1492
  });
1523
- t(w(this, ht), w(this, ut), w(this, lt));
1493
+ t(T(this, ht), T(this, ut), T(this, lt));
1524
1494
  }
1525
1495
  subscribe(t) {
1526
- if (w(this, W)) {
1496
+ if (T(this, W)) {
1527
1497
  const s = { unsubscribe: () => null };
1528
- if (w(this, W).type === "error")
1529
- return t.error && t.error(w(this, W).error), s;
1530
- if (w(this, W).type === "complete")
1531
- return t.complete && t.complete(w(this, W).result), s;
1498
+ if (T(this, W).type === "error")
1499
+ return t.error && t.error(T(this, W).error), s;
1500
+ if (T(this, W).type === "complete")
1501
+ return t.complete && t.complete(T(this, W).result), s;
1532
1502
  }
1533
- return w(this, Y).push(t), {
1503
+ return T(this, Y).push(t), {
1534
1504
  unsubscribe: () => {
1535
- ce(this, Y, w(this, Y).filter((s) => s !== t));
1505
+ ce(this, Y, T(this, Y).filter((s) => s !== t));
1536
1506
  }
1537
1507
  };
1538
1508
  }
@@ -1547,7 +1517,7 @@ class Hs {
1547
1517
  }
1548
1518
  }
1549
1519
  Y = new WeakMap(), W = new WeakMap(), ht = new WeakMap(), lt = new WeakMap(), ut = new WeakMap();
1550
- async function Fn({
1520
+ async function Bn({
1551
1521
  code: r,
1552
1522
  clientId: t,
1553
1523
  clientSecret: s,
@@ -1592,7 +1562,7 @@ async function Fn({
1592
1562
  tokenType: n.token_type
1593
1563
  };
1594
1564
  }
1595
- async function br({
1565
+ async function wr({
1596
1566
  clientId: r,
1597
1567
  clientSecret: t,
1598
1568
  refreshToken: s,
@@ -1618,10 +1588,10 @@ async function br({
1618
1588
  async function H(r, t) {
1619
1589
  const s = {
1620
1590
  ...(t == null ? void 0 : t.headers) || {},
1621
- "Instant-Platform-Version": je,
1622
- "Instant-Core-Version": je,
1591
+ "Instant-Platform-Version": Re,
1592
+ "Instant-Core-Version": Re,
1623
1593
  "X-Instant-Source": "platform-sdk",
1624
- "X-Instant-Version": je
1594
+ "X-Instant-Version": Re
1625
1595
  }, e = await fetch(r, { ...t, headers: s });
1626
1596
  if (e.status === 200) {
1627
1597
  const a = await e.json();
@@ -1662,25 +1632,25 @@ function Tr(r) {
1662
1632
  }
1663
1633
  }
1664
1634
  }
1665
- function wr(r, t) {
1666
- const s = hr(r, t == null ? void 0 : t.disableTypeInference);
1635
+ function Ar(r, t) {
1636
+ const s = lr(r, t == null ? void 0 : t.disableTypeInference);
1667
1637
  let e = Tr(
1668
1638
  s.type
1669
1639
  );
1670
1640
  return r["unique?"] && (e = e.unique()), r["index?"] && (e = e.indexed()), r["required?"] || (e = e.optional()), e.metadata.derivedType = s, e;
1671
1641
  }
1672
- function Ar(r, t) {
1642
+ function Sr(r, t) {
1673
1643
  const s = {};
1674
1644
  for (const [e, i] of qe(r))
1675
- e !== "id" && (s[e] = wr(i, t));
1645
+ e !== "id" && (s[e] = Ar(i, t));
1676
1646
  return q.entity(s);
1677
1647
  }
1678
- function Sr(r) {
1648
+ function Ir(r) {
1679
1649
  const [, t, s] = r["forward-identity"];
1680
- return `${t}${nr(s)}`;
1650
+ return `${t}${or(s)}`;
1681
1651
  }
1682
- function Ir(r) {
1683
- const [, t, s] = r["forward-identity"], [, e, i] = r["reverse-identity"], [a, n] = or[`${r.cardinality}-${r["unique?"]}`];
1652
+ function Er(r) {
1653
+ const [, t, s] = r["forward-identity"], [, e, i] = r["reverse-identity"], [a, n] = cr[`${r.cardinality}-${r["unique?"]}`];
1684
1654
  return {
1685
1655
  forward: {
1686
1656
  on: t,
@@ -1700,10 +1670,10 @@ function Ir(r) {
1700
1670
  function nt(r, t) {
1701
1671
  const s = {};
1702
1672
  for (const [i, a] of qe(r.blobs))
1703
- s[i] = Ar(a, t);
1673
+ s[i] = Sr(a, t);
1704
1674
  const e = {};
1705
1675
  for (const [i, a] of qe(r.refs)) {
1706
- const n = Ir(a), o = Sr(a);
1676
+ const n = Er(a), o = Ir(a);
1707
1677
  e[o] = n;
1708
1678
  }
1709
1679
  return q.schema({ entities: s, links: e });
@@ -1722,14 +1692,14 @@ function ye(r) {
1722
1692
  } : {};
1723
1693
  return { ...t, ...s, ...e };
1724
1694
  }
1725
- function Er(r) {
1695
+ function Cr(r) {
1726
1696
  return {
1727
1697
  id: r.id,
1728
1698
  title: r.title,
1729
1699
  createdAt: new Date(r.created_at)
1730
1700
  };
1731
1701
  }
1732
- async function Cr(r, t, s) {
1702
+ async function Nr(r, t, s) {
1733
1703
  const e = new URL(`${r}/superadmin/apps`), i = [];
1734
1704
  return s != null && s.includePerms && i.push("perms"), s != null && s.includeSchema && i.push("schema"), i.length && e.searchParams.set("include", i.join(",")), { apps: (await H(
1735
1705
  e.toString(),
@@ -1741,16 +1711,16 @@ async function Cr(r, t, s) {
1741
1711
  }
1742
1712
  )).apps.map(ye) };
1743
1713
  }
1744
- async function Nr(r, t) {
1714
+ async function kr(r, t) {
1745
1715
  const s = new URL(`${r}/superadmin/orgs`);
1746
1716
  return { orgs: (await H(s.toString(), {
1747
1717
  method: "GET",
1748
1718
  headers: {
1749
1719
  Authorization: `Bearer ${t}`
1750
1720
  }
1751
- })).orgs.map(Er) };
1721
+ })).orgs.map(Cr) };
1752
1722
  }
1753
- async function kr(r, t, s, e) {
1723
+ async function vr(r, t, s, e) {
1754
1724
  const i = new URL(`${r}/superadmin/orgs/${s}/apps`), a = [];
1755
1725
  return e != null && e.includePerms && a.push("perms"), e != null && e.includeSchema && a.push("schema"), a.length && i.searchParams.set("include", a.join(",")), { apps: (await H(
1756
1726
  i.toString(),
@@ -1785,7 +1755,7 @@ async function Ks(r, t, s) {
1785
1755
  }
1786
1756
  );
1787
1757
  }
1788
- async function vr(r, t, s, e) {
1758
+ async function Or(r, t, s, e) {
1789
1759
  let i = null, a = null;
1790
1760
  e != null && e.includePerms && (i = Ks(r, t, s)), e != null && e.includeSchema && (a = qt(r, t, s));
1791
1761
  const { app: n } = await H(
@@ -1823,7 +1793,7 @@ async function Dr(r, t, s) {
1823
1793
  }
1824
1794
  };
1825
1795
  }
1826
- async function Or(r, t) {
1796
+ async function Lr(r, t) {
1827
1797
  const s = await H(
1828
1798
  `${r}/dash/apps/ephemeral`,
1829
1799
  {
@@ -1842,7 +1812,7 @@ async function Or(r, t) {
1842
1812
  expiresMs: s.expires_ms
1843
1813
  };
1844
1814
  }
1845
- async function Lr(r, t, s, e) {
1815
+ async function Mr(r, t, s, e) {
1846
1816
  const { app: i } = await H(
1847
1817
  `${r}/superadmin/apps/${s}`,
1848
1818
  {
@@ -1856,7 +1826,7 @@ async function Lr(r, t, s, e) {
1856
1826
  );
1857
1827
  return { app: ye(i) };
1858
1828
  }
1859
- async function Mr(r, t, s) {
1829
+ async function Fr(r, t, s) {
1860
1830
  const { app: e } = await H(
1861
1831
  `${r}/superadmin/apps/${s}`,
1862
1832
  {
@@ -1874,7 +1844,7 @@ function vt(r) {
1874
1844
  switch (t) {
1875
1845
  case "add-attr": {
1876
1846
  const e = s, i = ls(e);
1877
- return { type: "add-attr", friendlyDescription: e["value-type"] === "blob" ? Vs(e) === "id" ? `Create new entity ${i}.` : `Add attribute ${i}.` : `Link ${i} to ${yr(e)}.`, attr: e };
1847
+ return { type: "add-attr", friendlyDescription: e["value-type"] === "blob" ? Vs(e) === "id" ? `Create new entity ${i}.` : `Add attribute ${i}.` : `Link ${i} to ${xr(e)}.`, attr: e };
1878
1848
  }
1879
1849
  case "update-attr": {
1880
1850
  const e = s;
@@ -1957,10 +1927,10 @@ function vt(r) {
1957
1927
  }
1958
1928
  }
1959
1929
  }
1960
- function Fr(r) {
1930
+ function Br(r) {
1961
1931
  return r.map((t) => vt(t));
1962
1932
  }
1963
- function Br(r, t) {
1933
+ function _r(r, t) {
1964
1934
  const [s, e] = r;
1965
1935
  if (s === "add-attr" || s === "update-attr") {
1966
1936
  const c = vt(r);
@@ -1968,13 +1938,13 @@ function Br(r, t) {
1968
1938
  throw new Error("Invalid step.");
1969
1939
  return c;
1970
1940
  }
1971
- const i = e["job-id"], a = t.find((c) => c.id === i), n = vt(r), o = _r(a);
1941
+ const i = e["job-id"], a = t.find((c) => c.id === i), n = vt(r), o = Ur(a);
1972
1942
  if (n.type !== o.type)
1973
1943
  throw new Error("Invalid type");
1974
1944
  return { ...n, backgroundJob: o };
1975
1945
  }
1976
1946
  function Pt(r, t) {
1977
- return r.map((s) => Br(s, t));
1947
+ return r.map((s) => _r(s, t));
1978
1948
  }
1979
1949
  async function Rr(r, t, s, e) {
1980
1950
  const i = await H(
@@ -1995,7 +1965,7 @@ async function Rr(r, t, s, e) {
1995
1965
  return {
1996
1966
  newSchema: nt(i["new-schema"]),
1997
1967
  currentSchema: nt(i["current-schema"]),
1998
- steps: Fr(i.steps)
1968
+ steps: Br(i.steps)
1999
1969
  };
2000
1970
  }
2001
1971
  function us(r) {
@@ -2040,7 +2010,7 @@ async function jr(r, t, s, e, i, a) {
2040
2010
  }
2041
2011
  return o;
2042
2012
  }
2043
- function _r(r) {
2013
+ function Ur(r) {
2044
2014
  var s;
2045
2015
  const t = {
2046
2016
  id: r.id,
@@ -2098,7 +2068,7 @@ function fs(r) {
2098
2068
  erroredSteps: e
2099
2069
  };
2100
2070
  }
2101
- function Ur(r, t, s, e) {
2071
+ function $r(r, t, s, e) {
2102
2072
  return new Hs(async (i, a, n) => {
2103
2073
  try {
2104
2074
  const o = await H(
@@ -2135,7 +2105,7 @@ function Ur(r, t, s, e) {
2135
2105
  }
2136
2106
  });
2137
2107
  }
2138
- async function $r(r, t, s, e) {
2108
+ async function qr(r, t, s, e) {
2139
2109
  return { perms: (await H(
2140
2110
  `${r}/superadmin/apps/${s}/perms`,
2141
2111
  {
@@ -2148,7 +2118,7 @@ async function $r(r, t, s, e) {
2148
2118
  }
2149
2119
  )).rules.code };
2150
2120
  }
2151
- async function qr(r, t) {
2121
+ async function zr(r, t) {
2152
2122
  const s = await H(`${r}/platform/oauth/token-info?access_token=${t}`, {
2153
2123
  method: "GET"
2154
2124
  });
@@ -2163,8 +2133,8 @@ class Ie extends Error {
2163
2133
  super("PlatformApi was not provided auth.");
2164
2134
  }
2165
2135
  }
2166
- var D, j;
2167
- class Bn {
2136
+ var O, R;
2137
+ class _n {
2168
2138
  /**
2169
2139
  * @param config – Runtime configuration.
2170
2140
  * @param config.auth.token – OAuth access-token obtained via the oauth flow
@@ -2172,34 +2142,34 @@ class Bn {
2172
2142
  * @throws {Error} When `token` is missing.
2173
2143
  */
2174
2144
  constructor(t) {
2175
- oe(this, D);
2176
- oe(this, j);
2177
- ce(this, D, t == null ? void 0 : t.auth), ce(this, j, (t == null ? void 0 : t.apiURI) || "https://api.instantdb.com");
2145
+ oe(this, O);
2146
+ oe(this, R);
2147
+ ce(this, O, t == null ? void 0 : t.auth), ce(this, R, (t == null ? void 0 : t.apiURI) || "https://api.instantdb.com");
2178
2148
  }
2179
2149
  token() {
2180
- if (!w(this, D))
2150
+ if (!T(this, O))
2181
2151
  throw new Ie();
2182
- return "token" in w(this, D) ? w(this, D).token : w(this, D).accessToken;
2152
+ return "token" in T(this, O) ? T(this, O).token : T(this, O).accessToken;
2183
2153
  }
2184
2154
  canRefreshToken() {
2185
- if (!w(this, D))
2155
+ if (!T(this, O))
2186
2156
  throw new Ie();
2187
- return "refreshToken" in w(this, D) && "clientId" in w(this, D) && "clientSecret" in w(this, D) && w(this, D).refreshToken != null && w(this, D).clientId != null && w(this, D).clientSecret != null;
2157
+ return "refreshToken" in T(this, O) && "clientId" in T(this, O) && "clientSecret" in T(this, O) && T(this, O).refreshToken != null && T(this, O).clientId != null && T(this, O).clientSecret != null;
2188
2158
  }
2189
2159
  async refreshToken() {
2190
- if (!w(this, D))
2160
+ if (!T(this, O))
2191
2161
  throw new Ie();
2192
2162
  if (!this.canRefreshToken() || // Checked in canRefreshToken, but this lets
2193
2163
  // typescript refine this.#auth here
2194
- !("clientId" in w(this, D)))
2164
+ !("clientId" in T(this, O)))
2195
2165
  return null;
2196
- const t = await br({
2197
- apiURI: w(this, j),
2198
- clientId: w(this, D).clientId,
2199
- clientSecret: w(this, D).clientSecret,
2200
- refreshToken: w(this, D).refreshToken
2166
+ const t = await wr({
2167
+ apiURI: T(this, R),
2168
+ clientId: T(this, O).clientId,
2169
+ clientSecret: T(this, O).clientSecret,
2170
+ refreshToken: T(this, O).refreshToken
2201
2171
  });
2202
- return w(this, D).accessToken = t.accessToken, w(this, D).onRefresh && await w(this, D).onRefresh(t), t;
2172
+ return T(this, O).accessToken = t.accessToken, T(this, O).onRefresh && await T(this, O).onRefresh(t), t;
2203
2173
  }
2204
2174
  async withRetry(t, s) {
2205
2175
  var c, h;
@@ -2238,7 +2208,7 @@ class Bn {
2238
2208
  * according to `Opts`.
2239
2209
  */
2240
2210
  async getApp(t, s) {
2241
- return this.withRetry(vr, [w(this, j), this.token(), t, s]);
2211
+ return this.withRetry(Or, [T(this, R), this.token(), t, s]);
2242
2212
  }
2243
2213
  /**
2244
2214
  * List **all apps** owned by the auth owner.
@@ -2255,7 +2225,7 @@ class Bn {
2255
2225
  * @returns An array wrapper; each element’s shape follows `Opts`.
2256
2226
  */
2257
2227
  async getApps(t) {
2258
- return this.withRetry(Cr, [w(this, j), this.token(), t]);
2228
+ return this.withRetry(Nr, [T(this, R), this.token(), t]);
2259
2229
  }
2260
2230
  /**
2261
2231
  * List **all orgs** that the auth owner is a member of.
@@ -2267,7 +2237,7 @@ class Bn {
2267
2237
  * @returns An array of orgs
2268
2238
  */
2269
2239
  async getOrgs() {
2270
- return this.withRetry(Nr, [w(this, j), this.token()]);
2240
+ return this.withRetry(kr, [T(this, R), this.token()]);
2271
2241
  }
2272
2242
  /**
2273
2243
  * List **all apps** owned by the auth owner.
@@ -2284,8 +2254,8 @@ class Bn {
2284
2254
  * @returns An array wrapper; each element’s shape follows `Opts`.
2285
2255
  */
2286
2256
  async getAppsForOrg(t, s) {
2287
- return this.withRetry(kr, [
2288
- w(this, j),
2257
+ return this.withRetry(vr, [
2258
+ T(this, R),
2289
2259
  this.token(),
2290
2260
  t,
2291
2261
  s
@@ -2301,7 +2271,7 @@ class Bn {
2301
2271
  * @param appId -- UUID of the app
2302
2272
  */
2303
2273
  async getSchema(t) {
2304
- return this.withRetry(qt, [w(this, j), this.token(), t]);
2274
+ return this.withRetry(qt, [T(this, R), this.token(), t]);
2305
2275
  }
2306
2276
  /**
2307
2277
  * Gets the permissions for an app by its id.
@@ -2313,7 +2283,7 @@ class Bn {
2313
2283
  * @param appId -- UUID of the app
2314
2284
  */
2315
2285
  async getPerms(t) {
2316
- return this.withRetry(Ks, [w(this, j), this.token(), t]);
2286
+ return this.withRetry(Ks, [T(this, R), this.token(), t]);
2317
2287
  }
2318
2288
  /**
2319
2289
  * Create a new app.
@@ -2342,7 +2312,7 @@ class Bn {
2342
2312
  * @param fields.orgId -- Optional id of the org that the app will be placed in
2343
2313
  */
2344
2314
  async createApp(t) {
2345
- return this.withRetry(Dr, [w(this, j), this.token(), t]);
2315
+ return this.withRetry(Dr, [T(this, R), this.token(), t]);
2346
2316
  }
2347
2317
  /**
2348
2318
  * Create a new temporary app.
@@ -2367,7 +2337,7 @@ class Bn {
2367
2337
  * @param fields.perms -- Optional permissions for the app
2368
2338
  */
2369
2339
  async createTemporaryApp(t) {
2370
- return Or(w(this, j), t);
2340
+ return Lr(T(this, R), t);
2371
2341
  }
2372
2342
  /**
2373
2343
  * Update the title of an app by its id.
@@ -2382,8 +2352,8 @@ class Bn {
2382
2352
  * @param fields.title -- New title for the app
2383
2353
  */
2384
2354
  async updateApp(t, s) {
2385
- return this.withRetry(Lr, [
2386
- w(this, j),
2355
+ return this.withRetry(Mr, [
2356
+ T(this, R),
2387
2357
  this.token(),
2388
2358
  t,
2389
2359
  s
@@ -2399,7 +2369,7 @@ class Bn {
2399
2369
  * @param appId -- UUID of the app
2400
2370
  */
2401
2371
  async deleteApp(t) {
2402
- return this.withRetry(Mr, [w(this, j), this.token(), t]);
2372
+ return this.withRetry(Fr, [T(this, R), this.token(), t]);
2403
2373
  }
2404
2374
  /**
2405
2375
  * Dry-run a **schema push** and receive a _plan_ of steps the server would
@@ -2411,7 +2381,7 @@ class Bn {
2411
2381
  */
2412
2382
  async planSchemaPush(t, s) {
2413
2383
  return this.withRetry(Rr, [
2414
- w(this, j),
2384
+ T(this, R),
2415
2385
  this.token(),
2416
2386
  t,
2417
2387
  s
@@ -2444,7 +2414,7 @@ class Bn {
2444
2414
  * ```
2445
2415
  */
2446
2416
  schemaPush(t, s) {
2447
- if (!w(this, D))
2417
+ if (!T(this, O))
2448
2418
  throw new Ie();
2449
2419
  return new Hs(async (e, i, a) => {
2450
2420
  if (this.canRefreshToken())
@@ -2452,7 +2422,7 @@ class Bn {
2452
2422
  await this.refreshToken();
2453
2423
  } catch {
2454
2424
  }
2455
- Ur(w(this, j), this.token(), t, s).subscribe({
2425
+ $r(T(this, R), this.token(), t, s).subscribe({
2456
2426
  complete(n) {
2457
2427
  i(n);
2458
2428
  },
@@ -2480,18 +2450,18 @@ class Bn {
2480
2450
  * ```
2481
2451
  */
2482
2452
  async pushPerms(t, s) {
2483
- if (!w(this, D))
2453
+ if (!T(this, O))
2484
2454
  throw new Ie();
2485
- return this.withRetry($r, [w(this, j), this.token(), t, s]);
2455
+ return this.withRetry(qr, [T(this, R), this.token(), t, s]);
2486
2456
  }
2487
2457
  async tokenInfo() {
2488
- if (!w(this, D))
2458
+ if (!T(this, O))
2489
2459
  throw new Ie();
2490
- return this.withRetry(qr, [w(this, j), this.token()]);
2460
+ return this.withRetry(zr, [T(this, R), this.token()]);
2491
2461
  }
2492
2462
  }
2493
- D = new WeakMap(), j = new WeakMap();
2494
- function zr(r, t) {
2463
+ O = new WeakMap(), R = new WeakMap();
2464
+ function Vr(r, t) {
2495
2465
  if (r == null) return {};
2496
2466
  var s = {};
2497
2467
  for (var e in r) if ({}.hasOwnProperty.call(r, e)) {
@@ -2526,7 +2496,7 @@ function G(r, t) {
2526
2496
  return new fe(s, e + t, i + t);
2527
2497
  }
2528
2498
  const ds = "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED";
2529
- var Vr = {
2499
+ var Hr = {
2530
2500
  ImportMetaOutsideModule: {
2531
2501
  message: `import.meta may appear only with 'sourceType: "module"'`,
2532
2502
  code: ds
@@ -2561,7 +2531,7 @@ const ms = {
2561
2531
  VariableDeclarator: "variable declaration",
2562
2532
  YieldExpression: "yield expression"
2563
2533
  }, Qe = (r) => r.type === "UpdateExpression" ? ms.UpdateExpression[`${r.prefix}`] : ms[r.type];
2564
- var Hr = {
2534
+ var Kr = {
2565
2535
  AccessorIsGenerator: ({
2566
2536
  kind: r
2567
2537
  }) => `A ${r}ter cannot be a generator.`,
@@ -2775,7 +2745,7 @@ var Hr = {
2775
2745
  YieldInParameter: "Yield expression is not allowed in formal parameters.",
2776
2746
  YieldNotInGeneratorFunction: "'yield' is only allowed within generator functions.",
2777
2747
  ZeroDigitNumericSeparator: "Numeric separator can not be used after leading 0."
2778
- }, Kr = {
2748
+ }, Jr = {
2779
2749
  StrictDelete: "Deleting local variable in strict mode.",
2780
2750
  StrictEvalArguments: ({
2781
2751
  referenceName: r
@@ -2787,14 +2757,14 @@ var Hr = {
2787
2757
  StrictNumericEscape: "The only valid numeric escape in strict mode is '\\0'.",
2788
2758
  StrictOctalLiteral: "Legacy octal literals are not allowed in strict mode.",
2789
2759
  StrictWith: "'with' in strict mode."
2790
- }, Jr = {
2760
+ }, Wr = {
2791
2761
  ParseExpressionEmptyInput: "Unexpected parseExpression() input: The input is empty or contains only comments.",
2792
2762
  ParseExpressionExpectsEOF: ({
2793
2763
  unexpected: r
2794
2764
  }) => `Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(r)}\`.`
2795
2765
  };
2796
- const Wr = /* @__PURE__ */ new Set(["ArrowFunctionExpression", "AssignmentExpression", "ConditionalExpression", "YieldExpression"]);
2797
- var Xr = Object.assign({
2766
+ const Xr = /* @__PURE__ */ new Set(["ArrowFunctionExpression", "AssignmentExpression", "ConditionalExpression", "YieldExpression"]);
2767
+ var Gr = Object.assign({
2798
2768
  PipeBodyIsTighter: "Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",
2799
2769
  PipeTopicRequiresHackPipes: 'Topic references are only supported when using the `"proposal": "hack"` version of the pipeline proposal.',
2800
2770
  PipeTopicUnbound: "Topic reference is unbound; it must be inside a pipe body.",
@@ -2808,7 +2778,7 @@ var Xr = Object.assign({
2808
2778
  type: r
2809
2779
  })}; please wrap it in parentheses.`
2810
2780
  }, {});
2811
- const Gr = ["message"];
2781
+ const Yr = ["message"];
2812
2782
  function ys(r, t, s) {
2813
2783
  Object.defineProperty(r, t, {
2814
2784
  enumerable: !1,
@@ -2816,7 +2786,7 @@ function ys(r, t, s) {
2816
2786
  value: s
2817
2787
  });
2818
2788
  }
2819
- function Yr({
2789
+ function Qr({
2820
2790
  toMessage: r,
2821
2791
  code: t,
2822
2792
  reasonCode: s,
@@ -2858,8 +2828,8 @@ function te(r, t) {
2858
2828
  message: i
2859
2829
  } : i, {
2860
2830
  message: n
2861
- } = a, o = zr(a, Gr), c = typeof n == "string" ? () => n : n;
2862
- s[e] = Yr(Object.assign({
2831
+ } = a, o = Vr(a, Yr), c = typeof n == "string" ? () => n : n;
2832
+ s[e] = Qr(Object.assign({
2863
2833
  code: "BABEL_PARSER_SYNTAX_ERROR",
2864
2834
  reasonCode: e,
2865
2835
  toMessage: c
@@ -2869,8 +2839,8 @@ function te(r, t) {
2869
2839
  }
2870
2840
  return s;
2871
2841
  }
2872
- const u = Object.assign({}, te(Vr), te(Hr), te(Kr), te(Jr), te`pipelineOperator`(Xr));
2873
- function Qr() {
2842
+ const u = Object.assign({}, te(Hr), te(Kr), te(Jr), te(Wr), te`pipelineOperator`(Gr));
2843
+ function Zr() {
2874
2844
  return {
2875
2845
  sourceType: "script",
2876
2846
  sourceFilename: void 0,
@@ -2895,8 +2865,8 @@ function Qr() {
2895
2865
  annexB: !0
2896
2866
  };
2897
2867
  }
2898
- function Zr(r) {
2899
- const t = Qr();
2868
+ function ea(r) {
2869
+ const t = Zr();
2900
2870
  if (r == null)
2901
2871
  return t;
2902
2872
  if (r.annexB != null && r.annexB !== !1)
@@ -2910,20 +2880,20 @@ function Zr(r) {
2910
2880
  return t;
2911
2881
  }
2912
2882
  const {
2913
- defineProperty: ea
2883
+ defineProperty: ta
2914
2884
  } = Object, xs = (r, t) => {
2915
- r && ea(r, t, {
2885
+ r && ta(r, t, {
2916
2886
  enumerable: !1,
2917
2887
  value: r[t]
2918
2888
  });
2919
2889
  };
2920
- function Oe(r) {
2890
+ function De(r) {
2921
2891
  return xs(r.loc.start, "index"), xs(r.loc.end, "index"), r;
2922
2892
  }
2923
- var ta = (r) => class extends r {
2893
+ var sa = (r) => class extends r {
2924
2894
  parse() {
2925
- const s = Oe(super.parse());
2926
- return this.optionFlags & 256 && (s.tokens = s.tokens.map(Oe)), s;
2895
+ const s = De(super.parse());
2896
+ return this.optionFlags & 256 && (s.tokens = s.tokens.map(De)), s;
2927
2897
  }
2928
2898
  parseRegExpLiteral({
2929
2899
  pattern: s,
@@ -3141,17 +3111,17 @@ var ta = (r) => class extends r {
3141
3111
  return s.type === "Literal" ? this.cloneEstreeStringLiteral(s) : super.cloneStringLiteral(s);
3142
3112
  }
3143
3113
  finishNodeAt(s, e, i) {
3144
- return Oe(super.finishNodeAt(s, e, i));
3114
+ return De(super.finishNodeAt(s, e, i));
3145
3115
  }
3146
3116
  finishNode(s, e) {
3147
3117
  const i = super.finishNode(s, e);
3148
3118
  return this.fillOptionalPropertiesForTSESLint(i), i;
3149
3119
  }
3150
3120
  resetStartLocation(s, e) {
3151
- super.resetStartLocation(s, e), Oe(s);
3121
+ super.resetStartLocation(s, e), De(s);
3152
3122
  }
3153
3123
  resetEndLocation(s, e = this.state.lastTokEndLoc) {
3154
- super.resetEndLocation(s, e), Oe(s);
3124
+ super.resetEndLocation(s, e), De(s);
3155
3125
  }
3156
3126
  };
3157
3127
  class Ke {
@@ -3161,12 +3131,12 @@ class Ke {
3161
3131
  this.token = t, this.preserveSpace = !!s;
3162
3132
  }
3163
3133
  }
3164
- const O = {
3134
+ const D = {
3165
3135
  brace: new Ke("{"),
3166
3136
  j_oTag: new Ke("<tag"),
3167
3137
  j_cTag: new Ke("</tag"),
3168
3138
  j_expr: new Ke("<tag>...</tag>", !0)
3169
- }, I = !0, y = !0, gt = !0, Le = !0, le = !0, sa = !0;
3139
+ }, I = !0, y = !0, bt = !0, Le = !0, le = !0, ia = !0;
3170
3140
  class Js {
3171
3141
  constructor(t, s = {}) {
3172
3142
  m(this, "label");
@@ -3185,139 +3155,139 @@ class Js {
3185
3155
  const zt = /* @__PURE__ */ new Map();
3186
3156
  function C(r, t = {}) {
3187
3157
  t.keyword = r;
3188
- const s = b(r, t);
3158
+ const s = g(r, t);
3189
3159
  return zt.set(r, s), s;
3190
3160
  }
3191
3161
  function z(r, t) {
3192
- return b(r, {
3162
+ return g(r, {
3193
3163
  beforeExpr: I,
3194
3164
  binop: t
3195
3165
  });
3196
3166
  }
3197
- let _e = -1;
3167
+ let je = -1;
3198
3168
  const Vt = [], Ht = [], Kt = [], Jt = [], Wt = [], Xt = [];
3199
- function b(r, t = {}) {
3200
- return ++_e, Ht.push(r), Kt.push(t.binop ?? -1), Jt.push(t.beforeExpr ?? !1), Wt.push(t.startsExpr ?? !1), Xt.push(t.prefix ?? !1), Vt.push(new Js(r, t)), _e;
3169
+ function g(r, t = {}) {
3170
+ return ++je, Ht.push(r), Kt.push(t.binop ?? -1), Jt.push(t.beforeExpr ?? !1), Wt.push(t.startsExpr ?? !1), Xt.push(t.prefix ?? !1), Vt.push(new Js(r, t)), je;
3201
3171
  }
3202
3172
  function S(r, t = {}) {
3203
- return ++_e, zt.set(r, _e), Ht.push(r), Kt.push(t.binop ?? -1), Jt.push(t.beforeExpr ?? !1), Wt.push(t.startsExpr ?? !1), Xt.push(t.prefix ?? !1), Vt.push(new Js("name", t)), _e;
3173
+ return ++je, zt.set(r, je), Ht.push(r), Kt.push(t.binop ?? -1), Jt.push(t.beforeExpr ?? !1), Wt.push(t.startsExpr ?? !1), Xt.push(t.prefix ?? !1), Vt.push(new Js("name", t)), je;
3204
3174
  }
3205
- const ia = {
3206
- bracketL: b("[", {
3175
+ const ra = {
3176
+ bracketL: g("[", {
3207
3177
  beforeExpr: I,
3208
3178
  startsExpr: y
3209
3179
  }),
3210
- bracketHashL: b("#[", {
3180
+ bracketHashL: g("#[", {
3211
3181
  beforeExpr: I,
3212
3182
  startsExpr: y
3213
3183
  }),
3214
- bracketBarL: b("[|", {
3184
+ bracketBarL: g("[|", {
3215
3185
  beforeExpr: I,
3216
3186
  startsExpr: y
3217
3187
  }),
3218
- bracketR: b("]"),
3219
- bracketBarR: b("|]"),
3220
- braceL: b("{", {
3188
+ bracketR: g("]"),
3189
+ bracketBarR: g("|]"),
3190
+ braceL: g("{", {
3221
3191
  beforeExpr: I,
3222
3192
  startsExpr: y
3223
3193
  }),
3224
- braceBarL: b("{|", {
3194
+ braceBarL: g("{|", {
3225
3195
  beforeExpr: I,
3226
3196
  startsExpr: y
3227
3197
  }),
3228
- braceHashL: b("#{", {
3198
+ braceHashL: g("#{", {
3229
3199
  beforeExpr: I,
3230
3200
  startsExpr: y
3231
3201
  }),
3232
- braceR: b("}"),
3233
- braceBarR: b("|}"),
3234
- parenL: b("(", {
3202
+ braceR: g("}"),
3203
+ braceBarR: g("|}"),
3204
+ parenL: g("(", {
3235
3205
  beforeExpr: I,
3236
3206
  startsExpr: y
3237
3207
  }),
3238
- parenR: b(")"),
3239
- comma: b(",", {
3208
+ parenR: g(")"),
3209
+ comma: g(",", {
3240
3210
  beforeExpr: I
3241
3211
  }),
3242
- semi: b(";", {
3212
+ semi: g(";", {
3243
3213
  beforeExpr: I
3244
3214
  }),
3245
- colon: b(":", {
3215
+ colon: g(":", {
3246
3216
  beforeExpr: I
3247
3217
  }),
3248
- doubleColon: b("::", {
3218
+ doubleColon: g("::", {
3249
3219
  beforeExpr: I
3250
3220
  }),
3251
- dot: b("."),
3252
- question: b("?", {
3221
+ dot: g("."),
3222
+ question: g("?", {
3253
3223
  beforeExpr: I
3254
3224
  }),
3255
- questionDot: b("?."),
3256
- arrow: b("=>", {
3225
+ questionDot: g("?."),
3226
+ arrow: g("=>", {
3257
3227
  beforeExpr: I
3258
3228
  }),
3259
- template: b("template"),
3260
- ellipsis: b("...", {
3229
+ template: g("template"),
3230
+ ellipsis: g("...", {
3261
3231
  beforeExpr: I
3262
3232
  }),
3263
- backQuote: b("`", {
3233
+ backQuote: g("`", {
3264
3234
  startsExpr: y
3265
3235
  }),
3266
- dollarBraceL: b("${", {
3236
+ dollarBraceL: g("${", {
3267
3237
  beforeExpr: I,
3268
3238
  startsExpr: y
3269
3239
  }),
3270
- templateTail: b("...`", {
3240
+ templateTail: g("...`", {
3271
3241
  startsExpr: y
3272
3242
  }),
3273
- templateNonTail: b("...${", {
3243
+ templateNonTail: g("...${", {
3274
3244
  beforeExpr: I,
3275
3245
  startsExpr: y
3276
3246
  }),
3277
- at: b("@"),
3278
- hash: b("#", {
3247
+ at: g("@"),
3248
+ hash: g("#", {
3279
3249
  startsExpr: y
3280
3250
  }),
3281
- interpreterDirective: b("#!..."),
3282
- eq: b("=", {
3251
+ interpreterDirective: g("#!..."),
3252
+ eq: g("=", {
3283
3253
  beforeExpr: I,
3284
3254
  isAssign: Le
3285
3255
  }),
3286
- assign: b("_=", {
3256
+ assign: g("_=", {
3287
3257
  beforeExpr: I,
3288
3258
  isAssign: Le
3289
3259
  }),
3290
- slashAssign: b("_=", {
3260
+ slashAssign: g("_=", {
3291
3261
  beforeExpr: I,
3292
3262
  isAssign: Le
3293
3263
  }),
3294
- xorAssign: b("_=", {
3264
+ xorAssign: g("_=", {
3295
3265
  beforeExpr: I,
3296
3266
  isAssign: Le
3297
3267
  }),
3298
- moduloAssign: b("_=", {
3268
+ moduloAssign: g("_=", {
3299
3269
  beforeExpr: I,
3300
3270
  isAssign: Le
3301
3271
  }),
3302
- incDec: b("++/--", {
3272
+ incDec: g("++/--", {
3303
3273
  prefix: le,
3304
- postfix: sa,
3274
+ postfix: ia,
3305
3275
  startsExpr: y
3306
3276
  }),
3307
- bang: b("!", {
3277
+ bang: g("!", {
3308
3278
  beforeExpr: I,
3309
3279
  prefix: le,
3310
3280
  startsExpr: y
3311
3281
  }),
3312
- tilde: b("~", {
3282
+ tilde: g("~", {
3313
3283
  beforeExpr: I,
3314
3284
  prefix: le,
3315
3285
  startsExpr: y
3316
3286
  }),
3317
- doubleCaret: b("^^", {
3287
+ doubleCaret: g("^^", {
3318
3288
  startsExpr: y
3319
3289
  }),
3320
- doubleAt: b("@@", {
3290
+ doubleAt: g("@@", {
3321
3291
  startsExpr: y
3322
3292
  }),
3323
3293
  pipeline: z("|>", 0),
@@ -3334,21 +3304,21 @@ const ia = {
3334
3304
  bitShift: z("<</>>/>>>", 8),
3335
3305
  bitShiftL: z("<</>>/>>>", 8),
3336
3306
  bitShiftR: z("<</>>/>>>", 8),
3337
- plusMin: b("+/-", {
3307
+ plusMin: g("+/-", {
3338
3308
  beforeExpr: I,
3339
3309
  binop: 9,
3340
3310
  prefix: le,
3341
3311
  startsExpr: y
3342
3312
  }),
3343
- modulo: b("%", {
3313
+ modulo: g("%", {
3344
3314
  binop: 10,
3345
3315
  startsExpr: y
3346
3316
  }),
3347
- star: b("*", {
3317
+ star: g("*", {
3348
3318
  binop: 10
3349
3319
  }),
3350
3320
  slash: z("/", 10),
3351
- exponent: b("**", {
3321
+ exponent: g("**", {
3352
3322
  beforeExpr: I,
3353
3323
  binop: 11,
3354
3324
  rightAssociative: !0
@@ -3437,14 +3407,14 @@ const ia = {
3437
3407
  startsExpr: y
3438
3408
  }),
3439
3409
  _do: C("do", {
3440
- isLoop: gt,
3410
+ isLoop: bt,
3441
3411
  beforeExpr: I
3442
3412
  }),
3443
3413
  _for: C("for", {
3444
- isLoop: gt
3414
+ isLoop: bt
3445
3415
  }),
3446
3416
  _while: C("while", {
3447
- isLoop: gt
3417
+ isLoop: bt
3448
3418
  }),
3449
3419
  _as: S("as", {
3450
3420
  startsExpr: y
@@ -3563,44 +3533,44 @@ const ia = {
3563
3533
  _opaque: S("opaque", {
3564
3534
  startsExpr: y
3565
3535
  }),
3566
- name: b("name", {
3536
+ name: g("name", {
3567
3537
  startsExpr: y
3568
3538
  }),
3569
- placeholder: b("%%", {
3539
+ placeholder: g("%%", {
3570
3540
  startsExpr: !0
3571
3541
  }),
3572
- string: b("string", {
3542
+ string: g("string", {
3573
3543
  startsExpr: y
3574
3544
  }),
3575
- num: b("num", {
3545
+ num: g("num", {
3576
3546
  startsExpr: y
3577
3547
  }),
3578
- bigint: b("bigint", {
3548
+ bigint: g("bigint", {
3579
3549
  startsExpr: y
3580
3550
  }),
3581
- decimal: b("decimal", {
3551
+ decimal: g("decimal", {
3582
3552
  startsExpr: y
3583
3553
  }),
3584
- regexp: b("regexp", {
3554
+ regexp: g("regexp", {
3585
3555
  startsExpr: y
3586
3556
  }),
3587
- privateName: b("#name", {
3557
+ privateName: g("#name", {
3588
3558
  startsExpr: y
3589
3559
  }),
3590
- eof: b("eof"),
3591
- jsxName: b("jsxName"),
3592
- jsxText: b("jsxText", {
3560
+ eof: g("eof"),
3561
+ jsxName: g("jsxName"),
3562
+ jsxText: g("jsxText", {
3593
3563
  beforeExpr: !0
3594
3564
  }),
3595
- jsxTagStart: b("jsxTagStart", {
3565
+ jsxTagStart: g("jsxTagStart", {
3596
3566
  startsExpr: !0
3597
3567
  }),
3598
- jsxTagEnd: b("jsxTagEnd")
3568
+ jsxTagEnd: g("jsxTagEnd")
3599
3569
  };
3600
3570
  function N(r) {
3601
3571
  return r >= 93 && r <= 133;
3602
3572
  }
3603
- function ra(r) {
3573
+ function aa(r) {
3604
3574
  return r <= 92;
3605
3575
  }
3606
3576
  function Z(r) {
@@ -3609,37 +3579,37 @@ function Z(r) {
3609
3579
  function Ws(r) {
3610
3580
  return r >= 58 && r <= 137;
3611
3581
  }
3612
- function aa(r) {
3582
+ function na(r) {
3613
3583
  return Jt[r];
3614
3584
  }
3615
3585
  function Be(r) {
3616
3586
  return Wt[r];
3617
3587
  }
3618
- function na(r) {
3588
+ function oa(r) {
3619
3589
  return r >= 29 && r <= 33;
3620
3590
  }
3621
3591
  function Ps(r) {
3622
3592
  return r >= 129 && r <= 131;
3623
3593
  }
3624
- function oa(r) {
3594
+ function ca(r) {
3625
3595
  return r >= 90 && r <= 92;
3626
3596
  }
3627
3597
  function Gt(r) {
3628
3598
  return r >= 58 && r <= 92;
3629
3599
  }
3630
- function ca(r) {
3600
+ function ha(r) {
3631
3601
  return r >= 39 && r <= 59;
3632
3602
  }
3633
- function ha(r) {
3603
+ function la(r) {
3634
3604
  return r === 34;
3635
3605
  }
3636
- function la(r) {
3606
+ function ua(r) {
3637
3607
  return Xt[r];
3638
3608
  }
3639
- function ua(r) {
3609
+ function pa(r) {
3640
3610
  return r >= 121 && r <= 123;
3641
3611
  }
3642
- function pa(r) {
3612
+ function fa(r) {
3643
3613
  return r >= 124 && r <= 130;
3644
3614
  }
3645
3615
  function de(r) {
@@ -3648,20 +3618,20 @@ function de(r) {
3648
3618
  function Ze(r) {
3649
3619
  return Kt[r];
3650
3620
  }
3651
- function fa(r) {
3621
+ function da(r) {
3652
3622
  return r === 57;
3653
3623
  }
3654
- function Dt(r) {
3624
+ function Ot(r) {
3655
3625
  return r >= 24 && r <= 25;
3656
3626
  }
3657
3627
  function Xs(r) {
3658
3628
  return Vt[r];
3659
3629
  }
3660
3630
  let Yt = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟍꟐꟑꟓꟕ-Ƛꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", Gs = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";
3661
- const da = new RegExp("[" + Yt + "]"), ma = new RegExp("[" + Yt + Gs + "]");
3631
+ const ma = new RegExp("[" + Yt + "]"), ya = new RegExp("[" + Yt + Gs + "]");
3662
3632
  Yt = Gs = null;
3663
- const Ys = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191], ya = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
3664
- function Ot(r, t) {
3633
+ const Ys = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191], xa = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
3634
+ function Dt(r, t) {
3665
3635
  let s = 65536;
3666
3636
  for (let e = 0, i = t.length; e < i; e += 2) {
3667
3637
  if (s += t[e], s > r) return !1;
@@ -3670,21 +3640,21 @@ function Ot(r, t) {
3670
3640
  return !1;
3671
3641
  }
3672
3642
  function ne(r) {
3673
- return r < 65 ? r === 36 : r <= 90 ? !0 : r < 97 ? r === 95 : r <= 122 ? !0 : r <= 65535 ? r >= 170 && da.test(String.fromCharCode(r)) : Ot(r, Ys);
3643
+ return r < 65 ? r === 36 : r <= 90 ? !0 : r < 97 ? r === 95 : r <= 122 ? !0 : r <= 65535 ? r >= 170 && ma.test(String.fromCharCode(r)) : Dt(r, Ys);
3674
3644
  }
3675
3645
  function Ce(r) {
3676
- return r < 48 ? r === 36 : r < 58 ? !0 : r < 65 ? !1 : r <= 90 ? !0 : r < 97 ? r === 95 : r <= 122 ? !0 : r <= 65535 ? r >= 170 && ma.test(String.fromCharCode(r)) : Ot(r, Ys) || Ot(r, ya);
3646
+ return r < 48 ? r === 36 : r < 58 ? !0 : r < 65 ? !1 : r <= 90 ? !0 : r < 97 ? r === 95 : r <= 122 ? !0 : r <= 65535 ? r >= 170 && ya.test(String.fromCharCode(r)) : Dt(r, Ys) || Dt(r, xa);
3677
3647
  }
3678
3648
  const Qt = {
3679
3649
  keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
3680
3650
  strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
3681
3651
  strictBind: ["eval", "arguments"]
3682
- }, xa = new Set(Qt.keyword), Pa = new Set(Qt.strict), ga = new Set(Qt.strictBind);
3652
+ }, Pa = new Set(Qt.keyword), ba = new Set(Qt.strict), ga = new Set(Qt.strictBind);
3683
3653
  function Qs(r, t) {
3684
3654
  return t && r === "await" || r === "enum";
3685
3655
  }
3686
3656
  function Zs(r, t) {
3687
- return Qs(r, t) || Pa.has(r);
3657
+ return Qs(r, t) || ba.has(r);
3688
3658
  }
3689
3659
  function ei(r) {
3690
3660
  return ga.has(r);
@@ -3692,15 +3662,15 @@ function ei(r) {
3692
3662
  function ti(r, t) {
3693
3663
  return Zs(r, t) || ei(r);
3694
3664
  }
3695
- function ba(r) {
3696
- return xa.has(r);
3665
+ function wa(r) {
3666
+ return Pa.has(r);
3697
3667
  }
3698
3668
  function Ta(r, t, s) {
3699
3669
  return r === 64 && t === 64 && ne(s);
3700
3670
  }
3701
- const wa = /* @__PURE__ */ new Set(["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete", "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield", "eval", "arguments", "enum", "await"]);
3702
- function Aa(r) {
3703
- return wa.has(r);
3671
+ const Aa = /* @__PURE__ */ new Set(["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete", "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield", "eval", "arguments", "enum", "await"]);
3672
+ function Sa(r) {
3673
+ return Aa.has(r);
3704
3674
  }
3705
3675
  class Zt {
3706
3676
  constructor(t) {
@@ -3823,15 +3793,15 @@ class es {
3823
3793
  }
3824
3794
  }
3825
3795
  }
3826
- class Sa extends Zt {
3796
+ class Ia extends Zt {
3827
3797
  constructor() {
3828
3798
  super(...arguments);
3829
3799
  m(this, "declareFunctions", /* @__PURE__ */ new Set());
3830
3800
  }
3831
3801
  }
3832
- class Ia extends es {
3802
+ class Ea extends es {
3833
3803
  createScope(t) {
3834
- return new Sa(t);
3804
+ return new Ia(t);
3835
3805
  }
3836
3806
  declareName(t, s, e) {
3837
3807
  const i = this.currentScope();
@@ -3853,7 +3823,7 @@ class Ia extends es {
3853
3823
  this.scopeStack[0].declareFunctions.has(t.name) || super.checkLocalExport(t);
3854
3824
  }
3855
3825
  }
3856
- const Ea = /* @__PURE__ */ new Set(["_", "any", "bool", "boolean", "empty", "extends", "false", "interface", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]), T = te`flow`({
3826
+ const Ca = /* @__PURE__ */ new Set(["_", "any", "bool", "boolean", "empty", "extends", "false", "interface", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]), w = te`flow`({
3857
3827
  AmbiguousConditionalArrow: "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",
3858
3828
  AmbiguousDeclareModuleKind: "Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",
3859
3829
  AssignReservedType: ({
@@ -3944,32 +3914,32 @@ const Ea = /* @__PURE__ */ new Set(["_", "any", "bool", "boolean", "empty", "ext
3944
3914
  UnsupportedStatementInDeclareModule: "Only declares and type imports are allowed inside declare module.",
3945
3915
  UnterminatedFlowComment: "Unterminated flow-comment."
3946
3916
  });
3947
- function Ca(r) {
3917
+ function Na(r) {
3948
3918
  return r.type === "DeclareExportAllDeclaration" || r.type === "DeclareExportDeclaration" && (!r.declaration || r.declaration.type !== "TypeAlias" && r.declaration.type !== "InterfaceDeclaration");
3949
3919
  }
3950
- function gs(r) {
3920
+ function bs(r) {
3951
3921
  return r.importKind === "type" || r.importKind === "typeof";
3952
3922
  }
3953
- const Na = {
3923
+ const ka = {
3954
3924
  const: "declare export var",
3955
3925
  let: "declare export var",
3956
3926
  type: "export type",
3957
3927
  interface: "export interface"
3958
3928
  };
3959
- function ka(r, t) {
3929
+ function va(r, t) {
3960
3930
  const s = [], e = [];
3961
3931
  for (let i = 0; i < r.length; i++)
3962
3932
  (t(r[i], i, r) ? s : e).push(r[i]);
3963
3933
  return [s, e];
3964
3934
  }
3965
- const va = /\*?\s*@((?:no)?flow)\b/;
3935
+ const Oa = /\*?\s*@((?:no)?flow)\b/;
3966
3936
  var Da = (r) => class extends r {
3967
3937
  constructor() {
3968
3938
  super(...arguments);
3969
3939
  m(this, "flowPragma");
3970
3940
  }
3971
3941
  getScopeHandler() {
3972
- return Ia;
3942
+ return Ea;
3973
3943
  }
3974
3944
  shouldParseTypes() {
3975
3945
  return this.getPluginOption("flow", "all") || this.flowPragma === "flow";
@@ -3979,7 +3949,7 @@ var Da = (r) => class extends r {
3979
3949
  }
3980
3950
  addComment(e) {
3981
3951
  if (this.flowPragma === void 0) {
3982
- const i = va.exec(e.value);
3952
+ const i = Oa.exec(e.value);
3983
3953
  if (i) if (i[1] === "flow")
3984
3954
  this.flowPragma = "flow";
3985
3955
  else if (i[1] === "noflow")
@@ -3997,7 +3967,7 @@ var Da = (r) => class extends r {
3997
3967
  }
3998
3968
  flowParsePredicate() {
3999
3969
  const e = this.startNode(), i = this.state.startLoc;
4000
- return this.next(), this.expectContextual(110), this.state.lastTokStartLoc.index > i.index + 1 && this.raise(T.UnexpectedSpaceBetweenModuloChecks, i), this.eat(10) ? (e.value = super.parseExpression(), this.expect(11), this.finishNode(e, "DeclaredPredicate")) : this.finishNode(e, "InferredPredicate");
3970
+ return this.next(), this.expectContextual(110), this.state.lastTokStartLoc.index > i.index + 1 && this.raise(w.UnexpectedSpaceBetweenModuloChecks, i), this.eat(10) ? (e.value = super.parseExpression(), this.expect(11), this.finishNode(e, "DeclaredPredicate")) : this.finishNode(e, "InferredPredicate");
4001
3971
  }
4002
3972
  flowParseTypeAndPredicateInitialiser() {
4003
3973
  const e = this.state.inType;
@@ -4023,7 +3993,7 @@ var Da = (r) => class extends r {
4023
3993
  if (this.match(74))
4024
3994
  return this.flowParseDeclareVariable(e);
4025
3995
  if (this.eatContextual(127))
4026
- return this.match(16) ? this.flowParseDeclareModuleExports(e) : (i && this.raise(T.NestedDeclareModule, this.state.lastTokStartLoc), this.flowParseDeclareModule(e));
3996
+ return this.match(16) ? this.flowParseDeclareModuleExports(e) : (i && this.raise(w.NestedDeclareModule, this.state.lastTokStartLoc), this.flowParseDeclareModule(e));
4027
3997
  if (this.isContextual(130))
4028
3998
  return this.flowParseDeclareTypeAlias(e);
4029
3999
  if (this.isContextual(131))
@@ -4042,12 +4012,12 @@ var Da = (r) => class extends r {
4042
4012
  const i = e.body = this.startNode(), a = i.body = [];
4043
4013
  for (this.expect(5); !this.match(8); ) {
4044
4014
  let c = this.startNode();
4045
- this.match(83) ? (this.next(), !this.isContextual(130) && !this.match(87) && this.raise(T.InvalidNonTypeImportInDeclareModule, this.state.lastTokStartLoc), super.parseImport(c)) : (this.expectContextual(125, T.UnsupportedStatementInDeclareModule), c = this.flowParseDeclare(c, !0)), a.push(c);
4015
+ this.match(83) ? (this.next(), !this.isContextual(130) && !this.match(87) && this.raise(w.InvalidNonTypeImportInDeclareModule, this.state.lastTokStartLoc), super.parseImport(c)) : (this.expectContextual(125, w.UnsupportedStatementInDeclareModule), c = this.flowParseDeclare(c, !0)), a.push(c);
4046
4016
  }
4047
4017
  this.scope.exit(), this.expect(8), this.finishNode(i, "BlockStatement");
4048
4018
  let n = null, o = !1;
4049
4019
  return a.forEach((c) => {
4050
- Ca(c) ? (n === "CommonJS" && this.raise(T.AmbiguousDeclareModuleKind, c), n = "ES") : c.type === "DeclareModuleExports" && (o && this.raise(T.DuplicateDeclareModuleExports, c), n === "ES" && this.raise(T.AmbiguousDeclareModuleKind, c), n = "CommonJS", o = !0);
4020
+ Na(c) ? (n === "CommonJS" && this.raise(w.AmbiguousDeclareModuleKind, c), n = "ES") : c.type === "DeclareModuleExports" && (o && this.raise(w.DuplicateDeclareModuleExports, c), n === "ES" && this.raise(w.AmbiguousDeclareModuleKind, c), n = "CommonJS", o = !0);
4051
4021
  }), e.kind = n || "CommonJS", this.finishNode(e, "DeclareModule");
4052
4022
  }
4053
4023
  flowParseDeclareExportDeclaration(e, i) {
@@ -4055,9 +4025,9 @@ var Da = (r) => class extends r {
4055
4025
  return this.match(68) || this.match(80) ? e.declaration = this.flowParseDeclare(this.startNode()) : (e.declaration = this.flowParseType(), this.semicolon()), e.default = !0, this.finishNode(e, "DeclareExportDeclaration");
4056
4026
  if (this.match(75) || this.isLet() || (this.isContextual(130) || this.isContextual(129)) && !i) {
4057
4027
  const a = this.state.value;
4058
- throw this.raise(T.UnsupportedDeclareExportKind, this.state.startLoc, {
4028
+ throw this.raise(w.UnsupportedDeclareExportKind, this.state.startLoc, {
4059
4029
  unsupportedExportKind: a,
4060
- suggestion: Na[a]
4030
+ suggestion: ka[a]
4061
4031
  });
4062
4032
  }
4063
4033
  if (this.match(74) || this.match(68) || this.match(80) || this.isContextual(131))
@@ -4113,10 +4083,10 @@ var Da = (r) => class extends r {
4113
4083
  return this.flowParseInterfaceish(e, !1), this.finishNode(e, "InterfaceDeclaration");
4114
4084
  }
4115
4085
  checkNotUnderscore(e) {
4116
- e === "_" && this.raise(T.UnexpectedReservedUnderscore, this.state.startLoc);
4086
+ e === "_" && this.raise(w.UnexpectedReservedUnderscore, this.state.startLoc);
4117
4087
  }
4118
4088
  checkReservedType(e, i, a) {
4119
- Ea.has(e) && this.raise(a ? T.AssignReservedType : T.UnexpectedReservedType, i, {
4089
+ Ca.has(e) && this.raise(a ? w.AssignReservedType : w.UnexpectedReservedType, i, {
4120
4090
  reservedType: e
4121
4091
  });
4122
4092
  }
@@ -4131,7 +4101,7 @@ var Da = (r) => class extends r {
4131
4101
  }
4132
4102
  flowParseTypeParameter(e = !1) {
4133
4103
  const i = this.state.startLoc, a = this.startNode(), n = this.flowParseVariance(), o = this.flowParseTypeAnnotatableIdentifier();
4134
- return a.name = o.name, a.variance = n, a.bound = o.typeAnnotation, this.match(29) ? (this.eat(29), a.default = this.flowParseType()) : e && this.raise(T.MissingTypeParamDefault, i), this.finishNode(a, "TypeParameter");
4104
+ return a.name = o.name, a.variance = n, a.bound = o.typeAnnotation, this.match(29) ? (this.eat(29), a.default = this.flowParseType()) : e && this.raise(w.MissingTypeParamDefault, i), this.finishNode(a, "TypeParameter");
4135
4105
  }
4136
4106
  flowParseTypeParameterDeclaration() {
4137
4107
  const e = this.state.inType, i = this.startNode();
@@ -4144,7 +4114,7 @@ var Da = (r) => class extends r {
4144
4114
  return this.expect(48), this.state.inType = e, this.finishNode(i, "TypeParameterDeclaration");
4145
4115
  }
4146
4116
  flowInTopLevelContext(e) {
4147
- if (this.curContext() !== O.brace) {
4117
+ if (this.curContext() !== D.brace) {
4148
4118
  const i = this.state.context;
4149
4119
  this.state.context = [i[0]];
4150
4120
  try {
@@ -4167,7 +4137,7 @@ var Da = (r) => class extends r {
4167
4137
  for (this.state.noAnonFunctionType = !1; !this.match(48); )
4168
4138
  e.params.push(this.flowParseType()), this.match(48) || this.expect(12);
4169
4139
  this.state.noAnonFunctionType = a;
4170
- }), this.state.inType = i, !this.state.inType && this.curContext() === O.brace && this.reScan_lt_gt(), this.expect(48), this.finishNode(e, "TypeParameterInstantiation");
4140
+ }), this.state.inType = i, !this.state.inType && this.curContext() === D.brace && this.reScan_lt_gt(), this.expect(48), this.finishNode(e, "TypeParameterInstantiation");
4171
4141
  }
4172
4142
  flowParseTypeParameterInstantiationCallOrNew() {
4173
4143
  if (this.reScan_lt() !== 47) return;
@@ -4245,7 +4215,7 @@ var Da = (r) => class extends r {
4245
4215
  const ie = this.flowParseObjectTypeProperty(E, x, A, k, B, a, o ?? !p);
4246
4216
  ie === null ? (d = !0, F = this.state.lastTokStartLoc) : h.properties.push(ie);
4247
4217
  }
4248
- this.flowObjectTypeSemicolon(), F && !this.match(8) && !this.match(9) && this.raise(T.UnexpectedExplicitInexactInObject, F);
4218
+ this.flowObjectTypeSemicolon(), F && !this.match(8) && !this.match(9) && this.raise(w.UnexpectedExplicitInexactInObject, F);
4249
4219
  }
4250
4220
  this.expect(l), a && (h.inexact = d);
4251
4221
  const f = this.finishNode(h, "ObjectTypeAnnotation");
@@ -4253,16 +4223,16 @@ var Da = (r) => class extends r {
4253
4223
  }
4254
4224
  flowParseObjectTypeProperty(e, i, a, n, o, c, h) {
4255
4225
  if (this.eat(21))
4256
- return this.match(12) || this.match(13) || this.match(8) || this.match(9) ? (c ? h || this.raise(T.InexactInsideExact, this.state.lastTokStartLoc) : this.raise(T.InexactInsideNonObject, this.state.lastTokStartLoc), n && this.raise(T.InexactVariance, n), null) : (c || this.raise(T.UnexpectedSpreadType, this.state.lastTokStartLoc), a != null && this.unexpected(a), n && this.raise(T.SpreadVariance, n), e.argument = this.flowParseType(), this.finishNode(e, "ObjectTypeSpreadProperty"));
4226
+ return this.match(12) || this.match(13) || this.match(8) || this.match(9) ? (c ? h || this.raise(w.InexactInsideExact, this.state.lastTokStartLoc) : this.raise(w.InexactInsideNonObject, this.state.lastTokStartLoc), n && this.raise(w.InexactVariance, n), null) : (c || this.raise(w.UnexpectedSpreadType, this.state.lastTokStartLoc), a != null && this.unexpected(a), n && this.raise(w.SpreadVariance, n), e.argument = this.flowParseType(), this.finishNode(e, "ObjectTypeSpreadProperty"));
4257
4227
  {
4258
4228
  e.key = this.flowParseObjectPropertyKey(), e.static = i, e.proto = a != null, e.kind = o;
4259
4229
  let l = !1;
4260
- return this.match(47) || this.match(10) ? (e.method = !0, a != null && this.unexpected(a), n && this.unexpected(n.loc.start), e.value = this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)), (o === "get" || o === "set") && this.flowCheckGetterSetterParams(e), !c && e.key.name === "constructor" && e.value.this && this.raise(T.ThisParamBannedInConstructor, e.value.this)) : (o !== "init" && this.unexpected(), e.method = !1, this.eat(17) && (l = !0), e.value = this.flowParseTypeInitialiser(), e.variance = n), e.optional = l, this.finishNode(e, "ObjectTypeProperty");
4230
+ return this.match(47) || this.match(10) ? (e.method = !0, a != null && this.unexpected(a), n && this.unexpected(n.loc.start), e.value = this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)), (o === "get" || o === "set") && this.flowCheckGetterSetterParams(e), !c && e.key.name === "constructor" && e.value.this && this.raise(w.ThisParamBannedInConstructor, e.value.this)) : (o !== "init" && this.unexpected(), e.method = !1, this.eat(17) && (l = !0), e.value = this.flowParseTypeInitialiser(), e.variance = n), e.optional = l, this.finishNode(e, "ObjectTypeProperty");
4261
4231
  }
4262
4232
  }
4263
4233
  flowCheckGetterSetterParams(e) {
4264
4234
  const i = e.kind === "get" ? 0 : 1, a = e.value.params.length + (e.value.rest ? 1 : 0);
4265
- e.value.this && this.raise(e.kind === "get" ? T.GetterMayNotHaveThisParam : T.SetterMayNotHaveThisParam, e.value.this), a !== i && this.raise(e.kind === "get" ? u.BadGetterArity : u.BadSetterArity, e), e.kind === "set" && e.value.rest && this.raise(u.BadSetterRestParameter, e);
4235
+ e.value.this && this.raise(e.kind === "get" ? w.GetterMayNotHaveThisParam : w.SetterMayNotHaveThisParam, e.value.this), a !== i && this.raise(e.kind === "get" ? u.BadGetterArity : u.BadSetterArity, e), e.kind === "set" && e.value.rest && this.raise(u.BadSetterRestParameter, e);
4266
4236
  }
4267
4237
  flowObjectTypeSemicolon() {
4268
4238
  !this.eat(13) && !this.eat(12) && !this.match(8) && !this.match(9) && this.unexpected();
@@ -4293,7 +4263,7 @@ var Da = (r) => class extends r {
4293
4263
  flowParseFunctionTypeParam(e) {
4294
4264
  let i = null, a = !1, n = null;
4295
4265
  const o = this.startNode(), c = this.lookahead(), h = this.state.type === 78;
4296
- return c.type === 14 || c.type === 17 ? (h && !e && this.raise(T.ThisParamMustBeFirst, o), i = this.parseIdentifier(h), this.eat(17) && (a = !0, h && this.raise(T.ThisParamMayNotBeOptional, o)), n = this.flowParseTypeInitialiser()) : n = this.flowParseType(), o.name = i, o.optional = a, o.typeAnnotation = n, this.finishNode(o, "FunctionTypeParam");
4266
+ return c.type === 14 || c.type === 17 ? (h && !e && this.raise(w.ThisParamMustBeFirst, o), i = this.parseIdentifier(h), this.eat(17) && (a = !0, h && this.raise(w.ThisParamMayNotBeOptional, o)), n = this.flowParseTypeInitialiser()) : n = this.flowParseType(), o.name = i, o.optional = a, o.typeAnnotation = n, this.finishNode(o, "FunctionTypeParam");
4297
4267
  }
4298
4268
  reinterpretTypeAsFunctionTypeParam(e) {
4299
4269
  const i = this.startNodeAt(e.loc.start);
@@ -4383,7 +4353,7 @@ var Da = (r) => class extends r {
4383
4353
  return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", i);
4384
4354
  if (this.match(136))
4385
4355
  return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", i);
4386
- throw this.raise(T.UnexpectedSubtractionOperand, this.state.startLoc);
4356
+ throw this.raise(w.UnexpectedSubtractionOperand, this.state.startLoc);
4387
4357
  }
4388
4358
  this.unexpected();
4389
4359
  return;
@@ -4562,7 +4532,7 @@ var Da = (r) => class extends r {
4562
4532
  failed: l
4563
4533
  } = this.tryParseConditionalConsequent()), [p, d] = this.getArrowLikeExpressions(h);
4564
4534
  }
4565
- l && p.length > 1 && this.raise(T.AmbiguousConditionalArrow, n.startLoc), l && p.length === 1 && (this.state = n, f.push(p[0].start), this.state.noArrowAt = f, {
4535
+ l && p.length > 1 && this.raise(w.AmbiguousConditionalArrow, n.startLoc), l && p.length === 1 && (this.state = n, f.push(p[0].start), this.state.noArrowAt = f, {
4566
4536
  consequent: h,
4567
4537
  failed: l
4568
4538
  } = this.tryParseConditionalConsequent());
@@ -4583,7 +4553,7 @@ var Da = (r) => class extends r {
4583
4553
  const o = a.pop();
4584
4554
  o.type === "ArrowFunctionExpression" && o.body.type !== "BlockStatement" ? (o.typeParameters || !o.returnType ? this.finishArrowValidation(o) : n.push(o), a.push(o.body)) : o.type === "ConditionalExpression" && (a.push(o.consequent), a.push(o.alternate));
4585
4555
  }
4586
- return i ? (n.forEach((o) => this.finishArrowValidation(o)), [n, []]) : ka(n, (o) => o.params.every((c) => this.isAssignable(c, !0)));
4556
+ return i ? (n.forEach((o) => this.finishArrowValidation(o)), [n, []]) : va(n, (o) => o.params.every((c) => this.isAssignable(c, !0)));
4587
4557
  }
4588
4558
  finishArrowValidation(e) {
4589
4559
  var i;
@@ -4645,7 +4615,7 @@ var Da = (r) => class extends r {
4645
4615
  return;
4646
4616
  i.declare = !0;
4647
4617
  }
4648
- super.parseClassMember(e, i, a), i.declare && (i.type !== "ClassProperty" && i.type !== "ClassPrivateProperty" && i.type !== "PropertyDefinition" ? this.raise(T.DeclareClassElement, n) : i.value && this.raise(T.DeclareClassFieldInitializer, i.value));
4618
+ super.parseClassMember(e, i, a), i.declare && (i.type !== "ClassProperty" && i.type !== "ClassPrivateProperty" && i.type !== "PropertyDefinition" ? this.raise(w.DeclareClassElement, n) : i.value && this.raise(w.DeclareClassFieldInitializer, i.value));
4649
4619
  }
4650
4620
  isIterator(e) {
4651
4621
  return e === "iterator" || e === "asyncIterator";
@@ -4677,7 +4647,7 @@ var Da = (r) => class extends r {
4677
4647
  var a;
4678
4648
  for (let n = 0; n < e.length; n++) {
4679
4649
  const o = e[n];
4680
- o && o.type === "TypeCastExpression" && !((a = o.extra) != null && a.parenthesized) && (e.length > 1 || !i) && this.raise(T.TypeCastInPattern, o.typeAnnotation);
4650
+ o && o.type === "TypeCastExpression" && !((a = o.extra) != null && a.parenthesized) && (e.length > 1 || !i) && this.raise(w.TypeCastInPattern, o.typeAnnotation);
4681
4651
  }
4682
4652
  return e;
4683
4653
  }
@@ -4706,10 +4676,10 @@ var Da = (r) => class extends r {
4706
4676
  pushClassMethod(e, i, a, n, o, c) {
4707
4677
  if (i.variance && this.unexpected(i.variance.loc.start), delete i.variance, this.match(47) && (i.typeParameters = this.flowParseTypeParameterDeclaration()), super.pushClassMethod(e, i, a, n, o, c), i.params && o) {
4708
4678
  const h = i.params;
4709
- h.length > 0 && this.isThisParam(h[0]) && this.raise(T.ThisParamBannedInConstructor, i);
4679
+ h.length > 0 && this.isThisParam(h[0]) && this.raise(w.ThisParamBannedInConstructor, i);
4710
4680
  } else if (i.type === "MethodDefinition" && o && i.value.params) {
4711
4681
  const h = i.value.params;
4712
- h.length > 0 && this.isThisParam(h[0]) && this.raise(T.ThisParamBannedInConstructor, i);
4682
+ h.length > 0 && this.isThisParam(h[0]) && this.raise(w.ThisParamBannedInConstructor, i);
4713
4683
  }
4714
4684
  }
4715
4685
  pushClassPrivateMethod(e, i, a, n) {
@@ -4730,7 +4700,7 @@ var Da = (r) => class extends r {
4730
4700
  const i = this.getObjectOrClassMethodParams(e);
4731
4701
  if (i.length > 0) {
4732
4702
  const a = i[0];
4733
- this.isThisParam(a) && e.kind === "get" ? this.raise(T.GetterMayNotHaveThisParam, a) : this.isThisParam(a) && this.raise(T.SetterMayNotHaveThisParam, a);
4703
+ this.isThisParam(a) && e.kind === "get" ? this.raise(w.GetterMayNotHaveThisParam, a) : this.isThisParam(a) && this.raise(w.SetterMayNotHaveThisParam, a);
4734
4704
  }
4735
4705
  }
4736
4706
  parsePropertyNamePrefixOperator(e) {
@@ -4744,17 +4714,17 @@ var Da = (r) => class extends r {
4744
4714
  return l && ((p.value || p).typeParameters = l), p;
4745
4715
  }
4746
4716
  parseFunctionParamType(e) {
4747
- return this.eat(17) && (e.type !== "Identifier" && this.raise(T.PatternIsOptional, e), this.isThisParam(e) && this.raise(T.ThisParamMayNotBeOptional, e), e.optional = !0), this.match(14) ? e.typeAnnotation = this.flowParseTypeAnnotation() : this.isThisParam(e) && this.raise(T.ThisParamAnnotationRequired, e), this.match(29) && this.isThisParam(e) && this.raise(T.ThisParamNoDefault, e), this.resetEndLocation(e), e;
4717
+ return this.eat(17) && (e.type !== "Identifier" && this.raise(w.PatternIsOptional, e), this.isThisParam(e) && this.raise(w.ThisParamMayNotBeOptional, e), e.optional = !0), this.match(14) ? e.typeAnnotation = this.flowParseTypeAnnotation() : this.isThisParam(e) && this.raise(w.ThisParamAnnotationRequired, e), this.match(29) && this.isThisParam(e) && this.raise(w.ThisParamNoDefault, e), this.resetEndLocation(e), e;
4748
4718
  }
4749
4719
  parseMaybeDefault(e, i) {
4750
4720
  const a = super.parseMaybeDefault(e, i);
4751
- return a.type === "AssignmentPattern" && a.typeAnnotation && a.right.start < a.typeAnnotation.start && this.raise(T.TypeBeforeInitializer, a.typeAnnotation), a;
4721
+ return a.type === "AssignmentPattern" && a.typeAnnotation && a.right.start < a.typeAnnotation.start && this.raise(w.TypeBeforeInitializer, a.typeAnnotation), a;
4752
4722
  }
4753
4723
  checkImportReflection(e) {
4754
- super.checkImportReflection(e), e.module && e.importKind !== "value" && this.raise(T.ImportReflectionHasImportType, e.specifiers[0].loc.start);
4724
+ super.checkImportReflection(e), e.module && e.importKind !== "value" && this.raise(w.ImportReflectionHasImportType, e.specifiers[0].loc.start);
4755
4725
  }
4756
4726
  parseImportSpecifierLocal(e, i, a) {
4757
- i.local = gs(e) ? this.flowParseRestrictedIdentifier(!0, !0) : this.parseIdentifier(), e.specifiers.push(this.finishImportSpecifier(i, a));
4727
+ i.local = bs(e) ? this.flowParseRestrictedIdentifier(!0, !0) : this.parseIdentifier(), e.specifiers.push(this.finishImportSpecifier(i, a));
4758
4728
  }
4759
4729
  isPotentialImportPhase(e) {
4760
4730
  if (super.isPotentialImportPhase(e)) return !0;
@@ -4793,8 +4763,8 @@ var Da = (r) => class extends r {
4793
4763
  }
4794
4764
  this.eatContextual(93) ? e.local = this.parseIdentifier() : (l = !0, e.local = this.cloneIdentifier(e.imported));
4795
4765
  }
4796
- const p = gs(e);
4797
- return a && p && this.raise(T.ImportTypeShorthandOnlyInPureImport, e), (a || p) && this.checkReservedType(e.local.name, e.local.loc.start, !0), l && !a && !p && this.checkReservedWord(e.local.name, e.loc.start, !0, !0), this.finishImportSpecifier(e, "ImportSpecifier");
4766
+ const p = bs(e);
4767
+ return a && p && this.raise(w.ImportTypeShorthandOnlyInPureImport, e), (a || p) && this.checkReservedType(e.local.name, e.local.loc.start, !0), l && !a && !p && this.checkReservedWord(e.local.name, e.loc.start, !0, !0), this.finishImportSpecifier(e, "ImportSpecifier");
4798
4768
  }
4799
4769
  parseBindingAtom() {
4800
4770
  switch (this.state.type) {
@@ -4828,7 +4798,7 @@ var Da = (r) => class extends r {
4828
4798
  const {
4829
4799
  context: o
4830
4800
  } = this.state, c = o[o.length - 1];
4831
- (c === O.j_oTag || c === O.j_expr) && o.pop();
4801
+ (c === D.j_oTag || c === D.j_expr) && o.pop();
4832
4802
  }
4833
4803
  if (n != null && n.error || this.match(47)) {
4834
4804
  a = a || this.state.clone();
@@ -4847,14 +4817,14 @@ var Da = (r) => class extends r {
4847
4817
  let h = null;
4848
4818
  if (c.node && this.maybeUnwrapTypeCastExpression(c.node).type === "ArrowFunctionExpression") {
4849
4819
  if (!c.error && !c.aborted)
4850
- return c.node.async && this.raise(T.UnexpectedTypeParameterBeforeAsyncArrowFunction, o), c.node;
4820
+ return c.node.async && this.raise(w.UnexpectedTypeParameterBeforeAsyncArrowFunction, o), c.node;
4851
4821
  h = c.node;
4852
4822
  }
4853
4823
  if (n != null && n.node)
4854
4824
  return this.state = n.failState, n.node;
4855
4825
  if (h)
4856
4826
  return this.state = c.failState, h;
4857
- throw n != null && n.thrown ? n.error : c.thrown ? c.error : this.raise(T.UnexpectedTokenAfterTypeParameter, o);
4827
+ throw n != null && n.thrown ? n.error : c.thrown ? c.error : this.raise(w.UnexpectedTokenAfterTypeParameter, o);
4858
4828
  }
4859
4829
  return super.parseMaybeAssign(e, i);
4860
4830
  }
@@ -4880,7 +4850,7 @@ var Da = (r) => class extends r {
4880
4850
  checkParams(e, i, a, n = !0) {
4881
4851
  if (!(a && this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start)))) {
4882
4852
  for (let o = 0; o < e.params.length; o++)
4883
- this.isThisParam(e.params[o]) && o > 0 && this.raise(T.ThisParamMustBeFirst, e.params[o]);
4853
+ this.isThisParam(e.params[o]) && o > 0 && this.raise(w.ThisParamMustBeFirst, e.params[o]);
4884
4854
  super.checkParams(e, i, a, n);
4885
4855
  }
4886
4856
  }
@@ -4949,12 +4919,12 @@ var Da = (r) => class extends r {
4949
4919
  }
4950
4920
  parseTopLevel(e, i) {
4951
4921
  const a = super.parseTopLevel(e, i);
4952
- return this.state.hasFlowComment && this.raise(T.UnterminatedFlowComment, this.state.curPosition()), a;
4922
+ return this.state.hasFlowComment && this.raise(w.UnterminatedFlowComment, this.state.curPosition()), a;
4953
4923
  }
4954
4924
  skipBlockComment() {
4955
4925
  if (this.hasPlugin("flowComments") && this.skipFlowComment()) {
4956
4926
  if (this.state.hasFlowComment)
4957
- throw this.raise(T.NestedFlowComment, this.state.startLoc);
4927
+ throw this.raise(w.NestedFlowComment, this.state.startLoc);
4958
4928
  this.hasFlowCommentCompletion();
4959
4929
  const e = this.skipFlowComment();
4960
4930
  e && (this.state.pos += e, this.state.hasFlowComment = !0);
@@ -4980,19 +4950,19 @@ var Da = (r) => class extends r {
4980
4950
  enumName: i,
4981
4951
  memberName: a
4982
4952
  }) {
4983
- this.raise(T.EnumBooleanMemberNotInitialized, e, {
4953
+ this.raise(w.EnumBooleanMemberNotInitialized, e, {
4984
4954
  memberName: a,
4985
4955
  enumName: i
4986
4956
  });
4987
4957
  }
4988
4958
  flowEnumErrorInvalidMemberInitializer(e, i) {
4989
- return this.raise(i.explicitType ? i.explicitType === "symbol" ? T.EnumInvalidMemberInitializerSymbolType : T.EnumInvalidMemberInitializerPrimaryType : T.EnumInvalidMemberInitializerUnknownType, e, i);
4959
+ return this.raise(i.explicitType ? i.explicitType === "symbol" ? w.EnumInvalidMemberInitializerSymbolType : w.EnumInvalidMemberInitializerPrimaryType : w.EnumInvalidMemberInitializerUnknownType, e, i);
4990
4960
  }
4991
4961
  flowEnumErrorNumberMemberNotInitialized(e, i) {
4992
- this.raise(T.EnumNumberMemberNotInitialized, e, i);
4962
+ this.raise(w.EnumNumberMemberNotInitialized, e, i);
4993
4963
  }
4994
4964
  flowEnumErrorStringMemberInconsistentlyInitialized(e, i) {
4995
- this.raise(T.EnumStringMemberInconsistentlyInitialized, e, i);
4965
+ this.raise(w.EnumStringMemberInconsistentlyInitialized, e, i);
4996
4966
  }
4997
4967
  flowEnumMemberInit() {
4998
4968
  const e = this.state.startLoc, i = () => this.match(12) || this.match(8);
@@ -5076,11 +5046,11 @@ var Da = (r) => class extends r {
5076
5046
  } = this.flowEnumMemberRaw(), p = h.name;
5077
5047
  if (p === "")
5078
5048
  continue;
5079
- /^[a-z]/.test(p) && this.raise(T.EnumInvalidMemberName, h, {
5049
+ /^[a-z]/.test(p) && this.raise(w.EnumInvalidMemberName, h, {
5080
5050
  memberName: p,
5081
5051
  suggestion: p[0].toUpperCase() + p.slice(1),
5082
5052
  enumName: e
5083
- }), a.has(p) && this.raise(T.EnumDuplicateMemberName, h, {
5053
+ }), a.has(p) && this.raise(w.EnumDuplicateMemberName, h, {
5084
5054
  memberName: p,
5085
5055
  enumName: e
5086
5056
  }), a.add(p);
@@ -5149,13 +5119,13 @@ var Da = (r) => class extends r {
5149
5119
  }) {
5150
5120
  if (!this.eatContextual(102)) return null;
5151
5121
  if (!N(this.state.type))
5152
- throw this.raise(T.EnumInvalidExplicitTypeUnknownSupplied, this.state.startLoc, {
5122
+ throw this.raise(w.EnumInvalidExplicitTypeUnknownSupplied, this.state.startLoc, {
5153
5123
  enumName: e
5154
5124
  });
5155
5125
  const {
5156
5126
  value: i
5157
5127
  } = this.state;
5158
- return this.next(), i !== "boolean" && i !== "number" && i !== "string" && i !== "symbol" && this.raise(T.EnumInvalidExplicitType, this.state.startLoc, {
5128
+ return this.next(), i !== "boolean" && i !== "number" && i !== "string" && i !== "symbol" && this.raise(w.EnumInvalidExplicitType, this.state.startLoc, {
5159
5129
  enumName: e,
5160
5130
  invalidEnumType: i
5161
5131
  }), i;
@@ -5208,7 +5178,7 @@ var Da = (r) => class extends r {
5208
5178
  });
5209
5179
  return e.members = c.numberMembers, this.expect(8), this.finishNode(e, "EnumNumberBody");
5210
5180
  } else
5211
- return this.raise(T.EnumInconsistentMemberValues, n, {
5181
+ return this.raise(w.EnumInconsistentMemberValues, n, {
5212
5182
  enumName: a
5213
5183
  }), l();
5214
5184
  }
@@ -5245,7 +5215,7 @@ var Da = (r) => class extends r {
5245
5215
  return e.type === "TypeCastExpression" ? e.expression : e;
5246
5216
  }
5247
5217
  };
5248
- const Oa = {
5218
+ const La = {
5249
5219
  __proto__: null,
5250
5220
  quot: '"',
5251
5221
  amp: "&",
@@ -5500,7 +5470,7 @@ const Oa = {
5500
5470
  clubs: "♣",
5501
5471
  hearts: "♥",
5502
5472
  diams: "♦"
5503
- }, La = /\r\n|[\r\n\u2028\u2029]/, Je = new RegExp(La.source, "g");
5473
+ }, Ma = /\r\n|[\r\n\u2028\u2029]/, Je = new RegExp(Ma.source, "g");
5504
5474
  function Ne(r) {
5505
5475
  switch (r) {
5506
5476
  case 10:
@@ -5512,14 +5482,14 @@ function Ne(r) {
5512
5482
  return !1;
5513
5483
  }
5514
5484
  }
5515
- function bs(r, t, s) {
5485
+ function gs(r, t, s) {
5516
5486
  for (let e = t; e < s; e++)
5517
5487
  if (Ne(r.charCodeAt(e)))
5518
5488
  return !0;
5519
5489
  return !1;
5520
5490
  }
5521
- const bt = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, Tt = /(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;
5522
- function Ma(r) {
5491
+ const gt = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, wt = /(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;
5492
+ function Fa(r) {
5523
5493
  switch (r) {
5524
5494
  case 9:
5525
5495
  case 11:
@@ -5574,7 +5544,7 @@ function Ee(r) {
5574
5544
  return Ee(r.object) + "." + Ee(r.property);
5575
5545
  throw new Error("Node had unexpected type: " + r.type);
5576
5546
  }
5577
- var Fa = (r) => class extends r {
5547
+ var Ba = (r) => class extends r {
5578
5548
  jsxReadToken() {
5579
5549
  let s = "", e = this.state.pos;
5580
5550
  for (; ; ) {
@@ -5636,7 +5606,7 @@ var Fa = (r) => class extends r {
5636
5606
  for (; e++ < 10 && this.state.pos < this.length && !(i = this.codePointAtPos(this.state.pos) === 59); )
5637
5607
  ++this.state.pos;
5638
5608
  if (i) {
5639
- const a = this.input.slice(s, this.state.pos), n = Oa[a];
5609
+ const a = this.input.slice(s, this.state.pos), n = La[a];
5640
5610
  if (++this.state.pos, n)
5641
5611
  return n;
5642
5612
  }
@@ -5676,7 +5646,7 @@ var Fa = (r) => class extends r {
5676
5646
  let s;
5677
5647
  switch (this.state.type) {
5678
5648
  case 5:
5679
- return s = this.startNode(), this.setContext(O.brace), this.next(), s = this.jsxParseExpressionContainer(s, O.j_oTag), s.expression.type === "JSXEmptyExpression" && this.raise(re.AttributeIsEmpty, s), s;
5649
+ return s = this.startNode(), this.setContext(D.brace), this.next(), s = this.jsxParseExpressionContainer(s, D.j_oTag), s.expression.type === "JSXEmptyExpression" && this.raise(re.AttributeIsEmpty, s), s;
5680
5650
  case 143:
5681
5651
  case 134:
5682
5652
  return this.parseExprAtom();
@@ -5689,7 +5659,7 @@ var Fa = (r) => class extends r {
5689
5659
  return this.finishNodeAt(s, "JSXEmptyExpression", this.state.startLoc);
5690
5660
  }
5691
5661
  jsxParseSpreadChild(s) {
5692
- return this.next(), s.expression = this.parseExpression(), this.setContext(O.j_expr), this.state.canStartJSXElement = !0, this.expect(8), this.finishNode(s, "JSXSpreadChild");
5662
+ return this.next(), s.expression = this.parseExpression(), this.setContext(D.j_expr), this.state.canStartJSXElement = !0, this.expect(8), this.finishNode(s, "JSXSpreadChild");
5693
5663
  }
5694
5664
  jsxParseExpressionContainer(s, e) {
5695
5665
  var i;
@@ -5703,7 +5673,7 @@ var Fa = (r) => class extends r {
5703
5673
  }
5704
5674
  jsxParseAttribute() {
5705
5675
  const s = this.startNode();
5706
- return this.match(5) ? (this.setContext(O.brace), this.next(), this.expect(21), s.argument = this.parseMaybeAssignAllowIn(), this.setContext(O.j_oTag), this.state.canStartJSXElement = !0, this.expect(8), this.finishNode(s, "JSXSpreadAttribute")) : (s.name = this.jsxParseNamespacedName(), s.value = this.eat(29) ? this.jsxParseAttributeValue() : null, this.finishNode(s, "JSXAttribute"));
5676
+ return this.match(5) ? (this.setContext(D.brace), this.next(), this.expect(21), s.argument = this.parseMaybeAssignAllowIn(), this.setContext(D.j_oTag), this.state.canStartJSXElement = !0, this.expect(8), this.finishNode(s, "JSXSpreadAttribute")) : (s.name = this.jsxParseNamespacedName(), s.value = this.eat(29) ? this.jsxParseAttributeValue() : null, this.finishNode(s, "JSXAttribute"));
5707
5677
  }
5708
5678
  jsxParseOpeningElementAt(s) {
5709
5679
  const e = this.startNodeAt(s);
@@ -5737,7 +5707,7 @@ var Fa = (r) => class extends r {
5737
5707
  break;
5738
5708
  case 5: {
5739
5709
  const o = this.startNode();
5740
- this.setContext(O.brace), this.next(), this.match(21) ? i.push(this.jsxParseSpreadChild(o)) : i.push(this.jsxParseExpressionContainer(o, O.j_expr));
5710
+ this.setContext(D.brace), this.next(), this.match(21) ? i.push(this.jsxParseSpreadChild(o)) : i.push(this.jsxParseExpressionContainer(o, D.j_expr));
5741
5711
  break;
5742
5712
  }
5743
5713
  default:
@@ -5771,11 +5741,11 @@ var Fa = (r) => class extends r {
5771
5741
  }
5772
5742
  getTokenFromCode(s) {
5773
5743
  const e = this.curContext();
5774
- if (e === O.j_expr) {
5744
+ if (e === D.j_expr) {
5775
5745
  this.jsxReadToken();
5776
5746
  return;
5777
5747
  }
5778
- if (e === O.j_oTag || e === O.j_cTag) {
5748
+ if (e === D.j_oTag || e === D.j_cTag) {
5779
5749
  if (ne(s)) {
5780
5750
  this.jsxReadWord();
5781
5751
  return;
@@ -5784,7 +5754,7 @@ var Fa = (r) => class extends r {
5784
5754
  ++this.state.pos, this.finishToken(144);
5785
5755
  return;
5786
5756
  }
5787
- if ((s === 34 || s === 39) && e === O.j_oTag) {
5757
+ if ((s === 34 || s === 39) && e === D.j_oTag) {
5788
5758
  this.jsxReadString(s);
5789
5759
  return;
5790
5760
  }
@@ -5801,17 +5771,17 @@ var Fa = (r) => class extends r {
5801
5771
  type: i
5802
5772
  } = this.state;
5803
5773
  if (i === 56 && s === 143)
5804
- e.splice(-2, 2, O.j_cTag), this.state.canStartJSXElement = !1;
5774
+ e.splice(-2, 2, D.j_cTag), this.state.canStartJSXElement = !1;
5805
5775
  else if (i === 143)
5806
- e.push(O.j_oTag);
5776
+ e.push(D.j_oTag);
5807
5777
  else if (i === 144) {
5808
5778
  const a = e[e.length - 1];
5809
- a === O.j_oTag && s === 56 || a === O.j_cTag ? (e.pop(), this.state.canStartJSXElement = e[e.length - 1] === O.j_expr) : (this.setContext(O.j_expr), this.state.canStartJSXElement = !0);
5779
+ a === D.j_oTag && s === 56 || a === D.j_cTag ? (e.pop(), this.state.canStartJSXElement = e[e.length - 1] === D.j_expr) : (this.setContext(D.j_expr), this.state.canStartJSXElement = !0);
5810
5780
  } else
5811
- this.state.canStartJSXElement = aa(i);
5781
+ this.state.canStartJSXElement = na(i);
5812
5782
  }
5813
5783
  };
5814
- class Ba extends Zt {
5784
+ class _a extends Zt {
5815
5785
  constructor() {
5816
5786
  super(...arguments);
5817
5787
  m(this, "tsNames", /* @__PURE__ */ new Map());
@@ -5823,7 +5793,7 @@ class Ra extends es {
5823
5793
  m(this, "importsStack", []);
5824
5794
  }
5825
5795
  createScope(s) {
5826
- return this.importsStack.push(/* @__PURE__ */ new Set()), new Ba(s);
5796
+ return this.importsStack.push(/* @__PURE__ */ new Set()), new _a(s);
5827
5797
  }
5828
5798
  enter(s) {
5829
5799
  s === 512 && this.importsStack.push(/* @__PURE__ */ new Set()), super.enter(s);
@@ -5911,7 +5881,7 @@ class ja {
5911
5881
  function et(r, t) {
5912
5882
  return (r ? 2 : 0) | (t ? 1 : 0);
5913
5883
  }
5914
- class _a {
5884
+ class Ua {
5915
5885
  constructor() {
5916
5886
  m(this, "sawUnambiguousESM", !1);
5917
5887
  m(this, "ambiguousScriptDifferentAst", !1);
@@ -5944,19 +5914,19 @@ class _a {
5944
5914
  function si(r, t) {
5945
5915
  r.trailingComments === void 0 ? r.trailingComments = t : r.trailingComments.unshift(...t);
5946
5916
  }
5947
- function Ua(r, t) {
5917
+ function $a(r, t) {
5948
5918
  r.leadingComments === void 0 ? r.leadingComments = t : r.leadingComments.unshift(...t);
5949
5919
  }
5950
5920
  function ke(r, t) {
5951
5921
  r.innerComments === void 0 ? r.innerComments = t : r.innerComments.unshift(...t);
5952
5922
  }
5953
- function be(r, t, s) {
5923
+ function ge(r, t, s) {
5954
5924
  let e = null, i = t.length;
5955
5925
  for (; e === null && i > 0; )
5956
5926
  e = t[--i];
5957
5927
  e === null || e.start > s.start ? ke(r, s.comments) : si(e, s.comments);
5958
5928
  }
5959
- class $a extends _a {
5929
+ class qa extends Ua {
5960
5930
  addComment(t) {
5961
5931
  this.filename && (t.loc.filename = this.filename);
5962
5932
  const {
@@ -5990,7 +5960,7 @@ class $a extends _a {
5990
5960
  comments: s
5991
5961
  } = t;
5992
5962
  if (t.leadingNode !== null || t.trailingNode !== null)
5993
- t.leadingNode !== null && si(t.leadingNode, s), t.trailingNode !== null && Ua(t.trailingNode, s);
5963
+ t.leadingNode !== null && si(t.leadingNode, s), t.trailingNode !== null && $a(t.trailingNode, s);
5994
5964
  else {
5995
5965
  const {
5996
5966
  containingNode: e,
@@ -6001,14 +5971,14 @@ class $a extends _a {
6001
5971
  case "ObjectExpression":
6002
5972
  case "ObjectPattern":
6003
5973
  case "RecordExpression":
6004
- be(e, e.properties, t);
5974
+ ge(e, e.properties, t);
6005
5975
  break;
6006
5976
  case "CallExpression":
6007
5977
  case "OptionalCallExpression":
6008
- be(e, e.arguments, t);
5978
+ ge(e, e.arguments, t);
6009
5979
  break;
6010
5980
  case "ImportExpression":
6011
- be(e, [e.source, e.options ?? null], t);
5981
+ ge(e, [e.source, e.options ?? null], t);
6012
5982
  break;
6013
5983
  case "FunctionDeclaration":
6014
5984
  case "FunctionExpression":
@@ -6016,22 +5986,22 @@ class $a extends _a {
6016
5986
  case "ObjectMethod":
6017
5987
  case "ClassMethod":
6018
5988
  case "ClassPrivateMethod":
6019
- be(e, e.params, t);
5989
+ ge(e, e.params, t);
6020
5990
  break;
6021
5991
  case "ArrayExpression":
6022
5992
  case "ArrayPattern":
6023
5993
  case "TupleExpression":
6024
- be(e, e.elements, t);
5994
+ ge(e, e.elements, t);
6025
5995
  break;
6026
5996
  case "ExportNamedDeclaration":
6027
5997
  case "ImportDeclaration":
6028
- be(e, e.specifiers, t);
5998
+ ge(e, e.specifiers, t);
6029
5999
  break;
6030
6000
  case "TSEnumDeclaration":
6031
6001
  ke(e, s);
6032
6002
  break;
6033
6003
  case "TSEnumBody":
6034
- be(e, e.members, t);
6004
+ ge(e, e.members, t);
6035
6005
  break;
6036
6006
  default:
6037
6007
  ke(e, s);
@@ -6101,7 +6071,7 @@ class ts {
6101
6071
  m(this, "end", 0);
6102
6072
  m(this, "lastTokEndLoc", null);
6103
6073
  m(this, "lastTokStartLoc", null);
6104
- m(this, "context", [O.brace]);
6074
+ m(this, "context", [D.brace]);
6105
6075
  m(this, "firstInvalidTemplateEscapePos", null);
6106
6076
  m(this, "strictErrors", /* @__PURE__ */ new Map());
6107
6077
  m(this, "tokensLength", 0);
@@ -6201,10 +6171,10 @@ class ts {
6201
6171
  return t.flags = this.flags, t.startIndex = this.startIndex, t.curLine = this.curLine, t.lineStart = this.lineStart, t.startLoc = this.startLoc, t.endLoc = this.endLoc, t.errors = this.errors.slice(), t.potentialArrowAt = this.potentialArrowAt, t.noArrowAt = this.noArrowAt.slice(), t.noArrowParamsConversionAt = this.noArrowParamsConversionAt.slice(), t.topicContext = this.topicContext, t.labels = this.labels.slice(), t.commentsLen = this.commentsLen, t.commentStack = this.commentStack.slice(), t.pos = this.pos, t.type = this.type, t.value = this.value, t.start = this.start, t.end = this.end, t.lastTokEndLoc = this.lastTokEndLoc, t.lastTokStartLoc = this.lastTokStartLoc, t.context = this.context.slice(), t.firstInvalidTemplateEscapePos = this.firstInvalidTemplateEscapePos, t.strictErrors = this.strictErrors, t.tokensLength = this.tokensLength, t;
6202
6172
  }
6203
6173
  }
6204
- var qa = function(t) {
6174
+ var za = function(t) {
6205
6175
  return t >= 48 && t <= 57;
6206
6176
  };
6207
- const Ts = {
6177
+ const ws = {
6208
6178
  decBinOct: /* @__PURE__ */ new Set([46, 66, 69, 79, 95, 98, 101, 111]),
6209
6179
  hex: /* @__PURE__ */ new Set([46, 88, 95, 120])
6210
6180
  }, We = {
@@ -6213,7 +6183,7 @@ const Ts = {
6213
6183
  dec: (r) => r >= 48 && r <= 57,
6214
6184
  hex: (r) => r >= 48 && r <= 57 || r >= 65 && r <= 70 || r >= 97 && r <= 102
6215
6185
  };
6216
- function ws(r, t, s, e, i, a) {
6186
+ function Ts(r, t, s, e, i, a) {
6217
6187
  const n = s, o = e, c = i;
6218
6188
  let h = "", l = null, p = s;
6219
6189
  const {
@@ -6225,13 +6195,13 @@ function ws(r, t, s, e, i, a) {
6225
6195
  break;
6226
6196
  }
6227
6197
  const f = t.charCodeAt(s);
6228
- if (za(r, f, t, s)) {
6198
+ if (Va(r, f, t, s)) {
6229
6199
  h += t.slice(p, s);
6230
6200
  break;
6231
6201
  }
6232
6202
  if (f === 92) {
6233
6203
  h += t.slice(p, s);
6234
- const x = Va(t, s, e, i, r === "template", a);
6204
+ const x = Ha(t, s, e, i, r === "template", a);
6235
6205
  x.ch === null && !l ? l = {
6236
6206
  pos: s,
6237
6207
  lineStart: e,
@@ -6252,10 +6222,10 @@ function ws(r, t, s, e, i, a) {
6252
6222
  curLine: i
6253
6223
  };
6254
6224
  }
6255
- function za(r, t, s, e) {
6225
+ function Va(r, t, s, e) {
6256
6226
  return r === "template" ? t === 96 || t === 36 && s.charCodeAt(e + 1) === 123 : t === (r === "double" ? 34 : 39);
6257
6227
  }
6258
- function Va(r, t, s, e, i, a) {
6228
+ function Ha(r, t, s, e, i, a) {
6259
6229
  const n = !i;
6260
6230
  t++;
6261
6231
  const o = (h) => ({
@@ -6332,7 +6302,7 @@ function Lt(r, t, s, e, i, a, n, o) {
6332
6302
  };
6333
6303
  }
6334
6304
  function ii(r, t, s, e, i, a, n, o, c, h) {
6335
- const l = t, p = i === 16 ? Ts.hex : Ts.decBinOct, d = i === 16 ? We.hex : i === 10 ? We.dec : i === 8 ? We.oct : We.bin;
6305
+ const l = t, p = i === 16 ? ws.hex : ws.decBinOct, d = i === 16 ? We.hex : i === 10 ? We.dec : i === 8 ? We.oct : We.bin;
6336
6306
  let f = !1, x = 0;
6337
6307
  for (let A = 0, F = a ?? 1 / 0; A < F; ++A) {
6338
6308
  const E = r.charCodeAt(t);
@@ -6357,7 +6327,7 @@ function ii(r, t, s, e, i, a, n, o, c, h) {
6357
6327
  ++t;
6358
6328
  continue;
6359
6329
  }
6360
- if (E >= 97 ? k = E - 97 + 10 : E >= 65 ? k = E - 65 + 10 : qa(E) ? k = E - 48 : k = 1 / 0, k >= i) {
6330
+ if (E >= 97 ? k = E - 97 + 10 : E >= 65 ? k = E - 65 + 10 : za(E) ? k = E - 48 : k = 1 / 0, k >= i) {
6361
6331
  if (k <= 9 && h)
6362
6332
  return {
6363
6333
  n: null,
@@ -6408,14 +6378,14 @@ function ri(r, t, s, e, i, a) {
6408
6378
  function Me(r, t, s) {
6409
6379
  return new fe(s, r - t, r);
6410
6380
  }
6411
- const Ha = /* @__PURE__ */ new Set([103, 109, 115, 105, 121, 117, 100, 118]);
6412
- class Ka {
6381
+ const Ka = /* @__PURE__ */ new Set([103, 109, 115, 105, 121, 117, 100, 118]);
6382
+ class Ja {
6413
6383
  constructor(t) {
6414
6384
  const s = t.startIndex || 0;
6415
6385
  this.type = t.type, this.value = t.value, this.start = s + t.start, this.end = s + t.end, this.loc = new ot(t.startLoc, t.endLoc);
6416
6386
  }
6417
6387
  }
6418
- class Ja extends $a {
6388
+ class Wa extends qa {
6419
6389
  constructor(s, e) {
6420
6390
  super();
6421
6391
  m(this, "isLookahead");
@@ -6451,7 +6421,7 @@ class Ja extends $a {
6451
6421
  this.tokens.length = this.state.tokensLength, this.tokens.push(s), ++this.state.tokensLength;
6452
6422
  }
6453
6423
  next() {
6454
- this.checkKeywordEscapes(), this.optionFlags & 256 && this.pushToken(new Ka(this.state)), this.state.lastTokEndLoc = this.state.endLoc, this.state.lastTokStartLoc = this.state.startLoc, this.nextToken();
6424
+ this.checkKeywordEscapes(), this.optionFlags & 256 && this.pushToken(new Ja(this.state)), this.state.lastTokEndLoc = this.state.endLoc, this.state.lastTokStartLoc = this.state.startLoc, this.nextToken();
6455
6425
  }
6456
6426
  eat(s) {
6457
6427
  return this.match(s) ? (this.next(), !0) : !1;
@@ -6485,7 +6455,7 @@ class Ja extends $a {
6485
6455
  return this.nextTokenStartSince(this.state.pos);
6486
6456
  }
6487
6457
  nextTokenStartSince(s) {
6488
- return bt.lastIndex = s, bt.test(this.input) ? bt.lastIndex : s;
6458
+ return gt.lastIndex = s, gt.test(this.input) ? gt.lastIndex : s;
6489
6459
  }
6490
6460
  lookaheadCharCode() {
6491
6461
  return this.lookaheadCharCodeSince(this.state.pos);
@@ -6497,7 +6467,7 @@ class Ja extends $a {
6497
6467
  return this.nextTokenInLineStartSince(this.state.pos);
6498
6468
  }
6499
6469
  nextTokenInLineStartSince(s) {
6500
- return Tt.lastIndex = s, Tt.test(this.input) ? Tt.lastIndex : s;
6470
+ return wt.lastIndex = s, wt.test(this.input) ? wt.lastIndex : s;
6501
6471
  }
6502
6472
  lookaheadInLineCharCode() {
6503
6473
  return this.input.charCodeAt(this.nextTokenInLineStart());
@@ -6593,7 +6563,7 @@ class Ja extends $a {
6593
6563
  }
6594
6564
  break;
6595
6565
  default:
6596
- if (Ma(i))
6566
+ if (Fa(i))
6597
6567
  ++this.state.pos;
6598
6568
  else if (i === 45 && !this.inModule && this.optionFlags & 8192) {
6599
6569
  const a = this.state.pos;
@@ -6907,7 +6877,7 @@ class Ja extends $a {
6907
6877
  const h = () => G(s, n + 2 - e);
6908
6878
  for (; n < this.length; ) {
6909
6879
  const l = this.codePointAtPos(n), p = String.fromCharCode(l);
6910
- if (Ha.has(l))
6880
+ if (Ka.has(l))
6911
6881
  l === 118 ? c.includes("u") && this.raise(u.IncompatibleRegExpUVFlags, h()) : l === 117 && c.includes("v") && this.raise(u.IncompatibleRegExpUVFlags, h()), c.includes(p) && this.raise(u.DuplicateRegExpFlags, h());
6912
6882
  else if (Ce(l) || l === 92)
6913
6883
  this.raise(u.MalformedRegExpFlags, h());
@@ -6986,7 +6956,7 @@ class Ja extends $a {
6986
6956
  pos: i,
6987
6957
  curLine: a,
6988
6958
  lineStart: n
6989
- } = ws(s === 34 ? "double" : "single", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_string);
6959
+ } = Ts(s === 34 ? "double" : "single", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_string);
6990
6960
  this.state.pos = i + 1, this.state.lineStart = n, this.state.curLine = a, this.finishToken(134, e);
6991
6961
  }
6992
6962
  readTemplateContinuation() {
@@ -6999,7 +6969,7 @@ class Ja extends $a {
6999
6969
  pos: a,
7000
6970
  curLine: n,
7001
6971
  lineStart: o
7002
- } = ws("template", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_template);
6972
+ } = Ts("template", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_template);
7003
6973
  this.state.pos = a + 1, this.state.lineStart = o, this.state.curLine = n, i && (this.state.firstInvalidTemplateEscapePos = new fe(i.curLine, i.pos - i.lineStart, this.sourceToOffsetPos(i.pos))), this.input.codePointAt(a) === 96 ? this.finishToken(24, i ? null : s + e + "`") : (this.state.pos++, this.finishToken(25, i ? null : s + e + "${"));
7004
6974
  }
7005
6975
  recordStrictModeErrors(s, e) {
@@ -7083,14 +7053,14 @@ class Ja extends $a {
7083
7053
  };
7084
7054
  }
7085
7055
  }
7086
- class Wa {
7056
+ class Xa {
7087
7057
  constructor() {
7088
7058
  m(this, "privateNames", /* @__PURE__ */ new Set());
7089
7059
  m(this, "loneAccessors", /* @__PURE__ */ new Map());
7090
7060
  m(this, "undefinedPrivateNames", /* @__PURE__ */ new Map());
7091
7061
  }
7092
7062
  }
7093
- class Xa {
7063
+ class Ga {
7094
7064
  constructor(t) {
7095
7065
  m(this, "parser");
7096
7066
  m(this, "stack", []);
@@ -7101,7 +7071,7 @@ class Xa {
7101
7071
  return this.stack[this.stack.length - 1];
7102
7072
  }
7103
7073
  enter() {
7104
- this.stack.push(new Wa());
7074
+ this.stack.push(new Xa());
7105
7075
  }
7106
7076
  exit() {
7107
7077
  const t = this.stack.pop(), s = this.current();
@@ -7164,7 +7134,7 @@ class ai extends dt {
7164
7134
  this.declarationErrors.forEach(s);
7165
7135
  }
7166
7136
  }
7167
- class Ga {
7137
+ class Ya {
7168
7138
  constructor(t) {
7169
7139
  m(this, "parser");
7170
7140
  m(this, "stack", [new dt()]);
@@ -7221,19 +7191,19 @@ class Ga {
7221
7191
  });
7222
7192
  }
7223
7193
  }
7224
- function Ya() {
7194
+ function Qa() {
7225
7195
  return new dt(3);
7226
7196
  }
7227
- function Qa() {
7197
+ function Za() {
7228
7198
  return new ai(1);
7229
7199
  }
7230
- function Za() {
7200
+ function en() {
7231
7201
  return new ai(2);
7232
7202
  }
7233
7203
  function ni() {
7234
7204
  return new dt();
7235
7205
  }
7236
- class en extends Ja {
7206
+ class tn extends Wa {
7237
7207
  addExtra(t, s, e, i = !0) {
7238
7208
  if (!t) return;
7239
7209
  let {
@@ -7273,10 +7243,10 @@ class en extends Ja {
7273
7243
  return this.match(140) || this.match(8) || this.hasPrecedingLineBreak();
7274
7244
  }
7275
7245
  hasPrecedingLineBreak() {
7276
- return bs(this.input, this.offsetToSourcePos(this.state.lastTokEndLoc.index), this.state.start);
7246
+ return gs(this.input, this.offsetToSourcePos(this.state.lastTokEndLoc.index), this.state.start);
7277
7247
  }
7278
7248
  hasFollowingLineBreak() {
7279
- return bs(this.input, this.state.end, this.nextTokenStart());
7249
+ return gs(this.input, this.state.end, this.nextTokenStart());
7280
7250
  }
7281
7251
  isLineTerminator() {
7282
7252
  return this.eat(13) || this.canInsertSemicolon();
@@ -7375,9 +7345,9 @@ class en extends Ja {
7375
7345
  const o = this.prodParam;
7376
7346
  this.prodParam = new ja();
7377
7347
  const c = this.classScope;
7378
- this.classScope = new Xa(this);
7348
+ this.classScope = new Ga(this);
7379
7349
  const h = this.expressionScope;
7380
- return this.expressionScope = new Ga(this), () => {
7350
+ return this.expressionScope = new Ya(this), () => {
7381
7351
  this.state.labels = s, this.exportedIdentifiers = e, this.inModule = i, this.scope = a, this.prodParam = o, this.classScope = c, this.expressionScope = h;
7382
7352
  };
7383
7353
  }
@@ -7407,7 +7377,7 @@ class Mt {
7407
7377
  }
7408
7378
  }
7409
7379
  const As = Mt.prototype;
7410
- class tn extends en {
7380
+ class sn extends tn {
7411
7381
  startNode() {
7412
7382
  const t = this.state.startLoc;
7413
7383
  return new Mt(this, t.index, t);
@@ -7460,7 +7430,7 @@ class tn extends en {
7460
7430
  }
7461
7431
  }
7462
7432
  const oi = (r) => r.type === "ParenthesizedExpression" ? oi(r.expression) : r;
7463
- class sn extends tn {
7433
+ class rn extends sn {
7464
7434
  toAssignable(t, s = !1) {
7465
7435
  var i, a, n;
7466
7436
  let e;
@@ -7718,7 +7688,7 @@ class sn extends tn {
7718
7688
  return this.match(12) ? (this.raise(this.lookaheadCharCode() === t ? u.RestTrailingComma : u.ElementAfterRest, this.state.startLoc), !0) : !1;
7719
7689
  }
7720
7690
  }
7721
- function rn(r) {
7691
+ function an(r) {
7722
7692
  if (r == null)
7723
7693
  throw new Error(`Unexpected ${r} value.`);
7724
7694
  return r;
@@ -7727,7 +7697,7 @@ function Ss(r) {
7727
7697
  if (!r)
7728
7698
  throw new Error("Assert fail");
7729
7699
  }
7730
- const g = te`typescript`({
7700
+ const b = te`typescript`({
7731
7701
  AbstractMethodHasImplementation: ({
7732
7702
  methodName: r
7733
7703
  }) => `Method '${r}' cannot have an implementation because it is marked abstract.`,
@@ -7823,7 +7793,7 @@ const g = te`typescript`({
7823
7793
  type: r
7824
7794
  }) => `Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${r}.`
7825
7795
  });
7826
- function an(r) {
7796
+ function nn(r) {
7827
7797
  switch (r) {
7828
7798
  case "any":
7829
7799
  return "TSAnyKeyword";
@@ -7852,7 +7822,7 @@ function an(r) {
7852
7822
  function Is(r) {
7853
7823
  return r === "private" || r === "public" || r === "protected";
7854
7824
  }
7855
- function nn(r) {
7825
+ function on(r) {
7856
7826
  return r === "in" || r === "out";
7857
7827
  }
7858
7828
  function Ft(r) {
@@ -7870,23 +7840,23 @@ function Ft(r) {
7870
7840
  return !1;
7871
7841
  }
7872
7842
  }
7873
- var on = (r) => class extends r {
7843
+ var cn = (r) => class extends r {
7874
7844
  constructor() {
7875
7845
  super(...arguments);
7876
7846
  m(this, "tsParseInOutModifiers", this.tsParseModifiers.bind(this, {
7877
7847
  allowedModifiers: ["in", "out"],
7878
7848
  disallowedModifiers: ["const", "public", "private", "protected", "readonly", "declare", "abstract", "override"],
7879
- errorTemplate: g.InvalidModifierOnTypeParameter
7849
+ errorTemplate: b.InvalidModifierOnTypeParameter
7880
7850
  }));
7881
7851
  m(this, "tsParseConstModifier", this.tsParseModifiers.bind(this, {
7882
7852
  allowedModifiers: ["const"],
7883
7853
  disallowedModifiers: ["in", "out"],
7884
- errorTemplate: g.InvalidModifierOnTypeParameterPositions
7854
+ errorTemplate: b.InvalidModifierOnTypeParameterPositions
7885
7855
  }));
7886
7856
  m(this, "tsParseInOutConstModifiers", this.tsParseModifiers.bind(this, {
7887
7857
  allowedModifiers: ["in", "out", "const"],
7888
7858
  disallowedModifiers: ["public", "private", "protected", "readonly", "declare", "abstract", "override"],
7889
- errorTemplate: g.InvalidModifierOnTypeParameter
7859
+ errorTemplate: b.InvalidModifierOnTypeParameter
7890
7860
  }));
7891
7861
  }
7892
7862
  getScopeHandler() {
@@ -7919,14 +7889,14 @@ var on = (r) => class extends r {
7919
7889
  allowedModifiers: e,
7920
7890
  disallowedModifiers: i,
7921
7891
  stopOnStartOfClassStaticBlock: a,
7922
- errorTemplate: n = g.InvalidModifierOnTypeMember
7892
+ errorTemplate: n = b.InvalidModifierOnTypeMember
7923
7893
  }, o) {
7924
7894
  const c = (l, p, d, f) => {
7925
- p === d && o[f] && this.raise(g.InvalidModifiersOrder, l, {
7895
+ p === d && o[f] && this.raise(b.InvalidModifiersOrder, l, {
7926
7896
  orderedModifiers: [d, f]
7927
7897
  });
7928
7898
  }, h = (l, p, d, f) => {
7929
- (o[d] && p === f || o[f] && p === d) && this.raise(g.IncompatibleModifiers, l, {
7899
+ (o[d] && p === f || o[f] && p === d) && this.raise(b.IncompatibleModifiers, l, {
7930
7900
  modifiers: [d, f]
7931
7901
  });
7932
7902
  };
@@ -7935,11 +7905,11 @@ var on = (r) => class extends r {
7935
7905
  startLoc: l
7936
7906
  } = this.state, p = this.tsParseModifier(e.concat(i ?? []), a, o.static);
7937
7907
  if (!p) break;
7938
- Is(p) ? o.accessibility ? this.raise(g.DuplicateAccessibilityModifier, l, {
7908
+ Is(p) ? o.accessibility ? this.raise(b.DuplicateAccessibilityModifier, l, {
7939
7909
  modifier: p
7940
- }) : (c(l, p, p, "override"), c(l, p, p, "static"), c(l, p, p, "readonly"), o.accessibility = p) : nn(p) ? (o[p] && this.raise(g.DuplicateModifier, l, {
7910
+ }) : (c(l, p, p, "override"), c(l, p, p, "static"), c(l, p, p, "readonly"), o.accessibility = p) : on(p) ? (o[p] && this.raise(b.DuplicateModifier, l, {
7941
7911
  modifier: p
7942
- }), o[p] = !0, c(l, p, "in", "out")) : (Object.hasOwn(o, p) ? this.raise(g.DuplicateModifier, l, {
7912
+ }), o[p] = !0, c(l, p, "in", "out")) : (Object.hasOwn(o, p) ? this.raise(b.DuplicateModifier, l, {
7943
7913
  modifier: p
7944
7914
  }) : (c(l, p, "static", "readonly"), c(l, p, "static", "override"), c(l, p, "override", "readonly"), c(l, p, "abstract", "override"), h(l, p, "declare", "override"), h(l, p, "static", "abstract")), o[p] = !0), i != null && i.includes(p) && this.raise(n, l, {
7945
7915
  modifier: p
@@ -7966,7 +7936,7 @@ var on = (r) => class extends r {
7966
7936
  return a;
7967
7937
  }
7968
7938
  tsParseDelimitedList(e, i, a) {
7969
- return rn(this.tsParseDelimitedListWorker(e, i, !0, a));
7939
+ return an(this.tsParseDelimitedListWorker(e, i, !0, a));
7970
7940
  }
7971
7941
  tsParseDelimitedListWorker(e, i, a, n) {
7972
7942
  const o = [];
@@ -7994,7 +7964,7 @@ var on = (r) => class extends r {
7994
7964
  }
7995
7965
  tsParseImportType() {
7996
7966
  const e = this.startNode();
7997
- return this.expect(83), this.expect(10), this.match(134) ? e.argument = this.tsParseLiteralTypeNode() : (this.raise(g.UnsupportedImportTypeArgument, this.state.startLoc), e.argument = this.tsParseNonConditionalType()), this.eat(12) ? e.options = this.tsParseImportTypeOptions() : e.options = null, this.expect(11), this.eat(16) && (e.qualifier = this.tsParseEntityName(3)), this.match(47) && (e.typeArguments = this.tsParseTypeArguments()), this.finishNode(e, "TSImportType");
7967
+ return this.expect(83), this.expect(10), this.match(134) ? e.argument = this.tsParseLiteralTypeNode() : (this.raise(b.UnsupportedImportTypeArgument, this.state.startLoc), e.argument = this.tsParseNonConditionalType()), this.eat(12) ? e.options = this.tsParseImportTypeOptions() : e.options = null, this.expect(11), this.eat(16) && (e.qualifier = this.tsParseEntityName(3)), this.match(47) && (e.typeArguments = this.tsParseTypeArguments()), this.finishNode(e, "TSImportType");
7998
7968
  }
7999
7969
  tsParseImportTypeOptions() {
8000
7970
  const e = this.startNode();
@@ -8058,7 +8028,7 @@ var on = (r) => class extends r {
8058
8028
  const a = {
8059
8029
  value: -1
8060
8030
  };
8061
- return i.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this, e), !1, !0, a), i.params.length === 0 && this.raise(g.EmptyTypeParameters, i), a.value !== -1 && this.addExtra(i, "trailingComma", a.value), this.finishNode(i, "TSTypeParameterDeclaration");
8031
+ return i.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this, e), !1, !0, a), i.params.length === 0 && this.raise(b.EmptyTypeParameters, i), a.value !== -1 && this.addExtra(i, "trailingComma", a.value), this.finishNode(i, "TSTypeParameterDeclaration");
8062
8032
  }
8063
8033
  tsFillSignature(e, i) {
8064
8034
  const a = e === 19, n = "params", o = "returnType";
@@ -8070,7 +8040,7 @@ var on = (r) => class extends r {
8070
8040
  const {
8071
8041
  type: a
8072
8042
  } = i;
8073
- (a === "AssignmentPattern" || a === "TSParameterProperty") && this.raise(g.UnsupportedSignatureParameterKind, i, {
8043
+ (a === "AssignmentPattern" || a === "TSParameterProperty") && this.raise(b.UnsupportedSignatureParameterKind, i, {
8074
8044
  type: a
8075
8045
  });
8076
8046
  }
@@ -8096,20 +8066,20 @@ var on = (r) => class extends r {
8096
8066
  }
8097
8067
  tsParsePropertyOrMethodSignature(e, i) {
8098
8068
  if (this.eat(17) && (e.optional = !0), this.match(10) || this.match(47)) {
8099
- i && this.raise(g.ReadonlyForMethodSignature, e);
8069
+ i && this.raise(b.ReadonlyForMethodSignature, e);
8100
8070
  const a = e;
8101
- a.kind && this.match(47) && this.raise(g.AccessorCannotHaveTypeParameters, this.state.curPosition()), this.tsFillSignature(14, a), this.tsParseTypeMemberSemicolon();
8071
+ a.kind && this.match(47) && this.raise(b.AccessorCannotHaveTypeParameters, this.state.curPosition()), this.tsFillSignature(14, a), this.tsParseTypeMemberSemicolon();
8102
8072
  const n = "params", o = "returnType";
8103
8073
  if (a.kind === "get")
8104
- a[n].length > 0 && (this.raise(u.BadGetterArity, this.state.curPosition()), this.isThisParam(a[n][0]) && this.raise(g.AccessorCannotDeclareThisParameter, this.state.curPosition()));
8074
+ a[n].length > 0 && (this.raise(u.BadGetterArity, this.state.curPosition()), this.isThisParam(a[n][0]) && this.raise(b.AccessorCannotDeclareThisParameter, this.state.curPosition()));
8105
8075
  else if (a.kind === "set") {
8106
8076
  if (a[n].length !== 1)
8107
8077
  this.raise(u.BadSetterArity, this.state.curPosition());
8108
8078
  else {
8109
8079
  const c = a[n][0];
8110
- this.isThisParam(c) && this.raise(g.AccessorCannotDeclareThisParameter, this.state.curPosition()), c.type === "Identifier" && c.optional && this.raise(g.SetAccessorCannotHaveOptionalParameter, this.state.curPosition()), c.type === "RestElement" && this.raise(g.SetAccessorCannotHaveRestParameter, this.state.curPosition());
8080
+ this.isThisParam(c) && this.raise(b.AccessorCannotDeclareThisParameter, this.state.curPosition()), c.type === "Identifier" && c.optional && this.raise(b.SetAccessorCannotHaveOptionalParameter, this.state.curPosition()), c.type === "RestElement" && this.raise(b.SetAccessorCannotHaveRestParameter, this.state.curPosition());
8111
8081
  }
8112
- a[o] && this.raise(g.SetAccessorCannotHaveReturnType, a[o]);
8082
+ a[o] && this.raise(b.SetAccessorCannotHaveReturnType, a[o]);
8113
8083
  } else
8114
8084
  a.kind = "method";
8115
8085
  return this.finishNode(a, "TSMethodSignature");
@@ -8159,7 +8129,7 @@ var on = (r) => class extends r {
8159
8129
  const {
8160
8130
  type: n
8161
8131
  } = a;
8162
- i && n !== "TSRestType" && n !== "TSOptionalType" && !(n === "TSNamedTupleMember" && a.optional) && this.raise(g.OptionalTypeBeforeRequired, a), i || (i = n === "TSNamedTupleMember" && a.optional || n === "TSOptionalType");
8132
+ i && n !== "TSRestType" && n !== "TSOptionalType" && !(n === "TSNamedTupleMember" && a.optional) && this.raise(b.OptionalTypeBeforeRequired, a), i || (i = n === "TSNamedTupleMember" && a.optional || n === "TSOptionalType");
8163
8133
  }), this.finishNode(e, "TSTupleType");
8164
8134
  }
8165
8135
  tsParseTupleElementType() {
@@ -8178,7 +8148,7 @@ var on = (r) => class extends r {
8178
8148
  h = this.tsParseType(), c = this.eat(17), n = this.eat(14);
8179
8149
  if (n) {
8180
8150
  let d;
8181
- o ? (d = this.startNodeAt(a), d.optional = c, d.label = o, d.elementType = h, this.eat(17) && (d.optional = !0, this.raise(g.TupleOptionalAfterType, this.state.lastTokStartLoc))) : (d = this.startNodeAt(a), d.optional = c, this.raise(g.InvalidTupleMemberLabel, h), d.label = h, d.elementType = this.tsParseType()), h = this.finishNode(d, "TSNamedTupleMember");
8151
+ o ? (d = this.startNodeAt(a), d.optional = c, d.label = o, d.elementType = h, this.eat(17) && (d.optional = !0, this.raise(b.TupleOptionalAfterType, this.state.lastTokStartLoc))) : (d = this.startNodeAt(a), d.optional = c, this.raise(b.InvalidTupleMemberLabel, h), d.label = h, d.elementType = this.tsParseType()), h = this.finishNode(d, "TSNamedTupleMember");
8182
8152
  } else if (c) {
8183
8153
  const d = this.startNodeAt(a);
8184
8154
  d.typeAnnotation = h, h = this.finishNode(d, "TSOptionalType");
@@ -8276,7 +8246,7 @@ var on = (r) => class extends r {
8276
8246
  type: e
8277
8247
  } = this.state;
8278
8248
  if (N(e) || e === 88 || e === 84) {
8279
- const i = e === 88 ? "TSVoidKeyword" : e === 84 ? "TSNullKeyword" : an(this.state.value);
8249
+ const i = e === 88 ? "TSVoidKeyword" : e === 84 ? "TSNullKeyword" : nn(this.state.value);
8280
8250
  if (i !== void 0 && this.lookaheadCharCode() !== 46) {
8281
8251
  const a = this.startNode();
8282
8252
  return this.next(), this.finishNode(a, i);
@@ -8312,7 +8282,7 @@ var on = (r) => class extends r {
8312
8282
  case "TSArrayType":
8313
8283
  return;
8314
8284
  default:
8315
- this.raise(g.UnexpectedReadonly, e);
8285
+ this.raise(b.UnexpectedReadonly, e);
8316
8286
  }
8317
8287
  }
8318
8288
  tsParseInferType() {
@@ -8329,7 +8299,7 @@ var on = (r) => class extends r {
8329
8299
  }
8330
8300
  }
8331
8301
  tsParseTypeOperatorOrHigher() {
8332
- return ua(this.state.type) && !this.state.containsEsc ? this.tsParseTypeOperator() : this.isContextual(115) ? this.tsParseInferType() : this.tsInAllowConditionalTypesContext(() => this.tsParseArrayTypeOrHigher());
8302
+ return pa(this.state.type) && !this.state.containsEsc ? this.tsParseTypeOperator() : this.isContextual(115) ? this.tsParseInferType() : this.tsInAllowConditionalTypesContext(() => this.tsParseArrayTypeOrHigher());
8333
8303
  }
8334
8304
  tsParseUnionOrIntersectionType(e, i, a) {
8335
8305
  const n = this.startNode(), o = this.eat(a), c = [];
@@ -8436,7 +8406,7 @@ var on = (r) => class extends r {
8436
8406
  return this.tsIsStartOfFunctionType() ? this.tsParseFunctionOrConstructorType("TSFunctionType") : this.match(77) ? this.tsParseFunctionOrConstructorType("TSConstructorType") : this.isAbstractConstructorSignature() ? this.tsParseFunctionOrConstructorType("TSConstructorType", !0) : this.tsParseUnionTypeOrHigher();
8437
8407
  }
8438
8408
  tsParseTypeAssertion() {
8439
- this.getPluginOption("typescript", "disallowAmbiguousJSXLike") && this.raise(g.ReservedTypeAssertion, this.state.startLoc);
8409
+ this.getPluginOption("typescript", "disallowAmbiguousJSXLike") && this.raise(b.ReservedTypeAssertion, this.state.startLoc);
8440
8410
  const e = this.startNode();
8441
8411
  return e.typeAnnotation = this.tsInType(() => (this.next(), this.match(75) ? this.tsParseTypeReference() : this.tsParseType())), this.expect(48), e.expression = this.parseMaybeUnary(), this.finishNode(e, "TSTypeAssertion");
8442
8412
  }
@@ -8444,7 +8414,7 @@ var on = (r) => class extends r {
8444
8414
  const i = this.state.startLoc, a = this.tsParseDelimitedList("HeritageClauseElement", () => {
8445
8415
  {
8446
8416
  const n = super.parseExprSubscripts();
8447
- Ft(n) || this.raise(g.InvalidHeritageClauseType, n.loc.start, {
8417
+ Ft(n) || this.raise(b.InvalidHeritageClauseType, n.loc.start, {
8448
8418
  token: e
8449
8419
  });
8450
8420
  const o = e === "extends" ? "TSInterfaceHeritage" : "TSClassImplements";
@@ -8454,13 +8424,13 @@ var on = (r) => class extends r {
8454
8424
  return c.expression = n, (this.match(47) || this.match(51)) && (c.typeArguments = this.tsParseTypeArgumentsInExpression()), this.finishNode(c, o);
8455
8425
  }
8456
8426
  });
8457
- return a.length || this.raise(g.EmptyHeritageClauseType, i, {
8427
+ return a.length || this.raise(b.EmptyHeritageClauseType, i, {
8458
8428
  token: e
8459
8429
  }), a;
8460
8430
  }
8461
8431
  tsParseInterfaceDeclaration(e, i = {}) {
8462
8432
  if (this.hasFollowingLineBreak()) return null;
8463
- this.expectContextual(129), i.declare && (e.declare = !0), N(this.state.type) ? (e.id = this.parseIdentifier(), this.checkIdentifier(e.id, 130)) : (e.id = null, this.raise(g.MissingInterfaceName, this.state.startLoc)), e.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers), this.eat(81) && (e.extends = this.tsParseHeritageClause("extends"));
8433
+ this.expectContextual(129), i.declare && (e.declare = !0), N(this.state.type) ? (e.id = this.parseIdentifier(), this.checkIdentifier(e.id, 130)) : (e.id = null, this.raise(b.MissingInterfaceName, this.state.startLoc)), e.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers), this.eat(81) && (e.extends = this.tsParseHeritageClause("extends"));
8464
8434
  const a = this.startNode();
8465
8435
  return a.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)), e.body = this.finishNode(a, "TSInterfaceBody"), this.finishNode(e, "TSInterfaceDeclaration");
8466
8436
  }
@@ -8474,7 +8444,7 @@ var on = (r) => class extends r {
8474
8444
  }), this.semicolon(), this.finishNode(e, "TSTypeAliasDeclaration");
8475
8445
  }
8476
8446
  tsInTopLevelContext(e) {
8477
- if (this.curContext() !== O.brace) {
8447
+ if (this.curContext() !== D.brace) {
8478
8448
  const i = this.state.context;
8479
8449
  this.state.context = [i[0]];
8480
8450
  try {
@@ -8546,7 +8516,7 @@ var on = (r) => class extends r {
8546
8516
  tsParseImportEqualsDeclaration(e, i, a) {
8547
8517
  e.id = i || this.parseIdentifier(), this.checkIdentifier(e.id, 4096), this.expect(29);
8548
8518
  const n = this.tsParseModuleReference();
8549
- return e.importKind === "type" && n.type !== "TSExternalModuleReference" && this.raise(g.ImportAliasHasImportType, n), e.moduleReference = n, this.semicolon(), this.finishNode(e, "TSImportEqualsDeclaration");
8519
+ return e.importKind === "type" && n.type !== "TSExternalModuleReference" && this.raise(b.ImportAliasHasImportType, n), e.moduleReference = n, this.semicolon(), this.finishNode(e, "TSImportEqualsDeclaration");
8550
8520
  }
8551
8521
  tsIsExternalModuleReference() {
8552
8522
  return this.isContextual(119) && this.lookaheadCharCode() === 40;
@@ -8671,10 +8641,10 @@ var on = (r) => class extends r {
8671
8641
  }
8672
8642
  tsParseTypeArguments() {
8673
8643
  const e = this.startNode();
8674
- return e.params = this.tsInType(() => this.tsInTopLevelContext(() => (this.expect(47), this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this))))), e.params.length === 0 ? this.raise(g.EmptyTypeArguments, e) : !this.state.inType && this.curContext() === O.brace && this.reScan_lt_gt(), this.expect(48), this.finishNode(e, "TSTypeParameterInstantiation");
8644
+ return e.params = this.tsInType(() => this.tsInTopLevelContext(() => (this.expect(47), this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this))))), e.params.length === 0 ? this.raise(b.EmptyTypeArguments, e) : !this.state.inType && this.curContext() === D.brace && this.reScan_lt_gt(), this.expect(48), this.finishNode(e, "TSTypeParameterInstantiation");
8675
8645
  }
8676
8646
  tsIsDeclarationStart() {
8677
- return pa(this.state.type);
8647
+ return fa(this.state.type);
8678
8648
  }
8679
8649
  isExportDefaultSpecifier() {
8680
8650
  return this.tsIsDeclarationStart() ? !1 : super.isExportDefaultSpecifier();
@@ -8685,13 +8655,13 @@ var on = (r) => class extends r {
8685
8655
  allowedModifiers: ["public", "private", "protected", "override", "readonly"]
8686
8656
  }, n);
8687
8657
  const o = n.accessibility, c = n.override, h = n.readonly;
8688
- !(e & 4) && (o || h || c) && this.raise(g.UnexpectedParameterModifier, a);
8658
+ !(e & 4) && (o || h || c) && this.raise(b.UnexpectedParameterModifier, a);
8689
8659
  const l = this.parseMaybeDefault();
8690
8660
  e & 2 && this.parseFunctionParamType(l);
8691
8661
  const p = this.parseMaybeDefault(l.loc.start, l);
8692
8662
  if (o || h || c) {
8693
8663
  const d = this.startNodeAt(a);
8694
- return i.length && (d.decorators = i), o && (d.accessibility = o), h && (d.readonly = h), c && (d.override = c), p.type !== "Identifier" && p.type !== "AssignmentPattern" && this.raise(g.UnsupportedParameterPropertyKind, d), d.parameter = p, this.finishNode(d, "TSParameterProperty");
8664
+ return i.length && (d.decorators = i), o && (d.accessibility = o), h && (d.readonly = h), c && (d.override = c), p.type !== "Identifier" && p.type !== "AssignmentPattern" && this.raise(b.UnsupportedParameterPropertyKind, d), d.parameter = p, this.finishNode(d, "TSParameterProperty");
8695
8665
  }
8696
8666
  return i.length && (l.decorators = i), p;
8697
8667
  }
@@ -8700,7 +8670,7 @@ var on = (r) => class extends r {
8700
8670
  }
8701
8671
  tsDisallowOptionalPattern(e) {
8702
8672
  for (const i of e.params)
8703
- i.type !== "Identifier" && i.optional && !this.state.isAmbientContext && this.raise(g.PatternIsOptional, i);
8673
+ i.type !== "Identifier" && i.optional && !this.state.isAmbientContext && this.raise(b.PatternIsOptional, i);
8704
8674
  }
8705
8675
  setArrowFunctionParameters(e, i, a) {
8706
8676
  super.setArrowFunctionParameters(e, i, a), this.tsDisallowOptionalPattern(e);
@@ -8708,14 +8678,14 @@ var on = (r) => class extends r {
8708
8678
  parseFunctionBodyAndFinish(e, i, a = !1) {
8709
8679
  this.match(14) && (e.returnType = this.tsParseTypeOrTypePredicateAnnotation(14));
8710
8680
  const n = i === "FunctionDeclaration" ? "TSDeclareFunction" : i === "ClassMethod" || i === "ClassPrivateMethod" ? "TSDeclareMethod" : void 0;
8711
- return n && !this.match(5) && this.isLineTerminator() ? this.finishNode(e, n) : n === "TSDeclareFunction" && this.state.isAmbientContext && (this.raise(g.DeclareFunctionHasImplementation, e), e.declare) ? super.parseFunctionBodyAndFinish(e, n, a) : (this.tsDisallowOptionalPattern(e), super.parseFunctionBodyAndFinish(e, i, a));
8681
+ return n && !this.match(5) && this.isLineTerminator() ? this.finishNode(e, n) : n === "TSDeclareFunction" && this.state.isAmbientContext && (this.raise(b.DeclareFunctionHasImplementation, e), e.declare) ? super.parseFunctionBodyAndFinish(e, n, a) : (this.tsDisallowOptionalPattern(e), super.parseFunctionBodyAndFinish(e, i, a));
8712
8682
  }
8713
8683
  registerFunctionStatementId(e) {
8714
8684
  !e.body && e.id ? this.checkIdentifier(e.id, 1024) : super.registerFunctionStatementId(e);
8715
8685
  }
8716
8686
  tsCheckForInvalidTypeCasts(e) {
8717
8687
  e.forEach((i) => {
8718
- (i == null ? void 0 : i.type) === "TSTypeCastExpression" && this.raise(g.UnexpectedTypeAnnotation, i.typeAnnotation);
8688
+ (i == null ? void 0 : i.type) === "TSTypeCastExpression" && this.raise(b.UnexpectedTypeAnnotation, i.typeAnnotation);
8719
8689
  });
8720
8690
  }
8721
8691
  toReferencedList(e, i) {
@@ -8751,7 +8721,7 @@ var on = (r) => class extends r {
8751
8721
  c = this.state.curPosition();
8752
8722
  return;
8753
8723
  }
8754
- if (Dt(this.state.type)) {
8724
+ if (Ot(this.state.type)) {
8755
8725
  const f = super.parseTaggedTemplateExpression(e, i, n);
8756
8726
  return f.typeArguments = l, f;
8757
8727
  }
@@ -8766,7 +8736,7 @@ var on = (r) => class extends r {
8766
8736
  return d.expression = e, d.typeArguments = l, this.finishNode(d, "TSInstantiationExpression");
8767
8737
  });
8768
8738
  if (c && this.unexpected(c, 10), h)
8769
- return h.type === "TSInstantiationExpression" && ((this.match(16) || this.match(18) && this.lookaheadCharCode() !== 40) && this.raise(g.InvalidPropertyAccessAfterInstantiationExpression, this.state.startLoc), !this.match(16) && !this.match(18) && (h.expression = super.stopParseSubscript(e, n))), h;
8739
+ return h.type === "TSInstantiationExpression" && ((this.match(16) || this.match(18) && this.lookaheadCharCode() !== 40) && this.raise(b.InvalidPropertyAccessAfterInstantiationExpression, this.state.startLoc), !this.match(16) && !this.match(18) && (h.expression = super.stopParseSubscript(e, n))), h;
8770
8740
  }
8771
8741
  return super.parseSubscript(e, i, a, n);
8772
8742
  }
@@ -8792,7 +8762,7 @@ var on = (r) => class extends r {
8792
8762
  this.state.isAmbientContext || super.checkReservedWord(e, i, a, n);
8793
8763
  }
8794
8764
  checkImportReflection(e) {
8795
- super.checkImportReflection(e), e.module && e.importKind !== "value" && this.raise(g.ImportReflectionHasImportType, e.specifiers[0].loc.start);
8765
+ super.checkImportReflection(e), e.module && e.importKind !== "value" && this.raise(b.ImportReflectionHasImportType, e.specifiers[0].loc.start);
8796
8766
  }
8797
8767
  checkDuplicateExports() {
8798
8768
  }
@@ -8820,7 +8790,7 @@ var on = (r) => class extends r {
8820
8790
  i = super.parseImportSpecifiersAndAfter(e, a);
8821
8791
  } else
8822
8792
  i = super.parseImport(e);
8823
- return i.importKind === "type" && i.specifiers.length > 1 && i.specifiers[0].type === "ImportDefaultSpecifier" && this.raise(g.TypeImportCannotSpecifyDefaultAndNamed, i), i;
8793
+ return i.importKind === "type" && i.specifiers.length > 1 && i.specifiers[0].type === "ImportDefaultSpecifier" && this.raise(b.TypeImportCannotSpecifyDefaultAndNamed, i), i;
8824
8794
  }
8825
8795
  parseExport(e, i) {
8826
8796
  if (this.match(83)) {
@@ -8862,7 +8832,7 @@ var on = (r) => class extends r {
8862
8832
  id: c,
8863
8833
  init: h
8864
8834
  } of o.declarations)
8865
- h && (i === "var" || i === "let" || c.typeAnnotation ? this.raise(g.InitializerNotAllowedInAmbientContext, h) : hn(h, this.hasPlugin("estree")) || this.raise(g.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference, h));
8835
+ h && (i === "var" || i === "let" || c.typeAnnotation ? this.raise(b.InitializerNotAllowedInAmbientContext, h) : ln(h, this.hasPlugin("estree")) || this.raise(b.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference, h));
8866
8836
  return o;
8867
8837
  }
8868
8838
  parseStatementContent(e, i) {
@@ -8895,25 +8865,25 @@ var on = (r) => class extends r {
8895
8865
  allowedModifiers: n,
8896
8866
  disallowedModifiers: ["in", "out"],
8897
8867
  stopOnStartOfClassStaticBlock: !0,
8898
- errorTemplate: g.InvalidModifierOnTypeParameterPositions
8868
+ errorTemplate: b.InvalidModifierOnTypeParameterPositions
8899
8869
  }, i);
8900
8870
  const o = () => {
8901
- this.tsIsStartOfStaticBlocks() ? (this.next(), this.next(), this.tsHasSomeModifiers(i, n) && this.raise(g.StaticBlockCannotHaveModifier, this.state.curPosition()), super.parseClassStaticBlock(e, i)) : this.parseClassMemberWithIsStatic(e, i, a, !!i.static);
8871
+ this.tsIsStartOfStaticBlocks() ? (this.next(), this.next(), this.tsHasSomeModifiers(i, n) && this.raise(b.StaticBlockCannotHaveModifier, this.state.curPosition()), super.parseClassStaticBlock(e, i)) : this.parseClassMemberWithIsStatic(e, i, a, !!i.static);
8902
8872
  };
8903
8873
  i.declare ? this.tsInAmbientContext(o) : o();
8904
8874
  }
8905
8875
  parseClassMemberWithIsStatic(e, i, a, n) {
8906
8876
  const o = this.tsTryParseIndexSignature(i);
8907
8877
  if (o) {
8908
- e.body.push(o), i.abstract && this.raise(g.IndexSignatureHasAbstract, i), i.accessibility && this.raise(g.IndexSignatureHasAccessibility, i, {
8878
+ e.body.push(o), i.abstract && this.raise(b.IndexSignatureHasAbstract, i), i.accessibility && this.raise(b.IndexSignatureHasAccessibility, i, {
8909
8879
  modifier: i.accessibility
8910
- }), i.declare && this.raise(g.IndexSignatureHasDeclare, i), i.override && this.raise(g.IndexSignatureHasOverride, i);
8880
+ }), i.declare && this.raise(b.IndexSignatureHasDeclare, i), i.override && this.raise(b.IndexSignatureHasOverride, i);
8911
8881
  return;
8912
8882
  }
8913
- !this.state.inAbstractClass && i.abstract && this.raise(g.NonAbstractClassHasAbstractMethod, i), i.override && (a.hadSuperClass || this.raise(g.OverrideNotInSubClass, i)), super.parseClassMemberWithIsStatic(e, i, a, n);
8883
+ !this.state.inAbstractClass && i.abstract && this.raise(b.NonAbstractClassHasAbstractMethod, i), i.override && (a.hadSuperClass || this.raise(b.OverrideNotInSubClass, i)), super.parseClassMemberWithIsStatic(e, i, a, n);
8914
8884
  }
8915
8885
  parsePostMemberNameModifiers(e) {
8916
- this.eat(17) && (e.optional = !0), e.readonly && this.match(10) && this.raise(g.ClassMethodHasReadonly, e), e.declare && this.match(10) && this.raise(g.ClassMethodHasDeclare, e);
8886
+ this.eat(17) && (e.optional = !0), e.readonly && this.match(10) && this.raise(b.ClassMethodHasReadonly, e), e.declare && this.match(10) && this.raise(b.ClassMethodHasDeclare, e);
8917
8887
  }
8918
8888
  parseExpressionStatement(e, i, a) {
8919
8889
  return (i.type === "Identifier" ? this.tsParseExpressionStatement(e, i, a) : void 0) || super.parseExpressionStatement(e, i, a);
@@ -8943,7 +8913,7 @@ var on = (r) => class extends r {
8943
8913
  return this.tsInAmbientContext(() => this.parseExportDeclaration(e));
8944
8914
  const i = this.state.startLoc, a = this.eatContextual(125);
8945
8915
  if (a && (this.isContextual(125) || !this.shouldParseExportDeclaration()))
8946
- throw this.raise(g.ExpectedAmbientAfterExportDeclare, this.state.startLoc);
8916
+ throw this.raise(b.ExpectedAmbientAfterExportDeclare, this.state.startLoc);
8947
8917
  const o = N(this.state.type) && this.tsTryParseExportDeclaration() || super.parseExportDeclaration(e);
8948
8918
  return o ? ((o.type === "TSInterfaceDeclaration" || o.type === "TSTypeAliasDeclaration" || a) && (e.exportKind = "type"), a && o.type !== "TSImportEqualsDeclaration" && (this.resetStartLocation(o, i), o.declare = !0), o) : null;
8949
8919
  }
@@ -8960,32 +8930,32 @@ var on = (r) => class extends r {
8960
8930
  i && (e.typeAnnotation = i);
8961
8931
  }
8962
8932
  parseClassProperty(e) {
8963
- if (this.parseClassPropertyAnnotation(e), this.state.isAmbientContext && !(e.readonly && !e.typeAnnotation) && this.match(29) && this.raise(g.DeclareClassFieldHasInitializer, this.state.startLoc), e.abstract && this.match(29)) {
8933
+ if (this.parseClassPropertyAnnotation(e), this.state.isAmbientContext && !(e.readonly && !e.typeAnnotation) && this.match(29) && this.raise(b.DeclareClassFieldHasInitializer, this.state.startLoc), e.abstract && this.match(29)) {
8964
8934
  const {
8965
8935
  key: i
8966
8936
  } = e;
8967
- this.raise(g.AbstractPropertyHasInitializer, this.state.startLoc, {
8937
+ this.raise(b.AbstractPropertyHasInitializer, this.state.startLoc, {
8968
8938
  propertyName: i.type === "Identifier" && !e.computed ? i.name : `[${this.input.slice(this.offsetToSourcePos(i.start), this.offsetToSourcePos(i.end))}]`
8969
8939
  });
8970
8940
  }
8971
8941
  return super.parseClassProperty(e);
8972
8942
  }
8973
8943
  parseClassPrivateProperty(e) {
8974
- return e.abstract && this.raise(g.PrivateElementHasAbstract, e), e.accessibility && this.raise(g.PrivateElementHasAccessibility, e, {
8944
+ return e.abstract && this.raise(b.PrivateElementHasAbstract, e), e.accessibility && this.raise(b.PrivateElementHasAccessibility, e, {
8975
8945
  modifier: e.accessibility
8976
8946
  }), this.parseClassPropertyAnnotation(e), super.parseClassPrivateProperty(e);
8977
8947
  }
8978
8948
  parseClassAccessorProperty(e) {
8979
- return this.parseClassPropertyAnnotation(e), e.optional && this.raise(g.AccessorCannotBeOptional, e), super.parseClassAccessorProperty(e);
8949
+ return this.parseClassPropertyAnnotation(e), e.optional && this.raise(b.AccessorCannotBeOptional, e), super.parseClassAccessorProperty(e);
8980
8950
  }
8981
8951
  pushClassMethod(e, i, a, n, o, c) {
8982
8952
  const h = this.tsTryParseTypeParameters(this.tsParseConstModifier);
8983
- h && o && this.raise(g.ConstructorHasTypeParameters, h);
8953
+ h && o && this.raise(b.ConstructorHasTypeParameters, h);
8984
8954
  const {
8985
8955
  declare: l = !1,
8986
8956
  kind: p
8987
8957
  } = i;
8988
- l && (p === "get" || p === "set") && this.raise(g.DeclareAccessor, i, {
8958
+ l && (p === "get" || p === "set") && this.raise(b.DeclareAccessor, i, {
8989
8959
  kind: p
8990
8960
  }), h && (i.typeParameters = h), super.pushClassMethod(e, i, a, n, o, c);
8991
8961
  }
@@ -9022,7 +8992,7 @@ var on = (r) => class extends r {
9022
8992
  const {
9023
8993
  context: l
9024
8994
  } = this.state, p = l[l.length - 1];
9025
- (p === O.j_oTag || p === O.j_expr) && l.pop();
8995
+ (p === D.j_oTag || p === D.j_expr) && l.pop();
9026
8996
  }
9027
8997
  if (!(n != null && n.error) && !this.match(47))
9028
8998
  return super.parseMaybeAssign(e, i);
@@ -9034,7 +9004,7 @@ var on = (r) => class extends r {
9034
9004
  const p = super.parseMaybeAssign(e, i);
9035
9005
  if ((p.type !== "ArrowFunctionExpression" || (d = p.extra) != null && d.parenthesized) && l(), (c == null ? void 0 : c.params.length) !== 0 && this.resetStartLocationFromNode(p, c), p.typeParameters = c, this.hasPlugin("jsx") && p.typeParameters.params.length === 1 && !((f = p.typeParameters.extra) != null && f.trailingComma)) {
9036
9006
  const x = p.typeParameters.params[0];
9037
- x.constraint || this.raise(g.SingleTypeParameterWithoutTrailingComma, G(x.loc.end, 1), {
9007
+ x.constraint || this.raise(b.SingleTypeParameterWithoutTrailingComma, G(x.loc.end, 1), {
9038
9008
  typeParameterName: x.name.name
9039
9009
  });
9040
9010
  }
@@ -9054,7 +9024,7 @@ var on = (r) => class extends r {
9054
9024
  }
9055
9025
  reportReservedArrowTypeParam(e) {
9056
9026
  var i;
9057
- e.params.length === 1 && !e.params[0].constraint && !((i = e.extra) != null && i.trailingComma) && this.getPluginOption("typescript", "disallowAmbiguousJSXLike") && this.raise(g.ReservedArrowTypeParam, e);
9027
+ e.params.length === 1 && !e.params[0].constraint && !((i = e.extra) != null && i.trailingComma) && this.getPluginOption("typescript", "disallowAmbiguousJSXLike") && this.raise(b.ReservedArrowTypeParam, e);
9058
9028
  }
9059
9029
  parseMaybeUnary(e, i) {
9060
9030
  return !this.hasPlugin("jsx") && this.match(47) ? this.tsParseTypeAssertion() : super.parseMaybeUnary(e, i);
@@ -9094,7 +9064,7 @@ var on = (r) => class extends r {
9094
9064
  case "TSSatisfiesExpression":
9095
9065
  case "TSNonNullExpression":
9096
9066
  case "TSTypeAssertion":
9097
- i ? this.expressionScope.recordArrowParameterBindingError(g.UnexpectedTypeCastInParameter, e) : this.raise(g.UnexpectedTypeCastInParameter, e), this.toAssignable(e.expression, i);
9067
+ i ? this.expressionScope.recordArrowParameterBindingError(b.UnexpectedTypeCastInParameter, e) : this.raise(b.UnexpectedTypeCastInParameter, e), this.toAssignable(e.expression, i);
9098
9068
  break;
9099
9069
  case "AssignmentExpression":
9100
9070
  !i && e.left.type === "TSTypeCastExpression" && (e.left = this.typeCastToParameter(e.left));
@@ -9168,7 +9138,7 @@ var on = (r) => class extends r {
9168
9138
  }
9169
9139
  parseMaybeDefault(e, i) {
9170
9140
  const a = super.parseMaybeDefault(e, i);
9171
- return a.type === "AssignmentPattern" && a.typeAnnotation && a.right.start < a.typeAnnotation.start && this.raise(g.TypeAnnotationAfterAssign, a.typeAnnotation), a;
9141
+ return a.type === "AssignmentPattern" && a.typeAnnotation && a.right.start < a.typeAnnotation.start && this.raise(b.TypeAnnotationAfterAssign, a.typeAnnotation), a;
9172
9142
  }
9173
9143
  getTokenFromCode(e) {
9174
9144
  if (this.state.inType) {
@@ -9252,7 +9222,7 @@ var on = (r) => class extends r {
9252
9222
  return e.abstract = !0, this.maybeTakeDecorators(i, this.parseClass(e, !0, !1));
9253
9223
  if (this.isContextual(129)) {
9254
9224
  if (!this.hasFollowingLineBreak())
9255
- return e.abstract = !0, this.raise(g.NonClassMethodPropertyHasAbstractModifier, e), this.tsParseInterfaceDeclaration(e);
9225
+ return e.abstract = !0, this.raise(b.NonClassMethodPropertyHasAbstractModifier, e), this.tsParseInterfaceDeclaration(e);
9256
9226
  } else
9257
9227
  this.unexpected(null, 80);
9258
9228
  }
@@ -9262,7 +9232,7 @@ var on = (r) => class extends r {
9262
9232
  const {
9263
9233
  key: f
9264
9234
  } = l;
9265
- this.raise(g.AbstractMethodHasImplementation, l, {
9235
+ this.raise(b.AbstractMethodHasImplementation, l, {
9266
9236
  methodName: f.type === "Identifier" && !l.computed ? f.name : `[${this.input.slice(this.offsetToSourcePos(f.start), this.offsetToSourcePos(f.end))}]`
9267
9237
  });
9268
9238
  }
@@ -9297,7 +9267,7 @@ var on = (r) => class extends r {
9297
9267
  Z(this.state.type) ? (l = !0, c = x, h = i ? this.parseIdentifier() : this.parseModuleExportName(), p = !1) : (h = A, p = !1);
9298
9268
  } else Z(this.state.type) ? (p = !1, h = i ? this.parseIdentifier() : this.parseModuleExportName()) : (l = !0, c = x);
9299
9269
  } else Z(this.state.type) && (l = !0, i ? (c = this.parseIdentifier(!0), this.isContextual(93) || this.checkReservedWord(c.name, c.loc.start, !0, !0)) : c = this.parseModuleExportName());
9300
- l && a && this.raise(i ? g.TypeModifierIsUsedInTypeImports : g.TypeModifierIsUsedInTypeExports, d), e[n] = c, e[o] = h;
9270
+ l && a && this.raise(i ? b.TypeModifierIsUsedInTypeImports : b.TypeModifierIsUsedInTypeExports, d), e[n] = c, e[o] = h;
9301
9271
  const f = i ? "importKind" : "exportKind";
9302
9272
  e[f] = l ? "type" : "value", p && this.eatContextual(93) && (e[o] = i ? this.parseIdentifier() : this.parseModuleExportName()), e[o] || (e[o] = this.cloneIdentifier(e[n])), i && this.checkIdentifier(e[o], l ? 4098 : 4096);
9303
9273
  }
@@ -9377,7 +9347,7 @@ var on = (r) => class extends r {
9377
9347
  }
9378
9348
  }
9379
9349
  };
9380
- function cn(r) {
9350
+ function hn(r) {
9381
9351
  if (r.type !== "MemberExpression") return !1;
9382
9352
  const {
9383
9353
  computed: t,
@@ -9385,7 +9355,7 @@ function cn(r) {
9385
9355
  } = r;
9386
9356
  return t && s.type !== "StringLiteral" && (s.type !== "TemplateLiteral" || s.expressions.length > 0) ? !1 : hi(r.object);
9387
9357
  }
9388
- function hn(r, t) {
9358
+ function ln(r, t) {
9389
9359
  var e;
9390
9360
  const {
9391
9361
  type: s
@@ -9402,12 +9372,12 @@ function hn(r, t) {
9402
9372
  }
9403
9373
  } else if (s === "StringLiteral" || s === "BooleanLiteral")
9404
9374
  return !0;
9405
- return !!(ci(r, t) || ln(r, t) || s === "TemplateLiteral" && r.expressions.length === 0 || cn(r));
9375
+ return !!(ci(r, t) || un(r, t) || s === "TemplateLiteral" && r.expressions.length === 0 || hn(r));
9406
9376
  }
9407
9377
  function ci(r, t) {
9408
9378
  return t ? r.type === "Literal" && (typeof r.value == "number" || "bigint" in r) : r.type === "NumericLiteral" || r.type === "BigIntLiteral";
9409
9379
  }
9410
- function ln(r, t) {
9380
+ function un(r, t) {
9411
9381
  if (r.type === "UnaryExpression") {
9412
9382
  const {
9413
9383
  operator: s,
@@ -9425,7 +9395,7 @@ const Es = te`placeholders`({
9425
9395
  ClassNameIsRequired: "A class name is required.",
9426
9396
  UnexpectedSpace: "Unexpected space in placeholder."
9427
9397
  });
9428
- var un = (r) => class extends r {
9398
+ var pn = (r) => class extends r {
9429
9399
  parsePlaceholder(s) {
9430
9400
  if (this.match(133)) {
9431
9401
  const e = this.startNode();
@@ -9546,7 +9516,7 @@ var un = (r) => class extends r {
9546
9516
  assertNoSpace() {
9547
9517
  this.state.start > this.offsetToSourcePos(this.state.lastTokEndLoc.index) && this.raise(Es.UnexpectedSpace, this.state.lastTokEndLoc);
9548
9518
  }
9549
- }, pn = (r) => class extends r {
9519
+ }, fn = (r) => class extends r {
9550
9520
  parseV8Intrinsic() {
9551
9521
  if (this.match(54)) {
9552
9522
  const s = this.state.startLoc, e = this.startNode();
@@ -9563,7 +9533,7 @@ var un = (r) => class extends r {
9563
9533
  }
9564
9534
  };
9565
9535
  const Cs = ["fsharp", "hack"], Ns = ["^^", "@@", "^", "%", "#"];
9566
- function fn(r) {
9536
+ function dn(r) {
9567
9537
  if (r.has("decorators")) {
9568
9538
  if (r.has("decorators-legacy"))
9569
9539
  throw new Error("Cannot use the decorators and decorators-legacy plugin together");
@@ -9618,14 +9588,14 @@ function fn(r) {
9618
9588
  }
9619
9589
  }
9620
9590
  const li = {
9621
- estree: ta,
9622
- jsx: Fa,
9591
+ estree: sa,
9592
+ jsx: Ba,
9623
9593
  flow: Da,
9624
- typescript: on,
9625
- v8intrinsic: pn,
9626
- placeholders: un
9627
- }, dn = Object.keys(li);
9628
- class mn extends sn {
9594
+ typescript: cn,
9595
+ v8intrinsic: fn,
9596
+ placeholders: pn
9597
+ }, mn = Object.keys(li);
9598
+ class yn extends rn {
9629
9599
  checkProto(t, s, e, i) {
9630
9600
  if (t.type === "SpreadElement" || this.isObjectMethod(t) || t.computed || t.shorthand)
9631
9601
  return e;
@@ -9681,7 +9651,7 @@ class mn extends sn {
9681
9651
  } = this.state;
9682
9652
  (n === 10 || N(n)) && (this.state.potentialArrowAt = this.state.start);
9683
9653
  let o = this.parseMaybeConditional(t);
9684
- if (s && (o = s.call(this, o, e)), na(this.state.type)) {
9654
+ if (s && (o = s.call(this, o, e)), oa(this.state.type)) {
9685
9655
  const c = this.startNodeAt(e), h = this.state.value;
9686
9656
  if (c.operator = h, this.match(29)) {
9687
9657
  this.toAssignable(o, !0), c.left = o;
@@ -9726,7 +9696,7 @@ class mn extends sn {
9726
9696
  }), this.classScope.usePrivateName(a, t.loc.start);
9727
9697
  }
9728
9698
  const i = this.state.type;
9729
- if (ca(i) && (this.prodParam.hasIn || !this.match(58))) {
9699
+ if (ha(i) && (this.prodParam.hasIn || !this.match(58))) {
9730
9700
  let a = Ze(i);
9731
9701
  if (a > e) {
9732
9702
  if (i === 39) {
@@ -9761,14 +9731,14 @@ class mn extends sn {
9761
9731
  }
9762
9732
  parseExprOpBaseRightExpr(t, s) {
9763
9733
  const e = this.state.startLoc;
9764
- return this.parseExprOp(this.parseMaybeUnaryOrPrivate(), e, fa(t) ? s - 1 : s);
9734
+ return this.parseExprOp(this.parseMaybeUnaryOrPrivate(), e, da(t) ? s - 1 : s);
9765
9735
  }
9766
9736
  parseHackPipeBody() {
9767
9737
  var i;
9768
9738
  const {
9769
9739
  startLoc: t
9770
9740
  } = this.state, s = this.parseMaybeAssign();
9771
- return Wr.has(s.type) && !((i = s.extra) != null && i.parenthesized) && this.raise(u.PipeUnparenthesizedBody, t, {
9741
+ return Xr.has(s.type) && !((i = s.extra) != null && i.parenthesized) && this.raise(u.PipeUnparenthesizedBody, t, {
9772
9742
  type: s.type
9773
9743
  }), this.topicReferenceWasUsedInCurrentContext() || this.raise(u.PipeTopicUnused, t), s;
9774
9744
  }
@@ -9783,7 +9753,7 @@ class mn extends sn {
9783
9753
  return s || this.checkExponentialAfterUnary(c), c;
9784
9754
  }
9785
9755
  const a = this.match(34), n = this.startNode();
9786
- if (la(this.state.type)) {
9756
+ if (ua(this.state.type)) {
9787
9757
  n.operator = this.state.value, n.prefix = !0, this.match(72) && this.expectPlugin("throwExpressions");
9788
9758
  const c = this.match(89);
9789
9759
  if (this.next(), n.argument = this.parseMaybeUnary(null, !0), this.checkExpressionErrors(t, !0), this.state.strict && c) {
@@ -9811,7 +9781,7 @@ class mn extends sn {
9811
9781
  const i = this.state.startLoc;
9812
9782
  let a = this.parseExprSubscripts(e);
9813
9783
  if (this.checkExpressionErrors(e, !1)) return a;
9814
- for (; ha(this.state.type) && !this.canInsertSemicolon(); ) {
9784
+ for (; la(this.state.type) && !this.canInsertSemicolon(); ) {
9815
9785
  const n = this.startNodeAt(i);
9816
9786
  n.operator = this.state.value, n.prefix = !1, n.argument = a, this.next(), this.checkLVal(a, a = this.finishNode(n, "UpdateExpression"));
9817
9787
  }
@@ -9838,7 +9808,7 @@ class mn extends sn {
9838
9808
  } = this.state;
9839
9809
  if (!e && a === 15)
9840
9810
  return this.parseBind(t, s, e, i);
9841
- if (Dt(a))
9811
+ if (Ot(a))
9842
9812
  return this.parseTaggedTemplateExpression(t, s, i);
9843
9813
  let n = !1;
9844
9814
  if (a === 18) {
@@ -9874,7 +9844,7 @@ class mn extends sn {
9874
9844
  maybeAsyncArrow: c,
9875
9845
  optionalChainMember: h
9876
9846
  } = e;
9877
- c && (this.expressionScope.enter(Za()), n = new tt()), h && (o.optional = i), i ? o.arguments = this.parseCallExpressionArguments(11) : o.arguments = this.parseCallExpressionArguments(11, t.type !== "Super", o, n);
9847
+ c && (this.expressionScope.enter(en()), n = new tt()), h && (o.optional = i), i ? o.arguments = this.parseCallExpressionArguments(11) : o.arguments = this.parseCallExpressionArguments(11, t.type !== "Super", o, n);
9878
9848
  let l = this.finishCallExpression(o, h);
9879
9849
  return c && this.shouldParseAsyncArrow() && !i ? (e.stop = !0, this.checkDestructuringPrivate(n), this.expressionScope.validateAsPattern(), this.expressionScope.exit(), l = this.parseAsyncArrowFromCallExpression(this.startNodeAt(s), l)) : (c && (this.checkExpressionErrors(n, !0), this.expressionScope.exit()), this.toReferencedArguments(l)), this.state.maybeInArrowParameters = a, l;
9880
9850
  }
@@ -10130,7 +10100,7 @@ class mn extends sn {
10130
10100
  parseParenAndDistinguishExpression(t) {
10131
10101
  const s = this.state.startLoc;
10132
10102
  let e;
10133
- this.next(), this.expressionScope.enter(Qa());
10103
+ this.next(), this.expressionScope.enter(Za());
10134
10104
  const i = this.state.maybeInArrowParameters, a = this.state.inFSharpPipelineDirectBody;
10135
10105
  this.state.maybeInArrowParameters = !0, this.state.inFSharpPipelineDirectBody = !1;
10136
10106
  const n = this.state.startLoc, o = [], c = new tt();
@@ -10448,13 +10418,13 @@ class mn extends sn {
10448
10418
  type: i
10449
10419
  } = this.state;
10450
10420
  Z(i) ? s = this.state.value : this.unexpected();
10451
- const a = ra(i);
10421
+ const a = aa(i);
10452
10422
  return t ? a && this.replaceToken(132) : this.checkReservedWord(s, e, a, !1), this.next(), s;
10453
10423
  }
10454
10424
  checkReservedWord(t, s, e, i) {
10455
- if (t.length > 10 || !Aa(t))
10425
+ if (t.length > 10 || !Sa(t))
10456
10426
  return;
10457
- if (e && ba(t)) {
10427
+ if (e && wa(t)) {
10458
10428
  this.raise(u.UnexpectedKeyword, s, {
10459
10429
  keyword: t
10460
10430
  });
@@ -10498,7 +10468,7 @@ class mn extends sn {
10498
10468
  const {
10499
10469
  type: t
10500
10470
  } = this.state;
10501
- return t === 53 || t === 10 || t === 0 || Dt(t) || t === 102 && !this.state.containsEsc || t === 138 || t === 56 || this.hasPlugin("v8intrinsic") && t === 54;
10471
+ return t === 53 || t === 10 || t === 0 || Ot(t) || t === 102 && !this.state.containsEsc || t === 138 || t === 56 || this.hasPlugin("v8intrinsic") && t === 54;
10502
10472
  }
10503
10473
  parseYield(t) {
10504
10474
  const s = this.startNodeAt(t);
@@ -10645,12 +10615,12 @@ class mn extends sn {
10645
10615
  parsePropertyNamePrefixOperator(t) {
10646
10616
  }
10647
10617
  }
10648
- const wt = {
10618
+ const Tt = {
10649
10619
  kind: 1
10650
- }, yn = {
10620
+ }, xn = {
10651
10621
  kind: 2
10652
- }, xn = /[\uD800-\uDFFF]/u, At = /in(?:stanceof)?/y;
10653
- function Pn(r, t, s) {
10622
+ }, Pn = /[\uD800-\uDFFF]/u, At = /in(?:stanceof)?/y;
10623
+ function bn(r, t, s) {
10654
10624
  for (let e = 0; e < r.length; e++) {
10655
10625
  const i = r[e], {
10656
10626
  type: a
@@ -10659,9 +10629,9 @@ function Pn(r, t, s) {
10659
10629
  }
10660
10630
  return r;
10661
10631
  }
10662
- class gn extends mn {
10632
+ class gn extends yn {
10663
10633
  parseTopLevel(t, s) {
10664
- return t.program = this.parseProgram(s), t.comments = this.comments, this.optionFlags & 256 && (t.tokens = Pn(this.tokens, this.input, this.startIndex)), this.finishNode(t, "File");
10634
+ return t.program = this.parseProgram(s), t.comments = this.comments, this.optionFlags & 256 && (t.tokens = bn(this.tokens, this.input, this.startIndex)), this.finishNode(t, "File");
10665
10635
  }
10666
10636
  parseProgram(t, s = 140, e = this.options.sourceType) {
10667
10637
  if (t.sourceType = e, t.interpreter = this.parseInterpreterDirective(), this.parseBlockBody(t, !0, !0, s), this.inModule) {
@@ -10905,10 +10875,10 @@ class gn extends mn {
10905
10875
  return this.expect(11), t;
10906
10876
  }
10907
10877
  parseDoWhileStatement(t) {
10908
- return this.next(), this.state.labels.push(wt), t.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.state.labels.pop(), this.expect(92), t.test = this.parseHeaderExpression(), this.eat(13), this.finishNode(t, "DoWhileStatement");
10878
+ return this.next(), this.state.labels.push(Tt), t.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.state.labels.pop(), this.expect(92), t.test = this.parseHeaderExpression(), this.eat(13), this.finishNode(t, "DoWhileStatement");
10909
10879
  }
10910
10880
  parseForStatement(t) {
10911
- this.next(), this.state.labels.push(wt);
10881
+ this.next(), this.state.labels.push(Tt);
10912
10882
  let s = null;
10913
10883
  if (this.isContextual(96) && this.recordAwaitIfAllowed() && (s = this.state.startLoc, this.next()), this.scope.enter(0), this.expect(10), this.match(13))
10914
10884
  return s !== null && this.unexpected(s), this.parseFor(t, null);
@@ -10946,7 +10916,7 @@ class gn extends mn {
10946
10916
  parseSwitchStatement(t) {
10947
10917
  this.next(), t.discriminant = this.parseHeaderExpression();
10948
10918
  const s = t.cases = [];
10949
- this.expect(5), this.state.labels.push(yn), this.scope.enter(256);
10919
+ this.expect(5), this.state.labels.push(xn), this.scope.enter(256);
10950
10920
  let e;
10951
10921
  for (let i; !this.match(8); )
10952
10922
  if (this.match(61) || this.match(65)) {
@@ -10976,7 +10946,7 @@ class gn extends mn {
10976
10946
  return this.next(), this.parseVar(t, !1, s, e), this.semicolon(), this.finishNode(t, "VariableDeclaration");
10977
10947
  }
10978
10948
  parseWhileStatement(t) {
10979
- return this.next(), t.test = this.parseHeaderExpression(), this.state.labels.push(wt), t.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.state.labels.pop(), this.finishNode(t, "WhileStatement");
10949
+ return this.next(), t.test = this.parseHeaderExpression(), this.state.labels.push(Tt), t.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.state.labels.pop(), this.finishNode(t, "WhileStatement");
10980
10950
  }
10981
10951
  parseWithStatement(t) {
10982
10952
  return this.state.strict && this.raise(u.StrictWith, this.state.startLoc), this.next(), t.object = this.parseHeaderExpression(), t.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.finishNode(t, "WithStatement");
@@ -10989,7 +10959,7 @@ class gn extends mn {
10989
10959
  n.name === s && this.raise(u.LabelRedeclaration, e, {
10990
10960
  labelName: s
10991
10961
  });
10992
- const a = oa(this.state.type) ? 1 : this.match(71) ? 2 : null;
10962
+ const a = ca(this.state.type) ? 1 : this.match(71) ? 2 : null;
10993
10963
  for (let n = this.state.labels.length - 1; n >= 0; n--) {
10994
10964
  const o = this.state.labels[n];
10995
10965
  if (o.statementStart === t.start)
@@ -11080,7 +11050,7 @@ class gn extends mn {
11080
11050
  return t || N(this.state.type) ? this.parseIdentifier() : null;
11081
11051
  }
11082
11052
  parseFunctionParams(t, s) {
11083
- this.expect(10), this.expressionScope.enter(Ya()), t.params = this.parseBindingList(11, 41, 2 | (s ? 4 : 0)), this.expressionScope.exit();
11053
+ this.expect(10), this.expressionScope.enter(Qa()), t.params = this.parseBindingList(11, 41, 2 | (s ? 4 : 0)), this.expressionScope.exit();
11084
11054
  }
11085
11055
  registerFunctionStatementId(t) {
11086
11056
  t.id && this.scope.declareName(t.id.name, !this.options.annexB || this.state.strict || t.generator || t.async ? this.scope.treatFunctionsAsVar ? 5 : 8201 : 17, t.id.loc.start);
@@ -11452,7 +11422,7 @@ class gn extends mn {
11452
11422
  }
11453
11423
  parseModuleExportName() {
11454
11424
  if (this.match(134)) {
11455
- const t = this.parseStringLiteral(this.state.value), s = xn.exec(t.value);
11425
+ const t = this.parseStringLiteral(this.state.value), s = Pn.exec(t.value);
11456
11426
  return s && this.raise(u.ModuleExportNameHasLoneSurrogate, t, {
11457
11427
  surrogateCharCode: s[0].charCodeAt(0)
11458
11428
  }), t;
@@ -11617,7 +11587,7 @@ class gn extends mn {
11617
11587
  }
11618
11588
  class ui extends gn {
11619
11589
  constructor(t, s, e) {
11620
- t = Zr(t), super(t, s), this.options = t, this.initializeScopes(), this.plugins = e, this.filename = t.sourceFilename, this.startIndex = t.startIndex;
11590
+ t = ea(t), super(t, s), this.options = t, this.initializeScopes(), this.plugins = e, this.filename = t.sourceFilename, this.startIndex = t.startIndex;
11621
11591
  let i = 0;
11622
11592
  t.allowAwaitOutsideFunction && (i |= 1), t.allowReturnOutsideFunction && (i |= 2), t.allowImportExportEverywhere && (i |= 8), t.allowSuperOutsideMethod && (i |= 16), t.allowUndeclaredExports && (i |= 64), t.allowNewTargetOutsideFunction && (i |= 4), t.allowYieldOutsideFunction && (i |= 32), t.ranges && (i |= 128), t.tokens && (i |= 256), t.createImportExpressions && (i |= 512), t.createParenthesizedExpressions && (i |= 1024), t.errorRecovery && (i |= 2048), t.attachComment && (i |= 4096), t.annexB && (i |= 8192), this.optionFlags = i;
11623
11593
  }
@@ -11630,7 +11600,7 @@ class ui extends gn {
11630
11600
  return this.nextToken(), t.errors = null, this.parseTopLevel(t, s), t.errors = this.state.errors, t.comments.length = this.state.commentsLen, t;
11631
11601
  }
11632
11602
  }
11633
- function bn(r, t) {
11603
+ function wn(r, t) {
11634
11604
  if ((t == null ? void 0 : t.sourceType) === "unambiguous") {
11635
11605
  t = Object.assign({}, t);
11636
11606
  try {
@@ -11662,7 +11632,7 @@ function Tn(r) {
11662
11632
  t[s] = Xs(r[s]);
11663
11633
  return t;
11664
11634
  }
11665
- Tn(ia);
11635
+ Tn(ra);
11666
11636
  function Xe(r, t) {
11667
11637
  let s = ui;
11668
11638
  const e = /* @__PURE__ */ new Map();
@@ -11671,14 +11641,14 @@ function Xe(r, t) {
11671
11641
  let a, n;
11672
11642
  typeof i == "string" ? a = i : [a, n] = i, e.has(a) || e.set(a, n || {});
11673
11643
  }
11674
- fn(e), s = wn(e);
11644
+ dn(e), s = An(e);
11675
11645
  }
11676
11646
  return new s(r, t, e);
11677
11647
  }
11678
11648
  const ks = /* @__PURE__ */ new Map();
11679
- function wn(r) {
11649
+ function An(r) {
11680
11650
  const t = [];
11681
- for (const i of dn)
11651
+ for (const i of mn)
11682
11652
  r.has(i) && t.push(i);
11683
11653
  const s = t.join("|");
11684
11654
  let e = ks.get(s);
@@ -11857,7 +11827,7 @@ function fi(r) {
11857
11827
  }
11858
11828
  return t;
11859
11829
  }
11860
- function An(r, t) {
11830
+ function Sn(r, t) {
11861
11831
  let s = null, e;
11862
11832
  for (const i of t.properties) {
11863
11833
  if (i.type !== "ObjectProperty")
@@ -11894,7 +11864,7 @@ function An(r, t) {
11894
11864
  );
11895
11865
  return { presence: s, topics: e };
11896
11866
  }
11897
- function Sn(r) {
11867
+ function In(r) {
11898
11868
  const t = {};
11899
11869
  for (const s of r.properties) {
11900
11870
  if (s.type !== "ObjectProperty")
@@ -11906,11 +11876,11 @@ function Sn(r) {
11906
11876
  throw new Error(
11907
11877
  `Could not extract room \`${e}\`. Expected an object with topics and presence keys, got \`${s.value.type}\`.`
11908
11878
  );
11909
- t[e] = An(e, s.value);
11879
+ t[e] = Sn(e, s.value);
11910
11880
  }
11911
11881
  return t;
11912
11882
  }
11913
- function In(r) {
11883
+ function En(r) {
11914
11884
  let t = null, s = {}, e = {};
11915
11885
  for (const i of r.program.body) {
11916
11886
  if (i.type !== "VariableDeclaration" || i.declarations.length !== 1 || i.declarations[0].id.type !== "Identifier" || i.declarations[0].id.name !== "_schema")
@@ -11940,7 +11910,7 @@ function In(r) {
11940
11910
  break;
11941
11911
  }
11942
11912
  case "rooms": {
11943
- e = Sn(n.value);
11913
+ e = In(n.value);
11944
11914
  break;
11945
11915
  }
11946
11916
  }
@@ -11950,9 +11920,9 @@ function In(r) {
11950
11920
  throw new Error("Could not extract schema, did not find any entities.");
11951
11921
  return q.schema({ entities: t, links: s, rooms: e });
11952
11922
  }
11953
- function zn(r, t = "instant.schema.ts") {
11923
+ function Vn(r, t = "instant.schema.ts") {
11954
11924
  var e;
11955
- const s = bn(r, {
11925
+ const s = wn(r, {
11956
11926
  sourceFilename: t,
11957
11927
  sourceType: "module",
11958
11928
  errorRecovery: !1,
@@ -11962,7 +11932,7 @@ function zn(r, t = "instant.schema.ts") {
11962
11932
  throw new Error(
11963
11933
  `Could not parse schema file. ${s.errors[0].reasonCode}.`
11964
11934
  );
11965
- return In(s);
11935
+ return En(s);
11966
11936
  }
11967
11937
  const ct = {
11968
11938
  /**
@@ -12024,7 +11994,7 @@ const vs = (r, t, s) => ({
12024
11994
  },
12025
11995
  "index?": r.config.indexed,
12026
11996
  "checked-data-type": r.valueType !== "json" ? r.valueType : null
12027
- }), En = (r) => {
11997
+ }), Cn = (r) => {
12028
11998
  const t = `${r.forward.has}-${r.reverse.has}`;
12029
11999
  return {
12030
12000
  "checked-data-type": null,
@@ -12053,19 +12023,19 @@ const vs = (r, t, s) => ({
12053
12023
  if (!s)
12054
12024
  throw new Error(`Attribute ${r.namespace}.${r.attrName} not found`);
12055
12025
  return s;
12056
- }, Te = (r, t) => {
12026
+ }, we = (r, t) => {
12057
12027
  const s = it(r.identifier, t);
12058
12028
  return {
12059
12029
  "attr-id": s.id,
12060
12030
  "forward-identity": s["forward-identity"]
12061
12031
  };
12062
- }, Cn = {
12063
- index: Te,
12064
- unique: Te,
12065
- required: Te,
12066
- "remove-index": Te,
12067
- "remove-unique": Te,
12068
- "remove-required": Te,
12032
+ }, Nn = {
12033
+ index: we,
12034
+ unique: we,
12035
+ required: we,
12036
+ "remove-index": we,
12037
+ "remove-unique": we,
12038
+ "remove-required": we,
12069
12039
  "delete-attr": (r, t) => it(r.identifier, t).id,
12070
12040
  "update-attr": (r, t) => {
12071
12041
  const s = it(r.identifier, t);
@@ -12133,7 +12103,7 @@ const vs = (r, t, s) => ({
12133
12103
  }
12134
12104
  ]), i;
12135
12105
  },
12136
- "remove-data-type": Te,
12106
+ "remove-data-type": we,
12137
12107
  "check-data-type": (r, t) => {
12138
12108
  const s = it(r.identifier, t);
12139
12109
  return {
@@ -12147,18 +12117,18 @@ function ae(r, t, s) {
12147
12117
  var e;
12148
12118
  return !!((e = r[t]) != null && e.has(s));
12149
12119
  }
12150
- const Vn = (r, t) => {
12120
+ const Hn = (r, t) => {
12151
12121
  if (!t)
12152
12122
  throw new Error("Existing attributes are required");
12153
12123
  const s = [];
12154
12124
  return r.forEach((e) => {
12155
- const i = Cn[e.type];
12125
+ const i = Nn[e.type];
12156
12126
  if (!i)
12157
12127
  throw new Error(`Unknown transaction type: ${e.type}`);
12158
12128
  const a = i(e, t);
12159
12129
  Array.isArray(a) ? s.push(...a) : s.push([e.type, a]);
12160
12130
  }), s;
12161
- }, Hn = async (r, t, s, e) => {
12131
+ }, Kn = async (r, t, s, e) => {
12162
12132
  var B, ie;
12163
12133
  const i = [], a = r.entities, n = t.entities, o = Object.keys(a), c = Object.keys(n), h = o.filter(
12164
12134
  (P) => !c.includes(P)
@@ -12231,7 +12201,7 @@ const Vn = (r, t) => {
12231
12201
  (L) => Object.keys(n[P].attrs).includes(L)
12232
12202
  ).forEach((L) => {
12233
12203
  ae(e, P, L) || i.push(
12234
- ...Ds(
12204
+ ...Os(
12235
12205
  {
12236
12206
  attrName: L,
12237
12207
  namespace: P
@@ -12249,9 +12219,9 @@ const Vn = (r, t) => {
12249
12219
  }
12250
12220
  });
12251
12221
  }), xe.created.forEach((L) => {
12252
- const De = t.entities[P].attrs[L];
12222
+ const Oe = t.entities[P].attrs[L];
12253
12223
  i.push(
12254
- vs(De, P, L)
12224
+ vs(Oe, P, L)
12255
12225
  );
12256
12226
  }), xe.renamed.forEach((L) => {
12257
12227
  i.push({
@@ -12269,7 +12239,7 @@ const Vn = (r, t) => {
12269
12239
  }
12270
12240
  }
12271
12241
  }), i.push(
12272
- ...Ds(
12242
+ ...Os(
12273
12243
  {
12274
12244
  attrName: L.from,
12275
12245
  namespace: P
@@ -12307,24 +12277,24 @@ const Vn = (r, t) => {
12307
12277
  ]);
12308
12278
  for (const P of k) {
12309
12279
  const M = E.get(P) || [], K = F.get(P) || [], xe = M.map(
12310
- (R) => A(R)
12280
+ (_) => A(_)
12311
12281
  ), He = K.map(
12312
- (R) => A(R)
12282
+ (_) => A(_)
12313
12283
  ), L = He.filter(
12314
- (R) => !xe.includes(R)
12315
- ), De = xe.filter(
12316
- (R) => !He.includes(R)
12284
+ (_) => !xe.includes(_)
12285
+ ), Oe = xe.filter(
12286
+ (_) => !He.includes(_)
12317
12287
  );
12318
12288
  xe.filter(
12319
- (R) => He.includes(R)
12320
- ).forEach((R) => {
12289
+ (_) => He.includes(_)
12290
+ ).forEach((_) => {
12321
12291
  const U = M.find(
12322
- (Pe) => A(Pe) === R
12292
+ (Pe) => A(Pe) === _
12323
12293
  ), J = K.find(
12324
- (Pe) => A(Pe) === R
12294
+ (Pe) => A(Pe) === _
12325
12295
  );
12326
12296
  !U || !J || i.push(
12327
- ...Os(
12297
+ ...Ds(
12328
12298
  {
12329
12299
  namespace: U.forward.on,
12330
12300
  attrName: U.forward.label
@@ -12336,7 +12306,7 @@ const Vn = (r, t) => {
12336
12306
  });
12337
12307
  const mt = await Ls(
12338
12308
  L,
12339
- De,
12309
+ Oe,
12340
12310
  s,
12341
12311
  {
12342
12312
  type: "link",
@@ -12344,9 +12314,9 @@ const Vn = (r, t) => {
12344
12314
  reverseEntityName: (ie = M[0]) == null ? void 0 : ie.reverse.on
12345
12315
  }
12346
12316
  );
12347
- mt.deleted.forEach((R) => {
12317
+ mt.deleted.forEach((_) => {
12348
12318
  const U = M.find(
12349
- (J) => A(J) === R
12319
+ (J) => A(J) === _
12350
12320
  );
12351
12321
  U && i.push({
12352
12322
  type: "delete-attr",
@@ -12355,16 +12325,16 @@ const Vn = (r, t) => {
12355
12325
  namespace: U.forward.on
12356
12326
  }
12357
12327
  });
12358
- }), mt.created.forEach((R) => {
12328
+ }), mt.created.forEach((_) => {
12359
12329
  const U = K.find(
12360
- (J) => A(J) === R
12330
+ (J) => A(J) === _
12361
12331
  );
12362
- U && i.push(En(U));
12363
- }), mt.renamed.forEach((R) => {
12332
+ U && i.push(Cn(U));
12333
+ }), mt.renamed.forEach((_) => {
12364
12334
  const U = M.find(
12365
- (Pe) => A(Pe) === R.from
12335
+ (Pe) => A(Pe) === _.from
12366
12336
  ), J = K.find(
12367
- (Pe) => A(Pe) === R.to
12337
+ (Pe) => A(Pe) === _.to
12368
12338
  );
12369
12339
  !U || !J || (i.push({
12370
12340
  type: "update-attr",
@@ -12385,7 +12355,7 @@ const Vn = (r, t) => {
12385
12355
  }
12386
12356
  }
12387
12357
  }), i.push(
12388
- ...Os(
12358
+ ...Ds(
12389
12359
  {
12390
12360
  attrName: U.forward.label,
12391
12361
  namespace: U.forward.on
@@ -12397,7 +12367,7 @@ const Vn = (r, t) => {
12397
12367
  });
12398
12368
  }
12399
12369
  return i;
12400
- }, Ds = (r, t, s) => {
12370
+ }, Os = (r, t, s) => {
12401
12371
  const e = [], i = (a) => {
12402
12372
  e.push({
12403
12373
  type: a,
@@ -12412,7 +12382,7 @@ const Vn = (r, t) => {
12412
12382
  identifier: r,
12413
12383
  "checked-data-type": s.valueType
12414
12384
  }), e;
12415
- }, Os = (r, t, s) => {
12385
+ }, Ds = (r, t, s) => {
12416
12386
  const e = [], i = `${t.forward.has}-${t.reverse.has}`, { cardinality: a, "unique?": n } = ct[i], o = `${s.forward.has}-${s.reverse.has}`, { cardinality: c, "unique?": h } = ct[o];
12417
12387
  return !n && h && e.push({
12418
12388
  type: "unique",
@@ -12430,7 +12400,7 @@ const Vn = (r, t) => {
12430
12400
  cardinality: c
12431
12401
  }
12432
12402
  }), e;
12433
- }, Nn = (r) => typeof r == "object", Ls = async (r, t, s, e) => {
12403
+ }, kn = (r) => typeof r == "object", Ls = async (r, t, s, e) => {
12434
12404
  if (t.length === 0 || r.length === 0)
12435
12405
  return {
12436
12406
  created: r,
@@ -12441,27 +12411,27 @@ const Vn = (r, t) => {
12441
12411
  let a = 0, n = [...t];
12442
12412
  do {
12443
12413
  const o = r[a], c = n.map((p) => ({ from: p, to: o })), h = [o, ...c], l = await s(o, h, e);
12444
- Nn(l) ? (l.from !== l.to && i.renamed.push(l), delete n[n.indexOf(l.from)], n = n.filter(Boolean)) : i.created.push(o), a += 1;
12414
+ kn(l) ? (l.from !== l.to && i.renamed.push(l), delete n[n.indexOf(l.from)], n = n.filter(Boolean)) : i.created.push(o), a += 1;
12445
12415
  } while (a < r.length);
12446
12416
  return i.deleted.push(...n), i;
12447
12417
  };
12448
12418
  export {
12449
12419
  pe as InstantOAuthError,
12450
12420
  Dn as OAuthHandler,
12451
- Bn as PlatformApi,
12421
+ _n as PlatformApi,
12452
12422
  Hs as ProgressPromise,
12453
- ge as SchemaValidationError,
12423
+ be as SchemaValidationError,
12454
12424
  nt as apiSchemaToInstantSchemaDef,
12455
- Vn as convertTxSteps,
12456
- Hn as diffSchemas,
12457
- Fn as exchangeCodeForToken,
12458
- br as exchangeRefreshToken,
12459
- On as generatePermsTypescriptFile,
12460
- Ln as generateSchemaTypescriptFile,
12425
+ Hn as convertTxSteps,
12426
+ Kn as diffSchemas,
12427
+ Bn as exchangeCodeForToken,
12428
+ wr as exchangeRefreshToken,
12429
+ Ln as generatePermsTypescriptFile,
12430
+ Mn as generateSchemaTypescriptFile,
12461
12431
  q as i,
12462
- Nn as isRenamePromptItem,
12463
- zn as schemaTypescriptFileToInstantSchema,
12464
- Fr as translatePlanSteps,
12465
- Mn as validateSchema,
12466
- je as version
12432
+ kn as isRenamePromptItem,
12433
+ Vn as schemaTypescriptFileToInstantSchema,
12434
+ Br as translatePlanSteps,
12435
+ Fn as validateSchema,
12436
+ Re as version
12467
12437
  };