@posthog/rrdom 0.0.30 → 0.0.34

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.
package/dist/rrdom.js CHANGED
@@ -67,27 +67,27 @@ function getDefaultExportFromCjs(x) {
67
67
  }
68
68
  function getAugmentedNamespace(n) {
69
69
  if (n.__esModule) return n;
70
- var f = n.default;
71
- if (typeof f == "function") {
72
- var a = function a2() {
73
- if (this instanceof a2) {
74
- return Reflect.construct(f, arguments, this.constructor);
70
+ var f2 = n.default;
71
+ if (typeof f2 == "function") {
72
+ var a2 = function a3() {
73
+ if (this instanceof a3) {
74
+ return Reflect.construct(f2, arguments, this.constructor);
75
75
  }
76
- return f.apply(this, arguments);
76
+ return f2.apply(this, arguments);
77
77
  };
78
- a.prototype = f.prototype;
79
- } else a = {};
80
- Object.defineProperty(a, "__esModule", { value: true });
78
+ a2.prototype = f2.prototype;
79
+ } else a2 = {};
80
+ Object.defineProperty(a2, "__esModule", { value: true });
81
81
  Object.keys(n).forEach(function(k) {
82
- var d = Object.getOwnPropertyDescriptor(n, k);
83
- Object.defineProperty(a, k, d.get ? d : {
82
+ var d2 = Object.getOwnPropertyDescriptor(n, k);
83
+ Object.defineProperty(a2, k, d2.get ? d2 : {
84
84
  enumerable: true,
85
85
  get: function() {
86
86
  return n[k];
87
87
  }
88
88
  });
89
89
  });
90
- return a;
90
+ return a2;
91
91
  }
92
92
  var picocolors_browser = { exports: {} };
93
93
  var hasRequiredPicocolors_browser;
@@ -172,8 +172,8 @@ function requireCssSyntaxError() {
172
172
  let start = Math.max(this.line - 3, 0);
173
173
  let end = Math.min(this.line + 2, lines.length);
174
174
  let maxWidth = String(end).length;
175
- return lines.slice(start, end).map((line, index2) => {
176
- let number = start + 1 + index2;
175
+ return lines.slice(start, end).map((line, index) => {
176
+ let number = start + 1 + index;
177
177
  let gutter = " " + (" " + number).slice(-maxWidth) + " | ";
178
178
  if (number === this.line) {
179
179
  if (line.length > 160) {
@@ -456,8 +456,8 @@ function requireStringifier() {
456
456
  if (root2.raws.indent) return root2.raws.indent;
457
457
  let value;
458
458
  root2.walk((i) => {
459
- let p = i.parent;
460
- if (p && p !== root2 && p.parent && p.parent === root2) {
459
+ let p2 = i.parent;
460
+ if (p2 && p2 !== root2 && p2.parent && p2.parent === root2) {
461
461
  if (typeof i.raws.before !== "undefined") {
462
462
  let parts = i.raws.before.split("\n");
463
463
  value = parts[parts.length - 1];
@@ -555,7 +555,7 @@ function requireNode() {
555
555
  } else if (i === "source") {
556
556
  cloned[i] = value;
557
557
  } else if (Array.isArray(value)) {
558
- cloned[i] = value.map((j) => cloneNode(j, cloned));
558
+ cloned[i] = value.map((j2) => cloneNode(j2, cloned));
559
559
  } else {
560
560
  if (type === "object" && value !== null) value = cloneNode(value);
561
561
  cloned[i] = value;
@@ -607,10 +607,10 @@ function requireNode() {
607
607
  addToError(error) {
608
608
  error.postcssNode = this;
609
609
  if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) {
610
- let s = this.source;
610
+ let s2 = this.source;
611
611
  error.stack = error.stack.replace(
612
612
  /\n\s{4}at /,
613
- `$&${s.input.from}:${s.start.line}:${s.start.column}$&`
613
+ `$&${s2.input.from}:${s2.start.line}:${s2.start.column}$&`
614
614
  );
615
615
  }
616
616
  return error;
@@ -700,8 +700,8 @@ function requireNode() {
700
700
  }
701
701
  next() {
702
702
  if (!this.parent) return void 0;
703
- let index2 = this.parent.index(this);
704
- return this.parent.nodes[index2 + 1];
703
+ let index = this.parent.index(this);
704
+ return this.parent.nodes[index + 1];
705
705
  }
706
706
  positionBy(opts) {
707
707
  let pos = this.source.start;
@@ -713,17 +713,17 @@ function requireNode() {
713
713
  sourceOffset(inputString, this.source.start),
714
714
  sourceOffset(inputString, this.source.end)
715
715
  );
716
- let index2 = stringRepresentation.indexOf(opts.word);
717
- if (index2 !== -1) pos = this.positionInside(index2);
716
+ let index = stringRepresentation.indexOf(opts.word);
717
+ if (index !== -1) pos = this.positionInside(index);
718
718
  }
719
719
  return pos;
720
720
  }
721
- positionInside(index2) {
721
+ positionInside(index) {
722
722
  let column = this.source.start.column;
723
723
  let line = this.source.start.line;
724
724
  let inputString = "document" in this.source.input ? this.source.input.document : this.source.input.css;
725
725
  let offset = sourceOffset(inputString, this.source.start);
726
- let end = offset + index2;
726
+ let end = offset + index;
727
727
  for (let i = offset; i < end; i++) {
728
728
  if (inputString[i] === "\n") {
729
729
  column = 1;
@@ -736,8 +736,8 @@ function requireNode() {
736
736
  }
737
737
  prev() {
738
738
  if (!this.parent) return void 0;
739
- let index2 = this.parent.index(this);
740
- return this.parent.nodes[index2 - 1];
739
+ let index = this.parent.index(this);
740
+ return this.parent.nodes[index - 1];
741
741
  }
742
742
  rangeBy(opts) {
743
743
  let start = {
@@ -757,11 +757,11 @@ function requireNode() {
757
757
  sourceOffset(inputString, this.source.start),
758
758
  sourceOffset(inputString, this.source.end)
759
759
  );
760
- let index2 = stringRepresentation.indexOf(opts.word);
761
- if (index2 !== -1) {
762
- start = this.positionInside(index2);
760
+ let index = stringRepresentation.indexOf(opts.word);
761
+ if (index !== -1) {
762
+ start = this.positionInside(index);
763
763
  end = this.positionInside(
764
- index2 + opts.word.length
764
+ index + opts.word.length
765
765
  );
766
766
  }
767
767
  } else {
@@ -977,10 +977,10 @@ function requireContainer() {
977
977
  each(callback) {
978
978
  if (!this.proxyOf.nodes) return void 0;
979
979
  let iterator = this.getIterator();
980
- let index2, result2;
980
+ let index, result2;
981
981
  while (this.indexes[iterator] < this.proxyOf.nodes.length) {
982
- index2 = this.indexes[iterator];
983
- result2 = callback(this.proxyOf.nodes[index2], index2);
982
+ index = this.indexes[iterator];
983
+ result2 = callback(this.proxyOf.nodes[index], index);
984
984
  if (result2 === false) break;
985
985
  this.indexes[iterator] += 1;
986
986
  }
@@ -1010,7 +1010,7 @@ function requireContainer() {
1010
1010
  return node2[prop](
1011
1011
  ...args.map((i) => {
1012
1012
  if (typeof i === "function") {
1013
- return (child, index2) => i(child.toProxy(), index2);
1013
+ return (child, index) => i(child.toProxy(), index);
1014
1014
  } else {
1015
1015
  return i;
1016
1016
  }
@@ -1053,11 +1053,11 @@ function requireContainer() {
1053
1053
  let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse();
1054
1054
  existIndex = this.index(exist);
1055
1055
  for (let node2 of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node2);
1056
- let index2;
1056
+ let index;
1057
1057
  for (let id in this.indexes) {
1058
- index2 = this.indexes[id];
1059
- if (existIndex < index2) {
1060
- this.indexes[id] = index2 + nodes.length;
1058
+ index = this.indexes[id];
1059
+ if (existIndex < index) {
1060
+ this.indexes[id] = index + nodes.length;
1061
1061
  }
1062
1062
  }
1063
1063
  this.markDirty();
@@ -1073,11 +1073,11 @@ function requireContainer() {
1073
1073
  ).reverse();
1074
1074
  existIndex = this.index(exist);
1075
1075
  for (let node2 of nodes) this.proxyOf.nodes.splice(existIndex, 0, node2);
1076
- let index2;
1076
+ let index;
1077
1077
  for (let id in this.indexes) {
1078
- index2 = this.indexes[id];
1079
- if (existIndex <= index2) {
1080
- this.indexes[id] = index2 + nodes.length;
1078
+ index = this.indexes[id];
1079
+ if (existIndex <= index) {
1080
+ this.indexes[id] = index + nodes.length;
1081
1081
  }
1082
1082
  }
1083
1083
  this.markDirty();
@@ -1159,11 +1159,11 @@ function requireContainer() {
1159
1159
  child = this.index(child);
1160
1160
  this.proxyOf.nodes[child].parent = void 0;
1161
1161
  this.proxyOf.nodes.splice(child, 1);
1162
- let index2;
1162
+ let index;
1163
1163
  for (let id in this.indexes) {
1164
- index2 = this.indexes[id];
1165
- if (index2 >= child) {
1166
- this.indexes[id] = index2 - 1;
1164
+ index = this.indexes[id];
1165
+ if (index >= child) {
1166
+ this.indexes[id] = index - 1;
1167
1167
  }
1168
1168
  }
1169
1169
  this.markDirty();
@@ -1190,8 +1190,8 @@ function requireContainer() {
1190
1190
  let result2;
1191
1191
  try {
1192
1192
  result2 = callback(child, i);
1193
- } catch (e) {
1194
- throw child.addToError(e);
1193
+ } catch (e2) {
1194
+ throw child.addToError(e2);
1195
1195
  }
1196
1196
  if (result2 !== false && child.walk) {
1197
1197
  result2 = child.walk(callback);
@@ -1627,7 +1627,7 @@ function requireInput() {
1627
1627
  let lines = this.css.split("\n");
1628
1628
  lineToIndex = new Array(lines.length);
1629
1629
  let prevIndex = 0;
1630
- for (let i = 0, l = lines.length; i < l; i++) {
1630
+ for (let i = 0, l2 = lines.length; i < l2; i++) {
1631
1631
  lineToIndex[i] = prevIndex;
1632
1632
  prevIndex += lines[i].length + 1;
1633
1633
  }
@@ -1758,9 +1758,9 @@ function requireRoot() {
1758
1758
  return nodes;
1759
1759
  }
1760
1760
  removeChild(child, ignore) {
1761
- let index2 = this.index(child);
1762
- if (!ignore && index2 === 0 && this.nodes.length > 1) {
1763
- this.nodes[1].raws.before = this.nodes[index2].raws.before;
1761
+ let index = this.index(child);
1762
+ if (!ignore && index === 0 && this.nodes.length > 1) {
1763
+ this.nodes[1].raws.before = this.nodes[index].raws.before;
1764
1764
  }
1765
1765
  return super.removeChild(child);
1766
1766
  }
@@ -2071,9 +2071,9 @@ function requireMapGenerator() {
2071
2071
  column += str.length;
2072
2072
  }
2073
2073
  if (node2 && type !== "start") {
2074
- let p = node2.parent || { raws: {} };
2074
+ let p2 = node2.parent || { raws: {} };
2075
2075
  let childless = node2.type === "decl" || node2.type === "atrule" && !node2.nodes;
2076
- if (!childless || node2 !== p.last || p.raws.semicolon) {
2076
+ if (!childless || node2 !== p2.last || p2.raws.semicolon) {
2077
2077
  if (node2.source && node2.source.end) {
2078
2078
  mapping.source = this.sourcePath(node2);
2079
2079
  mapping.original.line = node2.source.end.line;
@@ -2566,8 +2566,8 @@ function requireParser() {
2566
2566
  if (colon === false) return;
2567
2567
  let founded = 0;
2568
2568
  let token;
2569
- for (let j = colon - 1; j >= 0; j--) {
2570
- token = tokens[j];
2569
+ for (let j2 = colon - 1; j2 >= 0; j2--) {
2570
+ token = tokens[j2];
2571
2571
  if (token[0] !== "space") {
2572
2572
  founded += 1;
2573
2573
  if (founded === 2) break;
@@ -2685,8 +2685,8 @@ function requireParser() {
2685
2685
  } else if (token[1].toLowerCase() === "important") {
2686
2686
  let cache = tokens.slice(0);
2687
2687
  let str = "";
2688
- for (let j = i; j > 0; j--) {
2689
- let type = cache[j][0];
2688
+ for (let j2 = i; j2 > 0; j2--) {
2689
+ let type = cache[j2][0];
2690
2690
  if (str.trim().startsWith("!") && type !== "space") {
2691
2691
  break;
2692
2692
  }
@@ -2996,19 +2996,19 @@ function requireParse() {
2996
2996
  let parser2 = new Parser(input2);
2997
2997
  try {
2998
2998
  parser2.parse();
2999
- } catch (e) {
2999
+ } catch (e2) {
3000
3000
  if (process.env.NODE_ENV !== "production") {
3001
- if (e.name === "CssSyntaxError" && opts && opts.from) {
3001
+ if (e2.name === "CssSyntaxError" && opts && opts.from) {
3002
3002
  if (/\.scss$/i.test(opts.from)) {
3003
- e.message += "\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser";
3003
+ e2.message += "\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser";
3004
3004
  } else if (/\.sass/i.test(opts.from)) {
3005
- e.message += "\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser";
3005
+ e2.message += "\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser";
3006
3006
  } else if (/\.less$/i.test(opts.from)) {
3007
- e.message += "\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser";
3007
+ e2.message += "\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser";
3008
3008
  }
3009
3009
  }
3010
3010
  }
3011
- throw e;
3011
+ throw e2;
3012
3012
  }
3013
3013
  return parser2.root;
3014
3014
  }
@@ -3273,9 +3273,9 @@ function requireLazyResult() {
3273
3273
  let pluginName = plugin.postcssPlugin;
3274
3274
  let pluginVer = plugin.postcssVersion;
3275
3275
  let runtimeVer = this.result.processor.version;
3276
- let a = pluginVer.split(".");
3277
- let b = runtimeVer.split(".");
3278
- if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) {
3276
+ let a2 = pluginVer.split(".");
3277
+ let b2 = runtimeVer.split(".");
3278
+ if (a2[0] !== b2[0] || parseInt(a2[1]) > parseInt(b2[1])) {
3279
3279
  console.error(
3280
3280
  "Unknown error from PostCSS plugin. Your current PostCSS version is " + runtimeVer + ", but " + pluginName + " uses " + pluginVer + ". Perhaps this is the source of the error below."
3281
3281
  );
@@ -3347,9 +3347,9 @@ function requireLazyResult() {
3347
3347
  if (isPromise(promise)) {
3348
3348
  try {
3349
3349
  await promise;
3350
- } catch (e) {
3350
+ } catch (e2) {
3351
3351
  let node2 = stack[stack.length - 1].node;
3352
- throw this.handleError(e, node2);
3352
+ throw this.handleError(e2, node2);
3353
3353
  }
3354
3354
  }
3355
3355
  }
@@ -3366,8 +3366,8 @@ function requireLazyResult() {
3366
3366
  } else {
3367
3367
  await visitor(root2, this.helpers);
3368
3368
  }
3369
- } catch (e) {
3370
- throw this.handleError(e);
3369
+ } catch (e2) {
3370
+ throw this.handleError(e2);
3371
3371
  }
3372
3372
  }
3373
3373
  }
@@ -3463,8 +3463,8 @@ function requireLazyResult() {
3463
3463
  let promise;
3464
3464
  try {
3465
3465
  promise = visitor(node2, this.helpers);
3466
- } catch (e) {
3467
- throw this.handleError(e, node2.proxyOf);
3466
+ } catch (e2) {
3467
+ throw this.handleError(e2, node2.proxyOf);
3468
3468
  }
3469
3469
  if (node2.type !== "root" && node2.type !== "document" && !node2.parent) {
3470
3470
  return true;
@@ -3491,8 +3491,8 @@ function requireLazyResult() {
3491
3491
  this.result.lastPlugin = plugin;
3492
3492
  try {
3493
3493
  return visitor(node2.toProxy(), this.helpers);
3494
- } catch (e) {
3495
- throw this.handleError(e, node2);
3494
+ } catch (e2) {
3495
+ throw this.handleError(e2, node2);
3496
3496
  }
3497
3497
  }
3498
3498
  if (visit2.iterator !== 0) {