xmlui 0.9.44 → 0.9.46

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 (42) hide show
  1. package/dist/lib/{index-ODN_c1bh.mjs → apiInterceptorWorker-D_OwtjcQ.mjs} +1920 -1362
  2. package/dist/lib/{index-Cc1nHN3N.mjs → index-_koqcHz7.mjs} +7673 -7530
  3. package/dist/lib/index.css +1 -1
  4. package/dist/lib/language-server-web-worker.mjs +1 -1
  5. package/dist/lib/language-server.mjs +1 -1
  6. package/dist/lib/{metadata-utils-DI1nTN3y.mjs → metadata-utils-Cf8v_9Lr.mjs} +7 -7
  7. package/dist/lib/{server-common-C3t9MFME.mjs → server-common-kMTAr-QU.mjs} +210 -178
  8. package/dist/lib/{transform-BV--wKhF.mjs → transform-DU7v4c9h.mjs} +1193 -1158
  9. package/dist/lib/xmlui-parser.d.ts +10 -3
  10. package/dist/lib/xmlui-parser.mjs +31 -30
  11. package/dist/lib/{xmlui-serializer-D5UV-ftG.mjs → xmlui-serializer-B3OkRzrr.mjs} +9 -9
  12. package/dist/lib/xmlui.d.ts +37 -1
  13. package/dist/lib/xmlui.mjs +31 -29
  14. package/dist/metadata/style.css +1 -1
  15. package/dist/metadata/xmlui-metadata.mjs +4790 -4740
  16. package/dist/metadata/xmlui-metadata.umd.js +10 -10
  17. package/dist/scripts/package.json +2 -1
  18. package/dist/scripts/src/components/App/App.js +141 -27
  19. package/dist/scripts/src/components/App/AppNative.js +2 -1
  20. package/dist/scripts/src/components/App/IndexerContext.js +44 -0
  21. package/dist/scripts/src/components/App/SearchContext.js +35 -0
  22. package/dist/scripts/src/components/AppHeader/AppHeader.js +1 -1
  23. package/dist/scripts/src/components/CodeBlock/CodeBlockNative.js +41 -44
  24. package/dist/scripts/src/components/CodeBlock/highlight-code.js +4 -1
  25. package/dist/scripts/src/components/DatePicker/DatePickerNative.js +34 -2
  26. package/dist/scripts/src/components/Markdown/MarkdownNative.js +64 -28
  27. package/dist/scripts/src/components/NestedApp/NestedApp.js +4 -3
  28. package/dist/scripts/src/components/NestedApp/NestedAppNative.js +61 -66
  29. package/dist/scripts/src/components/Select/Select.js +3 -3
  30. package/dist/scripts/src/components/TableOfContents/TableOfContents.js +9 -1
  31. package/dist/scripts/src/components/Text/Text.js +1 -2
  32. package/dist/scripts/src/components/TextBox/TextBoxNative.js +2 -2
  33. package/dist/scripts/src/components/Theme/ThemeNative.js +5 -0
  34. package/dist/scripts/src/components-core/loader/DataLoader.js +9 -1
  35. package/dist/scripts/src/components-core/rendering/Container.js +7 -0
  36. package/dist/scripts/src/components-core/theming/themes/root.js +2 -2
  37. package/dist/scripts/src/parsers/xmlui-parser/diagnostics.js +10 -4
  38. package/dist/scripts/src/parsers/xmlui-parser/parser.js +74 -30
  39. package/dist/standalone/xmlui-standalone.es.d.ts +47 -2
  40. package/dist/standalone/xmlui-standalone.umd.js +217 -217
  41. package/package.json +2 -1
  42. package/dist/lib/apiInterceptorWorker-B62b9K2p.mjs +0 -563
