@posthog/rrweb 0.0.34 → 0.0.36

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/rrweb.js CHANGED
@@ -1476,7 +1476,7 @@ function getDefaultExportFromCjs$1(x) {
1476
1476
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
1477
1477
  }
1478
1478
  function getAugmentedNamespace$1(n2) {
1479
- if (n2.__esModule) return n2;
1479
+ if (Object.prototype.hasOwnProperty.call(n2, "__esModule")) return n2;
1480
1480
  var f2 = n2.default;
1481
1481
  if (typeof f2 == "function") {
1482
1482
  var a2 = function a3() {
@@ -1995,6 +1995,9 @@ function requireNode$1() {
1995
1995
  return offset;
1996
1996
  }
1997
1997
  class Node2 {
1998
+ get proxyOf() {
1999
+ return this;
2000
+ }
1998
2001
  constructor(defaults = {}) {
1999
2002
  this.raws = {};
2000
2003
  this[isClean] = false;
@@ -2113,7 +2116,7 @@ function requireNode$1() {
2113
2116
  let index2 = this.parent.index(this);
2114
2117
  return this.parent.nodes[index2 + 1];
2115
2118
  }
2116
- positionBy(opts) {
2119
+ positionBy(opts = {}) {
2117
2120
  let pos = this.source.start;
2118
2121
  if (opts.index) {
2119
2122
  pos = this.positionInside(opts.index);
@@ -2142,27 +2145,38 @@ function requireNode$1() {
2142
2145
  column += 1;
2143
2146
  }
2144
2147
  }
2145
- return { column, line };
2148
+ return { column, line, offset: end };
2146
2149
  }
2147
2150
  prev() {
2148
2151
  if (!this.parent) return void 0;
2149
2152
  let index2 = this.parent.index(this);
2150
2153
  return this.parent.nodes[index2 - 1];
2151
2154
  }
2152
- rangeBy(opts) {
2155
+ rangeBy(opts = {}) {
2156
+ let inputString = "document" in this.source.input ? this.source.input.document : this.source.input.css;
2153
2157
  let start = {
2154
2158
  column: this.source.start.column,
2155
- line: this.source.start.line
2159
+ line: this.source.start.line,
2160
+ offset: sourceOffset(inputString, this.source.start)
2156
2161
  };
2157
2162
  let end = this.source.end ? {
2158
2163
  column: this.source.end.column + 1,
2159
- line: this.source.end.line
2164
+ line: this.source.end.line,
2165
+ offset: typeof this.source.end.offset === "number" ? (
2166
+ // `source.end.offset` is exclusive, so we don't need to add 1
2167
+ this.source.end.offset
2168
+ ) : (
2169
+ // Since line/column in this.source.end is inclusive,
2170
+ // the `sourceOffset(... , this.source.end)` returns an inclusive offset.
2171
+ // So, we add 1 to convert it to exclusive.
2172
+ sourceOffset(inputString, this.source.end) + 1
2173
+ )
2160
2174
  } : {
2161
2175
  column: start.column + 1,
2162
- line: start.line
2176
+ line: start.line,
2177
+ offset: start.offset + 1
2163
2178
  };
2164
2179
  if (opts.word) {
2165
- let inputString = "document" in this.source.input ? this.source.input.document : this.source.input.css;
2166
2180
  let stringRepresentation = inputString.slice(
2167
2181
  sourceOffset(inputString, this.source.start),
2168
2182
  sourceOffset(inputString, this.source.end)
@@ -2170,15 +2184,14 @@ function requireNode$1() {
2170
2184
  let index2 = stringRepresentation.indexOf(opts.word);
2171
2185
  if (index2 !== -1) {
2172
2186
  start = this.positionInside(index2);
2173
- end = this.positionInside(
2174
- index2 + opts.word.length
2175
- );
2187
+ end = this.positionInside(index2 + opts.word.length);
2176
2188
  }
2177
2189
  } else {
2178
2190
  if (opts.start) {
2179
2191
  start = {
2180
2192
  column: opts.start.column,
2181
- line: opts.start.line
2193
+ line: opts.start.line,
2194
+ offset: sourceOffset(inputString, opts.start)
2182
2195
  };
2183
2196
  } else if (opts.index) {
2184
2197
  start = this.positionInside(opts.index);
@@ -2186,7 +2199,8 @@ function requireNode$1() {
2186
2199
  if (opts.end) {
2187
2200
  end = {
2188
2201
  column: opts.end.column,
2189
- line: opts.end.line
2202
+ line: opts.end.line,
2203
+ offset: sourceOffset(inputString, opts.end)
2190
2204
  };
2191
2205
  } else if (typeof opts.endIndex === "number") {
2192
2206
  end = this.positionInside(opts.endIndex);
@@ -2195,7 +2209,11 @@ function requireNode$1() {
2195
2209
  }
2196
2210
  }
2197
2211
  if (end.line < start.line || end.line === start.line && end.column <= start.column) {
2198
- end = { column: start.column + 1, line: start.line };
2212
+ end = {
2213
+ column: start.column + 1,
2214
+ line: start.line,
2215
+ offset: start.offset + 1
2216
+ };
2199
2217
  }
2200
2218
  return { end, start };
2201
2219
  }
@@ -2259,6 +2277,7 @@ function requireNode$1() {
2259
2277
  } else if (typeof value === "object" && value.toJSON) {
2260
2278
  fixed[name] = value.toJSON(null, inputs);
2261
2279
  } else if (name === "source") {
2280
+ if (value == null) continue;
2262
2281
  let inputId = inputs.get(value.input);
2263
2282
  if (inputId == null) {
2264
2283
  inputId = inputsNextIndex;
@@ -2293,14 +2312,11 @@ function requireNode$1() {
2293
2312
  });
2294
2313
  return result2;
2295
2314
  }
2296
- warn(result2, text, opts) {
2315
+ warn(result2, text, opts = {}) {
2297
2316
  let data = { node: this };
2298
2317
  for (let i2 in opts) data[i2] = opts[i2];
2299
2318
  return result2.warn(text, data);
2300
2319
  }
2301
- get proxyOf() {
2302
- return this;
2303
- }
2304
2320
  }
2305
2321
  node$1 = Node2;
2306
2322
  Node2.default = Node2;
@@ -2329,6 +2345,9 @@ function requireDeclaration$1() {
2329
2345
  hasRequiredDeclaration$1 = 1;
2330
2346
  let Node2 = requireNode$1();
2331
2347
  class Declaration extends Node2 {
2348
+ get variable() {
2349
+ return this.prop.startsWith("--") || this.prop[0] === "$";
2350
+ }
2332
2351
  constructor(defaults) {
2333
2352
  if (defaults && typeof defaults.value !== "undefined" && typeof defaults.value !== "string") {
2334
2353
  defaults = { ...defaults, value: String(defaults.value) };
@@ -2336,9 +2355,6 @@ function requireDeclaration$1() {
2336
2355
  super(defaults);
2337
2356
  this.type = "decl";
2338
2357
  }
2339
- get variable() {
2340
- return this.prop.startsWith("--") || this.prop[0] === "$";
2341
- }
2342
2358
  }
2343
2359
  declaration$1 = Declaration;
2344
2360
  Declaration.default = Declaration;
@@ -2370,6 +2386,14 @@ function requireContainer$1() {
2370
2386
  }
2371
2387
  }
2372
2388
  class Container extends Node2 {
2389
+ get first() {
2390
+ if (!this.proxyOf.nodes) return void 0;
2391
+ return this.proxyOf.nodes[0];
2392
+ }
2393
+ get last() {
2394
+ if (!this.proxyOf.nodes) return void 0;
2395
+ return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
2396
+ }
2373
2397
  append(...children) {
2374
2398
  for (let child of children) {
2375
2399
  let nodes = this.normalize(child, this.last);
@@ -2682,14 +2706,6 @@ function requireContainer$1() {
2682
2706
  }
2683
2707
  });
2684
2708
  }
2685
- get first() {
2686
- if (!this.proxyOf.nodes) return void 0;
2687
- return this.proxyOf.nodes[0];
2688
- }
2689
- get last() {
2690
- if (!this.proxyOf.nodes) return void 0;
2691
- return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
2692
- }
2693
2709
  }
2694
2710
  Container.registerParse = (dependant) => {
2695
2711
  parse = dependant;
@@ -2939,10 +2955,25 @@ function requireInput$1() {
2939
2955
  let CssSyntaxError = requireCssSyntaxError$1();
2940
2956
  let PreviousMap = requirePreviousMap$1();
2941
2957
  let terminalHighlight = require$$2$1;
2942
- let fromOffsetCache = Symbol("fromOffsetCache");
2958
+ let lineToIndexCache = Symbol("lineToIndexCache");
2943
2959
  let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
2944
2960
  let pathAvailable = Boolean(resolve && isAbsolute);
2961
+ function getLineToIndex(input2) {
2962
+ if (input2[lineToIndexCache]) return input2[lineToIndexCache];
2963
+ let lines = input2.css.split("\n");
2964
+ let lineToIndex = new Array(lines.length);
2965
+ let prevIndex = 0;
2966
+ for (let i2 = 0, l2 = lines.length; i2 < l2; i2++) {
2967
+ lineToIndex[i2] = prevIndex;
2968
+ prevIndex += lines[i2].length + 1;
2969
+ }
2970
+ input2[lineToIndexCache] = lineToIndex;
2971
+ return lineToIndex;
2972
+ }
2945
2973
  class Input {
2974
+ get from() {
2975
+ return this.file || this.id;
2976
+ }
2946
2977
  constructor(css, opts = {}) {
2947
2978
  if (css === null || typeof css === "undefined" || typeof css === "object" && !css.toString) {
2948
2979
  throw new Error(`PostCSS received ${css} instead of CSS string`);
@@ -2977,30 +3008,37 @@ function requireInput$1() {
2977
3008
  if (this.map) this.map.file = this.from;
2978
3009
  }
2979
3010
  error(message, line, column, opts = {}) {
2980
- let endColumn, endLine, result2;
3011
+ let endColumn, endLine, endOffset, offset, result2;
2981
3012
  if (line && typeof line === "object") {
2982
3013
  let start = line;
2983
3014
  let end = column;
2984
3015
  if (typeof start.offset === "number") {
2985
- let pos = this.fromOffset(start.offset);
3016
+ offset = start.offset;
3017
+ let pos = this.fromOffset(offset);
2986
3018
  line = pos.line;
2987
3019
  column = pos.col;
2988
3020
  } else {
2989
3021
  line = start.line;
2990
3022
  column = start.column;
3023
+ offset = this.fromLineAndColumn(line, column);
2991
3024
  }
2992
3025
  if (typeof end.offset === "number") {
2993
- let pos = this.fromOffset(end.offset);
3026
+ endOffset = end.offset;
3027
+ let pos = this.fromOffset(endOffset);
2994
3028
  endLine = pos.line;
2995
3029
  endColumn = pos.col;
2996
3030
  } else {
2997
3031
  endLine = end.line;
2998
3032
  endColumn = end.column;
3033
+ endOffset = this.fromLineAndColumn(end.line, end.column);
2999
3034
  }
3000
3035
  } else if (!column) {
3001
- let pos = this.fromOffset(line);
3036
+ offset = line;
3037
+ let pos = this.fromOffset(offset);
3002
3038
  line = pos.line;
3003
3039
  column = pos.col;
3040
+ } else {
3041
+ offset = this.fromLineAndColumn(line, column);
3004
3042
  }
3005
3043
  let origin = this.origin(line, column, endLine, endColumn);
3006
3044
  if (origin) {
@@ -3022,7 +3060,7 @@ function requireInput$1() {
3022
3060
  opts.plugin
3023
3061
  );
3024
3062
  }
3025
- result2.input = { column, endColumn, endLine, line, source: this.css };
3063
+ result2.input = { column, endColumn, endLine, endOffset, line, offset, source: this.css };
3026
3064
  if (this.file) {
3027
3065
  if (pathToFileURL) {
3028
3066
  result2.input.url = pathToFileURL(this.file).toString();
@@ -3031,21 +3069,14 @@ function requireInput$1() {
3031
3069
  }
3032
3070
  return result2;
3033
3071
  }
3072
+ fromLineAndColumn(line, column) {
3073
+ let lineToIndex = getLineToIndex(this);
3074
+ let index2 = lineToIndex[line - 1];
3075
+ return index2 + column - 1;
3076
+ }
3034
3077
  fromOffset(offset) {
3035
- let lastLine, lineToIndex;
3036
- if (!this[fromOffsetCache]) {
3037
- let lines = this.css.split("\n");
3038
- lineToIndex = new Array(lines.length);
3039
- let prevIndex = 0;
3040
- for (let i2 = 0, l2 = lines.length; i2 < l2; i2++) {
3041
- lineToIndex[i2] = prevIndex;
3042
- prevIndex += lines[i2].length + 1;
3043
- }
3044
- this[fromOffsetCache] = lineToIndex;
3045
- } else {
3046
- lineToIndex = this[fromOffsetCache];
3047
- }
3048
- lastLine = lineToIndex[lineToIndex.length - 1];
3078
+ let lineToIndex = getLineToIndex(this);
3079
+ let lastLine = lineToIndex[lineToIndex.length - 1];
3049
3080
  let min = 0;
3050
3081
  if (offset >= lastLine) {
3051
3082
  min = lineToIndex.length - 1;
@@ -3126,9 +3157,6 @@ function requireInput$1() {
3126
3157
  }
3127
3158
  return json;
3128
3159
  }
3129
- get from() {
3130
- return this.file || this.id;
3131
- }
3132
3160
  }
3133
3161
  input$1 = Input;
3134
3162
  Input.default = Input;
@@ -3254,11 +3282,6 @@ function requireRule$1() {
3254
3282
  let Container = requireContainer$1();
3255
3283
  let list = requireList$1();
3256
3284
  class Rule extends Container {
3257
- constructor(defaults) {
3258
- super(defaults);
3259
- this.type = "rule";
3260
- if (!this.nodes) this.nodes = [];
3261
- }
3262
3285
  get selectors() {
3263
3286
  return list.comma(this.selector);
3264
3287
  }
@@ -3267,6 +3290,11 @@ function requireRule$1() {
3267
3290
  let sep = match ? match[0] : "," + this.raw("between", "beforeOpen");
3268
3291
  this.selector = values.join(sep);
3269
3292
  }
3293
+ constructor(defaults) {
3294
+ super(defaults);
3295
+ this.type = "rule";
3296
+ if (!this.nodes) this.nodes = [];
3297
+ }
3270
3298
  }
3271
3299
  rule$1 = Rule;
3272
3300
  Rule.default = Rule;
@@ -4166,6 +4194,8 @@ function requireParser$1() {
4166
4194
  if (prev && prev.type === "rule" && !prev.raws.ownSemicolon) {
4167
4195
  prev.raws.ownSemicolon = this.spaces;
4168
4196
  this.spaces = "";
4197
+ prev.source.end = this.getPosition(token[2]);
4198
+ prev.source.end.offset += prev.raws.ownSemicolon.length;
4169
4199
  }
4170
4200
  }
4171
4201
  }
@@ -4377,7 +4407,7 @@ function requireParser$1() {
4377
4407
  }
4378
4408
  unknownWord(tokens) {
4379
4409
  throw this.input.error(
4380
- "Unknown word",
4410
+ "Unknown word " + tokens[0][1],
4381
4411
  { offset: tokens[0][2] },
4382
4412
  { offset: tokens[0][2] + tokens[0][1].length }
4383
4413
  );
@@ -4470,12 +4500,15 @@ function requireResult$1() {
4470
4500
  hasRequiredResult$1 = 1;
4471
4501
  let Warning = requireWarning$1();
4472
4502
  class Result {
4503
+ get content() {
4504
+ return this.css;
4505
+ }
4473
4506
  constructor(processor2, root2, opts) {
4474
4507
  this.processor = processor2;
4475
4508
  this.messages = [];
4476
4509
  this.root = root2;
4477
4510
  this.opts = opts;
4478
- this.css = void 0;
4511
+ this.css = "";
4479
4512
  this.map = void 0;
4480
4513
  }
4481
4514
  toString() {
@@ -4494,9 +4527,6 @@ function requireResult$1() {
4494
4527
  warnings() {
4495
4528
  return this.messages.filter((i2) => i2.type === "warning");
4496
4529
  }
4497
- get content() {
4498
- return this.css;
4499
- }
4500
4530
  }
4501
4531
  result$1 = Result;
4502
4532
  Result.default = Result;
@@ -4615,6 +4645,30 @@ function requireLazyResult$1() {
4615
4645
  }
4616
4646
  let postcss2 = {};
4617
4647
  class LazyResult {
4648
+ get content() {
4649
+ return this.stringify().content;
4650
+ }
4651
+ get css() {
4652
+ return this.stringify().css;
4653
+ }
4654
+ get map() {
4655
+ return this.stringify().map;
4656
+ }
4657
+ get messages() {
4658
+ return this.sync().messages;
4659
+ }
4660
+ get opts() {
4661
+ return this.result.opts;
4662
+ }
4663
+ get processor() {
4664
+ return this.result.processor;
4665
+ }
4666
+ get root() {
4667
+ return this.sync().root;
4668
+ }
4669
+ get [Symbol.toStringTag]() {
4670
+ return "LazyResult";
4671
+ }
4618
4672
  constructor(processor2, css, opts) {
4619
4673
  this.stringified = false;
4620
4674
  this.processed = false;
@@ -4957,30 +5011,6 @@ function requireLazyResult$1() {
4957
5011
  warnings() {
4958
5012
  return this.sync().warnings();
4959
5013
  }
4960
- get content() {
4961
- return this.stringify().content;
4962
- }
4963
- get css() {
4964
- return this.stringify().css;
4965
- }
4966
- get map() {
4967
- return this.stringify().map;
4968
- }
4969
- get messages() {
4970
- return this.sync().messages;
4971
- }
4972
- get opts() {
4973
- return this.result.opts;
4974
- }
4975
- get processor() {
4976
- return this.result.processor;
4977
- }
4978
- get root() {
4979
- return this.sync().root;
4980
- }
4981
- get [Symbol.toStringTag]() {
4982
- return "LazyResult";
4983
- }
4984
5014
  }
4985
5015
  LazyResult.registerPostcss = (dependant) => {
4986
5016
  postcss2 = dependant;
@@ -5002,6 +5032,45 @@ function requireNoWorkResult$1() {
5002
5032
  let stringify = requireStringify$1();
5003
5033
  let warnOnce2 = requireWarnOnce$1();
5004
5034
  class NoWorkResult {
5035
+ get content() {
5036
+ return this.result.css;
5037
+ }
5038
+ get css() {
5039
+ return this.result.css;
5040
+ }
5041
+ get map() {
5042
+ return this.result.map;
5043
+ }
5044
+ get messages() {
5045
+ return [];
5046
+ }
5047
+ get opts() {
5048
+ return this.result.opts;
5049
+ }
5050
+ get processor() {
5051
+ return this.result.processor;
5052
+ }
5053
+ get root() {
5054
+ if (this._root) {
5055
+ return this._root;
5056
+ }
5057
+ let root2;
5058
+ let parser2 = parse;
5059
+ try {
5060
+ root2 = parser2(this._css, this._opts);
5061
+ } catch (error) {
5062
+ this.error = error;
5063
+ }
5064
+ if (this.error) {
5065
+ throw this.error;
5066
+ } else {
5067
+ this._root = root2;
5068
+ return root2;
5069
+ }
5070
+ }
5071
+ get [Symbol.toStringTag]() {
5072
+ return "NoWorkResult";
5073
+ }
5005
5074
  constructor(processor2, css, opts) {
5006
5075
  css = css.toString();
5007
5076
  this.stringified = false;
@@ -5063,45 +5132,6 @@ function requireNoWorkResult$1() {
5063
5132
  warnings() {
5064
5133
  return [];
5065
5134
  }
5066
- get content() {
5067
- return this.result.css;
5068
- }
5069
- get css() {
5070
- return this.result.css;
5071
- }
5072
- get map() {
5073
- return this.result.map;
5074
- }
5075
- get messages() {
5076
- return [];
5077
- }
5078
- get opts() {
5079
- return this.result.opts;
5080
- }
5081
- get processor() {
5082
- return this.result.processor;
5083
- }
5084
- get root() {
5085
- if (this._root) {
5086
- return this._root;
5087
- }
5088
- let root2;
5089
- let parser2 = parse;
5090
- try {
5091
- root2 = parser2(this._css, this._opts);
5092
- } catch (error) {
5093
- this.error = error;
5094
- }
5095
- if (this.error) {
5096
- throw this.error;
5097
- } else {
5098
- this._root = root2;
5099
- return root2;
5100
- }
5101
- }
5102
- get [Symbol.toStringTag]() {
5103
- return "NoWorkResult";
5104
- }
5105
5135
  }
5106
5136
  noWorkResult$1 = NoWorkResult;
5107
5137
  NoWorkResult.default = NoWorkResult;
@@ -5118,7 +5148,7 @@ function requireProcessor$1() {
5118
5148
  let Root = requireRoot$1();
5119
5149
  class Processor {
5120
5150
  constructor(plugins = []) {
5121
- this.version = "8.5.1";
5151
+ this.version = "8.5.6";
5122
5152
  this.plugins = this.normalize(plugins);
5123
5153
  }
5124
5154
  normalize(plugins) {
@@ -5839,7 +5869,7 @@ function getDefaultExportFromCjs(x) {
5839
5869
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
5840
5870
  }
5841
5871
  function getAugmentedNamespace(n2) {
5842
- if (n2.__esModule) return n2;
5872
+ if (Object.prototype.hasOwnProperty.call(n2, "__esModule")) return n2;
5843
5873
  var f2 = n2.default;
5844
5874
  if (typeof f2 == "function") {
5845
5875
  var a2 = function a3() {
@@ -6358,6 +6388,9 @@ function requireNode() {
6358
6388
  return offset;
6359
6389
  }
6360
6390
  class Node2 {
6391
+ get proxyOf() {
6392
+ return this;
6393
+ }
6361
6394
  constructor(defaults = {}) {
6362
6395
  this.raws = {};
6363
6396
  this[isClean] = false;
@@ -6476,7 +6509,7 @@ function requireNode() {
6476
6509
  let index2 = this.parent.index(this);
6477
6510
  return this.parent.nodes[index2 + 1];
6478
6511
  }
6479
- positionBy(opts) {
6512
+ positionBy(opts = {}) {
6480
6513
  let pos = this.source.start;
6481
6514
  if (opts.index) {
6482
6515
  pos = this.positionInside(opts.index);
@@ -6505,27 +6538,38 @@ function requireNode() {
6505
6538
  column += 1;
6506
6539
  }
6507
6540
  }
6508
- return { column, line };
6541
+ return { column, line, offset: end };
6509
6542
  }
6510
6543
  prev() {
6511
6544
  if (!this.parent) return void 0;
6512
6545
  let index2 = this.parent.index(this);
6513
6546
  return this.parent.nodes[index2 - 1];
6514
6547
  }
6515
- rangeBy(opts) {
6548
+ rangeBy(opts = {}) {
6549
+ let inputString = "document" in this.source.input ? this.source.input.document : this.source.input.css;
6516
6550
  let start = {
6517
6551
  column: this.source.start.column,
6518
- line: this.source.start.line
6552
+ line: this.source.start.line,
6553
+ offset: sourceOffset(inputString, this.source.start)
6519
6554
  };
6520
6555
  let end = this.source.end ? {
6521
6556
  column: this.source.end.column + 1,
6522
- line: this.source.end.line
6557
+ line: this.source.end.line,
6558
+ offset: typeof this.source.end.offset === "number" ? (
6559
+ // `source.end.offset` is exclusive, so we don't need to add 1
6560
+ this.source.end.offset
6561
+ ) : (
6562
+ // Since line/column in this.source.end is inclusive,
6563
+ // the `sourceOffset(... , this.source.end)` returns an inclusive offset.
6564
+ // So, we add 1 to convert it to exclusive.
6565
+ sourceOffset(inputString, this.source.end) + 1
6566
+ )
6523
6567
  } : {
6524
6568
  column: start.column + 1,
6525
- line: start.line
6569
+ line: start.line,
6570
+ offset: start.offset + 1
6526
6571
  };
6527
6572
  if (opts.word) {
6528
- let inputString = "document" in this.source.input ? this.source.input.document : this.source.input.css;
6529
6573
  let stringRepresentation = inputString.slice(
6530
6574
  sourceOffset(inputString, this.source.start),
6531
6575
  sourceOffset(inputString, this.source.end)
@@ -6533,15 +6577,14 @@ function requireNode() {
6533
6577
  let index2 = stringRepresentation.indexOf(opts.word);
6534
6578
  if (index2 !== -1) {
6535
6579
  start = this.positionInside(index2);
6536
- end = this.positionInside(
6537
- index2 + opts.word.length
6538
- );
6580
+ end = this.positionInside(index2 + opts.word.length);
6539
6581
  }
6540
6582
  } else {
6541
6583
  if (opts.start) {
6542
6584
  start = {
6543
6585
  column: opts.start.column,
6544
- line: opts.start.line
6586
+ line: opts.start.line,
6587
+ offset: sourceOffset(inputString, opts.start)
6545
6588
  };
6546
6589
  } else if (opts.index) {
6547
6590
  start = this.positionInside(opts.index);
@@ -6549,7 +6592,8 @@ function requireNode() {
6549
6592
  if (opts.end) {
6550
6593
  end = {
6551
6594
  column: opts.end.column,
6552
- line: opts.end.line
6595
+ line: opts.end.line,
6596
+ offset: sourceOffset(inputString, opts.end)
6553
6597
  };
6554
6598
  } else if (typeof opts.endIndex === "number") {
6555
6599
  end = this.positionInside(opts.endIndex);
@@ -6558,7 +6602,11 @@ function requireNode() {
6558
6602
  }
6559
6603
  }
6560
6604
  if (end.line < start.line || end.line === start.line && end.column <= start.column) {
6561
- end = { column: start.column + 1, line: start.line };
6605
+ end = {
6606
+ column: start.column + 1,
6607
+ line: start.line,
6608
+ offset: start.offset + 1
6609
+ };
6562
6610
  }
6563
6611
  return { end, start };
6564
6612
  }
@@ -6622,6 +6670,7 @@ function requireNode() {
6622
6670
  } else if (typeof value === "object" && value.toJSON) {
6623
6671
  fixed[name] = value.toJSON(null, inputs);
6624
6672
  } else if (name === "source") {
6673
+ if (value == null) continue;
6625
6674
  let inputId = inputs.get(value.input);
6626
6675
  if (inputId == null) {
6627
6676
  inputId = inputsNextIndex;
@@ -6656,14 +6705,11 @@ function requireNode() {
6656
6705
  });
6657
6706
  return result2;
6658
6707
  }
6659
- warn(result2, text, opts) {
6708
+ warn(result2, text, opts = {}) {
6660
6709
  let data = { node: this };
6661
6710
  for (let i2 in opts) data[i2] = opts[i2];
6662
6711
  return result2.warn(text, data);
6663
6712
  }
6664
- get proxyOf() {
6665
- return this;
6666
- }
6667
6713
  }
6668
6714
  node = Node2;
6669
6715
  Node2.default = Node2;
@@ -6692,6 +6738,9 @@ function requireDeclaration() {
6692
6738
  hasRequiredDeclaration = 1;
6693
6739
  let Node2 = requireNode();
6694
6740
  class Declaration extends Node2 {
6741
+ get variable() {
6742
+ return this.prop.startsWith("--") || this.prop[0] === "$";
6743
+ }
6695
6744
  constructor(defaults) {
6696
6745
  if (defaults && typeof defaults.value !== "undefined" && typeof defaults.value !== "string") {
6697
6746
  defaults = { ...defaults, value: String(defaults.value) };
@@ -6699,9 +6748,6 @@ function requireDeclaration() {
6699
6748
  super(defaults);
6700
6749
  this.type = "decl";
6701
6750
  }
6702
- get variable() {
6703
- return this.prop.startsWith("--") || this.prop[0] === "$";
6704
- }
6705
6751
  }
6706
6752
  declaration = Declaration;
6707
6753
  Declaration.default = Declaration;
@@ -6733,6 +6779,14 @@ function requireContainer() {
6733
6779
  }
6734
6780
  }
6735
6781
  class Container extends Node2 {
6782
+ get first() {
6783
+ if (!this.proxyOf.nodes) return void 0;
6784
+ return this.proxyOf.nodes[0];
6785
+ }
6786
+ get last() {
6787
+ if (!this.proxyOf.nodes) return void 0;
6788
+ return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
6789
+ }
6736
6790
  append(...children) {
6737
6791
  for (let child of children) {
6738
6792
  let nodes = this.normalize(child, this.last);
@@ -7045,14 +7099,6 @@ function requireContainer() {
7045
7099
  }
7046
7100
  });
7047
7101
  }
7048
- get first() {
7049
- if (!this.proxyOf.nodes) return void 0;
7050
- return this.proxyOf.nodes[0];
7051
- }
7052
- get last() {
7053
- if (!this.proxyOf.nodes) return void 0;
7054
- return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
7055
- }
7056
7102
  }
7057
7103
  Container.registerParse = (dependant) => {
7058
7104
  parse = dependant;
@@ -7302,10 +7348,25 @@ function requireInput() {
7302
7348
  let CssSyntaxError = requireCssSyntaxError();
7303
7349
  let PreviousMap = requirePreviousMap();
7304
7350
  let terminalHighlight = require$$2;
7305
- let fromOffsetCache = Symbol("fromOffsetCache");
7351
+ let lineToIndexCache = Symbol("lineToIndexCache");
7306
7352
  let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
7307
7353
  let pathAvailable = Boolean(resolve && isAbsolute);
7354
+ function getLineToIndex(input2) {
7355
+ if (input2[lineToIndexCache]) return input2[lineToIndexCache];
7356
+ let lines = input2.css.split("\n");
7357
+ let lineToIndex = new Array(lines.length);
7358
+ let prevIndex = 0;
7359
+ for (let i2 = 0, l2 = lines.length; i2 < l2; i2++) {
7360
+ lineToIndex[i2] = prevIndex;
7361
+ prevIndex += lines[i2].length + 1;
7362
+ }
7363
+ input2[lineToIndexCache] = lineToIndex;
7364
+ return lineToIndex;
7365
+ }
7308
7366
  class Input {
7367
+ get from() {
7368
+ return this.file || this.id;
7369
+ }
7309
7370
  constructor(css, opts = {}) {
7310
7371
  if (css === null || typeof css === "undefined" || typeof css === "object" && !css.toString) {
7311
7372
  throw new Error(`PostCSS received ${css} instead of CSS string`);
@@ -7340,30 +7401,37 @@ function requireInput() {
7340
7401
  if (this.map) this.map.file = this.from;
7341
7402
  }
7342
7403
  error(message, line, column, opts = {}) {
7343
- let endColumn, endLine, result2;
7404
+ let endColumn, endLine, endOffset, offset, result2;
7344
7405
  if (line && typeof line === "object") {
7345
7406
  let start = line;
7346
7407
  let end = column;
7347
7408
  if (typeof start.offset === "number") {
7348
- let pos = this.fromOffset(start.offset);
7409
+ offset = start.offset;
7410
+ let pos = this.fromOffset(offset);
7349
7411
  line = pos.line;
7350
7412
  column = pos.col;
7351
7413
  } else {
7352
7414
  line = start.line;
7353
7415
  column = start.column;
7416
+ offset = this.fromLineAndColumn(line, column);
7354
7417
  }
7355
7418
  if (typeof end.offset === "number") {
7356
- let pos = this.fromOffset(end.offset);
7419
+ endOffset = end.offset;
7420
+ let pos = this.fromOffset(endOffset);
7357
7421
  endLine = pos.line;
7358
7422
  endColumn = pos.col;
7359
7423
  } else {
7360
7424
  endLine = end.line;
7361
7425
  endColumn = end.column;
7426
+ endOffset = this.fromLineAndColumn(end.line, end.column);
7362
7427
  }
7363
7428
  } else if (!column) {
7364
- let pos = this.fromOffset(line);
7429
+ offset = line;
7430
+ let pos = this.fromOffset(offset);
7365
7431
  line = pos.line;
7366
7432
  column = pos.col;
7433
+ } else {
7434
+ offset = this.fromLineAndColumn(line, column);
7367
7435
  }
7368
7436
  let origin = this.origin(line, column, endLine, endColumn);
7369
7437
  if (origin) {
@@ -7385,7 +7453,7 @@ function requireInput() {
7385
7453
  opts.plugin
7386
7454
  );
7387
7455
  }
7388
- result2.input = { column, endColumn, endLine, line, source: this.css };
7456
+ result2.input = { column, endColumn, endLine, endOffset, line, offset, source: this.css };
7389
7457
  if (this.file) {
7390
7458
  if (pathToFileURL) {
7391
7459
  result2.input.url = pathToFileURL(this.file).toString();
@@ -7394,21 +7462,14 @@ function requireInput() {
7394
7462
  }
7395
7463
  return result2;
7396
7464
  }
7465
+ fromLineAndColumn(line, column) {
7466
+ let lineToIndex = getLineToIndex(this);
7467
+ let index2 = lineToIndex[line - 1];
7468
+ return index2 + column - 1;
7469
+ }
7397
7470
  fromOffset(offset) {
7398
- let lastLine, lineToIndex;
7399
- if (!this[fromOffsetCache]) {
7400
- let lines = this.css.split("\n");
7401
- lineToIndex = new Array(lines.length);
7402
- let prevIndex = 0;
7403
- for (let i2 = 0, l2 = lines.length; i2 < l2; i2++) {
7404
- lineToIndex[i2] = prevIndex;
7405
- prevIndex += lines[i2].length + 1;
7406
- }
7407
- this[fromOffsetCache] = lineToIndex;
7408
- } else {
7409
- lineToIndex = this[fromOffsetCache];
7410
- }
7411
- lastLine = lineToIndex[lineToIndex.length - 1];
7471
+ let lineToIndex = getLineToIndex(this);
7472
+ let lastLine = lineToIndex[lineToIndex.length - 1];
7412
7473
  let min = 0;
7413
7474
  if (offset >= lastLine) {
7414
7475
  min = lineToIndex.length - 1;
@@ -7489,9 +7550,6 @@ function requireInput() {
7489
7550
  }
7490
7551
  return json;
7491
7552
  }
7492
- get from() {
7493
- return this.file || this.id;
7494
- }
7495
7553
  }
7496
7554
  input = Input;
7497
7555
  Input.default = Input;
@@ -7617,11 +7675,6 @@ function requireRule() {
7617
7675
  let Container = requireContainer();
7618
7676
  let list = requireList();
7619
7677
  class Rule extends Container {
7620
- constructor(defaults) {
7621
- super(defaults);
7622
- this.type = "rule";
7623
- if (!this.nodes) this.nodes = [];
7624
- }
7625
7678
  get selectors() {
7626
7679
  return list.comma(this.selector);
7627
7680
  }
@@ -7630,6 +7683,11 @@ function requireRule() {
7630
7683
  let sep = match ? match[0] : "," + this.raw("between", "beforeOpen");
7631
7684
  this.selector = values.join(sep);
7632
7685
  }
7686
+ constructor(defaults) {
7687
+ super(defaults);
7688
+ this.type = "rule";
7689
+ if (!this.nodes) this.nodes = [];
7690
+ }
7633
7691
  }
7634
7692
  rule = Rule;
7635
7693
  Rule.default = Rule;
@@ -8529,6 +8587,8 @@ function requireParser() {
8529
8587
  if (prev && prev.type === "rule" && !prev.raws.ownSemicolon) {
8530
8588
  prev.raws.ownSemicolon = this.spaces;
8531
8589
  this.spaces = "";
8590
+ prev.source.end = this.getPosition(token[2]);
8591
+ prev.source.end.offset += prev.raws.ownSemicolon.length;
8532
8592
  }
8533
8593
  }
8534
8594
  }
@@ -8740,7 +8800,7 @@ function requireParser() {
8740
8800
  }
8741
8801
  unknownWord(tokens) {
8742
8802
  throw this.input.error(
8743
- "Unknown word",
8803
+ "Unknown word " + tokens[0][1],
8744
8804
  { offset: tokens[0][2] },
8745
8805
  { offset: tokens[0][2] + tokens[0][1].length }
8746
8806
  );
@@ -8833,12 +8893,15 @@ function requireResult() {
8833
8893
  hasRequiredResult = 1;
8834
8894
  let Warning = requireWarning();
8835
8895
  class Result {
8896
+ get content() {
8897
+ return this.css;
8898
+ }
8836
8899
  constructor(processor2, root2, opts) {
8837
8900
  this.processor = processor2;
8838
8901
  this.messages = [];
8839
8902
  this.root = root2;
8840
8903
  this.opts = opts;
8841
- this.css = void 0;
8904
+ this.css = "";
8842
8905
  this.map = void 0;
8843
8906
  }
8844
8907
  toString() {
@@ -8857,9 +8920,6 @@ function requireResult() {
8857
8920
  warnings() {
8858
8921
  return this.messages.filter((i2) => i2.type === "warning");
8859
8922
  }
8860
- get content() {
8861
- return this.css;
8862
- }
8863
8923
  }
8864
8924
  result = Result;
8865
8925
  Result.default = Result;
@@ -8978,6 +9038,30 @@ function requireLazyResult() {
8978
9038
  }
8979
9039
  let postcss2 = {};
8980
9040
  class LazyResult {
9041
+ get content() {
9042
+ return this.stringify().content;
9043
+ }
9044
+ get css() {
9045
+ return this.stringify().css;
9046
+ }
9047
+ get map() {
9048
+ return this.stringify().map;
9049
+ }
9050
+ get messages() {
9051
+ return this.sync().messages;
9052
+ }
9053
+ get opts() {
9054
+ return this.result.opts;
9055
+ }
9056
+ get processor() {
9057
+ return this.result.processor;
9058
+ }
9059
+ get root() {
9060
+ return this.sync().root;
9061
+ }
9062
+ get [Symbol.toStringTag]() {
9063
+ return "LazyResult";
9064
+ }
8981
9065
  constructor(processor2, css, opts) {
8982
9066
  this.stringified = false;
8983
9067
  this.processed = false;
@@ -9320,30 +9404,6 @@ function requireLazyResult() {
9320
9404
  warnings() {
9321
9405
  return this.sync().warnings();
9322
9406
  }
9323
- get content() {
9324
- return this.stringify().content;
9325
- }
9326
- get css() {
9327
- return this.stringify().css;
9328
- }
9329
- get map() {
9330
- return this.stringify().map;
9331
- }
9332
- get messages() {
9333
- return this.sync().messages;
9334
- }
9335
- get opts() {
9336
- return this.result.opts;
9337
- }
9338
- get processor() {
9339
- return this.result.processor;
9340
- }
9341
- get root() {
9342
- return this.sync().root;
9343
- }
9344
- get [Symbol.toStringTag]() {
9345
- return "LazyResult";
9346
- }
9347
9407
  }
9348
9408
  LazyResult.registerPostcss = (dependant) => {
9349
9409
  postcss2 = dependant;
@@ -9365,6 +9425,45 @@ function requireNoWorkResult() {
9365
9425
  let stringify = requireStringify();
9366
9426
  let warnOnce2 = requireWarnOnce();
9367
9427
  class NoWorkResult {
9428
+ get content() {
9429
+ return this.result.css;
9430
+ }
9431
+ get css() {
9432
+ return this.result.css;
9433
+ }
9434
+ get map() {
9435
+ return this.result.map;
9436
+ }
9437
+ get messages() {
9438
+ return [];
9439
+ }
9440
+ get opts() {
9441
+ return this.result.opts;
9442
+ }
9443
+ get processor() {
9444
+ return this.result.processor;
9445
+ }
9446
+ get root() {
9447
+ if (this._root) {
9448
+ return this._root;
9449
+ }
9450
+ let root2;
9451
+ let parser2 = parse;
9452
+ try {
9453
+ root2 = parser2(this._css, this._opts);
9454
+ } catch (error) {
9455
+ this.error = error;
9456
+ }
9457
+ if (this.error) {
9458
+ throw this.error;
9459
+ } else {
9460
+ this._root = root2;
9461
+ return root2;
9462
+ }
9463
+ }
9464
+ get [Symbol.toStringTag]() {
9465
+ return "NoWorkResult";
9466
+ }
9368
9467
  constructor(processor2, css, opts) {
9369
9468
  css = css.toString();
9370
9469
  this.stringified = false;
@@ -9426,45 +9525,6 @@ function requireNoWorkResult() {
9426
9525
  warnings() {
9427
9526
  return [];
9428
9527
  }
9429
- get content() {
9430
- return this.result.css;
9431
- }
9432
- get css() {
9433
- return this.result.css;
9434
- }
9435
- get map() {
9436
- return this.result.map;
9437
- }
9438
- get messages() {
9439
- return [];
9440
- }
9441
- get opts() {
9442
- return this.result.opts;
9443
- }
9444
- get processor() {
9445
- return this.result.processor;
9446
- }
9447
- get root() {
9448
- if (this._root) {
9449
- return this._root;
9450
- }
9451
- let root2;
9452
- let parser2 = parse;
9453
- try {
9454
- root2 = parser2(this._css, this._opts);
9455
- } catch (error) {
9456
- this.error = error;
9457
- }
9458
- if (this.error) {
9459
- throw this.error;
9460
- } else {
9461
- this._root = root2;
9462
- return root2;
9463
- }
9464
- }
9465
- get [Symbol.toStringTag]() {
9466
- return "NoWorkResult";
9467
- }
9468
9528
  }
9469
9529
  noWorkResult = NoWorkResult;
9470
9530
  NoWorkResult.default = NoWorkResult;
@@ -9481,7 +9541,7 @@ function requireProcessor() {
9481
9541
  let Root = requireRoot();
9482
9542
  class Processor {
9483
9543
  constructor(plugins = []) {
9484
- this.version = "8.5.1";
9544
+ this.version = "8.5.6";
9485
9545
  this.plugins = this.normalize(plugins);
9486
9546
  }
9487
9547
  normalize(plugins) {
@@ -12283,7 +12343,7 @@ const callbackWrapper = (cb) => {
12283
12343
  if (!errorHandler) {
12284
12344
  return cb;
12285
12345
  }
12286
- const rrwebWrapped = (...rest) => {
12346
+ const rrwebWrapped = ((...rest) => {
12287
12347
  try {
12288
12348
  return cb(...rest);
12289
12349
  } catch (error) {
@@ -12292,7 +12352,7 @@ const callbackWrapper = (cb) => {
12292
12352
  }
12293
12353
  throw error;
12294
12354
  }
12295
- };
12355
+ });
12296
12356
  return rrwebWrapped;
12297
12357
  };
12298
12358
  const mutationBuffers = [];
@@ -13050,7 +13110,11 @@ function initFontObserver({ fontCb, doc }) {
13050
13110
  const fontMap = /* @__PURE__ */ new WeakMap();
13051
13111
  const originalFontFace = win.FontFace;
13052
13112
  win.FontFace = function FontFace2(family, source, descriptors) {
13053
- const fontFace = new originalFontFace(family, source, descriptors);
13113
+ const fontFace = new originalFontFace(
13114
+ family,
13115
+ source,
13116
+ descriptors
13117
+ );
13054
13118
  fontMap.set(fontFace, {
13055
13119
  family,
13056
13120
  buffer: typeof source !== "string",
@@ -13413,13 +13477,18 @@ class IframeManager {
13413
13477
  removeLoadListener() {
13414
13478
  this.loadListener = void 0;
13415
13479
  }
13480
+ trackIframeContent(iframeEl, content) {
13481
+ const iframeId = this.mirror.getId(iframeEl);
13482
+ this.attachedIframes.set(iframeId, { element: iframeEl, content });
13483
+ return iframeId;
13484
+ }
13416
13485
  attachIframe(iframeEl, childSn) {
13417
13486
  var _a2;
13418
- this.attachedIframes.set(iframeEl, childSn);
13487
+ const iframeId = this.trackIframeContent(iframeEl, childSn);
13419
13488
  this.mutationCb({
13420
13489
  adds: [
13421
13490
  {
13422
- parentId: this.mirror.getId(iframeEl),
13491
+ parentId: iframeId,
13423
13492
  nextId: null,
13424
13493
  node: childSn
13425
13494
  }
@@ -13471,7 +13540,7 @@ class IframeManager {
13471
13540
  const rootId = e2.data.node.id;
13472
13541
  this.crossOriginIframeRootIdMap.set(iframeEl, rootId);
13473
13542
  this.patchRootIdOnNode(e2.data.node, rootId);
13474
- this.attachedIframes.set(iframeEl, e2.data.node);
13543
+ this.trackIframeContent(iframeEl, e2.data.node);
13475
13544
  return {
13476
13545
  timestamp: e2.timestamp,
13477
13546
  type: EventType.IncrementalSnapshot,
@@ -13614,21 +13683,27 @@ class IframeManager {
13614
13683
  });
13615
13684
  }
13616
13685
  }
13686
+ removeIframeById(iframeId) {
13687
+ const entry = this.attachedIframes.get(iframeId);
13688
+ if (!entry) return;
13689
+ const win = entry.element.contentWindow;
13690
+ if (win && this.nestedIframeListeners.has(win)) {
13691
+ const handler = this.nestedIframeListeners.get(win);
13692
+ win.removeEventListener("message", handler);
13693
+ this.nestedIframeListeners.delete(win);
13694
+ }
13695
+ this.attachedIframes.delete(iframeId);
13696
+ }
13617
13697
  reattachIframes() {
13618
- this.attachedIframes.forEach((content, iframe) => {
13619
- if (!iframe.isConnected) {
13620
- this.attachedIframes.delete(iframe);
13621
- return;
13622
- }
13623
- const parentId = this.mirror.getId(iframe);
13624
- if (parentId === -1) {
13625
- this.attachedIframes.delete(iframe);
13698
+ this.attachedIframes.forEach(({ content }, iframeId) => {
13699
+ if (!this.mirror.has(iframeId)) {
13700
+ this.attachedIframes.delete(iframeId);
13626
13701
  return;
13627
13702
  }
13628
13703
  this.mutationCb({
13629
13704
  adds: [
13630
13705
  {
13631
- parentId,
13706
+ parentId: iframeId,
13632
13707
  nextId: null,
13633
13708
  node: content
13634
13709
  }
@@ -13651,6 +13726,9 @@ class IframeManager {
13651
13726
  this.crossOriginIframeMirror.reset();
13652
13727
  this.crossOriginIframeStyleMirror.reset();
13653
13728
  this.attachedIframes.clear();
13729
+ this.crossOriginIframeMap = /* @__PURE__ */ new WeakMap();
13730
+ this.iframes = /* @__PURE__ */ new WeakMap();
13731
+ this.crossOriginIframeRootIdMap = /* @__PURE__ */ new WeakMap();
13654
13732
  }
13655
13733
  }
13656
13734
  class ShadowDomManager {
@@ -14603,6 +14681,11 @@ function record(options = {}) {
14603
14681
  }
14604
14682
  };
14605
14683
  const wrappedMutationEmit = (m) => {
14684
+ if (recordCrossOriginIframes && m.removes) {
14685
+ m.removes.forEach(({ id }) => {
14686
+ iframeManager.removeIframeById(id);
14687
+ });
14688
+ }
14606
14689
  wrappedEmit({
14607
14690
  type: EventType.IncrementalSnapshot,
14608
14691
  data: {
@@ -15321,9 +15404,9 @@ function t(t2, n2) {
15321
15404
  return a2;
15322
15405
  }
15323
15406
  var n;
15324
- !function(t2) {
15407
+ !(function(t2) {
15325
15408
  t2[t2.NotStarted = 0] = "NotStarted", t2[t2.Running = 1] = "Running", t2[t2.Stopped = 2] = "Stopped";
15326
- }(n || (n = {}));
15409
+ })(n || (n = {}));
15327
15410
  var e = { type: "xstate.init" };
15328
15411
  function r(t2) {
15329
15412
  return void 0 === t2 ? [] : [].concat(t2);
@@ -15347,45 +15430,45 @@ function c(t2, n2) {
15347
15430
  }
15348
15431
  function f(t2, n2, e2) {
15349
15432
  var r2 = n2, o2 = false;
15350
- return [t2.filter(function(t3) {
15433
+ return [t2.filter((function(t3) {
15351
15434
  if ("xstate.assign" === t3.type) {
15352
15435
  o2 = true;
15353
15436
  var n3 = Object.assign({}, r2);
15354
- return "function" == typeof t3.assignment ? n3 = t3.assignment(r2, e2) : Object.keys(t3.assignment).forEach(function(o3) {
15437
+ return "function" == typeof t3.assignment ? n3 = t3.assignment(r2, e2) : Object.keys(t3.assignment).forEach((function(o3) {
15355
15438
  n3[o3] = "function" == typeof t3.assignment[o3] ? t3.assignment[o3](r2, e2) : t3.assignment[o3];
15356
- }), r2 = n3, false;
15439
+ })), r2 = n3, false;
15357
15440
  }
15358
15441
  return true;
15359
- }), r2, o2];
15442
+ })), r2, o2];
15360
15443
  }
15361
15444
  function s(n2, o2) {
15362
15445
  void 0 === o2 && (o2 = {});
15363
- var s2 = t(f(r(n2.states[n2.initial].entry).map(function(t2) {
15446
+ var s2 = t(f(r(n2.states[n2.initial].entry).map((function(t2) {
15364
15447
  return i(t2, o2.actions);
15365
- }), n2.context, e), 2), l2 = s2[0], v2 = s2[1], y = { config: n2, _options: o2, initialState: { value: n2.initial, actions: l2, context: v2, matches: a(n2.initial) }, transition: function(e2, o3) {
15448
+ })), n2.context, e), 2), l2 = s2[0], v2 = s2[1], y = { config: n2, _options: o2, initialState: { value: n2.initial, actions: l2, context: v2, matches: a(n2.initial) }, transition: function(e2, o3) {
15366
15449
  var s3, l3, v3 = "string" == typeof e2 ? { value: e2, context: n2.context } : e2, p = v3.value, g = v3.context, d = u(o3), x = n2.states[p];
15367
15450
  if (x.on) {
15368
15451
  var m = r(x.on[d.type]);
15369
15452
  try {
15370
- for (var h = function(t2) {
15453
+ for (var h = (function(t2) {
15371
15454
  var n3 = "function" == typeof Symbol && Symbol.iterator, e3 = n3 && t2[n3], r2 = 0;
15372
15455
  if (e3) return e3.call(t2);
15373
15456
  if (t2 && "number" == typeof t2.length) return { next: function() {
15374
15457
  return t2 && r2 >= t2.length && (t2 = void 0), { value: t2 && t2[r2++], done: !t2 };
15375
15458
  } };
15376
15459
  throw new TypeError(n3 ? "Object is not iterable." : "Symbol.iterator is not defined.");
15377
- }(m), b = h.next(); !b.done; b = h.next()) {
15460
+ })(m), b = h.next(); !b.done; b = h.next()) {
15378
15461
  var S = b.value;
15379
15462
  if (void 0 === S) return c(p, g);
15380
15463
  var w = "string" == typeof S ? { target: S } : S, j = w.target, E = w.actions, R = void 0 === E ? [] : E, N = w.cond, O = void 0 === N ? function() {
15381
15464
  return true;
15382
15465
  } : N, _ = void 0 === j, k = null != j ? j : p, T = n2.states[k];
15383
15466
  if (O(g, d)) {
15384
- var q = t(f((_ ? r(R) : [].concat(x.exit, R, T.entry).filter(function(t2) {
15467
+ var q = t(f((_ ? r(R) : [].concat(x.exit, R, T.entry).filter((function(t2) {
15385
15468
  return t2;
15386
- })).map(function(t2) {
15469
+ }))).map((function(t2) {
15387
15470
  return i(t2, y._options.actions);
15388
- }), g, d), 3), z = q[0], A = q[1], B = q[2], C = null != j ? j : p;
15471
+ })), g, d), 3), z = q[0], A = q[1], B = q[2], C = null != j ? j : p;
15389
15472
  return { value: C, context: A, actions: z, changed: j !== p || z.length > 0 || B, matches: a(C) };
15390
15473
  }
15391
15474
  }
@@ -15404,16 +15487,16 @@ function s(n2, o2) {
15404
15487
  return y;
15405
15488
  }
15406
15489
  var l = function(t2, n2) {
15407
- return t2.actions.forEach(function(e2) {
15490
+ return t2.actions.forEach((function(e2) {
15408
15491
  var r2 = e2.exec;
15409
15492
  return r2 && r2(t2.context, n2);
15410
- });
15493
+ }));
15411
15494
  };
15412
15495
  function v(t2) {
15413
15496
  var r2 = t2.initialState, o2 = n.NotStarted, i2 = /* @__PURE__ */ new Set(), c2 = { _machine: t2, send: function(e2) {
15414
- o2 === n.Running && (r2 = t2.transition(r2, e2), l(r2, u(e2)), i2.forEach(function(t3) {
15497
+ o2 === n.Running && (r2 = t2.transition(r2, e2), l(r2, u(e2)), i2.forEach((function(t3) {
15415
15498
  return t3(r2);
15416
- }));
15499
+ })));
15417
15500
  }, subscribe: function(t3) {
15418
15501
  return i2.add(t3), t3(r2), { unsubscribe: function() {
15419
15502
  return i2.delete(t3);