@appsurify-testmap/rrweb-all 2.1.1-alpha.5 → 2.1.1-alpha.7

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.
@@ -111,10 +111,12 @@ function getUntaintedPrototype$1(key) {
111
111
  const iframeEl = document.createElement("iframe");
112
112
  document.body.appendChild(iframeEl);
113
113
  const win = iframeEl.contentWindow;
114
- if (!win) return defaultObj.prototype;
114
+ if (!win)
115
+ return defaultObj.prototype;
115
116
  const untaintedObject = win[key].prototype;
116
117
  document.body.removeChild(iframeEl);
117
- if (!untaintedObject) return defaultPrototype;
118
+ if (!untaintedObject)
119
+ return defaultPrototype;
118
120
  return untaintedBasePrototype$1[key] = untaintedObject;
119
121
  } catch (e2) {
120
122
  return defaultPrototype;
@@ -133,7 +135,8 @@ function getUntaintedAccessor$1(key, instance, accessor) {
133
135
  untaintedPrototype,
134
136
  accessor
135
137
  )) == null ? void 0 : _a2.get;
136
- if (!untaintedAccessor) return instance[accessor];
138
+ if (!untaintedAccessor)
139
+ return instance[accessor];
137
140
  untaintedAccessorCache$1[cacheKey] = untaintedAccessor;
138
141
  return untaintedAccessor.call(instance);
139
142
  }
@@ -146,7 +149,8 @@ function getUntaintedMethod$1(key, instance, method) {
146
149
  );
147
150
  const untaintedPrototype = getUntaintedPrototype$1(key);
148
151
  const untaintedMethod = untaintedPrototype[method];
149
- if (typeof untaintedMethod !== "function") return instance[method];
152
+ if (typeof untaintedMethod !== "function")
153
+ return instance[method];
150
154
  untaintedMethodCache$1[cacheKey] = untaintedMethod;
151
155
  return untaintedMethod.bind(instance);
152
156
  }
@@ -169,14 +173,16 @@ function getRootNode$1(n2) {
169
173
  return getUntaintedMethod$1("Node", n2, "getRootNode")();
170
174
  }
171
175
  function host$1(n2) {
172
- if (!n2 || !("host" in n2)) return null;
176
+ if (!n2 || !("host" in n2))
177
+ return null;
173
178
  return getUntaintedAccessor$1("ShadowRoot", n2, "host");
174
179
  }
175
180
  function styleSheets$1(n2) {
176
181
  return n2.styleSheets;
177
182
  }
178
183
  function shadowRoot$1(n2) {
179
- if (!n2 || !("shadowRoot" in n2)) return null;
184
+ if (!n2 || !("shadowRoot" in n2))
185
+ return null;
180
186
  return getUntaintedAccessor$1("Element", n2, "shadowRoot");
181
187
  }
