@amplitude/rrweb-player 2.0.0-alpha.31 → 2.0.0-alpha.33

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.
@@ -4107,6 +4107,7 @@ postcss$1$1.Input;
4107
4107
  postcss$1$1.Rule;
4108
4108
  postcss$1$1.Root;
4109
4109
  postcss$1$1.Node;
4110
+ const customElementExclusions = ["webview"];
4110
4111
  const tagMap = {
4111
4112
  script: "noscript",
4112
4113
  // camel case svg element tag names
@@ -4228,7 +4229,8 @@ function buildNode(n2, options) {
4228
4229
  // If the tag name is a custom element name
4229
4230
  n2.isCustom && // If the browser supports custom elements
4230
4231
  ((_a2 = doc.defaultView) == null ? void 0 : _a2.customElements) && // If the custom element hasn't been defined yet
4231
- !doc.defaultView.customElements.get(n2.tagName)
4232
+ !doc.defaultView.customElements.get(n2.tagName) && // If the tag is not in the exclusion list
4233
+ !customElementExclusions.includes(n2.tagName)
4232
4234
  )
4233
4235
  doc.defaultView.customElements.define(
4234
4236
  n2.tagName,
@@ -9404,14 +9406,20 @@ const testableMethods = {
9404
9406
  MutationObserver: ["constructor"]
9405
9407
  };
9406
9408
  const untaintedBasePrototype = {};
9407
- const isAngularZonePresent = () => {
9408
- return !!globalThis.Zone;
9409
- };
9409
+ function angularZoneUnpatchedAlternative(key) {
9410
+ var _a2, _b2;
9411
+ const angularUnpatchedVersionSymbol = (_b2 = (_a2 = globalThis == null ? void 0 : globalThis.Zone) == null ? void 0 : _a2.__symbol__) == null ? void 0 : _b2.call(_a2, key);
9412
+ if (angularUnpatchedVersionSymbol && globalThis[angularUnpatchedVersionSymbol]) {
9413
+ return globalThis[angularUnpatchedVersionSymbol];
9414
+ } else {
9415
+ return void 0;
9416
+ }
9417
+ }
9410
9418
  function getUntaintedPrototype(key) {
9411
9419
  if (untaintedBasePrototype[key])
9412
9420
  return untaintedBasePrototype[key];
9413
- const defaultObj = globalThis[key];
9414
- const defaultPrototype = defaultObj.prototype;
9421
+ const candidate = angularZoneUnpatchedAlternative(key) || globalThis[key];
9422
+ const defaultPrototype = candidate.prototype;
9415
9423
  const accessorNames = key in testableAccessors ? testableAccessors[key] : void 0;
9416
9424
  const isUntaintedAccessors = Boolean(
9417
9425
  accessorNames && // @ts-expect-error 2345
@@ -9434,15 +9442,15 @@ function getUntaintedPrototype(key) {
9434
9442
  }
9435
9443
  )
9436
9444
  );
9437
- if (isUntaintedAccessors && isUntaintedMethods && !isAngularZonePresent()) {
9438
- untaintedBasePrototype[key] = defaultObj.prototype;
9439
- return defaultObj.prototype;
9445
+ if (isUntaintedAccessors && isUntaintedMethods) {
9446
+ untaintedBasePrototype[key] = candidate.prototype;
9447
+ return candidate.prototype;
9440
9448
  }
9441
9449
  try {
9442
9450
  const iframeEl = document.createElement("iframe");
9443
9451
  document.body.appendChild(iframeEl);
9444
9452
  const win = iframeEl.contentWindow;
9445
- if (!win) return defaultObj.prototype;
9453
+ if (!win) return candidate.prototype;
9446
9454
  const untaintedObject = win[key].prototype;
9447
9455
  document.body.removeChild(iframeEl);
9448
9456
  if (!untaintedObject) return defaultPrototype;