@@ -1,6 +1,6 @@
1
- import { parseRegExpLiteral as Xe } from "@eslint-community/regexpp";
2
- const ve = 1, ke = 2, on = 3, Wn = 4, cn = 5, un = 6, qe = 7, fn = 8, hn = 9, pn = 10, dn = 11, kn = 12, gn = 13, En = 14, ge = 15, _e = 16, xn = 17, mn = 18, _n = 19, De = 20, Sn = 100, G = 101, le = 102, Nn = 103, An = 104, Ln = 105, wn = 106, M = 107, Tn = 108, Q = 109, se = 110, ae = 111, oe = 112, vn = 113, Ee = 114, be = 115, On = 116, In = 117, bn = 118, Ue = 200, Oe = 201, ee = 202, te = 203, Dn = 204;
3
- class Ge {
1
+ import { parseRegExpLiteral as Ye } from "@eslint-community/regexpp";
2
+ const be = 1, Ee = 2, hn = 3, Fn = 4, dn = 5, pn = 6, Qe = 7, kn = 8, gn = 9, En = 10, mn = 11, xn = 12, _n = 13, Sn = 14, me = 15, Ne = 16, Nn = 17, An = 18, Ln = 19, We = 20, wn = 100, z = 101, ae = 102, Tn = 103, vn = 104, On = 105, In = 106, M = 107, bn = 108, Y = 109, oe = 110, ce = 111, ue = 112, Dn = 113, xe = 114, Be = 115, Rn = 116, Bn = 117, Wn = 118, Xe = 200, De = 201, ne = 202, ie = 203, Pn = 204;
3
+ class Ze {
4
4
  // Creates a stream that uses the specified source code
5
5
  constructor(n) {
6
6
  this.source = n, this._pos = 0, this._line = 1, this._column = 0;
@@ -40,7 +40,7 @@ class Ge {
40
40
  }
41
41
  }
42
42
  var i = /* @__PURE__ */ ((e) => (e[e.Eof = -1] = "Eof", e[e.Ws = -2] = "Ws", e[e.BlockComment = -3] = "BlockComment", e[e.EolComment = -4] = "EolComment", e[e.Unknown = 0] = "Unknown", e[e.LParent = 1] = "LParent", e[e.RParent = 2] = "RParent", e[e.Identifier = 3] = "Identifier", e[e.Exponent = 4] = "Exponent", e[e.Divide = 5] = "Divide", e[e.Multiply = 6] = "Multiply", e[e.Remainder = 7] = "Remainder", e[e.Plus = 8] = "Plus", e[e.Minus = 9] = "Minus", e[e.BitwiseXor = 10] = "BitwiseXor", e[e.BitwiseOr = 11] = "BitwiseOr", e[e.LogicalOr = 12] = "LogicalOr", e[e.BitwiseAnd = 13] = "BitwiseAnd", e[e.LogicalAnd = 14] = "LogicalAnd", e[e.IncOp = 15] = "IncOp", e[e.DecOp = 16] = "DecOp", e[e.Assignment = 17] = "Assignment", e[e.AddAssignment = 18] = "AddAssignment", e[e.SubtractAssignment = 19] = "SubtractAssignment", e[e.ExponentAssignment = 20] = "ExponentAssignment", e[e.MultiplyAssignment = 21] = "MultiplyAssignment", e[e.DivideAssignment = 22] = "DivideAssignment", e[e.RemainderAssignment = 23] = "RemainderAssignment", e[e.ShiftLeftAssignment = 24] = "ShiftLeftAssignment", e[e.ShiftRightAssignment = 25] = "ShiftRightAssignment", e[e.SignedShiftRightAssignment = 26] = "SignedShiftRightAssignment", e[e.BitwiseAndAssignment = 27] = "BitwiseAndAssignment", e[e.BitwiseXorAssignment = 28] = "BitwiseXorAssignment", e[e.BitwiseOrAssignment = 29] = "BitwiseOrAssignment", e[e.LogicalAndAssignment = 30] = "LogicalAndAssignment", e[e.LogicalOrAssignment = 31] = "LogicalOrAssignment", e[e.NullCoalesceAssignment = 32] = "NullCoalesceAssignment", e[e.Semicolon = 33] = "Semicolon", e[e.Comma = 34] = "Comma", e[e.Colon = 35] = "Colon", e[e.LSquare = 36] = "LSquare", e[e.RSquare = 37] = "RSquare", e[e.QuestionMark = 38] = "QuestionMark", e[e.NullCoalesce = 39] = "NullCoalesce", e[e.OptionalChaining = 40] = "OptionalChaining", e[e.BinaryNot = 41] = "BinaryNot", e[e.LBrace = 42] = "LBrace", e[e.RBrace = 43] = "RBrace", e[e.Equal = 44] = "Equal", e[e.StrictEqual = 45] = "StrictEqual", e[e.LogicalNot = 46] = "LogicalNot", e[e.NotEqual = 47] = "NotEqual", e[e.StrictNotEqual = 48] = "StrictNotEqual", e[e.LessThan = 49] = "LessThan", e[e.LessThanOrEqual = 50] = "LessThanOrEqual", e[e.ShiftLeft = 51] = "ShiftLeft", e[e.GreaterThan = 52] = "GreaterThan", e[e.GreaterThanOrEqual = 53] = "GreaterThanOrEqual", e[e.ShiftRight = 54] = "ShiftRight", e[e.SignedShiftRight = 55] = "SignedShiftRight", e[e.Dot = 56] = "Dot", e[e.Spread = 57] = "Spread", e[e.Global = 58] = "Global", e[e.Backtick = 59] = "Backtick", e[e.DollarLBrace = 60] = "DollarLBrace", e[e.Arrow = 61] = "Arrow", e[e.DecimalLiteral = 62] = "DecimalLiteral", e[e.HexadecimalLiteral = 63] = "HexadecimalLiteral", e[e.BinaryLiteral = 64] = "BinaryLiteral", e[e.RealLiteral = 65] = "RealLiteral", e[e.StringLiteral = 66] = "StringLiteral", e[e.Infinity = 67] = "Infinity", e[e.NaN = 68] = "NaN", e[e.True = 69] = "True", e[e.False = 70] = "False", e[e.Typeof = 71] = "Typeof", e[e.Null = 72] = "Null", e[e.Undefined = 73] = "Undefined", e[e.In = 74] = "In", e[e.Let = 75] = "Let", e[e.Const = 76] = "Const", e[e.Var = 77] = "Var", e[e.If = 78] = "If", e[e.Else = 79] = "Else", e[e.Return = 80] = "Return", e[e.Break = 81] = "Break", e[e.Continue = 82] = "Continue", e[e.Do = 83] = "Do", e[e.While = 84] = "While", e[e.For = 85] = "For", e[e.Of = 86] = "Of", e[e.Try = 87] = "Try", e[e.Catch = 88] = "Catch", e[e.Finally = 89] = "Finally", e[e.Throw = 90] = "Throw", e[e.Switch = 91] = "Switch", e[e.Case = 92] = "Case", e[e.Default = 93] = "Default", e[e.Delete = 94] = "Delete", e[e.Function = 95] = "Function", e[e.As = 96] = "As", e[e.From = 97] = "From", e))(i || {});
43
- class ze {
43
+ class Je {
44
44
  /**
45
45
  * Initializes the tokenizer with the input stream
46
46
  * @param input Input source code stream
@@ -65,9 +65,9 @@ class ze {
65
65
  throw new Error("Cannot look ahead more than 16 tokens");
66
66
  for (; this._ahead.length <= n; ) {
67
67
  const t = this.fetch();
68
- if (Qe(t))
68
+ if (Ke(t))
69
69
  return t;
70
- (r || !r && !He(t)) && this._ahead.push(t);
70
+ (r || !r && !Ce(t)) && this._ahead.push(t);
71
71
  }
72
72
  return this._ahead[n];
73
73
  }
@@ -84,7 +84,7 @@ class ze {
84
84
  }
85
85
  for (; ; ) {
86
86
  const r = this.fetch();
87
- if (Qe(r) || n || !n && !He(r))
87
+ if (Ke(r) || n || !n && !Ce(r))
88
88
  return r;
89
89
  }
90
90
  }
@@ -119,10 +119,10 @@ class ze {
119
119
  fetch() {
120
120
  const n = this, r = this.input, t = this._prefetchedPos || r.position, l = r.line, a = this._prefetchedColumn || r.column;
121
121
  this._lastFetchPosition = this.input.position;
122
- let s = null, o = "", c = i.Eof, R = r.position, T = r.column, h = null, F = !1, x = this.getStartingPhaseThenReset();
122
+ let s = null, o = "", c = i.Eof, b = r.position, w = r.column, h = null, F = !1, x = this.getStartingPhaseThenReset();
123
123
  for (; ; ) {
124
124
  if (h = this.fetchNextChar(), h === null)
125
- return v();
125
+ return T();
126
126
  c === i.Eof && (c = i.Unknown);
127
127
  e: switch (x) {
128
128
  case 0:
@@ -210,14 +210,14 @@ class ze {
210
210
  s = h, x = 35;
211
211
  break;
212
212
  default:
213
- Ye(h) ? (F = !0, x = 17, c = i.Identifier) : V(h) ? (x = 27, c = i.DecimalLiteral) : _(i.Unknown);
213
+ je(h) ? (F = !0, x = 17, c = i.Identifier) : ee(h) ? (x = 27, c = i.DecimalLiteral) : _(i.Unknown);
214
214
  break;
215
215
  }
216
216
  break;
217
217
  case 1:
218
218
  if (h !== " " && h !== " " && h !== "\r" && h !== `
219
219
  `)
220
- return v();
220
+ return T();
221
221
  break;
222
222
  case 3:
223
223
  h === "*" && (x = 4);
@@ -232,26 +232,26 @@ class ze {
232
232
  return _();
233
233
  break;
234
234
  case 17:
235
- if (!Ze(h))
236
- return v();
235
+ if (!Ve(h))
236
+ return T();
237
237
  break;
238
238
  case 20:
239
- return h === ":" ? _(i.Global) : v();
239
+ return h === ":" ? _(i.Global) : T();
240
240
  case 5:
241
241
  if (h === "*")
242
242
  x = 3;
243
243
  else if (h === "/")
244
244
  x = 2, c = i.EolComment;
245
- else return h === "=" ? _(i.DivideAssignment) : v();
245
+ else return h === "=" ? _(i.DivideAssignment) : T();
246
246
  break;
247
247
  case 51:
248
- return h === "+" ? _(i.IncOp) : h === "=" ? _(i.AddAssignment) : v();
248
+ return h === "+" ? _(i.IncOp) : h === "=" ? _(i.AddAssignment) : T();
249
249
  case 52:
250
- return h === "-" ? _(i.DecOp) : h === "=" ? _(i.SubtractAssignment) : v();
250
+ return h === "-" ? _(i.DecOp) : h === "=" ? _(i.SubtractAssignment) : T();
251
251
  case 54:
252
- return h === "=" ? _(i.RemainderAssignment) : v();
252
+ return h === "=" ? _(i.RemainderAssignment) : T();
253
253
  case 58:
254
- return h === "=" ? _(i.BitwiseXorAssignment) : v();
254
+ return h === "=" ? _(i.BitwiseXorAssignment) : T();
255
255
  case 7:
256
256
  if (h === "=")
257
257
  return _(i.BitwiseOrAssignment);
@@ -259,9 +259,9 @@ class ze {
259
259
  x = 59, c = i.LogicalOr;
260
260
  break;
261
261
  }
262
- return v();
262
+ return T();
263
263
  case 59:
264
- return h === "=" ? _(i.LogicalOrAssignment) : v();
264
+ return h === "=" ? _(i.LogicalOrAssignment) : T();
265
265
  case 9:
266
266
  if (h === "=")
267
267
  return _(i.BitwiseAndAssignment);
@@ -269,26 +269,26 @@ class ze {
269
269
  x = 57, c = i.LogicalAnd;
270
270
  break;
271
271
  }
272
- return v();
272
+ return T();
273
273
  case 57:
274
- return h === "=" ? _(i.LogicalAndAssignment) : v();
274
+ return h === "=" ? _(i.LogicalAndAssignment) : T();
275
275
  case 8:
276
276
  if (h === "*") {
277
277
  x = 50, c = i.Exponent;
278
278
  break;
279
279
  } else if (h === "=")
280
280
  return _(i.MultiplyAssignment);
281
- return v();
281
+ return T();
282
282
  case 50:
283
- return h === "=" ? _(i.ExponentAssignment) : v();
283
+ return h === "=" ? _(i.ExponentAssignment) : T();
284
284
  case 22:
285
285
  if (h === "?") {
286
286
  x = 60, c = i.NullCoalesce;
287
287
  break;
288
288
  }
289
- return h === "." ? _(i.OptionalChaining) : v();
289
+ return h === "." ? _(i.OptionalChaining) : T();
290
290
  case 60:
291
- return h === "=" ? _(i.NullCoalesceAssignment) : v();
291
+ return h === "=" ? _(i.NullCoalesceAssignment) : T();
292
292
  case 10:
293
293
  if (h === ">")
294
294
  return _(i.Arrow);
@@ -296,17 +296,17 @@ class ze {
296
296
  x = 11, c = i.Equal;
297
297
  break;
298
298
  }
299
- return v();
299
+ return T();
300
300
  case 11:
301
- return h === "=" ? _(i.StrictEqual) : v();
301
+ return h === "=" ? _(i.StrictEqual) : T();
302
302
  case 13:
303
303
  if (h === "=") {
304
304
  x = 12, c = i.NotEqual;
305
305
  break;
306
306
  }
307
- return v();
307
+ return T();
308
308
  case 12:
309
- return h === "=" ? _(i.StrictNotEqual) : v();
309
+ return h === "=" ? _(i.StrictNotEqual) : T();
310
310
  case 14:
311
311
  if (h === "=")
312
312
  return _(i.LessThanOrEqual);
@@ -314,9 +314,9 @@ class ze {
314
314
  x = 55, c = i.ShiftLeft;
315
315
  break;
316
316
  }
317
- return v();
317
+ return T();
318
318
  case 55:
319
- return h === "=" ? _(i.ShiftLeftAssignment) : v();
319
+ return h === "=" ? _(i.ShiftLeftAssignment) : T();
320
320
  case 15:
321
321
  if (h === "=")
322
322
  return _(i.GreaterThanOrEqual);
@@ -324,114 +324,114 @@ class ze {
324
324
  x = 16, c = i.SignedShiftRight;
325
325
  break;
326
326
  }
327
- return v();
327
+ return T();
328
328
  case 16:
329
329
  if (h === ">") {
330
330
  x = 56, c = i.ShiftRight;
331
331
  break;
332
332
  }
333
- return h === "=" ? _(i.SignedShiftRightAssignment) : v();
333
+ return h === "=" ? _(i.SignedShiftRightAssignment) : T();
334
334
  case 56:
335
- return h === "=" ? _(i.ShiftRightAssignment) : v();
335
+ return h === "=" ? _(i.ShiftRightAssignment) : T();
336
336
  case 21:
337
337
  if (h === "x")
338
338
  x = 23, c = i.Unknown;
339
339
  else if (h === "b")
340
340
  x = 25, c = i.Unknown;
341
- else if (V(h) || h === "_")
341
+ else if (ee(h) || h === "_")
342
342
  x = 27;
343
343
  else if (h === ".")
344
344
  x = 28, c = i.Unknown;
345
345
  else if (h === "e" || h === "E")
346
346
  x = 30, c = i.Unknown;
347
347
  else
348
- return v();
348
+ return T();
349
349
  break;
350
350
  case 18:
351
351
  if (h === ".") {
352
352
  x = 19, c = i.Unknown;
353
353
  break;
354
354
  }
355
- if (!V(h))
356
- return v();
355
+ if (!ee(h))
356
+ return T();
357
357
  x = 29, c = i.RealLiteral;
358
358
  break;
359
359
  case 19:
360
- return h === "." ? _(i.Spread) : v();
360
+ return h === "." ? _(i.Spread) : T();
361
361
  case 23:
362
362
  if (h === "_")
363
363
  break;
364
- if (!z(h))
365
- return v();
364
+ if (!H(h))
365
+ return T();
366
366
  x = 24, c = i.HexadecimalLiteral;
367
367
  break;
368
368
  case 24:
369
- if (!z(h) && h !== "_")
370
- return v();
369
+ if (!H(h) && h !== "_")
370
+ return T();
371
371
  break;
372
372
  case 25:
373
373
  if (h === "_")
374
374
  break;
375
- if (!Je(h))
376
- return v();
375
+ if (!en(h))
376
+ return T();
377
377
  x = 26, c = i.BinaryLiteral;
378
378
  break;
379
379
  case 26:
380
- if (!Je(h) && h !== "_")
381
- return v();
380
+ if (!en(h) && h !== "_")
381
+ return T();
382
382
  c = i.BinaryLiteral;
383
383
  break;
384
384
  case 27:
385
- if (V(h) || h === "_")
385
+ if (ee(h) || h === "_")
386
386
  break;
387
- if (h === "." && (this.input.peek() === null || V(this.input.peek())))
387
+ if (h === "." && (this.input.peek() === null || ee(this.input.peek())))
388
388
  x = 28, c = i.Unknown;
389
389
  else if (h === "e" || h === "E")
390
390
  x = 30, c = i.Unknown;
391
391
  else
392
- return v();
392
+ return T();
393
393
  break;
394
394
  case 28:
395
- if (V(h))
395
+ if (ee(h))
396
396
  x = 29, c = i.RealLiteral;
397
397
  else if (h === "e" || h === "E")
398
398
  x = 30;
399
399
  else
400
- return v();
400
+ return T();
401
401
  break;
402
402
  case 29:
403
403
  if (h === "e" || h === "E")
404
404
  x = 30, c = i.Unknown;
405
- else if (!V(h) && h !== "_")
406
- return v();
405
+ else if (!ee(h) && h !== "_")
406
+ return T();
407
407
  break;
408
408
  case 30:
409
409
  if (h === "+" || h === "-")
410
410
  x = 31;
411
- else if (V(h))
411
+ else if (ee(h))
412
412
  x = 32, c = i.RealLiteral;
413
413
  else
414
- return v();
414
+ return T();
415
415
  break;
416
416
  case 31:
417
- if (V(h))
417
+ if (ee(h))
418
418
  x = 32, c = i.RealLiteral;
419
419
  else
420
- return v();
420
+ return T();
421
421
  break;
422
422
  case 32:
423
- if (!V(h))
424
- return v();
423
+ if (!ee(h))
424
+ return T();
425
425
  break;
426
426
  case 6:
427
427
  if (h === "{")
428
428
  return _(i.DollarLBrace);
429
- x = 17, F = !0, c = i.Identifier, Ze(h) || v();
429
+ x = 17, F = !0, c = i.Identifier, Ve(h) || T();
430
430
  break;
431
431
  case 33: {
432
432
  x = 34;
433
- const U = this.input.ahead(0), J = this.input.ahead(1);
434
- if (U === "`" || U === "$" && J === "{")
433
+ const q = this.input.ahead(0), $ = this.input.ahead(1);
434
+ if (q === "`" || q === "$" && $ === "{")
435
435
  return _(i.StringLiteral);
436
436
  break;
437
437
  }
@@ -444,16 +444,16 @@ class ze {
444
444
  return _(i.Backtick);
445
445
  case "$":
446
446
  if (this.input.ahead(0) === "{")
447
- return H(), this.fetchNextChar(), _(i.DollarLBrace);
447
+ return Q(), this.fetchNextChar(), _(i.DollarLBrace);
448
448
  }
449
- const $ = this.input.ahead(0), m = this.input.ahead(1);
450
- if ($ === "`" || $ === "$" && m === "{")
449
+ const G = this.input.ahead(0), S = this.input.ahead(1);
450
+ if (G === "`" || G === "$" && S === "{")
451
451
  return _(i.StringLiteral);
452
452
  break;
453
453
  case 35:
454
454
  if (h === s)
455
455
  return _(i.StringLiteral);
456
- if (Pn(h))
456
+ if (Mn(h))
457
457
  return _(i.Unknown);
458
458
  h === "\\" && (x = 36, c = i.Unknown);
459
459
  break;
@@ -485,13 +485,13 @@ class ze {
485
485
  }
486
486
  break;
487
487
  case 37:
488
- if (z(h))
488
+ if (H(h))
489
489
  x = 38;
490
490
  else
491
491
  return _(i.Unknown);
492
492
  break;
493
493
  case 38:
494
- if (z(h))
494
+ if (H(h))
495
495
  x = 35;
496
496
  else
497
497
  return _(i.Unknown);
@@ -501,31 +501,31 @@ class ze {
501
501
  x = 43;
502
502
  break;
503
503
  }
504
- if (z(h))
504
+ if (H(h))
505
505
  x = 40;
506
506
  else
507
507
  return _(i.Unknown);
508
508
  break;
509
509
  case 40:
510
- if (z(h))
510
+ if (H(h))
511
511
  x = 41;
512
512
  else
513
513
  return _(i.Unknown);
514
514
  break;
515
515
  case 41:
516
- if (z(h))
516
+ if (H(h))
517
517
  x = 42;
518
518
  else
519
519
  return _(i.Unknown);
520
520
  break;
521
521
  case 42:
522
- if (z(h))
522
+ if (H(h))
523
523
  x = 35;
524
524
  else
525
525
  return _(i.Unknown);
526
526
  break;
527
527
  case 43:
528
- if (z(h))
528
+ if (H(h))
529
529
  x = 44;
530
530
  else
531
531
  return _(i.Unknown);
@@ -533,7 +533,7 @@ class ze {
533
533
  case 44:
534
534
  if (h === "}")
535
535
  x = 35;
536
- else if (z(h))
536
+ else if (H(h))
537
537
  x = 45;
538
538
  else
539
539
  return _(i.Unknown);
@@ -541,7 +541,7 @@ class ze {
541
541
  case 45:
542
542
  if (h === "}")
543
543
  x = 35;
544
- else if (z(h))
544
+ else if (H(h))
545
545
  x = 46;
546
546
  else
547
547
  return _(i.Unknown);
@@ -549,7 +549,7 @@ class ze {
549
549
  case 46:
550
550
  if (h === "}")
551
551
  x = 35;
552
- else if (z(h))
552
+ else if (H(h))
553
553
  x = 47;
554
554
  else
555
555
  return _(i.Unknown);
@@ -557,7 +557,7 @@ class ze {
557
557
  case 47:
558
558
  if (h === "}")
559
559
  x = 35;
560
- else if (z(h))
560
+ else if (H(h))
561
561
  x = 48;
562
562
  else
563
563
  return _(i.Unknown);
@@ -565,7 +565,7 @@ class ze {
565
565
  case 48:
566
566
  if (h === "}")
567
567
  x = 35;
568
- else if (z(h))
568
+ else if (H(h))
569
569
  x = 49;
570
570
  else
571
571
  return _(i.Unknown);
@@ -577,27 +577,27 @@ class ze {
577
577
  return _(i.Unknown);
578
578
  break;
579
579
  default:
580
- return v();
580
+ return T();
581
581
  }
582
- H();
582
+ Q();
583
583
  }
584
- function H() {
585
- o += h, n._prefetched = null, n._prefetchedPos = null, n._prefetchedColumn = null, R = r.position, T = r.position;
584
+ function Q() {
585
+ o += h, n._prefetched = null, n._prefetchedPos = null, n._prefetchedColumn = null, b = r.position, w = r.position;
586
586
  }
587
- function v() {
588
- return F && (c = y.get(o) ?? (Ye(o[0]) && o[o.length - 1] !== "'" ? i.Identifier : i.Unknown)), {
587
+ function T() {
588
+ return F && (c = W.get(o) ?? (je(o[0]) && o[o.length - 1] !== "'" ? i.Identifier : i.Unknown)), {
589
589
  text: o,
590
590
  type: c,
591
591
  startPosition: t,
592
- endPosition: R,
592
+ endPosition: b,
593
593
  startLine: l,
594
594
  endLine: l,
595
595
  startColumn: a,
596
- endColumn: T
596
+ endColumn: w
597
597
  };
598
598
  }
599
- function _($) {
600
- return H(), $ !== void 0 && (c = $), v();
599
+ function _(G) {
600
+ return Q(), G !== void 0 && (c = G), T();
601
601
  }
602
602
  }
603
603
  getStartingPhaseThenReset() {
@@ -613,7 +613,7 @@ class ze {
613
613
  fetchRegEx() {
614
614
  const n = this._ahead.length > 0 ? this._ahead[0].startPosition : this._lastFetchPosition, r = this.input.getTail(n);
615
615
  try {
616
- const t = Xe(r), l = t.raw;
616
+ const t = Ye(r), l = t.raw;
617
617
  for (let a = 1; a < l.length; a++)
618
618
  this.fetchNextChar(), this._prefetched = null, this._prefetchedPos = null, this._prefetchedColumn = null;
619
619
  return this._ahead.length = 0, {
@@ -634,7 +634,7 @@ class ze {
634
634
  };
635
635
  const a = r.substring(0, l);
636
636
  try {
637
- const s = Xe(a), o = s.raw;
637
+ const s = Ye(a), o = s.raw;
638
638
  for (let c = 1; c < o.length; c++)
639
639
  this.fetchNextChar(), this._prefetched = null, this._prefetchedPos = null, this._prefetchedColumn = null;
640
640
  return this._ahead.length = 0, {
@@ -652,69 +652,69 @@ class ze {
652
652
  }
653
653
  }
654
654
  }
655
- const y = /* @__PURE__ */ new Map();
656
- y.set("typeof", i.Typeof);
657
- y.set("Infinity", i.Infinity);
658
- y.set("NaN", i.NaN);
659
- y.set("true", i.True);
660
- y.set("false", i.False);
661
- y.set("undefined", i.Undefined);
662
- y.set("null", i.Null);
663
- y.set("in", i.In);
664
- y.set("let", i.Let);
665
- y.set("const", i.Const);
666
- y.set("var", i.Var);
667
- y.set("if", i.If);
668
- y.set("else", i.Else);
669
- y.set("return", i.Return);
670
- y.set("break", i.Break);
671
- y.set("continue", i.Continue);
672
- y.set("do", i.Do);
673
- y.set("while", i.While);
674
- y.set("for", i.For);
675
- y.set("of", i.Of);
676
- y.set("try", i.Try);
677
- y.set("catch", i.Catch);
678
- y.set("finally", i.Finally);
679
- y.set("throw", i.Throw);
680
- y.set("switch", i.Switch);
681
- y.set("case", i.Case);
682
- y.set("default", i.Default);
683
- y.set("delete", i.Delete);
684
- y.set("function", i.Function);
685
- y.set("as", i.As);
686
- y.set("from", i.From);
687
- function Qe(e) {
655
+ const W = /* @__PURE__ */ new Map();
656
+ W.set("typeof", i.Typeof);
657
+ W.set("Infinity", i.Infinity);
658
+ W.set("NaN", i.NaN);
659
+ W.set("true", i.True);
660
+ W.set("false", i.False);
661
+ W.set("undefined", i.Undefined);
662
+ W.set("null", i.Null);
663
+ W.set("in", i.In);
664
+ W.set("let", i.Let);
665
+ W.set("const", i.Const);
666
+ W.set("var", i.Var);
667
+ W.set("if", i.If);
668
+ W.set("else", i.Else);
669
+ W.set("return", i.Return);
670
+ W.set("break", i.Break);
671
+ W.set("continue", i.Continue);
672
+ W.set("do", i.Do);
673
+ W.set("while", i.While);
674
+ W.set("for", i.For);
675
+ W.set("of", i.Of);
676
+ W.set("try", i.Try);
677
+ W.set("catch", i.Catch);
678
+ W.set("finally", i.Finally);
679
+ W.set("throw", i.Throw);
680
+ W.set("switch", i.Switch);
681
+ W.set("case", i.Case);
682
+ W.set("default", i.Default);
683
+ W.set("delete", i.Delete);
684
+ W.set("function", i.Function);
685
+ W.set("as", i.As);
686
+ W.set("from", i.From);
687
+ function Ke(e) {
688
688
  return e.type === i.Eof;
689
689
  }
690
- function He(e) {
690
+ function Ce(e) {
691
691
  return e.type <= i.Ws;
692
692
  }
693
- function Ye(e) {
693
+ function je(e) {
694
694
  return e >= "a" && e <= "z" || e >= "A" && e <= "Z" || e === "_" || e === "$";
695
695
  }
696
- function Ze(e) {
696
+ function Ve(e) {
697
697
  return e >= "a" && e <= "z" || e >= "A" && e <= "Z" || e >= "0" && e <= "9" || e === "_" || e === "$";
698
698
  }
699
- function Je(e) {
699
+ function en(e) {
700
700
  return e === "0" || e === "1";
701
701
  }
702
- function V(e) {
702
+ function ee(e) {
703
703
  return e >= "0" && e <= "9";
704
704
  }
705
- function z(e) {
705
+ function H(e) {
706
706
  return e >= "0" && e <= "9" || e >= "A" && e <= "F" || e >= "a" && e <= "f";
707
707
  }
708
- function Pn(e) {
708
+ function Mn(e) {
709
709
  return e === "\r" || e === `
710
710
  ` || e === "…" || e === "\u2028" || e === "\u2029";
711
711
  }
712
- let yn = class Rn extends Error {
712
+ let qn = class yn extends Error {
713
713
  constructor(n, r) {
714
- super(n), this.code = r, Object.setPrototypeOf(this, Rn.prototype);
714
+ super(n), this.code = r, Object.setPrototypeOf(this, yn.prototype);
715
715
  }
716
716
  };
717
- const Ie = {
717
+ const Re = {
718
718
  W001: "An expression expected",
719
719
  W002: "Unexpected token: {0}",
720
720
  W003: "An identifier expected",
@@ -746,7 +746,7 @@ const Ie = {
746
746
  W029: "An imported module can contain only exported functions",
747
747
  W030: "Nested declarations cannot be exported",
748
748
  W031: "An identifier in a declaration cannot start with '$'"
749
- }, ue = {
749
+ }, he = {
750
750
  [i.Eof]: {},
751
751
  [i.Ws]: {},
752
752
  [i.DollarLBrace]: {},
@@ -850,24 +850,24 @@ const Ie = {
850
850
  [i.As]: { keywordLike: !0 },
851
851
  [i.From]: { keywordLike: !0 }
852
852
  };
853
- let Un = 0;
854
- function Le() {
855
- return ++Un;
853
+ let $n = 0;
854
+ function ve() {
855
+ return ++$n;
856
856
  }
857
- class Fe {
857
+ class Ge {
858
858
  /**
859
859
  * Initializes the parser with the specified source code
860
860
  * @param source Source code to parse
861
861
  */
862
862
  constructor(n) {
863
- this._parseErrors = [], this._statementLevel = 0, this._lexer = new ze(new Ge(n ?? ""));
863
+ this._parseErrors = [], this._statementLevel = 0, this._lexer = new Je(new Ze(n ?? ""));
864
864
  }
865
865
  /**
866
866
  * Sets the source code to parse
867
867
  * @param source Source code to parse
868
868
  */
869
869
  setSource(n) {
870
- this._lexer = new ze(new Ge(n));
870
+ this._lexer = new Je(new Ze(n));
871
871
  }
872
872
  /**
873
873
  * The errors raised during the parse phase
@@ -915,7 +915,7 @@ class Fe {
915
915
  for (; !this.isEof; ) {
916
916
  const r = this.parseStatement();
917
917
  if (!r) return null;
918
- n.push(r), r.type !== ke && this.skipToken(i.Semicolon);
918
+ n.push(r), r.type !== Ee && this.skipToken(i.Semicolon);
919
919
  }
920
920
  return n;
921
921
  }
@@ -947,14 +947,14 @@ class Fe {
947
947
  return this.parseReturnStatement();
948
948
  case i.Break:
949
949
  return this._lexer.get(), this.createStatementNode(
950
- pn,
950
+ En,
951
951
  {},
952
952
  r,
953
953
  r
954
954
  );
955
955
  case i.Continue:
956
956
  return this._lexer.get(), this.createStatementNode(
957
- dn,
957
+ mn,
958
958
  {},
959
959
  r,
960
960
  r
@@ -985,7 +985,7 @@ class Fe {
985
985
  */
986
986
  parseEmptyStatement() {
987
987
  const n = this._lexer.get();
988
- return this.createStatementNode(ke, {}, n, n);
988
+ return this.createStatementNode(Ee, {}, n, n);
989
989
  }
990
990
  /**
991
991
  * Parses an expression statement
@@ -997,7 +997,7 @@ class Fe {
997
997
  parseExpressionStatement(n = !0) {
998
998
  const r = this._lexer.peek(), t = this.getExpression(n);
999
999
  return t ? this.createStatementNode(
1000
- on,
1000
+ hn,
1001
1001
  {
1002
1002
  expr: t
1003
1003
  },
@@ -1050,7 +1050,7 @@ class Fe {
1050
1050
  return this.reportError("W009", s), null;
1051
1051
  if (t.push(
1052
1052
  this.createExpressionNode(
1053
- Ue,
1053
+ Xe,
1054
1054
  a,
1055
1055
  l,
1056
1056
  r
@@ -1059,7 +1059,7 @@ class Fe {
1059
1059
  this._lexer.get();
1060
1060
  }
1061
1061
  return this.createStatementNode(
1062
- cn,
1062
+ dn,
1063
1063
  {
1064
1064
  decls: t
1065
1065
  },
@@ -1108,7 +1108,7 @@ class Fe {
1108
1108
  if (s === null) return null;
1109
1109
  if (a.expr = s, r = s.endToken, t.push(
1110
1110
  this.createExpressionNode(
1111
- Ue,
1111
+ Xe,
1112
1112
  a,
1113
1113
  l,
1114
1114
  r
@@ -1117,7 +1117,7 @@ class Fe {
1117
1117
  this._lexer.get();
1118
1118
  }
1119
1119
  return this.createStatementNode(
1120
- un,
1120
+ pn,
1121
1121
  {
1122
1122
  decls: t
1123
1123
  },
@@ -1157,7 +1157,7 @@ class Fe {
1157
1157
  if (s === null) return null;
1158
1158
  if (a.expr = s, r = s.endToken, t.push(
1159
1159
  this.createExpressionNode(
1160
- bn,
1160
+ Wn,
1161
1161
  a,
1162
1162
  l,
1163
1163
  r
@@ -1166,7 +1166,7 @@ class Fe {
1166
1166
  this._lexer.get();
1167
1167
  }
1168
1168
  return this.createStatementNode(
1169
- qe,
1169
+ Qe,
1170
1170
  {
1171
1171
  decls: t
1172
1172
  },
@@ -1198,7 +1198,7 @@ class Fe {
1198
1198
  }
1199
1199
  l = this._lexer.peek(), (l.type === i.Comma || l.type === i.RBrace) && (n.push(
1200
1200
  this.createExpressionNode(
1201
- te,
1201
+ ie,
1202
1202
  { id: a, alias: s, aDestr: o, oDestr: c },
1203
1203
  r,
1204
1204
  t
@@ -1226,7 +1226,7 @@ class Fe {
1226
1226
  if (l = this._lexer.peek(), l.type === i.Comma)
1227
1227
  n.push(
1228
1228
  this.createExpressionNode(
1229
- ee,
1229
+ ne,
1230
1230
  { id: a, aDestr: s, oDestr: o },
1231
1231
  r,
1232
1232
  t
@@ -1235,7 +1235,7 @@ class Fe {
1235
1235
  else if (l.type === i.RSquare) {
1236
1236
  (a || s || o) && n.push(
1237
1237
  this.createExpressionNode(
1238
- ee,
1238
+ ne,
1239
1239
  { id: a, aDestr: s, oDestr: o },
1240
1240
  r,
1241
1241
  t
@@ -1259,11 +1259,11 @@ class Fe {
1259
1259
  for (; this._lexer.peek().type !== i.RBrace; ) {
1260
1260
  const l = this.parseStatement();
1261
1261
  if (!l) return null;
1262
- r.push(l), l.type !== ke && this.skipToken(i.Semicolon);
1262
+ r.push(l), l.type !== Ee && this.skipToken(i.Semicolon);
1263
1263
  }
1264
1264
  const t = this._lexer.get();
1265
1265
  return this.createStatementNode(
1266
- ve,
1266
+ be,
1267
1267
  { stmts: r },
1268
1268
  n,
1269
1269
  t
@@ -1287,14 +1287,14 @@ class Fe {
1287
1287
  if (!l) return null;
1288
1288
  r = l.endToken;
1289
1289
  let a = !0;
1290
- l.type !== ve && (this._lexer.peek().type === i.Semicolon ? this._lexer.get() : a = !1);
1290
+ l.type !== be && (this._lexer.peek().type === i.Semicolon ? this._lexer.get() : a = !1);
1291
1291
  let s = null;
1292
1292
  if (a && this._lexer.peek().type === i.Else) {
1293
1293
  if (this._lexer.get(), s = this.parseStatement(), !s) return null;
1294
1294
  r = s.endToken;
1295
1295
  }
1296
1296
  return this.createStatementNode(
1297
- fn,
1297
+ kn,
1298
1298
  {
1299
1299
  cond: t,
1300
1300
  thenB: l,
@@ -1319,7 +1319,7 @@ class Fe {
1319
1319
  this.expectToken(i.RParent, "W006");
1320
1320
  const t = this.parseStatement();
1321
1321
  return t ? this.createStatementNode(
1322
- kn,
1322
+ xn,
1323
1323
  {
1324
1324
  cond: r,
1325
1325
  body: t
@@ -1338,12 +1338,12 @@ class Fe {
1338
1338
  parseDoWhileStatement() {
1339
1339
  const n = this._lexer.get(), r = this.parseStatement();
1340
1340
  if (!r) return null;
1341
- r.type !== ve && r.type !== ke && this.expectToken(i.Semicolon), this.expectToken(i.While), this.expectToken(i.LParent, "W014");
1341
+ r.type !== be && r.type !== Ee && this.expectToken(i.Semicolon), this.expectToken(i.While), this.expectToken(i.LParent, "W014");
1342
1342
  const t = this.getExpression();
1343
1343
  if (!t) return null;
1344
1344
  const l = this._lexer.peek();
1345
1345
  return this.expectToken(i.RParent, "W006"), this.createStatementNode(
1346
- gn,
1346
+ _n,
1347
1347
  {
1348
1348
  cond: t,
1349
1349
  body: r
@@ -1362,12 +1362,12 @@ class Fe {
1362
1362
  parseReturnStatement() {
1363
1363
  const n = this._lexer.peek();
1364
1364
  let r = this._lexer.get(), t;
1365
- if (ue[this._lexer.peek().type].expressionStart) {
1365
+ if (he[this._lexer.peek().type].expressionStart) {
1366
1366
  if (t = this.getExpression(), t === null) return null;
1367
1367
  r = t.endToken;
1368
1368
  }
1369
1369
  return this.createStatementNode(
1370
- hn,
1370
+ gn,
1371
1371
  {
1372
1372
  expr: t
1373
1373
  },
@@ -1387,26 +1387,26 @@ class Fe {
1387
1387
  let r = this._lexer.peek();
1388
1388
  if (r.type === i.Identifier) {
1389
1389
  if (this._lexer.ahead(1).type === i.In)
1390
- return this.parseForInOfStatement(n, "none", r, ge);
1390
+ return this.parseForInOfStatement(n, "none", r, me);
1391
1391
  if (this._lexer.ahead(1).type === i.Of)
1392
- return this.parseForInOfStatement(n, "none", r, _e);
1392
+ return this.parseForInOfStatement(n, "none", r, Ne);
1393
1393
  } else if (r.type === i.Let) {
1394
1394
  const o = this._lexer.ahead(1);
1395
1395
  if (o.type === i.Identifier) {
1396
1396
  const c = this._lexer.ahead(2);
1397
1397
  if (c.type === i.In)
1398
- return this.parseForInOfStatement(n, "let", o, ge);
1398
+ return this.parseForInOfStatement(n, "let", o, me);
1399
1399
  if (c.type === i.Of)
1400
- return this.parseForInOfStatement(n, "let", o, _e);
1400
+ return this.parseForInOfStatement(n, "let", o, Ne);
1401
1401
  }
1402
1402
  } else if (r.type === i.Const) {
1403
1403
  const o = this._lexer.ahead(1);
1404
1404
  if (o.type === i.Identifier) {
1405
1405
  const c = this._lexer.ahead(2);
1406
1406
  if (c.type === i.In)
1407
- return this.parseForInOfStatement(n, "const", o, ge);
1407
+ return this.parseForInOfStatement(n, "const", o, me);
1408
1408
  if (c.type === i.Of)
1409
- return this.parseForInOfStatement(n, "const", o, _e);
1409
+ return this.parseForInOfStatement(n, "const", o, Ne);
1410
1410
  }
1411
1411
  }
1412
1412
  let t;
@@ -1419,7 +1419,7 @@ class Fe {
1419
1419
  if (t = o, t.decls.some((c) => !c.expr))
1420
1420
  return this.reportError("W011"), null;
1421
1421
  this.expectToken(i.Semicolon);
1422
- } else if (ue[r.type].expressionStart) {
1422
+ } else if (he[r.type].expressionStart) {
1423
1423
  const o = this.parseExpressionStatement();
1424
1424
  if (o === null)
1425
1425
  return null;
@@ -1439,7 +1439,7 @@ class Fe {
1439
1439
  this.expectToken(i.RParent, "W006");
1440
1440
  const s = this.parseStatement();
1441
1441
  return s ? this.createStatementNode(
1442
- En,
1442
+ Sn,
1443
1443
  {
1444
1444
  init: t,
1445
1445
  cond: l,
@@ -1471,8 +1471,8 @@ class Fe {
1471
1471
  const a = this.getExpression(!0);
1472
1472
  this.expectToken(i.RParent, "W006");
1473
1473
  const s = this.parseStatement();
1474
- return s ? l === ge ? this.createStatementNode(
1475
- ge,
1474
+ return s ? l === me ? this.createStatementNode(
1475
+ me,
1476
1476
  {
1477
1477
  varB: r,
1478
1478
  id: {
@@ -1487,7 +1487,7 @@ class Fe {
1487
1487
  n,
1488
1488
  s.endToken
1489
1489
  ) : this.createStatementNode(
1490
- _e,
1490
+ Ne,
1491
1491
  {
1492
1492
  varB: r,
1493
1493
  id: {
@@ -1515,7 +1515,7 @@ class Fe {
1515
1515
  this._lexer.get();
1516
1516
  let r;
1517
1517
  return r = this.getExpression(), r === null ? null : this.createStatementNode(
1518
- xn,
1518
+ Nn,
1519
1519
  {
1520
1520
  expr: r
1521
1521
  },
@@ -1541,7 +1541,7 @@ class Fe {
1541
1541
  parseTryStatement() {
1542
1542
  const n = this._lexer.peek();
1543
1543
  let r = this._lexer.get();
1544
- const t = this, l = R();
1544
+ const t = this, l = b();
1545
1545
  let a, s, o, c = this._lexer.peek();
1546
1546
  if (c.type === i.Catch) {
1547
1547
  if (this._lexer.get(), c = this._lexer.peek(), c.type === i.LParent) {
@@ -1549,19 +1549,19 @@ class Fe {
1549
1549
  return this.reportError("W003", c), null;
1550
1550
  s = {
1551
1551
  type: M,
1552
- nodeId: Le(),
1552
+ nodeId: ve(),
1553
1553
  name: c.text,
1554
1554
  startToken: c,
1555
1555
  endToken: c
1556
1556
  }, this._lexer.get(), this.expectToken(i.RParent, "W006");
1557
1557
  }
1558
- a = R(), r = a.endToken, this._lexer.peek().type === i.Finally && (this._lexer.get(), o = R(), r = o.endToken);
1558
+ a = b(), r = a.endToken, this._lexer.peek().type === i.Finally && (this._lexer.get(), o = b(), r = o.endToken);
1559
1559
  } else if (c.type === i.Finally)
1560
- this._lexer.get(), o = R(), r = o.endToken;
1560
+ this._lexer.get(), o = b(), r = o.endToken;
1561
1561
  else
1562
1562
  return this.reportError("W013", c), null;
1563
1563
  return this.createStatementNode(
1564
- mn,
1564
+ An,
1565
1565
  {
1566
1566
  tryB: l,
1567
1567
  catchB: a,
@@ -1571,9 +1571,9 @@ class Fe {
1571
1571
  n,
1572
1572
  r
1573
1573
  );
1574
- function R() {
1575
- const T = t._lexer.peek();
1576
- return T.type !== i.LBrace ? (t.reportError("W012", T), null) : t.parseBlockStatement();
1574
+ function b() {
1575
+ const w = t._lexer.peek();
1576
+ return w.type !== i.LBrace ? (t.reportError("W012", w), null) : t.parseBlockStatement();
1577
1577
  }
1578
1578
  }
1579
1579
  /**
@@ -1610,25 +1610,25 @@ class Fe {
1610
1610
  return this.reportError("W015"), null;
1611
1611
  }
1612
1612
  this.expectToken(i.Colon, "W008");
1613
- let c = [], R = !1;
1614
- for (; !R; )
1613
+ let c = [], b = !1;
1614
+ for (; !b; )
1615
1615
  switch (this._lexer.peek().type) {
1616
1616
  case i.Case:
1617
1617
  case i.Default:
1618
1618
  case i.RBrace:
1619
- R = !0;
1619
+ b = !0;
1620
1620
  break;
1621
1621
  default:
1622
1622
  const h = this.parseStatement();
1623
1623
  if (h === null) {
1624
- R = !0;
1624
+ b = !0;
1625
1625
  break;
1626
1626
  }
1627
- c.push(h), h.type !== ke && this.skipToken(i.Semicolon);
1627
+ c.push(h), h.type !== Ee && this.skipToken(i.Semicolon);
1628
1628
  }
1629
1629
  t.push(
1630
1630
  this.createNode(
1631
- Dn,
1631
+ Pn,
1632
1632
  {
1633
1633
  caseE: o,
1634
1634
  stmts: c
@@ -1639,7 +1639,7 @@ class Fe {
1639
1639
  }
1640
1640
  const a = this._lexer.peek();
1641
1641
  return this.expectToken(i.RBrace, "W004"), this.createStatementNode(
1642
- _n,
1642
+ Ln,
1643
1643
  {
1644
1644
  expr: r,
1645
1645
  cases: t
@@ -1677,18 +1677,18 @@ class Fe {
1677
1677
  let o;
1678
1678
  const c = [];
1679
1679
  switch (s.type) {
1680
- case Ee:
1680
+ case xe:
1681
1681
  o = !0;
1682
1682
  break;
1683
1683
  case M:
1684
1684
  o = (s.parenthesized ?? 0) <= 1, c.push(s);
1685
1685
  break;
1686
- case le:
1686
+ case ae:
1687
1687
  o = s.parenthesized === 1;
1688
- let T = !1;
1688
+ let w = !1;
1689
1689
  if (o)
1690
1690
  for (const h of s.exprs) {
1691
- if (T) {
1691
+ if (w) {
1692
1692
  o = !1;
1693
1693
  break;
1694
1694
  }
@@ -1696,22 +1696,22 @@ class Fe {
1696
1696
  case M:
1697
1697
  o = !h.parenthesized, c.push(h);
1698
1698
  break;
1699
- case ae: {
1699
+ case ce: {
1700
1700
  if (o = !h.parenthesized, o) {
1701
1701
  const F = this.convertToObjectDestructure(h);
1702
1702
  F && c.push(F);
1703
1703
  }
1704
1704
  break;
1705
1705
  }
1706
- case se: {
1706
+ case oe: {
1707
1707
  if (o = !h.parenthesized, o) {
1708
1708
  const F = this.convertToArrayDestructure(h);
1709
1709
  F && c.push(F);
1710
1710
  }
1711
1711
  break;
1712
1712
  }
1713
- case oe: {
1714
- if (T = !0, h.expr.type !== M) {
1713
+ case ue: {
1714
+ if (w = !0, h.expr.type !== M) {
1715
1715
  o = !1;
1716
1716
  break;
1717
1717
  }
@@ -1724,19 +1724,19 @@ class Fe {
1724
1724
  }
1725
1725
  }
1726
1726
  break;
1727
- case ae:
1727
+ case ce:
1728
1728
  if (o = s.parenthesized === 1, o) {
1729
1729
  const h = this.convertToObjectDestructure(s);
1730
1730
  h && c.push(h);
1731
1731
  }
1732
1732
  break;
1733
- case se:
1733
+ case oe:
1734
1734
  if (o = s.parenthesized === 1, o) {
1735
1735
  const h = this.convertToArrayDestructure(s);
1736
1736
  h && c.push(h);
1737
1737
  }
1738
1738
  break;
1739
- case oe:
1739
+ case ue:
1740
1740
  if (s.expr.type !== M) {
1741
1741
  o = !1;
1742
1742
  break;
@@ -1750,16 +1750,16 @@ class Fe {
1750
1750
  return this.reportError("W010", r), null;
1751
1751
  if (this._lexer.peek().type !== i.LBrace)
1752
1752
  return this.reportError("W012", this._lexer.peek()), null;
1753
- const R = this.parseBlockStatement();
1754
- return R ? this.createStatementNode(
1755
- De,
1753
+ const b = this.parseBlockStatement();
1754
+ return b ? this.createStatementNode(
1755
+ We,
1756
1756
  {
1757
1757
  id: { type: M, name: t },
1758
1758
  args: c,
1759
- stmt: R
1759
+ stmt: b
1760
1760
  },
1761
1761
  r,
1762
- R.endToken
1762
+ b.endToken
1763
1763
  ) : null;
1764
1764
  }
1765
1765
  // ==========================================================================
@@ -1790,7 +1790,7 @@ class Fe {
1790
1790
  for (l.push(t); this.skipToken(i.Comma); )
1791
1791
  if (this._lexer.peek().type === i.Comma)
1792
1792
  a = !0, r = this._lexer.peek(), l.push(
1793
- this.createExpressionNode(Ee, {}, r, r)
1793
+ this.createExpressionNode(xe, {}, r, r)
1794
1794
  );
1795
1795
  else {
1796
1796
  const s = this.parseCondOrSpreadOrAsgnOrArrowExpr();
@@ -1799,7 +1799,7 @@ class Fe {
1799
1799
  r = s.endToken, l.push(s);
1800
1800
  }
1801
1801
  return l.length && (t = this.createExpressionNode(
1802
- le,
1802
+ ae,
1803
1803
  {
1804
1804
  exprs: l,
1805
1805
  loose: a
@@ -1821,7 +1821,7 @@ class Fe {
1821
1821
  this._lexer.get();
1822
1822
  const l = this.parseNullCoalescingExpr();
1823
1823
  return l ? this.createExpressionNode(
1824
- oe,
1824
+ ue,
1825
1825
  {
1826
1826
  expr: l
1827
1827
  },
@@ -1832,7 +1832,7 @@ class Fe {
1832
1832
  if (n.type === i.Function) {
1833
1833
  const l = this.parseFunctionDeclaration(!0);
1834
1834
  return l ? this.createExpressionNode(
1835
- be,
1835
+ Be,
1836
1836
  {
1837
1837
  name: l.id.name,
1838
1838
  args: l.args,
@@ -1854,7 +1854,7 @@ class Fe {
1854
1854
  this.expectToken(i.Colon);
1855
1855
  const a = this.getExpression(!1);
1856
1856
  return this.createExpressionNode(
1857
- Nn,
1857
+ Tn,
1858
1858
  {
1859
1859
  cond: r,
1860
1860
  thenE: l,
@@ -1864,11 +1864,11 @@ class Fe {
1864
1864
  a.endToken
1865
1865
  );
1866
1866
  }
1867
- if (ue[t.type].isAssignment) {
1867
+ if (he[t.type].isAssignment) {
1868
1868
  this._lexer.get();
1869
1869
  const l = this.getExpression();
1870
1870
  return l ? this.createExpressionNode(
1871
- vn,
1871
+ Dn,
1872
1872
  {
1873
1873
  leftValue: r,
1874
1874
  op: t.text,
@@ -1889,13 +1889,13 @@ class Fe {
1889
1889
  let t;
1890
1890
  const l = [];
1891
1891
  switch (r.type) {
1892
- case Ee:
1892
+ case xe:
1893
1893
  t = !0;
1894
1894
  break;
1895
1895
  case M:
1896
1896
  t = (r.parenthesized ?? 0) <= 1, l.push(r);
1897
1897
  break;
1898
- case le:
1898
+ case ae:
1899
1899
  t = r.parenthesized === 1;
1900
1900
  let s = !1;
1901
1901
  if (t)
@@ -1908,21 +1908,21 @@ class Fe {
1908
1908
  case M:
1909
1909
  t = !o.parenthesized, l.push(o);
1910
1910
  break;
1911
- case ae: {
1911
+ case ce: {
1912
1912
  if (t = !o.parenthesized, t) {
1913
1913
  const c = this.convertToObjectDestructure(o);
1914
1914
  c && l.push(c);
1915
1915
  }
1916
1916
  break;
1917
1917
  }
1918
- case se: {
1918
+ case oe: {
1919
1919
  if (t = !o.parenthesized, t) {
1920
1920
  const c = this.convertToArrayDestructure(o);
1921
1921
  c && l.push(c);
1922
1922
  }
1923
1923
  break;
1924
1924
  }
1925
- case oe: {
1925
+ case ue: {
1926
1926
  if (s = !0, o.expr.type !== M) {
1927
1927
  t = !1;
1928
1928
  break;
@@ -1936,19 +1936,19 @@ class Fe {
1936
1936
  }
1937
1937
  }
1938
1938
  break;
1939
- case ae:
1939
+ case ce:
1940
1940
  if (t = r.parenthesized === 1, t) {
1941
1941
  const o = this.convertToObjectDestructure(r);
1942
1942
  o && l.push(o);
1943
1943
  }
1944
1944
  break;
1945
- case se:
1945
+ case oe:
1946
1946
  if (t = r.parenthesized === 1, t) {
1947
1947
  const o = this.convertToArrayDestructure(r);
1948
1948
  o && l.push(o);
1949
1949
  }
1950
1950
  break;
1951
- case oe:
1951
+ case ue:
1952
1952
  t = r.expr.type === M, t && l.push(r);
1953
1953
  break;
1954
1954
  default:
@@ -1959,7 +1959,7 @@ class Fe {
1959
1959
  this._lexer.get();
1960
1960
  const a = this.parseStatement(!1);
1961
1961
  return a ? this.createExpressionNode(
1962
- be,
1962
+ Be,
1963
1963
  {
1964
1964
  args: l,
1965
1965
  statement: a
@@ -1984,7 +1984,7 @@ class Fe {
1984
1984
  return this.reportError("W001"), null;
1985
1985
  let l = t.endToken;
1986
1986
  r = this.createExpressionNode(
1987
- G,
1987
+ z,
1988
1988
  {
1989
1989
  op: "??",
1990
1990
  left: r,
@@ -2012,7 +2012,7 @@ class Fe {
2012
2012
  return this.reportError("W001"), null;
2013
2013
  let l = t.endToken;
2014
2014
  r = this.createExpressionNode(
2015
- G,
2015
+ z,
2016
2016
  {
2017
2017
  op: "||",
2018
2018
  left: r,
@@ -2040,7 +2040,7 @@ class Fe {
2040
2040
  return this.reportError("W001"), null;
2041
2041
  let l = t.endToken;
2042
2042
  r = this.createExpressionNode(
2043
- G,
2043
+ z,
2044
2044
  {
2045
2045
  op: "&&",
2046
2046
  left: r,
@@ -2068,7 +2068,7 @@ class Fe {
2068
2068
  return this.reportError("W001"), null;
2069
2069
  let l = t.endToken;
2070
2070
  r = this.createExpressionNode(
2071
- G,
2071
+ z,
2072
2072
  {
2073
2073
  op: "|",
2074
2074
  left: r,
@@ -2096,7 +2096,7 @@ class Fe {
2096
2096
  return this.reportError("W001"), null;
2097
2097
  let l = t.endToken;
2098
2098
  r = this.createExpressionNode(
2099
- G,
2099
+ z,
2100
2100
  {
2101
2101
  op: "^",
2102
2102
  left: r,
@@ -2124,7 +2124,7 @@ class Fe {
2124
2124
  return this.reportError("W001"), null;
2125
2125
  let l = t.endToken;
2126
2126
  r = this.createExpressionNode(
2127
- G,
2127
+ z,
2128
2128
  {
2129
2129
  op: "&",
2130
2130
  left: r,
@@ -2158,7 +2158,7 @@ class Fe {
2158
2158
  return this.reportError("W001"), null;
2159
2159
  let a = l.endToken;
2160
2160
  r = this.createExpressionNode(
2161
- G,
2161
+ z,
2162
2162
  {
2163
2163
  op: t.text,
2164
2164
  left: r,
@@ -2193,7 +2193,7 @@ class Fe {
2193
2193
  return this.reportError("W001"), null;
2194
2194
  let a = l.endToken;
2195
2195
  r = this.createExpressionNode(
2196
- G,
2196
+ z,
2197
2197
  {
2198
2198
  op: t.text,
2199
2199
  left: r,
@@ -2226,7 +2226,7 @@ class Fe {
2226
2226
  return this.reportError("W001"), null;
2227
2227
  let a = l.endToken;
2228
2228
  r = this.createExpressionNode(
2229
- G,
2229
+ z,
2230
2230
  {
2231
2231
  op: t.text,
2232
2232
  left: r,
@@ -2255,7 +2255,7 @@ class Fe {
2255
2255
  return this.reportError("W001"), null;
2256
2256
  let a = l.endToken;
2257
2257
  r = this.createExpressionNode(
2258
- G,
2258
+ z,
2259
2259
  {
2260
2260
  op: t.text,
2261
2261
  left: r,
@@ -2284,7 +2284,7 @@ class Fe {
2284
2284
  return this.reportError("W001"), null;
2285
2285
  let a = l.endToken;
2286
2286
  r = this.createExpressionNode(
2287
- G,
2287
+ z,
2288
2288
  {
2289
2289
  op: t.text,
2290
2290
  left: r,
@@ -2314,7 +2314,7 @@ class Fe {
2314
2314
  let s = a.endToken;
2315
2315
  if (l === 0)
2316
2316
  r = this.createExpressionNode(
2317
- G,
2317
+ z,
2318
2318
  {
2319
2319
  op: t.text,
2320
2320
  left: r,
@@ -2326,12 +2326,12 @@ class Fe {
2326
2326
  else {
2327
2327
  const o = r;
2328
2328
  r = this.createExpressionNode(
2329
- G,
2329
+ z,
2330
2330
  {
2331
2331
  op: t.text,
2332
2332
  left: o.left,
2333
2333
  right: {
2334
- type: G,
2334
+ type: z,
2335
2335
  op: t.text,
2336
2336
  left: o.right,
2337
2337
  right: a
@@ -2353,11 +2353,11 @@ class Fe {
2353
2353
  */
2354
2354
  parseUnaryOrPrefixExpr() {
2355
2355
  const n = this._lexer.peek();
2356
- if (ue[n.type].canBeUnary) {
2356
+ if (he[n.type].canBeUnary) {
2357
2357
  this._lexer.get();
2358
2358
  const r = this.parseUnaryOrPrefixExpr();
2359
2359
  return r ? this.createExpressionNode(
2360
- Sn,
2360
+ wn,
2361
2361
  {
2362
2362
  op: n.text,
2363
2363
  expr: r
@@ -2370,7 +2370,7 @@ class Fe {
2370
2370
  this._lexer.get();
2371
2371
  const r = this.parseMemberOrInvocationExpr();
2372
2372
  return r ? this.createExpressionNode(
2373
- On,
2373
+ Rn,
2374
2374
  {
2375
2375
  op: n.text,
2376
2376
  expr: r
@@ -2400,19 +2400,19 @@ class Fe {
2400
2400
  switch (a.type) {
2401
2401
  case i.LParent: {
2402
2402
  this._lexer.get();
2403
- let T = [];
2403
+ let w = [];
2404
2404
  if (this._lexer.peek().type !== i.RParent) {
2405
2405
  const F = this.parseExpr();
2406
2406
  if (!F)
2407
2407
  return this.reportError("W001"), null;
2408
- T = F.type === le ? F.exprs : [F];
2408
+ w = F.type === ae ? F.exprs : [F];
2409
2409
  }
2410
2410
  const h = this._lexer.peek();
2411
2411
  this.expectToken(i.RParent, "W006"), r = this.createExpressionNode(
2412
- An,
2412
+ vn,
2413
2413
  {
2414
2414
  obj: r,
2415
- arguments: T
2415
+ arguments: w
2416
2416
  },
2417
2417
  n,
2418
2418
  h
@@ -2423,10 +2423,10 @@ class Fe {
2423
2423
  case i.OptionalChaining:
2424
2424
  this._lexer.get();
2425
2425
  const s = this._lexer.get();
2426
- if (!ue[s.type].keywordLike)
2426
+ if (!he[s.type].keywordLike)
2427
2427
  return this.reportError("W003"), null;
2428
2428
  r = this.createExpressionNode(
2429
- Ln,
2429
+ On,
2430
2430
  {
2431
2431
  obj: r,
2432
2432
  member: s.text,
@@ -2441,15 +2441,15 @@ class Fe {
2441
2441
  const c = this.getExpression();
2442
2442
  if (!c)
2443
2443
  return null;
2444
- const R = this._lexer.peek();
2444
+ const b = this._lexer.peek();
2445
2445
  this.expectToken(i.RSquare, "W005"), r = this.createExpressionNode(
2446
- wn,
2446
+ In,
2447
2447
  {
2448
2448
  obj: r,
2449
2449
  member: c
2450
2450
  },
2451
2451
  n,
2452
- R
2452
+ b
2453
2453
  );
2454
2454
  break;
2455
2455
  default:
@@ -2459,7 +2459,7 @@ class Fe {
2459
2459
  } while (!t);
2460
2460
  const l = this._lexer.peek();
2461
2461
  return l.type === i.IncOp || l.type === i.DecOp ? (this._lexer.get(), this.createExpressionNode(
2462
- In,
2462
+ Bn,
2463
2463
  {
2464
2464
  op: l.text,
2465
2465
  expr: r
@@ -2484,7 +2484,7 @@ class Fe {
2484
2484
  if (this._lexer.get(), this._lexer.peek().type === i.RParent) {
2485
2485
  const l = this._lexer.get();
2486
2486
  return this.createExpressionNode(
2487
- Ee,
2487
+ xe,
2488
2488
  {},
2489
2489
  n,
2490
2490
  l
@@ -2529,7 +2529,7 @@ class Fe {
2529
2529
  case i.False:
2530
2530
  case i.True:
2531
2531
  return this._lexer.get(), this.createExpressionNode(
2532
- Q,
2532
+ Y,
2533
2533
  {
2534
2534
  value: n.type === i.True
2535
2535
  },
@@ -2548,7 +2548,7 @@ class Fe {
2548
2548
  return this._lexer.get(), this.parseStringLiteral(n);
2549
2549
  case i.Infinity:
2550
2550
  return this._lexer.get(), this.createExpressionNode(
2551
- Q,
2551
+ Y,
2552
2552
  {
2553
2553
  value: 1 / 0
2554
2554
  },
@@ -2557,7 +2557,7 @@ class Fe {
2557
2557
  );
2558
2558
  case i.NaN:
2559
2559
  return this._lexer.get(), this.createExpressionNode(
2560
- Q,
2560
+ Y,
2561
2561
  {
2562
2562
  value: NaN
2563
2563
  },
@@ -2566,7 +2566,7 @@ class Fe {
2566
2566
  );
2567
2567
  case i.Null:
2568
2568
  return this._lexer.get(), this.createExpressionNode(
2569
- Q,
2569
+ Y,
2570
2570
  {
2571
2571
  value: null
2572
2572
  },
@@ -2575,7 +2575,7 @@ class Fe {
2575
2575
  );
2576
2576
  case i.Undefined:
2577
2577
  return this._lexer.get(), this.createExpressionNode(
2578
- Q,
2578
+ Y,
2579
2579
  {
2580
2580
  value: void 0
2581
2581
  },
@@ -2616,7 +2616,7 @@ class Fe {
2616
2616
  }
2617
2617
  const t = this._lexer.get();
2618
2618
  return this.createExpressionNode(
2619
- Tn,
2619
+ bn,
2620
2620
  { segments: r },
2621
2621
  n,
2622
2622
  t
@@ -2630,11 +2630,11 @@ class Fe {
2630
2630
  let r = [];
2631
2631
  if (this._lexer.peek().type !== i.RSquare) {
2632
2632
  const l = this.getExpression();
2633
- l && (r = l.type === le ? l.exprs : [l]);
2633
+ l && (r = l.type === ae ? l.exprs : [l]);
2634
2634
  }
2635
2635
  const t = this._lexer.peek();
2636
2636
  return this.expectToken(i.RSquare), this.createExpressionNode(
2637
- se,
2637
+ oe,
2638
2638
  {
2639
2639
  items: r
2640
2640
  },
@@ -2650,14 +2650,14 @@ class Fe {
2650
2650
  let r = [];
2651
2651
  if (this._lexer.peek().type !== i.RBrace)
2652
2652
  for (; this._lexer.peek().type !== i.RBrace; ) {
2653
- const l = this._lexer.peek(), a = ue[l.type];
2653
+ const l = this._lexer.peek(), a = he[l.type];
2654
2654
  let s;
2655
2655
  if (a.expressionStart)
2656
2656
  if (l.type === i.LSquare) {
2657
2657
  if (this._lexer.get(), s = this.getExpression(), !s)
2658
2658
  return null;
2659
2659
  this.expectToken(i.RSquare, "W005"), s = this.createExpressionNode(
2660
- le,
2660
+ ae,
2661
2661
  {
2662
2662
  exprs: [s]
2663
2663
  },
@@ -2666,14 +2666,14 @@ class Fe {
2666
2666
  } else if (a.isPropLiteral) {
2667
2667
  if (s = this.getExpression(!1), !s)
2668
2668
  return null;
2669
- if (s.type !== M && s.type !== Q && s.type !== oe)
2669
+ if (s.type !== M && s.type !== Y && s.type !== ue)
2670
2670
  return this.reportError("W007"), null;
2671
2671
  } else
2672
2672
  return this.reportError("W007"), null;
2673
2673
  else if (a.keywordLike)
2674
2674
  s = {
2675
2675
  type: M,
2676
- nodeId: Le(),
2676
+ nodeId: ve(),
2677
2677
  name: l.text,
2678
2678
  startToken: l,
2679
2679
  endToken: l
@@ -2681,22 +2681,22 @@ class Fe {
2681
2681
  else
2682
2682
  return this.reportError("W001"), null;
2683
2683
  const o = s.type;
2684
- if (o === oe)
2684
+ if (o === ue)
2685
2685
  r.push(s);
2686
2686
  else {
2687
- if (o === Q) {
2688
- const T = s.value;
2689
- if (typeof T != "number" && typeof T != "string")
2687
+ if (o === Y) {
2688
+ const w = s.value;
2689
+ if (typeof w != "number" && typeof w != "string")
2690
2690
  return this.expectToken(i.RBrace, "W007"), null;
2691
2691
  }
2692
- let R = null;
2692
+ let b = null;
2693
2693
  if (o === M) {
2694
- const T = this._lexer.peek();
2695
- (T.type === i.Comma || T.type === i.RBrace) && (R = { ...s });
2694
+ const w = this._lexer.peek();
2695
+ (w.type === i.Comma || w.type === i.RBrace) && (b = { ...s });
2696
2696
  }
2697
- if (!R && (this.expectToken(i.Colon, "W008"), R = this.getExpression(!1), !R))
2697
+ if (!b && (this.expectToken(i.Colon, "W008"), b = this.getExpression(!1), !b))
2698
2698
  return null;
2699
- r.push([s, R]);
2699
+ r.push([s, b]);
2700
2700
  }
2701
2701
  const c = this._lexer.peek().type;
2702
2702
  if (c === i.Comma)
@@ -2706,7 +2706,7 @@ class Fe {
2706
2706
  }
2707
2707
  const t = this._lexer.peek();
2708
2708
  return this.expectToken(i.RBrace, "W004"), this.createExpressionNode(
2709
- ae,
2709
+ ce,
2710
2710
  {
2711
2711
  props: r
2712
2712
  },
@@ -2717,7 +2717,7 @@ class Fe {
2717
2717
  parseRegExpLiteral() {
2718
2718
  const n = this._lexer.peek(), r = this._lexer.getRegEx();
2719
2719
  return r.success ? this.createExpressionNode(
2720
- Q,
2720
+ Y,
2721
2721
  {
2722
2722
  value: new RegExp(r.pattern, r.flags)
2723
2723
  },
@@ -2770,7 +2770,7 @@ class Fe {
2770
2770
  * @param options Error message options
2771
2771
  */
2772
2772
  reportError(n, r, ...t) {
2773
- let l = Ie[n] ?? "Unkonwn error";
2773
+ let l = Re[n] ?? "Unkonwn error";
2774
2774
  throw t && t.forEach(
2775
2775
  (s, o) => l = a(l, `{${o}}`, t[o].toString())
2776
2776
  ), r || (r = this._lexer.peek()), this._parseErrors.push({
@@ -2778,7 +2778,7 @@ class Fe {
2778
2778
  text: l,
2779
2779
  line: r.startLine,
2780
2780
  column: r.startColumn
2781
- }), new yn(l, n);
2781
+ }), new qn(l, n);
2782
2782
  function a(s, o, c) {
2783
2783
  do
2784
2784
  s = s.replace(o, c);
@@ -2812,7 +2812,7 @@ class Fe {
2812
2812
  createExpressionNode(n, r = {}, t, l) {
2813
2813
  return l || (l = this._lexer.peek()), t || (t = l), Object.assign({}, r, {
2814
2814
  type: n,
2815
- nodeId: Le(),
2815
+ nodeId: ve(),
2816
2816
  startToken: t,
2817
2817
  endToken: l
2818
2818
  });
@@ -2827,7 +2827,7 @@ class Fe {
2827
2827
  createStatementNode(n, r, t, l) {
2828
2828
  return Object.assign({}, r, {
2829
2829
  type: n,
2830
- nodeId: Le(),
2830
+ nodeId: ve(),
2831
2831
  startToken: t,
2832
2832
  endToken: l
2833
2833
  });
@@ -2840,7 +2840,7 @@ class Fe {
2840
2840
  let r;
2841
2841
  const t = BigInt(n.text.replace(/[_']/g, ""));
2842
2842
  return t < Number.MIN_SAFE_INTEGER || t > Number.MAX_SAFE_INTEGER ? r = t : r = parseInt(n.text.substring(2).replace(/[_']/g, ""), 2), this.createExpressionNode(
2843
- Q,
2843
+ Y,
2844
2844
  {
2845
2845
  value: r
2846
2846
  },
@@ -2856,7 +2856,7 @@ class Fe {
2856
2856
  let r;
2857
2857
  const t = BigInt(n.text.replace(/[_']/g, ""));
2858
2858
  return t < Number.MIN_SAFE_INTEGER || t > Number.MAX_SAFE_INTEGER ? r = t : r = parseInt(n.text.replace(/[_']/g, ""), 10), this.createExpressionNode(
2859
- Q,
2859
+ Y,
2860
2860
  {
2861
2861
  value: r
2862
2862
  },
@@ -2872,7 +2872,7 @@ class Fe {
2872
2872
  let r;
2873
2873
  const t = BigInt(n.text.replace(/[_']/g, ""));
2874
2874
  return t < Number.MIN_SAFE_INTEGER || t > Number.MAX_SAFE_INTEGER ? r = t : r = parseInt(n.text.substring(2).replace(/[_']/g, ""), 16), this.createExpressionNode(
2875
- Q,
2875
+ Y,
2876
2876
  {
2877
2877
  value: r
2878
2878
  },
@@ -2887,7 +2887,7 @@ class Fe {
2887
2887
  parseRealLiteral(n) {
2888
2888
  let r = parseFloat(n.text.replace(/[_']/g, ""));
2889
2889
  return this.createExpressionNode(
2890
- Q,
2890
+ Y,
2891
2891
  {
2892
2892
  value: r
2893
2893
  },
@@ -3011,7 +3011,7 @@ class Fe {
3011
3011
  break;
3012
3012
  }
3013
3013
  return this.createExpressionNode(
3014
- Q,
3014
+ Y,
3015
3015
  {
3016
3016
  value: l
3017
3017
  },
@@ -3024,8 +3024,8 @@ class Fe {
3024
3024
  }
3025
3025
  convertToArrayDestructure(n) {
3026
3026
  var l;
3027
- const r = n.type === le ? n.exprs : n.items, t = this.createExpressionNode(
3028
- Oe,
3027
+ const r = n.type === ae ? n.exprs : n.items, t = this.createExpressionNode(
3028
+ De,
3029
3029
  { aDestr: [] },
3030
3030
  n.startToken,
3031
3031
  n.endToken
@@ -3033,9 +3033,9 @@ class Fe {
3033
3033
  for (const a of r) {
3034
3034
  let s;
3035
3035
  switch (a.type) {
3036
- case Ee:
3036
+ case xe:
3037
3037
  s = this.createExpressionNode(
3038
- ee,
3038
+ ne,
3039
3039
  {},
3040
3040
  a.startToken,
3041
3041
  a.endToken
@@ -3043,22 +3043,22 @@ class Fe {
3043
3043
  break;
3044
3044
  case M:
3045
3045
  s = this.createExpressionNode(
3046
- ee,
3046
+ ne,
3047
3047
  { id: a.name },
3048
3048
  a.startToken,
3049
3049
  a.endToken
3050
3050
  );
3051
3051
  break;
3052
- case Oe:
3052
+ case De:
3053
3053
  t.aDestr.push(...a.aDestr);
3054
3054
  break;
3055
- case ee:
3055
+ case ne:
3056
3056
  s = a;
3057
3057
  break;
3058
- case se: {
3058
+ case oe: {
3059
3059
  const o = this.convertToArrayDestructure(a);
3060
3060
  o && (s = this.createExpressionNode(
3061
- ee,
3061
+ ne,
3062
3062
  {
3063
3063
  aDestr: o.aDestr
3064
3064
  },
@@ -3067,9 +3067,9 @@ class Fe {
3067
3067
  ));
3068
3068
  break;
3069
3069
  }
3070
- case te:
3070
+ case ie:
3071
3071
  s = this.createExpressionNode(
3072
- ee,
3072
+ ne,
3073
3073
  {
3074
3074
  oDestr: a
3075
3075
  },
@@ -3077,10 +3077,10 @@ class Fe {
3077
3077
  a.endToken
3078
3078
  );
3079
3079
  break;
3080
- case ae: {
3080
+ case ce: {
3081
3081
  const o = this.convertToObjectDestructure(a);
3082
3082
  o && (s = this.createExpressionNode(
3083
- ee,
3083
+ ne,
3084
3084
  {
3085
3085
  oDestr: o.oDestr
3086
3086
  },
@@ -3099,7 +3099,7 @@ class Fe {
3099
3099
  convertToObjectDestructure(n) {
3100
3100
  var t;
3101
3101
  const r = this.createExpressionNode(
3102
- Oe,
3102
+ De,
3103
3103
  { oDestr: [] },
3104
3104
  n.startToken,
3105
3105
  n.endToken
@@ -3113,12 +3113,12 @@ class Fe {
3113
3113
  switch (s.type) {
3114
3114
  case M:
3115
3115
  s.name === a.name ? o = this.createExpressionNode(
3116
- te,
3116
+ ie,
3117
3117
  { id: a.name },
3118
3118
  s.startToken,
3119
3119
  s.endToken
3120
3120
  ) : o = this.createExpressionNode(
3121
- te,
3121
+ ie,
3122
3122
  {
3123
3123
  id: a.name,
3124
3124
  alias: s.name
@@ -3127,9 +3127,9 @@ class Fe {
3127
3127
  s.endToken
3128
3128
  );
3129
3129
  break;
3130
- case ee: {
3130
+ case ne: {
3131
3131
  o = this.createExpressionNode(
3132
- te,
3132
+ ie,
3133
3133
  {
3134
3134
  id: a.name,
3135
3135
  aDestr: s
@@ -3139,10 +3139,10 @@ class Fe {
3139
3139
  );
3140
3140
  break;
3141
3141
  }
3142
- case se: {
3142
+ case oe: {
3143
3143
  const c = this.convertToArrayDestructure(s);
3144
3144
  c && (o = this.createExpressionNode(
3145
- te,
3145
+ ie,
3146
3146
  {
3147
3147
  id: a.name,
3148
3148
  aDestr: c.aDestr
@@ -3152,13 +3152,13 @@ class Fe {
3152
3152
  ));
3153
3153
  break;
3154
3154
  }
3155
- case te:
3155
+ case ie:
3156
3156
  o = s;
3157
3157
  break;
3158
- case ae: {
3158
+ case ce: {
3159
3159
  const c = this.convertToObjectDestructure(s);
3160
3160
  c && (o = this.createExpressionNode(
3161
- te,
3161
+ ie,
3162
3162
  {
3163
3163
  id: a.name,
3164
3164
  oDestr: c.oDestr
@@ -3180,75 +3180,79 @@ class Fe {
3180
3180
  */
3181
3181
  isExpressionStart(n) {
3182
3182
  var r;
3183
- return ((r = ue[n.type]) == null ? void 0 : r.expressionStart) ?? !1;
3183
+ return ((r = he[n.type]) == null ? void 0 : r.expressionStart) ?? !1;
3184
3184
  }
3185
3185
  }
3186
- var p = /* @__PURE__ */ ((e) => (e[e.EOF = -1] = "EOF", e[e.nullCharacter = 0] = "nullCharacter", e[e.maxAsciiCharacter = 127] = "maxAsciiCharacter", e[e.lineFeed = 10] = "lineFeed", e[e.carriageReturn = 13] = "carriageReturn", e[e.lineSeparator = 8232] = "lineSeparator", e[e.paragraphSeparator = 8233] = "paragraphSeparator", e[e.nextLine = 133] = "nextLine", e[e.space = 32] = "space", e[e.nonBreakingSpace = 160] = "nonBreakingSpace", e[e.enQuad = 8192] = "enQuad", e[e.emQuad = 8193] = "emQuad", e[e.enSpace = 8194] = "enSpace", e[e.emSpace = 8195] = "emSpace", e[e.threePerEmSpace = 8196] = "threePerEmSpace", e[e.fourPerEmSpace = 8197] = "fourPerEmSpace", e[e.sixPerEmSpace = 8198] = "sixPerEmSpace", e[e.figureSpace = 8199] = "figureSpace", e[e.punctuationSpace = 8200] = "punctuationSpace", e[e.thinSpace = 8201] = "thinSpace", e[e.hairSpace = 8202] = "hairSpace", e[e.zeroWidthSpace = 8203] = "zeroWidthSpace", e[e.narrowNoBreakSpace = 8239] = "narrowNoBreakSpace", e[e.ideographicSpace = 12288] = "ideographicSpace", e[e.mathematicalSpace = 8287] = "mathematicalSpace", e[e.ogham = 5760] = "ogham", e[e.replacementCharacter = 65533] = "replacementCharacter", e[e._ = 95] = "_", e[e.$ = 36] = "$", e[e._0 = 48] = "_0", e[e._1 = 49] = "_1", e[e._2 = 50] = "_2", e[e._3 = 51] = "_3", e[e._4 = 52] = "_4", e[e._5 = 53] = "_5", e[e._6 = 54] = "_6", e[e._7 = 55] = "_7", e[e._8 = 56] = "_8", e[e._9 = 57] = "_9", e[e.a = 97] = "a", e[e.b = 98] = "b", e[e.c = 99] = "c", e[e.d = 100] = "d", e[e.e = 101] = "e", e[e.f = 102] = "f", e[e.g = 103] = "g", e[e.h = 104] = "h", e[e.i = 105] = "i", e[e.j = 106] = "j", e[e.k = 107] = "k", e[e.l = 108] = "l", e[e.m = 109] = "m", e[e.n = 110] = "n", e[e.o = 111] = "o", e[e.p = 112] = "p", e[e.q = 113] = "q", e[e.r = 114] = "r", e[e.s = 115] = "s", e[e.t = 116] = "t", e[e.u = 117] = "u", e[e.v = 118] = "v", e[e.w = 119] = "w", e[e.x = 120] = "x", e[e.y = 121] = "y", e[e.z = 122] = "z", e[e.A = 65] = "A", e[e.B = 66] = "B", e[e.C = 67] = "C", e[e.D = 68] = "D", e[e.E = 69] = "E", e[e.F = 70] = "F", e[e.G = 71] = "G", e[e.H = 72] = "H", e[e.I = 73] = "I", e[e.J = 74] = "J", e[e.K = 75] = "K", e[e.L = 76] = "L", e[e.M = 77] = "M", e[e.N = 78] = "N", e[e.O = 79] = "O", e[e.P = 80] = "P", e[e.Q = 81] = "Q", e[e.R = 82] = "R", e[e.S = 83] = "S", e[e.T = 84] = "T", e[e.U = 85] = "U", e[e.V = 86] = "V", e[e.W = 87] = "W", e[e.X = 88] = "X", e[e.Y = 89] = "Y", e[e.Z = 90] = "Z", e[e.ampersand = 38] = "ampersand", e[e.asterisk = 42] = "asterisk", e[e.at = 64] = "at", e[e.backslash = 92] = "backslash", e[e.backtick = 96] = "backtick", e[e.bar = 124] = "bar", e[e.caret = 94] = "caret", e[e.closeBrace = 125] = "closeBrace", e[e.closeBracket = 93] = "closeBracket", e[e.closeParen = 41] = "closeParen", e[e.colon = 58] = "colon", e[e.comma = 44] = "comma", e[e.dot = 46] = "dot", e[e.doubleQuote = 34] = "doubleQuote", e[e.equals = 61] = "equals", e[e.exclamation = 33] = "exclamation", e[e.greaterThan = 62] = "greaterThan", e[e.hash = 35] = "hash", e[e.lessThan = 60] = "lessThan", e[e.minus = 45] = "minus", e[e.openBrace = 123] = "openBrace", e[e.openBracket = 91] = "openBracket", e[e.openParen = 40] = "openParen", e[e.percent = 37] = "percent", e[e.plus = 43] = "plus", e[e.question = 63] = "question", e[e.semicolon = 59] = "semicolon", e[e.singleQuote = 39] = "singleQuote", e[e.slash = 47] = "slash", e[e.tilde = 126] = "tilde", e[e.backspace = 8] = "backspace", e[e.formFeed = 12] = "formFeed", e[e.byteOrderMark = 65279] = "byteOrderMark", e[e.tab = 9] = "tab", e[e.verticalTab = 11] = "verticalTab", e))(p || {}), xe = /* @__PURE__ */ ((e) => (e[e.Error = 1] = "Error", e[e.Warning = 2] = "Warning", e[e.Information = 3] = "Information", e[e.Hint = 4] = "Hint", e))(xe || {}), fe = /* @__PURE__ */ ((e) => (e.onlyOneElem = "U002", e.expTagOpen = "U003", e.expTagIdent = "U004", e.expCloseStart = "U005", e.expEndOrClose = "U006", e.tagNameMismatch = "U007", e.expEnd = "U008", e.expAttrIdent = "U009", e.expEq = "U010", e.expAttrValue = "U011", e.duplAttr = "U012", e.uppercaseAttr = "U013", e.invalidChar = "W001", e.untermStr = "W002", e.untermComment = "W007", e.untermCData = "W008", e.untermScript = "W009", e))(fe || {});
3187
- function Nr(e, n = !0) {
3188
- const r = xe[e.category];
3186
+ var d = /* @__PURE__ */ ((e) => (e[e.EOF = -1] = "EOF", e[e.nullCharacter = 0] = "nullCharacter", e[e.maxAsciiCharacter = 127] = "maxAsciiCharacter", e[e.lineFeed = 10] = "lineFeed", e[e.carriageReturn = 13] = "carriageReturn", e[e.lineSeparator = 8232] = "lineSeparator", e[e.paragraphSeparator = 8233] = "paragraphSeparator", e[e.nextLine = 133] = "nextLine", e[e.space = 32] = "space", e[e.nonBreakingSpace = 160] = "nonBreakingSpace", e[e.enQuad = 8192] = "enQuad", e[e.emQuad = 8193] = "emQuad", e[e.enSpace = 8194] = "enSpace", e[e.emSpace = 8195] = "emSpace", e[e.threePerEmSpace = 8196] = "threePerEmSpace", e[e.fourPerEmSpace = 8197] = "fourPerEmSpace", e[e.sixPerEmSpace = 8198] = "sixPerEmSpace", e[e.figureSpace = 8199] = "figureSpace", e[e.punctuationSpace = 8200] = "punctuationSpace", e[e.thinSpace = 8201] = "thinSpace", e[e.hairSpace = 8202] = "hairSpace", e[e.zeroWidthSpace = 8203] = "zeroWidthSpace", e[e.narrowNoBreakSpace = 8239] = "narrowNoBreakSpace", e[e.ideographicSpace = 12288] = "ideographicSpace", e[e.mathematicalSpace = 8287] = "mathematicalSpace", e[e.ogham = 5760] = "ogham", e[e.replacementCharacter = 65533] = "replacementCharacter", e[e._ = 95] = "_", e[e.$ = 36] = "$", e[e._0 = 48] = "_0", e[e._1 = 49] = "_1", e[e._2 = 50] = "_2", e[e._3 = 51] = "_3", e[e._4 = 52] = "_4", e[e._5 = 53] = "_5", e[e._6 = 54] = "_6", e[e._7 = 55] = "_7", e[e._8 = 56] = "_8", e[e._9 = 57] = "_9", e[e.a = 97] = "a", e[e.b = 98] = "b", e[e.c = 99] = "c", e[e.d = 100] = "d", e[e.e = 101] = "e", e[e.f = 102] = "f", e[e.g = 103] = "g", e[e.h = 104] = "h", e[e.i = 105] = "i", e[e.j = 106] = "j", e[e.k = 107] = "k", e[e.l = 108] = "l", e[e.m = 109] = "m", e[e.n = 110] = "n", e[e.o = 111] = "o", e[e.p = 112] = "p", e[e.q = 113] = "q", e[e.r = 114] = "r", e[e.s = 115] = "s", e[e.t = 116] = "t", e[e.u = 117] = "u", e[e.v = 118] = "v", e[e.w = 119] = "w", e[e.x = 120] = "x", e[e.y = 121] = "y", e[e.z = 122] = "z", e[e.A = 65] = "A", e[e.B = 66] = "B", e[e.C = 67] = "C", e[e.D = 68] = "D", e[e.E = 69] = "E", e[e.F = 70] = "F", e[e.G = 71] = "G", e[e.H = 72] = "H", e[e.I = 73] = "I", e[e.J = 74] = "J", e[e.K = 75] = "K", e[e.L = 76] = "L", e[e.M = 77] = "M", e[e.N = 78] = "N", e[e.O = 79] = "O", e[e.P = 80] = "P", e[e.Q = 81] = "Q", e[e.R = 82] = "R", e[e.S = 83] = "S", e[e.T = 84] = "T", e[e.U = 85] = "U", e[e.V = 86] = "V", e[e.W = 87] = "W", e[e.X = 88] = "X", e[e.Y = 89] = "Y", e[e.Z = 90] = "Z", e[e.ampersand = 38] = "ampersand", e[e.asterisk = 42] = "asterisk", e[e.at = 64] = "at", e[e.backslash = 92] = "backslash", e[e.backtick = 96] = "backtick", e[e.bar = 124] = "bar", e[e.caret = 94] = "caret", e[e.closeBrace = 125] = "closeBrace", e[e.closeBracket = 93] = "closeBracket", e[e.closeParen = 41] = "closeParen", e[e.colon = 58] = "colon", e[e.comma = 44] = "comma", e[e.dot = 46] = "dot", e[e.doubleQuote = 34] = "doubleQuote", e[e.equals = 61] = "equals", e[e.exclamation = 33] = "exclamation", e[e.greaterThan = 62] = "greaterThan", e[e.hash = 35] = "hash", e[e.lessThan = 60] = "lessThan", e[e.minus = 45] = "minus", e[e.openBrace = 123] = "openBrace", e[e.openBracket = 91] = "openBracket", e[e.openParen = 40] = "openParen", e[e.percent = 37] = "percent", e[e.plus = 43] = "plus", e[e.question = 63] = "question", e[e.semicolon = 59] = "semicolon", e[e.singleQuote = 39] = "singleQuote", e[e.slash = 47] = "slash", e[e.tilde = 126] = "tilde", e[e.backspace = 8] = "backspace", e[e.formFeed = 12] = "formFeed", e[e.byteOrderMark = 65279] = "byteOrderMark", e[e.tab = 9] = "tab", e[e.verticalTab = 11] = "verticalTab", e))(d || {}), _e = /* @__PURE__ */ ((e) => (e[e.Error = 1] = "Error", e[e.Warning = 2] = "Warning", e[e.Information = 3] = "Information", e[e.Hint = 4] = "Hint", e))(_e || {}), de = /* @__PURE__ */ ((e) => (e.onlyOneElem = "U002", e.expTagOpen = "U003", e.expTagName = "U004", e.expCloseStart = "U005", e.expEndOrClose = "U006", e.tagNameMismatch = "U007", e.expEnd = "U008", e.expAttrIdent = "U009", e.expEq = "U010", e.expAttrValue = "U011", e.duplAttr = "U012", e.uppercaseAttr = "U013", e.tagNameExpAfterNamespace = "U014", e.invalidChar = "W001", e.untermStr = "W002", e.untermComment = "W007", e.untermCData = "W008", e.untermScript = "W009", e))(de || {});
3187
+ function wr(e, n = !0) {
3188
+ const r = _e[e.category];
3189
3189
  return n ? r.toLowerCase() : r;
3190
3190
  }
3191
- const Be = {
3191
+ const ye = {
3192
3192
  code: "W001",
3193
3193
  category: 1,
3194
3194
  message: "Invalid character."
3195
- }, Fn = {
3195
+ }, Xn = {
3196
3196
  code: "W002",
3197
3197
  category: 1,
3198
3198
  message: "Unterminated string literal."
3199
- }, Mn = {
3199
+ }, Gn = {
3200
3200
  code: "W007",
3201
3201
  category: 1,
3202
3202
  message: "Unterminated comment"
3203
- }, qn = {
3203
+ }, zn = {
3204
3204
  code: "W008",
3205
3205
  category: 1,
3206
3206
  message: "Unterminated CDATA section"
3207
- }, $n = {
3207
+ }, Qn = {
3208
3208
  code: "W009",
3209
3209
  category: 1,
3210
3210
  message: "Unterminated script section"
3211
- }, Xn = {
3211
+ }, Hn = {
3212
3212
  category: 1,
3213
3213
  code: "U008",
3214
3214
  message: "A '>' token expected."
3215
- }, Gn = {
3215
+ }, Yn = {
3216
3216
  category: 1,
3217
3217
  code: "U005",
3218
3218
  message: "A '</' token expected."
3219
- }, Ke = {
3219
+ }, Ue = {
3220
3220
  category: 1,
3221
3221
  code: "U004",
3222
- message: "A tag identifier expected."
3223
- }, zn = {
3222
+ message: "A tag name expected."
3223
+ }, Zn = {
3224
3224
  category: 1,
3225
3225
  code: "U011",
3226
3226
  message: "An attribute value expected."
3227
- }, Ar = {
3227
+ }, Tr = {
3228
3228
  category: 1,
3229
3229
  code: "U010",
3230
3230
  message: "An '=' token expected."
3231
- }, Qn = {
3231
+ }, Jn = {
3232
3232
  category: 1,
3233
3233
  code: "U003",
3234
3234
  message: "A '<' token expected."
3235
- }, Hn = {
3235
+ }, Fe = {
3236
3236
  category: 1,
3237
3237
  code: "U006",
3238
3238
  message: "A '>' or '/>' token expected."
3239
- }, je = {
3239
+ }, nn = {
3240
3240
  category: 1,
3241
3241
  code: "U009",
3242
3242
  message: "An attribute identifier expected."
3243
+ }, vr = {
3244
+ category: 1,
3245
+ code: "U014",
3246
+ message: "A tag name expected after a namespaces."
3243
3247
  };
3244
3248
  var u = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.EndOfFileToken = 1] = "EndOfFileToken", e[e.CommentTrivia = 2] = "CommentTrivia", e[e.NewLineTrivia = 3] = "NewLineTrivia", e[e.WhitespaceTrivia = 4] = "WhitespaceTrivia", e[e.Identifier = 5] = "Identifier", e[e.OpenNodeStart = 6] = "OpenNodeStart", e[e.CloseNodeStart = 7] = "CloseNodeStart", e[e.NodeEnd = 8] = "NodeEnd", e[e.NodeClose = 9] = "NodeClose", e[e.Colon = 10] = "Colon", e[e.Equal = 11] = "Equal", e[e.StringLiteral = 12] = "StringLiteral", e[e.CData = 13] = "CData", e[e.Script = 14] = "Script", e[e.TextNode = 15] = "TextNode", e[e.AmpersandEntity = 16] = "AmpersandEntity", e[e.LessThanEntity = 17] = "LessThanEntity", e[e.GreaterThanEntity = 18] = "GreaterThanEntity", e[e.SingleQuoteEntity = 19] = "SingleQuoteEntity", e[e.DoubleQuoteEntity = 20] = "DoubleQuoteEntity", e[e.ElementNode = 21] = "ElementNode", e[e.AttributeNode = 22] = "AttributeNode", e[e.AttributeKeyNode = 23] = "AttributeKeyNode", e[e.ContentListNode = 24] = "ContentListNode", e[e.AttributeListNode = 25] = "AttributeListNode", e[e.TagNameNode = 26] = "TagNameNode", e[e.ErrorNode = 27] = "ErrorNode", e))(u || {});
3245
- function Yn(e) {
3249
+ function Kn(e) {
3246
3250
  return e >= 2 && e <= 4;
3247
3251
  }
3248
- function Zn(e) {
3252
+ function Cn(e) {
3249
3253
  return e >= 21 && e <= 27;
3250
3254
  }
3251
- function Me(e) {
3255
+ function ze(e) {
3252
3256
  switch (e) {
3253
3257
  case 0:
3254
3258
  return "Unknown";
@@ -3307,252 +3311,252 @@ function Me(e) {
3307
3311
  case 23:
3308
3312
  return "AttributeKeyNode";
3309
3313
  }
3310
- return Jn();
3314
+ return jn();
3311
3315
  }
3312
- function Jn(e) {
3316
+ function jn(e) {
3313
3317
  throw new Error("Didn't expect to get here");
3314
3318
  }
3315
- function Kn(e, n, r, t, l) {
3316
- let a = n ?? "", s, o, c, R, T, h;
3317
- return Y(a, t, l), {
3319
+ function Vn(e, n, r, t, l) {
3320
+ let a = n ?? "", s, o, c, b, w, h;
3321
+ return C(a, t, l), {
3318
3322
  getStartPos: () => c,
3319
3323
  getTokenEnd: () => s,
3320
- getToken: () => T,
3321
- getTokenStart: () => R,
3322
- getTokenText: () => a.substring(R, s),
3324
+ getToken: () => w,
3325
+ getTokenStart: () => b,
3326
+ getTokenText: () => a.substring(b, s),
3323
3327
  getTokenValue: () => h,
3324
- isIdentifier: () => T === u.Identifier,
3328
+ isIdentifier: () => w === u.Identifier,
3325
3329
  peekChar: F,
3326
3330
  scanChar: x,
3327
- scan: H,
3328
- scanTrivia: v,
3331
+ scan: Q,
3332
+ scanTrivia: T,
3329
3333
  scanText: _,
3330
- getText: $,
3331
- setText: Y,
3332
- setOnError: Z,
3334
+ getText: G,
3335
+ setText: C,
3336
+ setOnError: fe,
3333
3337
  resetTokenState: X,
3334
- back: C
3338
+ back: pe
3335
3339
  };
3336
3340
  function F(g) {
3337
3341
  if (s + (g ?? 0) >= o)
3338
3342
  return null;
3339
- const d = U(s + (g ?? 0));
3340
- return isNaN(d) ? null : d;
3343
+ const p = q(s + (g ?? 0));
3344
+ return isNaN(p) ? null : p;
3341
3345
  }
3342
3346
  function x() {
3343
3347
  if (s >= o)
3344
3348
  return null;
3345
- const g = U(s);
3346
- return s += ne(g), g;
3349
+ const g = q(s);
3350
+ return s += re(g), g;
3347
3351
  }
3348
- function H() {
3352
+ function Q() {
3349
3353
  for (c = s; ; ) {
3350
- if (R = s, s >= o)
3351
- return T = u.EndOfFileToken;
3352
- const g = U(s);
3354
+ if (b = s, s >= o)
3355
+ return w = u.EndOfFileToken;
3356
+ const g = q(s);
3353
3357
  switch (g) {
3354
- case p.lineFeed:
3355
- case p.carriageReturn:
3358
+ case d.lineFeed:
3359
+ case d.carriageReturn:
3356
3360
  if (e) {
3357
3361
  s++;
3358
3362
  continue;
3359
3363
  } else
3360
- return g === p.carriageReturn && s + 1 < o && m(s + 1) === p.lineFeed ? s += 2 : s++, T = u.NewLineTrivia;
3361
- case p.tab:
3362
- case p.verticalTab:
3363
- case p.formFeed:
3364
- case p.space:
3365
- case p.nonBreakingSpace:
3366
- case p.ogham:
3367
- case p.enQuad:
3368
- case p.emQuad:
3369
- case p.enSpace:
3370
- case p.emSpace:
3371
- case p.threePerEmSpace:
3372
- case p.fourPerEmSpace:
3373
- case p.sixPerEmSpace:
3374
- case p.figureSpace:
3375
- case p.punctuationSpace:
3376
- case p.thinSpace:
3377
- case p.hairSpace:
3378
- case p.zeroWidthSpace:
3379
- case p.narrowNoBreakSpace:
3380
- case p.mathematicalSpace:
3381
- case p.ideographicSpace:
3382
- case p.byteOrderMark:
3364
+ return g === d.carriageReturn && s + 1 < o && S(s + 1) === d.lineFeed ? s += 2 : s++, w = u.NewLineTrivia;
3365
+ case d.tab:
3366
+ case d.verticalTab:
3367
+ case d.formFeed:
3368
+ case d.space:
3369
+ case d.nonBreakingSpace:
3370
+ case d.ogham:
3371
+ case d.enQuad:
3372
+ case d.emQuad:
3373
+ case d.enSpace:
3374
+ case d.emSpace:
3375
+ case d.threePerEmSpace:
3376
+ case d.fourPerEmSpace:
3377
+ case d.sixPerEmSpace:
3378
+ case d.figureSpace:
3379
+ case d.punctuationSpace:
3380
+ case d.thinSpace:
3381
+ case d.hairSpace:
3382
+ case d.zeroWidthSpace:
3383
+ case d.narrowNoBreakSpace:
3384
+ case d.mathematicalSpace:
3385
+ case d.ideographicSpace:
3386
+ case d.byteOrderMark:
3383
3387
  if (e) {
3384
3388
  s++;
3385
3389
  continue;
3386
3390
  } else {
3387
- for (; s < o && Ce(m(s)); )
3391
+ for (; s < o && rn(S(s)); )
3388
3392
  s++;
3389
- return T = u.WhitespaceTrivia;
3393
+ return w = u.WhitespaceTrivia;
3390
3394
  }
3391
- case p.doubleQuote:
3392
- case p.singleQuote:
3393
- case p.backtick:
3394
- return h = k(), T = u.StringLiteral;
3395
- case p.ampersand:
3396
- return m(s + 1) === p.a && m(s + 2) === p.m && m(s + 3) === p.p && m(s + 4) === p.semicolon ? (s += 5, T = u.AmpersandEntity) : m(s + 1) === p.l && m(s + 2) === p.t && m(s + 3) === p.semicolon ? (s += 4, T = u.LessThanEntity) : m(s + 1) === p.g && m(s + 2) === p.t && m(s + 3) === p.semicolon ? (s += 4, T = u.GreaterThanEntity) : m(s + 1) === p.q && m(s + 2) === p.u && m(s + 3) === p.o && m(s + 4) === p.t && m(s + 5) === p.semicolon ? (s += 6, T = u.DoubleQuoteEntity) : m(s + 1) === p.a && m(s + 2) === p.p && m(s + 3) === p.o && m(s + 4) === p.s && m(s + 5) === p.semicolon ? (s += 6, T = u.SingleQuoteEntity) : (s++, f(Be, 1), T = u.Unknown);
3397
- case p.equals:
3398
- return s++, T = u.Equal;
3399
- case p.colon:
3400
- return s++, T = u.Colon;
3401
- case p.lessThan:
3402
- if (m(s + 1) === p.slash)
3403
- return s += 2, T = u.CloseNodeStart;
3395
+ case d.doubleQuote:
3396
+ case d.singleQuote:
3397
+ case d.backtick:
3398
+ return h = k(), w = u.StringLiteral;
3399
+ case d.ampersand:
3400
+ return S(s + 1) === d.a && S(s + 2) === d.m && S(s + 3) === d.p && S(s + 4) === d.semicolon ? (s += 5, w = u.AmpersandEntity) : S(s + 1) === d.l && S(s + 2) === d.t && S(s + 3) === d.semicolon ? (s += 4, w = u.LessThanEntity) : S(s + 1) === d.g && S(s + 2) === d.t && S(s + 3) === d.semicolon ? (s += 4, w = u.GreaterThanEntity) : S(s + 1) === d.q && S(s + 2) === d.u && S(s + 3) === d.o && S(s + 4) === d.t && S(s + 5) === d.semicolon ? (s += 6, w = u.DoubleQuoteEntity) : S(s + 1) === d.a && S(s + 2) === d.p && S(s + 3) === d.o && S(s + 4) === d.s && S(s + 5) === d.semicolon ? (s += 6, w = u.SingleQuoteEntity) : (s++, f(ye, 1), w = u.Unknown);
3401
+ case d.equals:
3402
+ return s++, w = u.Equal;
3403
+ case d.colon:
3404
+ return s++, w = u.Colon;
3405
+ case d.lessThan:
3406
+ if (S(s + 1) === d.slash)
3407
+ return s += 2, w = u.CloseNodeStart;
3404
3408
  if (
3405
3409
  // --- "<!-- -->", XMLUI comment
3406
- m(s + 1) === p.exclamation && m(s + 2) === p.minus && m(s + 3) === p.minus
3410
+ S(s + 1) === d.exclamation && S(s + 2) === d.minus && S(s + 3) === d.minus
3407
3411
  ) {
3408
3412
  for (s += 4; s < o; ) {
3409
- if (m(s) === p.minus && m(s + 1) === p.minus && m(s + 2) === p.greaterThan)
3410
- return s += 3, T = u.CommentTrivia;
3411
- s += ne(m(s));
3413
+ if (S(s) === d.minus && S(s + 1) === d.minus && S(s + 2) === d.greaterThan)
3414
+ return s += 3, w = u.CommentTrivia;
3415
+ s += re(S(s));
3412
3416
  }
3413
- return f(Mn, 4), T = u.Unknown;
3417
+ return f(Gn, 4), w = u.Unknown;
3414
3418
  } else if (
3415
3419
  // --- <![CDATA[ section
3416
- m(s + 1) === p.exclamation && m(s + 2) === p.openBracket && m(s + 3) === p.C && m(s + 4) === p.D && m(s + 5) === p.A && m(s + 6) === p.T && m(s + 7) === p.A && m(s + 8) === p.openBracket
3420
+ S(s + 1) === d.exclamation && S(s + 2) === d.openBracket && S(s + 3) === d.C && S(s + 4) === d.D && S(s + 5) === d.A && S(s + 6) === d.T && S(s + 7) === d.A && S(s + 8) === d.openBracket
3417
3421
  ) {
3418
3422
  for (s += 9; s < o; ) {
3419
- if (m(s) === p.closeBracket && m(s + 1) === p.closeBracket && m(s + 2) === p.greaterThan)
3420
- return s += 3, T = u.CData;
3421
- s += ne(m(s));
3423
+ if (S(s) === d.closeBracket && S(s + 1) === d.closeBracket && S(s + 2) === d.greaterThan)
3424
+ return s += 3, w = u.CData;
3425
+ s += re(S(s));
3422
3426
  }
3423
- return f(qn, 9), T = u.CData;
3427
+ return f(zn, 9), w = u.CData;
3424
3428
  } else if (
3425
3429
  // --- <script>
3426
- m(s + 1) === p.s && m(s + 2) === p.c && m(s + 3) === p.r && m(s + 4) === p.i && m(s + 5) === p.p && m(s + 6) === p.t && m(s + 7) === p.greaterThan
3430
+ S(s + 1) === d.s && S(s + 2) === d.c && S(s + 3) === d.r && S(s + 4) === d.i && S(s + 5) === d.p && S(s + 6) === d.t && S(s + 7) === d.greaterThan
3427
3431
  ) {
3428
3432
  for (s += 8; s < o; ) {
3429
- if (m(s) === p.lessThan && m(s + 1) === p.slash && m(s + 2) === p.s && m(s + 3) === p.c && m(s + 4) === p.r && m(s + 5) === p.i && m(s + 6) === p.p && m(s + 7) === p.t && m(s + 8) === p.greaterThan)
3430
- return s += 9, T = u.Script;
3431
- s += ne(m(s));
3433
+ if (S(s) === d.lessThan && S(s + 1) === d.slash && S(s + 2) === d.s && S(s + 3) === d.c && S(s + 4) === d.r && S(s + 5) === d.i && S(s + 6) === d.p && S(s + 7) === d.t && S(s + 8) === d.greaterThan)
3434
+ return s += 9, w = u.Script;
3435
+ s += re(S(s));
3432
3436
  }
3433
- return f($n, 9), T = u.Script;
3437
+ return f(Qn, 9), w = u.Script;
3434
3438
  }
3435
- return s++, T = u.OpenNodeStart;
3436
- case p.slash:
3437
- return m(s + 1) === p.greaterThan ? (s += 2, T = u.NodeClose) : (s++, f(Be, 1), T = u.Unknown);
3438
- case p.greaterThan:
3439
- return s++, T = u.NodeEnd;
3439
+ return s++, w = u.OpenNodeStart;
3440
+ case d.slash:
3441
+ return S(s + 1) === d.greaterThan ? (s += 2, w = u.NodeClose) : (s++, f(ye, 1), w = u.Unknown);
3442
+ case d.greaterThan:
3443
+ return s++, w = u.NodeEnd;
3440
3444
  default:
3441
- const d = he(g);
3442
- if (d)
3443
- return T = d;
3444
- if (Ce(g)) {
3445
- s += ne(g);
3445
+ const p = Z(g);
3446
+ if (p)
3447
+ return w = p;
3448
+ if (rn(g)) {
3449
+ s += re(g);
3446
3450
  continue;
3447
- } else if (nr(g)) {
3448
- s += ne(g);
3451
+ } else if (ir(g)) {
3452
+ s += re(g);
3449
3453
  continue;
3450
3454
  }
3451
- const A = ne(g);
3452
- return s += A, f(Be, A), T = u.Unknown;
3455
+ const A = re(g);
3456
+ return s += A, f(ye, A), w = u.Unknown;
3453
3457
  }
3454
3458
  }
3455
3459
  }
3456
- function v() {
3457
- const g = s, d = H();
3458
- return Yn(d) ? d : (X(g), null);
3460
+ function T() {
3461
+ const g = s, p = Q();
3462
+ return Kn(p) ? p : (X(g), null);
3459
3463
  }
3460
3464
  function _() {
3461
3465
  return u.Unknown;
3462
3466
  }
3463
- function $() {
3467
+ function G() {
3464
3468
  return a;
3465
3469
  }
3466
- function m(g) {
3470
+ function S(g) {
3467
3471
  return a.charCodeAt(g);
3468
3472
  }
3469
- function U(g) {
3470
- return J(a, g);
3473
+ function q(g) {
3474
+ return $(a, g);
3471
3475
  }
3472
- function J(g, d) {
3473
- return g.codePointAt(d) ?? 0;
3476
+ function $(g, p) {
3477
+ return g.codePointAt(p) ?? 0;
3474
3478
  }
3475
- function Y(g, d, A) {
3476
- a = g || "", o = A === void 0 ? a.length : d + A, X(d || 0);
3479
+ function C(g, p, A) {
3480
+ a = g || "", o = A === void 0 ? a.length : p + A, X(p || 0);
3477
3481
  }
3478
- function Z(g) {
3482
+ function fe(g) {
3479
3483
  r = g;
3480
3484
  }
3481
3485
  function X(g) {
3482
- s = g, c = g, R = g, T = u.Unknown, h = void 0;
3486
+ s = g, c = g, b = g, w = u.Unknown, h = void 0;
3483
3487
  }
3484
- function C() {
3488
+ function pe() {
3485
3489
  X(c);
3486
3490
  }
3487
- function he(g) {
3488
- let d = g;
3489
- if (Vn(d)) {
3490
- for (s += ne(d); s < o && er(d = U(s)); )
3491
- s += ne(d);
3492
- return h = a.substring(R, s), K();
3491
+ function Z(g) {
3492
+ let p = g;
3493
+ if (rr(p)) {
3494
+ for (s += re(p); s < o && tr(p = q(s)); )
3495
+ s += re(p);
3496
+ return h = a.substring(b, s), j();
3493
3497
  }
3494
3498
  }
3495
- function K() {
3496
- return T = u.Identifier;
3499
+ function j() {
3500
+ return w = u.Identifier;
3497
3501
  }
3498
3502
  function k() {
3499
- const g = m(s);
3503
+ const g = S(s);
3500
3504
  s++;
3501
- let d = "", A = s;
3505
+ let p = "", A = s;
3502
3506
  for (; ; ) {
3503
3507
  if (s >= o) {
3504
- d += a.substring(A, s), f(Fn, 1);
3508
+ p += a.substring(A, s), f(Xn, 1);
3505
3509
  break;
3506
3510
  }
3507
- if (m(s) === g) {
3508
- d += a.substring(A, s), s++;
3511
+ if (S(s) === g) {
3512
+ p += a.substring(A, s), s++;
3509
3513
  break;
3510
3514
  }
3511
3515
  s++;
3512
3516
  }
3513
- return d;
3517
+ return p;
3514
3518
  }
3515
- function f(g, d = 0) {
3516
- r && r(g, d);
3519
+ function f(g, p = 0) {
3520
+ r && r(g, p);
3517
3521
  }
3518
3522
  }
3519
- function ne(e) {
3520
- return e >= 65536 ? 2 : e === p.EOF ? 0 : 1;
3523
+ function re(e) {
3524
+ return e >= 65536 ? 2 : e === d.EOF ? 0 : 1;
3521
3525
  }
3522
- function Bn(e) {
3523
- return e >= p.A && e <= p.Z || e >= p.a && e <= p.z;
3526
+ function Un(e) {
3527
+ return e >= d.A && e <= d.Z || e >= d.a && e <= d.z;
3524
3528
  }
3525
- function jn(e) {
3526
- return Bn(e) || Cn(e) || e === p._;
3529
+ function er(e) {
3530
+ return Un(e) || nr(e) || e === d._;
3527
3531
  }
3528
- function Cn(e) {
3529
- return e >= p._0 && e <= p._9;
3532
+ function nr(e) {
3533
+ return e >= d._0 && e <= d._9;
3530
3534
  }
3531
- function Vn(e) {
3532
- return Bn(e) || e === p.$ || e === p._;
3535
+ function rr(e) {
3536
+ return Un(e) || e === d.$ || e === d._;
3533
3537
  }
3534
- function er(e) {
3535
- return jn(e) || e === p.$ || e === p.minus || e === p.dot;
3538
+ function tr(e) {
3539
+ return er(e) || e === d.$ || e === d.minus || e === d.dot;
3536
3540
  }
3537
- function Ce(e) {
3538
- return e === p.space || e === p.tab || e === p.verticalTab || e === p.formFeed || e === p.nonBreakingSpace || e === p.nextLine || e === p.ogham || e >= p.enQuad && e <= p.zeroWidthSpace || e === p.narrowNoBreakSpace || e === p.mathematicalSpace || e === p.ideographicSpace || e === p.byteOrderMark;
3541
+ function rn(e) {
3542
+ return e === d.space || e === d.tab || e === d.verticalTab || e === d.formFeed || e === d.nonBreakingSpace || e === d.nextLine || e === d.ogham || e >= d.enQuad && e <= d.zeroWidthSpace || e === d.narrowNoBreakSpace || e === d.mathematicalSpace || e === d.ideographicSpace || e === d.byteOrderMark;
3539
3543
  }
3540
- function nr(e) {
3541
- return e === p.lineFeed || e === p.carriageReturn || e === p.lineSeparator || e === p.paragraphSeparator;
3544
+ function ir(e) {
3545
+ return e === d.lineFeed || e === d.carriageReturn || e === d.lineSeparator || e === d.paragraphSeparator;
3542
3546
  }
3543
- function rr(e, n, r = 0) {
3547
+ function lr(e, n, r = 0) {
3544
3548
  var l;
3545
- const t = `${" ".repeat(r)} ${Me(e.kind)} @${e.start}..${e.end}`;
3546
- if (Zn(e.kind))
3549
+ const t = `${" ".repeat(r)} ${ze(e.kind)} @${e.start}..${e.end}`;
3550
+ if (Cn(e.kind))
3547
3551
  return t + `
3548
- ` + ((l = e.children) == null ? void 0 : l.map((a) => rr(a, n, r + 1)).join(`
3552
+ ` + ((l = e.children) == null ? void 0 : l.map((a) => lr(a, n, r + 1)).join(`
3549
3553
  `));
3550
3554
  {
3551
3555
  let a = n(e);
3552
3556
  return e.kind === u.NewLineTrivia && (a = "*newline*"), t + ` "${a}"`;
3553
3557
  }
3554
3558
  }
3555
- function tr(e, n, r) {
3559
+ function sr(e, n, r) {
3556
3560
  var a, s;
3557
3561
  const t = ((a = e.children) == null ? void 0 : a.filter((o) => o.kind !== u.ErrorNode)) ?? [], l = ((s = n.children) == null ? void 0 : s.filter((o) => o.kind !== u.ErrorNode)) ?? [];
3558
3562
  if (t.length !== l.length)
@@ -3562,7 +3566,7 @@ function tr(e, n, r) {
3562
3566
  return !1;
3563
3567
  return !0;
3564
3568
  }
3565
- function Lr(e, n) {
3569
+ function Or(e, n) {
3566
3570
  const r = [e];
3567
3571
  let t;
3568
3572
  if (e.start > n || n > e.end)
@@ -3578,83 +3582,83 @@ function Lr(e, n) {
3578
3582
  ), s = e.children[a], o = e.children[a - 1];
3579
3583
  if (o !== void 0 && n <= s.pos)
3580
3584
  return t = r.length, {
3581
- chainBeforePos: r.concat(lr(o)),
3585
+ chainBeforePos: r.concat(or(o)),
3582
3586
  sharedParents: t,
3583
- chainAtPos: r.concat(ir(s))
3587
+ chainAtPos: r.concat(ar(s))
3584
3588
  };
3585
3589
  e = s, l.chainAtPos.push(e);
3586
3590
  }
3587
3591
  return l;
3588
3592
  }
3589
- function ir(e) {
3593
+ function ar(e) {
3590
3594
  const n = [e];
3591
3595
  for (; e.children !== void 0 && e.children.length > 0; )
3592
3596
  e = e.children[0], n.push(e);
3593
3597
  return n;
3594
3598
  }
3595
- function lr(e) {
3599
+ function or(e) {
3596
3600
  const n = [e];
3597
3601
  for (; e.children !== void 0 && e.children.length > 0; )
3598
3602
  e = e.children[e.children.length - 1], n.push(e);
3599
3603
  return n;
3600
3604
  }
3601
- const we = {
3605
+ const Oe = {
3602
3606
  uppercaseAttr: function(e) {
3603
3607
  return {
3604
- category: xe.Error,
3605
- code: fe.uppercaseAttr,
3608
+ category: _e.Error,
3609
+ code: de.uppercaseAttr,
3606
3610
  message: `Attribute name '${e}' cannot start with an uppercase letter.`
3607
3611
  };
3608
3612
  },
3609
3613
  duplAttr: function(e) {
3610
3614
  return {
3611
- category: xe.Error,
3612
- code: fe.duplAttr,
3615
+ category: _e.Error,
3616
+ code: de.duplAttr,
3613
3617
  message: `Duplicated attribute: '${e}'.`
3614
3618
  };
3615
3619
  },
3616
3620
  tagNameMismatch: function(e, n) {
3617
3621
  return {
3618
- category: xe.Error,
3619
- code: fe.tagNameMismatch,
3622
+ category: _e.Error,
3623
+ code: de.tagNameMismatch,
3620
3624
  message: `Opening and closing tag names should match. Opening tag has a name '${e}', but the closing tag name is '${n}'.`
3621
3625
  };
3622
3626
  },
3623
3627
  invalidChar: function(e) {
3624
3628
  return {
3625
- category: xe.Error,
3626
- code: fe.invalidChar,
3629
+ category: _e.Error,
3630
+ code: de.invalidChar,
3627
3631
  message: `Invalid character '${e}'.`
3628
3632
  };
3629
3633
  }
3630
3634
  };
3631
3635
  u.CData, u.Script, u.OpenNodeStart;
3632
- function wr(e) {
3636
+ function Ir(e) {
3633
3637
  return {
3634
- parse: () => sr(e),
3638
+ parse: () => cr(e),
3635
3639
  getText: (n, r = !0) => e.substring(r ? n.pos ?? n.start ?? 0 : n.start ?? n.pos ?? 0, n.end)
3636
3640
  };
3637
3641
  }
3638
- function sr(e) {
3642
+ function cr(e) {
3639
3643
  const n = [], r = [];
3640
3644
  let t, l = { children: [] }, a;
3641
- const o = Kn(!1, e, function(E, S) {
3645
+ const o = Vn(!1, e, function(m, E) {
3642
3646
  a = {
3643
- message: E,
3644
- prefixLength: S
3647
+ message: m,
3648
+ prefixLength: E
3645
3649
  };
3646
3650
  });
3647
- function c(E, S = !0) {
3648
- return e.substring(S ? E.pos : E.start, E.end);
3651
+ function c(m, E = !0) {
3652
+ return e.substring(E ? m.pos : m.start, m.end);
3649
3653
  }
3650
- function R() {
3651
- f();
3654
+ function b() {
3655
+ O();
3652
3656
  e: for (; ; ) {
3653
- const E = he();
3654
- switch (E.kind) {
3657
+ const m = g();
3658
+ switch (m.kind) {
3655
3659
  case u.TextNode:
3656
3660
  case u.StringLiteral:
3657
- K(E.kind);
3661
+ p(m.kind);
3658
3662
  break;
3659
3663
  case u.CloseNodeStart:
3660
3664
  break e;
@@ -3665,13 +3669,13 @@ function sr(e) {
3665
3669
  break;
3666
3670
  }
3667
3671
  }
3668
- l.children && l.children.length > 0 ? g(u.ContentListNode) : I();
3672
+ l.children && l.children.length > 0 ? I(u.ContentListNode) : U();
3669
3673
  }
3670
- function T() {
3674
+ function w() {
3671
3675
  for (; ; )
3672
- switch (he().kind) {
3676
+ switch (g().kind) {
3673
3677
  case u.EndOfFileToken:
3674
- k();
3678
+ A();
3675
3679
  return;
3676
3680
  default:
3677
3681
  h();
@@ -3679,221 +3683,251 @@ function sr(e) {
3679
3683
  }
3680
3684
  }
3681
3685
  function h() {
3682
- !U(u.CData) && !U(u.Script) && (m(u.OpenNodeStart) ? F() : A(Qn));
3686
+ !$(u.CData) && !$(u.Script) && (q(u.OpenNodeStart) ? F() : pe(Jn));
3683
3687
  }
3684
3688
  function F() {
3685
- f(), K(u.OpenNodeStart);
3686
- let E;
3687
- if (m(u.Identifier) ? E = x() : Z(Ke), H(), U(u.NodeClose)) {
3688
- g(u.ElementNode);
3689
- return;
3690
- } else if (U(u.NodeEnd)) {
3691
- if (R(), U(u.CloseNodeStart)) {
3692
- if (m(u.Identifier)) {
3693
- const S = x();
3694
- E !== void 0 && !tr(E, S, c) && Z(we.tagNameMismatch(c(E), c(S)));
3695
- } else
3696
- Y(Ke, [u.NodeEnd]);
3697
- U(u.NodeEnd) || Z(Xn);
3689
+ O(), p(u.OpenNodeStart);
3690
+ let m = !1, E;
3691
+ if (q(u.Identifier))
3692
+ E = Q();
3693
+ else {
3694
+ m = !0;
3695
+ const N = fe([u.OpenNodeStart, u.NodeEnd, u.NodeClose, u.CloseNodeStart, u.CData, u.Script]);
3696
+ N ? j(Ue, N.pos, N.end) : Z(Ue);
3697
+ }
3698
+ switch (m || T(), f().kind) {
3699
+ case u.NodeClose: {
3700
+ A(), I(u.ElementNode);
3701
+ return;
3702
+ }
3703
+ case u.NodeEnd: {
3704
+ A(), b(), x(E), I(u.ElementNode);
3705
+ return;
3706
+ }
3707
+ case u.OpenNodeStart:
3708
+ case u.Script:
3709
+ case u.CData: {
3710
+ I(u.ElementNode), Z(Fe);
3711
+ return;
3712
+ }
3713
+ case u.CloseNodeStart: {
3714
+ Z(Fe), x(E), I(u.ElementNode);
3715
+ return;
3716
+ }
3717
+ default:
3718
+ Z(Fe);
3719
+ }
3720
+ }
3721
+ function x(m) {
3722
+ if ($(u.CloseNodeStart)) {
3723
+ if (q(u.Identifier)) {
3724
+ const E = Q();
3725
+ m !== void 0 && !sr(m, E, c) && Z(Oe.tagNameMismatch(c(m), c(E)));
3698
3726
  } else
3699
- Z(Gn);
3700
- g(u.ElementNode);
3701
- return;
3727
+ X(Ue, [u.NodeEnd]);
3728
+ $(u.NodeEnd) || Z(Hn);
3702
3729
  } else
3703
- Z(Hn);
3730
+ Z(Yn);
3704
3731
  }
3705
- function x() {
3706
- return f(), K(u.Identifier), U(u.Colon) && U(u.Identifier), g(u.TagNameNode);
3707
- }
3708
- function H() {
3709
- f();
3710
- const E = [];
3711
- for (; !J([u.EndOfFileToken, u.NodeEnd, u.NodeClose]); )
3712
- v(E);
3713
- l.children.length === 0 ? I() : g(u.AttributeListNode);
3714
- }
3715
- function v(E) {
3716
- if (f(), m(u.Identifier))
3717
- _(E);
3732
+ function Q() {
3733
+ return O(), p(u.Identifier), $(u.Colon) && $(u.Identifier), I(u.TagNameNode);
3734
+ }
3735
+ function T() {
3736
+ O();
3737
+ const m = [];
3738
+ for (; !C([u.EndOfFileToken, u.NodeEnd, u.NodeClose]); )
3739
+ _(m);
3740
+ l.children.length === 0 ? U() : I(u.AttributeListNode);
3741
+ }
3742
+ function _(m) {
3743
+ if (O(), q(u.Identifier))
3744
+ G(m);
3718
3745
  else {
3719
- const S = [u.Equal];
3720
- if (!Y(je, S))
3746
+ const E = [u.Equal];
3747
+ if (!X(nn, E))
3721
3748
  return;
3722
3749
  }
3723
- if (U(u.Equal) && !U(u.StringLiteral)) {
3724
- const S = [u.NodeEnd, u.NodeClose];
3725
- Y(zn, S);
3750
+ if ($(u.Equal) && !$(u.StringLiteral)) {
3751
+ const E = [u.NodeEnd, u.NodeClose];
3752
+ X(Zn, E);
3726
3753
  }
3727
- g(u.AttributeNode);
3754
+ I(u.AttributeNode);
3728
3755
  }
3729
- function _(E) {
3730
- const S = C();
3731
- let L;
3732
- f(), K(u.Identifier), U(u.Colon) && (m(u.Identifier) ? L = K(u.Identifier) : Y(je, [
3756
+ function G(m) {
3757
+ const E = f();
3758
+ let N;
3759
+ O(), p(u.Identifier), $(u.Colon) && (q(u.Identifier) ? N = p(u.Identifier) : X(nn, [
3733
3760
  u.NodeClose,
3734
3761
  u.NodeEnd,
3735
3762
  u.Equal
3736
- ])), $(E, { nsIdent: L, nameIdent: S }), g(u.AttributeKeyNode);
3763
+ ])), S(m, { nsIdent: N, nameIdent: E }), I(u.AttributeKeyNode);
3737
3764
  }
3738
- function $(E, { nameIdent: S, nsIdent: L }) {
3739
- const b = c(S), N = L === void 0 ? void 0 : c(L), O = ({ ns: ce, name: Se }) => Se === b && ce === N, B = E.findIndex(O) !== -1, q = "A" <= b[0] && b[0] <= "Z", W = B || q;
3740
- B && X(we.duplAttr(b), S.pos, S.end), q && X(we.uppercaseAttr(b), S.pos, S.end), W || E.push({ name: b });
3765
+ function S(m, { nameIdent: E, nsIdent: N }) {
3766
+ const v = c(E), y = N === void 0 ? void 0 : c(N), D = ({ ns: Ae, name: Le }) => Le === v && Ae === y, J = m.findIndex(D) !== -1, V = "A" <= v[0] && v[0] <= "Z", le = J || V;
3767
+ J && j(Oe.duplAttr(v), E.pos, E.end), V && j(Oe.uppercaseAttr(v), E.pos, E.end), le || m.push({ name: v });
3741
3768
  }
3742
- function m(E) {
3743
- return C().kind === E;
3769
+ function q(m) {
3770
+ return f().kind === m;
3744
3771
  }
3745
- function U(E) {
3746
- const S = m(E);
3747
- return S && k(), S;
3772
+ function $(m) {
3773
+ const E = q(m);
3774
+ return E && A(), E;
3748
3775
  }
3749
- function J(E) {
3750
- return E.includes(C().kind);
3776
+ function C(m) {
3777
+ return m.includes(f().kind);
3751
3778
  }
3752
- function Y(E, S) {
3753
- return J(S) || m(u.EndOfFileToken) ? (Z(E), !0) : (f(), Z(E), k(), g(u.ErrorNode), !1);
3779
+ function fe(m) {
3780
+ return O(), k(m), l.children.length === 0 ? (U(), null) : I(u.ErrorNode);
3754
3781
  }
3755
- function Z({ code: E, message: S, category: L }) {
3756
- const { pos: b, end: N } = C();
3782
+ function X(m, E) {
3783
+ return C(E) || q(u.EndOfFileToken) ? (Z(m), !0) : (O(), Z(m), A(), I(u.ErrorNode), !1);
3784
+ }
3785
+ function pe(m) {
3786
+ X(m, []);
3787
+ }
3788
+ function Z({ code: m, message: E, category: N }) {
3789
+ const { pos: v, end: y } = f();
3757
3790
  n.push({
3758
- category: L,
3759
- code: E,
3760
- message: S,
3761
- pos: b,
3762
- end: N
3791
+ category: N,
3792
+ code: m,
3793
+ message: E,
3794
+ pos: v,
3795
+ end: y
3763
3796
  });
3764
3797
  }
3765
- function X({ code: E, message: S, category: L }, b, N) {
3798
+ function j({ code: m, message: E, category: N }, v, y) {
3766
3799
  n.push({
3767
- category: L,
3768
- code: E,
3769
- message: S,
3770
- pos: b,
3771
- end: N
3800
+ category: N,
3801
+ code: m,
3802
+ message: E,
3803
+ pos: v,
3804
+ end: y
3772
3805
  });
3773
3806
  }
3774
- function C(E = !1) {
3775
- return t !== void 0 || (t = d(E)), t;
3776
- }
3777
- function he() {
3778
- const E = C(!0);
3779
- if (E.kind === u.EndOfFileToken || E.kind === u.OpenNodeStart || E.kind === u.Script || E.kind === u.CData || E.kind === u.CloseNodeStart)
3780
- return E;
3781
- const S = E.triviaBefore, L = (S == null ? void 0 : S.length) ?? 0;
3782
- let b = 0, N = [], O = -1;
3783
- for (; b < L; ++b)
3784
- if (S[b].kind === u.CommentTrivia)
3785
- N.push(S[b]);
3807
+ function k(m) {
3808
+ for (let E = f(); E.kind !== u.EndOfFileToken && !m.includes(E.kind); A(), E = f())
3809
+ ;
3810
+ }
3811
+ function f(m = !1) {
3812
+ return t !== void 0 || (t = P(m)), t;
3813
+ }
3814
+ function g() {
3815
+ const m = f(!0);
3816
+ if (m.kind === u.EndOfFileToken || m.kind === u.OpenNodeStart || m.kind === u.Script || m.kind === u.CData || m.kind === u.CloseNodeStart)
3817
+ return m;
3818
+ const E = m.triviaBefore, N = (E == null ? void 0 : E.length) ?? 0;
3819
+ let v = 0, y = [], D = -1;
3820
+ for (; v < N; ++v)
3821
+ if (E[v].kind === u.CommentTrivia)
3822
+ y.push(E[v]);
3786
3823
  else {
3787
- O = b;
3824
+ D = v;
3788
3825
  break;
3789
3826
  }
3790
- let B = -1;
3791
- for (; b < L; ++b)
3792
- if (S[b].kind === u.CommentTrivia) {
3793
- B = b;
3827
+ let J = -1;
3828
+ for (; v < N; ++v)
3829
+ if (E[v].kind === u.CommentTrivia) {
3830
+ J = v;
3794
3831
  break;
3795
3832
  }
3796
- let q = !1;
3797
- if (E.kind === u.StringLiteral) {
3798
- const Ne = E.end, Ae = d(!0);
3799
- q = Ae.kind === u.CData || Ae.kind === u.CloseNodeStart || Ae.kind === u.Script || Ae.kind === u.OpenNodeStart, o.resetTokenState(Ne);
3833
+ let V = !1;
3834
+ if (m.kind === u.StringLiteral) {
3835
+ const we = m.end, Te = P(!0);
3836
+ V = Te.kind === u.CData || Te.kind === u.CloseNodeStart || Te.kind === u.Script || Te.kind === u.OpenNodeStart, o.resetTokenState(we);
3800
3837
  }
3801
- let W;
3802
- q ? W = E.pos : N.length > 0 ? W = N[N.length - 1].end : O !== -1 ? W = S[O].pos : W = E.start;
3803
- let ce = W, Se;
3804
- N.length > 0 && (Se = N, ce = N[0].pos);
3805
- let $e = u.TextNode, me = -1;
3806
- if (B !== -1)
3807
- me = S[B].pos, o.resetTokenState(me);
3808
- else if (q)
3809
- $e = u.StringLiteral, me = E.end;
3838
+ let le;
3839
+ V ? le = m.pos : y.length > 0 ? le = y[y.length - 1].end : D !== -1 ? le = E[D].pos : le = m.start;
3840
+ let Ae = le, Le;
3841
+ y.length > 0 && (Le = y, Ae = y[0].pos);
3842
+ let He = u.TextNode, Se = -1;
3843
+ if (J !== -1)
3844
+ Se = E[J].pos, o.resetTokenState(Se);
3845
+ else if (V)
3846
+ He = u.StringLiteral, Se = m.end;
3810
3847
  else {
3811
3848
  for (; ; ) {
3812
- const Ne = o.peekChar();
3813
- if (Ne === null || Ne === p.lessThan)
3849
+ const we = o.peekChar();
3850
+ if (we === null || we === d.lessThan)
3814
3851
  break;
3815
3852
  o.scanChar();
3816
3853
  }
3817
- me = o.getTokenEnd();
3854
+ Se = o.getTokenEnd();
3818
3855
  }
3819
- return t = { kind: $e, start: ce, pos: W, end: me, triviaBefore: Se }, t;
3856
+ return t = { kind: He, start: Ae, pos: le, end: Se, triviaBefore: Le }, t;
3820
3857
  }
3821
- function K(E) {
3822
- const S = k();
3823
- if (S.kind !== E)
3858
+ function p(m) {
3859
+ const E = A();
3860
+ if (E.kind !== m)
3824
3861
  throw new Error(
3825
- `expected ${Me(E)}, bumped a ${Me(S.kind)}`
3862
+ `expected ${ze(m)}, bumped a ${ze(E.kind)}`
3826
3863
  );
3827
- return S;
3864
+ return E;
3828
3865
  }
3829
- function k() {
3866
+ function A() {
3830
3867
  if (t) {
3831
3868
  l.children.push(t);
3832
- const S = t;
3833
- return t = void 0, S;
3869
+ const E = t;
3870
+ return t = void 0, E;
3834
3871
  }
3835
- const E = d(!1);
3836
- return l.children.push(E), E;
3872
+ const m = P(!1);
3873
+ return l.children.push(m), m;
3837
3874
  }
3838
- function f() {
3875
+ function O() {
3839
3876
  r.push(l), l = {
3840
3877
  children: []
3841
3878
  };
3842
3879
  }
3843
- function g(E) {
3844
- const S = Ve(E, l.children), L = r[r.length - 1];
3845
- return L.children.push(S), l = L, r.pop(), S;
3880
+ function I(m) {
3881
+ const E = tn(m, l.children), N = r[r.length - 1];
3882
+ return N.children.push(E), l = N, r.pop(), E;
3846
3883
  }
3847
- function d(E) {
3848
- let S, L = [], b = null;
3884
+ function P(m) {
3885
+ let E, N = [], v = null;
3849
3886
  for (; ; ) {
3850
- if (S = o.scan(), b === null && (b = o.getTokenStart()), a !== void 0) {
3851
- let N;
3852
- a.message.code === fe.invalidChar ? N = we.invalidChar(o.getTokenText()) : N = a.message;
3853
- const O = o.getTokenStart(), B = {
3854
- kind: S,
3855
- start: b,
3856
- pos: O,
3887
+ if (E = o.scan(), v === null && (v = o.getTokenStart()), a !== void 0) {
3888
+ let y;
3889
+ a.message.code === de.invalidChar ? y = Oe.invalidChar(o.getTokenText()) : y = a.message;
3890
+ const D = o.getTokenStart(), J = {
3891
+ kind: E,
3892
+ start: v,
3893
+ pos: D,
3857
3894
  end: o.getTokenEnd(),
3858
- triviaBefore: L.length > 0 ? L : void 0
3895
+ triviaBefore: N.length > 0 ? N : void 0
3859
3896
  };
3860
- if (L = [], E && N.code === fe.invalidChar)
3861
- return a = void 0, B;
3862
- const q = O + a.prefixLength;
3863
- return B.end = q, o.resetTokenState(q), f(), l.children.push(B), X(N, O, q), g(u.ErrorNode), a = void 0, d(E);
3897
+ if (N = [], m && y.code === de.invalidChar)
3898
+ return a = void 0, J;
3899
+ const V = D + a.prefixLength;
3900
+ return J.end = V, o.resetTokenState(V), O(), l.children.push(J), j(y, D, V), I(u.ErrorNode), a = void 0, P(m);
3864
3901
  }
3865
- switch (S) {
3902
+ switch (E) {
3866
3903
  case u.CommentTrivia:
3867
3904
  case u.NewLineTrivia:
3868
3905
  case u.WhitespaceTrivia:
3869
- L.push({
3870
- kind: S,
3871
- start: b,
3906
+ N.push({
3907
+ kind: E,
3908
+ start: v,
3872
3909
  pos: o.getTokenStart(),
3873
3910
  end: o.getTokenEnd()
3874
3911
  });
3875
3912
  break;
3876
3913
  default:
3877
3914
  return {
3878
- kind: S,
3879
- start: b,
3915
+ kind: E,
3916
+ start: v,
3880
3917
  pos: o.getTokenStart(),
3881
3918
  end: o.getTokenEnd(),
3882
- triviaBefore: L.length > 0 ? L : void 0
3919
+ triviaBefore: N.length > 0 ? N : void 0
3883
3920
  };
3884
3921
  }
3885
3922
  }
3886
3923
  }
3887
- function A(E) {
3888
- Y(E, []);
3889
- }
3890
- function I() {
3891
- const E = r[r.length - 1];
3892
- E.children.push(...l.children), l = E, r.pop();
3924
+ function U() {
3925
+ const m = r[r.length - 1];
3926
+ m.children.push(...l.children), l = m, r.pop();
3893
3927
  }
3894
- return T(), { node: Ve(u.ContentListNode, l.children), errors: n };
3928
+ return w(), { node: tn(u.ContentListNode, l.children), errors: n };
3895
3929
  }
3896
- function Ve(e, n) {
3930
+ function tn(e, n) {
3897
3931
  const r = n[0], t = n[n.length - 1];
3898
3932
  return {
3899
3933
  kind: e,
@@ -3903,75 +3937,75 @@ function Ve(e, n) {
3903
3937
  children: n
3904
3938
  };
3905
3939
  }
3906
- function w(e, n, r, t, l, a) {
3940
+ function L(e, n, r, t, l, a) {
3907
3941
  if (n.cancel)
3908
3942
  return n;
3909
3943
  if (n.skipChildren = !1, Array.isArray(e)) {
3910
3944
  for (const s of e)
3911
- n = w(s, n, r, t, l, a);
3945
+ n = L(s, n, r, t, l, a);
3912
3946
  return n;
3913
3947
  }
3914
3948
  switch (e.type) {
3915
- case ve: {
3949
+ case be: {
3916
3950
  if (n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel) return n;
3917
3951
  if (!n.skipChildren) {
3918
3952
  for (const s of e.stmts)
3919
- if (n = w(s, n, r, t, e, "statements"), n.cancel) return n;
3953
+ if (n = L(s, n, r, t, e, "statements"), n.cancel) return n;
3920
3954
  }
3921
3955
  return n = (r == null ? void 0 : r(!1, e, n, l, a)) || n, n;
3922
3956
  }
3923
- case ke:
3957
+ case Ee:
3924
3958
  return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n;
3925
- case on:
3926
- return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.expr, n, r, t, e, "expression"), n.cancel) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
3927
- case Wn:
3959
+ case hn:
3960
+ return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.expr, n, r, t, e, "expression"), n.cancel) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
3961
+ case Fn:
3928
3962
  return n;
3929
- case cn: {
3963
+ case dn: {
3930
3964
  if (n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel) return n;
3931
3965
  if (!n.skipChildren) {
3932
3966
  for (const s of e.decls)
3933
- if (n = w(s, n, r, t, e, "declarations"), n.cancel) return n;
3967
+ if (n = L(s, n, r, t, e, "declarations"), n.cancel) return n;
3934
3968
  }
3935
3969
  return n = (r == null ? void 0 : r(!1, e, n, l, a)) || n, n;
3936
3970
  }
3937
- case un: {
3971
+ case pn: {
3938
3972
  if (n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel) return n;
3939
3973
  if (!n.skipChildren) {
3940
3974
  for (const s of e.decls)
3941
- if (n = w(s, n, r, t, e, "declarations"), n.cancel) return n;
3975
+ if (n = L(s, n, r, t, e, "declarations"), n.cancel) return n;
3942
3976
  }
3943
3977
  return n = (r == null ? void 0 : r(!1, e, n, l, a)) || n, n;
3944
3978
  }
3945
- case qe: {
3979
+ case Qe: {
3946
3980
  if (n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel) return n;
3947
3981
  if (!n.skipChildren) {
3948
3982
  for (const s of e.decls)
3949
- if (n = w(s, n, r, t, e, "declarations"), n.cancel) return n;
3983
+ if (n = L(s, n, r, t, e, "declarations"), n.cancel) return n;
3950
3984
  }
3951
3985
  return n = (r == null ? void 0 : r(!1, e, n, l, a)) || n, n;
3952
3986
  }
3953
- case fn:
3954
- return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.cond, n, r, t, e, "condition"), n.cancel || (e.thenB && (n = w(e.thenB, n, r, t, e, "thenBranch")), n.cancel) || (e.elseB && (n = w(e.elseB, n, r, t, e, "elseBranch")), n.cancel)) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
3955
- case hn:
3956
- return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (e.expr && (n = w(e.expr, n, r, t, e, "expression")), n.cancel) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
3957
- case pn:
3958
- return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n;
3959
- case dn:
3960
- return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n;
3961
3987
  case kn:
3962
- return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.cond, n, r, t, e, "condition"), n.cancel || (n = w(e.body, n, r, t, e, "body"), n.cancel)) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
3988
+ return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.cond, n, r, t, e, "condition"), n.cancel || (e.thenB && (n = L(e.thenB, n, r, t, e, "thenBranch")), n.cancel) || (e.elseB && (n = L(e.elseB, n, r, t, e, "elseBranch")), n.cancel)) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
3963
3989
  case gn:
3964
- return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.body, n, r, t, e, "body"), n.cancel || (n = w(e.cond, n, r, t, e, "condition"), n.cancel)) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
3990
+ return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (e.expr && (n = L(e.expr, n, r, t, e, "expression")), n.cancel) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
3965
3991
  case En:
3966
- return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (e.init && (n = w(e.init, n, r, t, e, "init")), n.cancel || (e.cond && (n = w(e.cond, n, r, t, e, "condition")), n.cancel) || (e.upd && (n = w(e.upd, n, r, t, e, "update")), n.cancel) || (n = w(e.body, n, r, t, e, "body"), n.cancel)) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
3967
- case ge:
3968
- return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.expr, n, r, t, e, "expression"), n.cancel || (n = w(e.body, n, r, t, e, "body"), n.cancel)) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
3969
- case _e:
3970
- return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.expr, n, r, t, e, "expression"), n.cancel || (n = w(e.body, n, r, t, e, "body"), n.cancel)) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
3971
- case xn:
3972
- return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.expr, n, r, t, e, "expression"), n.cancel) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
3992
+ return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n;
3973
3993
  case mn:
3974
- return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (e.tryB && (n = w(e.tryB, n, r, t, e, "tryBlock")), n.cancel || (e.catchB && (n = w(e.catchB, n, r, t, e, "catchBlock")), n.cancel) || (e.finallyB && (n = w(
3994
+ return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n;
3995
+ case xn:
3996
+ return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.cond, n, r, t, e, "condition"), n.cancel || (n = L(e.body, n, r, t, e, "body"), n.cancel)) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
3997
+ case _n:
3998
+ return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.body, n, r, t, e, "body"), n.cancel || (n = L(e.cond, n, r, t, e, "condition"), n.cancel)) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
3999
+ case Sn:
4000
+ return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (e.init && (n = L(e.init, n, r, t, e, "init")), n.cancel || (e.cond && (n = L(e.cond, n, r, t, e, "condition")), n.cancel) || (e.upd && (n = L(e.upd, n, r, t, e, "update")), n.cancel) || (n = L(e.body, n, r, t, e, "body"), n.cancel)) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
4001
+ case me:
4002
+ return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.expr, n, r, t, e, "expression"), n.cancel || (n = L(e.body, n, r, t, e, "body"), n.cancel)) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
4003
+ case Ne:
4004
+ return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.expr, n, r, t, e, "expression"), n.cancel || (n = L(e.body, n, r, t, e, "body"), n.cancel)) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
4005
+ case Nn:
4006
+ return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.expr, n, r, t, e, "expression"), n.cancel) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
4007
+ case An:
4008
+ return n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (e.tryB && (n = L(e.tryB, n, r, t, e, "tryBlock")), n.cancel || (e.catchB && (n = L(e.catchB, n, r, t, e, "catchBlock")), n.cancel) || (e.finallyB && (n = L(
3975
4009
  e.finallyB,
3976
4010
  n,
3977
4011
  r,
@@ -3979,12 +4013,12 @@ function w(e, n, r, t, l, a) {
3979
4013
  e,
3980
4014
  "finallyBlock"
3981
4015
  )), n.cancel)) || (n = (r == null ? void 0 : r(!1, e, n, l, a)) || n), n;
3982
- case _n: {
4016
+ case Ln: {
3983
4017
  if (n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel) return n;
3984
4018
  if (!n.skipChildren) {
3985
- if (n = w(e.expr, n, r, t, e, "expression"), n.cancel) return n;
4019
+ if (n = L(e.expr, n, r, t, e, "expression"), n.cancel) return n;
3986
4020
  for (const s of e.cases) {
3987
- if (s.caseE && (n = w(
4021
+ if (s.caseE && (n = L(
3988
4022
  s.caseE,
3989
4023
  n,
3990
4024
  r,
@@ -3994,7 +4028,7 @@ function w(e, n, r, t, l, a) {
3994
4028
  )), n.cancel) return n;
3995
4029
  if (s.stmts !== void 0) {
3996
4030
  for (const o of s.stmts)
3997
- if (n = w(
4031
+ if (n = L(
3998
4032
  o,
3999
4033
  n,
4000
4034
  r,
@@ -4007,154 +4041,154 @@ function w(e, n, r, t, l, a) {
4007
4041
  }
4008
4042
  return n = (r == null ? void 0 : r(!1, e, n, l, a)) || n, n;
4009
4043
  }
4010
- case De: {
4044
+ case We: {
4011
4045
  if (n = (r == null ? void 0 : r(!0, e, n, l, a)) || n, n.cancel) return n;
4012
4046
  if (!n.skipChildren) {
4013
4047
  for (const s of e.args)
4014
- if (n = w(s, n, r, t, e, "arg"), n.cancel) return n;
4015
- if (n = w(e.stmt, n, r, t, e, "statement"), n.cancel) return n;
4048
+ if (n = L(s, n, r, t, e, "arg"), n.cancel) return n;
4049
+ if (n = L(e.stmt, n, r, t, e, "statement"), n.cancel) return n;
4016
4050
  }
4017
4051
  return n = (r == null ? void 0 : r(!1, e, n, l, a)) || n, n;
4018
4052
  }
4019
- case Sn:
4020
- return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.expr, n, r, t, e, "operand"), n.cancel) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4021
- case G:
4022
- return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.left, n, r, t, e, "left"), n.cancel || (n = w(e.right, n, r, t, e, "right"), n.cancel)) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4023
- case le: {
4053
+ case wn:
4054
+ return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.expr, n, r, t, e, "operand"), n.cancel) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4055
+ case z:
4056
+ return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.left, n, r, t, e, "left"), n.cancel || (n = L(e.right, n, r, t, e, "right"), n.cancel)) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4057
+ case ae: {
4024
4058
  if (n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel) return n;
4025
4059
  if (!n.skipChildren) {
4026
4060
  for (const s of e.exprs)
4027
- if (n = w(s, n, r, t, e, "expression"), n.cancel) return n;
4061
+ if (n = L(s, n, r, t, e, "expression"), n.cancel) return n;
4028
4062
  }
4029
4063
  return n = (t == null ? void 0 : t(!1, e, n, l, a)) || n, n;
4030
4064
  }
4031
- case Nn:
4032
- return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.cond, n, r, t, e, "condition"), n.cancel || (n = w(e.thenE, n, r, t, e, "consequent"), n.cancel) || (n = w(e.elseE, n, r, t, e, "alternate"), n.cancel)) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4033
- case An: {
4065
+ case Tn:
4066
+ return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.cond, n, r, t, e, "condition"), n.cancel || (n = L(e.thenE, n, r, t, e, "consequent"), n.cancel) || (n = L(e.elseE, n, r, t, e, "alternate"), n.cancel)) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4067
+ case vn: {
4034
4068
  if (n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel) return n;
4035
4069
  if (!n.skipChildren) {
4036
4070
  for (const s of e.arguments)
4037
- if (n = w(s, n, r, t, e, "argument"), n.cancel) return n;
4038
- if (n = w(e.obj, n, r, t, e, "object"), n.cancel) return n;
4071
+ if (n = L(s, n, r, t, e, "argument"), n.cancel) return n;
4072
+ if (n = L(e.obj, n, r, t, e, "object"), n.cancel) return n;
4039
4073
  }
4040
4074
  return n = (t == null ? void 0 : t(!1, e, n, l, a)) || n, n;
4041
4075
  }
4042
- case Ln:
4043
- return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.obj, n, r, t, e, "object"), n.cancel) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4044
- case wn:
4045
- return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.obj, n, r, t, e, "object"), n.cancel || (n = w(e.member, n, r, t, e, "member"), n.cancel)) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4076
+ case On:
4077
+ return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.obj, n, r, t, e, "object"), n.cancel) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4078
+ case In:
4079
+ return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.obj, n, r, t, e, "object"), n.cancel || (n = L(e.member, n, r, t, e, "member"), n.cancel)) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4046
4080
  case M:
4047
4081
  return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n;
4048
- case Q:
4082
+ case Y:
4049
4083
  return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n;
4050
- case se: {
4084
+ case oe: {
4051
4085
  if (n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel) return n;
4052
4086
  if (!n.skipChildren) {
4053
4087
  for (const s of e.items)
4054
- if (n = w(s, n, r, t, e, "item"), n.cancel) return n;
4088
+ if (n = L(s, n, r, t, e, "item"), n.cancel) return n;
4055
4089
  }
4056
4090
  return n = (t == null ? void 0 : t(!1, e, n, l, a)) || n, n;
4057
4091
  }
4058
- case ae: {
4092
+ case ce: {
4059
4093
  if (n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel) return n;
4060
4094
  if (!n.skipChildren) {
4061
4095
  for (const s of e.props)
4062
4096
  if (Array.isArray(s)) {
4063
4097
  const [o, c] = s;
4064
- if (n = w(o, n, r, t, e, "propKey"), n.cancel || (n = w(c, n, r, t, e, "propValue"), n.cancel)) return n;
4065
- } else if (n = w(s, n, r, t, e, "prop"), n.cancel) return n;
4098
+ if (n = L(o, n, r, t, e, "propKey"), n.cancel || (n = L(c, n, r, t, e, "propValue"), n.cancel)) return n;
4099
+ } else if (n = L(s, n, r, t, e, "prop"), n.cancel) return n;
4066
4100
  }
4067
4101
  return n = (t == null ? void 0 : t(!1, e, n, l, a)) || n, n;
4068
4102
  }
4069
- case oe:
4070
- return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.expr, n, r, t, e, "operand"), n.cancel) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4071
- case vn:
4072
- return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.expr, n, r, t, e, "operand"), n.cancel || (n = w(e.leftValue, n, r, t, e, "leftValue"), n.cancel)) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4073
- case Ee:
4103
+ case ue:
4104
+ return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.expr, n, r, t, e, "operand"), n.cancel) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4105
+ case Dn:
4106
+ return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.expr, n, r, t, e, "operand"), n.cancel || (n = L(e.leftValue, n, r, t, e, "leftValue"), n.cancel)) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4107
+ case xe:
4074
4108
  return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n;
4075
- case be: {
4109
+ case Be: {
4076
4110
  if (n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel) return n;
4077
4111
  if (!n.skipChildren) {
4078
4112
  for (const s of e.args)
4079
- if (n = w(s, n, r, t, e, "arg"), n.cancel) return n;
4080
- if (n = w(e.statement, n, r, t, e, "statement"), n.cancel) return n;
4113
+ if (n = L(s, n, r, t, e, "arg"), n.cancel) return n;
4114
+ if (n = L(e.statement, n, r, t, e, "statement"), n.cancel) return n;
4081
4115
  }
4082
4116
  return n = (t == null ? void 0 : t(!1, e, n, l, a)) || n, n;
4083
4117
  }
4084
- case On:
4085
- case In:
4086
- return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = w(e.expr, n, r, t, e, "operand"), n.cancel) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4087
- case Ue: {
4118
+ case Rn:
4119
+ case Bn:
4120
+ return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (n = L(e.expr, n, r, t, e, "operand"), n.cancel) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4121
+ case Xe: {
4088
4122
  if (n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel) return n;
4089
4123
  if (!n.skipChildren) {
4090
4124
  if (e.aDestr !== void 0) {
4091
4125
  for (const s of e.aDestr)
4092
- if (n = w(s, n, r, t, e), n.cancel) return n;
4126
+ if (n = L(s, n, r, t, e), n.cancel) return n;
4093
4127
  }
4094
4128
  if (e.oDestr !== void 0) {
4095
4129
  for (const s of e.oDestr)
4096
- if (n = w(s, n, r, t, e), n.cancel) return n;
4130
+ if (n = L(s, n, r, t, e), n.cancel) return n;
4097
4131
  }
4098
- if (e.expr && (n = w(e.expr, n, r, t, e, "expression")), n.cancel) return n;
4132
+ if (e.expr && (n = L(e.expr, n, r, t, e, "expression")), n.cancel) return n;
4099
4133
  }
4100
4134
  return n = (t == null ? void 0 : t(!1, e, n, l, a)) || n, n;
4101
4135
  }
4102
- case Oe:
4103
- case te:
4104
- case ee: {
4136
+ case De:
4137
+ case ie:
4138
+ case ne: {
4105
4139
  if (n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel) return n;
4106
4140
  if (!n.skipChildren) {
4107
4141
  if (e.aDestr !== void 0) {
4108
4142
  for (const s of e.aDestr)
4109
- if (n = w(s, n, r, t, e), n.cancel) return n;
4143
+ if (n = L(s, n, r, t, e), n.cancel) return n;
4110
4144
  }
4111
4145
  if (e.oDestr !== void 0) {
4112
4146
  for (const s of e.oDestr)
4113
- if (n = w(s, n, r, t, e), n.cancel) return n;
4147
+ if (n = L(s, n, r, t, e), n.cancel) return n;
4114
4148
  }
4115
4149
  }
4116
4150
  return n = (t == null ? void 0 : t(!1, e, n, l, a)) || n, n;
4117
4151
  }
4152
+ case Wn:
4153
+ return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (e.expr && (n = L(e.expr, n, r, t, e, "expression")), n.cancel) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4118
4154
  case bn:
4119
- return n = (t == null ? void 0 : t(!0, e, n, l, a)) || n, n.cancel || !n.skipChildren && (e.expr && (n = w(e.expr, n, r, t, e, "expression")), n.cancel) || (n = (t == null ? void 0 : t(!1, e, n, l, a)) || n), n;
4120
- case Tn:
4121
4155
  return n;
4122
- case Dn:
4156
+ case Pn:
4123
4157
  return n;
4124
4158
  default:
4125
4159
  return n;
4126
4160
  }
4127
4161
  }
4128
- function ar(e) {
4162
+ function ur(e) {
4129
4163
  return e.type !== "ScriptModule";
4130
4164
  }
4131
- function or(e, n) {
4165
+ function fr(e, n) {
4132
4166
  const r = /* @__PURE__ */ new Map(), t = {}, l = a(e, n);
4133
4167
  return !l || Object.keys(t).length > 0 ? t : l;
4134
4168
  function a(s, o) {
4135
4169
  if (r.has(s))
4136
4170
  return r.get(s);
4137
- const c = new Fe(o);
4138
- let R = [];
4171
+ const c = new Ge(o);
4172
+ let b = [];
4139
4173
  try {
4140
- R = c.parseStatements();
4174
+ b = c.parseStatements();
4141
4175
  } catch {
4142
4176
  return t[s] = c.errors, null;
4143
4177
  }
4144
- const T = c.current;
4145
- if (T.type !== i.Eof)
4178
+ const w = c.current;
4179
+ if (w.type !== i.Eof)
4146
4180
  return t[s] ?? (t[s] = []), t[s].push({
4147
4181
  code: "W002",
4148
- text: Ie.W002.replace(/\{(\d+)}/g, () => T.text),
4149
- position: T.startLine,
4150
- line: T.startLine,
4151
- column: T.startColumn
4182
+ text: Re.W002.replace(/\{(\d+)}/g, () => w.text),
4183
+ position: w.startLine,
4184
+ line: w.startLine,
4185
+ column: w.startColumn
4152
4186
  }), null;
4153
4187
  const h = [], F = {};
4154
- R.filter((v) => v.type === De).forEach((v) => {
4155
- const _ = v;
4188
+ b.filter((T) => T.type === We).forEach((T) => {
4189
+ const _ = T;
4156
4190
  if (F[_.id.name]) {
4157
- H("W020", v, _.id.name);
4191
+ Q("W020", T, _.id.name);
4158
4192
  return;
4159
4193
  }
4160
4194
  F[_.id.name] = _;
@@ -4163,49 +4197,49 @@ function or(e, n) {
4163
4197
  type: "ScriptModule",
4164
4198
  name: s,
4165
4199
  functions: F,
4166
- statements: R,
4200
+ statements: b,
4167
4201
  sources: /* @__PURE__ */ new Map()
4168
4202
  };
4169
4203
  if (r.set(s, x), h.length > 0)
4170
4204
  return t[s] = h, null;
4171
4205
  return x;
4172
- function H(v, _, ...$) {
4173
- var U, J, Y;
4174
- let m = Ie[v];
4175
- $ && $.forEach(
4176
- (Z, X) => m = m.replaceAll(`{${X}}`, $[X].toString())
4206
+ function Q(T, _, ...G) {
4207
+ var q, $, C;
4208
+ let S = Re[T];
4209
+ G && G.forEach(
4210
+ (fe, X) => S = S.replaceAll(`{${X}}`, G[X].toString())
4177
4211
  ), h.push({
4178
- code: v,
4179
- text: Ie[v].replace(/\{(\d+)}/g, (Z, X) => $[X]),
4180
- position: (U = _.startToken) == null ? void 0 : U.startPosition,
4181
- line: (J = _.startToken) == null ? void 0 : J.startLine,
4182
- column: (Y = _.startToken) == null ? void 0 : Y.startColumn
4212
+ code: T,
4213
+ text: Re[T].replace(/\{(\d+)}/g, (fe, X) => G[X]),
4214
+ position: (q = _.startToken) == null ? void 0 : q.startPosition,
4215
+ line: ($ = _.startToken) == null ? void 0 : $.startLine,
4216
+ column: (C = _.startToken) == null ? void 0 : C.startColumn
4183
4217
  });
4184
4218
  }
4185
4219
  }
4186
4220
  }
4187
- const We = "__PARSED__";
4188
- function cr(e, n) {
4221
+ const Me = "__PARSED__";
4222
+ function hr(e, n) {
4189
4223
  const r = {
4190
4224
  vars: {},
4191
4225
  moduleErrors: {},
4192
4226
  functions: {}
4193
- }, t = {}, l = or(e, n);
4194
- if (ar(l))
4227
+ }, t = {}, l = fr(e, n);
4228
+ if (ur(l))
4195
4229
  return { ...r, moduleErrors: l };
4196
4230
  return l.statements.forEach((s) => {
4197
4231
  switch (s.type) {
4198
- case qe:
4232
+ case Qe:
4199
4233
  s.decls.forEach((o) => {
4200
4234
  if (o.id.name in r.vars)
4201
4235
  throw new Error(`Duplicated var declaration: '${o.id.name}'`);
4202
4236
  r.vars[o.id.name] = {
4203
- [We]: !0,
4237
+ [Me]: !0,
4204
4238
  tree: o.expr
4205
4239
  };
4206
4240
  });
4207
4241
  break;
4208
- case De:
4242
+ case We:
4209
4243
  a(s);
4210
4244
  break;
4211
4245
  default:
@@ -4218,7 +4252,7 @@ function cr(e, n) {
4218
4252
  if (s.id.name in r.functions)
4219
4253
  throw new Error(`Duplicated function declaration: '${s.id.name}'`);
4220
4254
  const o = {
4221
- type: be,
4255
+ type: Be,
4222
4256
  args: s.args.slice(),
4223
4257
  statement: s.stmt
4224
4258
  // closureContext: obtainClosures({
@@ -4229,15 +4263,15 @@ function cr(e, n) {
4229
4263
  // }),
4230
4264
  };
4231
4265
  t[s.id.name] = {
4232
- [We]: !0,
4266
+ [Me]: !0,
4233
4267
  tree: o
4234
4268
  }, r.functions[s.id.name] = {
4235
- [We]: !0,
4269
+ [Me]: !0,
4236
4270
  tree: o
4237
4271
  };
4238
4272
  }
4239
4273
  }
4240
- function Tr(e) {
4274
+ function br(e) {
4241
4275
  if (!e) return;
4242
4276
  const n = {
4243
4277
  data: null,
@@ -4251,15 +4285,15 @@ function Tr(e) {
4251
4285
  });
4252
4286
  function r(t) {
4253
4287
  const l = (a, s, o) => (a && s && (delete s.startToken, delete s.endToken), o);
4254
- w(t.tree, n, l, l);
4288
+ L(t.tree, n, l, l);
4255
4289
  }
4256
4290
  }
4257
- class Re extends Error {
4291
+ class Pe extends Error {
4258
4292
  constructor(n, r) {
4259
- super(`${r ? `${r}: ` : ""}${n}`), this.code = r, Object.setPrototypeOf(this, Re.prototype);
4293
+ super(`${r ? `${r}: ` : ""}${n}`), this.code = r, Object.setPrototypeOf(this, Pe.prototype);
4260
4294
  }
4261
4295
  }
4262
- const ur = {
4296
+ const dr = {
4263
4297
  U001: "Unexpected token: {0}.",
4264
4298
  U002: "A component definition can have exactly one XMLUI element.",
4265
4299
  U003: "A '<' token expected.",
@@ -4304,7 +4338,7 @@ const ur = {
4304
4338
  T027: "Cannot resolve namespace '{0}'. It was not defined in any of the ancestor components.",
4305
4339
  T028: "Incorrect namespace value '{0}'. {1}",
4306
4340
  T029: "Incorrect scheme specified before ':' (colon) in namespace {0}. Delete it to get the default '{1}'."
4307
- }, en = "Component", Pe = /^[A-Z]/, nn = /^on[A-Z]/, fr = ["name", "value"], hr = 9, ye = "component-ns", pr = "app-ns", dr = "#app-ns", kr = "core-ns", gr = "#xmlui-core-ns", ie = {
4341
+ }, ln = "Component", qe = /^[A-Z]/, sn = /^on[A-Z]/, pr = ["name", "value"], kr = 9, $e = "component-ns", gr = "app-ns", Er = "#app-ns", mr = "core-ns", xr = "#xmlui-core-ns", se = {
4308
4342
  property: "property",
4309
4343
  event: "event",
4310
4344
  variable: "variable",
@@ -4314,15 +4348,15 @@ const ur = {
4314
4348
  item: "item",
4315
4349
  field: "field"
4316
4350
  };
4317
- let Er = 0;
4318
- function vr(e, n, r) {
4319
- const t = (k) => k.text ?? n(k), l = _r(e), a = J(l), s = [], o = [];
4351
+ let _r = 0;
4352
+ function Dr(e, n, r) {
4353
+ const t = (k) => k.text ?? n(k), l = Ar(e), a = $(l), s = [], o = [];
4320
4354
  return c(s, a);
4321
4355
  function c(k, f) {
4322
- const g = an(f, t, o);
4323
- if (g === en)
4324
- return T(f);
4325
- let d = {
4356
+ const g = fn(f, t, o);
4357
+ if (g === ln)
4358
+ return w(f);
4359
+ let p = {
4326
4360
  type: g,
4327
4361
  debug: {
4328
4362
  source: {
@@ -4332,12 +4366,12 @@ function vr(e, n, r) {
4332
4366
  }
4333
4367
  }
4334
4368
  };
4335
- return h(k, d, f), d;
4369
+ return h(k, p, f), p;
4336
4370
  }
4337
- function R(k, f) {
4338
- const g = an(f, t, o);
4339
- g === en && P("T006");
4340
- let d = {
4371
+ function b(k, f) {
4372
+ const g = fn(f, t, o);
4373
+ g === ln && B("T006");
4374
+ let p = {
4341
4375
  type: g,
4342
4376
  debug: {
4343
4377
  source: {
@@ -4347,40 +4381,40 @@ function vr(e, n, r) {
4347
4381
  }
4348
4382
  }
4349
4383
  };
4350
- return h(k, d, f), d;
4351
- }
4352
- function T(k) {
4353
- const f = pe(k).map(m), g = f.find((W) => W.name === "name");
4354
- g || P("T003"), Pe.test(g.value) || P("T004");
4355
- let d;
4356
- const A = f.filter((W) => W.startSegment === "method");
4357
- A.length > 0 && (d = {}, A.forEach((W) => {
4358
- d[W.name] = W.value;
4384
+ return h(k, p, f), p;
4385
+ }
4386
+ function w(k) {
4387
+ const f = ke(k).map(S), g = f.find((D) => D.name === "name");
4388
+ g || B("T003"), qe.test(g.value) || B("T004");
4389
+ let p;
4390
+ const A = f.filter((D) => D.startSegment === "method");
4391
+ A.length > 0 && (p = {}, A.forEach((D) => {
4392
+ p[D.name] = D.value;
4359
4393
  }));
4360
- let I;
4361
- const D = f.filter((W) => W.startSegment === "var");
4362
- D.length > 0 && (I = {}, D.forEach((W) => {
4363
- I[W.name] = W.value;
4394
+ let O;
4395
+ const I = f.filter((D) => D.startSegment === "var");
4396
+ I.length > 0 && (O = {}, I.forEach((D) => {
4397
+ O[D.name] = D.value;
4364
4398
  }));
4365
- const E = de(k), S = E.filter(
4366
- (W) => W.kind === u.ElementNode && !(re(W, t) in ie)
4399
+ const P = ge(k), U = P.filter(
4400
+ (D) => D.kind === u.ElementNode && !(te(D, t) in se)
4367
4401
  );
4368
- S.length === 0 && S.push(rn(""));
4369
- const L = [], b = [];
4370
- for (let W of E)
4371
- if (W.kind === u.ElementNode) {
4372
- const ce = re(W, t);
4373
- ce === ie.variable ? b.push(W) : ce in ie && L.push(W);
4402
+ U.length === 0 && U.push(an(""));
4403
+ const R = [], m = [];
4404
+ for (let D of P)
4405
+ if (D.kind === u.ElementNode) {
4406
+ const J = te(D, t);
4407
+ J === se.variable ? m.push(D) : J in se && R.push(D);
4374
4408
  }
4375
- let N;
4376
- S.length > 1 || b.length > 0 ? N = tn([...b, ...S]) : N = S[0], o.push(/* @__PURE__ */ new Map()), f.filter((W) => W.namespace === "xmlns").forEach((W) => {
4377
- sn(o, N, W.unsegmentedName, W.value);
4409
+ let E;
4410
+ U.length > 1 || m.length > 0 ? E = on([...m, ...U]) : E = U[0], o.push(/* @__PURE__ */ new Map()), f.filter((D) => D.namespace === "xmlns").forEach((D) => {
4411
+ un(o, E, D.unsegmentedName, D.value);
4378
4412
  });
4379
- let O = R(s, N);
4413
+ let N = b(s, E);
4380
4414
  o.pop();
4381
- const B = {
4415
+ const v = {
4382
4416
  name: g.value,
4383
- component: O,
4417
+ component: N,
4384
4418
  debug: {
4385
4419
  source: {
4386
4420
  start: k.start,
@@ -4389,55 +4423,55 @@ function vr(e, n, r) {
4389
4423
  }
4390
4424
  }
4391
4425
  };
4392
- d && (B.api = d), I && (O.vars = { ...O.vars, ...I }), O.debug = {
4426
+ p && (v.api = p), O && (N.vars = { ...N.vars, ...O }), N.debug = {
4393
4427
  source: {
4394
- start: N.start,
4395
- end: N.end,
4428
+ start: E.start,
4429
+ end: E.end,
4396
4430
  fileId: r
4397
4431
  }
4398
4432
  };
4399
- const q = ln(k, L);
4400
- return h(s, B, q), B;
4433
+ const y = cn(k, R);
4434
+ return h(s, v, y), v;
4401
4435
  }
4402
4436
  function h(k, f, g) {
4403
- var S;
4404
- const d = !j(f), A = pe(g);
4405
- if (o.push(/* @__PURE__ */ new Map()), A.forEach((L) => {
4406
- F(f, L);
4407
- }), de(g).forEach((L) => {
4408
- if (L.kind === u.Script) {
4409
- pe(L).length > 0 && P("T022");
4410
- const N = t(L), O = N.slice(
4411
- N.indexOf(">") + 1,
4412
- N.lastIndexOf("</")
4437
+ var U;
4438
+ const p = !K(f), A = ke(g);
4439
+ if (o.push(/* @__PURE__ */ new Map()), A.forEach((R) => {
4440
+ F(f, R);
4441
+ }), ge(g).forEach((R) => {
4442
+ if (R.kind === u.Script) {
4443
+ ke(R).length > 0 && B("T022");
4444
+ const E = t(R), N = E.slice(
4445
+ E.indexOf(">") + 1,
4446
+ E.lastIndexOf("</")
4413
4447
  );
4414
4448
  f.script ?? (f.script = ""), f.script.length > 0 && (f.script += `
4415
- `), f.script += O;
4449
+ `), f.script += N;
4416
4450
  return;
4417
4451
  }
4418
- if (L.kind === u.TextNode && !d) {
4419
- f.children = Te(f.children, t(L));
4452
+ if (R.kind === u.TextNode && !p) {
4453
+ f.children = Ie(f.children, t(R));
4420
4454
  return;
4421
4455
  }
4422
- const b = re(L, t);
4423
- if (!(d && L.kind === u.ElementNode && !(b in ie))) {
4424
- if (!(b in ie) && !d) {
4425
- const N = R(k, L);
4426
- N && (f.children ? typeof f.children == "string" ? f.children = [f.children, N] : Array.isArray(f.children) && f.children.push(N) : f.children = [N]);
4456
+ const m = te(R, t);
4457
+ if (!(p && R.kind === u.ElementNode && !(m in se))) {
4458
+ if (!(m in se) && !p) {
4459
+ const E = b(k, R);
4460
+ E && (f.children ? typeof f.children == "string" ? f.children = [f.children, E] : Array.isArray(f.children) && f.children.push(E) : f.children = [E]);
4427
4461
  return;
4428
4462
  }
4429
- switch (b) {
4463
+ switch (m) {
4430
4464
  case "property":
4431
4465
  _(
4432
4466
  k,
4433
4467
  f,
4434
- L,
4435
- (N) => {
4436
- var O;
4437
- return j(f) ? (O = f.props) == null ? void 0 : O[N] : void 0;
4468
+ R,
4469
+ (E) => {
4470
+ var N;
4471
+ return K(f) ? (N = f.props) == null ? void 0 : N[E] : void 0;
4438
4472
  },
4439
- (N, O) => {
4440
- j(f) && (f.props ?? (f.props = {}), f.props[N] = O);
4473
+ (E, N) => {
4474
+ K(f) && (f.props ?? (f.props = {}), f.props[E] = N);
4441
4475
  }
4442
4476
  );
4443
4477
  return;
@@ -4445,295 +4479,295 @@ function vr(e, n, r) {
4445
4479
  _(
4446
4480
  k,
4447
4481
  f,
4448
- L,
4449
- (N) => {
4450
- var O;
4451
- return j(f) ? (O = f.events) == null ? void 0 : O[N] : void 0;
4482
+ R,
4483
+ (E) => {
4484
+ var N;
4485
+ return K(f) ? (N = f.events) == null ? void 0 : N[E] : void 0;
4452
4486
  },
4453
- (N, O) => {
4454
- j(f) && (f.events ?? (f.events = {}), f.events[N] = K(O));
4487
+ (E, N) => {
4488
+ K(f) && (f.events ?? (f.events = {}), f.events[E] = j(N));
4455
4489
  },
4456
- (N) => {
4457
- nn.test(N) && P("T008", N);
4490
+ (E) => {
4491
+ sn.test(E) && B("T008", E);
4458
4492
  }
4459
4493
  );
4460
4494
  return;
4461
- case ie.variable:
4495
+ case se.variable:
4462
4496
  _(
4463
4497
  k,
4464
4498
  f,
4465
- L,
4466
- (N) => {
4467
- var O;
4468
- return j(f) ? (O = f.vars) == null ? void 0 : O[N] : void 0;
4499
+ R,
4500
+ (E) => {
4501
+ var N;
4502
+ return K(f) ? (N = f.vars) == null ? void 0 : N[E] : void 0;
4469
4503
  },
4470
- (N, O) => {
4471
- j(f) && (f.vars ?? (f.vars = {}), f.vars[N] = O);
4504
+ (E, N) => {
4505
+ K(f) && (f.vars ?? (f.vars = {}), f.vars[E] = N);
4472
4506
  }
4473
4507
  );
4474
4508
  return;
4475
4509
  case "loaders":
4476
- v(k, f, L);
4510
+ T(k, f, R);
4477
4511
  return;
4478
4512
  case "uses":
4479
- $(f, L);
4513
+ G(f, R);
4480
4514
  return;
4481
4515
  case "method":
4482
4516
  _(
4483
4517
  k,
4484
4518
  f,
4485
- L,
4486
- (N) => {
4487
- var O;
4488
- return j(f) ? (O = f.api) == null ? void 0 : O[N] : void 0;
4519
+ R,
4520
+ (E) => {
4521
+ var N;
4522
+ return K(f) ? (N = f.api) == null ? void 0 : N[E] : void 0;
4489
4523
  },
4490
- (N, O) => {
4491
- f.api ?? (f.api = {}), f.api[N] = O;
4524
+ (E, N) => {
4525
+ f.api ?? (f.api = {}), f.api[E] = N;
4492
4526
  }
4493
4527
  );
4494
4528
  return;
4495
4529
  default:
4496
- P("T009", b);
4530
+ B("T009", m);
4497
4531
  return;
4498
4532
  }
4499
4533
  }
4500
4534
  }), o.pop(), !f.script || f.script.trim().length === 0)
4501
4535
  return;
4502
- const D = new Fe(f.script);
4536
+ const I = new Ge(f.script);
4503
4537
  try {
4504
- D.parseStatements(), f.scriptCollected = cr("Main", f.script);
4505
- } catch (L) {
4506
- D.errors && D.errors.length > 0 ? f.scriptError = D.errors : f.scriptError = L;
4538
+ I.parseStatements(), f.scriptCollected = hr("Main", f.script);
4539
+ } catch (R) {
4540
+ I.errors && I.errors.length > 0 ? f.scriptError = I.errors : f.scriptError = R;
4507
4541
  }
4508
- const E = ((S = f.scriptCollected) == null ? void 0 : S.moduleErrors) ?? {};
4509
- Object.keys(E).length > 0 && (f.scriptError = E);
4542
+ const P = ((U = f.scriptCollected) == null ? void 0 : U.moduleErrors) ?? {};
4543
+ Object.keys(P).length > 0 && (f.scriptError = P);
4510
4544
  }
4511
4545
  function F(k, f) {
4512
- const { namespace: g, startSegment: d, name: A, value: I, unsegmentedName: D } = m(f);
4546
+ const { namespace: g, startSegment: p, name: A, value: O, unsegmentedName: I } = S(f);
4513
4547
  if (g === "xmlns")
4514
- return sn(o, k, D, I);
4515
- if (!j(k)) {
4516
- if (d && d !== "method" && d !== "var") {
4517
- P("T021");
4548
+ return un(o, k, I, O);
4549
+ if (!K(k)) {
4550
+ if (p && p !== "method" && p !== "var") {
4551
+ B("T021");
4518
4552
  return;
4519
4553
  }
4520
- if (A === "name" && !d)
4554
+ if (A === "name" && !p)
4521
4555
  return;
4522
- !d && A && P("T021", A);
4556
+ !p && A && B("T021", A);
4523
4557
  return;
4524
4558
  }
4525
4559
  switch (A) {
4526
4560
  case "id":
4527
- k.uid = I;
4561
+ k.uid = O;
4528
4562
  return;
4529
4563
  case "testId":
4530
- k.testId = I;
4564
+ k.testId = O;
4531
4565
  return;
4532
4566
  case "when":
4533
- k.when = I;
4567
+ k.when = O;
4534
4568
  return;
4535
4569
  default:
4536
- if (d === "var")
4537
- k.vars ?? (k.vars = {}), k.vars[A] = I;
4538
- else if (d === "method")
4539
- k.api ?? (k.api = {}), k.api[A] = I;
4540
- else if (d === "event")
4541
- k.events ?? (k.events = {}), k.events[A] = K(I);
4542
- else if (nn.test(A)) {
4570
+ if (p === "var")
4571
+ k.vars ?? (k.vars = {}), k.vars[A] = O;
4572
+ else if (p === "method")
4573
+ k.api ?? (k.api = {}), k.api[A] = O;
4574
+ else if (p === "event")
4575
+ k.events ?? (k.events = {}), k.events[A] = j(O);
4576
+ else if (sn.test(A)) {
4543
4577
  k.events ?? (k.events = {});
4544
- const S = A[2].toLowerCase() + A.substring(3);
4545
- k.events[S] = K(I);
4578
+ const U = A[2].toLowerCase() + A.substring(3);
4579
+ k.events[U] = j(O);
4546
4580
  } else
4547
- k.props ?? (k.props = {}), k.props[A] = I;
4581
+ k.props ?? (k.props = {}), k.props[A] = O;
4548
4582
  return;
4549
4583
  }
4550
4584
  }
4551
4585
  function x(k, f) {
4552
4586
  let g = null;
4553
4587
  if (!f) return g;
4554
- let d = null;
4588
+ let p = null;
4555
4589
  return f.forEach((A) => {
4556
4590
  if (A.kind === u.TextNode) {
4557
- g = Te(g, t(A));
4591
+ g = Ie(g, t(A));
4558
4592
  return;
4559
4593
  }
4560
4594
  if (A.kind !== u.ElementNode) return;
4561
- const I = re(A, t);
4562
- if (I !== "field" && I !== "item") {
4563
- P("T016");
4595
+ const O = te(A, t);
4596
+ if (O !== "field" && O !== "item") {
4597
+ B("T016");
4564
4598
  return;
4565
4599
  }
4566
- if (I === "field") {
4567
- if (!d)
4568
- d = I, g = {};
4569
- else if (d !== I) {
4570
- P("T017");
4600
+ if (O === "field") {
4601
+ if (!p)
4602
+ p = O, g = {};
4603
+ else if (p !== O) {
4604
+ B("T017");
4571
4605
  return;
4572
4606
  }
4573
- } else if (I === "item") {
4574
- if (!d)
4575
- d = I, g = [];
4576
- else if (d !== I) {
4577
- P("T017");
4607
+ } else if (O === "item") {
4608
+ if (!p)
4609
+ p = O, g = [];
4610
+ else if (p !== O) {
4611
+ B("T017");
4578
4612
  return;
4579
4613
  }
4580
4614
  }
4581
- let D = H(k, A, I === "field");
4582
- if (!D)
4615
+ let I = Q(k, A, O === "field");
4616
+ if (!I)
4583
4617
  return null;
4584
- d === "field" ? g[D.name] = D.value : g.push(D.value);
4618
+ p === "field" ? g[I.name] = I.value : g.push(I.value);
4585
4619
  }), g;
4586
4620
  }
4587
- function H(k, f, g = !0) {
4588
- const d = re(f, t), A = de(f), I = A.filter(
4589
- (B) => B.kind === u.ElementNode && Pe.test(re(B, t))
4590
- ), D = A.filter(
4591
- (B) => B.kind === u.ElementNode && !Pe.test(re(B, t))
4592
- ), E = pe(f).map(m), S = E.filter((B) => fr.indexOf(B.name) >= 0);
4593
- if (E.length > S.length)
4594
- return P("T011", d), null;
4595
- const L = S.find((B) => B.name === "name");
4621
+ function Q(k, f, g = !0) {
4622
+ const p = te(f, t), A = ge(f), O = A.filter(
4623
+ (v) => v.kind === u.ElementNode && qe.test(te(v, t))
4624
+ ), I = A.filter(
4625
+ (v) => v.kind === u.ElementNode && !qe.test(te(v, t))
4626
+ ), P = ke(f).map(S), U = P.filter((v) => pr.indexOf(v.name) >= 0);
4627
+ if (P.length > U.length)
4628
+ return B("T011", p), null;
4629
+ const R = U.find((v) => v.name === "name");
4596
4630
  if (g) {
4597
- if (!(L != null && L.value))
4598
- return P("T012", d), null;
4599
- } else if (L)
4600
- return P("T018", d), null;
4601
- const b = L == null ? void 0 : L.value, N = S.find((B) => B.name === "value");
4602
- if (N && N.value === void 0)
4603
- return P("T019", d), null;
4604
- if (b && I.length >= 1) {
4605
- if (D.length > 0)
4606
- return P("T020"), null;
4607
- const B = I.map((q) => R(k, q));
4631
+ if (!(R != null && R.value))
4632
+ return B("T012", p), null;
4633
+ } else if (R)
4634
+ return B("T018", p), null;
4635
+ const m = R == null ? void 0 : R.value, E = U.find((v) => v.name === "value");
4636
+ if (E && E.value === void 0)
4637
+ return B("T019", p), null;
4638
+ if (m && O.length >= 1) {
4639
+ if (I.length > 0)
4640
+ return B("T020"), null;
4641
+ const v = O.map((y) => b(k, y));
4608
4642
  return {
4609
- name: b,
4610
- value: B.length === 1 ? B[0] : B
4643
+ name: m,
4644
+ value: v.length === 1 ? v[0] : v
4611
4645
  };
4612
4646
  }
4613
- let O = N == null ? void 0 : N.value;
4614
- return O === null ? null : typeof O == "string" ? { name: b, value: O } : { name: b, value: x(k, A) };
4647
+ let N = E == null ? void 0 : E.value;
4648
+ return N === null ? null : typeof N == "string" ? { name: m, value: N } : { name: m, value: x(k, A) };
4615
4649
  }
4616
- function v(k, f, g) {
4617
- var I;
4618
- if (!j(f)) {
4619
- P("T009", "loaders");
4650
+ function T(k, f, g) {
4651
+ var O;
4652
+ if (!K(f)) {
4653
+ B("T009", "loaders");
4620
4654
  return;
4621
4655
  }
4622
- const d = de(g);
4623
- if (d.length === 0 && (f.loaders ?? (f.loaders = [])), (I = g.children) == null ? void 0 : I.some((D) => D.kind === u.AttributeListNode)) {
4624
- P("T014", "attributes");
4656
+ const p = ge(g);
4657
+ if (p.length === 0 && (f.loaders ?? (f.loaders = [])), (O = g.children) == null ? void 0 : O.some((I) => I.kind === u.AttributeListNode)) {
4658
+ B("T014", "attributes");
4625
4659
  return;
4626
4660
  }
4627
- d.forEach((D) => {
4628
- if (D.kind === u.TextNode) {
4629
- P("T010", "loader");
4661
+ p.forEach((I) => {
4662
+ if (I.kind === u.TextNode) {
4663
+ B("T010", "loader");
4630
4664
  return;
4631
4665
  }
4632
- const E = R(k, D);
4633
- if (!E.uid) {
4634
- P("T013");
4666
+ const P = b(k, I);
4667
+ if (!P.uid) {
4668
+ B("T013");
4635
4669
  return;
4636
4670
  }
4637
- if (E.vars) {
4638
- P("T014", "vars");
4671
+ if (P.vars) {
4672
+ B("T014", "vars");
4639
4673
  return;
4640
4674
  }
4641
- if (E.loaders) {
4642
- P("T014", "loaders");
4675
+ if (P.loaders) {
4676
+ B("T014", "loaders");
4643
4677
  return;
4644
4678
  }
4645
- if (E.uses) {
4646
- P("T014", "uses");
4679
+ if (P.uses) {
4680
+ B("T014", "uses");
4647
4681
  return;
4648
4682
  }
4649
- f.loaders ?? (f.loaders = []), f.loaders.push(E);
4683
+ f.loaders ?? (f.loaders = []), f.loaders.push(P);
4650
4684
  });
4651
4685
  }
4652
- function _(k, f, g, d, A, I) {
4653
- const D = H(k, g);
4654
- if (!D)
4686
+ function _(k, f, g, p, A, O) {
4687
+ const I = Q(k, g);
4688
+ if (!I)
4655
4689
  return;
4656
- I == null || I((D == null ? void 0 : D.name) ?? "");
4657
- const E = D.name, S = D.value;
4658
- if ((D == null ? void 0 : D.value) !== void 0)
4659
- A(E, Te(d(E), S));
4690
+ O == null || O((I == null ? void 0 : I.name) ?? "");
4691
+ const P = I.name, U = I.value;
4692
+ if ((I == null ? void 0 : I.value) !== void 0)
4693
+ A(P, Ie(p(P), U));
4660
4694
  else {
4661
- const L = de(g), b = x(k, L);
4662
- let N = d(E);
4663
- N = Te(N, b), A(E, N);
4695
+ const R = ge(g), m = x(k, R);
4696
+ let E = p(P);
4697
+ E = Ie(E, m), A(P, E);
4664
4698
  }
4665
4699
  }
4666
- function $(k, f) {
4667
- if (!j(k)) {
4668
- P("T009", "uses");
4700
+ function G(k, f) {
4701
+ if (!K(k)) {
4702
+ B("T009", "uses");
4669
4703
  return;
4670
4704
  }
4671
- const g = pe(f).map(m), d = g.find((A) => A.name === "value");
4672
- if (!(d != null && d.value) || g.length !== 1) {
4673
- P("T015", "uses");
4705
+ const g = ke(f).map(S), p = g.find((A) => A.name === "value");
4706
+ if (!(p != null && p.value) || g.length !== 1) {
4707
+ B("T015", "uses");
4674
4708
  return;
4675
4709
  }
4676
- k.uses ?? (k.uses = d.value.split(",").map((A) => A.trim()));
4710
+ k.uses ?? (k.uses = p.value.split(",").map((A) => A.trim()));
4677
4711
  }
4678
- function m(k) {
4712
+ function S(k) {
4679
4713
  let f = k.children[0];
4680
4714
  const g = f.children.length === 3;
4681
- let d;
4682
- g && (d = t(f.children[0]));
4715
+ let p;
4716
+ g && (p = t(f.children[0]));
4683
4717
  let A = t(f.children[f.children.length - 1]);
4684
- const I = A.split(".");
4685
- I.length > 2 && P("T007", k, f);
4686
- let D, E;
4687
- I.length === 2 ? (E = I[0], D = I[1], D.trim() === "" && P("T007", k, D)) : D = A;
4688
- const S = t(k.children[2]), L = S.substring(1, S.length - 1);
4689
- return { namespace: d, startSegment: E, name: D, value: L, unsegmentedName: A };
4690
- }
4691
- function U(k) {
4718
+ const O = A.split(".");
4719
+ O.length > 2 && B("T007", k, f);
4720
+ let I, P;
4721
+ O.length === 2 ? (P = O[0], I = O[1], I.trim() === "" && B("T007", k, I)) : I = A;
4722
+ const U = t(k.children[2]), R = U.substring(1, U.length - 1);
4723
+ return { namespace: p, startSegment: P, name: I, value: R, unsegmentedName: A };
4724
+ }
4725
+ function q(k) {
4692
4726
  for (let f of k) {
4693
- const g = f.children[f.children.length - 1], d = C(t(g));
4694
- d !== null && (g.text = d);
4727
+ const g = f.children[f.children.length - 1], p = pe(t(g));
4728
+ p !== null && (g.text = p);
4695
4729
  }
4696
4730
  }
4697
- function J(k) {
4698
- const f = de(k), g = re(k, t), A = !(g in ie) || g === "property", I = g !== "event" && g !== "method", D = pe(k);
4699
- mr(D), U(D), X(f), he(f, I);
4700
- let E = !1, S = !1;
4701
- for (let O = 0; O < f.length; ++O) {
4702
- const B = f[O];
4703
- let q;
4704
- if (B.kind == u.Script) {
4705
- S = !0;
4731
+ function $(k) {
4732
+ const f = ge(k), g = te(k, t), A = !(g in se) || g === "property", O = g !== "event" && g !== "method", I = ke(k);
4733
+ Nr(I), q(I), X(f), Z(f, O);
4734
+ let P = !1, U = !1;
4735
+ for (let N = 0; N < f.length; ++N) {
4736
+ const v = f[N];
4737
+ let y;
4738
+ if (v.kind == u.Script) {
4739
+ U = !0;
4706
4740
  continue;
4707
4741
  }
4708
- if (B.kind === u.ElementNode) {
4709
- q = J(B), f[O] = q;
4742
+ if (v.kind === u.ElementNode) {
4743
+ y = $(v), f[N] = y;
4710
4744
  continue;
4711
4745
  }
4712
- let W = t(B);
4713
- B.kind === u.StringLiteral ? W = W.slice(1, -1) : B.kind === u.CData ? E = !0 : (B.kind, u.TextNode), A ? E ? q = xr(W) : q = rn(W) : q = {
4746
+ let D = t(v);
4747
+ v.kind === u.StringLiteral ? D = D.slice(1, -1) : v.kind === u.CData ? P = !0 : (v.kind, u.TextNode), A ? P ? y = Sr(D) : y = an(D) : y = {
4714
4748
  kind: u.TextNode,
4715
- text: W
4716
- }, f[O] = q;
4749
+ text: D
4750
+ }, f[N] = y;
4717
4751
  }
4718
- const L = [], b = [];
4719
- let N = !1;
4720
- for (const O of f) {
4721
- if (O.kind === u.ElementNode) {
4722
- if ((re(O, t) ?? void 0) in ie) {
4723
- L.push(O);
4752
+ const R = [], m = [];
4753
+ let E = !1;
4754
+ for (const N of f) {
4755
+ if (N.kind === u.ElementNode) {
4756
+ if ((te(N, t) ?? void 0) in se) {
4757
+ R.push(N);
4724
4758
  continue;
4725
4759
  }
4726
- N = !0;
4760
+ E = !0;
4727
4761
  }
4728
- b.push(O);
4762
+ m.push(N);
4729
4763
  }
4730
- if (S && N) {
4731
- const O = tn(b);
4732
- return L.push(O), ln(k, L);
4764
+ if (U && E) {
4765
+ const N = on(m);
4766
+ return R.push(N), cn(k, R);
4733
4767
  }
4734
4768
  return k;
4735
4769
  }
4736
- function Y(k) {
4770
+ function C(k) {
4737
4771
  for (let f = 0; f < k.length; ++f)
4738
4772
  if (k[f].kind === u.StringLiteral || k[f].kind === u.TextNode) {
4739
4773
  const g = /[\f\n\r\t\v\u0020\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/g;
@@ -4743,93 +4777,93 @@ function vr(e, n, r) {
4743
4777
  );
4744
4778
  }
4745
4779
  }
4746
- function Z(k) {
4780
+ function fe(k) {
4747
4781
  for (let f = 0; f < k.length; ++f)
4748
- k[f].kind === u.CData && (k[f].text = t(k[f]).slice(hr, -3));
4782
+ k[f].kind === u.CData && (k[f].text = t(k[f]).slice(kr, -3));
4749
4783
  }
4750
4784
  function X(k) {
4751
4785
  for (let f of k)
4752
4786
  if (f.kind === u.StringLiteral || f.kind === u.TextNode) {
4753
- const g = C(t(f));
4787
+ const g = pe(t(f));
4754
4788
  g !== null && (f.text = g);
4755
4789
  }
4756
4790
  }
4757
- function C(k) {
4791
+ function pe(k) {
4758
4792
  let f = "", g = 0;
4759
- for (let d = 0; d < k.length; ++d)
4760
- if (k.charCodeAt(d) === p.ampersand)
4761
- switch (k.charCodeAt(d + 1)) {
4762
- case p.a:
4763
- switch (k.charCodeAt(d + 2)) {
4764
- case p.m:
4765
- k.charCodeAt(d + 3) === p.p && k.charCodeAt(d + 4) === p.semicolon && (f = f + k.substring(g, d) + "&", d += 4, g = d + 1);
4793
+ for (let p = 0; p < k.length; ++p)
4794
+ if (k.charCodeAt(p) === d.ampersand)
4795
+ switch (k.charCodeAt(p + 1)) {
4796
+ case d.a:
4797
+ switch (k.charCodeAt(p + 2)) {
4798
+ case d.m:
4799
+ k.charCodeAt(p + 3) === d.p && k.charCodeAt(p + 4) === d.semicolon && (f = f + k.substring(g, p) + "&", p += 4, g = p + 1);
4766
4800
  break;
4767
- case p.p:
4768
- k.charCodeAt(d + 3) === p.o && k.charCodeAt(d + 4) === p.s && k.charCodeAt(d + 5) === p.semicolon && (f = f + k.substring(g, d) + "'", d += 5, g = d + 1);
4801
+ case d.p:
4802
+ k.charCodeAt(p + 3) === d.o && k.charCodeAt(p + 4) === d.s && k.charCodeAt(p + 5) === d.semicolon && (f = f + k.substring(g, p) + "'", p += 5, g = p + 1);
4769
4803
  break;
4770
4804
  }
4771
4805
  break;
4772
- case p.g:
4773
- k.charCodeAt(d + 2) === p.t && k.charCodeAt(d + 3) === p.semicolon && (f = f + k.substring(g, d) + ">", d += 3, g = d + 1);
4806
+ case d.g:
4807
+ k.charCodeAt(p + 2) === d.t && k.charCodeAt(p + 3) === d.semicolon && (f = f + k.substring(g, p) + ">", p += 3, g = p + 1);
4774
4808
  break;
4775
- case p.l:
4776
- k.charCodeAt(d + 2) === p.t && k.charCodeAt(d + 3) === p.semicolon && (f = f + k.substring(g, d) + "<", d += 3, g = d + 1);
4809
+ case d.l:
4810
+ k.charCodeAt(p + 2) === d.t && k.charCodeAt(p + 3) === d.semicolon && (f = f + k.substring(g, p) + "<", p += 3, g = p + 1);
4777
4811
  break;
4778
- case p.q:
4779
- k.charCodeAt(d + 2) === p.u && k.charCodeAt(d + 3) === p.o && k.charCodeAt(d + 4) === p.t && k.charCodeAt(d + 5) === p.semicolon && (f = f + k.substring(g, d) + '"', d += 5, g = d + 1);
4812
+ case d.q:
4813
+ k.charCodeAt(p + 2) === d.u && k.charCodeAt(p + 3) === d.o && k.charCodeAt(p + 4) === d.t && k.charCodeAt(p + 5) === d.semicolon && (f = f + k.substring(g, p) + '"', p += 5, g = p + 1);
4780
4814
  break;
4781
- case p.n:
4782
- k.charCodeAt(d + 2) === p.b && k.charCodeAt(d + 3) === p.s && k.charCodeAt(d + 4) === p.p && k.charCodeAt(d + 5) === p.semicolon && (f = f + k.substring(g, d) + " ", d += 5, g = d + 1);
4815
+ case d.n:
4816
+ k.charCodeAt(p + 2) === d.b && k.charCodeAt(p + 3) === d.s && k.charCodeAt(p + 4) === d.p && k.charCodeAt(p + 5) === d.semicolon && (f = f + k.substring(g, p) + " ", p += 5, g = p + 1);
4783
4817
  break;
4784
4818
  }
4785
4819
  return g === 0 ? null : (f += k.substring(g), f);
4786
4820
  }
4787
- function he(k, f) {
4788
- f && Y(k), Z(k);
4821
+ function Z(k, f) {
4822
+ f && C(k), fe(k);
4789
4823
  for (let g = k.length - 1; g > 0; --g) {
4790
- const d = k[g - 1], A = k[g];
4791
- d.kind === u.StringLiteral && A.kind === u.CData ? (k[g - 1] = {
4824
+ const p = k[g - 1], A = k[g];
4825
+ p.kind === u.StringLiteral && A.kind === u.CData ? (k[g - 1] = {
4792
4826
  kind: u.CData,
4793
- text: t(d).slice(1, -1) + t(A)
4794
- }, k.pop()) : d.kind === u.CData && A.kind === u.StringLiteral ? (k[g - 1] = {
4827
+ text: t(p).slice(1, -1) + t(A)
4828
+ }, k.pop()) : p.kind === u.CData && A.kind === u.StringLiteral ? (k[g - 1] = {
4795
4829
  kind: u.CData,
4796
- text: t(d) + t(A).slice(1, -1)
4797
- }, k.pop()) : d.kind === u.CData && A.kind === u.TextNode ? (k[g - 1] = {
4830
+ text: t(p) + t(A).slice(1, -1)
4831
+ }, k.pop()) : p.kind === u.CData && A.kind === u.TextNode ? (k[g - 1] = {
4798
4832
  kind: u.CData,
4799
- text: t(d) + t(A)
4800
- }, k.pop()) : d.kind === u.CData && A.kind === u.CData ? (k[g - 1] = {
4833
+ text: t(p) + t(A)
4834
+ }, k.pop()) : p.kind === u.CData && A.kind === u.CData ? (k[g - 1] = {
4801
4835
  kind: u.CData,
4802
- text: t(d) + t(A)
4803
- }, k.pop()) : d.kind === u.TextNode && A.kind === u.TextNode ? (t(d).endsWith(" ") && t(A).startsWith(" ") && (d.text = t(d).trimEnd()), k[g - 1] = {
4836
+ text: t(p) + t(A)
4837
+ }, k.pop()) : p.kind === u.TextNode && A.kind === u.TextNode ? (t(p).endsWith(" ") && t(A).startsWith(" ") && (p.text = t(p).trimEnd()), k[g - 1] = {
4804
4838
  kind: u.TextNode,
4805
- text: t(d) + t(A)
4806
- }, k.pop()) : d.kind === u.TextNode && A.kind === u.CData && (k[g - 1] = {
4839
+ text: t(p) + t(A)
4840
+ }, k.pop()) : p.kind === u.TextNode && A.kind === u.CData && (k[g - 1] = {
4807
4841
  kind: u.CData,
4808
- text: t(d) + t(A)
4842
+ text: t(p) + t(A)
4809
4843
  }, k.pop());
4810
4844
  }
4811
4845
  }
4812
- function K(k) {
4846
+ function j(k) {
4813
4847
  if (typeof k != "string")
4814
4848
  return k;
4815
- const f = new Fe(k);
4849
+ const f = new Ge(k);
4816
4850
  try {
4817
4851
  return {
4818
4852
  __PARSED: !0,
4819
4853
  statements: f.parseStatements(),
4820
- parseId: ++Er,
4854
+ parseId: ++_r,
4821
4855
  // TODO: retrieve the event source code only in dev mode
4822
4856
  source: k
4823
4857
  };
4824
4858
  } catch {
4825
4859
  if (f.errors.length > 0) {
4826
4860
  const g = f.errors[0];
4827
- throw new Re(`${g.text} [${g.line}: ${g.column}]`, g.code);
4861
+ throw new Pe(`${g.text} [${g.line}: ${g.column}]`, g.code);
4828
4862
  }
4829
4863
  }
4830
4864
  }
4831
4865
  }
4832
- function xr(e) {
4866
+ function Sr(e) {
4833
4867
  return {
4834
4868
  kind: u.ElementNode,
4835
4869
  children: [
@@ -4858,7 +4892,7 @@ function xr(e) {
4858
4892
  ]
4859
4893
  };
4860
4894
  }
4861
- function rn(e) {
4895
+ function an(e) {
4862
4896
  return {
4863
4897
  kind: u.ElementNode,
4864
4898
  children: [
@@ -4887,9 +4921,9 @@ function rn(e) {
4887
4921
  ]
4888
4922
  };
4889
4923
  }
4890
- function P(e, ...n) {
4891
- let r = ur[e] ?? "Unknown error";
4892
- throw n && n.forEach((l, a) => r = t(r, `{${a}}`, l.toString())), new Re(r, e);
4924
+ function B(e, ...n) {
4925
+ let r = dr[e] ?? "Unknown error";
4926
+ throw n && n.forEach((l, a) => r = t(r, `{${a}}`, l.toString())), new Pe(r, e);
4893
4927
  function t(l, a, s) {
4894
4928
  do
4895
4929
  l = l.replace(a, s);
@@ -4897,13 +4931,13 @@ function P(e, ...n) {
4897
4931
  return l;
4898
4932
  }
4899
4933
  }
4900
- function j(e) {
4934
+ function K(e) {
4901
4935
  return e.type;
4902
4936
  }
4903
- function Te(e, n) {
4937
+ function Ie(e, n) {
4904
4938
  return e ? Array.isArray(e) ? typeof e == "string" ? [e, n] : (e.push(n), e) : [e, n] : n;
4905
4939
  }
4906
- function tn(e) {
4940
+ function on(e) {
4907
4941
  const n = {
4908
4942
  kind: u.TagNameNode,
4909
4943
  children: [{ kind: u.Identifier, text: "Fragment" }]
@@ -4924,15 +4958,15 @@ function tn(e) {
4924
4958
  ]
4925
4959
  };
4926
4960
  }
4927
- function pe(e) {
4961
+ function ke(e) {
4928
4962
  var n, r;
4929
4963
  return ((r = (n = e.children) == null ? void 0 : n.find((t) => t.kind === u.AttributeListNode)) == null ? void 0 : r.children) ?? [];
4930
4964
  }
4931
- function de(e) {
4965
+ function ge(e) {
4932
4966
  var n, r;
4933
4967
  return ((r = (n = e.children) == null ? void 0 : n.find((t) => t.kind === u.ContentListNode)) == null ? void 0 : r.children) ?? [];
4934
4968
  }
4935
- function ln(e, n) {
4969
+ function cn(e, n) {
4936
4970
  var t;
4937
4971
  const r = (t = e.children) == null ? void 0 : t.findIndex((l) => l.kind === u.ContentListNode);
4938
4972
  return r === void 0 || r === -1 ? e : {
@@ -4944,7 +4978,7 @@ function ln(e, n) {
4944
4978
  ]
4945
4979
  };
4946
4980
  }
4947
- function mr(e) {
4981
+ function Nr(e) {
4948
4982
  var n;
4949
4983
  for (let r of e)
4950
4984
  if (((n = r.children) == null ? void 0 : n.length) === 1) {
@@ -4957,136 +4991,137 @@ function mr(e) {
4957
4991
  r.children.push(t, l);
4958
4992
  }
4959
4993
  }
4960
- function sn(e, n, r, t) {
4994
+ function un(e, n, r, t) {
4961
4995
  let l = t.split(":");
4962
4996
  if (l.length > 2)
4963
- return P("T028", t, "Namespace cannot contain multiple ':' (colon).");
4997
+ return B("T028", t, "Namespace cannot contain multiple ':' (colon).");
4964
4998
  let a = t;
4965
4999
  if (l.length === 2) {
4966
- if (l[0] != ye)
4967
- return P("T029", t, ye);
5000
+ if (l[0] != $e)
5001
+ return B("T029", t, $e);
4968
5002
  a = l[1];
4969
5003
  }
4970
5004
  if (a.includes("#"))
4971
- return P("T028", a, "Namespace cannot contain character '#'.");
5005
+ return B("T028", a, "Namespace cannot contain character '#'.");
4972
5006
  switch (a) {
4973
- case ye:
5007
+ case $e:
4974
5008
  a = r;
4975
5009
  break;
4976
- case pr:
4977
- a = dr;
5010
+ case gr:
5011
+ a = Er;
4978
5012
  break;
4979
- case kr:
4980
- a = gr;
5013
+ case mr:
5014
+ a = xr;
4981
5015
  break;
4982
5016
  }
4983
5017
  const s = e[e.length - 1];
4984
5018
  if (s.has(r))
4985
- return P("T025", r);
5019
+ return B("T025", r);
4986
5020
  s.set(r, a), n.namespaces ?? (n.namespaces = {}), n.namespaces[r] = a;
4987
5021
  }
4988
- function _r(e, n) {
4989
- e.children.length !== 2 && P("T001");
5022
+ function Ar(e, n) {
5023
+ e.children.length !== 2 && B("T001");
4990
5024
  const r = e.children[0];
4991
- return r.kind !== u.ElementNode && P("T001"), r;
5025
+ return r.kind !== u.ElementNode && B("T001"), r;
4992
5026
  }
4993
- function re(e, n) {
5027
+ function te(e, n) {
4994
5028
  const r = e.children.find((l) => l.kind === u.TagNameNode).children;
4995
5029
  return n(r.at(-1));
4996
5030
  }
4997
- function an(e, n, r) {
5031
+ function fn(e, n, r) {
4998
5032
  const t = e.children.find((o) => o.kind === u.TagNameNode).children, l = n(t.at(-1));
4999
5033
  if (t.length === 1)
5000
5034
  return l;
5001
5035
  const a = n(t[0]);
5002
- r.length === 0 && P("T026");
5036
+ r.length === 0 && B("T026");
5003
5037
  let s;
5004
5038
  for (let o = r.length - 1; o >= 0 && (s = r[o].get(a), s === void 0); --o)
5005
5039
  ;
5006
- return s === void 0 && P("T027", a), s + "." + l;
5040
+ return s === void 0 && B("T027", a), s + "." + l;
5007
5041
  }
5008
- function Or(e) {
5042
+ function Rr(e) {
5009
5043
  return e[2].toLowerCase() + e.substring(3);
5010
5044
  }
5011
5045
  export {
5012
- dn as $,
5013
- Or as A,
5014
- rr as B,
5015
- p as C,
5016
- xe as D,
5017
- fe as E,
5018
- tr as F,
5019
- Lr as G,
5020
- Fe as H,
5021
- Ln as I,
5022
- M as J,
5023
- On as K,
5024
- De as L,
5025
- be as M,
5026
- Le as N,
5027
- ke as O,
5028
- Re as P,
5029
- _n as Q,
5030
- mn as R,
5046
+ En as $,
5047
+ Dr as A,
5048
+ Rr as B,
5049
+ d as C,
5050
+ _e as D,
5051
+ de as E,
5052
+ lr as F,
5053
+ sr as G,
5054
+ Or as H,
5055
+ Ge as I,
5056
+ On as J,
5057
+ M as K,
5058
+ Rn as L,
5059
+ We as M,
5060
+ Be as N,
5061
+ ve as O,
5062
+ Pe as P,
5063
+ Ee as Q,
5064
+ Ln as R,
5031
5065
  u as S,
5032
- wn as T,
5033
- Pe as U,
5034
- xn as V,
5035
- _e as W,
5036
- ge as X,
5037
- En as Y,
5038
- on as Z,
5039
- pn as _,
5040
- Be as a,
5041
- gn as a0,
5042
- kn as a1,
5043
- hn as a2,
5044
- fn as a3,
5045
- un as a4,
5046
- cn as a5,
5047
- Wn as a6,
5048
- ve as a7,
5049
- qe as a8,
5050
- vn as a9,
5051
- Q as aa,
5052
- oe as ab,
5053
- An as ac,
5054
- In as ad,
5055
- Nn as ae,
5056
- G as af,
5057
- Sn as ag,
5058
- ae as ah,
5059
- se as ai,
5060
- le as aj,
5061
- Tn as ak,
5062
- Ue as al,
5063
- Oe as am,
5064
- We as an,
5065
- cr as ao,
5066
- Tr as ap,
5067
- Fn as b,
5068
- Mn as c,
5069
- Nr as d,
5070
- qn as e,
5071
- $n as f,
5072
- Xn as g,
5073
- Gn as h,
5074
- Ke as i,
5075
- zn as j,
5076
- Ar as k,
5077
- Qn as l,
5078
- Hn as m,
5079
- je as n,
5080
- wr as o,
5081
- sr as p,
5082
- ur as q,
5083
- Kn as r,
5066
+ In as T,
5067
+ qe as U,
5068
+ An as V,
5069
+ Nn as W,
5070
+ Ne as X,
5071
+ me as Y,
5072
+ Sn as Z,
5073
+ hn as _,
5074
+ ye as a,
5075
+ mn as a0,
5076
+ _n as a1,
5077
+ xn as a2,
5078
+ gn as a3,
5079
+ kn as a4,
5080
+ pn as a5,
5081
+ dn as a6,
5082
+ Fn as a7,
5083
+ be as a8,
5084
+ Qe as a9,
5085
+ Dn as aa,
5086
+ Y as ab,
5087
+ ue as ac,
5088
+ vn as ad,
5089
+ Bn as ae,
5090
+ Tn as af,
5091
+ z as ag,
5092
+ wn as ah,
5093
+ ce as ai,
5094
+ oe as aj,
5095
+ ae as ak,
5096
+ bn as al,
5097
+ Xe as am,
5098
+ De as an,
5099
+ Me as ao,
5100
+ hr as ap,
5101
+ br as aq,
5102
+ Xn as b,
5103
+ Gn as c,
5104
+ wr as d,
5105
+ zn as e,
5106
+ Qn as f,
5107
+ Hn as g,
5108
+ Yn as h,
5109
+ Ue as i,
5110
+ Zn as j,
5111
+ Tr as k,
5112
+ Jn as l,
5113
+ Fe as m,
5114
+ nn as n,
5115
+ vr as o,
5116
+ Ir as p,
5117
+ cr as q,
5118
+ dr as r,
5084
5119
  Vn as s,
5085
- Yn as t,
5086
- Zn as u,
5087
- Me as v,
5088
- en as w,
5089
- nn as x,
5090
- gr as y,
5091
- vr as z
5120
+ rr as t,
5121
+ Kn as u,
5122
+ Cn as v,
5123
+ ze as w,
5124
+ ln as x,
5125
+ sn as y,
5126
+ xr as z
5092
5127
  };