182
188
  function querySelector$1(n2, selectors) {
@@ -294,7 +300,8 @@ function fixBrowserCompatibilityIssuesInCSS(cssText) {
294
300
  }
295
301
  function escapeImportStatement(rule2) {
296
302
  const { cssText } = rule2;
297
- if (cssText.split('"').length < 3) return cssText;
303
+ if (cssText.split('"').length < 3)
304
+ return cssText;
298
305
  const statement = ["@import", `url(${JSON.stringify(rule2.href)})`];
299
306
  if (rule2.layerName === "") {
300
307
  statement.push(`layer`);
@@ -371,7 +378,8 @@ class Mirror {
371
378
  }
372
379
  getId(n2) {
373
380
  var _a2;
374
- if (!n2) return -1;
381
+ if (!n2)
382
+ return -1;
375
383
  const id = (_a2 = this.getMeta(n2)) == null ? void 0 : _a2.id;
376
384
  return id != null ? id : -1;
377
385
  }
@@ -410,7 +418,8 @@ class Mirror {
410
418
  const oldNode = this.getNode(id);
411
419
  if (oldNode) {
412
420
  const meta = this.nodeMetaMap.get(oldNode);
413
- if (meta) this.nodeMetaMap.set(n2, meta);
421
+ if (meta)
422
+ this.nodeMetaMap.set(n2, meta);
414
423
  }
415
424
  this.idNodeMap.set(id, n2);
416
425
  }
@@ -447,7 +456,8 @@ function toLowerCase(str) {
447
456
  const ORIGINAL_ATTRIBUTE_NAME = "__rrweb_original__";
448
457
  function is2DCanvasBlank(canvas) {
449
458
  const ctx = canvas.getContext("2d");
450
- if (!ctx) return true;
459
+ if (!ctx)
460
+ return true;
451
461
  const chunkSize = 50;
452
462
  for (let x2 = 0; x2 < canvas.width; x2 += chunkSize) {
453
463
  for (let y = 0; y < canvas.height; y += chunkSize) {
@@ -463,13 +473,15 @@ function is2DCanvasBlank(canvas) {
463
473
  Math.min(chunkSize, canvas.height - y)
464
474
  ).data.buffer
465
475
  );
466
- if (pixelBuffer.some((pixel) => pixel !== 0)) return false;
476
+ if (pixelBuffer.some((pixel) => pixel !== 0))
477
+ return false;
467
478
  }
468
479
  }
469
480
  return true;
470
481
  }
471
482
  function isNodeMetaEqual(a2, b) {
472
- if (!a2 || !b || a2.type !== b.type) return false;
483
+ if (!a2 || !b || a2.type !== b.type)
484
+ return false;
473
485
  if (a2.type === NodeType$3.Document)
474
486
  return a2.compatMode === b.compatMode;
475
487
  else if (a2.type === NodeType$3.DocumentType)
@@ -661,7 +673,8 @@ function isSelectorUnique(selector, target) {
661
673
  }
662
674
  }
663
675
  function buildSelector(node2) {
664
- if (!(node2 instanceof Element)) return null;
676
+ if (!(node2 instanceof Element))
677
+ return null;
665
678
  if (node2.id) {
666
679
  return `#${CSS.escape(node2.id)}`;
667
680
  }
@@ -709,11 +722,15 @@ function buildXPath(node2) {
709
722
  if (element.id) {
710
723
  return `//*[@id="${CSS.escape(element.id)}"]`;
711
724
  }
712
- if (element.tagName.toLowerCase() === "html") return "/html";
713
- if (element === document.head) return "/html/head";
714
- if (element === document.body) return "/html/body";
725
+ if (element.tagName.toLowerCase() === "html")
726
+ return "/html";
727
+ if (element === document.head)
728
+ return "/html/head";
729
+ if (element === document.body)
730
+ return "/html/body";
715
731
  const parent = element.parentNode;
716
- if (!parent) return "";
732
+ if (!parent)
733
+ return "";
717
734
  const tag = element.tagName.toLowerCase();
718
735
  const siblings = Array.from(parent.children).filter(
719
736
  (el) => el.tagName.toLowerCase() === tag
@@ -725,7 +742,8 @@ function buildXPath(node2) {
725
742
  case Node.CDATA_SECTION_NODE:
726
743
  case Node.COMMENT_NODE: {
727
744
  const parent = node2.parentNode;
728
- if (!parent) return "";
745
+ if (!parent)
746
+ return "";
729
747
  const typeMap = {
730
748
  [Node.TEXT_NODE]: "text()",
731
749
  [Node.CDATA_SECTION_NODE]: "text()",
@@ -1016,9 +1034,11 @@ function _isBlockedElement(element, blockClass, blockSelector) {
1016
1034
  return false;
1017
1035
  }
1018
1036
  function classMatchesRegex(node2, regex, checkAncestors) {
1019
- if (!node2) return false;
1037
+ if (!node2)
1038
+ return false;
1020
1039
  if (node2.nodeType !== node2.ELEMENT_NODE) {
1021
- if (!checkAncestors) return false;
1040
+ if (!checkAncestors)
1041
+ return false;
1022
1042
  return classMatchesRegex(index$1.parentNode(node2), regex, checkAncestors);
1023
1043
  }
1024
1044
  for (let eIndex = node2.classList.length; eIndex--; ) {
@@ -1027,7 +1047,8 @@ function classMatchesRegex(node2, regex, checkAncestors) {
1027
1047
  return true;
1028
1048
  }
1029
1049
  }
1030
- if (!checkAncestors) return false;
1050
+ if (!checkAncestors)
1051
+ return false;
1031
1052
  return classMatchesRegex(index$1.parentNode(node2), regex, checkAncestors);
1032
1053
  }
1033
1054
  function needMaskingText(node2, maskTextClass, maskTextSelector, checkAncestors) {
@@ -1045,18 +1066,23 @@ function needMaskingText(node2, maskTextClass, maskTextSelector, checkAncestors)
1045
1066
  try {
1046
1067
  if (typeof maskTextClass === "string") {
1047
1068
  if (checkAncestors) {
1048
- if (el.closest(`.${maskTextClass}`)) return true;
1069
+ if (el.closest(`.${maskTextClass}`))
1070
+ return true;
1049
1071
  } else {
1050
- if (el.classList.contains(maskTextClass)) return true;
1072
+ if (el.classList.contains(maskTextClass))
1073
+ return true;
1051
1074
  }
1052
1075
  } else {
1053
- if (classMatchesRegex(el, maskTextClass, checkAncestors)) return true;
1076
+ if (classMatchesRegex(el, maskTextClass, checkAncestors))
1077
+ return true;
1054
1078
  }
1055
1079
  if (maskTextSelector) {
1056
1080
  if (checkAncestors) {
1057
- if (el.closest(maskTextSelector)) return true;
1081
+ if (el.closest(maskTextSelector))
1082
+ return true;
1058
1083
  } else {
1059
- if (el.matches(maskTextSelector)) return true;
1084
+ if (el.matches(maskTextSelector))
1085
+ return true;
1060
1086
  }
1061
1087
  }
1062
1088
  } catch (e2) {
@@ -1104,7 +1130,8 @@ function onceStylesheetLoaded(link, listener, styleSheetLoadTimeout) {
1104
1130
  } catch (error) {
1105
1131
  return;
1106
1132
  }
1107
- if (styleSheetLoaded) return;
1133
+ if (styleSheetLoaded)
1134
+ return;
1108
1135
  const timer = setTimeout(() => {
1109
1136
  if (!fired) {
1110
1137
  listener();
@@ -1201,7 +1228,8 @@ function serializeNode(n2, options) {
1201
1228
  }
1202
1229
  }
1203
1230
  function getRootId(doc, mirror2) {
1204
- if (!mirror2.hasNode(doc)) return void 0;
1231
+ if (!mirror2.hasNode(doc))
1232
+ return void 0;
1205
1233
  const docId = mirror2.getId(doc);
1206
1234
  return docId === 1 ? void 0 : docId;
1207
1235
  }
@@ -1362,7 +1390,8 @@ function serializeElementNode(n2, options) {
1362
1390
  image.crossOrigin = "anonymous";
1363
1391
  if (image.complete && image.naturalWidth !== 0)
1364
1392
  recordInlineImage();
1365
- else image.addEventListener("load", recordInlineImage);
1393
+ else
1394
+ image.addEventListener("load", recordInlineImage);
1366
1395
  return;
1367
1396
  } else {
1368
1397
  console.warn(
@@ -1374,8 +1403,10 @@ function serializeElementNode(n2, options) {
1374
1403
  priorCrossOrigin ? attributes.crossOrigin = priorCrossOrigin : image.removeAttribute("crossorigin");
1375
1404
  }
1376
1405
  };
1377
- if (image.complete && image.naturalWidth !== 0) recordInlineImage();
1378
- else image.addEventListener("load", recordInlineImage);
1406
+ if (image.complete && image.naturalWidth !== 0)
1407
+ recordInlineImage();
1408
+ else
1409
+ image.addEventListener("load", recordInlineImage);
1379
1410
  }
1380
1411
  if (tagName === "audio" || tagName === "video") {
1381
1412
  const mediaAttributes = attributes;
@@ -1410,7 +1441,8 @@ function serializeElementNode(n2, options) {
1410
1441
  }
1411
1442
  let isCustomElement;
1412
1443
  try {
1413
- if (customElements.get(tagName)) isCustomElement = true;
1444
+ if (customElements.get(tagName))
1445
+ isCustomElement = true;
1414
1446
  } catch (e2) {
1415
1447
  }
1416
1448
  return {
@@ -1594,7 +1626,8 @@ function serializeNodeWithId(n2, options) {
1594
1626
  keepIframeSrcFn,
1595
1627
  cssCaptured: false
1596
1628
  };
1597
- if (serializedNode.type === NodeType$3.Element && serializedNode.tagName === "textarea" && serializedNode.attributes.value !== void 0) ;
1629
+ if (serializedNode.type === NodeType$3.Element && serializedNode.tagName === "textarea" && serializedNode.attributes.value !== void 0)
1630
+ ;
1598
1631
  else {
1599
1632
  if (serializedNode.type === NodeType$3.Element && serializedNode.attributes._cssText !== void 0 && typeof serializedNode.attributes._cssText === "string") {
1600
1633
  bypassOptions.cssCaptured = true;
@@ -1833,7 +1866,8 @@ function getDefaultExportFromCjs$1(x2) {
1833
1866
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
1834
1867
  }
1835
1868
  function getAugmentedNamespace$1(n2) {
1836
- if (n2.__esModule) return n2;
1869
+ if (n2.__esModule)
1870
+ return n2;
1837
1871
  var f2 = n2.default;
1838
1872
  if (typeof f2 == "function") {
1839
1873
  var a2 = function a22() {
@@ -1843,7 +1877,8 @@ function getAugmentedNamespace$1(n2) {
1843
1877
  return f2.apply(this, arguments);
1844
1878
  };
1845
1879
  a2.prototype = f2.prototype;
1846
- } else a2 = {};
1880
+ } else
1881
+ a2 = {};
1847
1882
  Object.defineProperty(a2, "__esModule", { value: true });
1848
1883
  Object.keys(n2).forEach(function(k) {
1849
1884
  var d = Object.getOwnPropertyDescriptor(n2, k);
@@ -1911,11 +1946,14 @@ let CssSyntaxError$3$1 = class CssSyntaxError extends Error {
1911
1946
  this.message += ": " + this.reason;
1912
1947
  }
1913
1948
  showSourceCode(color) {
1914
- if (!this.source) return "";
1949
+ if (!this.source)
1950
+ return "";
1915
1951
  let css = this.source;
1916
- if (color == null) color = pico$1.isColorSupported;
1952
+ if (color == null)
1953
+ color = pico$1.isColorSupported;
1917
1954
  if (terminalHighlight$1$1) {
1918
- if (color) css = terminalHighlight$1$1(css);
1955
+ if (color)
1956
+ css = terminalHighlight$1$1(css);
1919
1957
  }
1920
1958
  let lines = css.split(/\r?\n/);
1921
1959
  let start = Math.max(this.line - 3, 0);
@@ -2008,7 +2046,8 @@ let Stringifier$2$1 = class Stringifier {
2008
2046
  if (value.includes("\n")) {
2009
2047
  let indent = this.raw(node2, null, "indent");
2010
2048
  if (indent.length) {
2011
- for (let step = 0; step < depth; step++) value += indent;
2049
+ for (let step = 0; step < depth; step++)
2050
+ value += indent;
2012
2051
  }
2013
2052
  }
2014
2053
  return value;
@@ -2023,20 +2062,23 @@ let Stringifier$2$1 = class Stringifier {
2023
2062
  } else {
2024
2063
  after = this.raw(node2, "after", "emptyBody");
2025
2064
  }
2026
- if (after) this.builder(after);
2065
+ if (after)
2066
+ this.builder(after);
2027
2067
  this.builder("}", node2, "end");
2028
2068
  }
2029
2069
  body(node2) {
2030
2070
  let last = node2.nodes.length - 1;
2031
2071
  while (last > 0) {
2032
- if (node2.nodes[last].type !== "comment") break;
2072
+ if (node2.nodes[last].type !== "comment")
2073
+ break;
2033
2074
  last -= 1;
2034
2075
  }
2035
2076
  let semicolon = this.raw(node2, "semicolon");
2036
2077
  for (let i2 = 0; i2 < node2.nodes.length; i2++) {
2037
2078
  let child = node2.nodes[i2];
2038
2079
  let before = this.raw(child, "before");
2039
- if (before) this.builder(before);
2080
+ if (before)
2081
+ this.builder(before);
2040
2082
  this.stringify(child, last !== i2 || semicolon);
2041
2083
  }
2042
2084
  }
@@ -2051,7 +2093,8 @@ let Stringifier$2$1 = class Stringifier {
2051
2093
  if (node2.important) {
2052
2094
  string += node2.raws.important || " !important";
2053
2095
  }
2054
- if (semicolon) string += ";";
2096
+ if (semicolon)
2097
+ string += ";";
2055
2098
  this.builder(string, node2);
2056
2099
  }
2057
2100
  document(node2) {
@@ -2059,10 +2102,12 @@ let Stringifier$2$1 = class Stringifier {
2059
2102
  }
2060
2103
  raw(node2, own, detect) {
2061
2104
  let value;
2062
- if (!detect) detect = own;
2105
+ if (!detect)
2106
+ detect = own;
2063
2107
  if (own) {
2064
2108
  value = node2.raws[own];
2065
- if (typeof value !== "undefined") return value;
2109
+ if (typeof value !== "undefined")
2110
+ return value;
2066
2111
  }
2067
2112
  let parent = node2.parent;
2068
2113
  if (detect === "before") {
@@ -2073,9 +2118,11 @@ let Stringifier$2$1 = class Stringifier {
2073
2118
  return "";
2074
2119
  }
2075
2120
  }
2076
- if (!parent) return DEFAULT_RAW$1[detect];
2121
+ if (!parent)
2122
+ return DEFAULT_RAW$1[detect];
2077
2123
  let root2 = node2.root();
2078
- if (!root2.rawCache) root2.rawCache = {};
2124
+ if (!root2.rawCache)
2125
+ root2.rawCache = {};
2079
2126
  if (typeof root2.rawCache[detect] !== "undefined") {
2080
2127
  return root2.rawCache[detect];
2081
2128
  }
@@ -2088,11 +2135,13 @@ let Stringifier$2$1 = class Stringifier {
2088
2135
  } else {
2089
2136
  root2.walk((i2) => {
2090
2137
  value = i2.raws[own];
2091
- if (typeof value !== "undefined") return false;
2138
+ if (typeof value !== "undefined")
2139
+ return false;
2092
2140
  });
2093
2141
  }
2094
2142
  }
2095
- if (typeof value === "undefined") value = DEFAULT_RAW$1[detect];
2143
+ if (typeof value === "undefined")
2144
+ value = DEFAULT_RAW$1[detect];
2096
2145
  root2.rawCache[detect] = value;
2097
2146
  return value;
2098
2147
  }
@@ -2109,7 +2158,8 @@ let Stringifier$2$1 = class Stringifier {
2109
2158
  }
2110
2159
  }
2111
2160
  });
2112
- if (value) value = value.replace(/\S/g, "");
2161
+ if (value)
2162
+ value = value.replace(/\S/g, "");
2113
2163
  return value;
2114
2164
  }
2115
2165
  rawBeforeComment(root2, node2) {
@@ -2153,7 +2203,8 @@ let Stringifier$2$1 = class Stringifier {
2153
2203
  root2.walk((i2) => {
2154
2204
  if (i2.type !== "decl") {
2155
2205
  value = i2.raws.between;
2156
- if (typeof value !== "undefined") return false;
2206
+ if (typeof value !== "undefined")
2207
+ return false;
2157
2208
  }
2158
2209
  });
2159
2210
  return value;
@@ -2171,7 +2222,8 @@ let Stringifier$2$1 = class Stringifier {
2171
2222
  }
2172
2223
  }
2173
2224
  });
2174
- if (value) value = value.replace(/\S/g, "");
2225
+ if (value)
2226
+ value = value.replace(/\S/g, "");
2175
2227
  return value;
2176
2228
  }
2177
2229
  rawColon(root2) {
@@ -2189,13 +2241,15 @@ let Stringifier$2$1 = class Stringifier {
2189
2241
  root2.walk((i2) => {
2190
2242
  if (i2.nodes && i2.nodes.length === 0) {
2191
2243
  value = i2.raws.after;
2192
- if (typeof value !== "undefined") return false;
2244
+ if (typeof value !== "undefined")
2245
+ return false;
2193
2246
  }
2194
2247
  });
2195
2248
  return value;
2196
2249
  }
2197
2250
  rawIndent(root2) {
2198
- if (root2.raws.indent) return root2.raws.indent;
2251
+ if (root2.raws.indent)
2252
+ return root2.raws.indent;
2199
2253
  let value;
2200
2254
  root2.walk((i2) => {
2201
2255
  let p = i2.parent;
@@ -2215,7 +2269,8 @@ let Stringifier$2$1 = class Stringifier {
2215
2269
  root2.walk((i2) => {
2216
2270
  if (i2.nodes && i2.nodes.length && i2.last.type === "decl") {
2217
2271
  value = i2.raws.semicolon;
2218
- if (typeof value !== "undefined") return false;
2272
+ if (typeof value !== "undefined")
2273
+ return false;
2219
2274
  }
2220
2275
  });
2221
2276
  return value;
@@ -2230,7 +2285,8 @@ let Stringifier$2$1 = class Stringifier {
2230
2285
  }
2231
2286
  root(node2) {
2232
2287
  this.body(node2);
2233
- if (node2.raws.after) this.builder(node2.raws.after);
2288
+ if (node2.raws.after)
2289
+ this.builder(node2.raws.after);
2234
2290
  }
2235
2291
  rule(node2) {
2236
2292
  this.block(node2, this.rawValue(node2, "selector"));
@@ -2266,17 +2322,20 @@ function cloneNode$1(obj, parent) {
2266
2322
  if (!Object.prototype.hasOwnProperty.call(obj, i2)) {
2267
2323
  continue;
2268
2324
  }
2269
- if (i2 === "proxyCache") continue;
2325
+ if (i2 === "proxyCache")
2326
+ continue;
2270
2327
  let value = obj[i2];
2271
2328
  let type = typeof value;
2272
2329
  if (i2 === "parent" && type === "object") {
2273
- if (parent) cloned[i2] = parent;
2330
+ if (parent)
2331
+ cloned[i2] = parent;
2274
2332
  } else if (i2 === "source") {
2275
2333
  cloned[i2] = value;
2276
2334
  } else if (Array.isArray(value)) {
2277
2335
  cloned[i2] = value.map((j) => cloneNode$1(j, cloned));
2278
2336
  } else {
2279
- if (type === "object" && value !== null) value = cloneNode$1(value);
2337
+ if (type === "object" && value !== null)
2338
+ value = cloneNode$1(value);
2280
2339
  cloned[i2] = value;
2281
2340
  }
2282
2341
  }
@@ -2330,7 +2389,8 @@ let Node$5$1 = class Node2 {
2330
2389
  cleanRaws(keepBetween) {
2331
2390
  delete this.raws.before;
2332
2391
  delete this.raws.after;
2333
- if (!keepBetween) delete this.raws.between;
2392
+ if (!keepBetween)
2393
+ delete this.raws.between;
2334
2394
  }
2335
2395
  clone(overrides = {}) {
2336
2396
  let cloned = cloneNode$1(this);
@@ -2373,7 +2433,8 @@ let Node$5$1 = class Node2 {
2373
2433
  }
2374
2434
  },
2375
2435
  set(node2, prop, value) {
2376
- if (node2[prop] === value) return true;
2436
+ if (node2[prop] === value)
2437
+ return true;
2377
2438
  node2[prop] = value;
2378
2439
  if (prop === "prop" || prop === "value" || prop === "name" || prop === "params" || prop === "important" || /* c8 ignore next */
2379
2440
  prop === "text") {
@@ -2393,7 +2454,8 @@ let Node$5$1 = class Node2 {
2393
2454
  }
2394
2455
  }
2395
2456
  next() {
2396
- if (!this.parent) return void 0;
2457
+ if (!this.parent)
2458
+ return void 0;
2397
2459
  let index2 = this.parent.index(this);
2398
2460
  return this.parent.nodes[index2 + 1];
2399
2461
  }
@@ -2404,7 +2466,8 @@ let Node$5$1 = class Node2 {
2404
2466
  } else if (opts.word) {
2405
2467
  stringRepresentation = this.toString();
2406
2468
  let index2 = stringRepresentation.indexOf(opts.word);
2407
- if (index2 !== -1) pos = this.positionInside(index2, stringRepresentation);
2469
+ if (index2 !== -1)
2470
+ pos = this.positionInside(index2, stringRepresentation);
2408
2471
  }
2409
2472
  return pos;
2410
2473
  }
@@ -2423,7 +2486,8 @@ let Node$5$1 = class Node2 {
2423
2486
  return { column, line };
2424
2487
  }
2425
2488
  prev() {
2426
- if (!this.parent) return void 0;
2489
+ if (!this.parent)
2490
+ return void 0;
2427
2491
  let index2 = this.parent.index(this);
2428
2492
  return this.parent.nodes[index2 - 1];
2429
2493
  }
@@ -2518,7 +2582,8 @@ let Node$5$1 = class Node2 {
2518
2582
  if (!Object.prototype.hasOwnProperty.call(this, name)) {
2519
2583
  continue;
2520
2584
  }
2521
- if (name === "parent" || name === "proxyCache") continue;
2585
+ if (name === "parent" || name === "proxyCache")
2586
+ continue;
2522
2587
  let value = this[name];
2523
2588
  if (Array.isArray(value)) {
2524
2589
  fixed[name] = value.map((i2) => {
@@ -2558,7 +2623,8 @@ let Node$5$1 = class Node2 {
2558
2623
  return this.proxyCache;
2559
2624
  }
2560
2625
  toString(stringifier2 = stringify$3$1) {
2561
- if (stringifier2.stringify) stringifier2 = stringifier2.stringify;
2626
+ if (stringifier2.stringify)
2627
+ stringifier2 = stringifier2.stringify;
2562
2628
  let result2 = "";
2563
2629
  stringifier2(this, (i2) => {
2564
2630
  result2 += i2;
@@ -2567,7 +2633,8 @@ let Node$5$1 = class Node2 {
2567
2633
  }
2568
2634
  warn(result2, text, opts) {
2569
2635
  let data = { node: this };
2570
- for (let i2 in opts) data[i2] = opts[i2];
2636
+ for (let i2 in opts)
2637
+ data[i2] = opts[i2];
2571
2638
  return result2.warn(text, data);
2572
2639
  }
2573
2640
  get proxyOf() {
@@ -2623,7 +2690,8 @@ function fromBase64$1(str) {
2623
2690
  }
2624
2691
  let PreviousMap$2$1 = class PreviousMap {
2625
2692
  constructor(css, opts) {
2626
- if (opts.map === false) return;
2693
+ if (opts.map === false)
2694
+ return;
2627
2695
  this.loadAnnotation(css);
2628
2696
  this.inline = this.startWith(this.annotation, "data:");
2629
2697
  let prev = opts.map ? opts.map.prev : void 0;
@@ -2631,8 +2699,10 @@ let PreviousMap$2$1 = class PreviousMap {
2631
2699
  if (!this.mapFile && opts.from) {
2632
2700
  this.mapFile = opts.from;
2633
2701
  }
2634
- if (this.mapFile) this.root = dirname$1$1(this.mapFile);
2635
- if (text) this.text = text;
2702
+ if (this.mapFile)
2703
+ this.root = dirname$1$1(this.mapFile);
2704
+ if (text)
2705
+ this.text = text;
2636
2706
  }
2637
2707
  consumer() {
2638
2708
  if (!this.consumerCache) {
@@ -2658,12 +2728,14 @@ let PreviousMap$2$1 = class PreviousMap {
2658
2728
  return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, "").trim();
2659
2729
  }
2660
2730
  isMap(map) {
2661
- if (typeof map !== "object") return false;
2731
+ if (typeof map !== "object")
2732
+ return false;
2662
2733
  return typeof map.mappings === "string" || typeof map._mappings === "string" || Array.isArray(map.sections);
2663
2734
  }
2664
2735
  loadAnnotation(css) {
2665
2736
  let comments = css.match(/\/\*\s*# sourceMappingURL=/gm);
2666
- if (!comments) return;
2737
+ if (!comments)
2738
+ return;
2667
2739
  let start = css.lastIndexOf(comments.pop());
2668
2740
  let end = css.indexOf("*/", start);
2669
2741
  if (start > -1 && end > -1) {
@@ -2678,7 +2750,8 @@ let PreviousMap$2$1 = class PreviousMap {
2678
2750
  }
2679
2751
  }
2680
2752
  loadMap(file, prev) {
2681
- if (prev === false) return false;
2753
+ if (prev === false)
2754
+ return false;
2682
2755
  if (prev) {
2683
2756
  if (typeof prev === "string") {
2684
2757
  return prev;
@@ -2708,12 +2781,14 @@ let PreviousMap$2$1 = class PreviousMap {
2708
2781
  return this.decodeInline(this.annotation);
2709
2782
  } else if (this.annotation) {
2710
2783
  let map = this.annotation;
2711
- if (file) map = join$1(dirname$1$1(file), map);
2784
+ if (file)
2785
+ map = join$1(dirname$1$1(file), map);
2712
2786
  return this.loadFile(map);
2713
2787
  }
2714
2788
  }
2715
2789
  startWith(string, start) {
2716
- if (!string) return false;
2790
+ if (!string)
2791
+ return false;
2717
2792
  return string.substr(0, start.length) === start;
2718
2793
  }
2719
2794
  withContent() {
@@ -2756,13 +2831,15 @@ let Input$4$1 = class Input {
2756
2831
  if (map.text) {
2757
2832
  this.map = map;
2758
2833
  let file = map.consumer().file;
2759
- if (!this.file && file) this.file = this.mapResolve(file);
2834
+ if (!this.file && file)
2835
+ this.file = this.mapResolve(file);
2760
2836
  }
2761
2837
  }
2762
2838
  if (!this.file) {
2763
2839
  this.id = "<input css " + nanoid$2(6) + ">";
2764
2840
  }
2765
- if (this.map) this.map.file = this.from;
2841
+ if (this.map)
2842
+ this.map.file = this.from;
2766
2843
  }
2767
2844
  error(message, line, column, opts = {}) {
2768
2845
  let result2, endLine, endColumn;
@@ -2864,10 +2941,12 @@ let Input$4$1 = class Input {
2864
2941
  return resolve$1$1(this.map.consumer().sourceRoot || this.map.root || ".", file);
2865
2942
  }
2866
2943
  origin(line, column, endLine, endColumn) {
2867
- if (!this.map) return false;
2944
+ if (!this.map)
2945
+ return false;
2868
2946
  let consumer = this.map.consumer();
2869
2947
  let from = consumer.originalPositionFor({ column, line });
2870
- if (!from.source) return false;
2948
+ if (!from.source)
2949
+ return false;
2871
2950
  let to;
2872
2951
  if (typeof endLine === "number") {
2873
2952
  to = consumer.originalPositionFor({ column: endColumn, line: endLine });
@@ -2896,7 +2975,8 @@ let Input$4$1 = class Input {
2896
2975
  }
2897
2976
  }
2898
2977
  let source = consumer.sourceContentFor(from.source);
2899
- if (source) result2.source = source;
2978
+ if (source)
2979
+ result2.source = source;
2900
2980
  return result2;
2901
2981
  }
2902
2982
  toJSON() {
@@ -2954,7 +3034,8 @@ let MapGenerator$2$1 = class MapGenerator {
2954
3034
  content = this.outputFile() + ".map";
2955
3035
  }
2956
3036
  let eol = "\n";
2957
- if (this.css.includes("\r\n")) eol = "\r\n";
3037
+ if (this.css.includes("\r\n"))
3038
+ eol = "\r\n";
2958
3039
  this.css += eol + "/*# sourceMappingURL=" + content + " */";
2959
3040
  }
2960
3041
  applyPrevMaps() {
@@ -2974,12 +3055,14 @@ let MapGenerator$2$1 = class MapGenerator {
2974
3055
  }
2975
3056
  }
2976
3057
  clearAnnotation() {
2977
- if (this.mapOpts.annotation === false) return;
3058
+ if (this.mapOpts.annotation === false)
3059
+ return;
2978
3060
  if (this.root) {
2979
3061
  let node2;
2980
3062
  for (let i2 = this.root.nodes.length - 1; i2 >= 0; i2--) {
2981
3063
  node2 = this.root.nodes[i2];
2982
- if (node2.type !== "comment") continue;
3064
+ if (node2.type !== "comment")
3065
+ continue;
2983
3066
  if (node2.text.indexOf("# sourceMappingURL=") === 0) {
2984
3067
  this.root.removeChild(i2);
2985
3068
  }
@@ -3020,9 +3103,12 @@ let MapGenerator$2$1 = class MapGenerator {
3020
3103
  source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>"
3021
3104
  });
3022
3105
  }
3023
- if (this.isSourcesContent()) this.setSourcesContent();
3024
- if (this.root && this.previous().length > 0) this.applyPrevMaps();
3025
- if (this.isAnnotation()) this.addAnnotation();
3106
+ if (this.isSourcesContent())
3107
+ this.setSourcesContent();
3108
+ if (this.root && this.previous().length > 0)
3109
+ this.applyPrevMaps();
3110
+ if (this.isAnnotation())
3111
+ this.addAnnotation();
3026
3112
  if (this.isInline()) {
3027
3113
  return [this.css];
3028
3114
  } else {
@@ -3142,11 +3228,15 @@ let MapGenerator$2$1 = class MapGenerator {
3142
3228
  }
3143
3229
  }
3144
3230
  path(file) {
3145
- if (this.mapOpts.absolute) return file;
3146
- if (file.charCodeAt(0) === 60) return file;
3147
- if (/^\w+:\/\//.test(file)) return file;
3231
+ if (this.mapOpts.absolute)
3232
+ return file;
3233
+ if (file.charCodeAt(0) === 60)
3234
+ return file;
3235
+ if (/^\w+:\/\//.test(file))
3236
+ return file;
3148
3237
  let cached = this.memoizedPaths.get(file);
3149
- if (cached) return cached;
3238
+ if (cached)
3239
+ return cached;
3150
3240
  let from = this.opts.to ? dirname$2(this.opts.to) : ".";
3151
3241
  if (typeof this.mapOpts.annotation === "string") {
3152
3242
  from = dirname$2(resolve$2(from, this.mapOpts.annotation));
@@ -3169,7 +3259,8 @@ let MapGenerator$2$1 = class MapGenerator {
3169
3259
  });
3170
3260
  } else {
3171
3261
  let input2 = new Input$3$1(this.originalCSS, this.opts);
3172
- if (input2.map) this.previousMaps.push(input2.map);
3262
+ if (input2.map)
3263
+ this.previousMaps.push(input2.map);
3173
3264
  }
3174
3265
  }
3175
3266
  return this.previousMaps;
@@ -3210,7 +3301,8 @@ let MapGenerator$2$1 = class MapGenerator {
3210
3301
  }
3211
3302
  toFileUrl(path) {
3212
3303
  let cached = this.memoizedFileURLs.get(path);
3213
- if (cached) return cached;
3304
+ if (cached)
3305
+ return cached;
3214
3306
  if (pathToFileURL$2) {
3215
3307
  let fileURL = pathToFileURL$2(path).toString();
3216
3308
  this.memoizedFileURLs.set(path, fileURL);
@@ -3223,7 +3315,8 @@ let MapGenerator$2$1 = class MapGenerator {
3223
3315
  }
3224
3316
  toUrl(path) {
3225
3317
  let cached = this.memoizedURLs.get(path);
3226
- if (cached) return cached;
3318
+ if (cached)
3319
+ return cached;
3227
3320
  if (sep$1 === "\\") {
3228
3321
  path = path.replace(/\\/g, "/");
3229
3322
  }
@@ -3252,7 +3345,8 @@ let AtRule$4$1;
3252
3345
  let Root$6$1;
3253
3346
  function cleanSource$1(nodes) {
3254
3347
  return nodes.map((i2) => {
3255
- if (i2.nodes) i2.nodes = cleanSource$1(i2.nodes);
3348
+ if (i2.nodes)
3349
+ i2.nodes = cleanSource$1(i2.nodes);
3256
3350
  delete i2.source;
3257
3351
  return i2;
3258
3352
  });
@@ -3269,7 +3363,8 @@ let Container$7$1 = class Container extends Node$2$1 {
3269
3363
  append(...children) {
3270
3364
  for (let child of children) {
3271
3365
  let nodes = this.normalize(child, this.last);
3272
- for (let node2 of nodes) this.proxyOf.nodes.push(node2);
3366
+ for (let node2 of nodes)
3367
+ this.proxyOf.nodes.push(node2);
3273
3368
  }
3274
3369
  this.markDirty();
3275
3370
  return this;
@@ -3277,17 +3372,20 @@ let Container$7$1 = class Container extends Node$2$1 {
3277
3372
  cleanRaws(keepBetween) {
3278
3373
  super.cleanRaws(keepBetween);
3279
3374
  if (this.nodes) {
3280
- for (let node2 of this.nodes) node2.cleanRaws(keepBetween);
3375
+ for (let node2 of this.nodes)
3376
+ node2.cleanRaws(keepBetween);
3281
3377
  }
3282
3378
  }
3283
3379
  each(callback) {
3284
- if (!this.proxyOf.nodes) return void 0;
3380
+ if (!this.proxyOf.nodes)
3381
+ return void 0;
3285
3382
  let iterator = this.getIterator();
3286
3383
  let index2, result2;
3287
3384
  while (this.indexes[iterator] < this.proxyOf.nodes.length) {
3288
3385
  index2 = this.indexes[iterator];
3289
3386
  result2 = callback(this.proxyOf.nodes[index2], index2);
3290
- if (result2 === false) break;
3387
+ if (result2 === false)
3388
+ break;
3291
3389
  this.indexes[iterator] += 1;
3292
3390
  }
3293
3391
  delete this.indexes[iterator];
@@ -3297,8 +3395,10 @@ let Container$7$1 = class Container extends Node$2$1 {
3297
3395
  return this.nodes.every(condition);
3298
3396
  }
3299
3397
  getIterator() {
3300
- if (!this.lastEach) this.lastEach = 0;
3301
- if (!this.indexes) this.indexes = {};
3398
+ if (!this.lastEach)
3399
+ this.lastEach = 0;
3400
+ if (!this.indexes)
3401
+ this.indexes = {};
3302
3402
  this.lastEach += 1;
3303
3403
  let iterator = this.lastEach;
3304
3404
  this.indexes[iterator] = 0;
@@ -3340,7 +3440,8 @@ let Container$7$1 = class Container extends Node$2$1 {
3340
3440
  }
3341
3441
  },
3342
3442
  set(node2, prop, value) {
3343
- if (node2[prop] === value) return true;
3443
+ if (node2[prop] === value)
3444
+ return true;
3344
3445
  node2[prop] = value;
3345
3446
  if (prop === "name" || prop === "params" || prop === "selector") {
3346
3447
  node2.markDirty();
@@ -3350,15 +3451,18 @@ let Container$7$1 = class Container extends Node$2$1 {
3350
3451
  };
3351
3452
  }
3352
3453
  index(child) {
3353
- if (typeof child === "number") return child;
3354
- if (child.proxyOf) child = child.proxyOf;
3454
+ if (typeof child === "number")
3455
+ return child;
3456
+ if (child.proxyOf)
3457
+ child = child.proxyOf;
3355
3458
  return this.proxyOf.nodes.indexOf(child);
3356
3459
  }
3357
3460
  insertAfter(exist, add) {
3358
3461
  let existIndex = this.index(exist);
3359
3462
  let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse();
3360
3463
  existIndex = this.index(exist);
3361
- for (let node2 of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node2);
3464
+ for (let node2 of nodes)
3465
+ this.proxyOf.nodes.splice(existIndex + 1, 0, node2);
3362
3466
  let index2;
3363
3467
  for (let id in this.indexes) {
3364
3468
  index2 = this.indexes[id];
@@ -3374,7 +3478,8 @@ let Container$7$1 = class Container extends Node$2$1 {
3374
3478
  let type = existIndex === 0 ? "prepend" : false;
3375
3479
  let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse();
3376
3480
  existIndex = this.index(exist);
3377
- for (let node2 of nodes) this.proxyOf.nodes.splice(existIndex, 0, node2);
3481
+ for (let node2 of nodes)
3482
+ this.proxyOf.nodes.splice(existIndex, 0, node2);
3378
3483
  let index2;
3379
3484
  for (let id in this.indexes) {
3380
3485
  index2 = this.indexes[id];
@@ -3393,12 +3498,14 @@ let Container$7$1 = class Container extends Node$2$1 {
3393
3498
  } else if (Array.isArray(nodes)) {
3394
3499
  nodes = nodes.slice(0);
3395
3500
  for (let i2 of nodes) {
3396
- if (i2.parent) i2.parent.removeChild(i2, "ignore");
3501
+ if (i2.parent)
3502
+ i2.parent.removeChild(i2, "ignore");
3397
3503
  }
3398
3504
  } else if (nodes.type === "root" && this.type !== "document") {
3399
3505
  nodes = nodes.nodes.slice(0);
3400
3506
  for (let i2 of nodes) {
3401
- if (i2.parent) i2.parent.removeChild(i2, "ignore");
3507
+ if (i2.parent)
3508
+ i2.parent.removeChild(i2, "ignore");
3402
3509
  }
3403
3510
  } else if (nodes.type) {
3404
3511
  nodes = [nodes];
@@ -3419,10 +3526,13 @@ let Container$7$1 = class Container extends Node$2$1 {
3419
3526
  throw new Error("Unknown node type in node creation");
3420
3527
  }
3421
3528
  let processed = nodes.map((i2) => {
3422
- if (!i2[my$1$1]) Container.rebuild(i2);
3529
+ if (!i2[my$1$1])
3530
+ Container.rebuild(i2);
3423
3531
  i2 = i2.proxyOf;
3424
- if (i2.parent) i2.parent.removeChild(i2);
3425
- if (i2[isClean$1$1]) markDirtyUp$1(i2);
3532
+ if (i2.parent)
3533
+ i2.parent.removeChild(i2);
3534
+ if (i2[isClean$1$1])
3535
+ markDirtyUp$1(i2);
3426
3536
  if (typeof i2.raws.before === "undefined") {
3427
3537
  if (sample && typeof sample.raws.before !== "undefined") {
3428
3538
  i2.raws.before = sample.raws.before.replace(/\S/g, "");
@@ -3437,7 +3547,8 @@ let Container$7$1 = class Container extends Node$2$1 {
3437
3547
  children = children.reverse();
3438
3548
  for (let child of children) {
3439
3549
  let nodes = this.normalize(child, this.first, "prepend").reverse();
3440
- for (let node2 of nodes) this.proxyOf.nodes.unshift(node2);
3550
+ for (let node2 of nodes)
3551
+ this.proxyOf.nodes.unshift(node2);
3441
3552
  for (let id in this.indexes) {
3442
3553
  this.indexes[id] = this.indexes[id] + nodes.length;
3443
3554
  }
@@ -3451,7 +3562,8 @@ let Container$7$1 = class Container extends Node$2$1 {
3451
3562
  return this;
3452
3563
  }
3453
3564
  removeAll() {
3454
- for (let node2 of this.proxyOf.nodes) node2.parent = void 0;
3565
+ for (let node2 of this.proxyOf.nodes)
3566
+ node2.parent = void 0;
3455
3567
  this.proxyOf.nodes = [];
3456
3568
  this.markDirty();
3457
3569
  return this;
@@ -3476,8 +3588,10 @@ let Container$7$1 = class Container extends Node$2$1 {
3476
3588
  opts = {};
3477
3589
  }
3478
3590
  this.walkDecls((decl) => {
3479
- if (opts.props && !opts.props.includes(decl.prop)) return;
3480
- if (opts.fast && !decl.value.includes(opts.fast)) return;
3591
+ if (opts.props && !opts.props.includes(decl.prop))
3592
+ return;
3593
+ if (opts.fast && !decl.value.includes(opts.fast))
3594
+ return;
3481
3595
  decl.value = decl.value.replace(pattern, callback);
3482
3596
  });
3483
3597
  this.markDirty();
@@ -3574,11 +3688,13 @@ let Container$7$1 = class Container extends Node$2$1 {
3574
3688
  });
3575
3689
  }
3576
3690
  get first() {
3577
- if (!this.proxyOf.nodes) return void 0;
3691
+ if (!this.proxyOf.nodes)
3692
+ return void 0;
3578
3693
  return this.proxyOf.nodes[0];
3579
3694
  }
3580
3695
  get last() {
3581
- if (!this.proxyOf.nodes) return void 0;
3696
+ if (!this.proxyOf.nodes)
3697
+ return void 0;
3582
3698
  return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
3583
3699
  }
3584
3700
  };
@@ -3640,7 +3756,8 @@ var document$1$1 = Document$3$1;
3640
3756
  Document$3$1.default = Document$3$1;
3641
3757
  let printed$1 = {};
3642
3758
  var warnOnce$2$1 = function warnOnce(message) {
3643
- if (printed$1[message]) return;
3759
+ if (printed$1[message])
3760
+ return;
3644
3761
  printed$1[message] = true;
3645
3762
  if (typeof console !== "undefined" && console.warn) {
3646
3763
  console.warn(message);
@@ -3657,7 +3774,8 @@ let Warning$2$1 = class Warning {
3657
3774
  this.endLine = range.end.line;
3658
3775
  this.endColumn = range.end.column;
3659
3776
  }
3660
- for (let opt in opts) this[opt] = opts[opt];
3777
+ for (let opt in opts)
3778
+ this[opt] = opts[opt];
3661
3779
  }
3662
3780
  toString() {
3663
3781
  if (this.node) {
@@ -3749,8 +3867,10 @@ var tokenize$1 = function tokenizer(input2, options = {}) {
3749
3867
  return returned.length === 0 && pos >= length;
3750
3868
  }
3751
3869
  function nextToken(opts) {
3752
- if (returned.length) return returned.pop();
3753
- if (pos >= length) return;
3870
+ if (returned.length)
3871
+ return returned.pop();
3872
+ if (pos >= length)
3873
+ return;
3754
3874
  let ignoreUnclosed = opts ? opts.ignoreUnclosed : false;
3755
3875
  code = css.charCodeAt(pos);
3756
3876
  switch (code) {
@@ -3922,11 +4042,13 @@ let AtRule$3$1 = class AtRule extends Container$5$1 {
3922
4042
  this.type = "atrule";
3923
4043
  }
3924
4044
  append(...children) {
3925
- if (!this.proxyOf.nodes) this.nodes = [];
4045
+ if (!this.proxyOf.nodes)
4046
+ this.nodes = [];
3926
4047
  return super.append(...children);
3927
4048
  }
3928
4049
  prepend(...children) {
3929
- if (!this.proxyOf.nodes) this.nodes = [];
4050
+ if (!this.proxyOf.nodes)
4051
+ this.nodes = [];
3930
4052
  return super.prepend(...children);
3931
4053
  }
3932
4054
  };
@@ -3940,7 +4062,8 @@ let Root$5$1 = class Root extends Container$4$1 {
3940
4062
  constructor(defaults) {
3941
4063
  super(defaults);
3942
4064
  this.type = "root";
3943
- if (!this.nodes) this.nodes = [];
4065
+ if (!this.nodes)
4066
+ this.nodes = [];
3944
4067
  }
3945
4068
  normalize(child, sample, type) {
3946
4069
  let nodes = super.normalize(child);
@@ -4011,19 +4134,23 @@ let list$2$1 = {
4011
4134
  } else if (letter === "(") {
4012
4135
  func += 1;
4013
4136
  } else if (letter === ")") {
4014
- if (func > 0) func -= 1;
4137
+ if (func > 0)
4138
+ func -= 1;
4015
4139
  } else if (func === 0) {
4016
- if (separators.includes(letter)) split = true;
4140
+ if (separators.includes(letter))
4141
+ split = true;
4017
4142
  }
4018
4143
  if (split) {
4019
- if (current !== "") array.push(current.trim());
4144
+ if (current !== "")
4145
+ array.push(current.trim());
4020
4146
  current = "";
4021
4147
  split = false;
4022
4148
  } else {
4023
4149
  current += letter;
4024
4150
  }
4025
4151
  }
4026
- if (last || current !== "") array.push(current.trim());
4152
+ if (last || current !== "")
4153
+ array.push(current.trim());
4027
4154
  return array;
4028
4155
  }
4029
4156
  };
@@ -4035,7 +4162,8 @@ let Rule$3$1 = class Rule extends Container$3$1 {
4035
4162
  constructor(defaults) {
4036
4163
  super(defaults);
4037
4164
  this.type = "rule";
4038
- if (!this.nodes) this.nodes = [];
4165
+ if (!this.nodes)
4166
+ this.nodes = [];
4039
4167
  }
4040
4168
  get selectors() {
4041
4169
  return list$1$1.comma(this.selector);
@@ -4063,7 +4191,8 @@ function findLastWithPosition$1(tokens) {
4063
4191
  for (let i2 = tokens.length - 1; i2 >= 0; i2--) {
4064
4192
  let token = tokens[i2];
4065
4193
  let pos = token[3] || token[2];
4066
- if (pos) return pos;
4194
+ if (pos)
4195
+ return pos;
4067
4196
  }
4068
4197
  }
4069
4198
  let Parser$1$1 = class Parser {
@@ -4156,14 +4285,16 @@ let Parser$1$1 = class Parser {
4156
4285
  }
4157
4286
  checkMissedSemicolon(tokens) {
4158
4287
  let colon = this.colon(tokens);
4159
- if (colon === false) return;
4288
+ if (colon === false)
4289
+ return;
4160
4290
  let founded = 0;
4161
4291
  let token;
4162
4292
  for (let j = colon - 1; j >= 0; j--) {
4163
4293
  token = tokens[j];
4164
4294
  if (token[0] !== "space") {
4165
4295
  founded += 1;
4166
- if (founded === 2) break;
4296
+ if (founded === 2)
4297
+ break;
4167
4298
  }
4168
4299
  }
4169
4300
  throw this.input.error(
@@ -4229,7 +4360,8 @@ let Parser$1$1 = class Parser {
4229
4360
  );
4230
4361
  node2.source.end.offset++;
4231
4362
  while (tokens[0][0] !== "word") {
4232
- if (tokens.length === 1) this.unknownWord(tokens);
4363
+ if (tokens.length === 1)
4364
+ this.unknownWord(tokens);
4233
4365
  node2.raws.before += tokens.shift()[1];
4234
4366
  }
4235
4367
  node2.source.start = this.getPosition(tokens[0][2]);
@@ -4263,7 +4395,8 @@ let Parser$1$1 = class Parser {
4263
4395
  let next;
4264
4396
  while (tokens.length) {
4265
4397
  next = tokens[0][0];
4266
- if (next !== "space" && next !== "comment") break;
4398
+ if (next !== "space" && next !== "comment")
4399
+ break;
4267
4400
  firstSpaces.push(tokens.shift());
4268
4401
  }
4269
4402
  this.precheckMissedSemicolon(tokens);
@@ -4273,7 +4406,8 @@ let Parser$1$1 = class Parser {
4273
4406
  node2.important = true;
4274
4407
  let string = this.stringFrom(tokens, i2);
4275
4408
  string = this.spacesFromEnd(tokens) + string;
4276
- if (string !== " !important") node2.raws.important = string;
4409
+ if (string !== " !important")
4410
+ node2.raws.important = string;
4277
4411
  break;
4278
4412
  } else if (token[1].toLowerCase() === "important") {
4279
4413
  let cache = tokens.slice(0);
@@ -4335,7 +4469,8 @@ let Parser$1$1 = class Parser {
4335
4469
  }
4336
4470
  }
4337
4471
  endFile() {
4338
- if (this.current.parent) this.unclosedBlock();
4472
+ if (this.current.parent)
4473
+ this.unclosedBlock();
4339
4474
  if (this.current.nodes && this.current.nodes.length) {
4340
4475
  this.current.raws.semicolon = this.semicolon;
4341
4476
  }
@@ -4369,7 +4504,8 @@ let Parser$1$1 = class Parser {
4369
4504
  };
4370
4505
  node2.raws.before = this.spaces;
4371
4506
  this.spaces = "";
4372
- if (node2.type !== "comment") this.semicolon = false;
4507
+ if (node2.type !== "comment")
4508
+ this.semicolon = false;
4373
4509
  }
4374
4510
  other(start) {
4375
4511
  let end = false;
@@ -4384,10 +4520,12 @@ let Parser$1$1 = class Parser {
4384
4520
  type = token[0];
4385
4521
  tokens.push(token);
4386
4522
  if (type === "(" || type === "[") {
4387
- if (!bracket) bracket = token;
4523
+ if (!bracket)
4524
+ bracket = token;
4388
4525
  brackets.push(type === "(" ? ")" : "]");
4389
4526
  } else if (customProperty && colon && type === "{") {
4390
- if (!bracket) bracket = token;
4527
+ if (!bracket)
4528
+ bracket = token;
4391
4529
  brackets.push("}");
4392
4530
  } else if (brackets.length === 0) {
4393
4531
  if (type === ";") {
@@ -4409,17 +4547,21 @@ let Parser$1$1 = class Parser {
4409
4547
  }
4410
4548
  } else if (type === brackets[brackets.length - 1]) {
4411
4549
  brackets.pop();
4412
- if (brackets.length === 0) bracket = null;
4550
+ if (brackets.length === 0)
4551
+ bracket = null;
4413
4552
  }
4414
4553
  token = this.tokenizer.nextToken();
4415
4554
  }
4416
- if (this.tokenizer.endOfFile()) end = true;
4417
- if (brackets.length > 0) this.unclosedBracket(bracket);
4555
+ if (this.tokenizer.endOfFile())
4556
+ end = true;
4557
+ if (brackets.length > 0)
4558
+ this.unclosedBracket(bracket);
4418
4559
  if (end && colon) {
4419
4560
  if (!customProperty) {
4420
4561
  while (tokens.length) {
4421
4562
  token = tokens[tokens.length - 1][0];
4422
- if (token !== "space" && token !== "comment") break;
4563
+ if (token !== "space" && token !== "comment")
4564
+ break;
4423
4565
  this.tokenizer.back(tokens.pop());
4424
4566
  }
4425
4567
  }
@@ -4506,7 +4648,8 @@ let Parser$1$1 = class Parser {
4506
4648
  let spaces = "";
4507
4649
  while (tokens.length) {
4508
4650
  lastTokenType = tokens[tokens.length - 1][0];
4509
- if (lastTokenType !== "space" && lastTokenType !== "comment") break;
4651
+ if (lastTokenType !== "space" && lastTokenType !== "comment")
4652
+ break;
4510
4653
  spaces = tokens.pop()[1] + spaces;
4511
4654
  }
4512
4655
  return spaces;
@@ -4517,7 +4660,8 @@ let Parser$1$1 = class Parser {
4517
4660
  let spaces = "";
4518
4661
  while (tokens.length) {
4519
4662
  next = tokens[0][0];
4520
- if (next !== "space" && next !== "comment") break;
4663
+ if (next !== "space" && next !== "comment")
4664
+ break;
4521
4665
  spaces += tokens.shift()[1];
4522
4666
  }
4523
4667
  return spaces;
@@ -4527,7 +4671,8 @@ let Parser$1$1 = class Parser {
4527
4671
  let spaces = "";
4528
4672
  while (tokens.length) {
4529
4673
  lastTokenType = tokens[tokens.length - 1][0];
4530
- if (lastTokenType !== "space") break;
4674
+ if (lastTokenType !== "space")
4675
+ break;
4531
4676
  spaces = tokens.pop()[1] + spaces;
4532
4677
  }
4533
4678
  return spaces;
@@ -4689,7 +4834,8 @@ function toStack$1(node2) {
4689
4834
  }
4690
4835
  function cleanMarks$1(node2) {
4691
4836
  node2[isClean$3] = false;
4692
- if (node2.nodes) node2.nodes.forEach((i2) => cleanMarks$1(i2));
4837
+ if (node2.nodes)
4838
+ node2.nodes.forEach((i2) => cleanMarks$1(i2));
4693
4839
  return node2;
4694
4840
  }
4695
4841
  let postcss$2$1 = {};
@@ -4703,15 +4849,20 @@ let LazyResult$2$1 = class LazyResult {
4703
4849
  } else if (css instanceof LazyResult || css instanceof Result$2$1) {
4704
4850
  root2 = cleanMarks$1(css.root);
4705
4851
  if (css.map) {
4706
- if (typeof opts.map === "undefined") opts.map = {};
4707
- if (!opts.map.inline) opts.map.inline = false;
4852
+ if (typeof opts.map === "undefined")
4853
+ opts.map = {};
4854
+ if (!opts.map.inline)
4855
+ opts.map.inline = false;
4708
4856
  opts.map.prev = css.map;
4709
4857
  }
4710
4858
  } else {
4711
4859
  let parser2 = parse$2$1;
4712
- if (opts.syntax) parser2 = opts.syntax.parse;
4713
- if (opts.parser) parser2 = opts.parser;
4714
- if (parser2.parse) parser2 = parser2.parse;
4860
+ if (opts.syntax)
4861
+ parser2 = opts.syntax.parse;
4862
+ if (opts.parser)
4863
+ parser2 = opts.parser;
4864
+ if (parser2.parse)
4865
+ parser2 = parser2.parse;
4715
4866
  try {
4716
4867
  root2 = parser2(css, opts);
4717
4868
  } catch (error) {
@@ -4733,8 +4884,10 @@ let LazyResult$2$1 = class LazyResult {
4733
4884
  });
4734
4885
  }
4735
4886
  async() {
4736
- if (this.error) return Promise.reject(this.error);
4737
- if (this.processed) return Promise.resolve(this.result);
4887
+ if (this.error)
4888
+ return Promise.reject(this.error);
4889
+ if (this.processed)
4890
+ return Promise.resolve(this.result);
4738
4891
  if (!this.processing) {
4739
4892
  this.processing = this.runAsync();
4740
4893
  }
@@ -4752,7 +4905,8 @@ let LazyResult$2$1 = class LazyResult {
4752
4905
  handleError(error, node2) {
4753
4906
  let plugin22 = this.result.lastPlugin;
4754
4907
  try {
4755
- if (node2) node2.addToError(error);
4908
+ if (node2)
4909
+ node2.addToError(error);
4756
4910
  this.error = error;
4757
4911
  if (error.name === "CssSyntaxError" && !error.plugin) {
4758
4912
  error.plugin = plugin22.postcssPlugin;
@@ -4772,14 +4926,16 @@ let LazyResult$2$1 = class LazyResult {
4772
4926
  }
4773
4927
  }
4774
4928
  } catch (err) {
4775
- if (console && console.error) console.error(err);
4929
+ if (console && console.error)
4930
+ console.error(err);
4776
4931
  }
4777
4932
  return error;
4778
4933
  }
4779
4934
  prepareVisitors() {
4780
4935
  this.listeners = {};
4781
4936
  let add = (plugin22, type, cb) => {
4782
- if (!this.listeners[type]) this.listeners[type] = [];
4937
+ if (!this.listeners[type])
4938
+ this.listeners[type] = [];
4783
4939
  this.listeners[type].push([plugin22, cb]);
4784
4940
  };
4785
4941
  for (let plugin22 of this.plugins) {
@@ -4886,15 +5042,20 @@ let LazyResult$2$1 = class LazyResult {
4886
5042
  }
4887
5043
  }
4888
5044
  stringify() {
4889
- if (this.error) throw this.error;
4890
- if (this.stringified) return this.result;
5045
+ if (this.error)
5046
+ throw this.error;
5047
+ if (this.stringified)
5048
+ return this.result;
4891
5049
  this.stringified = true;
4892
5050
  this.sync();
4893
5051
  let opts = this.result.opts;
4894
5052
  let str = stringify$2$1;
4895
- if (opts.syntax) str = opts.syntax.stringify;
4896
- if (opts.stringifier) str = opts.stringifier;
4897
- if (str.stringify) str = str.stringify;
5053
+ if (opts.syntax)
5054
+ str = opts.syntax.stringify;
5055
+ if (opts.stringifier)
5056
+ str = opts.stringifier;
5057
+ if (str.stringify)
5058
+ str = str.stringify;
4898
5059
  let map = new MapGenerator$1$1(str, this.result.root, this.result.opts);
4899
5060
  let data = map.generate();
4900
5061
  this.result.css = data[0];
@@ -4902,8 +5063,10 @@ let LazyResult$2$1 = class LazyResult {
4902
5063
  return this.result;
4903
5064
  }
4904
5065
  sync() {
4905
- if (this.error) throw this.error;
4906
- if (this.processed) return this.result;
5066
+ if (this.error)
5067
+ throw this.error;
5068
+ if (this.processed)
5069
+ return this.result;
4907
5070
  this.processed = true;
4908
5071
  if (this.processing) {
4909
5072
  throw this.getAsyncError();
@@ -5022,13 +5185,15 @@ let LazyResult$2$1 = class LazyResult {
5022
5185
  if (event === CHILDREN$1) {
5023
5186
  if (node2.nodes) {
5024
5187
  node2.each((child) => {
5025
- if (!child[isClean$3]) this.walkSync(child);
5188
+ if (!child[isClean$3])
5189
+ this.walkSync(child);
5026
5190
  });
5027
5191
  }
5028
5192
  } else {
5029
5193
  let visitors = this.listeners[event];
5030
5194
  if (visitors) {
5031
- if (this.visitSync(visitors, node2.toProxy())) return;
5195
+ if (this.visitSync(visitors, node2.toProxy()))
5196
+ return;
5032
5197
  }
5033
5198
  }
5034
5199
  }
@@ -5106,7 +5271,8 @@ let NoWorkResult$1$1 = class NoWorkResult {
5106
5271
  }
5107
5272
  }
5108
5273
  async() {
5109
- if (this.error) return Promise.reject(this.error);
5274
+ if (this.error)
5275
+ return Promise.reject(this.error);
5110
5276
  return Promise.resolve(this.result);
5111
5277
  }
5112
5278
  catch(onRejected) {
@@ -5116,7 +5282,8 @@ let NoWorkResult$1$1 = class NoWorkResult {
5116
5282
  return this.async().then(onFinally, onFinally);
5117
5283
  }
5118
5284
  sync() {
5119
- if (this.error) throw this.error;
5285
+ if (this.error)
5286
+ throw this.error;
5120
5287
  return this.result;
5121
5288
  }
5122
5289
  then(onFulfilled, onRejected) {
@@ -5236,7 +5403,8 @@ let Input$1$1 = input$1;
5236
5403
  let Root$1$1 = root$1;
5237
5404
  let Rule$1$1 = rule$1;
5238
5405
  function fromJSON$1$1(json, inputs) {
5239
- if (Array.isArray(json)) return json.map((n2) => fromJSON$1$1(n2));
5406
+ if (Array.isArray(json))
5407
+ return json.map((n2) => fromJSON$1$1(n2));
5240
5408
  let _a2 = json, { inputs: ownInputs } = _a2, defaults = __objRest(_a2, ["inputs"]);
5241
5409
  if (ownInputs) {
5242
5410
  inputs = [];
@@ -5322,7 +5490,8 @@ postcss$3.plugin = function plugin(name, initializer) {
5322
5490
  let cache;
5323
5491
  Object.defineProperty(creator, "postcss", {
5324
5492
  get() {
5325
- if (!cache) cache = creator();
5493
+ if (!cache)
5494
+ cache = creator();
5326
5495
  return cache;
5327
5496
  }
5328
5497
  });
@@ -5431,7 +5600,8 @@ function getTagName(n2) {
5431
5600
  }
5432
5601
  function adaptCssForReplay(cssText, cache) {
5433
5602
  const cachedStyle = cache == null ? void 0 : cache.stylesWithHoverClass.get(cssText);
5434
- if (cachedStyle) return cachedStyle;
5603
+ if (cachedStyle)
5604
+ return cachedStyle;
5435
5605
  let result2 = cssText;
5436
5606
  try {
5437
5607
  const ast = postcss$1$1([
@@ -5552,12 +5722,14 @@ function buildNode(n2, options) {
5552
5722
  if (value === null) {
5553
5723
  continue;
5554
5724
  }
5555
- if (value === true) value = "";
5725
+ if (value === true)
5726
+ value = "";
5556
5727
  if (name.startsWith("rr_")) {
5557
5728
  specialAttributes[name] = value;
5558
5729
  continue;
5559
5730
  }
5560
- if (typeof value !== "string") ;
5731
+ if (typeof value !== "string")
5732
+ ;
5561
5733
  else if (tagName === "style" && name === "_cssText") {
5562
5734
  buildStyleNode(n2, node2, value, options);
5563
5735
  continue;
@@ -5680,7 +5852,8 @@ function buildNodeWithSN(n2, options) {
5680
5852
  if (mirror2.has(n2.id)) {
5681
5853
  const nodeInMirror = mirror2.getNode(n2.id);
5682
5854
  const meta = mirror2.getMeta(nodeInMirror);
5683
- if (isNodeMetaEqual(meta, n2)) return mirror2.getNode(n2.id);
5855
+ if (isNodeMetaEqual(meta, n2))
5856
+ return mirror2.getNode(n2.id);
5684
5857
  }
5685
5858
  let node2 = buildNode(n2, { doc, hackCss, cache });
5686
5859
  if (!node2) {
@@ -5726,7 +5899,8 @@ function buildNodeWithSN(n2, options) {
5726
5899
  const htmlElement = childNode;
5727
5900
  let body = null;
5728
5901
  htmlElement.childNodes.forEach((child) => {
5729
- if (child.nodeName === "BODY") body = child;
5902
+ if (child.nodeName === "BODY")
5903
+ body = child;
5730
5904
  });
5731
5905
  if (body) {
5732
5906
  htmlElement.removeChild(body);
@@ -5812,7 +5986,8 @@ let Mirror$1 = class Mirror2 {
5812
5986
  }
5813
5987
  getId(n2) {
5814
5988
  var _a2;
5815
- if (!n2) return -1;
5989
+ if (!n2)
5990
+ return -1;
5816
5991
  const id = (_a2 = this.getMeta(n2)) == null ? void 0 : _a2.id;
5817
5992
  return id != null ? id : -1;
5818
5993
  }
@@ -5851,7 +6026,8 @@ let Mirror$1 = class Mirror2 {
5851
6026
  const oldNode = this.getNode(id);
5852
6027
  if (oldNode) {
5853
6028
  const meta = this.nodeMetaMap.get(oldNode);
5854
- if (meta) this.nodeMetaMap.set(n2, meta);
6029
+ if (meta)
6030
+ this.nodeMetaMap.set(n2, meta);
5855
6031
  }
5856
6032
  this.idNodeMap.set(id, n2);
5857
6033
  }
@@ -5946,7 +6122,8 @@ function getDefaultExportFromCjs(x2) {
5946
6122
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
5947
6123
  }
5948
6124
  function getAugmentedNamespace(n2) {
5949
- if (n2.__esModule) return n2;
6125
+ if (n2.__esModule)
6126
+ return n2;
5950
6127
  var f2 = n2.default;
5951
6128
  if (typeof f2 == "function") {
5952
6129
  var a2 = function a22() {
@@ -5956,7 +6133,8 @@ function getAugmentedNamespace(n2) {
5956
6133
  return f2.apply(this, arguments);
5957
6134
  };
5958
6135
  a2.prototype = f2.prototype;
5959
- } else a2 = {};
6136
+ } else
6137
+ a2 = {};
5960
6138
  Object.defineProperty(a2, "__esModule", { value: true });
5961
6139
  Object.keys(n2).forEach(function(k) {
5962
6140
  var d = Object.getOwnPropertyDescriptor(n2, k);
@@ -6024,11 +6202,14 @@ let CssSyntaxError$3 = class CssSyntaxError2 extends Error {
6024
6202
  this.message += ": " + this.reason;
6025
6203
  }
6026
6204
  showSourceCode(color) {
6027
- if (!this.source) return "";
6205
+ if (!this.source)
6206
+ return "";
6028
6207
  let css = this.source;
6029
- if (color == null) color = pico.isColorSupported;
6208
+ if (color == null)
6209
+ color = pico.isColorSupported;
6030
6210
  if (terminalHighlight$1) {
6031
- if (color) css = terminalHighlight$1(css);
6211
+ if (color)
6212
+ css = terminalHighlight$1(css);
6032
6213
  }
6033
6214
  let lines = css.split(/\r?\n/);
6034
6215
  let start = Math.max(this.line - 3, 0);
@@ -6121,7 +6302,8 @@ let Stringifier$2 = class Stringifier2 {
6121
6302
  if (value.includes("\n")) {
6122
6303
  let indent = this.raw(node2, null, "indent");
6123
6304
  if (indent.length) {
6124
- for (let step = 0; step < depth; step++) value += indent;
6305
+ for (let step = 0; step < depth; step++)
6306
+ value += indent;
6125
6307
  }
6126
6308
  }
6127
6309
  return value;
@@ -6136,20 +6318,23 @@ let Stringifier$2 = class Stringifier2 {
6136
6318
  } else {
6137
6319
  after = this.raw(node2, "after", "emptyBody");
6138
6320
  }
6139
- if (after) this.builder(after);
6321
+ if (after)
6322
+ this.builder(after);
6140
6323
  this.builder("}", node2, "end");
6141
6324
  }
6142
6325
  body(node2) {
6143
6326
  let last = node2.nodes.length - 1;
6144
6327
  while (last > 0) {
6145
- if (node2.nodes[last].type !== "comment") break;
6328
+ if (node2.nodes[last].type !== "comment")
6329
+ break;
6146
6330
  last -= 1;
6147
6331
  }
6148
6332
  let semicolon = this.raw(node2, "semicolon");
6149
6333
  for (let i2 = 0; i2 < node2.nodes.length; i2++) {
6150
6334
  let child = node2.nodes[i2];
6151
6335
  let before = this.raw(child, "before");
6152
- if (before) this.builder(before);
6336
+ if (before)
6337
+ this.builder(before);
6153
6338
  this.stringify(child, last !== i2 || semicolon);
6154
6339
  }
6155
6340
  }
@@ -6164,7 +6349,8 @@ let Stringifier$2 = class Stringifier2 {
6164
6349
  if (node2.important) {
6165
6350
  string += node2.raws.important || " !important";
6166
6351
  }
6167
- if (semicolon) string += ";";
6352
+ if (semicolon)
6353
+ string += ";";
6168
6354
  this.builder(string, node2);
6169
6355
  }
6170
6356
  document(node2) {
@@ -6172,10 +6358,12 @@ let Stringifier$2 = class Stringifier2 {
6172
6358
  }
6173
6359
  raw(node2, own, detect) {
6174
6360
  let value;
6175
- if (!detect) detect = own;
6361
+ if (!detect)
6362
+ detect = own;
6176
6363
  if (own) {
6177
6364
  value = node2.raws[own];
6178
- if (typeof value !== "undefined") return value;
6365
+ if (typeof value !== "undefined")
6366
+ return value;
6179
6367
  }
6180
6368
  let parent = node2.parent;
6181
6369
  if (detect === "before") {
@@ -6186,9 +6374,11 @@ let Stringifier$2 = class Stringifier2 {
6186
6374
  return "";
6187
6375
  }
6188
6376
  }
6189
- if (!parent) return DEFAULT_RAW[detect];
6377
+ if (!parent)
6378
+ return DEFAULT_RAW[detect];
6190
6379
  let root2 = node2.root();
6191
- if (!root2.rawCache) root2.rawCache = {};
6380
+ if (!root2.rawCache)
6381
+ root2.rawCache = {};
6192
6382
  if (typeof root2.rawCache[detect] !== "undefined") {
6193
6383
  return root2.rawCache[detect];
6194
6384
  }
@@ -6201,11 +6391,13 @@ let Stringifier$2 = class Stringifier2 {
6201
6391
  } else {
6202
6392
  root2.walk((i2) => {
6203
6393
  value = i2.raws[own];
6204
- if (typeof value !== "undefined") return false;
6394
+ if (typeof value !== "undefined")
6395
+ return false;
6205
6396
  });
6206
6397
  }
6207
6398
  }
6208
- if (typeof value === "undefined") value = DEFAULT_RAW[detect];
6399
+ if (typeof value === "undefined")
6400
+ value = DEFAULT_RAW[detect];
6209
6401
  root2.rawCache[detect] = value;
6210
6402
  return value;
6211
6403
  }
@@ -6222,7 +6414,8 @@ let Stringifier$2 = class Stringifier2 {
6222
6414
  }
6223
6415
  }
6224
6416
  });
6225
- if (value) value = value.replace(/\S/g, "");
6417
+ if (value)
6418
+ value = value.replace(/\S/g, "");
6226
6419
  return value;
6227
6420
  }
6228
6421
  rawBeforeComment(root2, node2) {
@@ -6266,7 +6459,8 @@ let Stringifier$2 = class Stringifier2 {
6266
6459
  root2.walk((i2) => {
6267
6460
  if (i2.type !== "decl") {
6268
6461
  value = i2.raws.between;
6269
- if (typeof value !== "undefined") return false;
6462
+ if (typeof value !== "undefined")
6463
+ return false;
6270
6464
  }
6271
6465
  });
6272
6466
  return value;
@@ -6284,7 +6478,8 @@ let Stringifier$2 = class Stringifier2 {
6284
6478
  }
6285
6479
  }
6286
6480
  });
6287
- if (value) value = value.replace(/\S/g, "");
6481
+ if (value)
6482
+ value = value.replace(/\S/g, "");
6288
6483
  return value;
6289
6484
  }
6290
6485
  rawColon(root2) {
@@ -6302,13 +6497,15 @@ let Stringifier$2 = class Stringifier2 {
6302
6497
  root2.walk((i2) => {
6303
6498
  if (i2.nodes && i2.nodes.length === 0) {
6304
6499
  value = i2.raws.after;
6305
- if (typeof value !== "undefined") return false;
6500
+ if (typeof value !== "undefined")
6501
+ return false;
6306
6502
  }
6307
6503
  });
6308
6504
  return value;
6309
6505
  }
6310
6506
  rawIndent(root2) {
6311
- if (root2.raws.indent) return root2.raws.indent;
6507
+ if (root2.raws.indent)
6508
+ return root2.raws.indent;
6312
6509
  let value;
6313
6510
  root2.walk((i2) => {
6314
6511
  let p = i2.parent;
@@ -6328,7 +6525,8 @@ let Stringifier$2 = class Stringifier2 {
6328
6525
  root2.walk((i2) => {
6329
6526
  if (i2.nodes && i2.nodes.length && i2.last.type === "decl") {
6330
6527
  value = i2.raws.semicolon;
6331
- if (typeof value !== "undefined") return false;
6528
+ if (typeof value !== "undefined")
6529
+ return false;
6332
6530
  }
6333
6531
  });
6334
6532
  return value;
@@ -6343,7 +6541,8 @@ let Stringifier$2 = class Stringifier2 {
6343
6541
  }
6344
6542
  root(node2) {
6345
6543
  this.body(node2);
6346
- if (node2.raws.after) this.builder(node2.raws.after);
6544
+ if (node2.raws.after)
6545
+ this.builder(node2.raws.after);
6347
6546
  }
6348
6547
  rule(node2) {
6349
6548
  this.block(node2, this.rawValue(node2, "selector"));
@@ -6379,17 +6578,20 @@ function cloneNode(obj, parent) {
6379
6578
  if (!Object.prototype.hasOwnProperty.call(obj, i2)) {
6380
6579
  continue;
6381
6580
  }
6382
- if (i2 === "proxyCache") continue;
6581
+ if (i2 === "proxyCache")
6582
+ continue;
6383
6583
  let value = obj[i2];
6384
6584
  let type = typeof value;
6385
6585
  if (i2 === "parent" && type === "object") {
6386
- if (parent) cloned[i2] = parent;
6586
+ if (parent)
6587
+ cloned[i2] = parent;
6387
6588
  } else if (i2 === "source") {
6388
6589
  cloned[i2] = value;
6389
6590
  } else if (Array.isArray(value)) {
6390
6591
  cloned[i2] = value.map((j) => cloneNode(j, cloned));
6391
6592
  } else {
6392
- if (type === "object" && value !== null) value = cloneNode(value);
6593
+ if (type === "object" && value !== null)
6594
+ value = cloneNode(value);
6393
6595
  cloned[i2] = value;
6394
6596
  }
6395
6597
  }
@@ -6443,7 +6645,8 @@ let Node$5 = class Node22 {
6443
6645
  cleanRaws(keepBetween) {
6444
6646
  delete this.raws.before;
6445
6647
  delete this.raws.after;
6446
- if (!keepBetween) delete this.raws.between;
6648
+ if (!keepBetween)
6649
+ delete this.raws.between;
6447
6650
  }
6448
6651
  clone(overrides = {}) {
6449
6652
  let cloned = cloneNode(this);
@@ -6486,7 +6689,8 @@ let Node$5 = class Node22 {
6486
6689
  }
6487
6690
  },
6488
6691
  set(node2, prop, value) {
6489
- if (node2[prop] === value) return true;
6692
+ if (node2[prop] === value)
6693
+ return true;
6490
6694
  node2[prop] = value;
6491
6695
  if (prop === "prop" || prop === "value" || prop === "name" || prop === "params" || prop === "important" || /* c8 ignore next */
6492
6696
  prop === "text") {
@@ -6506,7 +6710,8 @@ let Node$5 = class Node22 {
6506
6710
  }
6507
6711
  }
6508
6712
  next() {
6509
- if (!this.parent) return void 0;
6713
+ if (!this.parent)
6714
+ return void 0;
6510
6715
  let index2 = this.parent.index(this);
6511
6716
  return this.parent.nodes[index2 + 1];
6512
6717
  }
@@ -6517,7 +6722,8 @@ let Node$5 = class Node22 {
6517
6722
  } else if (opts.word) {
6518
6723
  stringRepresentation = this.toString();
6519
6724
  let index2 = stringRepresentation.indexOf(opts.word);
6520
- if (index2 !== -1) pos = this.positionInside(index2, stringRepresentation);
6725
+ if (index2 !== -1)
6726
+ pos = this.positionInside(index2, stringRepresentation);
6521
6727
  }
6522
6728
  return pos;
6523
6729
  }
@@ -6536,7 +6742,8 @@ let Node$5 = class Node22 {
6536
6742
  return { column, line };
6537
6743
  }
6538
6744
  prev() {
6539
- if (!this.parent) return void 0;
6745
+ if (!this.parent)
6746
+ return void 0;
6540
6747
  let index2 = this.parent.index(this);
6541
6748
  return this.parent.nodes[index2 - 1];
6542
6749
  }
@@ -6631,7 +6838,8 @@ let Node$5 = class Node22 {
6631
6838
  if (!Object.prototype.hasOwnProperty.call(this, name)) {
6632
6839
  continue;
6633
6840
  }
6634
- if (name === "parent" || name === "proxyCache") continue;
6841
+ if (name === "parent" || name === "proxyCache")
6842
+ continue;
6635
6843
  let value = this[name];
6636
6844
  if (Array.isArray(value)) {
6637
6845
  fixed[name] = value.map((i2) => {
@@ -6671,7 +6879,8 @@ let Node$5 = class Node22 {
6671
6879
  return this.proxyCache;
6672
6880
  }
6673
6881
  toString(stringifier2 = stringify$3) {
6674
- if (stringifier2.stringify) stringifier2 = stringifier2.stringify;
6882
+ if (stringifier2.stringify)
6883
+ stringifier2 = stringifier2.stringify;
6675
6884
  let result2 = "";
6676
6885
  stringifier2(this, (i2) => {
6677
6886
  result2 += i2;
@@ -6680,7 +6889,8 @@ let Node$5 = class Node22 {
6680
6889
  }
6681
6890
  warn(result2, text, opts) {
6682
6891
  let data = { node: this };
6683
- for (let i2 in opts) data[i2] = opts[i2];
6892
+ for (let i2 in opts)
6893
+ data[i2] = opts[i2];
6684
6894
  return result2.warn(text, data);
6685
6895
  }
6686
6896
  get proxyOf() {
@@ -6736,7 +6946,8 @@ function fromBase64(str) {
6736
6946
  }
6737
6947
  let PreviousMap$2 = class PreviousMap2 {
6738
6948
  constructor(css, opts) {
6739
- if (opts.map === false) return;
6949
+ if (opts.map === false)
6950
+ return;
6740
6951
  this.loadAnnotation(css);
6741
6952
  this.inline = this.startWith(this.annotation, "data:");
6742
6953
  let prev = opts.map ? opts.map.prev : void 0;
@@ -6744,8 +6955,10 @@ let PreviousMap$2 = class PreviousMap2 {
6744
6955
  if (!this.mapFile && opts.from) {
6745
6956
  this.mapFile = opts.from;
6746
6957
  }
6747
- if (this.mapFile) this.root = dirname$1(this.mapFile);
6748
- if (text) this.text = text;
6958
+ if (this.mapFile)
6959
+ this.root = dirname$1(this.mapFile);
6960
+ if (text)
6961
+ this.text = text;
6749
6962
  }
6750
6963
  consumer() {
6751
6964
  if (!this.consumerCache) {
@@ -6771,12 +6984,14 @@ let PreviousMap$2 = class PreviousMap2 {
6771
6984
  return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, "").trim();
6772
6985
  }
6773
6986
  isMap(map) {
6774
- if (typeof map !== "object") return false;
6987
+ if (typeof map !== "object")
6988
+ return false;
6775
6989
  return typeof map.mappings === "string" || typeof map._mappings === "string" || Array.isArray(map.sections);
6776
6990
  }
6777
6991
  loadAnnotation(css) {
6778
6992
  let comments = css.match(/\/\*\s*# sourceMappingURL=/gm);
6779
- if (!comments) return;
6993
+ if (!comments)
6994
+ return;
6780
6995
  let start = css.lastIndexOf(comments.pop());
6781
6996
  let end = css.indexOf("*/", start);
6782
6997
  if (start > -1 && end > -1) {
@@ -6791,7 +7006,8 @@ let PreviousMap$2 = class PreviousMap2 {
6791
7006
  }
6792
7007
  }
6793
7008
  loadMap(file, prev) {
6794
- if (prev === false) return false;
7009
+ if (prev === false)
7010
+ return false;
6795
7011
  if (prev) {
6796
7012
  if (typeof prev === "string") {
6797
7013
  return prev;
@@ -6821,12 +7037,14 @@ let PreviousMap$2 = class PreviousMap2 {
6821
7037
  return this.decodeInline(this.annotation);
6822
7038
  } else if (this.annotation) {
6823
7039
  let map = this.annotation;
6824
- if (file) map = join(dirname$1(file), map);
7040
+ if (file)
7041
+ map = join(dirname$1(file), map);
6825
7042
  return this.loadFile(map);
6826
7043
  }
6827
7044
  }
6828
7045
  startWith(string, start) {
6829
- if (!string) return false;
7046
+ if (!string)
7047
+ return false;
6830
7048
  return string.substr(0, start.length) === start;
6831
7049
  }
6832
7050
  withContent() {
@@ -6869,13 +7087,15 @@ let Input$4 = class Input2 {
6869
7087
  if (map.text) {
6870
7088
  this.map = map;
6871
7089
  let file = map.consumer().file;
6872
- if (!this.file && file) this.file = this.mapResolve(file);
7090
+ if (!this.file && file)
7091
+ this.file = this.mapResolve(file);
6873
7092
  }
6874
7093
  }
6875
7094
  if (!this.file) {
6876
7095
  this.id = "<input css " + nanoid(6) + ">";
6877
7096
  }
6878
- if (this.map) this.map.file = this.from;
7097
+ if (this.map)
7098
+ this.map.file = this.from;
6879
7099
  }
6880
7100
  error(message, line, column, opts = {}) {
6881
7101
  let result2, endLine, endColumn;
@@ -6977,10 +7197,12 @@ let Input$4 = class Input2 {
6977
7197
  return resolve$1(this.map.consumer().sourceRoot || this.map.root || ".", file);
6978
7198
  }
6979
7199
  origin(line, column, endLine, endColumn) {
6980
- if (!this.map) return false;
7200
+ if (!this.map)
7201
+ return false;
6981
7202
  let consumer = this.map.consumer();
6982
7203
  let from = consumer.originalPositionFor({ column, line });
6983
- if (!from.source) return false;
7204
+ if (!from.source)
7205
+ return false;
6984
7206
  let to;
6985
7207
  if (typeof endLine === "number") {
6986
7208
  to = consumer.originalPositionFor({ column: endColumn, line: endLine });
@@ -7009,7 +7231,8 @@ let Input$4 = class Input2 {
7009
7231
  }
7010
7232
  }
7011
7233
  let source = consumer.sourceContentFor(from.source);
7012
- if (source) result2.source = source;
7234
+ if (source)
7235
+ result2.source = source;
7013
7236
  return result2;
7014
7237
  }
7015
7238
  toJSON() {
@@ -7067,7 +7290,8 @@ let MapGenerator$2 = class MapGenerator2 {
7067
7290
  content = this.outputFile() + ".map";
7068
7291
  }
7069
7292
  let eol = "\n";
7070
- if (this.css.includes("\r\n")) eol = "\r\n";
7293
+ if (this.css.includes("\r\n"))
7294
+ eol = "\r\n";
7071
7295
  this.css += eol + "/*# sourceMappingURL=" + content + " */";
7072
7296
  }
7073
7297
  applyPrevMaps() {
@@ -7087,12 +7311,14 @@ let MapGenerator$2 = class MapGenerator2 {
7087
7311
  }
7088
7312
  }
7089
7313
  clearAnnotation() {
7090
- if (this.mapOpts.annotation === false) return;
7314
+ if (this.mapOpts.annotation === false)
7315
+ return;
7091
7316
  if (this.root) {
7092
7317
  let node2;
7093
7318
  for (let i2 = this.root.nodes.length - 1; i2 >= 0; i2--) {
7094
7319
  node2 = this.root.nodes[i2];
7095
- if (node2.type !== "comment") continue;
7320
+ if (node2.type !== "comment")
7321
+ continue;
7096
7322
  if (node2.text.indexOf("# sourceMappingURL=") === 0) {
7097
7323
  this.root.removeChild(i2);
7098
7324
  }
@@ -7133,9 +7359,12 @@ let MapGenerator$2 = class MapGenerator2 {
7133
7359
  source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>"
7134
7360
  });
7135
7361
  }
7136
- if (this.isSourcesContent()) this.setSourcesContent();
7137
- if (this.root && this.previous().length > 0) this.applyPrevMaps();
7138
- if (this.isAnnotation()) this.addAnnotation();
7362
+ if (this.isSourcesContent())
7363
+ this.setSourcesContent();
7364
+ if (this.root && this.previous().length > 0)
7365
+ this.applyPrevMaps();
7366
+ if (this.isAnnotation())
7367
+ this.addAnnotation();
7139
7368
  if (this.isInline()) {
7140
7369
  return [this.css];
7141
7370
  } else {
@@ -7255,11 +7484,15 @@ let MapGenerator$2 = class MapGenerator2 {
7255
7484
  }
7256
7485
  }
7257
7486
  path(file) {
7258
- if (this.mapOpts.absolute) return file;
7259
- if (file.charCodeAt(0) === 60) return file;
7260
- if (/^\w+:\/\//.test(file)) return file;
7487
+ if (this.mapOpts.absolute)
7488
+ return file;
7489
+ if (file.charCodeAt(0) === 60)
7490
+ return file;
7491
+ if (/^\w+:\/\//.test(file))
7492
+ return file;
7261
7493
  let cached = this.memoizedPaths.get(file);
7262
- if (cached) return cached;
7494
+ if (cached)
7495
+ return cached;
7263
7496
  let from = this.opts.to ? dirname(this.opts.to) : ".";
7264
7497
  if (typeof this.mapOpts.annotation === "string") {
7265
7498
  from = dirname(resolve(from, this.mapOpts.annotation));
@@ -7282,7 +7515,8 @@ let MapGenerator$2 = class MapGenerator2 {
7282
7515
  });
7283
7516
  } else {
7284
7517
  let input2 = new Input$3(this.originalCSS, this.opts);
7285
- if (input2.map) this.previousMaps.push(input2.map);
7518
+ if (input2.map)
7519
+ this.previousMaps.push(input2.map);
7286
7520
  }
7287
7521
  }
7288
7522
  return this.previousMaps;
@@ -7323,7 +7557,8 @@ let MapGenerator$2 = class MapGenerator2 {
7323
7557
  }
7324
7558
  toFileUrl(path) {
7325
7559
  let cached = this.memoizedFileURLs.get(path);
7326
- if (cached) return cached;
7560
+ if (cached)
7561
+ return cached;
7327
7562
  if (pathToFileURL) {
7328
7563
  let fileURL = pathToFileURL(path).toString();
7329
7564
  this.memoizedFileURLs.set(path, fileURL);
@@ -7336,7 +7571,8 @@ let MapGenerator$2 = class MapGenerator2 {
7336
7571
  }
7337
7572
  toUrl(path) {
7338
7573
  let cached = this.memoizedURLs.get(path);
7339
- if (cached) return cached;
7574
+ if (cached)
7575
+ return cached;
7340
7576
  if (sep === "\\") {
7341
7577
  path = path.replace(/\\/g, "/");
7342
7578
  }
@@ -7365,7 +7601,8 @@ let AtRule$4;
7365
7601
  let Root$6;
7366
7602
  function cleanSource(nodes) {
7367
7603
  return nodes.map((i2) => {
7368
- if (i2.nodes) i2.nodes = cleanSource(i2.nodes);
7604
+ if (i2.nodes)
7605
+ i2.nodes = cleanSource(i2.nodes);
7369
7606
  delete i2.source;
7370
7607
  return i2;
7371
7608
  });
@@ -7382,7 +7619,8 @@ let Container$7 = class Container2 extends Node$2 {
7382
7619
  append(...children) {
7383
7620
  for (let child of children) {
7384
7621
  let nodes = this.normalize(child, this.last);
7385
- for (let node2 of nodes) this.proxyOf.nodes.push(node2);
7622
+ for (let node2 of nodes)
7623
+ this.proxyOf.nodes.push(node2);
7386
7624
  }
7387
7625
  this.markDirty();
7388
7626
  return this;
@@ -7390,17 +7628,20 @@ let Container$7 = class Container2 extends Node$2 {
7390
7628
  cleanRaws(keepBetween) {
7391
7629
  super.cleanRaws(keepBetween);
7392
7630
  if (this.nodes) {
7393
- for (let node2 of this.nodes) node2.cleanRaws(keepBetween);
7631
+ for (let node2 of this.nodes)
7632
+ node2.cleanRaws(keepBetween);
7394
7633
  }
7395
7634
  }
7396
7635
  each(callback) {
7397
- if (!this.proxyOf.nodes) return void 0;
7636
+ if (!this.proxyOf.nodes)
7637
+ return void 0;
7398
7638
  let iterator = this.getIterator();
7399
7639
  let index2, result2;
7400
7640
  while (this.indexes[iterator] < this.proxyOf.nodes.length) {
7401
7641
  index2 = this.indexes[iterator];
7402
7642
  result2 = callback(this.proxyOf.nodes[index2], index2);
7403
- if (result2 === false) break;
7643
+ if (result2 === false)
7644
+ break;
7404
7645
  this.indexes[iterator] += 1;
7405
7646
  }
7406
7647
  delete this.indexes[iterator];
@@ -7410,8 +7651,10 @@ let Container$7 = class Container2 extends Node$2 {
7410
7651
  return this.nodes.every(condition);
7411
7652
  }
7412
7653
  getIterator() {
7413
- if (!this.lastEach) this.lastEach = 0;
7414
- if (!this.indexes) this.indexes = {};
7654
+ if (!this.lastEach)
7655
+ this.lastEach = 0;
7656
+ if (!this.indexes)
7657
+ this.indexes = {};
7415
7658
  this.lastEach += 1;
7416
7659
  let iterator = this.lastEach;
7417
7660
  this.indexes[iterator] = 0;
@@ -7453,7 +7696,8 @@ let Container$7 = class Container2 extends Node$2 {
7453
7696
  }
7454
7697
  },
7455
7698
  set(node2, prop, value) {
7456
- if (node2[prop] === value) return true;
7699
+ if (node2[prop] === value)
7700
+ return true;
7457
7701
  node2[prop] = value;
7458
7702
  if (prop === "name" || prop === "params" || prop === "selector") {
7459
7703
  node2.markDirty();
@@ -7463,15 +7707,18 @@ let Container$7 = class Container2 extends Node$2 {
7463
7707
  };
7464
7708
  }
7465
7709
  index(child) {
7466
- if (typeof child === "number") return child;
7467
- if (child.proxyOf) child = child.proxyOf;
7710
+ if (typeof child === "number")
7711
+ return child;
7712
+ if (child.proxyOf)
7713
+ child = child.proxyOf;
7468
7714
  return this.proxyOf.nodes.indexOf(child);
7469
7715
  }
7470
7716
  insertAfter(exist, add) {
7471
7717
  let existIndex = this.index(exist);
7472
7718
  let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse();
7473
7719
  existIndex = this.index(exist);
7474
- for (let node2 of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node2);
7720
+ for (let node2 of nodes)
7721
+ this.proxyOf.nodes.splice(existIndex + 1, 0, node2);
7475
7722
  let index2;
7476
7723
  for (let id in this.indexes) {
7477
7724
  index2 = this.indexes[id];
@@ -7487,7 +7734,8 @@ let Container$7 = class Container2 extends Node$2 {
7487
7734
  let type = existIndex === 0 ? "prepend" : false;
7488
7735
  let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse();
7489
7736
  existIndex = this.index(exist);
7490
- for (let node2 of nodes) this.proxyOf.nodes.splice(existIndex, 0, node2);
7737
+ for (let node2 of nodes)
7738
+ this.proxyOf.nodes.splice(existIndex, 0, node2);
7491
7739
  let index2;
7492
7740
  for (let id in this.indexes) {
7493
7741
  index2 = this.indexes[id];
@@ -7506,12 +7754,14 @@ let Container$7 = class Container2 extends Node$2 {
7506
7754
  } else if (Array.isArray(nodes)) {
7507
7755
  nodes = nodes.slice(0);
7508
7756
  for (let i2 of nodes) {
7509
- if (i2.parent) i2.parent.removeChild(i2, "ignore");
7757
+ if (i2.parent)
7758
+ i2.parent.removeChild(i2, "ignore");
7510
7759
  }
7511
7760
  } else if (nodes.type === "root" && this.type !== "document") {
7512
7761
  nodes = nodes.nodes.slice(0);
7513
7762
  for (let i2 of nodes) {
7514
- if (i2.parent) i2.parent.removeChild(i2, "ignore");
7763
+ if (i2.parent)
7764
+ i2.parent.removeChild(i2, "ignore");
7515
7765
  }
7516
7766
  } else if (nodes.type) {
7517
7767
  nodes = [nodes];
@@ -7532,10 +7782,13 @@ let Container$7 = class Container2 extends Node$2 {
7532
7782
  throw new Error("Unknown node type in node creation");
7533
7783
  }
7534
7784
  let processed = nodes.map((i2) => {
7535
- if (!i2[my$1]) Container2.rebuild(i2);
7785
+ if (!i2[my$1])
7786
+ Container2.rebuild(i2);
7536
7787
  i2 = i2.proxyOf;
7537
- if (i2.parent) i2.parent.removeChild(i2);
7538
- if (i2[isClean$1]) markDirtyUp(i2);
7788
+ if (i2.parent)
7789
+ i2.parent.removeChild(i2);
7790
+ if (i2[isClean$1])
7791
+ markDirtyUp(i2);
7539
7792
  if (typeof i2.raws.before === "undefined") {
7540
7793
  if (sample && typeof sample.raws.before !== "undefined") {
7541
7794
  i2.raws.before = sample.raws.before.replace(/\S/g, "");
@@ -7550,7 +7803,8 @@ let Container$7 = class Container2 extends Node$2 {
7550
7803
  children = children.reverse();
7551
7804
  for (let child of children) {
7552
7805
  let nodes = this.normalize(child, this.first, "prepend").reverse();
7553
- for (let node2 of nodes) this.proxyOf.nodes.unshift(node2);
7806
+ for (let node2 of nodes)
7807
+ this.proxyOf.nodes.unshift(node2);
7554
7808
  for (let id in this.indexes) {
7555
7809
  this.indexes[id] = this.indexes[id] + nodes.length;
7556
7810
  }
@@ -7564,7 +7818,8 @@ let Container$7 = class Container2 extends Node$2 {
7564
7818
  return this;
7565
7819
  }
7566
7820
  removeAll() {
7567
- for (let node2 of this.proxyOf.nodes) node2.parent = void 0;
7821
+ for (let node2 of this.proxyOf.nodes)
7822
+ node2.parent = void 0;
7568
7823
  this.proxyOf.nodes = [];
7569
7824
  this.markDirty();
7570
7825
  return this;
@@ -7589,8 +7844,10 @@ let Container$7 = class Container2 extends Node$2 {
7589
7844
  opts = {};
7590
7845
  }
7591
7846
  this.walkDecls((decl) => {
7592
- if (opts.props && !opts.props.includes(decl.prop)) return;
7593
- if (opts.fast && !decl.value.includes(opts.fast)) return;
7847
+ if (opts.props && !opts.props.includes(decl.prop))
7848
+ return;
7849
+ if (opts.fast && !decl.value.includes(opts.fast))
7850
+ return;
7594
7851
  decl.value = decl.value.replace(pattern, callback);
7595
7852
  });
7596
7853
  this.markDirty();
@@ -7687,11 +7944,13 @@ let Container$7 = class Container2 extends Node$2 {
7687
7944
  });
7688
7945
  }
7689
7946
  get first() {
7690
- if (!this.proxyOf.nodes) return void 0;
7947
+ if (!this.proxyOf.nodes)
7948
+ return void 0;
7691
7949
  return this.proxyOf.nodes[0];
7692
7950
  }
7693
7951
  get last() {
7694
- if (!this.proxyOf.nodes) return void 0;
7952
+ if (!this.proxyOf.nodes)
7953
+ return void 0;
7695
7954
  return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
7696
7955
  }
7697
7956
  };
@@ -7753,7 +8012,8 @@ var document$1 = Document$3;
7753
8012
  Document$3.default = Document$3;
7754
8013
  let printed = {};
7755
8014
  var warnOnce$2 = function warnOnce2(message) {
7756
- if (printed[message]) return;
8015
+ if (printed[message])
8016
+ return;
7757
8017
  printed[message] = true;
7758
8018
  if (typeof console !== "undefined" && console.warn) {
7759
8019
  console.warn(message);
@@ -7770,7 +8030,8 @@ let Warning$2 = class Warning2 {
7770
8030
  this.endLine = range.end.line;
7771
8031
  this.endColumn = range.end.column;
7772
8032
  }
7773
- for (let opt in opts) this[opt] = opts[opt];
8033
+ for (let opt in opts)
8034
+ this[opt] = opts[opt];
7774
8035
  }
7775
8036
  toString() {
7776
8037
  if (this.node) {
@@ -7862,8 +8123,10 @@ var tokenize = function tokenizer2(input2, options = {}) {
7862
8123
  return returned.length === 0 && pos >= length;
7863
8124
  }
7864
8125
  function nextToken(opts) {
7865
- if (returned.length) return returned.pop();
7866
- if (pos >= length) return;
8126
+ if (returned.length)
8127
+ return returned.pop();
8128
+ if (pos >= length)
8129
+ return;
7867
8130
  let ignoreUnclosed = opts ? opts.ignoreUnclosed : false;
7868
8131
  code = css.charCodeAt(pos);
7869
8132
  switch (code) {
@@ -8035,11 +8298,13 @@ let AtRule$3 = class AtRule2 extends Container$5 {
8035
8298
  this.type = "atrule";
8036
8299
  }
8037
8300
  append(...children) {
8038
- if (!this.proxyOf.nodes) this.nodes = [];
8301
+ if (!this.proxyOf.nodes)
8302
+ this.nodes = [];
8039
8303
  return super.append(...children);
8040
8304
  }
8041
8305
  prepend(...children) {
8042
- if (!this.proxyOf.nodes) this.nodes = [];
8306
+ if (!this.proxyOf.nodes)
8307
+ this.nodes = [];
8043
8308
  return super.prepend(...children);
8044
8309
  }
8045
8310
  };
@@ -8053,7 +8318,8 @@ let Root$5 = class Root2 extends Container$4 {
8053
8318
  constructor(defaults) {
8054
8319
  super(defaults);
8055
8320
  this.type = "root";
8056
- if (!this.nodes) this.nodes = [];
8321
+ if (!this.nodes)
8322
+ this.nodes = [];
8057
8323
  }
8058
8324
  normalize(child, sample, type) {
8059
8325
  let nodes = super.normalize(child);
@@ -8124,19 +8390,23 @@ let list$2 = {
8124
8390
  } else if (letter === "(") {
8125
8391
  func += 1;
8126
8392
  } else if (letter === ")") {
8127
- if (func > 0) func -= 1;
8393
+ if (func > 0)
8394
+ func -= 1;
8128
8395
  } else if (func === 0) {
8129
- if (separators.includes(letter)) split = true;
8396
+ if (separators.includes(letter))
8397
+ split = true;
8130
8398
  }
8131
8399
  if (split) {
8132
- if (current !== "") array.push(current.trim());
8400
+ if (current !== "")
8401
+ array.push(current.trim());
8133
8402
  current = "";
8134
8403
  split = false;
8135
8404
  } else {
8136
8405
  current += letter;
8137
8406
  }
8138
8407
  }
8139
- if (last || current !== "") array.push(current.trim());
8408
+ if (last || current !== "")
8409
+ array.push(current.trim());
8140
8410
  return array;
8141
8411
  }
8142
8412
  };
@@ -8148,7 +8418,8 @@ let Rule$3 = class Rule2 extends Container$3 {
8148
8418
  constructor(defaults) {
8149
8419
  super(defaults);
8150
8420
  this.type = "rule";
8151
- if (!this.nodes) this.nodes = [];
8421
+ if (!this.nodes)
8422
+ this.nodes = [];
8152
8423
  }
8153
8424
  get selectors() {
8154
8425
  return list$1.comma(this.selector);
@@ -8176,7 +8447,8 @@ function findLastWithPosition(tokens) {
8176
8447
  for (let i2 = tokens.length - 1; i2 >= 0; i2--) {
8177
8448
  let token = tokens[i2];
8178
8449
  let pos = token[3] || token[2];
8179
- if (pos) return pos;
8450
+ if (pos)
8451
+ return pos;
8180
8452
  }
8181
8453
  }
8182
8454
  let Parser$1 = class Parser2 {
@@ -8269,14 +8541,16 @@ let Parser$1 = class Parser2 {
8269
8541
  }
8270
8542
  checkMissedSemicolon(tokens) {
8271
8543
  let colon = this.colon(tokens);
8272
- if (colon === false) return;
8544
+ if (colon === false)
8545
+ return;
8273
8546
  let founded = 0;
8274
8547
  let token;
8275
8548
  for (let j = colon - 1; j >= 0; j--) {
8276
8549
  token = tokens[j];
8277
8550
  if (token[0] !== "space") {
8278
8551
  founded += 1;
8279
- if (founded === 2) break;
8552
+ if (founded === 2)
8553
+ break;
8280
8554
  }
8281
8555
  }
8282
8556
  throw this.input.error(
@@ -8342,7 +8616,8 @@ let Parser$1 = class Parser2 {
8342
8616
  );
8343
8617
  node2.source.end.offset++;
8344
8618
  while (tokens[0][0] !== "word") {
8345
- if (tokens.length === 1) this.unknownWord(tokens);
8619
+ if (tokens.length === 1)
8620
+ this.unknownWord(tokens);
8346
8621
  node2.raws.before += tokens.shift()[1];
8347
8622
  }
8348
8623
  node2.source.start = this.getPosition(tokens[0][2]);
@@ -8376,7 +8651,8 @@ let Parser$1 = class Parser2 {
8376
8651
  let next;
8377
8652
  while (tokens.length) {
8378
8653
  next = tokens[0][0];
8379
- if (next !== "space" && next !== "comment") break;
8654
+ if (next !== "space" && next !== "comment")
8655
+ break;
8380
8656
  firstSpaces.push(tokens.shift());
8381
8657
  }
8382
8658
  this.precheckMissedSemicolon(tokens);
@@ -8386,7 +8662,8 @@ let Parser$1 = class Parser2 {
8386
8662
  node2.important = true;
8387
8663
  let string = this.stringFrom(tokens, i2);
8388
8664
  string = this.spacesFromEnd(tokens) + string;
8389
- if (string !== " !important") node2.raws.important = string;
8665
+ if (string !== " !important")
8666
+ node2.raws.important = string;
8390
8667
  break;
8391
8668
  } else if (token[1].toLowerCase() === "important") {
8392
8669
  let cache = tokens.slice(0);
@@ -8448,7 +8725,8 @@ let Parser$1 = class Parser2 {
8448
8725
  }
8449
8726
  }
8450
8727
  endFile() {
8451
- if (this.current.parent) this.unclosedBlock();
8728
+ if (this.current.parent)
8729
+ this.unclosedBlock();
8452
8730
  if (this.current.nodes && this.current.nodes.length) {
8453
8731
  this.current.raws.semicolon = this.semicolon;
8454
8732
  }
@@ -8482,7 +8760,8 @@ let Parser$1 = class Parser2 {
8482
8760
  };
8483
8761
  node2.raws.before = this.spaces;
8484
8762
  this.spaces = "";
8485
- if (node2.type !== "comment") this.semicolon = false;
8763
+ if (node2.type !== "comment")
8764
+ this.semicolon = false;
8486
8765
  }
8487
8766
  other(start) {
8488
8767
  let end = false;
@@ -8497,10 +8776,12 @@ let Parser$1 = class Parser2 {
8497
8776
  type = token[0];
8498
8777
  tokens.push(token);
8499
8778
  if (type === "(" || type === "[") {
8500
- if (!bracket) bracket = token;
8779
+ if (!bracket)
8780
+ bracket = token;
8501
8781
  brackets.push(type === "(" ? ")" : "]");
8502
8782
  } else if (customProperty && colon && type === "{") {
8503
- if (!bracket) bracket = token;
8783
+ if (!bracket)
8784
+ bracket = token;
8504
8785
  brackets.push("}");
8505
8786
  } else if (brackets.length === 0) {
8506
8787
  if (type === ";") {
@@ -8522,17 +8803,21 @@ let Parser$1 = class Parser2 {
8522
8803
  }
8523
8804
  } else if (type === brackets[brackets.length - 1]) {
8524
8805
  brackets.pop();
8525
- if (brackets.length === 0) bracket = null;
8806
+ if (brackets.length === 0)
8807
+ bracket = null;
8526
8808
  }
8527
8809
  token = this.tokenizer.nextToken();
8528
8810
  }
8529
- if (this.tokenizer.endOfFile()) end = true;
8530
- if (brackets.length > 0) this.unclosedBracket(bracket);
8811
+ if (this.tokenizer.endOfFile())
8812
+ end = true;
8813
+ if (brackets.length > 0)
8814
+ this.unclosedBracket(bracket);
8531
8815
  if (end && colon) {
8532
8816
  if (!customProperty) {
8533
8817
  while (tokens.length) {
8534
8818
  token = tokens[tokens.length - 1][0];
8535
- if (token !== "space" && token !== "comment") break;
8819
+ if (token !== "space" && token !== "comment")
8820
+ break;
8536
8821
  this.tokenizer.back(tokens.pop());
8537
8822
  }
8538
8823
  }
@@ -8619,7 +8904,8 @@ let Parser$1 = class Parser2 {
8619
8904
  let spaces = "";
8620
8905
  while (tokens.length) {
8621
8906
  lastTokenType = tokens[tokens.length - 1][0];
8622
- if (lastTokenType !== "space" && lastTokenType !== "comment") break;
8907
+ if (lastTokenType !== "space" && lastTokenType !== "comment")
8908
+ break;
8623
8909
  spaces = tokens.pop()[1] + spaces;
8624
8910
  }
8625
8911
  return spaces;
@@ -8630,7 +8916,8 @@ let Parser$1 = class Parser2 {
8630
8916
  let spaces = "";
8631
8917
  while (tokens.length) {
8632
8918
  next = tokens[0][0];
8633
- if (next !== "space" && next !== "comment") break;
8919
+ if (next !== "space" && next !== "comment")
8920
+ break;
8634
8921
  spaces += tokens.shift()[1];
8635
8922
  }
8636
8923
  return spaces;
@@ -8640,7 +8927,8 @@ let Parser$1 = class Parser2 {
8640
8927
  let spaces = "";
8641
8928
  while (tokens.length) {
8642
8929
  lastTokenType = tokens[tokens.length - 1][0];
8643
- if (lastTokenType !== "space") break;
8930
+ if (lastTokenType !== "space")
8931
+ break;
8644
8932
  spaces = tokens.pop()[1] + spaces;
8645
8933
  }
8646
8934
  return spaces;
@@ -8802,7 +9090,8 @@ function toStack(node2) {
8802
9090
  }
8803
9091
  function cleanMarks(node2) {
8804
9092
  node2[isClean] = false;
8805
- if (node2.nodes) node2.nodes.forEach((i2) => cleanMarks(i2));
9093
+ if (node2.nodes)
9094
+ node2.nodes.forEach((i2) => cleanMarks(i2));
8806
9095
  return node2;
8807
9096
  }
8808
9097
  let postcss$2 = {};
@@ -8816,15 +9105,20 @@ let LazyResult$2 = class LazyResult2 {
8816
9105
  } else if (css instanceof LazyResult2 || css instanceof Result$2) {
8817
9106
  root2 = cleanMarks(css.root);
8818
9107
  if (css.map) {
8819
- if (typeof opts.map === "undefined") opts.map = {};
8820
- if (!opts.map.inline) opts.map.inline = false;
9108
+ if (typeof opts.map === "undefined")
9109
+ opts.map = {};
9110
+ if (!opts.map.inline)
9111
+ opts.map.inline = false;
8821
9112
  opts.map.prev = css.map;
8822
9113
  }
8823
9114
  } else {
8824
9115
  let parser2 = parse$2;
8825
- if (opts.syntax) parser2 = opts.syntax.parse;
8826
- if (opts.parser) parser2 = opts.parser;
8827
- if (parser2.parse) parser2 = parser2.parse;
9116
+ if (opts.syntax)
9117
+ parser2 = opts.syntax.parse;
9118
+ if (opts.parser)
9119
+ parser2 = opts.parser;
9120
+ if (parser2.parse)
9121
+ parser2 = parser2.parse;
8828
9122
  try {
8829
9123
  root2 = parser2(css, opts);
8830
9124
  } catch (error) {
@@ -8846,8 +9140,10 @@ let LazyResult$2 = class LazyResult2 {
8846
9140
  });
8847
9141
  }
8848
9142
  async() {
8849
- if (this.error) return Promise.reject(this.error);
8850
- if (this.processed) return Promise.resolve(this.result);
9143
+ if (this.error)
9144
+ return Promise.reject(this.error);
9145
+ if (this.processed)
9146
+ return Promise.resolve(this.result);
8851
9147
  if (!this.processing) {
8852
9148
  this.processing = this.runAsync();
8853
9149
  }
@@ -8865,7 +9161,8 @@ let LazyResult$2 = class LazyResult2 {
8865
9161
  handleError(error, node2) {
8866
9162
  let plugin22 = this.result.lastPlugin;
8867
9163
  try {
8868
- if (node2) node2.addToError(error);
9164
+ if (node2)
9165
+ node2.addToError(error);
8869
9166
  this.error = error;
8870
9167
  if (error.name === "CssSyntaxError" && !error.plugin) {
8871
9168
  error.plugin = plugin22.postcssPlugin;
@@ -8885,14 +9182,16 @@ let LazyResult$2 = class LazyResult2 {
8885
9182
  }
8886
9183
  }
8887
9184
  } catch (err) {
8888
- if (console && console.error) console.error(err);
9185
+ if (console && console.error)
9186
+ console.error(err);
8889
9187
  }
8890
9188
  return error;
8891
9189
  }
8892
9190
  prepareVisitors() {
8893
9191
  this.listeners = {};
8894
9192
  let add = (plugin22, type, cb) => {
8895
- if (!this.listeners[type]) this.listeners[type] = [];
9193
+ if (!this.listeners[type])
9194
+ this.listeners[type] = [];
8896
9195
  this.listeners[type].push([plugin22, cb]);
8897
9196
  };
8898
9197
  for (let plugin22 of this.plugins) {
@@ -8999,15 +9298,20 @@ let LazyResult$2 = class LazyResult2 {
8999
9298
  }
9000
9299
  }
9001
9300
  stringify() {
9002
- if (this.error) throw this.error;
9003
- if (this.stringified) return this.result;
9301
+ if (this.error)
9302
+ throw this.error;
9303
+ if (this.stringified)
9304
+ return this.result;
9004
9305
  this.stringified = true;
9005
9306
  this.sync();
9006
9307
  let opts = this.result.opts;
9007
9308
  let str = stringify$2;
9008
- if (opts.syntax) str = opts.syntax.stringify;
9009
- if (opts.stringifier) str = opts.stringifier;
9010
- if (str.stringify) str = str.stringify;
9309
+ if (opts.syntax)
9310
+ str = opts.syntax.stringify;
9311
+ if (opts.stringifier)
9312
+ str = opts.stringifier;
9313
+ if (str.stringify)
9314
+ str = str.stringify;
9011
9315
  let map = new MapGenerator$1(str, this.result.root, this.result.opts);
9012
9316
  let data = map.generate();
9013
9317
  this.result.css = data[0];
@@ -9015,8 +9319,10 @@ let LazyResult$2 = class LazyResult2 {
9015
9319
  return this.result;
9016
9320
  }
9017
9321
  sync() {
9018
- if (this.error) throw this.error;
9019
- if (this.processed) return this.result;
9322
+ if (this.error)
9323
+ throw this.error;
9324
+ if (this.processed)
9325
+ return this.result;
9020
9326
  this.processed = true;
9021
9327
  if (this.processing) {
9022
9328
  throw this.getAsyncError();
@@ -9135,13 +9441,15 @@ let LazyResult$2 = class LazyResult2 {
9135
9441
  if (event === CHILDREN) {
9136
9442
  if (node2.nodes) {
9137
9443
  node2.each((child) => {
9138
- if (!child[isClean]) this.walkSync(child);
9444
+ if (!child[isClean])
9445
+ this.walkSync(child);
9139
9446
  });
9140
9447
  }
9141
9448
  } else {
9142
9449
  let visitors = this.listeners[event];
9143
9450
  if (visitors) {
9144
- if (this.visitSync(visitors, node2.toProxy())) return;
9451
+ if (this.visitSync(visitors, node2.toProxy()))
9452
+ return;
9145
9453
  }
9146
9454
  }
9147
9455
  }
@@ -9219,7 +9527,8 @@ let NoWorkResult$1 = class NoWorkResult2 {
9219
9527
  }
9220
9528
  }
9221
9529
  async() {
9222
- if (this.error) return Promise.reject(this.error);
9530
+ if (this.error)
9531
+ return Promise.reject(this.error);
9223
9532
  return Promise.resolve(this.result);
9224
9533
  }
9225
9534
  catch(onRejected) {
@@ -9229,7 +9538,8 @@ let NoWorkResult$1 = class NoWorkResult2 {
9229
9538
  return this.async().then(onFinally, onFinally);
9230
9539
  }
9231
9540
  sync() {
9232
- if (this.error) throw this.error;
9541
+ if (this.error)
9542
+ throw this.error;
9233
9543
  return this.result;
9234
9544
  }
9235
9545
  then(onFulfilled, onRejected) {
@@ -9349,7 +9659,8 @@ let Input$1 = input;
9349
9659
  let Root$1 = root;
9350
9660
  let Rule$1 = rule;
9351
9661
  function fromJSON$1(json, inputs) {
9352
- if (Array.isArray(json)) return json.map((n2) => fromJSON$1(n2));
9662
+ if (Array.isArray(json))
9663
+ return json.map((n2) => fromJSON$1(n2));
9353
9664
  let _a2 = json, { inputs: ownInputs } = _a2, defaults = __objRest(_a2, ["inputs"]);
9354
9665
  if (ownInputs) {
9355
9666
  inputs = [];
@@ -9435,7 +9746,8 @@ postcss.plugin = function plugin2(name, initializer) {
9435
9746
  let cache;
9436
9747
  Object.defineProperty(creator, "postcss", {
9437
9748
  get() {
9438
- if (!cache) cache = creator();
9749
+ if (!cache)
9750
+ cache = creator();
9439
9751
  return cache;
9440
9752
  }
9441
9753
  });
@@ -9521,7 +9833,8 @@ function toCSSText(style) {
9521
9833
  const properties = [];
9522
9834
  for (const name in style) {
9523
9835
  const value = style[name];
9524
- if (typeof value !== "string") continue;
9836
+ if (typeof value !== "string")
9837
+ continue;
9525
9838
  const normalizedName = hyphenate(name);
9526
9839
  properties.push(`${normalizedName}: ${value};`);
9527
9840
  }
@@ -9530,7 +9843,8 @@ function toCSSText(style) {
9530
9843
  const camelizeRE = /-([a-z])/g;
9531
9844
  const CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9-]+$/;
9532
9845
  const camelize = (str) => {
9533
- if (CUSTOM_PROPERTY_REGEX.test(str)) return str;
9846
+ if (CUSTOM_PROPERTY_REGEX.test(str))
9847
+ return str;
9534
9848
  return str.replace(camelizeRE, (_, c2) => c2 ? c2.toUpperCase() : "");
9535
9849
  };
9536
9850
  const hyphenateRE = /\B([A-Z])/g;
@@ -9563,11 +9877,15 @@ class BaseRRNode {
9563
9877
  return childNodes2;
9564
9878
  }
9565
9879
  contains(node2) {
9566
- if (!(node2 instanceof BaseRRNode)) return false;
9567
- else if (node2.ownerDocument !== this.ownerDocument) return false;
9568
- else if (node2 === this) return true;
9880
+ if (!(node2 instanceof BaseRRNode))
9881
+ return false;
9882
+ else if (node2.ownerDocument !== this.ownerDocument)
9883
+ return false;
9884
+ else if (node2 === this)
9885
+ return true;
9569
9886
  while (node2.parentNode) {
9570
- if (node2.parentNode === this) return true;
9887
+ if (node2.parentNode === this)
9888
+ return true;
9571
9889
  node2 = node2.parentNode;
9572
9890
  }
9573
9891
  return false;
@@ -9775,15 +10093,20 @@ class BaseRRElement extends BaseRRNode {
9775
10093
  const style = this.attributes.style ? parseCSSText(this.attributes.style) : {};
9776
10094
  const hyphenateRE2 = /\B([A-Z])/g;
9777
10095
  style.setProperty = (name, value, priority) => {
9778
- if (hyphenateRE2.test(name)) return;
10096
+ if (hyphenateRE2.test(name))
10097
+ return;
9779
10098
  const normalizedName = camelize(name);
9780
- if (!value) delete style[normalizedName];
9781
- else style[normalizedName] = value;
9782
- if (priority === "important") style[normalizedName] += " !important";
10099
+ if (!value)
10100
+ delete style[normalizedName];
10101
+ else
10102
+ style[normalizedName] = value;
10103
+ if (priority === "important")
10104
+ style[normalizedName] += " !important";
9783
10105
  this.attributes.style = toCSSText(style);
9784
10106
  };
9785
10107
  style.removeProperty = (name) => {
9786
- if (hyphenateRE2.test(name)) return "";
10108
+ if (hyphenateRE2.test(name))
10109
+ return "";
9787
10110
  const normalizedName = camelize(name);
9788
10111
  const value = style[normalizedName] || "";
9789
10112
  delete style[normalizedName];
@@ -9793,7 +10116,8 @@ class BaseRRElement extends BaseRRNode {
9793
10116
  return style;
9794
10117
  }
9795
10118
  getAttribute(name) {
9796
- if (this.attributes[name] === void 0) return null;
10119
+ if (this.attributes[name] === void 0)
10120
+ return null;
9797
10121
  return this.attributes[name];
9798
10122
  }
9799
10123
  setAttribute(name, attribute) {
@@ -9944,7 +10268,8 @@ class ClassList {
9944
10268
  __publicField2(this, "add", (...classNames) => {
9945
10269
  for (const item of classNames) {
9946
10270
  const className = String(item);
9947
- if (this.classes.indexOf(className) >= 0) continue;
10271
+ if (this.classes.indexOf(className) >= 0)
10272
+ continue;
9948
10273
  this.classes.push(className);
9949
10274
  }
9950
10275
  this.onChange && this.onChange(this.classes.join(" "));
@@ -9963,7 +10288,8 @@ class ClassList {
9963
10288
  }
9964
10289
  }
9965
10290
  function appendChild(parent, newChild) {
9966
- if (newChild.parentNode) newChild.parentNode.removeChild(newChild);
10291
+ if (newChild.parentNode)
10292
+ newChild.parentNode.removeChild(newChild);
9967
10293
  if (parent.lastChild) {
9968
10294
  parent.lastChild.nextSibling = newChild;
9969
10295
  newChild.previousSibling = parent.lastChild;
@@ -9979,18 +10305,23 @@ function appendChild(parent, newChild) {
9979
10305
  return newChild;
9980
10306
  }
9981
10307
  function insertBefore(parent, newChild, refChild) {
9982
- if (!refChild) return appendChild(parent, newChild);
10308
+ if (!refChild)
10309
+ return appendChild(parent, newChild);
9983
10310
  if (refChild.parentNode !== parent)
9984
10311
  throw new Error(
9985
10312
  "Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode."
9986
10313
  );
9987
- if (newChild === refChild) return newChild;
9988
- if (newChild.parentNode) newChild.parentNode.removeChild(newChild);
10314
+ if (newChild === refChild)
10315
+ return newChild;
10316
+ if (newChild.parentNode)
10317
+ newChild.parentNode.removeChild(newChild);
9989
10318
  newChild.previousSibling = refChild.previousSibling;
9990
10319
  refChild.previousSibling = newChild;
9991
10320
  newChild.nextSibling = refChild;
9992
- if (newChild.previousSibling) newChild.previousSibling.nextSibling = newChild;
9993
- else parent.firstChild = newChild;
10321
+ if (newChild.previousSibling)
10322
+ newChild.previousSibling.nextSibling = newChild;
10323
+ else
10324
+ parent.firstChild = newChild;
9994
10325
  newChild.parentElement = parent;
9995
10326
  newChild.parentNode = parent;
9996
10327
  newChild.ownerDocument = parent.ownerDocument;
@@ -10003,10 +10334,12 @@ function removeChild(parent, child) {
10003
10334
  );
10004
10335
  if (child.previousSibling)
10005
10336
  child.previousSibling.nextSibling = child.nextSibling;
10006
- else parent.firstChild = child.nextSibling;
10337
+ else
10338
+ parent.firstChild = child.nextSibling;
10007
10339
  if (child.nextSibling)
10008
10340
  child.nextSibling.previousSibling = child.previousSibling;
10009
- else parent.lastChild = child.previousSibling;
10341
+ else
10342
+ parent.lastChild = child.previousSibling;
10010
10343
  child.previousSibling = null;
10011
10344
  child.nextSibling = null;
10012
10345
  child.parentElement = null;
@@ -10119,7 +10452,8 @@ function diffBeforeUpdatingChildren(oldTree, newTree, replayer, rrnodeMirror) {
10119
10452
  switch (newRRElement.tagName) {
10120
10453
  case "IFRAME": {
10121
10454
  const oldContentDocument = oldTree.contentDocument;
10122
- if (!oldContentDocument) break;
10455
+ if (!oldContentDocument)
10456
+ break;
10123
10457
  diff(
10124
10458
  oldContentDocument,
10125
10459
  newTree.contentDocument,
@@ -10130,7 +10464,8 @@ function diffBeforeUpdatingChildren(oldTree, newTree, replayer, rrnodeMirror) {
10130
10464
  }
10131
10465
  }
10132
10466
  if (newRRElement.shadowRoot) {
10133
- if (!oldElement.shadowRoot) oldElement.attachShadow({ mode: "open" });
10467
+ if (!oldElement.shadowRoot)
10468
+ oldElement.attachShadow({ mode: "open" });
10134
10469
  diffChildren(
10135
10470
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
10136
10471
  oldElement.shadowRoot,
@@ -10214,11 +10549,14 @@ function diffAfterUpdatingChildren(oldTree, newTree, replayer) {
10214
10549
  const shouldBeModal = rrDialog.isModal;
10215
10550
  const modalChanged = wasModal !== shouldBeModal;
10216
10551
  const openChanged = wasOpen !== shouldBeOpen;
10217
- if (modalChanged || wasOpen && openChanged) dialog.close();
10552
+ if (modalChanged || wasOpen && openChanged)
10553
+ dialog.close();
10218
10554
  if (shouldBeOpen && (openChanged || modalChanged)) {
10219
10555
  try {
10220
- if (shouldBeModal) dialog.showModal();
10221
- else dialog.show();
10556
+ if (shouldBeModal)
10557
+ dialog.showModal();
10558
+ else
10559
+ dialog.show();
10222
10560
  } catch (e2) {
10223
10561
  console.warn(e2);
10224
10562
  }
@@ -10258,7 +10596,8 @@ function diffProps(oldTree, newTree, rrnodeMirror) {
10258
10596
  ctx.drawImage(image, 0, 0, image.width, image.height);
10259
10597
  }
10260
10598
  };
10261
- } else if (newTree.tagName === "IFRAME" && name === "srcdoc") continue;
10599
+ } else if (newTree.tagName === "IFRAME" && name === "srcdoc")
10600
+ continue;
10262
10601
  else {
10263
10602
  try {
10264
10603
  oldTree.setAttribute(name, newValue);
@@ -10268,14 +10607,16 @@ function diffProps(oldTree, newTree, rrnodeMirror) {
10268
10607
  }
10269
10608
  }
10270
10609
  for (const { name } of Array.from(oldAttributes))
10271
- if (!(name in newAttributes)) oldTree.removeAttribute(name);
10610
+ if (!(name in newAttributes))
10611
+ oldTree.removeAttribute(name);
10272
10612
  newTree.scrollLeft && (oldTree.scrollLeft = newTree.scrollLeft);
10273
10613
  newTree.scrollTop && (oldTree.scrollTop = newTree.scrollTop);
10274
10614
  }
10275
10615
  function diffChildren(oldTree, newTree, replayer, rrnodeMirror) {
10276
10616
  const oldChildren = Array.from(oldTree.childNodes);
10277
10617
  const newChildren = newTree.childNodes;
10278
- if (oldChildren.length === 0 && newChildren.length === 0) return;
10618
+ if (oldChildren.length === 0 && newChildren.length === 0)
10619
+ return;
10279
10620
  let oldStartIndex = 0, oldEndIndex = oldChildren.length - 1, newStartIndex = 0, newEndIndex = newChildren.length - 1;
10280
10621
  let oldStartNode = oldChildren[oldStartIndex], oldEndNode = oldChildren[oldEndIndex], newStartNode = newChildren[newStartIndex], newEndNode = newChildren[newEndIndex];
10281
10622
  let oldIdToIndex = void 0, indexInOld = void 0;
@@ -10386,7 +10727,8 @@ function diffChildren(oldTree, newTree, replayer, rrnodeMirror) {
10386
10727
  } else if (newStartIndex > newEndIndex) {
10387
10728
  for (; oldStartIndex <= oldEndIndex; oldStartIndex++) {
10388
10729
  const node2 = oldChildren[oldStartIndex];
10389
- if (!node2 || node2.parentNode !== oldTree) continue;
10730
+ if (!node2 || node2.parentNode !== oldTree)
10731
+ continue;
10390
10732
  try {
10391
10733
  oldTree.removeChild(node2);
10392
10734
  replayer.mirror.removeNodeFromMap(node2);
@@ -10407,8 +10749,10 @@ function createOrGetNode(rrNode, domMirror, rrnodeMirror) {
10407
10749
  const nodeId = rrnodeMirror.getId(rrNode);
10408
10750
  const sn = rrnodeMirror.getMeta(rrNode);
10409
10751
  let node2 = null;
10410
- if (nodeId > -1) node2 = domMirror.getNode(nodeId);
10411
- if (node2 !== null && sameNodeType(node2, rrNode)) return node2;
10752
+ if (nodeId > -1)
10753
+ node2 = domMirror.getNode(nodeId);
10754
+ if (node2 !== null && sameNodeType(node2, rrNode))
10755
+ return node2;
10412
10756
  switch (rrNode.RRNodeType) {
10413
10757
  case NodeType$1.Document:
10414
10758
  node2 = new Document();
@@ -10425,7 +10769,8 @@ function createOrGetNode(rrNode, domMirror, rrnodeMirror) {
10425
10769
  tagName = SVGTagMap[tagName] || tagName;
10426
10770
  if (sn && "isSVG" in sn && (sn == null ? void 0 : sn.isSVG)) {
10427
10771
  node2 = document.createElementNS(NAMESPACES["svg"], tagName);
10428
- } else node2 = document.createElement(rrNode.tagName);
10772
+ } else
10773
+ node2 = document.createElement(rrNode.tagName);
10429
10774
  break;
10430
10775
  }
10431
10776
  case NodeType$1.Text:
@@ -10438,7 +10783,8 @@ function createOrGetNode(rrNode, domMirror, rrnodeMirror) {
10438
10783
  node2 = document.createCDATASection(rrNode.data);
10439
10784
  break;
10440
10785
  }
10441
- if (sn) domMirror.add(node2, __spreadValues({}, sn));
10786
+ if (sn)
10787
+ domMirror.add(node2, __spreadValues({}, sn));
10442
10788
  try {
10443
10789
  createdNodeSet == null ? void 0 : createdNodeSet.add(node2);
10444
10790
  } catch (e2) {
@@ -10446,13 +10792,15 @@ function createOrGetNode(rrNode, domMirror, rrnodeMirror) {
10446
10792
  return node2;
10447
10793
  }
10448
10794
  function sameNodeType(node1, node2) {
10449
- if (node1.nodeType !== node2.nodeType) return false;
10795
+ if (node1.nodeType !== node2.nodeType)
10796
+ return false;
10450
10797
  return node1.nodeType !== node1.ELEMENT_NODE || node1.tagName.toUpperCase() === node2.tagName;
10451
10798
  }
10452
10799
  function nodeMatching(node1, node2, domMirror, rrdomMirror) {
10453
10800
  const node1Id = domMirror.getId(node1);
10454
10801
  const node2Id = rrdomMirror.getId(node2);
10455
- if (node1Id === -1 || node1Id !== node2Id) return false;
10802
+ if (node1Id === -1 || node1Id !== node2Id)
10803
+ return false;
10456
10804
  return sameNodeType(node1, node2);
10457
10805
  }
10458
10806
  class RRDocument extends BaseRRDocument {
@@ -10643,7 +10991,8 @@ function buildFromNode(node2, rrdom, domMirror, parentRRNode) {
10643
10991
  function buildFromDom(dom, domMirror = createMirror$1(), rrdom = new RRDocument()) {
10644
10992
  function walk2(node2, parentRRNode) {
10645
10993
  const rrNode = buildFromNode(node2, rrdom, domMirror, parentRRNode);
10646
- if (rrNode === null) return;
10994
+ if (rrNode === null)
10995
+ return;
10647
10996
  if (
10648
10997
  // if the parentRRNode isn't a RRIFrameElement
10649
10998
  (parentRRNode == null ? void 0 : parentRRNode.nodeName) !== "IFRAME" && // if node isn't a shadow root
@@ -10675,7 +11024,8 @@ class Mirror22 {
10675
11024
  }
10676
11025
  getId(n2) {
10677
11026
  var _a2;
10678
- if (!n2) return -1;
11027
+ if (!n2)
11028
+ return -1;
10679
11029
  const id = (_a2 = this.getMeta(n2)) == null ? void 0 : _a2.id;
10680
11030
  return id != null ? id : -1;
10681
11031
  }
@@ -10712,7 +11062,8 @@ class Mirror22 {
10712
11062
  const oldNode = this.getNode(id);
10713
11063
  if (oldNode) {
10714
11064
  const meta = this.nodeMetaMap.get(oldNode);
10715
- if (meta) this.nodeMetaMap.set(n2, meta);
11065
+ if (meta)
11066
+ this.nodeMetaMap.set(n2, meta);
10716
11067
  }
10717
11068
  this.idNodeMap.set(id, n2);
10718
11069
  }
@@ -10819,10 +11170,12 @@ function getUntaintedPrototype(key) {
10819
11170
  const iframeEl = document.createElement("iframe");
10820
11171
  document.body.appendChild(iframeEl);
10821
11172
  const win = iframeEl.contentWindow;
10822
- if (!win) return defaultObj.prototype;
11173
+ if (!win)
11174
+ return defaultObj.prototype;
10823
11175
  const untaintedObject = win[key].prototype;
10824
11176
  document.body.removeChild(iframeEl);
10825
- if (!untaintedObject) return defaultPrototype;
11177
+ if (!untaintedObject)
11178
+ return defaultPrototype;
10826
11179
  return untaintedBasePrototype[key] = untaintedObject;
10827
11180
  } catch (e2) {
10828
11181
  return defaultPrototype;
@@ -10841,7 +11194,8 @@ function getUntaintedAccessor(key, instance, accessor) {
10841
11194
  untaintedPrototype,
10842
11195
  accessor
10843
11196
  )) == null ? void 0 : _a2.get;
10844
- if (!untaintedAccessor) return instance[accessor];
11197
+ if (!untaintedAccessor)
11198
+ return instance[accessor];
10845
11199
  untaintedAccessorCache[cacheKey] = untaintedAccessor;
10846
11200
  return untaintedAccessor.call(instance);
10847
11201
  }
@@ -10854,7 +11208,8 @@ function getUntaintedMethod(key, instance, method) {
10854
11208
  );
10855
11209
  const untaintedPrototype = getUntaintedPrototype(key);
10856
11210
  const untaintedMethod = untaintedPrototype[method];
10857
- if (typeof untaintedMethod !== "function") return instance[method];
11211
+ if (typeof untaintedMethod !== "function")
11212
+ return instance[method];
10858
11213
  untaintedMethodCache[cacheKey] = untaintedMethod;
10859
11214
  return untaintedMethod.bind(instance);
10860
11215
  }
@@ -10877,14 +11232,16 @@ function getRootNode(n2) {
10877
11232
  return getUntaintedMethod("Node", n2, "getRootNode")();
10878
11233
  }
10879
11234
  function host(n2) {
10880
- if (!n2 || !("host" in n2)) return null;
11235
+ if (!n2 || !("host" in n2))
11236
+ return null;
10881
11237
  return getUntaintedAccessor("ShadowRoot", n2, "host");
10882
11238
  }
10883
11239
  function styleSheets(n2) {
10884
11240
  return n2.styleSheets;
10885
11241
  }
10886
11242
  function shadowRoot(n2) {
10887
- if (!n2 || !("shadowRoot" in n2)) return null;
11243
+ if (!n2 || !("shadowRoot" in n2))
11244
+ return null;
10888
11245
  return getUntaintedAccessor("Element", n2, "shadowRoot");
10889
11246
  }
10890
11247
  function querySelector(n2, selectors) {
@@ -11092,16 +11449,21 @@ function isBlocked(node2, blockClass, blockSelector, checkAncestors) {
11092
11449
  }
11093
11450
  try {
11094
11451
  if (typeof blockClass === "string") {
11095
- if (el.classList.contains(blockClass)) return true;
11096
- if (checkAncestors && el.closest("." + blockClass) !== null) return true;
11452
+ if (el.classList.contains(blockClass))
11453
+ return true;
11454
+ if (checkAncestors && el.closest("." + blockClass) !== null)
11455
+ return true;
11097
11456
  } else {
11098
- if (classMatchesRegex(el, blockClass, checkAncestors)) return true;
11457
+ if (classMatchesRegex(el, blockClass, checkAncestors))
11458
+ return true;
11099
11459
  }
11100
11460
  } catch (e2) {
11101
11461
  }
11102
11462
  if (blockSelector) {
11103
- if (el.matches(blockSelector)) return true;
11104
- if (checkAncestors && el.closest(blockSelector) !== null) return true;
11463
+ if (el.matches(blockSelector))
11464
+ return true;
11465
+ if (checkAncestors && el.closest(blockSelector) !== null)
11466
+ return true;
11105
11467
  }
11106
11468
  return false;
11107
11469
  }
@@ -11216,7 +11578,8 @@ function getBaseDimension(node2, rootIframe) {
11216
11578
  };
11217
11579
  }
11218
11580
  function hasShadowRoot(n2) {
11219
- if (!n2) return false;
11581
+ if (!n2)
11582
+ return false;
11220
11583
  if (n2 instanceof BaseRRNode && "shadowRoot" in n2) {
11221
11584
  return Boolean(n2.shadowRoot);
11222
11585
  }
@@ -11267,11 +11630,13 @@ class StyleSheetMirror {
11267
11630
  * @returns If the stylesheet is in the mirror, returns the id of the stylesheet. If not, return the new assigned id.
11268
11631
  */
11269
11632
  add(stylesheet, id) {
11270
- if (this.has(stylesheet)) return this.getId(stylesheet);
11633
+ if (this.has(stylesheet))
11634
+ return this.getId(stylesheet);
11271
11635
  let newId;
11272
11636
  if (id === void 0) {
11273
11637
  newId = this.id++;
11274
- } else newId = id;
11638
+ } else
11639
+ newId = id;
11275
11640
  this.styleIDMap.set(stylesheet, newId);
11276
11641
  this.idStyleMap.set(newId, stylesheet);
11277
11642
  return newId;
@@ -11304,13 +11669,15 @@ function getRootShadowHost(n2) {
11304
11669
  }
11305
11670
  function shadowHostInDom(n2) {
11306
11671
  const doc = n2.ownerDocument;
11307
- if (!doc) return false;
11672
+ if (!doc)
11673
+ return false;
11308
11674
  const shadowHost = getRootShadowHost(n2);
11309
11675
  return index.contains(doc, shadowHost);
11310
11676
  }
11311
11677
  function inDom(n2) {
11312
11678
  const doc = n2.ownerDocument;
11313
- if (!doc) return false;
11679
+ if (!doc)
11680
+ return false;
11314
11681
  return index.contains(doc, n2) || shadowHostInDom(n2);
11315
11682
  }
11316
11683
  const utils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
@@ -11685,7 +12052,8 @@ class MutationBuffer {
11685
12052
  if (_node) {
11686
12053
  const parentId = this.mirror.getId(index.parentNode(_node.value));
11687
12054
  const nextId = getNextId(_node.value);
11688
- if (nextId === -1) continue;
12055
+ if (nextId === -1)
12056
+ continue;
11689
12057
  else if (parentId !== -1) {
11690
12058
  node2 = _node;
11691
12059
  break;
@@ -11994,8 +12362,10 @@ class MutationBuffer {
11994
12362
  if (this.addedSet.has(n2)) {
11995
12363
  deepDelete(this.addedSet, n2);
11996
12364
  this.droppedSet.add(n2);
11997
- } else if (this.addedSet.has(m.target) && nodeId === -1) ;
11998
- else if (isAncestorRemoved(m.target, this.mirror)) ;
12365
+ } else if (this.addedSet.has(m.target) && nodeId === -1)
12366
+ ;
12367
+ else if (isAncestorRemoved(m.target, this.mirror))
12368
+ ;
11999
12369
  else if (this.movedSet.has(n2) && this.movedMap[moveKey(nodeId, parentId)]) {
12000
12370
  deepDelete(this.movedSet, n2);
12001
12371
  } else {
@@ -12013,8 +12383,10 @@ class MutationBuffer {
12013
12383
  }
12014
12384
  });
12015
12385
  __publicField(this, "genAdds", (n2, target) => {
12016
- if (this.processedNodeManager.inOtherBuffer(n2, this)) return;
12017
- if (this.addedSet.has(n2) || this.movedSet.has(n2)) return;
12386
+ if (this.processedNodeManager.inOtherBuffer(n2, this))
12387
+ return;
12388
+ if (this.addedSet.has(n2) || this.movedSet.has(n2))
12389
+ return;
12018
12390
  if (this.mirror.hasNode(n2)) {
12019
12391
  if (isIgnored(n2, this.mirror, this.slimDOMOptions)) {
12020
12392
  return;
@@ -12110,23 +12482,27 @@ function processRemoves(n2, cache) {
12110
12482
  const queue = [n2];
12111
12483
  while (queue.length) {
12112
12484
  const next = queue.pop();
12113
- if (cache.has(next)) continue;
12485
+ if (cache.has(next))
12486
+ continue;
12114
12487
  cache.add(next);
12115
12488
  index.childNodes(next).forEach((n22) => queue.push(n22));
12116
12489
  }
12117
12490
  return;
12118
12491
  }
12119
12492
  function isParentRemoved(removes, n2, mirror2) {
12120
- if (removes.size === 0) return false;
12493
+ if (removes.size === 0)
12494
+ return false;
12121
12495
  return _isParentRemoved(removes, n2);
12122
12496
  }
12123
12497
  function _isParentRemoved(removes, n2, _mirror2) {
12124
12498
  const node2 = index.parentNode(n2);
12125
- if (!node2) return false;
12499
+ if (!node2)
12500
+ return false;
12126
12501
  return removes.has(node2);
12127
12502
  }
12128
12503
  function isAncestorInSet(set, n2) {
12129
- if (set.size === 0) return false;
12504
+ if (set.size === 0)
12505
+ return false;
12130
12506
  return _isAncestorInSet(set, n2);
12131
12507
  }
12132
12508
  function _isAncestorInSet(set, n2) {
@@ -12300,7 +12676,8 @@ function initMouseInteractionObserver({
12300
12676
  } else if (MouseInteractions[eventKey] === MouseInteractions.MouseUp) {
12301
12677
  thisEventKey = "TouchEnd";
12302
12678
  }
12303
- } else if (pointerType === PointerTypes.Pen) ;
12679
+ } else if (pointerType === PointerTypes.Pen)
12680
+ ;
12304
12681
  } else if (legacy_isTouchEvent(event)) {
12305
12682
  pointerType = PointerTypes.Touch;
12306
12683
  }
@@ -12562,9 +12939,12 @@ function getNestedCSSRulePositions(rule2) {
12562
12939
  }
12563
12940
  function getIdAndStyleId(sheet, mirror2, styleMirror) {
12564
12941
  let id, styleId;
12565
- if (!sheet) return {};
12566
- if (sheet.ownerNode) id = mirror2.getId(sheet.ownerNode);
12567
- else styleId = styleMirror.getId(sheet);
12942
+ if (!sheet)
12943
+ return {};
12944
+ if (sheet.ownerNode)
12945
+ id = mirror2.getId(sheet.ownerNode);
12946
+ else
12947
+ styleId = styleMirror.getId(sheet);
12568
12948
  return {
12569
12949
  styleId,
12570
12950
  id
@@ -12769,8 +13149,10 @@ function initAdoptedStyleSheetObserver({
12769
13149
  }, host2) {
12770
13150
  var _a2, _b2, _c;
12771
13151
  let hostId = null;
12772
- if (host2.nodeName === "#document") hostId = mirror2.getId(host2);
12773
- else hostId = mirror2.getId(index.host(host2));
13152
+ if (host2.nodeName === "#document")
13153
+ hostId = mirror2.getId(host2);
13154
+ else
13155
+ hostId = mirror2.getId(index.host(host2));
12774
13156
  const patchTarget = host2.nodeName === "#document" ? (_a2 = host2.defaultView) == null ? void 0 : _a2.Document : (_c = (_b2 = host2.ownerDocument) == null ? void 0 : _b2.defaultView) == null ? void 0 : _c.ShadowRoot;
12775
13157
  const originalPropertyDescriptor = (patchTarget == null ? void 0 : patchTarget.prototype) ? Object.getOwnPropertyDescriptor(
12776
13158
  patchTarget == null ? void 0 : patchTarget.prototype,
@@ -12971,7 +13353,8 @@ function initSelectionObserver(param) {
12971
13353
  let collapsed = true;
12972
13354
  const updateSelection = callbackWrapper(() => {
12973
13355
  const selection = doc.getSelection();
12974
- if (!selection || collapsed && (selection == null ? void 0 : selection.isCollapsed)) return;
13356
+ if (!selection || collapsed && (selection == null ? void 0 : selection.isCollapsed))
13357
+ return;
12975
13358
  collapsed = selection.isCollapsed || false;
12976
13359
  const ranges = [];
12977
13360
  const count = selection.rangeCount || 0;
@@ -12979,7 +13362,8 @@ function initSelectionObserver(param) {
12979
13362
  const range = selection.getRangeAt(i2);
12980
13363
  const { startContainer, startOffset, endContainer, endOffset } = range;
12981
13364
  const blocked = isBlocked(startContainer, blockClass, blockSelector, true) || isBlocked(endContainer, blockClass, blockSelector, true);
12982
- if (blocked) continue;
13365
+ if (blocked)
13366
+ continue;
12983
13367
  ranges.push({
12984
13368
  start: mirror2.getId(startContainer),
12985
13369
  startOffset,
@@ -12997,8 +13381,9 @@ function initCustomElementObserver({
12997
13381
  customElementCb
12998
13382
  }) {
12999
13383
  const win = doc.defaultView;
13000
- if (!win || !win.customElements) return () => {
13001
- };
13384
+ if (!win || !win.customElements)
13385
+ return () => {
13386
+ };
13002
13387
  const restoreHandler = patch(
13003
13388
  win.customElements,
13004
13389
  "define",
@@ -13220,9 +13605,11 @@ class CrossOriginIframeMirror {
13220
13605
  }
13221
13606
  getRemoteId(iframe, id, map) {
13222
13607
  const remoteIdToIdMap = map || this.getRemoteIdToIdMap(iframe);
13223
- if (typeof id !== "number") return id;
13608
+ if (typeof id !== "number")
13609
+ return id;
13224
13610
  const remoteId = remoteIdToIdMap.get(id);
13225
- if (!remoteId) return -1;
13611
+ if (!remoteId)
13612
+ return -1;
13226
13613
  return remoteId;
13227
13614
  }
13228
13615
  getRemoteIds(iframe, ids) {
@@ -13323,9 +13710,11 @@ class IframeManager {
13323
13710
  crossOriginMessageEvent.origin !== crossOriginMessageEvent.data.origin)
13324
13711
  return;
13325
13712
  const iframeSourceWindow = message.source;
13326
- if (!iframeSourceWindow) return;
13713
+ if (!iframeSourceWindow)
13714
+ return;
13327
13715
  const iframeEl = this.crossOriginIframeMap.get(message.source);
13328
- if (!iframeEl) return;
13716
+ if (!iframeEl)
13717
+ return;
13329
13718
  const transformedEvent = this.transformCrossOriginEvent(
13330
13719
  iframeEl,
13331
13720
  crossOriginMessageEvent.data.event
@@ -13454,7 +13843,8 @@ class IframeManager {
13454
13843
  }
13455
13844
  replace(iframeMirror, obj, iframeEl, keys) {
13456
13845
  for (const key of keys) {
13457
- if (!Array.isArray(obj[key]) && typeof obj[key] !== "number") continue;
13846
+ if (!Array.isArray(obj[key]) && typeof obj[key] !== "number")
13847
+ continue;
13458
13848
  if (Array.isArray(obj[key])) {
13459
13849
  obj[key] = iframeMirror.getIds(
13460
13850
  iframeEl,
@@ -13481,7 +13871,8 @@ class IframeManager {
13481
13871
  }
13482
13872
  }
13483
13873
  patchRootIdOnNode(node2, rootId) {
13484
- if (node2.type !== NodeType.Document && !node2.rootId) node2.rootId = rootId;
13874
+ if (node2.type !== NodeType.Document && !node2.rootId)
13875
+ node2.rootId = rootId;
13485
13876
  if ("childNodes" in node2) {
13486
13877
  node2.childNodes.forEach((child) => {
13487
13878
  this.patchRootIdOnNode(child, rootId);
@@ -13508,8 +13899,10 @@ class ShadowDomManager {
13508
13899
  this.patchAttachShadow(Element, document);
13509
13900
  }
13510
13901
  addShadowRoot(shadowRoot2, doc) {
13511
- if (!isNativeShadowDom(shadowRoot2)) return;
13512
- if (this.shadowDoms.has(shadowRoot2)) return;
13902
+ if (!isNativeShadowDom(shadowRoot2))
13903
+ return;
13904
+ if (this.shadowDoms.has(shadowRoot2))
13905
+ return;
13513
13906
  this.shadowDoms.add(shadowRoot2);
13514
13907
  const observer = initMutationObserver(
13515
13908
  __spreadProps(__spreadValues({}, this.bypassOptions), {
@@ -13551,7 +13944,8 @@ class ShadowDomManager {
13551
13944
  * Monkey patch 'attachShadow' of an IFrameElement to observe newly added shadow doms.
13552
13945
  */
13553
13946
  observeAttachShadow(iframeElement) {
13554
- if (!iframeElement.contentWindow || !iframeElement.contentDocument) return;
13947
+ if (!iframeElement.contentWindow || !iframeElement.contentDocument)
13948
+ return;
13555
13949
  this.patchAttachShadow(
13556
13950
  iframeElement.contentWindow.Element,
13557
13951
  iframeElement.contentDocument
@@ -13808,7 +14202,8 @@ function initCanvasContextObserver(win, blockClass, blockSelector, setPreserveDr
13808
14202
  return function(contextType, ...args) {
13809
14203
  if (!isBlocked(this, blockClass, blockSelector, true)) {
13810
14204
  const ctxName = getNormalizedContextName(contextType);
13811
- if (!("__context" in this)) this.__context = ctxName;
14205
+ if (!("__context" in this))
14206
+ this.__context = ctxName;
13812
14207
  if (setPreserveDrawingBufferToTrue && ["webgl", "webgl2"].includes(ctxName)) {
13813
14208
  if (args[0] && typeof args[0] === "object") {
13814
14209
  const contextAttributes = args[0];
@@ -13925,7 +14320,8 @@ function WorkerWrapper(options) {
13925
14320
  let objURL;
13926
14321
  try {
13927
14322
  objURL = blob && (window.URL || window.webkitURL).createObjectURL(blob);
13928
- if (!objURL) throw "";
14323
+ if (!objURL)
14324
+ throw "";
13929
14325
  const worker = new Worker(objURL, {
13930
14326
  name: options == null ? void 0 : options.name
13931
14327
  });
@@ -14007,7 +14403,8 @@ class CanvasManager {
14007
14403
  worker.onmessage = (e2) => {
14008
14404
  const { id } = e2.data;
14009
14405
  snapshotInProgressMap.set(id, false);
14010
- if (!("base64" in e2.data)) return;
14406
+ if (!("base64" in e2.data))
14407
+ return;
14011
14408
  const { base64, type, width, height } = e2.data;
14012
14409
  this.mutationCb({
14013
14410
  id,
@@ -14060,8 +14457,10 @@ class CanvasManager {
14060
14457
  getCanvas().forEach(async (canvas) => {
14061
14458
  var _a2;
14062
14459
  const id = this.mirror.getId(canvas);
14063
- if (snapshotInProgressMap.get(id)) return;
14064
- if (canvas.width === 0 || canvas.height === 0) return;
14460
+ if (snapshotInProgressMap.get(id))
14461
+ return;
14462
+ if (canvas.width === 0 || canvas.height === 0)
14463
+ return;
14065
14464
  snapshotInProgressMap.set(id, true);
14066
14465
  if (["webgl", "webgl2"].includes(canvas.__context)) {
14067
14466
  const context = canvas.getContext(canvas.__context);
@@ -14140,7 +14539,8 @@ class CanvasManager {
14140
14539
  return;
14141
14540
  }
14142
14541
  const valuesWithType = this.pendingCanvasMutations.get(canvas);
14143
- if (!valuesWithType || id === -1) return;
14542
+ if (!valuesWithType || id === -1)
14543
+ return;
14144
14544
  const values = valuesWithType.map((value) => {
14145
14545
  const _a2 = value, { type: type2 } = _a2, rest = __objRest(_a2, ["type"]);
14146
14546
  return rest;
@@ -14175,12 +14575,14 @@ class StylesheetManager {
14175
14575
  this.trackLinkElement(linkEl);
14176
14576
  }
14177
14577
  trackLinkElement(linkEl) {
14178
- if (this.trackedLinkElements.has(linkEl)) return;
14578
+ if (this.trackedLinkElements.has(linkEl))
14579
+ return;
14179
14580
  this.trackedLinkElements.add(linkEl);
14180
14581
  this.trackStylesheetInLinkElement(linkEl);
14181
14582
  }
14182
14583
  adoptStyleSheets(sheets, hostId) {
14183
- if (sheets.length === 0) return;
14584
+ if (sheets.length === 0)
14585
+ return;
14184
14586
  const adoptedStyleSheetData = {
14185
14587
  id: hostId,
14186
14588
  styleIds: []
@@ -14197,10 +14599,12 @@ class StylesheetManager {
14197
14599
  index: index2
14198
14600
  }))
14199
14601
  });
14200
- } else styleId = this.styleMirror.getId(sheet);
14602
+ } else
14603
+ styleId = this.styleMirror.getId(sheet);
14201
14604
  adoptedStyleSheetData.styleIds.push(styleId);
14202
14605
  }
14203
- if (styles.length > 0) adoptedStyleSheetData.styles = styles;
14606
+ if (styles.length > 0)
14607
+ adoptedStyleSheetData.styles = styles;
14204
14608
  this.adoptedStyleSheetCb(adoptedStyleSheetData);
14205
14609
  }
14206
14610
  reset() {
@@ -14379,7 +14783,8 @@ class VisibilityManager {
14379
14783
  this.startPendingFlushLoop();
14380
14784
  }
14381
14785
  startPendingFlushLoop() {
14382
- if (this.disabled) return;
14786
+ if (this.disabled)
14787
+ return;
14383
14788
  const loop = (timestamp) => {
14384
14789
  if (timestamp - this.lastFlushTime >= this.rafThrottle) {
14385
14790
  this.lastFlushTime = timestamp;
@@ -14390,8 +14795,10 @@ class VisibilityManager {
14390
14795
  this.rafId = requestAnimationFrame(loop);
14391
14796
  }
14392
14797
  flushPendingVisibilityMutations() {
14393
- if (this.disabled) return;
14394
- if (this.frozen || this.locked || this.elements.size === 0) return;
14798
+ if (this.disabled)
14799
+ return;
14800
+ if (this.frozen || this.locked || this.elements.size === 0)
14801
+ return;
14395
14802
  const state = computeVisibility(this.elements, this.previousState, {
14396
14803
  root: this.root,
14397
14804
  threshold: this.threshold,
@@ -14437,17 +14844,20 @@ class VisibilityManager {
14437
14844
  }
14438
14845
  flushBuffer() {
14439
14846
  var _a2;
14440
- if (this.buffer.size === 0) return;
14847
+ if (this.buffer.size === 0)
14848
+ return;
14441
14849
  (_a2 = this.notifyActivity) == null ? void 0 : _a2.call(this, this.buffer.size);
14442
14850
  this.mutationCb({ mutations: Array.from(this.buffer.values()) });
14443
14851
  this.buffer.clear();
14444
14852
  }
14445
14853
  observe(el) {
14446
- if (this.disabled) return;
14854
+ if (this.disabled)
14855
+ return;
14447
14856
  this.elements.add(el);
14448
14857
  }
14449
14858
  unobserve(el) {
14450
- if (this.disabled) return;
14859
+ if (this.disabled)
14860
+ return;
14451
14861
  this.elements.delete(el);
14452
14862
  this.previousState.delete(el);
14453
14863
  this.pending.delete(el);
@@ -14468,7 +14878,8 @@ class VisibilityManager {
14468
14878
  this.elements.clear();
14469
14879
  this.previousState.clear();
14470
14880
  this.pending.clear();
14471
- if (this.rafId) cancelAnimationFrame(this.rafId);
14881
+ if (this.rafId)
14882
+ cancelAnimationFrame(this.rafId);
14472
14883
  }
14473
14884
  }
14474
14885
  let wrappedEmit;
@@ -14478,6 +14889,36 @@ let visibilityManager;
14478
14889
  let recording = false;
14479
14890
  const customEventQueue = [];
14480
14891
  let flushCustomEventQueue;
14892
+ function waitForDOMStabilization(win) {
14893
+ const maxWaitMs = 5e3;
14894
+ return new Promise((resolve2) => {
14895
+ const captureAfterPaint = () => {
14896
+ requestAnimationFrame(() => {
14897
+ requestAnimationFrame(() => {
14898
+ resolve2();
14899
+ });
14900
+ });
14901
+ };
14902
+ const safeResolve = /* @__PURE__ */ (() => {
14903
+ let called = false;
14904
+ return () => {
14905
+ if (!called) {
14906
+ called = true;
14907
+ captureAfterPaint();
14908
+ }
14909
+ };
14910
+ })();
14911
+ if (["interactive", "complete"].includes(win.document.readyState)) {
14912
+ safeResolve();
14913
+ } else {
14914
+ win.addEventListener("DOMContentLoaded", safeResolve, { once: true });
14915
+ win.addEventListener("load", safeResolve, { once: true });
14916
+ setTimeout(() => {
14917
+ safeResolve();
14918
+ }, maxWaitMs);
14919
+ }
14920
+ });
14921
+ }
14481
14922
  try {
14482
14923
  if (Array.from([1], (x2) => x2 * 2)[0] !== 2) {
14483
14924
  const cleanFrame = document.createElement("iframe");
@@ -14955,8 +15396,28 @@ function record(options = {}) {
14955
15396
  flushCustomEventQueue();
14956
15397
  }
14957
15398
  };
15399
+ const runInit = async () => {
15400
+ if (flushCustomEvent === "before") {
15401
+ flushCustomEventQueue();
15402
+ }
15403
+ if (recordAfter === "DOMContentStabilized") {
15404
+ console.log(`[rrweb] \u{1F7E2} Waiting for DOM stabilization...`);
15405
+ await waitForDOMStabilization(window);
15406
+ console.log(`[rrweb] \u2705 DOM stabilized, starting recording`);
15407
+ }
15408
+ takeFullSnapshot$1();
15409
+ handlers.push(observe(document));
15410
+ recording = true;
15411
+ if (flushCustomEvent === "after") {
15412
+ flushCustomEventQueue();
15413
+ }
15414
+ };
14958
15415
  if (document.readyState === "interactive" || document.readyState === "complete") {
14959
- init();
15416
+ if (recordAfter === "DOMContentStabilized") {
15417
+ void runInit();
15418
+ } else {
15419
+ init();
15420
+ }
14960
15421
  } else {
14961
15422
  handlers.push(
14962
15423
  on("DOMContentLoaded", () => {
@@ -14964,7 +15425,9 @@ function record(options = {}) {
14964
15425
  type: EventType.DomContentLoaded,
14965
15426
  data: {}
14966
15427
  });
14967
- if (recordAfter === "DOMContentLoaded") init();
15428
+ if (recordAfter === "DOMContentLoaded" || recordAfter === "DOMContentStabilized") {
15429
+ void runInit();
15430
+ }
14968
15431
  })
14969
15432
  );
14970
15433
  handlers.push(
@@ -14975,7 +15438,8 @@ function record(options = {}) {
14975
15438
  type: EventType.Load,
14976
15439
  data: {}
14977
15440
  });
14978
- if (recordAfter === "load") init();
15441
+ if (recordAfter === "load")
15442
+ void runInit();
14979
15443
  },
14980
15444
  window
14981
15445
  )
@@ -14992,6 +15456,7 @@ function record(options = {}) {
14992
15456
  console.warn(error);
14993
15457
  }
14994
15458
  }
15459
+ record.isRecording = () => recording;
14995
15460
  record.flushCustomEventQueue = () => {
14996
15461
  console.warn(`[rrweb] CustomEvent flushing: ${customEventQueue.length} events`);
14997
15462
  flushCustomEventQueue();
@@ -15365,17 +15830,20 @@ PERFORMANCE OF THIS SOFTWARE.
15365
15830
  ***************************************************************************** */
15366
15831
  function t(t2, n2) {
15367
15832
  var e2 = "function" == typeof Symbol && t2[Symbol.iterator];
15368
- if (!e2) return t2;
15833
+ if (!e2)
15834
+ return t2;
15369
15835
  var r2, o2, i2 = e2.call(t2), a2 = [];
15370
15836
  try {
15371
- for (; (void 0 === n2 || n2-- > 0) && !(r2 = i2.next()).done; ) a2.push(r2.value);
15837
+ for (; (void 0 === n2 || n2-- > 0) && !(r2 = i2.next()).done; )
15838
+ a2.push(r2.value);
15372
15839
  } catch (t3) {
15373
15840
  o2 = { error: t3 };
15374
15841
  } finally {
15375
15842
  try {
15376
15843
  r2 && !r2.done && (e2 = i2.return) && e2.call(i2);
15377
15844
  } finally {
15378
- if (o2) throw o2.error;
15845
+ if (o2)
15846
+ throw o2.error;
15379
15847
  }
15380
15848
  }
15381
15849
  return a2;
@@ -15429,14 +15897,17 @@ function s(n2, o2) {
15429
15897
  try {
15430
15898
  for (var h = function(t2) {
15431
15899
  var n3 = "function" == typeof Symbol && Symbol.iterator, e3 = n3 && t2[n3], r2 = 0;
15432
- if (e3) return e3.call(t2);
15433
- if (t2 && "number" == typeof t2.length) return { next: function() {
15434
- return t2 && r2 >= t2.length && (t2 = void 0), { value: t2 && t2[r2++], done: !t2 };
15435
- } };
15900
+ if (e3)
15901
+ return e3.call(t2);
15902
+ if (t2 && "number" == typeof t2.length)
15903
+ return { next: function() {
15904
+ return t2 && r2 >= t2.length && (t2 = void 0), { value: t2 && t2[r2++], done: !t2 };
15905
+ } };
15436
15906
  throw new TypeError(n3 ? "Object is not iterable." : "Symbol.iterator is not defined.");
15437
15907
  }(m), b = h.next(); !b.done; b = h.next()) {
15438
15908
  var S = b.value;
15439
- if (void 0 === S) return c(p, g);
15909
+ if (void 0 === S)
15910
+ return c(p, g);
15440
15911
  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() {
15441
15912
  return true;
15442
15913
  } : N, _ = void 0 === j, k = null != j ? j : p, T = n2.states[k];
@@ -15455,7 +15926,8 @@ function s(n2, o2) {
15455
15926
  try {
15456
15927
  b && !b.done && (l3 = h.return) && l3.call(h);
15457
15928
  } finally {
15458
- if (s3) throw s3.error;
15929
+ if (s3)
15930
+ throw s3.error;
15459
15931
  }
15460
15932
  }
15461
15933
  }
@@ -15752,12 +16224,14 @@ function variableListFor(ctx, ctor) {
15752
16224
  function deserializeArg(imageMap, ctx, preload) {
15753
16225
  return async (arg) => {
15754
16226
  if (arg && typeof arg === "object" && "rr_type" in arg) {
15755
- if (preload) preload.isUnchanged = false;
16227
+ if (preload)
16228
+ preload.isUnchanged = false;
15756
16229
  if (arg.rr_type === "ImageBitmap" && "args" in arg) {
15757
16230
  const args = await deserializeArg(imageMap, ctx, preload)(arg.args);
15758
16231
  return await createImageBitmap.apply(null, args);
15759
16232
  } else if ("index" in arg) {
15760
- if (preload || ctx === null) return arg;
16233
+ if (preload || ctx === null)
16234
+ return arg;
15761
16235
  const { rr_type: name, index: index2 } = arg;
15762
16236
  return variableListFor(ctx, name)[index2];
15763
16237
  } else if ("args" in arg) {
@@ -15821,11 +16295,14 @@ const WebGLVariableConstructorsNames = [
15821
16295
  "WebGLVertexArrayObject"
15822
16296
  ];
15823
16297
  function saveToWebGLVarMap(ctx, result2) {
15824
- if (!(result2 == null ? void 0 : result2.constructor)) return;
16298
+ if (!(result2 == null ? void 0 : result2.constructor))
16299
+ return;
15825
16300
  const { name } = result2.constructor;
15826
- if (!WebGLVariableConstructorsNames.includes(name)) return;
16301
+ if (!WebGLVariableConstructorsNames.includes(name))
16302
+ return;
15827
16303
  const variables = variableListFor(ctx, name);
15828
- if (!variables.includes(result2)) variables.push(result2);
16304
+ if (!variables.includes(result2))
16305
+ variables.push(result2);
15829
16306
  }
15830
16307
  async function webglMutation({
15831
16308
  mutation,
@@ -15836,7 +16313,8 @@ async function webglMutation({
15836
16313
  }) {
15837
16314
  try {
15838
16315
  const ctx = getContext(target, type);
15839
- if (!ctx) return;
16316
+ if (!ctx)
16317
+ return;
15840
16318
  if (mutation.setter) {
15841
16319
  ctx[mutation.property] = mutation.args[0];
15842
16320
  return;
@@ -15848,7 +16326,8 @@ async function webglMutation({
15848
16326
  const result2 = original.apply(ctx, args);
15849
16327
  saveToWebGLVarMap(ctx, result2);
15850
16328
  const debugMode = false;
15851
- if (debugMode) ;
16329
+ if (debugMode)
16330
+ ;
15852
16331
  } catch (error) {
15853
16332
  errorHandler2(mutation, error);
15854
16333
  }
@@ -15987,12 +16466,15 @@ class MediaManager {
15987
16466
  }
15988
16467
  }
15989
16468
  waitForMetadata(target) {
15990
- if (this.metadataCallbackMap.has(target)) return;
15991
- if (!("addEventListener" in target)) return;
16469
+ if (this.metadataCallbackMap.has(target))
16470
+ return;
16471
+ if (!("addEventListener" in target))
16472
+ return;
15992
16473
  const onLoadedMetadata = () => {
15993
16474
  this.metadataCallbackMap.delete(target);
15994
16475
  const mediaState = this.mediaMap.get(target);
15995
- if (!mediaState) return;
16476
+ if (!mediaState)
16477
+ return;
15996
16478
  this.seekTo({
15997
16479
  time: this.getCurrentTime(),
15998
16480
  target,
@@ -16026,7 +16508,8 @@ class MediaManager {
16026
16508
  }
16027
16509
  syncTargetWithState(target) {
16028
16510
  const mediaState = this.mediaMap.get(target);
16029
- if (!mediaState) return;
16511
+ if (!mediaState)
16512
+ return;
16030
16513
  const { muted, loop, volume, isPlaying } = mediaState;
16031
16514
  const playerIsPaused = this.service.state.matches("paused");
16032
16515
  const playbackRate = mediaState.playbackRate * this.speedService.state.context.timer.speed;
@@ -16057,10 +16540,12 @@ class MediaManager {
16057
16540
  }
16058
16541
  }
16059
16542
  addMediaElements(node2, timeOffset, mirror2) {
16060
- if (!["AUDIO", "VIDEO"].includes(node2.nodeName)) return;
16543
+ if (!["AUDIO", "VIDEO"].includes(node2.nodeName))
16544
+ return;
16061
16545
  const target = node2;
16062
16546
  const serializedNode = mirror2.getMeta(target);
16063
- if (!serializedNode || !("attributes" in serializedNode)) return;
16547
+ if (!serializedNode || !("attributes" in serializedNode))
16548
+ return;
16064
16549
  const playerIsPaused = this.service.state.matches("paused");
16065
16550
  const mediaAttributes = serializedNode.attributes;
16066
16551
  let isPlaying = false;
@@ -16069,7 +16554,8 @@ class MediaManager {
16069
16554
  } else {
16070
16555
  isPlaying = target.getAttribute("autoplay") !== null;
16071
16556
  }
16072
- if (isPlaying && playerIsPaused) target.pause();
16557
+ if (isPlaying && playerIsPaused)
16558
+ target.pause();
16073
16559
  let playbackRate = 1;
16074
16560
  if (typeof mediaAttributes.rr_mediaPlaybackRate === "number") {
16075
16561
  playbackRate = mediaAttributes.rr_mediaPlaybackRate;
@@ -16128,7 +16614,8 @@ class MediaManager {
16128
16614
  }
16129
16615
  }
16130
16616
  function applyDialogToTopLevel(node2, attributeMutation) {
16131
- if (node2.nodeName !== "DIALOG" || node2 instanceof BaseRRNode) return;
16617
+ if (node2.nodeName !== "DIALOG" || node2 instanceof BaseRRNode)
16618
+ return;
16132
16619
  const dialog = node2;
16133
16620
  const oldIsOpen = dialog.open;
16134
16621
  const oldIsModalState = oldIsOpen && dialog.matches("dialog:modal");
@@ -16137,18 +16624,24 @@ function applyDialogToTopLevel(node2, attributeMutation) {
16137
16624
  const newIsModalState = rrOpenMode === "modal";
16138
16625
  const newIsNonModalState = rrOpenMode === "non-modal";
16139
16626
  const modalStateChanged = oldIsModalState && newIsNonModalState || !oldIsModalState && newIsModalState;
16140
- if (oldIsOpen && !modalStateChanged) return;
16627
+ if (oldIsOpen && !modalStateChanged)
16628
+ return;
16141
16629
  if (!dialog.isConnected) {
16142
16630
  console.warn("dialog is not attached to the dom", dialog);
16143
16631
  return;
16144
16632
  }
16145
- if (oldIsOpen) dialog.close();
16146
- if (!newIsOpen) return;
16147
- if (newIsModalState) dialog.showModal();
16148
- else dialog.show();
16633
+ if (oldIsOpen)
16634
+ dialog.close();
16635
+ if (!newIsOpen)
16636
+ return;
16637
+ if (newIsModalState)
16638
+ dialog.showModal();
16639
+ else
16640
+ dialog.show();
16149
16641
  }
16150
16642
  function removeDialogFromTopLevel(node2, attributeMutation) {
16151
- if (node2.nodeName !== "DIALOG" || node2 instanceof BaseRRNode) return;
16643
+ if (node2.nodeName !== "DIALOG" || node2 instanceof BaseRRNode)
16644
+ return;
16152
16645
  const dialog = node2;
16153
16646
  if (!dialog.isConnected) {
16154
16647
  console.warn("dialog is not attached to the dom", dialog);
@@ -16310,7 +16803,8 @@ class Replayer {
16310
16803
  castFn();
16311
16804
  }
16312
16805
  for (const plugin3 of this.config.plugins || []) {
16313
- if (plugin3.handler) plugin3.handler(event, isSync, { replayer: this });
16806
+ if (plugin3.handler)
16807
+ plugin3.handler(event, isSync, { replayer: this });
16314
16808
  }
16315
16809
  this.service.send({ type: "CAST_EVENT", payload: { event } });
16316
16810
  const lastIndex = this.service.state.context.events.length - 1;
@@ -16363,7 +16857,8 @@ class Replayer {
16363
16857
  this.emitter.on(ReplayerEvents.Resize, this.handleResize);
16364
16858
  this.setupDom();
16365
16859
  for (const plugin3 of this.config.plugins || []) {
16366
- if (plugin3.getMirror) plugin3.getMirror({ nodeMirror: this.mirror });
16860
+ if (plugin3.getMirror)
16861
+ plugin3.getMirror({ nodeMirror: this.mirror });
16367
16862
  }
16368
16863
  this.emitter.on(ReplayerEvents.Flush, () => {
16369
16864
  if (this.usingVirtualDom) {
@@ -16389,7 +16884,8 @@ class Replayer {
16389
16884
  },
16390
16885
  afterAppend: (node2, id) => {
16391
16886
  for (const plugin3 of this.config.plugins || []) {
16392
- if (plugin3.onBuild) plugin3.onBuild(node2, { id, replayer: this });
16887
+ if (plugin3.onBuild)
16888
+ plugin3.onBuild(node2, { id, replayer: this });
16393
16889
  }
16394
16890
  }
16395
16891
  };
@@ -16843,7 +17339,8 @@ class Replayer {
16843
17339
  head
16844
17340
  );
16845
17341
  }
16846
- if (this.usingVirtualDom) return;
17342
+ if (this.usingVirtualDom)
17343
+ return;
16847
17344
  for (const plugin3 of this.config.plugins || []) {
16848
17345
  if (plugin3.onBuild)
16849
17346
  plugin3.onBuild(builtNode, {
@@ -17157,10 +17654,12 @@ class Replayer {
17157
17654
  case IncrementalSource.StyleSheetRule:
17158
17655
  case IncrementalSource.StyleDeclaration: {
17159
17656
  if (this.usingVirtualDom) {
17160
- if (d.styleId) this.constructedStyleMutations.push(d);
17657
+ if (d.styleId)
17658
+ this.constructedStyleMutations.push(d);
17161
17659
  else if (d.id)
17162
17660
  (_b2 = this.virtualDom.mirror.getNode(d.id)) == null ? void 0 : _b2.rules.push(d);
17163
- } else this.applyStyleSheetMutation(d);
17661
+ } else
17662
+ this.applyStyleSheetMutation(d);
17164
17663
  break;
17165
17664
  }
17166
17665
  case IncrementalSource.CanvasMutation: {
@@ -17216,8 +17715,10 @@ class Replayer {
17216
17715
  break;
17217
17716
  }
17218
17717
  case IncrementalSource.AdoptedStyleSheet: {
17219
- if (this.usingVirtualDom) this.adoptedStyleSheets.push(d);
17220
- else this.applyAdoptedStyleSheet(d);
17718
+ if (this.usingVirtualDom)
17719
+ this.adoptedStyleSheets.push(d);
17720
+ else
17721
+ this.applyAdoptedStyleSheet(d);
17221
17722
  break;
17222
17723
  }
17223
17724
  }
@@ -17240,7 +17741,8 @@ class Replayer {
17240
17741
  this.virtualDom,
17241
17742
  this.mirror
17242
17743
  );
17243
- if (virtualNode) value.node = virtualNode;
17744
+ if (virtualNode)
17745
+ value.node = virtualNode;
17244
17746
  } catch (error) {
17245
17747
  this.warn(error);
17246
17748
  }
@@ -17319,7 +17821,8 @@ class Replayer {
17319
17821
  if (!hasShadowRoot(parent)) {
17320
17822
  parent.attachShadow({ mode: "open" });
17321
17823
  parent = parent.shadowRoot;
17322
- } else parent = parent.shadowRoot;
17824
+ } else
17825
+ parent = parent.shadowRoot;
17323
17826
  }
17324
17827
  let previous = null;
17325
17828
  let next = null;
@@ -17344,10 +17847,12 @@ class Replayer {
17344
17847
  return;
17345
17848
  }
17346
17849
  const afterAppend = (node2, id) => {
17347
- if (this.usingVirtualDom) return;
17850
+ if (this.usingVirtualDom)
17851
+ return;
17348
17852
  applyDialogToTopLevel(node2);
17349
17853
  for (const plugin3 of this.config.plugins || []) {
17350
- if (plugin3.onBuild) plugin3.onBuild(node2, { id, replayer: this });
17854
+ if (plugin3.onBuild)
17855
+ plugin3.onBuild(node2, { id, replayer: this });
17351
17856
  }
17352
17857
  };
17353
17858
  const target = buildNodeWithSN(mutation.node, {
@@ -17482,7 +17987,8 @@ class Replayer {
17482
17987
  }
17483
17988
  if (this.usingVirtualDom) {
17484
17989
  const parent = target.parentNode;
17485
- if (((_a2 = parent == null ? void 0 : parent.rules) == null ? void 0 : _a2.length) > 0) parent.rules = [];
17990
+ if (((_a2 = parent == null ? void 0 : parent.rules) == null ? void 0 : _a2.length) > 0)
17991
+ parent.rules = [];
17486
17992
  }
17487
17993
  });
17488
17994
  d.attributes.forEach((mutation) => {
@@ -17635,7 +18141,8 @@ class Replayer {
17635
18141
  const ranges = d.ranges.map(({ start, startOffset, end, endOffset }) => {
17636
18142
  const startContainer = this.mirror.getNode(start);
17637
18143
  const endContainer = this.mirror.getNode(end);
17638
- if (!startContainer || !endContainer) return;
18144
+ if (!startContainer || !endContainer)
18145
+ return;
17639
18146
  const result2 = new Range();
17640
18147
  result2.setStart(startContainer, startOffset);
17641
18148
  result2.setEnd(endContainer, endOffset);
@@ -17658,10 +18165,12 @@ class Replayer {
17658
18165
  applyStyleSheetMutation(data) {
17659
18166
  var _a2;
17660
18167
  let styleSheet = null;
17661
- if (data.styleId) styleSheet = this.styleMirror.getStyle(data.styleId);
18168
+ if (data.styleId)
18169
+ styleSheet = this.styleMirror.getStyle(data.styleId);
17662
18170
  else if (data.id)
17663
18171
  styleSheet = ((_a2 = this.mirror.getNode(data.id)) == null ? void 0 : _a2.sheet) || null;
17664
- if (!styleSheet) return;
18172
+ if (!styleSheet)
18173
+ return;
17665
18174
  if (data.source === IncrementalSource.StyleSheetRule)
17666
18175
  this.applyStyleSheetRule(data, styleSheet);
17667
18176
  else if (data.source === IncrementalSource.StyleDeclaration)
@@ -17728,7 +18237,8 @@ class Replayer {
17728
18237
  applyAdoptedStyleSheet(data) {
17729
18238
  var _a2;
17730
18239
  const targetHost = this.mirror.getNode(data.id);
17731
- if (!targetHost) return;
18240
+ if (!targetHost)
18241
+ return;
17732
18242
  (_a2 = data.styles) == null ? void 0 : _a2.forEach((style) => {
17733
18243
  var _a3;
17734
18244
  let newStyleSheet = null;
@@ -17737,7 +18247,8 @@ class Replayer {
17737
18247
  hostWindow = ((_a3 = targetHost.ownerDocument) == null ? void 0 : _a3.defaultView) || null;
17738
18248
  else if (targetHost.nodeName === "#document")
17739
18249
  hostWindow = targetHost.defaultView;
17740
- if (!hostWindow) return;
18250
+ if (!hostWindow)
18251
+ return;
17741
18252
  try {
17742
18253
  newStyleSheet = new hostWindow.CSSStyleSheet();
17743
18254
  this.styleMirror.add(newStyleSheet, style.styleId);