@camunda8/cli 3.4.0-alpha.3 → 4.0.0-alpha.2

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.
@@ -2,11 +2,20 @@ var __defProp = Object.defineProperty;
2
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __esm = (fn, res) => function __init() {
6
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
5
+ var __esm = (fn, res, err) => function __init() {
6
+ if (err) throw err[0];
7
+ try {
8
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
9
+ } catch (e) {
10
+ throw err = [e], e;
11
+ }
7
12
  };
8
13
  var __commonJS = (cb, mod) => function __require() {
9
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
14
+ try {
15
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
16
+ } catch (e) {
17
+ throw mod = 0, e;
18
+ }
10
19
  };
11
20
  var __export = (target, all) => {
12
21
  for (var name2 in all)
@@ -2106,9 +2115,9 @@ var require_no_overlapping_elements = __commonJS({
2106
2115
  });
2107
2116
  }
2108
2117
  function checkElementsArray(elements, elementsToReport, diObjects) {
2109
- for (let i = 0; i < elements.length - 1; i++) {
2110
- const element = elements[i];
2111
- for (let j = i + 1; j < elements.length; j++) {
2118
+ for (let i2 = 0; i2 < elements.length - 1; i2++) {
2119
+ const element = elements[i2];
2120
+ for (let j = i2 + 1; j < elements.length; j++) {
2112
2121
  const element2 = elements[j];
2113
2122
  if (element.attachedToRef === element2 || element2.attachedToRef === element) {
2114
2123
  continue;
@@ -2927,9 +2936,9 @@ var require_semver_compare = __commonJS({
2927
2936
  module2.exports = function cmp(a, b) {
2928
2937
  var pa = a.split(".");
2929
2938
  var pb = b.split(".");
2930
- for (var i = 0; i < 3; i++) {
2931
- var na = Number(pa[i]);
2932
- var nb = Number(pb[i]);
2939
+ for (var i2 = 0; i2 < 3; i2++) {
2940
+ var na = Number(pa[i2]);
2941
+ var nb = Number(pb[i2]);
2933
2942
  if (na > nb) return 1;
2934
2943
  if (nb > na) return -1;
2935
2944
  if (!isNaN(na) && isNaN(nb)) return 1;
@@ -3440,7 +3449,7 @@ var require_conditional_event = __commonJS({
3440
3449
  if (string2 === "") {
3441
3450
  return true;
3442
3451
  }
3443
- return string2.split(",").every((i) => i.trim() !== "");
3452
+ return string2.split(",").every((i2) => i2.trim() !== "");
3444
3453
  }
3445
3454
  }
3446
3455
  });
@@ -3987,14 +3996,14 @@ function getChildren(node, type, before, after) {
3987
3996
  return after == null ? result : [];
3988
3997
  }
3989
3998
  }
3990
- function matchNodeContext(node, context, i = context.length - 1) {
3991
- for (let p = node; i >= 0; p = p.parent) {
3999
+ function matchNodeContext(node, context, i2 = context.length - 1) {
4000
+ for (let p = node; i2 >= 0; p = p.parent) {
3992
4001
  if (!p)
3993
4002
  return false;
3994
4003
  if (!p.type.isAnonymous) {
3995
- if (context[i] && context[i] != p.name)
4004
+ if (context[i2] && context[i2] != p.name)
3996
4005
  return false;
3997
- i--;
4006
+ i2--;
3998
4007
  }
3999
4008
  }
4000
4009
  return true;
@@ -4003,11 +4012,11 @@ function iterStack(heads) {
4003
4012
  if (!heads.length)
4004
4013
  return null;
4005
4014
  let pick2 = 0, picked = heads[0];
4006
- for (let i = 1; i < heads.length; i++) {
4007
- let node = heads[i];
4015
+ for (let i2 = 1; i2 < heads.length; i2++) {
4016
+ let node = heads[i2];
4008
4017
  if (node.from > picked.from || node.to < picked.to) {
4009
4018
  picked = node;
4010
- pick2 = i;
4019
+ pick2 = i2;
4011
4020
  }
4012
4021
  }
4013
4022
  let next = picked instanceof TreeNode && picked.index < 0 ? null : picked.parent;
@@ -4127,10 +4136,10 @@ function buildTree(data) {
4127
4136
  if (nodeCount) {
4128
4137
  let buffer2 = new Uint16Array(nodeCount * 4);
4129
4138
  let start = nodes[nodes.length - 2];
4130
- for (let i = nodes.length - 3, j = 0; i >= 0; i -= 3) {
4131
- buffer2[j++] = nodes[i];
4132
- buffer2[j++] = nodes[i + 1] - start;
4133
- buffer2[j++] = nodes[i + 2] - start;
4139
+ for (let i2 = nodes.length - 3, j = 0; i2 >= 0; i2 -= 3) {
4140
+ buffer2[j++] = nodes[i2];
4141
+ buffer2[j++] = nodes[i2 + 1] - start;
4142
+ buffer2[j++] = nodes[i2 + 2] - start;
4134
4143
  buffer2[j++] = j;
4135
4144
  }
4136
4145
  children2.push(new TreeBuffer(buffer2, nodes[2] - start, nodeSet));
@@ -4149,9 +4158,9 @@ function buildTree(data) {
4149
4158
  return makeTree(type, children2, positions2, length2, lookAhead2, contextHash2);
4150
4159
  };
4151
4160
  }
4152
- function makeRepeatLeaf(children2, positions2, base2, i, from, to, type, lookAhead2, contextHash2) {
4161
+ function makeRepeatLeaf(children2, positions2, base2, i2, from, to, type, lookAhead2, contextHash2) {
4153
4162
  let localChildren = [], localPositions = [];
4154
- while (children2.length > i) {
4163
+ while (children2.length > i2) {
4155
4164
  localChildren.push(children2.pop());
4156
4165
  localPositions.push(positions2.pop() + base2 - from);
4157
4166
  }
@@ -4258,24 +4267,24 @@ function nodeSize(balanceType, node) {
4258
4267
  }
4259
4268
  function balanceRange(balanceType, children, positions, from, to, start, length, mkTop, mkTree) {
4260
4269
  let total = 0;
4261
- for (let i = from; i < to; i++)
4262
- total += nodeSize(balanceType, children[i]);
4270
+ for (let i2 = from; i2 < to; i2++)
4271
+ total += nodeSize(balanceType, children[i2]);
4263
4272
  let maxChild = Math.ceil(
4264
4273
  total * 1.5 / 8
4265
4274
  /* Balance.BranchFactor */
4266
4275
  );
4267
4276
  let localChildren = [], localPositions = [];
4268
4277
  function divide(children2, positions2, from2, to2, offset) {
4269
- for (let i = from2; i < to2; ) {
4270
- let groupFrom = i, groupStart = positions2[i], groupSize = nodeSize(balanceType, children2[i]);
4271
- i++;
4272
- for (; i < to2; i++) {
4273
- let nextSize = nodeSize(balanceType, children2[i]);
4278
+ for (let i2 = from2; i2 < to2; ) {
4279
+ let groupFrom = i2, groupStart = positions2[i2], groupSize = nodeSize(balanceType, children2[i2]);
4280
+ i2++;
4281
+ for (; i2 < to2; i2++) {
4282
+ let nextSize = nodeSize(balanceType, children2[i2]);
4274
4283
  if (groupSize + nextSize >= maxChild)
4275
4284
  break;
4276
4285
  groupSize += nextSize;
4277
4286
  }
4278
- if (i == groupFrom + 1) {
4287
+ if (i2 == groupFrom + 1) {
4279
4288
  if (groupSize > maxChild) {
4280
4289
  let only = children2[groupFrom];
4281
4290
  divide(only.children, only.positions, 0, only.children.length, positions2[groupFrom] + offset);
@@ -4283,8 +4292,8 @@ function balanceRange(balanceType, children, positions, from, to, start, length,
4283
4292
  }
4284
4293
  localChildren.push(children2[groupFrom]);
4285
4294
  } else {
4286
- let length2 = positions2[i - 1] + children2[i - 1].length - groupStart;
4287
- localChildren.push(balanceRange(balanceType, children2, positions2, groupFrom, i, groupStart, length2, null, mkTree));
4295
+ let length2 = positions2[i2 - 1] + children2[i2 - 1].length - groupStart;
4296
+ localChildren.push(balanceRange(balanceType, children2, positions2, groupFrom, i2, groupStart, length2, null, mkTree));
4288
4297
  }
4289
4298
  localPositions.push(groupStart + offset - start);
4290
4299
  }
@@ -4449,8 +4458,8 @@ var init_dist2 = __esm({
4449
4458
  for (let name2 of prop.split(" "))
4450
4459
  direct[name2] = map2[prop];
4451
4460
  return (node) => {
4452
- for (let groups = node.prop(NodeProp.group), i = -1; i < (groups ? groups.length : 0); i++) {
4453
- let found = direct[i < 0 ? node.name : groups[i]];
4461
+ for (let groups = node.prop(NodeProp.group), i2 = -1; i2 < (groups ? groups.length : 0); i2++) {
4462
+ let found = direct[i2 < 0 ? node.name : groups[i2]];
4454
4463
  if (found)
4455
4464
  return found;
4456
4465
  }
@@ -4471,8 +4480,8 @@ var init_dist2 = __esm({
4471
4480
  */
4472
4481
  constructor(types2) {
4473
4482
  this.types = types2;
4474
- for (let i = 0; i < types2.length; i++)
4475
- if (types2[i].id != i)
4483
+ for (let i2 = 0; i2 < types2.length; i2++)
4484
+ if (types2[i2].id != i2)
4476
4485
  throw new RangeError("Node type ids should correspond to array positions when creating a node set");
4477
4486
  }
4478
4487
  /**
@@ -4748,9 +4757,9 @@ var init_dist2 = __esm({
4748
4757
  */
4749
4758
  findChild(startIndex, endIndex, dir, pos, side) {
4750
4759
  let { buffer } = this, pick2 = -1;
4751
- for (let i = startIndex; i != endIndex; i = buffer[i + 3]) {
4752
- if (checkSide(side, pos, buffer[i + 1], buffer[i + 2])) {
4753
- pick2 = i;
4760
+ for (let i2 = startIndex; i2 != endIndex; i2 = buffer[i2 + 3]) {
4761
+ if (checkSide(side, pos, buffer[i2 + 1], buffer[i2 + 2])) {
4762
+ pick2 = i2;
4754
4763
  if (dir > 0)
4755
4764
  break;
4756
4765
  }
@@ -4763,11 +4772,11 @@ var init_dist2 = __esm({
4763
4772
  slice(startI, endI, from) {
4764
4773
  let b = this.buffer;
4765
4774
  let copy = new Uint16Array(endI - startI), len = 0;
4766
- for (let i = startI, j = 0; i < endI; ) {
4767
- copy[j++] = b[i++];
4768
- copy[j++] = b[i++] - from;
4769
- let to = copy[j++] = b[i++] - from;
4770
- copy[j++] = b[i++] - startI;
4775
+ for (let i2 = startI, j = 0; i2 < endI; ) {
4776
+ copy[j++] = b[i2++];
4777
+ copy[j++] = b[i2++] - from;
4778
+ let to = copy[j++] = b[i2++] - from;
4779
+ copy[j++] = b[i2++] - startI;
4771
4780
  len = Math.max(len, to);
4772
4781
  }
4773
4782
  return new _TreeBuffer(copy, len, this.set);
@@ -4832,10 +4841,10 @@ var init_dist2 = __esm({
4832
4841
  get to() {
4833
4842
  return this.from + this._tree.length;
4834
4843
  }
4835
- nextChild(i, dir, pos, side, mode = 0) {
4844
+ nextChild(i2, dir, pos, side, mode = 0) {
4836
4845
  for (let parent = this; ; ) {
4837
- for (let { children, positions } = parent._tree, e = dir > 0 ? children.length : -1; i != e; i += dir) {
4838
- let next = children[i], start = positions[i] + parent.from, mounted;
4846
+ for (let { children, positions } = parent._tree, e = dir > 0 ? children.length : -1; i2 != e; i2 += dir) {
4847
+ let next = children[i2], start = positions[i2] + parent.from, mounted;
4839
4848
  if (!(mode & IterMode.EnterBracketed && next instanceof Tree && (mounted = MountedTree.get(next)) && !mounted.overlay && mounted.bracketed && pos >= start && pos <= start + next.length) && !checkSide(side, pos, start, start + next.length))
4840
4849
  continue;
4841
4850
  if (next instanceof TreeBuffer) {
@@ -4843,21 +4852,21 @@ var init_dist2 = __esm({
4843
4852
  continue;
4844
4853
  let index = next.findChild(0, next.buffer.length, dir, pos - start, side);
4845
4854
  if (index > -1)
4846
- return new BufferNode(new BufferContext(parent, next, i, start), null, index);
4855
+ return new BufferNode(new BufferContext(parent, next, i2, start), null, index);
4847
4856
  } else if (mode & IterMode.IncludeAnonymous || (!next.type.isAnonymous || hasChild(next))) {
4848
4857
  let mounted2;
4849
4858
  if (!(mode & IterMode.IgnoreMounts) && (mounted2 = MountedTree.get(next)) && !mounted2.overlay)
4850
- return new _TreeNode(mounted2.tree, start, i, parent);
4851
- let inner = new _TreeNode(next, start, i, parent);
4859
+ return new _TreeNode(mounted2.tree, start, i2, parent);
4860
+ let inner = new _TreeNode(next, start, i2, parent);
4852
4861
  return mode & IterMode.IncludeAnonymous || !inner.type.isAnonymous ? inner : inner.nextChild(dir < 0 ? next.children.length - 1 : 0, dir, pos, side, mode);
4853
4862
  }
4854
4863
  }
4855
4864
  if (mode & IterMode.IncludeAnonymous || !parent.type.isAnonymous)
4856
4865
  return null;
4857
4866
  if (parent.index >= 0)
4858
- i = parent.index + dir;
4867
+ i2 = parent.index + dir;
4859
4868
  else
4860
- i = dir < 0 ? -1 : parent._parent._tree.children.length;
4869
+ i2 = dir < 0 ? -1 : parent._parent._tree.children.length;
4861
4870
  parent = parent._parent;
4862
4871
  if (!parent)
4863
4872
  return null;
@@ -5277,8 +5286,8 @@ var init_dist2 = __esm({
5277
5286
  if (this.index < buffer.buffer.buffer.length)
5278
5287
  return false;
5279
5288
  } else {
5280
- for (let i = 0; i < this.index; i++)
5281
- if (buffer.buffer.buffer[i + 3] < this.index)
5289
+ for (let i2 = 0; i2 < this.index; i2++)
5290
+ if (buffer.buffer.buffer[i2 + 3] < this.index)
5282
5291
  return false;
5283
5292
  }
5284
5293
  ({ index, parent } = buffer);
@@ -5287,8 +5296,8 @@ var init_dist2 = __esm({
5287
5296
  }
5288
5297
  for (; parent; { index, _parent: parent } = parent) {
5289
5298
  if (index > -1)
5290
- for (let i = index + dir, e = dir < 0 ? -1 : parent._tree.children.length; i != e; i += dir) {
5291
- let child = parent._tree.children[i];
5299
+ for (let i2 = index + dir, e = dir < 0 ? -1 : parent._tree.children.length; i2 != e; i2 += dir) {
5300
+ let child = parent._tree.children[i2];
5292
5301
  if (this.mode & IterMode.IncludeAnonymous || child instanceof TreeBuffer || !child.type.isAnonymous || hasChild(child))
5293
5302
  return false;
5294
5303
  }
@@ -5363,8 +5372,8 @@ var init_dist2 = __esm({
5363
5372
  index = this.stack[--d];
5364
5373
  }
5365
5374
  }
5366
- for (let i = depth; i < this.stack.length; i++)
5367
- result = new BufferNode(this.buffer, result, this.stack[i]);
5375
+ for (let i2 = depth; i2 < this.stack.length; i2++)
5376
+ result = new BufferNode(this.buffer, result, this.stack[i2]);
5368
5377
  return this.bufferNode = new BufferNode(this.buffer, result, this.index);
5369
5378
  }
5370
5379
  /**
@@ -5415,14 +5424,14 @@ var init_dist2 = __esm({
5415
5424
  if (!this.buffer)
5416
5425
  return matchNodeContext(this.node.parent, context);
5417
5426
  let { buffer } = this.buffer, { types: types2 } = buffer.set;
5418
- for (let i = context.length - 1, d = this.stack.length - 1; i >= 0; d--) {
5427
+ for (let i2 = context.length - 1, d = this.stack.length - 1; i2 >= 0; d--) {
5419
5428
  if (d < 0)
5420
- return matchNodeContext(this._tree, context, i);
5429
+ return matchNodeContext(this._tree, context, i2);
5421
5430
  let type = types2[buffer.buffer[this.stack[d]]];
5422
5431
  if (!type.isAnonymous) {
5423
- if (context[i] && context[i] != type.name)
5432
+ if (context[i2] && context[i2] != type.name)
5424
5433
  return false;
5425
- i--;
5434
+ i2--;
5426
5435
  }
5427
5436
  }
5428
5437
  return true;
@@ -5598,9 +5607,9 @@ function readToken(data, input, stack, group, precTable, precOffset) {
5598
5607
  if ((groupMask & data[state]) == 0)
5599
5608
  break;
5600
5609
  let accEnd = data[state + 1];
5601
- for (let i = state + 3; i < accEnd; i += 2)
5602
- if ((data[i + 1] & groupMask) > 0) {
5603
- let term = data[i];
5610
+ for (let i2 = state + 3; i2 < accEnd; i2 += 2)
5611
+ if ((data[i2 + 1] & groupMask) > 0) {
5612
+ let term = data[i2];
5604
5613
  if (dialect.allows(term) && (input.token.value == -1 || input.token.value == term || overrides(term, input.token.value, precTable, precOffset))) {
5605
5614
  input.acceptToken(term);
5606
5615
  break;
@@ -5629,9 +5638,9 @@ function readToken(data, input, stack, group, precTable, precOffset) {
5629
5638
  }
5630
5639
  }
5631
5640
  function findOffset(data, start, term) {
5632
- for (let i = start, next; (next = data[i]) != 65535; i++)
5641
+ for (let i2 = start, next; (next = data[i2]) != 65535; i2++)
5633
5642
  if (next == term)
5634
- return i - start;
5643
+ return i2 - start;
5635
5644
  return -1;
5636
5645
  }
5637
5646
  function overrides(token, prev, tableData, tableOffset) {
@@ -5662,11 +5671,11 @@ function cutAt(tree, pos, side) {
5662
5671
  }
5663
5672
  }
5664
5673
  function pushStackDedup(stack, newStacks) {
5665
- for (let i = 0; i < newStacks.length; i++) {
5666
- let other = newStacks[i];
5674
+ for (let i2 = 0; i2 < newStacks.length; i2++) {
5675
+ let other = newStacks[i2];
5667
5676
  if (other.pos == stack.pos && other.sameState(stack)) {
5668
- if (newStacks[i].score < stack.score)
5669
- newStacks[i] = stack;
5677
+ if (newStacks[i2].score < stack.score)
5678
+ newStacks[i2] = stack;
5670
5679
  return;
5671
5680
  }
5672
5681
  }
@@ -5720,7 +5729,7 @@ var init_dist3 = __esm({
5720
5729
  @internal
5721
5730
  */
5722
5731
  toString() {
5723
- return `[${this.stack.filter((_, i) => i % 3 == 0).concat(this.state)}]@${this.pos}${this.score ? "!" + this.score : ""}`;
5732
+ return `[${this.stack.filter((_, i2) => i2 % 3 == 0).concat(this.state)}]@${this.pos}${this.score ? "!" + this.score : ""}`;
5724
5733
  }
5725
5734
  // Start an empty stack
5726
5735
  /**
@@ -5967,27 +5976,27 @@ var init_dist3 = __esm({
5967
5976
  let nextStates = this.p.parser.nextStates(this.state);
5968
5977
  if (nextStates.length > 4 << 1 || this.stack.length >= 120) {
5969
5978
  let best = [];
5970
- for (let i = 0, s; i < nextStates.length; i += 2) {
5971
- if ((s = nextStates[i + 1]) != this.state && this.p.parser.hasAction(s, next))
5972
- best.push(nextStates[i], s);
5979
+ for (let i2 = 0, s; i2 < nextStates.length; i2 += 2) {
5980
+ if ((s = nextStates[i2 + 1]) != this.state && this.p.parser.hasAction(s, next))
5981
+ best.push(nextStates[i2], s);
5973
5982
  }
5974
5983
  if (this.stack.length < 120)
5975
- for (let i = 0; best.length < 4 << 1 && i < nextStates.length; i += 2) {
5976
- let s = nextStates[i + 1];
5977
- if (!best.some((v, i2) => i2 & 1 && v == s))
5978
- best.push(nextStates[i], s);
5984
+ for (let i2 = 0; best.length < 4 << 1 && i2 < nextStates.length; i2 += 2) {
5985
+ let s = nextStates[i2 + 1];
5986
+ if (!best.some((v, i3) => i3 & 1 && v == s))
5987
+ best.push(nextStates[i2], s);
5979
5988
  }
5980
5989
  nextStates = best;
5981
5990
  }
5982
5991
  let result = [];
5983
- for (let i = 0; i < nextStates.length && result.length < 4; i += 2) {
5984
- let s = nextStates[i + 1];
5992
+ for (let i2 = 0; i2 < nextStates.length && result.length < 4; i2 += 2) {
5993
+ let s = nextStates[i2 + 1];
5985
5994
  if (s == this.state)
5986
5995
  continue;
5987
5996
  let stack = this.split();
5988
5997
  stack.pushState(s, this.pos);
5989
5998
  stack.storeNode(0, stack.pos, stack.pos, 4, true);
5990
- stack.shiftContext(nextStates[i], this.pos);
5999
+ stack.shiftContext(nextStates[i2], this.pos);
5991
6000
  stack.reducePos = this.pos;
5992
6001
  stack.score -= 200;
5993
6002
  result.push(stack);
@@ -6104,8 +6113,8 @@ var init_dist3 = __esm({
6104
6113
  sameState(other) {
6105
6114
  if (this.state != other.state || this.stack.length != other.stack.length)
6106
6115
  return false;
6107
- for (let i = 0; i < this.stack.length; i += 3)
6108
- if (this.stack[i] != other.stack[i])
6116
+ for (let i2 = 0; i2 < this.stack.length; i2 += 3)
6117
+ if (this.stack[i2] != other.stack[i2])
6109
6118
  return false;
6110
6119
  return true;
6111
6120
  }
@@ -6332,9 +6341,9 @@ var init_dist3 = __esm({
6332
6341
  if (pos >= this.chunk2Pos && pos < this.chunk2Pos + this.chunk2.length) {
6333
6342
  result = this.chunk2.charCodeAt(pos - this.chunk2Pos);
6334
6343
  } else {
6335
- let i = this.rangeIndex, range = this.range;
6344
+ let i2 = this.rangeIndex, range = this.range;
6336
6345
  while (range.to <= pos)
6337
- range = this.ranges[++i];
6346
+ range = this.ranges[++i2];
6338
6347
  this.chunk2 = this.input.chunk(this.chunk2Pos = pos);
6339
6348
  if (pos + this.chunk2.length > range.to)
6340
6349
  this.chunk2 = this.chunk2.slice(0, range.to - pos);
@@ -6623,10 +6632,10 @@ var init_dist3 = __esm({
6623
6632
  );
6624
6633
  let context = stack.curContext ? stack.curContext.hash : 0;
6625
6634
  let lookAhead = 0;
6626
- for (let i = 0; i < tokenizers.length; i++) {
6627
- if ((1 << i & mask) == 0)
6635
+ for (let i2 = 0; i2 < tokenizers.length; i2++) {
6636
+ if ((1 << i2 & mask) == 0)
6628
6637
  continue;
6629
- let tokenizer = tokenizers[i], token = this.tokens[i];
6638
+ let tokenizer = tokenizers[i2], token = this.tokens[i2];
6630
6639
  if (main && !tokenizer.fallback)
6631
6640
  continue;
6632
6641
  if (tokenizer.contextual || token.start != stack.pos || token.mask != mask || token.context != context) {
@@ -6675,9 +6684,9 @@ var init_dist3 = __esm({
6675
6684
  tokenizer.token(this.stream.reset(start, token), stack);
6676
6685
  if (token.value > -1) {
6677
6686
  let { parser: parser2 } = stack.p;
6678
- for (let i = 0; i < parser2.specialized.length; i++)
6679
- if (parser2.specialized[i] == token.value) {
6680
- let result = parser2.specializers[i](this.stream.read(token.start, token.end), stack);
6687
+ for (let i2 = 0; i2 < parser2.specialized.length; i2++)
6688
+ if (parser2.specialized[i2] == token.value) {
6689
+ let result = parser2.specializers[i2](this.stream.read(token.start, token.end), stack);
6681
6690
  if (result >= 0 && stack.p.parser.dialect.allows(result >> 1)) {
6682
6691
  if ((result & 1) == 0)
6683
6692
  token.value = result >> 1;
@@ -6692,8 +6701,8 @@ var init_dist3 = __esm({
6692
6701
  }
6693
6702
  }
6694
6703
  putAction(action, token, end, index) {
6695
- for (let i = 0; i < index; i += 3)
6696
- if (this.actions[i] == action)
6704
+ for (let i2 = 0; i2 < index; i2 += 3)
6705
+ if (this.actions[i2] == action)
6697
6706
  return index;
6698
6707
  this.actions[index++] = action;
6699
6708
  this.actions[index++] = token;
@@ -6703,22 +6712,22 @@ var init_dist3 = __esm({
6703
6712
  addActions(stack, token, end, index) {
6704
6713
  let { state } = stack, { parser: parser2 } = stack.p, { data } = parser2;
6705
6714
  for (let set2 = 0; set2 < 2; set2++) {
6706
- for (let i = parser2.stateSlot(
6715
+ for (let i2 = parser2.stateSlot(
6707
6716
  state,
6708
6717
  set2 ? 2 : 1
6709
6718
  /* ParseState.Actions */
6710
- ); ; i += 3) {
6711
- if (data[i] == 65535) {
6712
- if (data[i + 1] == 1) {
6713
- i = pair(data, i + 2);
6719
+ ); ; i2 += 3) {
6720
+ if (data[i2] == 65535) {
6721
+ if (data[i2 + 1] == 1) {
6722
+ i2 = pair(data, i2 + 2);
6714
6723
  } else {
6715
- if (index == 0 && data[i + 1] == 2)
6716
- index = this.putAction(pair(data, i + 2), token, end, index);
6724
+ if (index == 0 && data[i2 + 1] == 2)
6725
+ index = this.putAction(pair(data, i2 + 2), token, end, index);
6717
6726
  break;
6718
6727
  }
6719
6728
  }
6720
- if (data[i] == token)
6721
- index = this.putAction(pair(data, i + 1), token, end, index);
6729
+ if (data[i2] == token)
6730
+ index = this.putAction(pair(data, i2 + 1), token, end, index);
6722
6731
  }
6723
6732
  }
6724
6733
  return index;
@@ -6763,8 +6772,8 @@ var init_dist3 = __esm({
6763
6772
  }
6764
6773
  this.bigReductionCount = this.lastBigReductionSize = 0;
6765
6774
  }
6766
- for (let i = 0; i < stacks.length; i++) {
6767
- let stack = stacks[i];
6775
+ for (let i2 = 0; i2 < stacks.length; i2++) {
6776
+ let stack = stacks[i2];
6768
6777
  for (; ; ) {
6769
6778
  this.tokens.mainToken = null;
6770
6779
  if (stack.pos > pos) {
@@ -6816,15 +6825,15 @@ var init_dist3 = __esm({
6816
6825
  if (newStacks.some((s) => s.reducePos > pos))
6817
6826
  this.recovering--;
6818
6827
  } else if (newStacks.length > 1) {
6819
- outer: for (let i = 0; i < newStacks.length - 1; i++) {
6820
- let stack = newStacks[i];
6821
- for (let j = i + 1; j < newStacks.length; j++) {
6828
+ outer: for (let i2 = 0; i2 < newStacks.length - 1; i2++) {
6829
+ let stack = newStacks[i2];
6830
+ for (let j = i2 + 1; j < newStacks.length; j++) {
6822
6831
  let other = newStacks[j];
6823
6832
  if (stack.sameState(other) || stack.buffer.length > 500 && other.buffer.length > 500) {
6824
6833
  if ((stack.score - other.score || stack.buffer.length - other.buffer.length) > 0) {
6825
6834
  newStacks.splice(j--, 1);
6826
6835
  } else {
6827
- newStacks.splice(i--, 1);
6836
+ newStacks.splice(i2--, 1);
6828
6837
  continue outer;
6829
6838
  }
6830
6839
  }
@@ -6840,9 +6849,9 @@ var init_dist3 = __esm({
6840
6849
  }
6841
6850
  }
6842
6851
  this.minStackPos = newStacks[0].pos;
6843
- for (let i = 1; i < newStacks.length; i++)
6844
- if (newStacks[i].pos < this.minStackPos)
6845
- this.minStackPos = newStacks[i].pos;
6852
+ for (let i2 = 1; i2 < newStacks.length; i2++)
6853
+ if (newStacks[i2].pos < this.minStackPos)
6854
+ this.minStackPos = newStacks[i2].pos;
6846
6855
  return null;
6847
6856
  }
6848
6857
  stopAt(pos) {
@@ -6897,9 +6906,9 @@ var init_dist3 = __esm({
6897
6906
  }
6898
6907
  }
6899
6908
  let actions = this.tokens.getActions(stack);
6900
- for (let i = 0; i < actions.length; ) {
6901
- let action = actions[i++], term = actions[i++], end = actions[i++];
6902
- let last2 = i == actions.length || !split;
6909
+ for (let i2 = 0; i2 < actions.length; ) {
6910
+ let action = actions[i2++], term = actions[i2++], end = actions[i2++];
6911
+ let last2 = i2 == actions.length || !split;
6903
6912
  let localStack = last2 ? stack : stack.split();
6904
6913
  let main = this.tokens.mainToken;
6905
6914
  localStack.apply(action, term, main ? main.start : localStack.pos, end);
@@ -6933,8 +6942,8 @@ var init_dist3 = __esm({
6933
6942
  }
6934
6943
  runRecovery(stacks, tokens, newStacks) {
6935
6944
  let finished = null, restarted = false;
6936
- for (let i = 0; i < stacks.length; i++) {
6937
- let stack = stacks[i], token = tokens[i << 1], tokenEnd = tokens[(i << 1) + 1];
6945
+ for (let i2 = 0; i2 < stacks.length; i2++) {
6946
+ let stack = stacks[i2], token = tokens[i2 << 1], tokenEnd = tokens[(i2 << 1) + 1];
6938
6947
  let base2 = verbose ? this.stackID(stack) + " -> " : "";
6939
6948
  if (stack.deadEnd) {
6940
6949
  if (restarted)
@@ -7033,11 +7042,11 @@ var init_dist3 = __esm({
7033
7042
  throw new RangeError(`Parser version (${spec.version}) doesn't match runtime version (${14})`);
7034
7043
  let nodeNames = spec.nodeNames.split(" ");
7035
7044
  this.minRepeatTerm = nodeNames.length;
7036
- for (let i = 0; i < spec.repeatNodeCount; i++)
7045
+ for (let i2 = 0; i2 < spec.repeatNodeCount; i2++)
7037
7046
  nodeNames.push("");
7038
7047
  let topTerms = Object.keys(spec.topRules).map((r) => spec.topRules[r][1]);
7039
7048
  let nodeProps = [];
7040
- for (let i = 0; i < nodeNames.length; i++)
7049
+ for (let i2 = 0; i2 < nodeNames.length; i2++)
7041
7050
  nodeProps.push([]);
7042
7051
  function setProp(nodeID, prop, value) {
7043
7052
  nodeProps[nodeID].push([prop, prop.deserialize(String(value))]);
@@ -7047,25 +7056,25 @@ var init_dist3 = __esm({
7047
7056
  let prop = propSpec[0];
7048
7057
  if (typeof prop == "string")
7049
7058
  prop = NodeProp[prop];
7050
- for (let i = 1; i < propSpec.length; ) {
7051
- let next = propSpec[i++];
7059
+ for (let i2 = 1; i2 < propSpec.length; ) {
7060
+ let next = propSpec[i2++];
7052
7061
  if (next >= 0) {
7053
- setProp(next, prop, propSpec[i++]);
7062
+ setProp(next, prop, propSpec[i2++]);
7054
7063
  } else {
7055
- let value = propSpec[i + -next];
7064
+ let value = propSpec[i2 + -next];
7056
7065
  for (let j = -next; j > 0; j--)
7057
- setProp(propSpec[i++], prop, value);
7058
- i++;
7066
+ setProp(propSpec[i2++], prop, value);
7067
+ i2++;
7059
7068
  }
7060
7069
  }
7061
7070
  }
7062
- this.nodeSet = new NodeSet(nodeNames.map((name2, i) => NodeType.define({
7063
- name: i >= this.minRepeatTerm ? void 0 : name2,
7064
- id: i,
7065
- props: nodeProps[i],
7066
- top: topTerms.indexOf(i) > -1,
7067
- error: i == 0,
7068
- skipped: spec.skippedNodes && spec.skippedNodes.indexOf(i) > -1
7071
+ this.nodeSet = new NodeSet(nodeNames.map((name2, i2) => NodeType.define({
7072
+ name: i2 >= this.minRepeatTerm ? void 0 : name2,
7073
+ id: i2,
7074
+ props: nodeProps[i2],
7075
+ top: topTerms.indexOf(i2) > -1,
7076
+ error: i2 == 0,
7077
+ skipped: spec.skippedNodes && spec.skippedNodes.indexOf(i2) > -1
7069
7078
  })));
7070
7079
  if (spec.propSources)
7071
7080
  this.nodeSet = this.nodeSet.extend(...spec.propSources);
@@ -7075,8 +7084,8 @@ var init_dist3 = __esm({
7075
7084
  this.context = spec.context;
7076
7085
  this.specializerSpecs = spec.specialized || [];
7077
7086
  this.specialized = new Uint16Array(this.specializerSpecs.length);
7078
- for (let i = 0; i < this.specializerSpecs.length; i++)
7079
- this.specialized[i] = this.specializerSpecs[i].term;
7087
+ for (let i2 = 0; i2 < this.specializerSpecs.length; i2++)
7088
+ this.specialized[i2] = this.specializerSpecs[i2].term;
7080
7089
  this.specializers = this.specializerSpecs.map(getSpecializer);
7081
7090
  this.states = decodeArray(spec.states, Uint32Array);
7082
7091
  this.data = decodeArray(spec.stateData);
@@ -7123,21 +7132,21 @@ var init_dist3 = __esm({
7123
7132
  hasAction(state, terminal) {
7124
7133
  let data = this.data;
7125
7134
  for (let set2 = 0; set2 < 2; set2++) {
7126
- for (let i = this.stateSlot(
7135
+ for (let i2 = this.stateSlot(
7127
7136
  state,
7128
7137
  set2 ? 2 : 1
7129
7138
  /* ParseState.Actions */
7130
- ), next; ; i += 3) {
7131
- if ((next = data[i]) == 65535) {
7132
- if (data[i + 1] == 1)
7133
- next = data[i = pair(data, i + 2)];
7134
- else if (data[i + 1] == 2)
7135
- return pair(data, i + 2);
7139
+ ), next; ; i2 += 3) {
7140
+ if ((next = data[i2]) == 65535) {
7141
+ if (data[i2 + 1] == 1)
7142
+ next = data[i2 = pair(data, i2 + 2)];
7143
+ else if (data[i2 + 1] == 2)
7144
+ return pair(data, i2 + 2);
7136
7145
  else
7137
7146
  break;
7138
7147
  }
7139
7148
  if (next == terminal || next == 0)
7140
- return pair(data, i + 1);
7149
+ return pair(data, i2 + 1);
7141
7150
  }
7142
7151
  }
7143
7152
  return 0;
@@ -7174,18 +7183,18 @@ var init_dist3 = __esm({
7174
7183
  /* ParseState.DefaultReduce */
7175
7184
  );
7176
7185
  let result = deflt ? action(deflt) : void 0;
7177
- for (let i = this.stateSlot(
7186
+ for (let i2 = this.stateSlot(
7178
7187
  state,
7179
7188
  1
7180
7189
  /* ParseState.Actions */
7181
- ); result == null; i += 3) {
7182
- if (this.data[i] == 65535) {
7183
- if (this.data[i + 1] == 1)
7184
- i = pair(this.data, i + 2);
7190
+ ); result == null; i2 += 3) {
7191
+ if (this.data[i2] == 65535) {
7192
+ if (this.data[i2 + 1] == 1)
7193
+ i2 = pair(this.data, i2 + 2);
7185
7194
  else
7186
7195
  break;
7187
7196
  }
7188
- result = action(pair(this.data, i + 1));
7197
+ result = action(pair(this.data, i2 + 1));
7189
7198
  }
7190
7199
  return result;
7191
7200
  }
@@ -7195,21 +7204,21 @@ var init_dist3 = __esm({
7195
7204
  */
7196
7205
  nextStates(state) {
7197
7206
  let result = [];
7198
- for (let i = this.stateSlot(
7207
+ for (let i2 = this.stateSlot(
7199
7208
  state,
7200
7209
  1
7201
7210
  /* ParseState.Actions */
7202
- ); ; i += 3) {
7203
- if (this.data[i] == 65535) {
7204
- if (this.data[i + 1] == 1)
7205
- i = pair(this.data, i + 2);
7211
+ ); ; i2 += 3) {
7212
+ if (this.data[i2] == 65535) {
7213
+ if (this.data[i2 + 1] == 1)
7214
+ i2 = pair(this.data, i2 + 2);
7206
7215
  else
7207
7216
  break;
7208
7217
  }
7209
- if ((this.data[i + 2] & 65536 >> 16) == 0) {
7210
- let value = this.data[i + 1];
7211
- if (!result.some((v, i2) => i2 & 1 && v == value))
7212
- result.push(this.data[i], value);
7218
+ if ((this.data[i2 + 2] & 65536 >> 16) == 0) {
7219
+ let value = this.data[i2 + 1];
7220
+ if (!result.some((v, i3) => i3 & 1 && v == value))
7221
+ result.push(this.data[i2], value);
7213
7222
  }
7214
7223
  }
7215
7224
  return result;
@@ -7236,12 +7245,12 @@ var init_dist3 = __esm({
7236
7245
  });
7237
7246
  if (config.specializers) {
7238
7247
  copy.specializers = this.specializers.slice();
7239
- copy.specializerSpecs = this.specializerSpecs.map((s, i) => {
7248
+ copy.specializerSpecs = this.specializerSpecs.map((s, i2) => {
7240
7249
  let found = config.specializers.find((r) => r.from == s.external);
7241
7250
  if (!found)
7242
7251
  return s;
7243
7252
  let spec = Object.assign(Object.assign({}, s), { external: found.to });
7244
- copy.specializers[i] = getSpecializer(spec);
7253
+ copy.specializers[i2] = getSpecializer(spec);
7245
7254
  return spec;
7246
7255
  });
7247
7256
  }
@@ -7305,9 +7314,9 @@ var init_dist3 = __esm({
7305
7314
  flags[id2] = true;
7306
7315
  }
7307
7316
  let disabled = null;
7308
- for (let i = 0; i < values2.length; i++)
7309
- if (!flags[i]) {
7310
- for (let j = this.dialects[values2[i]], id2; (id2 = this.data[j++]) != 65535; )
7317
+ for (let i2 = 0; i2 < values2.length; i2++)
7318
+ if (!flags[i2]) {
7319
+ for (let j = this.dialects[values2[i2]], id2; (id2 = this.data[j++]) != 65535; )
7311
7320
  (disabled || (disabled = new Uint8Array(this.maxTerm + 1)))[id2] = 1;
7312
7321
  }
7313
7322
  return new Dialect(dialect, flags, disabled);
@@ -7325,13 +7334,13 @@ var init_dist3 = __esm({
7325
7334
 
7326
7335
  // node_modules/@lezer/highlight/dist/index.js
7327
7336
  function sameArray(a, b) {
7328
- return a.length == b.length && a.every((x, i) => x == b[i]);
7337
+ return a.length == b.length && a.every((x, i2) => x == b[i2]);
7329
7338
  }
7330
7339
  function powerSet(array) {
7331
7340
  let sets = [[]];
7332
- for (let i = 0; i < array.length; i++) {
7341
+ for (let i2 = 0; i2 < array.length; i2++) {
7333
7342
  for (let j = 0, e = sets.length; j < e; j++) {
7334
- sets.push(sets[j].concat(array[i]));
7343
+ sets.push(sets[j].concat(array[i2]));
7335
7344
  }
7336
7345
  }
7337
7346
  return sets.sort((a, b) => b.length - a.length);
@@ -7991,8 +8000,8 @@ function parseAdditionalSymbol(input, offset = 0) {
7991
8000
  return null;
7992
8001
  }
7993
8002
  function parseIdentifier(input, offset = 0, namePart = false) {
7994
- for (let inside = false, chars2 = [], i = 0; ; i++) {
7995
- const next = input.peek(offset + i);
8003
+ for (let inside = false, chars2 = [], i2 = 0; ; i2++) {
8004
+ const next = input.peek(offset + i2);
7996
8005
  if (isStartChar(next) || (inside || namePart) && isPartChar(next)) {
7997
8006
  if (!inside) {
7998
8007
  inside = true;
@@ -8002,7 +8011,7 @@ function parseIdentifier(input, offset = 0, namePart = false) {
8002
8011
  if (chars2.length) {
8003
8012
  return {
8004
8013
  token: String.fromCharCode(...chars2),
8005
- offset: i
8014
+ offset: i2
8006
8015
  };
8007
8016
  }
8008
8017
  return null;
@@ -8010,8 +8019,8 @@ function parseIdentifier(input, offset = 0, namePart = false) {
8010
8019
  }
8011
8020
  }
8012
8021
  function parseSpaces(input, offset) {
8013
- for (let inside = false, i = 0; ; i++) {
8014
- let next = input.peek(offset + i);
8022
+ for (let inside = false, i2 = 0; ; i2++) {
8023
+ let next = input.peek(offset + i2);
8015
8024
  if (isSpace(next)) {
8016
8025
  if (!inside) {
8017
8026
  inside = true;
@@ -8020,7 +8029,7 @@ function parseSpaces(input, offset) {
8020
8029
  if (inside) {
8021
8030
  return {
8022
8031
  token: " ",
8023
- offset: i
8032
+ offset: i2
8024
8033
  };
8025
8034
  }
8026
8035
  return null;
@@ -8033,10 +8042,10 @@ function parseName(input, variables) {
8033
8042
  prefixes
8034
8043
  } = variables.contextCache();
8035
8044
  const start = variables.tokens;
8036
- for (let i = 0, tokens = [], nextMatch = null; ; ) {
8045
+ for (let i2 = 0, tokens = [], nextMatch = null; ; ) {
8037
8046
  const namePart = start.length + tokens.length > 0;
8038
8047
  const maybeSpace = tokens.length > 0;
8039
- const match = parseIdentifier(input, i, namePart) || namePart && parseAdditionalSymbol(input, i) || maybeSpace && parseSpaces(input, i);
8048
+ const match = parseIdentifier(input, i2, namePart) || namePart && parseAdditionalSymbol(input, i2) || maybeSpace && parseSpaces(input, i2);
8040
8049
  if (!match) {
8041
8050
  return nextMatch;
8042
8051
  }
@@ -8044,7 +8053,7 @@ function parseName(input, variables) {
8044
8053
  token,
8045
8054
  offset
8046
8055
  } = match;
8047
- i += offset;
8056
+ i2 += offset;
8048
8057
  if (token === " ") {
8049
8058
  continue;
8050
8059
  }
@@ -8077,8 +8086,8 @@ function parseName(input, variables) {
8077
8086
  }
8078
8087
  function getPrefixes(str) {
8079
8088
  const prefixes = [];
8080
- for (let i = 1; i <= str.length; i++) {
8081
- prefixes.push(str.substring(0, i));
8089
+ for (let i2 = 1; i2 <= str.length; i2++) {
8090
+ prefixes.push(str.substring(0, i2));
8082
8091
  }
8083
8092
  return prefixes;
8084
8093
  }
@@ -8109,7 +8118,7 @@ function createContextCache(from) {
8109
8118
  function normalizeContextKey(name2) {
8110
8119
  return name2.replace(/\s*([./\-'+]|\*\*?)\s*/g, " $1 ").replace(/\s{2,}/g, " ").trim();
8111
8120
  }
8112
- function wrap(variables, scopeName, code) {
8121
+ function wrap(variables, scopeName, code2) {
8113
8122
  const parts = variables.children.filter((c) => c.name !== scopeName);
8114
8123
  const children = variables.children.filter((c) => c.name === scopeName);
8115
8124
  const namePart = parts[0];
@@ -8118,7 +8127,7 @@ function wrap(variables, scopeName, code) {
8118
8127
  const value = valuePart?.computedValue() ?? null;
8119
8128
  return variables.assign({
8120
8129
  children
8121
- }).enterScope(scopeName).pushChildren(parts).exitScope(code).define(name2, value);
8130
+ }).enterScope(scopeName).pushChildren(parts).exitScope(code2).define(name2, value);
8122
8131
  }
8123
8132
  function trackVariables(context = {}, Context2 = VariableContext) {
8124
8133
  const start = Variables.of({
@@ -8184,23 +8193,23 @@ function trackVariables(context = {}, Context2 = VariableContext) {
8184
8193
  }
8185
8194
  return variables.assign({ children }).enterScope(prefixedStart).pushChild(lastChild).assign({ context: newContext || currentContext2 });
8186
8195
  }
8187
- const code = input.read(input.pos, stack.pos);
8196
+ const code2 = input.read(input.pos, stack.pos);
8188
8197
  const end = contextEnds[term];
8189
8198
  if (end) {
8190
- return variables.exitScope(code);
8199
+ return variables.exitScope(code2);
8191
8200
  }
8192
8201
  if (term === ContextEntry) {
8193
8202
  const parts = variables.children.filter((c) => c.name !== "ContextEntry");
8194
8203
  const name2 = parts[0];
8195
8204
  const value = last(parts);
8196
- return wrap(variables, "ContextEntry", code).assign(
8205
+ return wrap(variables, "ContextEntry", code2).assign(
8197
8206
  {
8198
8207
  value: Context2.of(variables.value).set(name2?.computedValue(), value?.computedValue())
8199
8208
  }
8200
8209
  );
8201
8210
  }
8202
8211
  if (term === ForInExpression || term === QuantifiedInExpression) {
8203
- return wrap(variables, "InExpression", code);
8212
+ return wrap(variables, "InExpression", code2);
8204
8213
  }
8205
8214
  if (term === forExpressionBodyStart) {
8206
8215
  return variables.define(
@@ -8225,16 +8234,16 @@ function trackVariables(context = {}, Context2 = VariableContext) {
8225
8234
  return variables.enterScope("ArithmeticExpression");
8226
8235
  }
8227
8236
  if (term === Identifier || term === AdditionalIdentifier || term === PropertyIdentifier) {
8228
- return variables.token(code);
8237
+ return variables.token(code2);
8229
8238
  }
8230
8239
  if (term === StringLiteral) {
8231
- return variables.literal(code.replace(/^"|"$/g, "").replace(/\\(["\\])/g, "$1"));
8240
+ return variables.literal(code2.replace(/^"|"$/g, "").replace(/\\(["\\])/g, "$1"));
8232
8241
  }
8233
8242
  if (term === BooleanLiteral) {
8234
- return variables.literal(code === "true" ? true : false);
8243
+ return variables.literal(code2 === "true" ? true : false);
8235
8244
  }
8236
8245
  if (term === NumericLiteral) {
8237
- return variables.literal(parseFloat(code));
8246
+ return variables.literal(parseFloat(code2));
8238
8247
  }
8239
8248
  if (term === nil) {
8240
8249
  return variables.literal(null);
@@ -8253,7 +8262,7 @@ function trackVariables(context = {}, Context2 = VariableContext) {
8253
8262
  if (term === expression0) {
8254
8263
  let parent = variables;
8255
8264
  while (parent.parent) {
8256
- parent = parent.exitScope(code);
8265
+ parent = parent.exitScope(code2);
8257
8266
  }
8258
8267
  return parent;
8259
8268
  }
@@ -8294,8 +8303,8 @@ function getContextValue(variables, args) {
8294
8303
  }
8295
8304
  function extractNamedArgs(args, argNames) {
8296
8305
  const context = {};
8297
- for (let i = 0; i < args.length; i += 2) {
8298
- const [name2, value] = args.slice(i, i + 2);
8306
+ for (let i2 = 0; i2 < args.length; i2 += 2) {
8307
+ const [name2, value] = args.slice(i2, i2 + 2);
8299
8308
  context[name2.value] = value;
8300
8309
  }
8301
8310
  return argNames.map((name2) => context[name2]);
@@ -8956,18 +8965,18 @@ var init_dist5 = __esm({
8956
8965
  });
8957
8966
 
8958
8967
  // node_modules/@marijn/find-cluster-break/src/index.js
8959
- function isExtendingChar(code) {
8960
- if (code < 768) return false;
8968
+ function isExtendingChar(code2) {
8969
+ if (code2 < 768) return false;
8961
8970
  for (let from = 0, to = rangeFrom.length; ; ) {
8962
8971
  let mid = from + to >> 1;
8963
- if (code < rangeFrom[mid]) to = mid;
8964
- else if (code >= rangeTo[mid]) from = mid + 1;
8972
+ if (code2 < rangeFrom[mid]) to = mid;
8973
+ else if (code2 >= rangeTo[mid]) from = mid + 1;
8965
8974
  else return true;
8966
8975
  if (from == to) return false;
8967
8976
  }
8968
8977
  }
8969
- function isRegionalIndicator(code) {
8970
- return code >= 127462 && code <= 127487;
8978
+ function isRegionalIndicator(code2) {
8979
+ return code2 >= 127462 && code2 <= 127487;
8971
8980
  }
8972
8981
  function findClusterBreak(str, pos, forward = true, includeExtending = true) {
8973
8982
  return (forward ? nextClusterBreak : prevClusterBreak)(str, pos, includeExtending);
@@ -8983,10 +8992,10 @@ function nextClusterBreak(str, pos, includeExtending) {
8983
8992
  pos += codePointSize(next);
8984
8993
  prev = next;
8985
8994
  } else if (isRegionalIndicator(next)) {
8986
- let countBefore = 0, i = pos - 2;
8987
- while (i >= 0 && isRegionalIndicator(codePointAt(str, i))) {
8995
+ let countBefore = 0, i2 = pos - 2;
8996
+ while (i2 >= 0 && isRegionalIndicator(codePointAt(str, i2))) {
8988
8997
  countBefore++;
8989
- i -= 2;
8998
+ i2 -= 2;
8990
8999
  }
8991
9000
  if (countBefore % 2 == 0) break;
8992
9001
  else pos += 2;
@@ -9017,8 +9026,8 @@ function surrogateLow(ch) {
9017
9026
  function surrogateHigh(ch) {
9018
9027
  return ch >= 55296 && ch < 56320;
9019
9028
  }
9020
- function codePointSize(code) {
9021
- return code < 65536 ? 1 : 2;
9029
+ function codePointSize(code2) {
9030
+ return code2 < 65536 ? 1 : 2;
9022
9031
  }
9023
9032
  var rangeFrom, rangeTo, ZWJ;
9024
9033
  var init_src = __esm({
@@ -9027,8 +9036,8 @@ var init_src = __esm({
9027
9036
  rangeTo = [];
9028
9037
  (() => {
9029
9038
  let numbers = "lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((s) => s ? parseInt(s, 36) : 1);
9030
- for (let i = 0, n = 0; i < numbers.length; i++)
9031
- (i % 2 ? rangeTo : rangeFrom).push(n = n + numbers[i]);
9039
+ for (let i2 = 0, n = 0; i2 < numbers.length; i2++)
9040
+ (i2 % 2 ? rangeTo : rangeFrom).push(n = n + numbers[i2]);
9032
9041
  })();
9033
9042
  ZWJ = 8205;
9034
9043
  }
@@ -9042,8 +9051,8 @@ function textLength(text) {
9042
9051
  return length;
9043
9052
  }
9044
9053
  function appendText(text, target, from = 0, to = 1e9) {
9045
- for (let pos = 0, i = 0, first = true; i < text.length && pos <= to; i++) {
9046
- let line = text[i], end = pos + line.length;
9054
+ for (let pos = 0, i2 = 0, first = true; i2 < text.length && pos <= to; i2++) {
9055
+ let line = text[i2], end = pos + line.length;
9047
9056
  if (end >= from) {
9048
9057
  if (end > to)
9049
9058
  line = line.slice(0, to - pos);
@@ -9097,8 +9106,8 @@ function addInsert(values2, sections, value) {
9097
9106
  }
9098
9107
  function iterChanges(desc, f, individual) {
9099
9108
  let inserted = desc.inserted;
9100
- for (let posA = 0, posB = 0, i = 0; i < desc.sections.length; ) {
9101
- let len = desc.sections[i++], ins = desc.sections[i++];
9109
+ for (let posA = 0, posB = 0, i2 = 0; i2 < desc.sections.length; ) {
9110
+ let len = desc.sections[i2++], ins = desc.sections[i2++];
9102
9111
  if (ins < 0) {
9103
9112
  posA += len;
9104
9113
  posB += len;
@@ -9108,11 +9117,11 @@ function iterChanges(desc, f, individual) {
9108
9117
  endA += len;
9109
9118
  endB += ins;
9110
9119
  if (ins && inserted)
9111
- text = text.append(inserted[i - 2 >> 1]);
9112
- if (individual || i == desc.sections.length || desc.sections[i + 1] < 0)
9120
+ text = text.append(inserted[i2 - 2 >> 1]);
9121
+ if (individual || i2 == desc.sections.length || desc.sections[i2 + 1] < 0)
9113
9122
  break;
9114
- len = desc.sections[i++];
9115
- ins = desc.sections[i++];
9123
+ len = desc.sections[i2++];
9124
+ ins = desc.sections[i2++];
9116
9125
  }
9117
9126
  f(posA, endA, posB, endB, text);
9118
9127
  posA = endA;
@@ -9218,13 +9227,13 @@ function checkSelection(selection, docLength) {
9218
9227
  throw new RangeError("Selection points outside of document");
9219
9228
  }
9220
9229
  function sameArray2(a, b) {
9221
- return a == b || a.length == b.length && a.every((e, i) => e === b[i]);
9230
+ return a == b || a.length == b.length && a.every((e, i2) => e === b[i2]);
9222
9231
  }
9223
9232
  function compareArray(a, b, compare2) {
9224
9233
  if (a.length != b.length)
9225
9234
  return false;
9226
- for (let i = 0; i < a.length; i++)
9227
- if (!compare2(a[i], b[i]))
9235
+ for (let i2 = 0; i2 < a.length; i2++)
9236
+ if (!compare2(a[i2], b[i2]))
9228
9237
  return false;
9229
9238
  return true;
9230
9239
  }
@@ -9242,9 +9251,9 @@ function dynamicFacetSlot(addresses, facet, providers) {
9242
9251
  let idx = addresses[facet.id] >> 1;
9243
9252
  function get2(state) {
9244
9253
  let values2 = [];
9245
- for (let i = 0; i < providerAddrs.length; i++) {
9246
- let value = getAddr(state, providerAddrs[i]);
9247
- if (providerTypes[i] == 2)
9254
+ for (let i2 = 0; i2 < providerAddrs.length; i2++) {
9255
+ let value = getAddr(state, providerAddrs[i2]);
9256
+ if (providerTypes[i2] == 2)
9248
9257
  for (let val of value)
9249
9258
  values2.push(val);
9250
9259
  else
@@ -9402,11 +9411,11 @@ function resolveTransaction(state, specs, filter2) {
9402
9411
  let s = resolveTransactionInner(state, specs.length ? specs[0] : {}, state.doc.length);
9403
9412
  if (specs.length && specs[0].filter === false)
9404
9413
  filter2 = false;
9405
- for (let i = 1; i < specs.length; i++) {
9406
- if (specs[i].filter === false)
9414
+ for (let i2 = 1; i2 < specs.length; i2++) {
9415
+ if (specs[i2].filter === false)
9407
9416
  filter2 = false;
9408
- let seq = !!specs[i].sequential;
9409
- s = mergeTransaction(s, resolveTransactionInner(state, specs[i], seq ? s.changes.newLength : state.doc.length), seq);
9417
+ let seq = !!specs[i2].sequential;
9418
+ s = mergeTransaction(s, resolveTransactionInner(state, specs[i2], seq ? s.changes.newLength : state.doc.length), seq);
9410
9419
  }
9411
9420
  let tr = Transaction.create(state, s.changes, s.selection, s.effects, s.annotations, s.scrollIntoView);
9412
9421
  return extendTransaction(filter2 ? filterTransaction(tr) : tr);
@@ -9436,8 +9445,8 @@ function filterTransaction(tr) {
9436
9445
  tr = Transaction.create(state, changes, tr.selection && tr.selection.map(back), StateEffect.mapEffects(tr.effects, back), tr.annotations, tr.scrollIntoView);
9437
9446
  }
9438
9447
  let filters = state.facet(transactionFilter);
9439
- for (let i = filters.length - 1; i >= 0; i--) {
9440
- let filtered = filters[i](tr);
9448
+ for (let i2 = filters.length - 1; i2 >= 0; i2--) {
9449
+ let filtered = filters[i2](tr);
9441
9450
  if (filtered instanceof Transaction)
9442
9451
  tr = filtered;
9443
9452
  else if (Array.isArray(filtered) && filtered.length == 1 && filtered[0] instanceof Transaction)
@@ -9449,8 +9458,8 @@ function filterTransaction(tr) {
9449
9458
  }
9450
9459
  function extendTransaction(tr) {
9451
9460
  let state = tr.startState, extenders = state.facet(transactionExtender), spec = tr;
9452
- for (let i = extenders.length - 1; i >= 0; i--) {
9453
- let extension = extenders[i](tr);
9461
+ for (let i2 = extenders.length - 1; i2 >= 0; i2--) {
9462
+ let extension = extenders[i2](tr);
9454
9463
  if (extension && Object.keys(extension).length)
9455
9464
  spec = mergeTransaction(spec, resolveTransactionInner(state, extension, tr.changes.newLength), true);
9456
9465
  }
@@ -9462,8 +9471,8 @@ function asArray(value) {
9462
9471
  function hasWordChar(str) {
9463
9472
  if (wordChar)
9464
9473
  return wordChar.test(str);
9465
- for (let i = 0; i < str.length; i++) {
9466
- let ch = str[i];
9474
+ for (let i2 = 0; i2 < str.length; i2++) {
9475
+ let ch = str[i2];
9467
9476
  if (/\w/.test(ch) || ch > "\x80" && (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch)))
9468
9477
  return true;
9469
9478
  }
@@ -9475,8 +9484,8 @@ function makeCategorizer(wordChars) {
9475
9484
  return CharCategory.Space;
9476
9485
  if (hasWordChar(char))
9477
9486
  return CharCategory.Word;
9478
- for (let i = 0; i < wordChars.length; i++)
9479
- if (char.indexOf(wordChars[i]) > -1)
9487
+ for (let i2 = 0; i2 < wordChars.length; i2++)
9488
+ if (char.indexOf(wordChars[i2]) > -1)
9480
9489
  return CharCategory.Word;
9481
9490
  return CharCategory.Other;
9482
9491
  };
@@ -9489,8 +9498,8 @@ function cmpRange(a, b) {
9489
9498
  }
9490
9499
  function lazySort(ranges) {
9491
9500
  if (ranges.length > 1)
9492
- for (let prev = ranges[0], i = 1; i < ranges.length; i++) {
9493
- let cur = ranges[i];
9501
+ for (let prev = ranges[0], i2 = 1; i2 < ranges.length; i2++) {
9502
+ let cur = ranges[i2];
9494
9503
  if (cmpRange(prev, cur) > 0)
9495
9504
  return ranges.slice().sort(cmpRange);
9496
9505
  prev = cur;
@@ -9500,15 +9509,15 @@ function lazySort(ranges) {
9500
9509
  function findSharedChunks(a, b, textDiff) {
9501
9510
  let inA = /* @__PURE__ */ new Map();
9502
9511
  for (let set2 of a)
9503
- for (let i = 0; i < set2.chunk.length; i++)
9504
- if (set2.chunk[i].maxPoint <= 0)
9505
- inA.set(set2.chunk[i], set2.chunkPos[i]);
9512
+ for (let i2 = 0; i2 < set2.chunk.length; i2++)
9513
+ if (set2.chunk[i2].maxPoint <= 0)
9514
+ inA.set(set2.chunk[i2], set2.chunkPos[i2]);
9506
9515
  let shared = /* @__PURE__ */ new Set();
9507
9516
  for (let set2 of b)
9508
- for (let i = 0; i < set2.chunk.length; i++) {
9509
- let known = inA.get(set2.chunk[i]);
9510
- if (known != null && (textDiff ? textDiff.mapPos(known) : known) == set2.chunkPos[i] && !(textDiff === null || textDiff === void 0 ? void 0 : textDiff.touchesRange(known, known + set2.chunk[i].length)))
9511
- shared.add(set2.chunk[i]);
9517
+ for (let i2 = 0; i2 < set2.chunk.length; i2++) {
9518
+ let known = inA.get(set2.chunk[i2]);
9519
+ if (known != null && (textDiff ? textDiff.mapPos(known) : known) == set2.chunkPos[i2] && !(textDiff === null || textDiff === void 0 ? void 0 : textDiff.touchesRange(known, known + set2.chunk[i2].length)))
9520
+ shared.add(set2.chunk[i2]);
9512
9521
  }
9513
9522
  return shared;
9514
9523
  }
@@ -9563,38 +9572,38 @@ function compare(a, startA, b, startB, length, comparator) {
9563
9572
  function sameValues(a, b) {
9564
9573
  if (a.length != b.length)
9565
9574
  return false;
9566
- for (let i = 0; i < a.length; i++)
9567
- if (a[i] != b[i] && !cmpVal(a[i], b[i]))
9575
+ for (let i2 = 0; i2 < a.length; i2++)
9576
+ if (a[i2] != b[i2] && !cmpVal(a[i2], b[i2]))
9568
9577
  return false;
9569
9578
  return true;
9570
9579
  }
9571
9580
  function remove(array, index) {
9572
- for (let i = index, e = array.length - 1; i < e; i++)
9573
- array[i] = array[i + 1];
9581
+ for (let i2 = index, e = array.length - 1; i2 < e; i2++)
9582
+ array[i2] = array[i2 + 1];
9574
9583
  array.pop();
9575
9584
  }
9576
9585
  function insert(array, index, value) {
9577
- for (let i = array.length - 1; i >= index; i--)
9578
- array[i + 1] = array[i];
9586
+ for (let i2 = array.length - 1; i2 >= index; i2--)
9587
+ array[i2 + 1] = array[i2];
9579
9588
  array[index] = value;
9580
9589
  }
9581
9590
  function findMinIndex(value, array) {
9582
9591
  let found = -1, foundPos = 1e9;
9583
- for (let i = 0; i < array.length; i++)
9584
- if ((array[i] - foundPos || value[i].endSide - value[found].endSide) < 0) {
9585
- found = i;
9586
- foundPos = array[i];
9592
+ for (let i2 = 0; i2 < array.length; i2++)
9593
+ if ((array[i2] - foundPos || value[i2].endSide - value[found].endSide) < 0) {
9594
+ found = i2;
9595
+ foundPos = array[i2];
9587
9596
  }
9588
9597
  return found;
9589
9598
  }
9590
9599
  function findColumn(string2, col, tabSize, strict) {
9591
- for (let i = 0, n = 0; ; ) {
9600
+ for (let i2 = 0, n = 0; ; ) {
9592
9601
  if (n >= col)
9593
- return i;
9594
- if (i == string2.length)
9602
+ return i2;
9603
+ if (i2 == string2.length)
9595
9604
  break;
9596
- n += string2.charCodeAt(i) == 9 ? tabSize - n % tabSize : 1;
9597
- i = findClusterBreak2(string2, i);
9605
+ n += string2.charCodeAt(i2) == 9 ? tabSize - n % tabSize : 1;
9606
+ i2 = findClusterBreak2(string2, i2);
9598
9607
  }
9599
9608
  return strict === true ? -1 : string2.length;
9600
9609
  }
@@ -9764,8 +9773,8 @@ var init_dist6 = __esm({
9764
9773
  return null;
9765
9774
  }
9766
9775
  lineInner(target, isLine, line, offset) {
9767
- for (let i = 0; ; i++) {
9768
- let string2 = this.text[i], end = offset + string2.length;
9776
+ for (let i2 = 0; ; i2++) {
9777
+ let string2 = this.text[i2], end = offset + string2.length;
9769
9778
  if ((isLine ? line : end) >= target)
9770
9779
  return new Line(offset, end, line, string2);
9771
9780
  offset = end + 1;
@@ -9800,9 +9809,9 @@ var init_dist6 = __esm({
9800
9809
  sliceString(from, to = this.length, lineSep = "\n") {
9801
9810
  [from, to] = clip(this, from, to);
9802
9811
  let result = "";
9803
- for (let pos = 0, i = 0; pos <= to && i < this.text.length; i++) {
9804
- let line = this.text[i], end = pos + line.length;
9805
- if (pos > from && i)
9812
+ for (let pos = 0, i2 = 0; pos <= to && i2 < this.text.length; i2++) {
9813
+ let line = this.text[i2], end = pos + line.length;
9814
+ if (pos > from && i2)
9806
9815
  result += lineSep;
9807
9816
  if (from < end && to > pos)
9808
9817
  result += line.slice(Math.max(0, from - pos), to - pos);
@@ -9843,8 +9852,8 @@ var init_dist6 = __esm({
9843
9852
  this.lines += child.lines;
9844
9853
  }
9845
9854
  lineInner(target, isLine, line, offset) {
9846
- for (let i = 0; ; i++) {
9847
- let child = this.children[i], end = offset + child.length, endLine = line + child.lines - 1;
9855
+ for (let i2 = 0; ; i2++) {
9856
+ let child = this.children[i2], end = offset + child.length, endLine = line + child.lines - 1;
9848
9857
  if ((isLine ? endLine : end) >= target)
9849
9858
  return child.lineInner(target, isLine, line, offset);
9850
9859
  offset = end + 1;
@@ -9852,8 +9861,8 @@ var init_dist6 = __esm({
9852
9861
  }
9853
9862
  }
9854
9863
  decompose(from, to, target, open) {
9855
- for (let i = 0, pos = 0; pos <= to && i < this.children.length; i++) {
9856
- let child = this.children[i], end = pos + child.length;
9864
+ for (let i2 = 0, pos = 0; pos <= to && i2 < this.children.length; i2++) {
9865
+ let child = this.children[i2], end = pos + child.length;
9857
9866
  if (from <= end && to >= pos) {
9858
9867
  let childOpen = open & ((pos <= from ? 1 : 0) | (end >= to ? 2 : 0));
9859
9868
  if (pos >= from && end <= to && !childOpen)
@@ -9867,14 +9876,14 @@ var init_dist6 = __esm({
9867
9876
  replace(from, to, text) {
9868
9877
  [from, to] = clip(this, from, to);
9869
9878
  if (text.lines < this.lines)
9870
- for (let i = 0, pos = 0; i < this.children.length; i++) {
9871
- let child = this.children[i], end = pos + child.length;
9879
+ for (let i2 = 0, pos = 0; i2 < this.children.length; i2++) {
9880
+ let child = this.children[i2], end = pos + child.length;
9872
9881
  if (from >= pos && to <= end) {
9873
9882
  let updated = child.replace(from - pos, to - pos, text);
9874
9883
  let totalLines = this.lines - child.lines + updated.lines;
9875
9884
  if (updated.lines < totalLines >> 5 - 1 && updated.lines > totalLines >> 5 + 1) {
9876
9885
  let copy = this.children.slice();
9877
- copy[i] = updated;
9886
+ copy[i2] = updated;
9878
9887
  return new _TextNode(copy, this.length - (to - from) + text.length);
9879
9888
  }
9880
9889
  return super.replace(pos, end, updated);
@@ -9886,9 +9895,9 @@ var init_dist6 = __esm({
9886
9895
  sliceString(from, to = this.length, lineSep = "\n") {
9887
9896
  [from, to] = clip(this, from, to);
9888
9897
  let result = "";
9889
- for (let i = 0, pos = 0; i < this.children.length && pos <= to; i++) {
9890
- let child = this.children[i], end = pos + child.length;
9891
- if (pos > from && i)
9898
+ for (let i2 = 0, pos = 0; i2 < this.children.length && pos <= to; i2++) {
9899
+ let child = this.children[i2], end = pos + child.length;
9900
+ if (pos > from && i2)
9892
9901
  result += lineSep;
9893
9902
  if (from < end && to > pos)
9894
9903
  result += child.sliceString(from - pos, to - pos, lineSep);
@@ -10146,8 +10155,8 @@ var init_dist6 = __esm({
10146
10155
  */
10147
10156
  get length() {
10148
10157
  let result = 0;
10149
- for (let i = 0; i < this.sections.length; i += 2)
10150
- result += this.sections[i];
10158
+ for (let i2 = 0; i2 < this.sections.length; i2 += 2)
10159
+ result += this.sections[i2];
10151
10160
  return result;
10152
10161
  }
10153
10162
  /**
@@ -10155,9 +10164,9 @@ var init_dist6 = __esm({
10155
10164
  */
10156
10165
  get newLength() {
10157
10166
  let result = 0;
10158
- for (let i = 0; i < this.sections.length; i += 2) {
10159
- let ins = this.sections[i + 1];
10160
- result += ins < 0 ? this.sections[i] : ins;
10167
+ for (let i2 = 0; i2 < this.sections.length; i2 += 2) {
10168
+ let ins = this.sections[i2 + 1];
10169
+ result += ins < 0 ? this.sections[i2] : ins;
10161
10170
  }
10162
10171
  return result;
10163
10172
  }
@@ -10173,8 +10182,8 @@ var init_dist6 = __esm({
10173
10182
  the new position in the changed document.
10174
10183
  */
10175
10184
  iterGaps(f) {
10176
- for (let i = 0, posA = 0, posB = 0; i < this.sections.length; ) {
10177
- let len = this.sections[i++], ins = this.sections[i++];
10185
+ for (let i2 = 0, posA = 0, posB = 0; i2 < this.sections.length; ) {
10186
+ let len = this.sections[i2++], ins = this.sections[i2++];
10178
10187
  if (ins < 0) {
10179
10188
  f(posA, posB, len);
10180
10189
  posB += len;
@@ -10204,8 +10213,8 @@ var init_dist6 = __esm({
10204
10213
  */
10205
10214
  get invertedDesc() {
10206
10215
  let sections = [];
10207
- for (let i = 0; i < this.sections.length; ) {
10208
- let len = this.sections[i++], ins = this.sections[i++];
10216
+ for (let i2 = 0; i2 < this.sections.length; ) {
10217
+ let len = this.sections[i2++], ins = this.sections[i2++];
10209
10218
  if (ins < 0)
10210
10219
  sections.push(len, ins);
10211
10220
  else
@@ -10232,8 +10241,8 @@ var init_dist6 = __esm({
10232
10241
  }
10233
10242
  mapPos(pos, assoc = -1, mode = MapMode.Simple) {
10234
10243
  let posA = 0, posB = 0;
10235
- for (let i = 0; i < this.sections.length; ) {
10236
- let len = this.sections[i++], ins = this.sections[i++], endA = posA + len;
10244
+ for (let i2 = 0; i2 < this.sections.length; ) {
10245
+ let len = this.sections[i2++], ins = this.sections[i2++], endA = posA + len;
10237
10246
  if (ins < 0) {
10238
10247
  if (endA > pos)
10239
10248
  return posB + (pos - posA);
@@ -10257,8 +10266,8 @@ var init_dist6 = __esm({
10257
10266
  returned.
10258
10267
  */
10259
10268
  touchesRange(from, to = from) {
10260
- for (let i = 0, pos = 0; i < this.sections.length && pos <= to; ) {
10261
- let len = this.sections[i++], ins = this.sections[i++], end = pos + len;
10269
+ for (let i2 = 0, pos = 0; i2 < this.sections.length && pos <= to; ) {
10270
+ let len = this.sections[i2++], ins = this.sections[i2++], end = pos + len;
10262
10271
  if (ins >= 0 && pos <= to && end >= from)
10263
10272
  return pos < from && end > to ? "cover" : true;
10264
10273
  pos = end;
@@ -10270,8 +10279,8 @@ var init_dist6 = __esm({
10270
10279
  */
10271
10280
  toString() {
10272
10281
  let result = "";
10273
- for (let i = 0; i < this.sections.length; ) {
10274
- let len = this.sections[i++], ins = this.sections[i++];
10282
+ for (let i2 = 0; i2 < this.sections.length; ) {
10283
+ let len = this.sections[i2++], ins = this.sections[i2++];
10275
10284
  result += (result ? " " : "") + len + (ins >= 0 ? ":" + ins : "");
10276
10285
  }
10277
10286
  return result;
@@ -10324,12 +10333,12 @@ var init_dist6 = __esm({
10324
10333
  */
10325
10334
  invert(doc2) {
10326
10335
  let sections = this.sections.slice(), inserted = [];
10327
- for (let i = 0, pos = 0; i < sections.length; i += 2) {
10328
- let len = sections[i], ins = sections[i + 1];
10336
+ for (let i2 = 0, pos = 0; i2 < sections.length; i2 += 2) {
10337
+ let len = sections[i2], ins = sections[i2 + 1];
10329
10338
  if (ins >= 0) {
10330
- sections[i] = ins;
10331
- sections[i + 1] = len;
10332
- let index = i >> 1;
10339
+ sections[i2] = ins;
10340
+ sections[i2 + 1] = len;
10341
+ let index = i2 >> 1;
10333
10342
  while (inserted.length < index)
10334
10343
  inserted.push(Text.empty);
10335
10344
  inserted.push(len ? doc2.slice(pos, pos + len) : Text.empty);
@@ -10388,8 +10397,8 @@ var init_dist6 = __esm({
10388
10397
  filter(ranges) {
10389
10398
  let resultSections = [], resultInserted = [], filteredSections = [];
10390
10399
  let iter = new SectionIter(this);
10391
- done: for (let i = 0, pos = 0; ; ) {
10392
- let next = i == ranges.length ? 1e9 : ranges[i++];
10400
+ done: for (let i2 = 0, pos = 0; ; ) {
10401
+ let next = i2 == ranges.length ? 1e9 : ranges[i2++];
10393
10402
  while (pos < next || pos == next && iter.len == 0) {
10394
10403
  if (iter.done)
10395
10404
  break done;
@@ -10402,7 +10411,7 @@ var init_dist6 = __esm({
10402
10411
  iter.forward(len);
10403
10412
  pos += len;
10404
10413
  }
10405
- let end = ranges[i++];
10414
+ let end = ranges[i2++];
10406
10415
  while (pos < end) {
10407
10416
  if (iter.done)
10408
10417
  break done;
@@ -10423,14 +10432,14 @@ var init_dist6 = __esm({
10423
10432
  */
10424
10433
  toJSON() {
10425
10434
  let parts = [];
10426
- for (let i = 0; i < this.sections.length; i += 2) {
10427
- let len = this.sections[i], ins = this.sections[i + 1];
10435
+ for (let i2 = 0; i2 < this.sections.length; i2 += 2) {
10436
+ let len = this.sections[i2], ins = this.sections[i2 + 1];
10428
10437
  if (ins < 0)
10429
10438
  parts.push(len);
10430
10439
  else if (ins == 0)
10431
10440
  parts.push([len]);
10432
10441
  else
10433
- parts.push([len].concat(this.inserted[i >> 1].toJSON()));
10442
+ parts.push([len].concat(this.inserted[i2 >> 1].toJSON()));
10434
10443
  }
10435
10444
  return parts;
10436
10445
  }
@@ -10496,19 +10505,19 @@ var init_dist6 = __esm({
10496
10505
  if (!Array.isArray(json))
10497
10506
  throw new RangeError("Invalid JSON representation of ChangeSet");
10498
10507
  let sections = [], inserted = [];
10499
- for (let i = 0; i < json.length; i++) {
10500
- let part = json[i];
10508
+ for (let i2 = 0; i2 < json.length; i2++) {
10509
+ let part = json[i2];
10501
10510
  if (typeof part == "number") {
10502
10511
  sections.push(part, -1);
10503
- } else if (!Array.isArray(part) || typeof part[0] != "number" || part.some((e, i2) => i2 && typeof e != "string")) {
10512
+ } else if (!Array.isArray(part) || typeof part[0] != "number" || part.some((e, i3) => i3 && typeof e != "string")) {
10504
10513
  throw new RangeError("Invalid JSON representation of ChangeSet");
10505
10514
  } else if (part.length == 1) {
10506
10515
  sections.push(part[0], 0);
10507
10516
  } else {
10508
- while (inserted.length < i)
10517
+ while (inserted.length < i2)
10509
10518
  inserted.push(Text.empty);
10510
- inserted[i] = Text.of(part.slice(1));
10511
- sections.push(part[0], inserted[i].length);
10519
+ inserted[i2] = Text.of(part.slice(1));
10520
+ sections.push(part[0], inserted[i2].length);
10512
10521
  }
10513
10522
  }
10514
10523
  return new _ChangeSet(sections, inserted);
@@ -10697,8 +10706,8 @@ var init_dist6 = __esm({
10697
10706
  eq(other, includeAssoc = false) {
10698
10707
  if (this.ranges.length != other.ranges.length || this.mainIndex != other.mainIndex)
10699
10708
  return false;
10700
- for (let i = 0; i < this.ranges.length; i++)
10701
- if (!this.ranges[i].eq(other.ranges[i], includeAssoc))
10709
+ for (let i2 = 0; i2 < this.ranges.length; i2++)
10710
+ if (!this.ranges[i2].eq(other.ranges[i2], includeAssoc))
10702
10711
  return false;
10703
10712
  return true;
10704
10713
  }
@@ -10760,8 +10769,8 @@ var init_dist6 = __esm({
10760
10769
  static create(ranges, mainIndex = 0) {
10761
10770
  if (ranges.length == 0)
10762
10771
  throw new RangeError("A selection needs at least one range");
10763
- for (let pos = 0, i = 0; i < ranges.length; i++) {
10764
- let range = ranges[i];
10772
+ for (let pos = 0, i2 = 0; i2 < ranges.length; i2++) {
10773
+ let range = ranges[i2];
10765
10774
  if (range.empty ? range.from <= pos : range.from < pos)
10766
10775
  return _EditorSelection.normalized(ranges.slice(), mainIndex);
10767
10776
  pos = range.to;
@@ -10791,13 +10800,13 @@ var init_dist6 = __esm({
10791
10800
  let main = ranges[mainIndex];
10792
10801
  ranges.sort((a, b) => a.from - b.from);
10793
10802
  mainIndex = ranges.indexOf(main);
10794
- for (let i = 1; i < ranges.length; i++) {
10795
- let range = ranges[i], prev = ranges[i - 1];
10803
+ for (let i2 = 1; i2 < ranges.length; i2++) {
10804
+ let range = ranges[i2], prev = ranges[i2 - 1];
10796
10805
  if (range.empty ? range.from <= prev.to : range.from < prev.to) {
10797
10806
  let from = prev.from, to = Math.max(range.to, prev.to);
10798
- if (i <= mainIndex)
10807
+ if (i2 <= mainIndex)
10799
10808
  mainIndex--;
10800
- ranges.splice(--i, 2, range.anchor > range.head ? _EditorSelection.range(to, from) : _EditorSelection.range(from, to));
10809
+ ranges.splice(--i2, 2, range.anchor > range.head ? _EditorSelection.range(to, from) : _EditorSelection.range(from, to));
10801
10810
  }
10802
10811
  }
10803
10812
  return new _EditorSelection(ranges, mainIndex);
@@ -10938,7 +10947,7 @@ var init_dist6 = __esm({
10938
10947
  return field;
10939
10948
  }
10940
10949
  create(state) {
10941
- let init = state.facet(initField).find((i) => i.field == this);
10950
+ let init = state.facet(initField).find((i2) => i2.field == this);
10942
10951
  return ((init === null || init === void 0 ? void 0 : init.create) || this.createF)(state);
10943
10952
  }
10944
10953
  /**
@@ -10961,7 +10970,7 @@ var init_dist6 = __esm({
10961
10970
  },
10962
10971
  reconfigure: (state, oldState) => {
10963
10972
  let init = state.facet(initField), oldInit = oldState.facet(initField), reInit;
10964
- if ((reInit = init.find((i) => i.field == this)) && reInit != oldInit.find((i) => i.field == this)) {
10973
+ if ((reInit = init.find((i2) => i2.field == this)) && reInit != oldInit.find((i2) => i2.field == this)) {
10965
10974
  state.values[idx] = reInit.create(state);
10966
10975
  return 1;
10967
10976
  }
@@ -11339,8 +11348,8 @@ var init_dist6 = __esm({
11339
11348
  this.computeSlot = computeSlot;
11340
11349
  if (tr)
11341
11350
  tr._state = this;
11342
- for (let i = 0; i < this.config.dynamicSlots.length; i++)
11343
- ensureAddr(this, i << 1);
11351
+ for (let i2 = 0; i2 < this.config.dynamicSlots.length; i2++)
11352
+ ensureAddr(this, i2 << 1);
11344
11353
  this.computeSlot = null;
11345
11354
  }
11346
11355
  field(field, require2 = true) {
@@ -11431,10 +11440,10 @@ var init_dist6 = __esm({
11431
11440
  let result1 = f(sel.ranges[0]);
11432
11441
  let changes = this.changes(result1.changes), ranges = [result1.range];
11433
11442
  let effects = asArray(result1.effects);
11434
- for (let i = 1; i < sel.ranges.length; i++) {
11435
- let result = f(sel.ranges[i]);
11443
+ for (let i2 = 1; i2 < sel.ranges.length; i2++) {
11444
+ let result = f(sel.ranges[i2]);
11436
11445
  let newChanges = this.changes(result.changes), newMapped = newChanges.map(changes);
11437
- for (let j = 0; j < i; j++)
11446
+ for (let j = 0; j < i2; j++)
11438
11447
  ranges[j] = ranges[j].map(newMapped);
11439
11448
  let mapBy = changes.mapDesc(newChanges, true);
11440
11449
  ranges.push(result.range.map(mapBy));
@@ -11575,10 +11584,10 @@ var init_dist6 = __esm({
11575
11584
  break;
11576
11585
  }
11577
11586
  if (insert2.length)
11578
- phrase = phrase.replace(/\$(\$|\d*)/g, (m, i) => {
11579
- if (i == "$")
11587
+ phrase = phrase.replace(/\$(\$|\d*)/g, (m, i2) => {
11588
+ if (i2 == "$")
11580
11589
  return "$";
11581
- let n = +(i || 1);
11590
+ let n = +(i2 || 1);
11582
11591
  return !n || n > insert2.length ? m : insert2[n - 1];
11583
11592
  });
11584
11593
  return phrase;
@@ -11728,14 +11737,14 @@ var init_dist6 = __esm({
11728
11737
  }
11729
11738
  }
11730
11739
  between(offset, from, to, f) {
11731
- for (let i = this.findIndex(from, -1e9, true), e = this.findIndex(to, 1e9, false, i); i < e; i++)
11732
- if (f(this.from[i] + offset, this.to[i] + offset, this.value[i]) === false)
11740
+ for (let i2 = this.findIndex(from, -1e9, true), e = this.findIndex(to, 1e9, false, i2); i2 < e; i2++)
11741
+ if (f(this.from[i2] + offset, this.to[i2] + offset, this.value[i2]) === false)
11733
11742
  return false;
11734
11743
  }
11735
11744
  map(offset, changes) {
11736
11745
  let value = [], from = [], to = [], newPos = -1, maxPoint = -1;
11737
- for (let i = 0; i < this.value.length; i++) {
11738
- let val = this.value[i], curFrom = this.from[i] + offset, curTo = this.to[i] + offset, newFrom, newTo;
11746
+ for (let i2 = 0; i2 < this.value.length; i2++) {
11747
+ let val = this.value[i2], curFrom = this.from[i2] + offset, curTo = this.to[i2] + offset, newFrom, newTo;
11739
11748
  if (curFrom == curTo) {
11740
11749
  let mapped = changes.mapPos(curFrom, val.startSide, val.mapMode);
11741
11750
  if (mapped == null)
@@ -11820,14 +11829,14 @@ var init_dist6 = __esm({
11820
11829
  add = add.slice().sort(cmpRange);
11821
11830
  if (this.isEmpty)
11822
11831
  return add.length ? _RangeSet.of(add) : this;
11823
- let cur = new LayerCursor(this, null, -1).goto(0), i = 0, spill = [];
11832
+ let cur = new LayerCursor(this, null, -1).goto(0), i2 = 0, spill = [];
11824
11833
  let builder = new RangeSetBuilder();
11825
- while (cur.value || i < add.length) {
11826
- if (i < add.length && (cur.from - add[i].from || cur.startSide - add[i].value.startSide) >= 0) {
11827
- let range = add[i++];
11834
+ while (cur.value || i2 < add.length) {
11835
+ if (i2 < add.length && (cur.from - add[i2].from || cur.startSide - add[i2].value.startSide) >= 0) {
11836
+ let range = add[i2++];
11828
11837
  if (!builder.addInner(range.from, range.to, range.value))
11829
11838
  spill.push(range);
11830
- } else if (cur.rangeIndex == 1 && cur.chunkIndex < this.chunk.length && (i == add.length || this.chunkEnd(cur.chunkIndex) < add[i].from) && (!filter2 || filterFrom > this.chunkEnd(cur.chunkIndex) || filterTo < this.chunkPos[cur.chunkIndex]) && builder.addChunk(this.chunkPos[cur.chunkIndex], this.chunk[cur.chunkIndex])) {
11839
+ } else if (cur.rangeIndex == 1 && cur.chunkIndex < this.chunk.length && (i2 == add.length || this.chunkEnd(cur.chunkIndex) < add[i2].from) && (!filter2 || filterFrom > this.chunkEnd(cur.chunkIndex) || filterTo < this.chunkPos[cur.chunkIndex]) && builder.addChunk(this.chunkPos[cur.chunkIndex], this.chunk[cur.chunkIndex])) {
11831
11840
  cur.nextChunk();
11832
11841
  } else {
11833
11842
  if (!filter2 || filterFrom > cur.to || filterTo < cur.from || filter2(cur.from, cur.to, cur.value)) {
@@ -11846,8 +11855,8 @@ var init_dist6 = __esm({
11846
11855
  if (changes.empty || this.isEmpty)
11847
11856
  return this;
11848
11857
  let chunks = [], chunkPos = [], maxPoint = -1;
11849
- for (let i = 0; i < this.chunk.length; i++) {
11850
- let start = this.chunkPos[i], chunk = this.chunk[i];
11858
+ for (let i2 = 0; i2 < this.chunk.length; i2++) {
11859
+ let start = this.chunkPos[i2], chunk = this.chunk[i2];
11851
11860
  let touch = changes.touchesRange(start, start + chunk.length);
11852
11861
  if (touch === false) {
11853
11862
  maxPoint = Math.max(maxPoint, chunk.maxPoint);
@@ -11874,8 +11883,8 @@ var init_dist6 = __esm({
11874
11883
  between(from, to, f) {
11875
11884
  if (this.isEmpty)
11876
11885
  return;
11877
- for (let i = 0; i < this.chunk.length; i++) {
11878
- let start = this.chunkPos[i], chunk = this.chunk[i];
11886
+ for (let i2 = 0; i2 < this.chunk.length; i2++) {
11887
+ let start = this.chunkPos[i2], chunk = this.chunk[i2];
11879
11888
  if (to >= start && from <= start + chunk.length && chunk.between(start, from - start, to - start, f) === false)
11880
11889
  return;
11881
11890
  }
@@ -11986,8 +11995,8 @@ var init_dist6 = __esm({
11986
11995
  if (!sets.length)
11987
11996
  return _RangeSet.empty;
11988
11997
  let result = sets[sets.length - 1];
11989
- for (let i = sets.length - 2; i >= 0; i--) {
11990
- for (let layer = sets[i]; layer != _RangeSet.empty; layer = layer.nextLayer)
11998
+ for (let i2 = sets.length - 2; i2 >= 0; i2--) {
11999
+ for (let layer = sets[i2]; layer != _RangeSet.empty; layer = layer.nextLayer)
11991
12000
  result = new _RangeSet(layer.chunkPos, layer.chunk, result, Math.max(layer.maxPoint, result.maxPoint));
11992
12001
  }
11993
12002
  return result;
@@ -12175,10 +12184,10 @@ var init_dist6 = __esm({
12175
12184
  }
12176
12185
  static from(sets, skip = null, minPoint = -1) {
12177
12186
  let heap = [];
12178
- for (let i = 0; i < sets.length; i++) {
12179
- for (let cur = sets[i]; !cur.isEmpty; cur = cur.nextLayer) {
12187
+ for (let i2 = 0; i2 < sets.length; i2++) {
12188
+ for (let cur = sets[i2]; !cur.isEmpty; cur = cur.nextLayer) {
12180
12189
  if (cur.maxPoint >= minPoint)
12181
- heap.push(new LayerCursor(cur, skip, minPoint, i));
12190
+ heap.push(new LayerCursor(cur, skip, minPoint, i2));
12182
12191
  }
12183
12192
  }
12184
12193
  return heap.length == 1 ? heap[0] : new _HeapCursor(heap);
@@ -12189,16 +12198,16 @@ var init_dist6 = __esm({
12189
12198
  goto(pos, side = -1e9) {
12190
12199
  for (let cur of this.heap)
12191
12200
  cur.goto(pos, side);
12192
- for (let i = this.heap.length >> 1; i >= 0; i--)
12193
- heapBubble(this.heap, i);
12201
+ for (let i2 = this.heap.length >> 1; i2 >= 0; i2--)
12202
+ heapBubble(this.heap, i2);
12194
12203
  this.next();
12195
12204
  return this;
12196
12205
  }
12197
12206
  forward(pos, side) {
12198
12207
  for (let cur of this.heap)
12199
12208
  cur.forward(pos, side);
12200
- for (let i = this.heap.length >> 1; i >= 0; i--)
12201
- heapBubble(this.heap, i);
12209
+ for (let i2 = this.heap.length >> 1; i2 >= 0; i2--)
12210
+ heapBubble(this.heap, i2);
12202
12211
  if ((this.to - pos || this.value.endSide - side) < 0)
12203
12212
  this.next();
12204
12213
  }
@@ -12256,14 +12265,14 @@ var init_dist6 = __esm({
12256
12265
  this.minActive = findMinIndex(this.active, this.activeTo);
12257
12266
  }
12258
12267
  addActive(trackOpen) {
12259
- let i = 0, { value, to, rank } = this.cursor;
12260
- while (i < this.activeRank.length && (rank - this.activeRank[i] || to - this.activeTo[i]) > 0)
12261
- i++;
12262
- insert(this.active, i, value);
12263
- insert(this.activeTo, i, to);
12264
- insert(this.activeRank, i, rank);
12268
+ let i2 = 0, { value, to, rank } = this.cursor;
12269
+ while (i2 < this.activeRank.length && (rank - this.activeRank[i2] || to - this.activeTo[i2]) > 0)
12270
+ i2++;
12271
+ insert(this.active, i2, value);
12272
+ insert(this.activeTo, i2, to);
12273
+ insert(this.activeRank, i2, rank);
12265
12274
  if (trackOpen)
12266
- insert(trackOpen, i, this.cursor.from);
12275
+ insert(trackOpen, i2, this.cursor.from);
12267
12276
  this.minActive = findMinIndex(this.active, this.activeTo);
12268
12277
  }
12269
12278
  // After calling this, if `this.point` != null, the next range is a
@@ -12311,7 +12320,7 @@ var init_dist6 = __esm({
12311
12320
  }
12312
12321
  if (trackOpen) {
12313
12322
  this.openStart = 0;
12314
- for (let i = trackOpen.length - 1; i >= 0 && trackOpen[i] < from; i--)
12323
+ for (let i2 = trackOpen.length - 1; i2 >= 0 && trackOpen[i2] < from; i2--)
12315
12324
  this.openStart++;
12316
12325
  }
12317
12326
  }
@@ -12319,17 +12328,17 @@ var init_dist6 = __esm({
12319
12328
  if (!this.active.length)
12320
12329
  return this.active;
12321
12330
  let active = [];
12322
- for (let i = this.active.length - 1; i >= 0; i--) {
12323
- if (this.activeRank[i] < this.pointRank)
12331
+ for (let i2 = this.active.length - 1; i2 >= 0; i2--) {
12332
+ if (this.activeRank[i2] < this.pointRank)
12324
12333
  break;
12325
- if (this.activeTo[i] > to || this.activeTo[i] == to && this.active[i].endSide >= this.point.endSide)
12326
- active.push(this.active[i]);
12334
+ if (this.activeTo[i2] > to || this.activeTo[i2] == to && this.active[i2].endSide >= this.point.endSide)
12335
+ active.push(this.active[i2]);
12327
12336
  }
12328
12337
  return active.reverse();
12329
12338
  }
12330
12339
  openEnd(to) {
12331
12340
  let open = 0;
12332
- for (let i = this.activeTo.length - 1; i >= 0 && this.activeTo[i] > to; i--)
12341
+ for (let i2 = this.activeTo.length - 1; i2 >= 0 && this.activeTo[i2] > to; i2--)
12333
12342
  open++;
12334
12343
  return open;
12335
12344
  }
@@ -12435,8 +12444,8 @@ var init_style_mod = __esm({
12435
12444
  mount(modules, root) {
12436
12445
  let sheet = this.sheet;
12437
12446
  let pos = 0, j = 0;
12438
- for (let i = 0; i < modules.length; i++) {
12439
- let mod = modules[i], index = this.modules.indexOf(mod);
12447
+ for (let i2 = 0; i2 < modules.length; i2++) {
12448
+ let mod = modules[i2], index = this.modules.indexOf(mod);
12440
12449
  if (index < j && index > -1) {
12441
12450
  this.modules.splice(index, 1);
12442
12451
  j--;
@@ -12457,8 +12466,8 @@ var init_style_mod = __esm({
12457
12466
  root.adoptedStyleSheets = [this.sheet, ...root.adoptedStyleSheets];
12458
12467
  } else {
12459
12468
  let text = "";
12460
- for (let i = 0; i < this.modules.length; i++)
12461
- text += this.modules[i].getRules() + "\n";
12469
+ for (let i2 = 0; i2 < this.modules.length; i2++)
12470
+ text += this.modules[i2].getRules() + "\n";
12462
12471
  this.styleTag.textContent = text;
12463
12472
  let target = root.head || root;
12464
12473
  if (this.styleTag.parentNode != target)
@@ -12604,8 +12613,8 @@ function attrsEq(a, b, ignore) {
12604
12613
  return true;
12605
12614
  }
12606
12615
  function setAttrs(dom, attrs) {
12607
- for (let i = dom.attributes.length - 1; i >= 0; i--) {
12608
- let name2 = dom.attributes[i].name;
12616
+ for (let i2 = dom.attributes.length - 1; i2 >= 0; i2--) {
12617
+ let name2 = dom.attributes[i2].name;
12609
12618
  if (attrs[name2] == null)
12610
12619
  dom.removeAttribute(name2);
12611
12620
  }
@@ -12643,8 +12652,8 @@ function updateAttrs(dom, prev, attrs) {
12643
12652
  }
12644
12653
  function getAttrs(dom) {
12645
12654
  let attrs = /* @__PURE__ */ Object.create(null);
12646
- for (let i = 0; i < dom.attributes.length; i++) {
12647
- let attr = dom.attributes[i];
12655
+ for (let i2 = 0; i2 < dom.attributes.length; i2++) {
12656
+ let attr = dom.attributes[i2];
12648
12657
  attrs[attr.name] = attr.value;
12649
12658
  }
12650
12659
  return attrs;
@@ -12899,8 +12908,8 @@ function focusPreventScroll(dom) {
12899
12908
  } : void 0);
12900
12909
  if (!preventScrollSupported) {
12901
12910
  preventScrollSupported = false;
12902
- for (let i = 0; i < stack.length; ) {
12903
- let elt = stack[i++], top2 = stack[i++], left = stack[i++];
12911
+ for (let i2 = 0; i2 < stack.length; ) {
12912
+ let elt = stack[i2++], top2 = stack[i2++], left = stack[i2++];
12904
12913
  if (elt.scrollTop != top2)
12905
12914
  elt.scrollTop = top2;
12906
12915
  if (elt.scrollLeft != left)
@@ -12914,8 +12923,8 @@ function textRange(node, from, to = from) {
12914
12923
  range.setStart(node, from);
12915
12924
  return range;
12916
12925
  }
12917
- function dispatchKey(elt, name2, code, mods) {
12918
- let options = { key: name2, code: name2, keyCode: code, which: code, cancelable: true };
12926
+ function dispatchKey(elt, name2, code2, mods) {
12927
+ let options = { key: name2, code: name2, keyCode: code2, which: code2, cancelable: true };
12919
12928
  if (mods)
12920
12929
  ({ altKey: options.altKey, ctrlKey: options.ctrlKey, shiftKey: options.shiftKey, metaKey: options.metaKey } = mods);
12921
12930
  let down = new KeyboardEvent("keydown", options);
@@ -12999,8 +13008,8 @@ function textNodeAfter(startNode, startOffset) {
12999
13008
  }
13000
13009
  function dec(str) {
13001
13010
  let result = [];
13002
- for (let i = 0; i < str.length; i++)
13003
- result.push(1 << +str[i]);
13011
+ for (let i2 = 0; i2 < str.length; i2++)
13012
+ result.push(1 << +str[i2]);
13004
13013
  return result;
13005
13014
  }
13006
13015
  function charType(ch) {
@@ -13009,8 +13018,8 @@ function charType(ch) {
13009
13018
  function isolatesEq(a, b) {
13010
13019
  if (a.length != b.length)
13011
13020
  return false;
13012
- for (let i = 0; i < a.length; i++) {
13013
- let iA = a[i], iB = b[i];
13021
+ for (let i2 = 0; i2 < a.length; i2++) {
13022
+ let iA = a[i2], iB = b[i2];
13014
13023
  if (iA.from != iB.from || iA.to != iB.to || iA.direction != iB.direction || !isolatesEq(iA.inner, iB.inner))
13015
13024
  return false;
13016
13025
  }
@@ -13020,34 +13029,34 @@ function computeCharTypes(line, rFrom, rTo, isolates, outerType) {
13020
13029
  for (let iI = 0; iI <= isolates.length; iI++) {
13021
13030
  let from = iI ? isolates[iI - 1].to : rFrom, to = iI < isolates.length ? isolates[iI].from : rTo;
13022
13031
  let prevType = iI ? 256 : outerType;
13023
- for (let i = from, prev = prevType, prevStrong = prevType; i < to; i++) {
13024
- let type = charType(line.charCodeAt(i));
13032
+ for (let i2 = from, prev = prevType, prevStrong = prevType; i2 < to; i2++) {
13033
+ let type = charType(line.charCodeAt(i2));
13025
13034
  if (type == 512)
13026
13035
  type = prev;
13027
13036
  else if (type == 8 && prevStrong == 4)
13028
13037
  type = 16;
13029
- types[i] = type == 4 ? 2 : type;
13038
+ types[i2] = type == 4 ? 2 : type;
13030
13039
  if (type & 7)
13031
13040
  prevStrong = type;
13032
13041
  prev = type;
13033
13042
  }
13034
- for (let i = from, prev = prevType, prevStrong = prevType; i < to; i++) {
13035
- let type = types[i];
13043
+ for (let i2 = from, prev = prevType, prevStrong = prevType; i2 < to; i2++) {
13044
+ let type = types[i2];
13036
13045
  if (type == 128) {
13037
- if (i < to - 1 && prev == types[i + 1] && prev & 24)
13038
- type = types[i] = prev;
13046
+ if (i2 < to - 1 && prev == types[i2 + 1] && prev & 24)
13047
+ type = types[i2] = prev;
13039
13048
  else
13040
- types[i] = 256;
13049
+ types[i2] = 256;
13041
13050
  } else if (type == 64) {
13042
- let end = i + 1;
13051
+ let end = i2 + 1;
13043
13052
  while (end < to && types[end] == 64)
13044
13053
  end++;
13045
- let replace2 = i && prev == 8 || end < rTo && types[end] == 8 ? prevStrong == 1 ? 1 : 8 : 256;
13046
- for (let j = i; j < end; j++)
13054
+ let replace2 = i2 && prev == 8 || end < rTo && types[end] == 8 ? prevStrong == 1 ? 1 : 8 : 256;
13055
+ for (let j = i2; j < end; j++)
13047
13056
  types[j] = replace2;
13048
- i = end - 1;
13057
+ i2 = end - 1;
13049
13058
  } else if (type == 8 && prevStrong == 1) {
13050
- types[i] = 1;
13059
+ types[i2] = 1;
13051
13060
  }
13052
13061
  prev = type;
13053
13062
  if (type & 7)
@@ -13059,15 +13068,15 @@ function processBracketPairs(line, rFrom, rTo, isolates, outerType) {
13059
13068
  let oppositeType = outerType == 1 ? 2 : 1;
13060
13069
  for (let iI = 0, sI = 0, context = 0; iI <= isolates.length; iI++) {
13061
13070
  let from = iI ? isolates[iI - 1].to : rFrom, to = iI < isolates.length ? isolates[iI].from : rTo;
13062
- for (let i = from, ch, br, type; i < to; i++) {
13063
- if (br = Brackets[ch = line.charCodeAt(i)]) {
13071
+ for (let i2 = from, ch, br, type; i2 < to; i2++) {
13072
+ if (br = Brackets[ch = line.charCodeAt(i2)]) {
13064
13073
  if (br < 0) {
13065
13074
  for (let sJ = sI - 3; sJ >= 0; sJ -= 3) {
13066
13075
  if (BracketStack[sJ + 1] == -br) {
13067
13076
  let flags = BracketStack[sJ + 2];
13068
13077
  let type2 = flags & 2 ? outerType : !(flags & 4) ? 0 : flags & 1 ? oppositeType : outerType;
13069
13078
  if (type2)
13070
- types[i] = types[BracketStack[sJ]] = type2;
13079
+ types[i2] = types[BracketStack[sJ]] = type2;
13071
13080
  sI = sJ;
13072
13081
  break;
13073
13082
  }
@@ -13075,11 +13084,11 @@ function processBracketPairs(line, rFrom, rTo, isolates, outerType) {
13075
13084
  } else if (BracketStack.length == 189) {
13076
13085
  break;
13077
13086
  } else {
13078
- BracketStack[sI++] = i;
13087
+ BracketStack[sI++] = i2;
13079
13088
  BracketStack[sI++] = ch;
13080
13089
  BracketStack[sI++] = context;
13081
13090
  }
13082
- } else if ((type = types[i]) == 2 || type == 1) {
13091
+ } else if ((type = types[i2]) == 2 || type == 1) {
13083
13092
  let embed = type == outerType;
13084
13093
  context = embed ? 0 : 1;
13085
13094
  for (let sJ = sI - 3; sJ >= 0; sJ -= 3) {
@@ -13101,10 +13110,10 @@ function processBracketPairs(line, rFrom, rTo, isolates, outerType) {
13101
13110
  function processNeutrals(rFrom, rTo, isolates, outerType) {
13102
13111
  for (let iI = 0, prev = outerType; iI <= isolates.length; iI++) {
13103
13112
  let from = iI ? isolates[iI - 1].to : rFrom, to = iI < isolates.length ? isolates[iI].from : rTo;
13104
- for (let i = from; i < to; ) {
13105
- let type = types[i];
13113
+ for (let i2 = from; i2 < to; ) {
13114
+ let type = types[i2];
13106
13115
  if (type == 256) {
13107
- let end = i + 1;
13116
+ let end = i2 + 1;
13108
13117
  for (; ; ) {
13109
13118
  if (end == to) {
13110
13119
  if (iI == isolates.length)
@@ -13120,17 +13129,17 @@ function processNeutrals(rFrom, rTo, isolates, outerType) {
13120
13129
  let beforeL = prev == 1;
13121
13130
  let afterL = (end < rTo ? types[end] : outerType) == 1;
13122
13131
  let replace2 = beforeL == afterL ? beforeL ? 1 : 2 : outerType;
13123
- for (let j = end, jI = iI, fromJ = jI ? isolates[jI - 1].to : rFrom; j > i; ) {
13132
+ for (let j = end, jI = iI, fromJ = jI ? isolates[jI - 1].to : rFrom; j > i2; ) {
13124
13133
  if (j == fromJ) {
13125
13134
  j = isolates[--jI].from;
13126
13135
  fromJ = jI ? isolates[jI - 1].to : rFrom;
13127
13136
  }
13128
13137
  types[--j] = replace2;
13129
13138
  }
13130
- i = end;
13139
+ i2 = end;
13131
13140
  } else {
13132
13141
  prev = type;
13133
- i++;
13142
+ i2++;
13134
13143
  }
13135
13144
  }
13136
13145
  }
@@ -13287,8 +13296,8 @@ function moveVisually(line, order, dir, start, forward) {
13287
13296
  return EditorSelection.cursor(nextIndex + line.from, span.forward(forward, dir) ? -1 : 1, span.level);
13288
13297
  }
13289
13298
  function autoDirection(text, from, to) {
13290
- for (let i = from; i < to; i++) {
13291
- let type = charType(text.charCodeAt(i));
13299
+ for (let i2 = from; i2 < to; i2++) {
13300
+ let type = charType(text.charCodeAt(i2));
13292
13301
  if (type == 1)
13293
13302
  return LTR;
13294
13303
  if (type == 2 || type == 4)
@@ -13310,7 +13319,7 @@ function getIsolatedRanges(view, line) {
13310
13319
  let isolates = view.state.facet(bidiIsolatedRanges);
13311
13320
  if (!isolates.length)
13312
13321
  return isolates;
13313
- let sets = isolates.map((i) => i instanceof Function ? i(view) : i);
13322
+ let sets = isolates.map((i2) => i2 instanceof Function ? i2(view) : i2);
13314
13323
  let result = [];
13315
13324
  RangeSet.spans(sets, line.from, line.to, {
13316
13325
  point() {
@@ -13318,8 +13327,8 @@ function getIsolatedRanges(view, line) {
13318
13327
  span(fromDoc, toDoc, active, open) {
13319
13328
  let from = fromDoc - line.from, to = toDoc - line.from;
13320
13329
  let level = result;
13321
- for (let i = active.length - 1; i >= 0; i--, open--) {
13322
- let direction = active[i].spec.bidiIsolate, update;
13330
+ for (let i2 = active.length - 1; i2 >= 0; i2--, open--) {
13331
+ let direction = active[i2].spec.bidiIsolate, update;
13323
13332
  if (direction == null)
13324
13333
  direction = autoDirection(line.text, from, to);
13325
13334
  if (open > 0 && level.length && (update = level[level.length - 1]).to == from && update.direction == direction) {
@@ -13397,8 +13406,8 @@ function addLineDeco(value, deco) {
13397
13406
  }
13398
13407
  function getMarks(ptr) {
13399
13408
  let found = [];
13400
- for (let i = ptr.parents.length; i > 1; i--) {
13401
- let tile = i == ptr.parents.length ? ptr.tile : ptr.parents[i].tile;
13409
+ for (let i2 = ptr.parents.length; i2 > 1; i2--) {
13410
+ let tile = i2 == ptr.parents.length ? ptr.tile : ptr.parents[i2].tile;
13402
13411
  if (tile instanceof MarkTile)
13403
13412
  found.push(tile.mark);
13404
13413
  }
@@ -13642,8 +13651,8 @@ function skipAtomicRanges(atoms, pos, bias) {
13642
13651
  }
13643
13652
  function skipAtomsForSelection(atoms, sel) {
13644
13653
  let ranges = null;
13645
- for (let i = 0; i < sel.ranges.length; i++) {
13646
- let range = sel.ranges[i], updated = null;
13654
+ for (let i2 = 0; i2 < sel.ranges.length; i2++) {
13655
+ let range = sel.ranges[i2], updated = null;
13647
13656
  if (range.empty) {
13648
13657
  let pos = skipAtomicRanges(atoms, range.from, 0);
13649
13658
  if (pos != range.from)
@@ -13657,7 +13666,7 @@ function skipAtomsForSelection(atoms, sel) {
13657
13666
  if (updated) {
13658
13667
  if (!ranges)
13659
13668
  ranges = sel.ranges.slice();
13660
- ranges[i] = updated;
13669
+ ranges[i2] = updated;
13661
13670
  }
13662
13671
  }
13663
13672
  return ranges ? EditorSelection.create(ranges, sel.mainIndex) : sel;
@@ -13734,16 +13743,16 @@ function isEmptyToEnd(node, end) {
13734
13743
  function domBoundsAround(tile, from, to, offset) {
13735
13744
  if (tile.isComposite()) {
13736
13745
  let fromI = -1, fromStart = -1, toI = -1, toEnd = -1;
13737
- for (let i = 0, pos = offset, prevEnd = offset; i < tile.children.length; i++) {
13738
- let child = tile.children[i], end = pos + child.length;
13746
+ for (let i2 = 0, pos = offset, prevEnd = offset; i2 < tile.children.length; i2++) {
13747
+ let child = tile.children[i2], end = pos + child.length;
13739
13748
  if (pos < from && end > to)
13740
13749
  return domBoundsAround(child, from, to, pos);
13741
13750
  if (end >= from && fromI == -1) {
13742
- fromI = i;
13751
+ fromI = i2;
13743
13752
  fromStart = pos;
13744
13753
  }
13745
13754
  if (pos > to && child.dom.parentNode == tile.dom) {
13746
- toI = i;
13755
+ toI = i2;
13747
13756
  toEnd = prevEnd;
13748
13757
  break;
13749
13758
  }
@@ -14014,8 +14023,8 @@ function isInPrimarySelection(view, event) {
14014
14023
  if (!sel || sel.rangeCount == 0)
14015
14024
  return true;
14016
14025
  let rects = sel.getRangeAt(0).getClientRects();
14017
- for (let i = 0; i < rects.length; i++) {
14018
- let rect = rects[i];
14026
+ for (let i2 = 0; i2 < rects.length; i2++) {
14027
+ let rect = rects[i2];
14019
14028
  if (rect.left <= event.clientX && rect.right >= event.clientX && rect.top <= event.clientY && rect.bottom >= event.clientY)
14020
14029
  return true;
14021
14030
  }
@@ -14051,7 +14060,7 @@ function textFilter(state, facet, text) {
14051
14060
  }
14052
14061
  function doPaste(view, input) {
14053
14062
  input = textFilter(view.state, clipboardInputFilter, input);
14054
- let { state } = view, changes, i = 1, text = state.toText(input);
14063
+ let { state } = view, changes, i2 = 1, text = state.toText(input);
14055
14064
  let byLine = text.lines == state.selection.ranges.length;
14056
14065
  let linewise = lastLinewiseCopy != null && state.selection.ranges.every((r) => r.empty) && lastLinewiseCopy == text.toString();
14057
14066
  if (linewise) {
@@ -14061,7 +14070,7 @@ function doPaste(view, input) {
14061
14070
  if (line.from == lastLine)
14062
14071
  return { range };
14063
14072
  lastLine = line.from;
14064
- let insert2 = state.toText((byLine ? text.line(i++).text : input) + state.lineBreak);
14073
+ let insert2 = state.toText((byLine ? text.line(i2++).text : input) + state.lineBreak);
14065
14074
  return {
14066
14075
  changes: { from: line.from, insert: insert2 },
14067
14076
  range: EditorSelection.cursor(range.from + insert2.length)
@@ -14069,7 +14078,7 @@ function doPaste(view, input) {
14069
14078
  });
14070
14079
  } else if (byLine) {
14071
14080
  changes = state.changeByRange((range) => {
14072
- let line = text.line(i++);
14081
+ let line = text.line(i2++);
14073
14082
  return {
14074
14083
  changes: { from: range.from, to: range.to, insert: line.text },
14075
14084
  range: EditorSelection.cursor(range.from + line.length)
@@ -14134,10 +14143,10 @@ function basicMouseSelection(view, event) {
14134
14143
  };
14135
14144
  }
14136
14145
  function removeRangeAround(sel, pos) {
14137
- for (let i = 0; i < sel.ranges.length; i++) {
14138
- let { from, to } = sel.ranges[i];
14146
+ for (let i2 = 0; i2 < sel.ranges.length; i2++) {
14147
+ let { from, to } = sel.ranges[i2];
14139
14148
  if (from <= pos && to >= pos)
14140
- return EditorSelection.create(sel.ranges.slice(0, i).concat(sel.ranges.slice(i + 1)), sel.mainIndex == i ? 0 : sel.mainIndex - (sel.mainIndex > i ? 1 : 0));
14149
+ return EditorSelection.create(sel.ranges.slice(0, i2).concat(sel.ranges.slice(i2 + 1)), sel.mainIndex == i2 ? 0 : sel.mainIndex - (sel.mainIndex > i2 ? 1 : 0));
14141
14150
  }
14142
14151
  return null;
14143
14152
  }
@@ -14312,8 +14321,8 @@ function findPosition({ total, ranges }, ratio) {
14312
14321
  if (ratio >= 1)
14313
14322
  return ranges[ranges.length - 1].to;
14314
14323
  let dist2 = Math.floor(total * ratio);
14315
- for (let i = 0; ; i++) {
14316
- let { from, to } = ranges[i], size2 = to - from;
14324
+ for (let i2 = 0; ; i2++) {
14325
+ let { from, to } = ranges[i2], size2 = to - from;
14317
14326
  if (dist2 <= size2)
14318
14327
  return from + dist2;
14319
14328
  dist2 -= size2;
@@ -14398,8 +14407,8 @@ function safariSelectionRangeHack(view, selection) {
14398
14407
  return found ? buildSelectionRangeFromRange(view, found) : null;
14399
14408
  }
14400
14409
  function attrsFromFacet(view, facet, base2) {
14401
- for (let sources = view.state.facet(facet), i = sources.length - 1; i >= 0; i--) {
14402
- let source = sources[i], value = typeof source == "function" ? source(view) : source;
14410
+ for (let sources = view.state.facet(facet), i2 = sources.length - 1; i2 >= 0; i2--) {
14411
+ let source = sources[i2], value = typeof source == "function" ? source(view) : source;
14403
14412
  if (value)
14404
14413
  combineAttrs(value, base2);
14405
14414
  }
@@ -14775,13 +14784,13 @@ var init_dist7 = __esm({
14775
14784
  */
14776
14785
  static find(order, index, level, assoc) {
14777
14786
  let maybe = -1;
14778
- for (let i = 0; i < order.length; i++) {
14779
- let span = order[i];
14787
+ for (let i2 = 0; i2 < order.length; i2++) {
14788
+ let span = order[i2];
14780
14789
  if (span.from <= index && span.to >= index) {
14781
14790
  if (span.level == level)
14782
- return i;
14791
+ return i2;
14783
14792
  if (maybe < 0 || (assoc != 0 ? assoc < 0 ? span.from < index : span.to > index : order[maybe].level > span.level))
14784
- maybe = i;
14793
+ maybe = i2;
14785
14794
  }
14786
14795
  }
14787
14796
  if (maybe < 0)
@@ -14829,8 +14838,8 @@ var init_dist7 = __esm({
14829
14838
  nextPluginID = 0;
14830
14839
  viewPlugin = /* @__PURE__ */ Facet.define({
14831
14840
  combine(plugins) {
14832
- return plugins.filter((p, i) => {
14833
- for (let j = 0; j < i; j++)
14841
+ return plugins.filter((p, i2) => {
14842
+ for (let j = 0; j < i2; j++)
14834
14843
  if (plugins[j].plugin == p.plugin)
14835
14844
  return false;
14836
14845
  return true;
@@ -14950,17 +14959,17 @@ var init_dist7 = __esm({
14950
14959
  return new _ChangedRange(Math.min(this.fromA, other.fromA), Math.max(this.toA, other.toA), Math.min(this.fromB, other.fromB), Math.max(this.toB, other.toB));
14951
14960
  }
14952
14961
  addToSet(set2) {
14953
- let i = set2.length, me = this;
14954
- for (; i > 0; i--) {
14955
- let range = set2[i - 1];
14962
+ let i2 = set2.length, me = this;
14963
+ for (; i2 > 0; i2--) {
14964
+ let range = set2[i2 - 1];
14956
14965
  if (range.fromA > me.toA)
14957
14966
  continue;
14958
14967
  if (range.toA < me.fromA)
14959
14968
  break;
14960
14969
  me = me.join(range);
14961
- set2.splice(i - 1, 1);
14970
+ set2.splice(i2 - 1, 1);
14962
14971
  }
14963
- set2.splice(i, 0, me);
14972
+ set2.splice(i2, 0, me);
14964
14973
  return set2;
14965
14974
  }
14966
14975
  // Extend a set to cover all the content in `ranges`, which is a
@@ -14984,8 +14993,8 @@ var init_dist7 = __esm({
14984
14993
  let end = ranges[rI + 1];
14985
14994
  rI += 2;
14986
14995
  toB = Math.max(toB, end);
14987
- for (let i = dI; i < diff.length && diff[i].fromB <= toB; i++)
14988
- off = diff[i].toA - diff[i].toB;
14996
+ for (let i2 = dI; i2 < diff.length && diff[i2].fromB <= toB; i2++)
14997
+ off = diff[i2].toA - diff[i2].toB;
14989
14998
  toA = Math.max(toA, end + off);
14990
14999
  } else if (dI < diff.length && diff[dI].fromB <= toB) {
14991
15000
  let next = diff[dI++];
@@ -15253,20 +15262,20 @@ var init_dist7 = __esm({
15253
15262
  }
15254
15263
  }
15255
15264
  blockTiles(f) {
15256
- for (let stack = [], cur = this, i = 0, pos = 0; ; ) {
15257
- if (i == cur.children.length) {
15265
+ for (let stack = [], cur = this, i2 = 0, pos = 0; ; ) {
15266
+ if (i2 == cur.children.length) {
15258
15267
  if (!stack.length)
15259
15268
  return;
15260
15269
  cur = cur.parent;
15261
15270
  if (cur.breakAfter)
15262
15271
  pos++;
15263
- i = stack.pop();
15272
+ i2 = stack.pop();
15264
15273
  } else {
15265
- let next = cur.children[i++];
15274
+ let next = cur.children[i2++];
15266
15275
  if (next instanceof BlockWrapperTile) {
15267
- stack.push(i);
15276
+ stack.push(i2);
15268
15277
  cur = next;
15269
- i = 0;
15278
+ i2 = 0;
15270
15279
  } else {
15271
15280
  let end = pos + next.length;
15272
15281
  let result = f(next, pos);
@@ -15351,8 +15360,8 @@ var init_dist7 = __esm({
15351
15360
  resolveInline(pos, side, forCoords) {
15352
15361
  let before = null, beforeOff = -1, after = null, afterOff = -1;
15353
15362
  function scan(tile, pos2) {
15354
- for (let i = 0, off = 0; i < tile.children.length && off <= pos2; i++) {
15355
- let child = tile.children[i], end = off + child.length;
15363
+ for (let i2 = 0, off = 0; i2 < tile.children.length && off <= pos2; i2++) {
15364
+ let child = tile.children[i2], end = off + child.length;
15356
15365
  if (end >= pos2) {
15357
15366
  if (child.isComposite()) {
15358
15367
  scan(child, pos2 - off);
@@ -15500,9 +15509,9 @@ var init_dist7 = __esm({
15500
15509
  if (!rects.length)
15501
15510
  return null;
15502
15511
  let fromBack = this.flags & 16 ? true : this.flags & 32 ? false : pos > 0;
15503
- for (let i = fromBack ? rects.length - 1 : 0; ; i += fromBack ? -1 : 1) {
15504
- rect = rects[i];
15505
- if (pos > 0 ? i == 0 : i == rects.length - 1 || rect.top < rect.bottom)
15512
+ for (let i2 = fromBack ? rects.length - 1 : 0; ; i2 += fromBack ? -1 : 1) {
15513
+ rect = rects[i2];
15514
+ if (pos > 0 ? i2 == 0 : i2 == rects.length - 1 || rect.top < rect.bottom)
15506
15515
  break;
15507
15516
  }
15508
15517
  return flattenRect(rect, !fromBack);
@@ -15664,8 +15673,8 @@ var init_dist7 = __esm({
15664
15673
  );
15665
15674
  }
15666
15675
  let head = line;
15667
- for (let i = context.marks.length - 1; i >= 0; i--) {
15668
- let mark = context.marks[i];
15676
+ for (let i2 = context.marks.length - 1; i2 >= 0; i2--) {
15677
+ let mark = context.marks[i2];
15669
15678
  let last2 = head.lastChild;
15670
15679
  if (last2 instanceof MarkTile && last2.mark.eq(mark.mark)) {
15671
15680
  if (last2.dom != mark.dom)
@@ -15756,8 +15765,8 @@ var init_dist7 = __esm({
15756
15765
  ensureMarks(marks2, openStart) {
15757
15766
  var _a2;
15758
15767
  let parent = this.curLine;
15759
- for (let i = marks2.length - 1; i >= 0; i--) {
15760
- let mark = marks2[i], last2;
15768
+ for (let i2 = marks2.length - 1; i2 >= 0; i2--) {
15769
+ let mark = marks2[i2], last2;
15761
15770
  if (openStart > 0 && (last2 = parent.lastChild) && last2 instanceof MarkTile && last2.mark.eq(mark)) {
15762
15771
  parent = last2;
15763
15772
  openStart--;
@@ -15795,15 +15804,15 @@ var init_dist7 = __esm({
15795
15804
  this.blockWrappers.goto(this.pos);
15796
15805
  this.wrappers.length = 0;
15797
15806
  }
15798
- for (let i = this.wrappers.length - 1; i >= 0; i--)
15799
- if (this.wrappers[i].to < this.pos)
15800
- this.wrappers.splice(i, 1);
15807
+ for (let i2 = this.wrappers.length - 1; i2 >= 0; i2--)
15808
+ if (this.wrappers[i2].to < this.pos)
15809
+ this.wrappers.splice(i2, 1);
15801
15810
  for (let cur = this.blockWrappers; cur.value && cur.from <= this.pos; cur.next())
15802
15811
  if (cur.to >= this.pos) {
15803
- let wrap2 = new OpenWrapper(cur.from, cur.to, cur.value, cur.rank), i = this.wrappers.length;
15804
- while (i > 0 && (this.wrappers[i - 1].rank - wrap2.rank || this.wrappers[i - 1].to - wrap2.to) < 0)
15805
- i--;
15806
- this.wrappers.splice(i, 0, wrap2);
15812
+ let wrap2 = new OpenWrapper(cur.from, cur.to, cur.value, cur.rank), i2 = this.wrappers.length;
15813
+ while (i2 > 0 && (this.wrappers[i2 - 1].rank - wrap2.rank || this.wrappers[i2 - 1].to - wrap2.to) < 0)
15814
+ i2--;
15815
+ this.wrappers.splice(i2, 0, wrap2);
15807
15816
  }
15808
15817
  this.wrapperPos = this.pos;
15809
15818
  }
@@ -15879,8 +15888,8 @@ var init_dist7 = __esm({
15879
15888
  }
15880
15889
  };
15881
15890
  buckets = [WidgetTile, LineTile, TextTile, MarkTile, WidgetBufferTile, BlockWrapperTile, DocTile];
15882
- for (let i = 0; i < buckets.length; i++)
15883
- buckets[i].bucket = i;
15891
+ for (let i2 = 0; i2 < buckets.length; i2++)
15892
+ buckets[i2].bucket = i2;
15884
15893
  TileCache = class {
15885
15894
  constructor(view) {
15886
15895
  this.view = view;
@@ -15890,24 +15899,24 @@ var init_dist7 = __esm({
15890
15899
  }
15891
15900
  // Put a tile in the cache.
15892
15901
  add(tile) {
15893
- let i = tile.constructor.bucket, bucket = this.buckets[i];
15902
+ let i2 = tile.constructor.bucket, bucket = this.buckets[i2];
15894
15903
  if (bucket.length < 6)
15895
15904
  bucket.push(tile);
15896
15905
  else
15897
15906
  bucket[
15898
- this.index[i] = (this.index[i] + 1) % 6
15907
+ this.index[i2] = (this.index[i2] + 1) % 6
15899
15908
  /* C.Bucket */
15900
15909
  ] = tile;
15901
15910
  }
15902
15911
  find(cls, test, type = 2) {
15903
- let i = cls.bucket;
15904
- let bucket = this.buckets[i], off = this.index[i];
15912
+ let i2 = cls.bucket;
15913
+ let bucket = this.buckets[i2], off = this.index[i2];
15905
15914
  for (let j = bucket.length - 1; j >= 0; j--) {
15906
15915
  let index = (j + off) % bucket.length, tile = bucket[index];
15907
15916
  if ((!test || test(tile)) && !this.reused.has(tile)) {
15908
15917
  bucket.splice(index, 1);
15909
15918
  if (index < off)
15910
- this.index[i]--;
15919
+ this.index[i2]--;
15911
15920
  this.reused.set(tile, type);
15912
15921
  return tile;
15913
15922
  }
@@ -15917,17 +15926,17 @@ var init_dist7 = __esm({
15917
15926
  findWidget(widget, length, flags) {
15918
15927
  let widgets = this.buckets[0];
15919
15928
  if (widgets.length)
15920
- for (let i = 0, pass = 0; ; i++) {
15921
- if (i == widgets.length) {
15929
+ for (let i2 = 0, pass = 0; ; i2++) {
15930
+ if (i2 == widgets.length) {
15922
15931
  if (pass)
15923
15932
  return null;
15924
15933
  pass = 1;
15925
- i = 0;
15934
+ i2 = 0;
15926
15935
  }
15927
- let tile = widgets[i];
15936
+ let tile = widgets[i2];
15928
15937
  if (!this.reused.has(tile) && (pass == 0 ? tile.widget.compare(widget) : tile.widget.constructor == widget.constructor && widget.updateDOM(tile.dom, this.view, tile.widget))) {
15929
- widgets.splice(i, 1);
15930
- if (i < this.index[0])
15938
+ widgets.splice(i2, 1);
15939
+ if (i2 < this.index[0])
15931
15940
  this.index[0]--;
15932
15941
  if (tile.widget == widget && tile.length == length && (tile.flags & (496 | 1)) == flags) {
15933
15942
  this.reused.set(
@@ -15962,8 +15971,8 @@ var init_dist7 = __esm({
15962
15971
  return tile.dom;
15963
15972
  }
15964
15973
  clear() {
15965
- for (let i = 0; i < this.buckets.length; i++)
15966
- this.buckets[i].length = this.index[i] = 0;
15974
+ for (let i2 = 0; i2 < this.buckets.length; i2++)
15975
+ this.buckets[i2].length = this.index[i2] = 0;
15967
15976
  }
15968
15977
  };
15969
15978
  TileUpdate = class {
@@ -15997,12 +16006,12 @@ var init_dist7 = __esm({
15997
16006
  }
15998
16007
  run(changes, composition) {
15999
16008
  let compositionContext = composition && this.getCompositionContext(composition.text);
16000
- for (let posA = 0, posB = 0, i = 0; ; ) {
16001
- let next = i < changes.length ? changes[i++] : null;
16009
+ for (let posA = 0, posB = 0, i2 = 0; ; ) {
16010
+ let next = i2 < changes.length ? changes[i2++] : null;
16002
16011
  let skipA = next ? next.fromA : this.old.root.length;
16003
16012
  if (skipA > posA) {
16004
16013
  let len = skipA - posA;
16005
- this.preserve(len, !i, !next);
16014
+ this.preserve(len, !i2, !next);
16006
16015
  posA = skipA;
16007
16016
  posB += len;
16008
16017
  }
@@ -16466,8 +16475,8 @@ var init_dist7 = __esm({
16466
16475
  after = after.nextSibling;
16467
16476
  if (!after)
16468
16477
  return start + tile.length;
16469
- for (let i = 0, pos = start; ; i++) {
16470
- let child = tile.children[i];
16478
+ for (let i2 = 0, pos = start; ; i2++) {
16479
+ let child = tile.children[i2];
16471
16480
  if (child.dom == after)
16472
16481
  return pos;
16473
16482
  pos += child.length + child.breakAfter;
@@ -16551,9 +16560,9 @@ var init_dist7 = __esm({
16551
16560
  if (end == offset2)
16552
16561
  return null;
16553
16562
  let rects = textRange(tile2.dom, offset2, end).getClientRects();
16554
- for (let i = 0; i < rects.length; i++) {
16555
- let rect = rects[i];
16556
- if (i == rects.length - 1 || rect.top < rect.bottom && rect.left < rect.right)
16563
+ for (let i2 = 0; i2 < rects.length; i2++) {
16564
+ let rect = rects[i2];
16565
+ if (i2 == rects.length - 1 || rect.top < rect.bottom && rect.left < rect.right)
16557
16566
  return rect;
16558
16567
  }
16559
16568
  }
@@ -16568,12 +16577,12 @@ var init_dist7 = __esm({
16568
16577
  let widest = -1, ltr = this.view.textDirection == Direction.LTR;
16569
16578
  let spaceAbove = 0;
16570
16579
  let scan = (tile, pos, measureBounds) => {
16571
- for (let i = 0; i < tile.children.length; i++) {
16580
+ for (let i2 = 0; i2 < tile.children.length; i2++) {
16572
16581
  if (pos > to)
16573
16582
  break;
16574
- let child = tile.children[i], end = pos + child.length;
16583
+ let child = tile.children[i2], end = pos + child.length;
16575
16584
  let childRect = child.dom.getBoundingClientRect(), { height } = childRect;
16576
- if (measureBounds && !i)
16585
+ if (measureBounds && !i2)
16577
16586
  spaceAbove += childRect.top - measureBounds.top;
16578
16587
  if (child instanceof BlockWrapperTile) {
16579
16588
  if (end > from)
@@ -16598,7 +16607,7 @@ var init_dist7 = __esm({
16598
16607
  }
16599
16608
  }
16600
16609
  }
16601
- if (measureBounds && i == tile.children.length - 1)
16610
+ if (measureBounds && i2 == tile.children.length - 1)
16602
16611
  spaceAbove += measureBounds.bottom - childRect.bottom;
16603
16612
  pos = end + child.breakAfter;
16604
16613
  }
@@ -16650,8 +16659,8 @@ var init_dist7 = __esm({
16650
16659
  }
16651
16660
  computeBlockGapDeco() {
16652
16661
  let deco = [], vs = this.view.viewState;
16653
- for (let pos = 0, i = 0; ; i++) {
16654
- let next = i == vs.viewports.length ? null : vs.viewports[i];
16662
+ for (let pos = 0, i2 = 0; ; i2++) {
16663
+ let next = i2 == vs.viewports.length ? null : vs.viewports[i2];
16655
16664
  let end = next ? next.from - 1 : this.view.state.doc.length;
16656
16665
  if (end > pos) {
16657
16666
  let height = (vs.lineBlockAt(end).bottom - vs.lineBlockAt(pos).top) / this.view.scaleY;
@@ -16669,19 +16678,19 @@ var init_dist7 = __esm({
16669
16678
  return Decoration.set(deco);
16670
16679
  }
16671
16680
  updateDeco() {
16672
- let i = 1;
16681
+ let i2 = 1;
16673
16682
  let allDeco = this.view.state.facet(decorations).map((d) => {
16674
- let dynamic = this.dynamicDecorationMap[i++] = typeof d == "function";
16683
+ let dynamic = this.dynamicDecorationMap[i2++] = typeof d == "function";
16675
16684
  return dynamic ? d(this.view) : d;
16676
16685
  });
16677
- let dynamicOuter = false, outerDeco = this.view.state.facet(outerDecorations).map((d, i2) => {
16686
+ let dynamicOuter = false, outerDeco = this.view.state.facet(outerDecorations).map((d, i3) => {
16678
16687
  let dynamic = typeof d == "function";
16679
16688
  if (dynamic)
16680
16689
  dynamicOuter = true;
16681
16690
  return dynamic ? d(this.view) : d;
16682
16691
  });
16683
16692
  if (outerDeco.length) {
16684
- this.dynamicDecorationMap[i++] = dynamicOuter;
16693
+ this.dynamicDecorationMap[i2++] = dynamicOuter;
16685
16694
  allDeco.push(RangeSet.join(outerDeco));
16686
16695
  }
16687
16696
  this.decorations = [
@@ -16690,8 +16699,8 @@ var init_dist7 = __esm({
16690
16699
  this.computeBlockGapDeco(),
16691
16700
  this.view.viewState.lineGapDeco
16692
16701
  ];
16693
- while (i < this.decorations.length)
16694
- this.dynamicDecorationMap[i++] = false;
16702
+ while (i2 < this.decorations.length)
16703
+ this.dynamicDecorationMap[i2++] = false;
16695
16704
  this.blockWrappers = this.view.state.facet(blockWrappers).map((v) => typeof v == "function" ? v(this.view) : v);
16696
16705
  }
16697
16706
  scrollIntoView(target) {
@@ -16852,7 +16861,7 @@ var init_dist7 = __esm({
16852
16861
  let dist2 = hi - lo, mid = lo + hi >> 1;
16853
16862
  adjust: if (seen.has(mid)) {
16854
16863
  let scan = lo + Math.floor(Math.random() * dist2);
16855
- for (let i = 0; i < dist2; i++) {
16864
+ for (let i2 = 0; i2 < dist2; i2++) {
16856
16865
  if (!seen.has(scan)) {
16857
16866
  mid = scan;
16858
16867
  break adjust;
@@ -16866,8 +16875,8 @@ var init_dist7 = __esm({
16866
16875
  seen.add(mid);
16867
16876
  let rects = getRects(mid);
16868
16877
  if (rects)
16869
- for (let i = 0; i < rects.length; i++) {
16870
- let rect = rects[i], side = 0;
16878
+ for (let i2 = 0; i2 < rects.length; i2++) {
16879
+ let rect = rects[i2], side = 0;
16871
16880
  if (rect.width == 0 && rects.length > 1)
16872
16881
  continue;
16873
16882
  if (rect.bottom < this.y) {
@@ -16919,11 +16928,11 @@ var init_dist7 = __esm({
16919
16928
  }
16920
16929
  scanText(tile, offset) {
16921
16930
  let positions = [];
16922
- for (let i = 0; i < tile.length; i = findClusterBreak2(tile.text, i))
16923
- positions.push(offset + i);
16931
+ for (let i2 = 0; i2 < tile.length; i2 = findClusterBreak2(tile.text, i2))
16932
+ positions.push(offset + i2);
16924
16933
  positions.push(offset + tile.length);
16925
- let scan = this.scan(positions, (i) => {
16926
- let off = positions[i] - offset, end = positions[i + 1] - offset;
16934
+ let scan = this.scan(positions, (i2) => {
16935
+ let off = positions[i2] - offset, end = positions[i2 + 1] - offset;
16927
16936
  return textRange(tile.dom, off, end).getClientRects();
16928
16937
  });
16929
16938
  return scan.after ? new PosAssoc(positions[scan.i + 1], -1) : new PosAssoc(positions[scan.i], 1);
@@ -16939,10 +16948,10 @@ var init_dist7 = __esm({
16939
16948
  return this.scanTile(child2, offset);
16940
16949
  }
16941
16950
  let positions = [offset];
16942
- for (let i = 0, pos2 = offset; i < tile.children.length; i++)
16943
- positions.push(pos2 += tile.children[i].length);
16944
- let scan = this.scan(positions, (i) => {
16945
- let child2 = tile.children[i];
16951
+ for (let i2 = 0, pos2 = offset; i2 < tile.children.length; i2++)
16952
+ positions.push(pos2 += tile.children[i2].length);
16953
+ let scan = this.scan(positions, (i2) => {
16954
+ let child2 = tile.children[i2];
16946
16955
  if (child2.flags & 48)
16947
16956
  return null;
16948
16957
  return (child2.dom.nodeType == 1 ? child2.dom : textRange(child2.dom, 0, child2.length)).getClientRects();
@@ -17022,11 +17031,11 @@ var init_dist7 = __esm({
17022
17031
  let fromView = tile && tile.overrideDOMText;
17023
17032
  if (fromView != null) {
17024
17033
  this.findPointInside(node, fromView.length);
17025
- for (let i = fromView.iter(); !i.next().done; ) {
17026
- if (i.lineBreak)
17034
+ for (let i2 = fromView.iter(); !i2.next().done; ) {
17035
+ if (i2.lineBreak)
17027
17036
  this.lineBreak();
17028
17037
  else
17029
- this.append(i.value);
17038
+ this.append(i2.value);
17030
17039
  }
17031
17040
  } else if (node.nodeType == 3) {
17032
17041
  this.readTextNode(node);
@@ -17447,15 +17456,15 @@ var init_dist7 = __esm({
17447
17456
  if (++read == files.length)
17448
17457
  dropText(view, event, text.filter((s) => s != null).join(view.state.lineBreak), false);
17449
17458
  };
17450
- for (let i = 0; i < files.length; i++) {
17459
+ for (let i2 = 0; i2 < files.length; i2++) {
17451
17460
  let reader = new FileReader();
17452
17461
  reader.onerror = finishFile;
17453
17462
  reader.onload = () => {
17454
17463
  if (!/[\x00-\x08\x0e-\x1f]{2}/.test(reader.result))
17455
- text[i] = reader.result;
17464
+ text[i2] = reader.result;
17456
17465
  finishFile();
17457
17466
  };
17458
- reader.readAsText(files[i]);
17467
+ reader.readAsText(files[i2]);
17459
17468
  }
17460
17469
  return true;
17461
17470
  } else {
@@ -17619,10 +17628,10 @@ var init_dist7 = __esm({
17619
17628
  }
17620
17629
  mustRefreshForHeights(lineHeights) {
17621
17630
  let newHeight = false;
17622
- for (let i = 0; i < lineHeights.length; i++) {
17623
- let h = lineHeights[i];
17631
+ for (let i2 = 0; i2 < lineHeights.length; i2++) {
17632
+ let h = lineHeights[i2];
17624
17633
  if (h < 0) {
17625
- i++;
17634
+ i2++;
17626
17635
  } else if (!this.heightSamples[Math.floor(h * 10)]) {
17627
17636
  newHeight = true;
17628
17637
  this.heightSamples[Math.floor(h * 10)] = true;
@@ -17640,10 +17649,10 @@ var init_dist7 = __esm({
17640
17649
  this.lineLength = lineLength;
17641
17650
  if (changed) {
17642
17651
  this.heightSamples = {};
17643
- for (let i = 0; i < knownHeights.length; i++) {
17644
- let h = knownHeights[i];
17652
+ for (let i2 = 0; i2 < knownHeights.length; i2++) {
17653
+ let h = knownHeights[i2];
17645
17654
  if (h < 0)
17646
- i++;
17655
+ i2++;
17647
17656
  else
17648
17657
  this.heightSamples[Math.floor(h * 10)] = true;
17649
17658
  }
@@ -17754,16 +17763,16 @@ var init_dist7 = __esm({
17754
17763
  }
17755
17764
  applyChanges(decorations2, oldDoc, oracle, changes) {
17756
17765
  let me = this, doc2 = oracle.doc;
17757
- for (let i = changes.length - 1; i >= 0; i--) {
17758
- let { fromA, toA, fromB, toB } = changes[i];
17766
+ for (let i2 = changes.length - 1; i2 >= 0; i2--) {
17767
+ let { fromA, toA, fromB, toB } = changes[i2];
17759
17768
  let start = me.lineAt(fromA, QueryType.ByPosNoHeight, oracle.setDoc(oldDoc), 0, 0);
17760
17769
  let end = start.to >= toA ? start : me.lineAt(toA, QueryType.ByPosNoHeight, oracle, 0, 0);
17761
17770
  toB += end.to - toA;
17762
17771
  toA = end.to;
17763
- while (i > 0 && start.from <= changes[i - 1].toA) {
17764
- fromA = changes[i - 1].fromA;
17765
- fromB = changes[i - 1].fromB;
17766
- i--;
17772
+ while (i2 > 0 && start.from <= changes[i2 - 1].toA) {
17773
+ fromA = changes[i2 - 1].fromA;
17774
+ fromB = changes[i2 - 1].fromB;
17775
+ i2--;
17767
17776
  if (fromA < start.from)
17768
17777
  start = me.lineAt(fromA, QueryType.ByPosNoHeight, oracle, 0, 0);
17769
17778
  }
@@ -17784,15 +17793,15 @@ var init_dist7 = __esm({
17784
17793
  static of(nodes) {
17785
17794
  if (nodes.length == 1)
17786
17795
  return nodes[0];
17787
- let i = 0, j = nodes.length, before = 0, after = 0;
17796
+ let i2 = 0, j = nodes.length, before = 0, after = 0;
17788
17797
  for (; ; ) {
17789
- if (i == j) {
17798
+ if (i2 == j) {
17790
17799
  if (before > after * 2) {
17791
- let split = nodes[i - 1];
17800
+ let split = nodes[i2 - 1];
17792
17801
  if (split.break)
17793
- nodes.splice(--i, 1, split.left, null, split.right);
17802
+ nodes.splice(--i2, 1, split.left, null, split.right);
17794
17803
  else
17795
- nodes.splice(--i, 1, split.left, split.right);
17804
+ nodes.splice(--i2, 1, split.left, split.right);
17796
17805
  j += 1 + split.break;
17797
17806
  before -= split.size;
17798
17807
  } else if (after > before * 2) {
@@ -17807,7 +17816,7 @@ var init_dist7 = __esm({
17807
17816
  break;
17808
17817
  }
17809
17818
  } else if (before < after) {
17810
- let next = nodes[i++];
17819
+ let next = nodes[i2++];
17811
17820
  if (next)
17812
17821
  before += next.size;
17813
17822
  } else {
@@ -17817,14 +17826,14 @@ var init_dist7 = __esm({
17817
17826
  }
17818
17827
  }
17819
17828
  let brk = 0;
17820
- if (nodes[i - 1] == null) {
17829
+ if (nodes[i2 - 1] == null) {
17821
17830
  brk = 1;
17822
- i--;
17823
- } else if (nodes[i] == null) {
17831
+ i2--;
17832
+ } else if (nodes[i2] == null) {
17824
17833
  brk = 1;
17825
17834
  j++;
17826
17835
  }
17827
- return new HeightMapBranch(_HeightMap.of(nodes.slice(0, i)), brk, _HeightMap.of(nodes.slice(j)));
17836
+ return new HeightMapBranch(_HeightMap.of(nodes.slice(0, i2)), brk, _HeightMap.of(nodes.slice(j)));
17828
17837
  }
17829
17838
  };
17830
17839
  HeightMap.prototype.size = 1;
@@ -18292,8 +18301,8 @@ var init_dist7 = __esm({
18292
18301
  static same(a, b) {
18293
18302
  if (a.length != b.length)
18294
18303
  return false;
18295
- for (let i = 0; i < a.length; i++) {
18296
- let gA = a[i], gB = b[i];
18304
+ for (let i2 = 0; i2 < a.length; i2++) {
18305
+ let gA = a[i2], gB = b[i2];
18297
18306
  if (gA.from != gB.from || gA.to != gB.to || gA.size != gB.size)
18298
18307
  return false;
18299
18308
  }
@@ -18358,7 +18367,7 @@ var init_dist7 = __esm({
18358
18367
  this.heightOracle = new HeightOracle(guessWrapping);
18359
18368
  this.stateDeco = staticDeco(state);
18360
18369
  this.heightMap = HeightMap.empty().applyChanges(this.stateDeco, Text.empty, this.heightOracle.setDoc(state.doc), [new ChangedRange(0, 0, 0, state.doc.length)]);
18361
- for (let i = 0; i < 2; i++) {
18370
+ for (let i2 = 0; i2 < 2; i2++) {
18362
18371
  this.viewport = this.getViewport(0, null);
18363
18372
  if (!this.updateForViewport())
18364
18373
  break;
@@ -18371,8 +18380,8 @@ var init_dist7 = __esm({
18371
18380
  }
18372
18381
  updateForViewport() {
18373
18382
  let viewports = [this.viewport], { main } = this.state.selection;
18374
- for (let i = 0; i <= 1; i++) {
18375
- let pos = i ? main.head : main.anchor;
18383
+ for (let i2 = 0; i2 <= 1; i2++) {
18384
+ let pos = i2 ? main.head : main.anchor;
18376
18385
  if (!viewports.some(({ from, to }) => pos >= from && pos <= to)) {
18377
18386
  let { from, to } = this.lineBlockAt(pos);
18378
18387
  viewports.push(new Viewport(from, to));
@@ -18716,8 +18725,8 @@ var init_dist7 = __esm({
18716
18725
  if (ranges.length != this.visibleRanges.length) {
18717
18726
  changed = 8 | 4;
18718
18727
  } else {
18719
- for (let i = 0; i < ranges.length && !(changed & 8); i++) {
18720
- let old = this.visibleRanges[i], nw = ranges[i];
18728
+ for (let i2 = 0; i2 < ranges.length && !(changed & 8); i2++) {
18729
+ let old = this.visibleRanges[i2], nw = ranges[i2];
18721
18730
  if (old.from != nw.from || old.to != nw.to) {
18722
18731
  changed |= 4;
18723
18732
  if (!(changes && changes.mapPos(old.from, -1) == nw.from && changes.mapPos(old.to, 1) == nw.to))
@@ -18787,8 +18796,8 @@ var init_dist7 = __esm({
18787
18796
  }
18788
18797
  }
18789
18798
  toDOM(n) {
18790
- for (let i = 0, base2 = 0, domBase = 0; ; i++) {
18791
- let vp = i < this.viewports.length ? this.viewports[i] : null;
18799
+ for (let i2 = 0, base2 = 0, domBase = 0; ; i2++) {
18800
+ let vp = i2 < this.viewports.length ? this.viewports[i2] : null;
18792
18801
  if (!vp || n < vp.top)
18793
18802
  return domBase + (n - base2) * this.scale;
18794
18803
  if (n <= vp.bottom)
@@ -18798,8 +18807,8 @@ var init_dist7 = __esm({
18798
18807
  }
18799
18808
  }
18800
18809
  fromDOM(n) {
18801
- for (let i = 0, base2 = 0, domBase = 0; ; i++) {
18802
- let vp = i < this.viewports.length ? this.viewports[i] : null;
18810
+ for (let i2 = 0, base2 = 0, domBase = 0; ; i2++) {
18811
+ let vp = i2 < this.viewports.length ? this.viewports[i2] : null;
18803
18812
  if (!vp || n < vp.domTop)
18804
18813
  return base2 + (n - domBase) / this.scale;
18805
18814
  if (n <= vp.domBottom)
@@ -18811,7 +18820,7 @@ var init_dist7 = __esm({
18811
18820
  eq(other) {
18812
18821
  if (!(other instanceof _BigScaler))
18813
18822
  return false;
18814
- return this.scale == other.scale && this.viewports.length == other.viewports.length && this.viewports.every((vp, i) => vp.from == other.viewports[i].from && vp.to == other.viewports[i].to);
18823
+ return this.scale == other.scale && this.viewports.length == other.viewports.length && this.viewports.every((vp, i2) => vp.from == other.viewports[i2].from && vp.to == other.viewports[i2].to);
18815
18824
  }
18816
18825
  };
18817
18826
  theme = /* @__PURE__ */ Facet.define({ combine: (strs) => strs.join(" ") });
@@ -19222,7 +19231,7 @@ var init_dist7 = __esm({
19222
19231
  }, 500);
19223
19232
  }
19224
19233
  updateGaps(gaps) {
19225
- if (this.gapIntersection && (gaps.length != this.gaps.length || this.gaps.some((g, i) => g != gaps[i]))) {
19234
+ if (this.gapIntersection && (gaps.length != this.gaps.length || this.gaps.some((g, i2) => g != gaps[i2]))) {
19226
19235
  this.gapIntersection.disconnect();
19227
19236
  for (let gap of gaps)
19228
19237
  this.gapIntersection.observe(gap);
@@ -19276,13 +19285,13 @@ var init_dist7 = __esm({
19276
19285
  }
19277
19286
  listenForScroll() {
19278
19287
  this.parentCheck = -1;
19279
- let i = 0, changed = null;
19288
+ let i2 = 0, changed = null;
19280
19289
  for (let dom = this.dom; dom; ) {
19281
19290
  if (dom.nodeType == 1) {
19282
- if (!changed && i < this.scrollTargets.length && this.scrollTargets[i] == dom)
19283
- i++;
19291
+ if (!changed && i2 < this.scrollTargets.length && this.scrollTargets[i2] == dom)
19292
+ i2++;
19284
19293
  else if (!changed)
19285
- changed = this.scrollTargets.slice(0, i);
19294
+ changed = this.scrollTargets.slice(0, i2);
19286
19295
  if (changed)
19287
19296
  changed.push(dom);
19288
19297
  dom = dom.assignedSlot || dom.parentNode;
@@ -19292,8 +19301,8 @@ var init_dist7 = __esm({
19292
19301
  break;
19293
19302
  }
19294
19303
  }
19295
- if (i < this.scrollTargets.length && !changed)
19296
- changed = this.scrollTargets.slice(0, i);
19304
+ if (i2 < this.scrollTargets.length && !changed)
19305
+ changed = this.scrollTargets.slice(0, i2);
19297
19306
  if (changed) {
19298
19307
  for (let dom of this.scrollTargets)
19299
19308
  dom.removeEventListener("scroll", this.onScroll);
@@ -19570,8 +19579,8 @@ var init_dist7 = __esm({
19570
19579
  };
19571
19580
  this.handlers.characterboundsupdate = (e) => {
19572
19581
  let rects = [], prev = null;
19573
- for (let i = this.toEditorPos(e.rangeStart), end = this.toEditorPos(e.rangeEnd); i < end; i++) {
19574
- let rect = view.coordsForChar(i);
19582
+ for (let i2 = this.toEditorPos(e.rangeStart), end = this.toEditorPos(e.rangeEnd); i2 < end; i2++) {
19583
+ let rect = view.coordsForChar(i2);
19575
19584
  prev = rect && new DOMRect(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top) || prev || new DOMRect();
19576
19585
  rects.push(prev);
19577
19586
  }
@@ -19994,8 +20003,8 @@ var init_dist7 = __esm({
19994
20003
  for (let p of this.plugins)
19995
20004
  p.mustUpdate = update;
19996
20005
  }
19997
- for (let i = 0; i < this.plugins.length; i++)
19998
- this.plugins[i].update(this);
20006
+ for (let i2 = 0; i2 < this.plugins.length; i2++)
20007
+ this.plugins[i2].update(this);
19999
20008
  if (prevSpecs != specs)
20000
20009
  this.inputState.ensureHandlers(this.plugins);
20001
20010
  }
@@ -20034,7 +20043,7 @@ var init_dist7 = __esm({
20034
20043
  scrollAnchorHeight = -1;
20035
20044
  this.viewState.scrollAnchorHeight = -1;
20036
20045
  try {
20037
- for (let i = 0; ; i++) {
20046
+ for (let i2 = 0; ; i2++) {
20038
20047
  if (scrollAnchorHeight < 0) {
20039
20048
  if (isScrolledToBottom(scroll || this.win)) {
20040
20049
  scrollAnchorPos = -1;
@@ -20049,7 +20058,7 @@ var init_dist7 = __esm({
20049
20058
  let changed = this.viewState.measure();
20050
20059
  if (!changed && !this.measureRequests.length && this.viewState.scrollTarget == null)
20051
20060
  break;
20052
- if (i > 5) {
20061
+ if (i2 > 5) {
20053
20062
  console.warn(this.measureRequests.length ? "Measure loop restarted more than 5 times" : "Viewport failed to stabilize");
20054
20063
  break;
20055
20064
  }
@@ -20079,12 +20088,12 @@ var init_dist7 = __esm({
20079
20088
  if (redrawn)
20080
20089
  this.docViewUpdate();
20081
20090
  }
20082
- for (let i2 = 0; i2 < measuring.length; i2++)
20083
- if (measured[i2] != BadMeasure) {
20091
+ for (let i3 = 0; i3 < measuring.length; i3++)
20092
+ if (measured[i3] != BadMeasure) {
20084
20093
  try {
20085
- let m = measuring[i2];
20094
+ let m = measuring[i3];
20086
20095
  if (m.write)
20087
- m.write(measured[i2], this);
20096
+ m.write(measured[i3], this);
20088
20097
  } catch (e) {
20089
20098
  logException(this.state, e);
20090
20099
  }
@@ -20195,9 +20204,9 @@ var init_dist7 = __esm({
20195
20204
  if (this.measureRequests.indexOf(request) > -1)
20196
20205
  return;
20197
20206
  if (request.key != null)
20198
- for (let i = 0; i < this.measureRequests.length; i++) {
20199
- if (this.measureRequests[i].key === request.key) {
20200
- this.measureRequests[i] = request;
20207
+ for (let i2 = 0; i2 < this.measureRequests.length; i2++) {
20208
+ if (this.measureRequests[i2].key === request.key) {
20209
+ this.measureRequests[i2] = request;
20201
20210
  return;
20202
20211
  }
20203
20212
  }
@@ -20665,11 +20674,11 @@ var init_dist7 = __esm({
20665
20674
  EditorView.cursorScrollMargin = /* @__PURE__ */ Facet.define({
20666
20675
  combine: (inputs) => {
20667
20676
  let x = 5, y = 5;
20668
- for (let i of inputs) {
20669
- if (typeof i == "number")
20670
- x = y = i;
20677
+ for (let i2 of inputs) {
20678
+ if (typeof i2 == "number")
20679
+ x = y = i2;
20671
20680
  else
20672
- ({ x, y } = i);
20681
+ ({ x, y } = i2);
20673
20682
  }
20674
20683
  return { x, y };
20675
20684
  }
@@ -20696,8 +20705,8 @@ var init_dist7 = __esm({
20696
20705
  if (changes.empty && !cache2.some((c) => c.fresh))
20697
20706
  return cache2;
20698
20707
  let result = [], lastDir = cache2.length ? cache2[cache2.length - 1].dir : Direction.LTR;
20699
- for (let i = Math.max(0, cache2.length - 10); i < cache2.length; i++) {
20700
- let entry = cache2[i];
20708
+ for (let i2 = Math.max(0, cache2.length - 10); i2 < cache2.length; i2++) {
20709
+ let entry = cache2[i2];
20701
20710
  if (entry.dir == lastDir && !changes.touchesRange(entry.from, entry.to))
20702
20711
  result.push(new _CachedOrder(changes.mapPos(entry.from, 1), changes.mapPos(entry.to, -1), entry.dir, entry.isolates, false, entry.order));
20703
20712
  }
@@ -20940,10 +20949,10 @@ var init_dist8 = __esm({
20940
20949
  return;
20941
20950
  }
20942
20951
  }
20943
- for (let i = 0; i < tree.children.length; i++) {
20944
- let ch = tree.children[i];
20952
+ for (let i2 = 0; i2 < tree.children.length; i2++) {
20953
+ let ch = tree.children[i2];
20945
20954
  if (ch instanceof Tree)
20946
- explore(ch, tree.positions[i] + from);
20955
+ explore(ch, tree.positions[i2] + from);
20947
20956
  }
20948
20957
  };
20949
20958
  explore(syntaxTree(state), 0);
@@ -21115,11 +21124,11 @@ var init_dist8 = __esm({
21115
21124
  return false;
21116
21125
  this.viewport = viewport;
21117
21126
  let startLen = this.skipped.length;
21118
- for (let i = 0; i < this.skipped.length; i++) {
21119
- let { from, to } = this.skipped[i];
21127
+ for (let i2 = 0; i2 < this.skipped.length; i2++) {
21128
+ let { from, to } = this.skipped[i2];
21120
21129
  if (from < viewport.to && to > viewport.from) {
21121
21130
  this.fragments = cutFragments(this.fragments, from, to);
21122
- this.skipped.splice(i--, 1);
21131
+ this.skipped.splice(i2--, 1);
21123
21132
  }
21124
21133
  }
21125
21134
  if (this.skipped.length >= startLen)