@pendo/agent 2.320.1 → 2.320.3

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.
@@ -3967,8 +3967,8 @@ let SERVER = '';
3967
3967
  let ASSET_HOST = '';
3968
3968
  let ASSET_PATH = '';
3969
3969
  let DESIGNER_SERVER = '';
3970
- let VERSION = '2.320.1_';
3971
- let PACKAGE_VERSION = '2.320.1';
3970
+ let VERSION = '2.320.3_';
3971
+ let PACKAGE_VERSION = '2.320.3';
3972
3972
  let LOADER = 'xhr';
3973
3973
  /* eslint-enable web-sdk-eslint-rules/no-gulp-env-references */
3974
3974
  /**
@@ -40598,12 +40598,12 @@ function TextCapture() {
40598
40598
  return {
40599
40599
  name: 'TextCapture',
40600
40600
  initialize: init,
40601
- teardown,
40602
- isEnabled,
40603
- isTextCapturable,
40604
- hasWhitelist,
40601
+ teardown: teardown,
40602
+ isEnabled: isEnabled,
40603
+ isTextCapturable: isTextCapturable,
40604
+ hasWhitelist: hasWhitelist,
40605
40605
  serializer: textSerializer,
40606
- guideActivity
40606
+ guideActivity: guideActivity
40607
40607
  };
40608
40608
  // technically not idempotent but might actually be right. not sure.
40609
40609
  function init(pendo, PluginAPI) {
@@ -40642,30 +40642,30 @@ function TextCapture() {
40642
40642
  function guideActivity(pendo, event) {
40643
40643
  if (!isEnabled())
40644
40644
  return;
40645
- const { _ } = pendo;
40646
- const eventData = event.data[0];
40645
+ var _ = pendo._;
40646
+ var eventData = event.data[0];
40647
40647
  if (eventData && eventData.type === 'guideActivity') {
40648
- const shownSteps = _.reduce(pendo.getActiveGuides({ channel: '*' }), (shown, guide) => {
40648
+ var shownSteps = _.reduce(pendo.getActiveGuides({ channel: '*' }), function (shown, guide) {
40649
40649
  if (guide.isShown()) {
40650
- return shown.concat(_.filter(guide.steps, (step) => step.isShown()));
40650
+ return shown.concat(_.filter(guide.steps, function (step) { return step.isShown(); }));
40651
40651
  }
40652
40652
  return shown;
40653
40653
  }, []);
40654
40654
  if (!shownSteps.length)
40655
40655
  return;
40656
- const findDomBlockInDomJson = pendo.BuildingBlocks.BuildingBlockGuides.findDomBlockInDomJson;
40657
- let elementJson;
40658
- _.find(shownSteps, (step) => {
40656
+ var findDomBlockInDomJson_1 = pendo.BuildingBlocks.BuildingBlockGuides.findDomBlockInDomJson;
40657
+ var elementJson_1;
40658
+ _.find(shownSteps, function (step) {
40659
40659
  if (!step.domJson)
40660
40660
  return false;
40661
- elementJson = findDomBlockInDomJson(step.domJson, function (domJson) {
40661
+ elementJson_1 = findDomBlockInDomJson_1(step.domJson, function (domJson) {
40662
40662
  return domJson.props && domJson.props.id && domJson.props.id === eventData.props.ui_element_id;
40663
40663
  });
40664
- return elementJson;
40664
+ return elementJson_1;
40665
40665
  });
40666
- if (!elementJson)
40666
+ if (!elementJson_1)
40667
40667
  return;
40668
- eventData.props.ui_element_text = elementJson.content;
40668
+ eventData.props.ui_element_text = elementJson_1.content;
40669
40669
  }
40670
40670
  }
40671
40671
  function isEnabled() {
@@ -42375,22 +42375,22 @@ const startListening = (
42375
42375
  };
42376
42376
 
42377
42377
  function VocPortal() {
42378
- let pendoGlobal;
42379
- let pluginAPI;
42378
+ var pendoGlobal;
42379
+ var pluginAPI;
42380
42380
  return {
42381
42381
  name: 'VocPortal',
42382
- initialize,
42383
- routeHandlerLookup,
42384
- queryMessageHandler,
42385
- resizeMessageHandler,
42386
- teardown
42382
+ initialize: initialize,
42383
+ routeHandlerLookup: routeHandlerLookup,
42384
+ queryMessageHandler: queryMessageHandler,
42385
+ resizeMessageHandler: resizeMessageHandler,
42386
+ teardown: teardown
42387
42387
  };
42388
42388
  function initialize(pendo, PluginAPI) {
42389
42389
  pendoGlobal = pendo;
42390
42390
  pluginAPI = PluginAPI;
42391
- const { frameId } = PluginAPI.EventTracer.addTracerIds({});
42391
+ var frameId = PluginAPI.EventTracer.addTracerIds({}).frameId;
42392
42392
  this.removeResizeEvent = pendoGlobal.attachEvent(window, 'resize', resizePortalIframe);
42393
- startListening('VocPortal', frameId, routeHandlerLookup, () => '*');
42393
+ startListening('VocPortal', frameId, routeHandlerLookup, function () { return '*'; });
42394
42394
  }
42395
42395
  function routeHandlerLookup(path) {
42396
42396
  switch (path) {
@@ -42403,14 +42403,14 @@ function VocPortal() {
42403
42403
  }
42404
42404
  }
42405
42405
  function resizePortalIframe() {
42406
- const vocPortalRcContainer = document.getElementById('pendo-resource-center-container');
42407
- const vocPortalRcDOM = pendoGlobal.dom(vocPortalRcContainer);
42406
+ var vocPortalRcContainer = document.getElementById('pendo-resource-center-container');
42407
+ var vocPortalRcDOM = pendoGlobal.dom(vocPortalRcContainer);
42408
42408
  pluginAPI.sizeElements(vocPortalRcDOM);
42409
42409
  }
42410
42410
  function queryMessageHandler(_, responseHandler) {
42411
- const metadata = pendoGlobal.getSerializedMetadata();
42412
- const sandBoxMode = !!pendoGlobal.designer || pluginAPI.store.getters['preview/isInPreviewMode']();
42413
- const response = {
42411
+ var metadata = pendoGlobal.getSerializedMetadata();
42412
+ var sandBoxMode = !!pendoGlobal.designer || pluginAPI.store.getters['preview/isInPreviewMode']();
42413
+ var response = {
42414
42414
  apiKey: pendoGlobal.apiKey,
42415
42415
  url: pendoGlobal.url.externalizeURL(),
42416
42416
  visitor: metadata.visitor,
@@ -42424,26 +42424,19 @@ function VocPortal() {
42424
42424
  }
42425
42425
  function resizeMessageHandler(msg) {
42426
42426
  try {
42427
- const { 'value': widthValue, 'unit': widthUnit, 'isImportant': widthIsImportant } = msg.data.width;
42428
- const { 'value': heightValue, 'unit': heightUnit, 'isImportant': heightIsImportant } = msg.data.height;
42427
+ var _a = msg.data.width, widthValue = _a["value"], widthUnit = _a["unit"], widthIsImportant = _a["isImportant"];
42428
+ var _b = msg.data.height, heightValue = _b["value"], heightUnit = _b["unit"], heightIsImportant = _b["isImportant"];
42429
42429
  if (typeof widthValue !== 'number' || typeof heightValue !== 'number') {
42430
42430
  return;
42431
42431
  }
42432
- const validUnits = ['px', '%', 'vh', 'vw'];
42432
+ var validUnits = ['px', '%', 'vh', 'vw'];
42433
42433
  if (!pendoGlobal._.contains(validUnits, widthUnit) || !pendoGlobal._.contains(validUnits, heightUnit)) {
42434
42434
  return;
42435
42435
  }
42436
- const width = `${widthValue}${widthUnit}${widthIsImportant ? ' !important' : ''}`;
42437
- const height = `${heightValue}${heightUnit}${heightIsImportant ? ' !important' : ''}`;
42438
- const container = document.getElementById('pendo-resource-center-container');
42439
- pluginAPI.util.addInlineStyles('pendo-voc-portal-styles', `#pendo-resource-center-container:has(iframe[src*="portal"][src*="mode=rc"]) {
42440
- width: ${width};
42441
- height: ${height};
42442
- ._pendo-step-container-size {
42443
- width: ${width};
42444
- height: ${height};
42445
- }
42446
- }`, container);
42436
+ var width = "".concat(widthValue).concat(widthUnit).concat(widthIsImportant ? ' !important' : '');
42437
+ var height = "".concat(heightValue).concat(heightUnit).concat(heightIsImportant ? ' !important' : '');
42438
+ var container = document.getElementById('pendo-resource-center-container');
42439
+ pluginAPI.util.addInlineStyles('pendo-voc-portal-styles', "#pendo-resource-center-container:has(iframe[src*=\"portal\"][src*=\"mode=rc\"]) {\n width: ".concat(width, ";\n height: ").concat(height, ";\n ._pendo-step-container-size {\n width: ").concat(width, ";\n height: ").concat(height, ";\n }\n }"), container);
42447
42440
  resizePortalIframe();
42448
42441
  }
42449
42442
  catch (err) {
@@ -43243,24 +43236,20 @@ var NodeType$3 = /* @__PURE__ */ ((NodeType2) => {
43243
43236
  NodeType2[NodeType2["Comment"] = 5] = "Comment";
43244
43237
  return NodeType2;
43245
43238
  })(NodeType$3 || {});
43246
- const testableAccessors$2 = {
43239
+ const testableAccessors$1 = {
43247
43240
  Node: ["childNodes", "parentNode", "parentElement", "textContent"],
43248
43241
  ShadowRoot: ["host", "styleSheets"],
43249
43242
  Element: ["shadowRoot"],
43250
- MutationObserver: [],
43251
- EventTarget: [],
43252
- Window: []
43243
+ MutationObserver: []
43253
43244
  };
43254
- const testableMethods$2 = {
43245
+ const testableMethods$1 = {
43255
43246
  Node: ["contains", "getRootNode"],
43256
43247
  ShadowRoot: ["getSelection"],
43257
43248
  Element: ["querySelector", "querySelectorAll"],
43258
- MutationObserver: ["constructor"],
43259
- EventTarget: ["addEventListener", "removeEventListener"],
43260
- Window: ["setTimeout"]
43249
+ MutationObserver: ["constructor"]
43261
43250
  };
43262
- const untaintedBasePrototype$2 = {};
43263
- function angularZoneUnpatchedAlternative$2(key) {
43251
+ const untaintedBasePrototype$1 = {};
43252
+ function angularZoneUnpatchedAlternative$1(key) {
43264
43253
  var _a2, _b;
43265
43254
  const angularUnpatchedVersionSymbol = (_b = (_a2 = globalThis == null ? void 0 : globalThis.Zone) == null ? void 0 : _a2.__symbol__) == null ? void 0 : _b.call(_a2, key);
43266
43255
  if (angularUnpatchedVersionSymbol && globalThis[angularUnpatchedVersionSymbol]) {
@@ -43269,12 +43258,12 @@ function angularZoneUnpatchedAlternative$2(key) {
43269
43258
  return void 0;
43270
43259
  }
43271
43260
  }
43272
- function getUntaintedPrototype$2(key) {
43273
- if (untaintedBasePrototype$2[key])
43274
- return untaintedBasePrototype$2[key];
43275
- const candidate = angularZoneUnpatchedAlternative$2(key) || globalThis[key];
43261
+ function getUntaintedPrototype$1(key) {
43262
+ if (untaintedBasePrototype$1[key])
43263
+ return untaintedBasePrototype$1[key];
43264
+ const candidate = angularZoneUnpatchedAlternative$1(key) || globalThis[key];
43276
43265
  const defaultPrototype = candidate.prototype;
43277
- const accessorNames = key in testableAccessors$2 ? testableAccessors$2[key] : void 0;
43266
+ const accessorNames = key in testableAccessors$1 ? testableAccessors$1[key] : void 0;
43278
43267
  const isUntaintedAccessors = Boolean(
43279
43268
  accessorNames && // @ts-expect-error 2345
43280
43269
  accessorNames.every(
@@ -43286,7 +43275,7 @@ function getUntaintedPrototype$2(key) {
43286
43275
  }
43287
43276
  )
43288
43277
  );
43289
- const methodNames = key in testableMethods$2 ? testableMethods$2[key] : void 0;
43278
+ const methodNames = key in testableMethods$1 ? testableMethods$1[key] : void 0;
43290
43279
  const isUntaintedMethods = Boolean(
43291
43280
  methodNames && methodNames.every(
43292
43281
  // @ts-expect-error 2345
@@ -43297,7 +43286,7 @@ function getUntaintedPrototype$2(key) {
43297
43286
  )
43298
43287
  );
43299
43288
  if (isUntaintedAccessors && isUntaintedMethods) {
43300
- untaintedBasePrototype$2[key] = candidate.prototype;
43289
+ untaintedBasePrototype$1[key] = candidate.prototype;
43301
43290
  return candidate.prototype;
43302
43291
  }
43303
43292
  try {
@@ -43308,7 +43297,7 @@ function getUntaintedPrototype$2(key) {
43308
43297
  const untaintedObject = win[key].prototype;
43309
43298
  document.body.removeChild(iframeEl);
43310
43299
  if (!untaintedObject) return defaultPrototype;
43311
- return untaintedBasePrototype$2[key] = untaintedObject;
43300
+ return untaintedBasePrototype$1[key] = untaintedObject;
43312
43301
  } catch {
43313
43302
  return defaultPrototype;
43314
43303
  }
@@ -43321,7 +43310,7 @@ function getUntaintedAccessor$1(key, instance, accessor) {
43321
43310
  return untaintedAccessorCache$1[cacheKey].call(
43322
43311
  instance
43323
43312
  );
43324
- const untaintedPrototype = getUntaintedPrototype$2(key);
43313
+ const untaintedPrototype = getUntaintedPrototype$1(key);
43325
43314
  const untaintedAccessor = (_a2 = Object.getOwnPropertyDescriptor(
43326
43315
  untaintedPrototype,
43327
43316
  accessor
@@ -43330,17 +43319,17 @@ function getUntaintedAccessor$1(key, instance, accessor) {
43330
43319
  untaintedAccessorCache$1[cacheKey] = untaintedAccessor;
43331
43320
  return untaintedAccessor.call(instance);
43332
43321
  }
43333
- const untaintedMethodCache$2 = {};
43334
- function getUntaintedMethod$2(key, instance, method) {
43322
+ const untaintedMethodCache$1 = {};
43323
+ function getUntaintedMethod$1(key, instance, method) {
43335
43324
  const cacheKey = `${key}.${String(method)}`;
43336
- if (untaintedMethodCache$2[cacheKey])
43337
- return untaintedMethodCache$2[cacheKey].bind(
43325
+ if (untaintedMethodCache$1[cacheKey])
43326
+ return untaintedMethodCache$1[cacheKey].bind(
43338
43327
  instance
43339
43328
  );
43340
- const untaintedPrototype = getUntaintedPrototype$2(key);
43329
+ const untaintedPrototype = getUntaintedPrototype$1(key);
43341
43330
  const untaintedMethod = untaintedPrototype[method];
43342
43331
  if (typeof untaintedMethod !== "function") return instance[method];
43343
- untaintedMethodCache$2[cacheKey] = untaintedMethod;
43332
+ untaintedMethodCache$1[cacheKey] = untaintedMethod;
43344
43333
  return untaintedMethod.bind(instance);
43345
43334
  }
43346
43335
  function childNodes$1(n2) {
@@ -43356,10 +43345,10 @@ function textContent$1(n2) {
43356
43345
  return getUntaintedAccessor$1("Node", n2, "textContent");
43357
43346
  }
43358
43347
  function contains$1(n2, other) {
43359
- return getUntaintedMethod$2("Node", n2, "contains")(other);
43348
+ return getUntaintedMethod$1("Node", n2, "contains")(other);
43360
43349
  }
43361
43350
  function getRootNode$1(n2) {
43362
- return getUntaintedMethod$2("Node", n2, "getRootNode")();
43351
+ return getUntaintedMethod$1("Node", n2, "getRootNode")();
43363
43352
  }
43364
43353
  function host$1(n2) {
43365
43354
  if (!n2 || !("host" in n2)) return null;
@@ -43373,13 +43362,13 @@ function shadowRoot$1(n2) {
43373
43362
  return getUntaintedAccessor$1("Element", n2, "shadowRoot");
43374
43363
  }
43375
43364
  function querySelector$1(n2, selectors) {
43376
- return getUntaintedMethod$2("Element", n2, "querySelector")(selectors);
43365
+ return getUntaintedMethod$1("Element", n2, "querySelector")(selectors);
43377
43366
  }
43378
43367
  function querySelectorAll$1(n2, selectors) {
43379
- return getUntaintedMethod$2("Element", n2, "querySelectorAll")(selectors);
43368
+ return getUntaintedMethod$1("Element", n2, "querySelectorAll")(selectors);
43380
43369
  }
43381
43370
  function mutationObserverCtor$1() {
43382
- return getUntaintedPrototype$2("MutationObserver").constructor;
43371
+ return getUntaintedPrototype$1("MutationObserver").constructor;
43383
43372
  }
43384
43373
  function patch$1(source, name, replacement) {
43385
43374
  try {
@@ -43438,7 +43427,19 @@ function isShadowRoot(n2) {
43438
43427
  function isNativeShadowDom(shadowRoot2) {
43439
43428
  return Object.prototype.toString.call(shadowRoot2) === "[object ShadowRoot]";
43440
43429
  }
43441
- const nativeSetTimeout = typeof window !== "undefined" ? getUntaintedMethod$2("Window", window, "setTimeout").bind(window) : global.setTimeout;
43430
+ function getNative$1(symbolName, windowObj = window) {
43431
+ var _a2, _b;
43432
+ const windowWithZone = windowObj;
43433
+ const angularZoneSymbol = (_b = (_a2 = windowWithZone == null ? void 0 : windowWithZone.Zone) == null ? void 0 : _a2.__symbol__) == null ? void 0 : _b.call(_a2, symbolName);
43434
+ if (angularZoneSymbol) {
43435
+ const zonelessImpl = windowWithZone[angularZoneSymbol];
43436
+ if (zonelessImpl) {
43437
+ return zonelessImpl;
43438
+ }
43439
+ }
43440
+ return windowWithZone[symbolName];
43441
+ }
43442
+ const nativeSetTimeout = typeof window !== "undefined" ? getNative$1("setTimeout").bind(window) : global.setTimeout;
43442
43443
  function fixBrowserCompatibilityIssuesInCSS(cssText) {
43443
43444
  if (cssText.includes(" background-clip: text;") && !cssText.includes(" -webkit-background-clip: text;")) {
43444
43445
  cssText = cssText.replace(
@@ -44762,90 +44763,19 @@ function snapshot(n2, options) {
44762
44763
  var __defProp2 = Object.defineProperty;
44763
44764
  var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
44764
44765
  var __publicField2 = (obj, key, value) => __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
44765
- const testableAccessors$1 = {
44766
- Node: ["childNodes", "parentNode", "parentElement", "textContent"],
44767
- ShadowRoot: ["host", "styleSheets"],
44768
- Element: ["shadowRoot"],
44769
- MutationObserver: [],
44770
- EventTarget: [],
44771
- Window: []
44772
- };
44773
- const testableMethods$1 = {
44774
- Node: ["contains", "getRootNode"],
44775
- ShadowRoot: ["getSelection"],
44776
- Element: ["querySelector", "querySelectorAll"],
44777
- MutationObserver: ["constructor"],
44778
- EventTarget: ["addEventListener", "removeEventListener"],
44779
- Window: ["setTimeout"]
44780
- };
44781
- const untaintedBasePrototype$1 = {};
44782
- function angularZoneUnpatchedAlternative$1(key) {
44766
+ function getNative(symbolName, windowObj = window) {
44783
44767
  var _a2, _b;
44784
- const angularUnpatchedVersionSymbol = (_b = (_a2 = globalThis == null ? void 0 : globalThis.Zone) == null ? void 0 : _a2.__symbol__) == null ? void 0 : _b.call(_a2, key);
44785
- if (angularUnpatchedVersionSymbol && globalThis[angularUnpatchedVersionSymbol]) {
44786
- return globalThis[angularUnpatchedVersionSymbol];
44787
- } else {
44788
- return void 0;
44789
- }
44790
- }
44791
- function getUntaintedPrototype$1(key) {
44792
- if (untaintedBasePrototype$1[key])
44793
- return untaintedBasePrototype$1[key];
44794
- const candidate = angularZoneUnpatchedAlternative$1(key) || globalThis[key];
44795
- const defaultPrototype = candidate.prototype;
44796
- const accessorNames = key in testableAccessors$1 ? testableAccessors$1[key] : void 0;
44797
- const isUntaintedAccessors = Boolean(
44798
- accessorNames && // @ts-expect-error 2345
44799
- accessorNames.every(
44800
- (accessor) => {
44801
- var _a2, _b;
44802
- return Boolean(
44803
- (_b = (_a2 = Object.getOwnPropertyDescriptor(defaultPrototype, accessor)) == null ? void 0 : _a2.get) == null ? void 0 : _b.toString().includes("[native code]")
44804
- );
44805
- }
44806
- )
44807
- );
44808
- const methodNames = key in testableMethods$1 ? testableMethods$1[key] : void 0;
44809
- const isUntaintedMethods = Boolean(
44810
- methodNames && methodNames.every(
44811
- // @ts-expect-error 2345
44812
- (method) => {
44813
- var _a2;
44814
- return typeof defaultPrototype[method] === "function" && ((_a2 = defaultPrototype[method]) == null ? void 0 : _a2.toString().includes("[native code]"));
44815
- }
44816
- )
44817
- );
44818
- if (isUntaintedAccessors && isUntaintedMethods) {
44819
- untaintedBasePrototype$1[key] = candidate.prototype;
44820
- return candidate.prototype;
44821
- }
44822
- try {
44823
- const iframeEl = document.createElement("iframe");
44824
- document.body.appendChild(iframeEl);
44825
- const win = iframeEl.contentWindow;
44826
- if (!win) return candidate.prototype;
44827
- const untaintedObject = win[key].prototype;
44828
- document.body.removeChild(iframeEl);
44829
- if (!untaintedObject) return defaultPrototype;
44830
- return untaintedBasePrototype$1[key] = untaintedObject;
44831
- } catch {
44832
- return defaultPrototype;
44768
+ const windowWithZone = windowObj;
44769
+ const angularZoneSymbol = (_b = (_a2 = windowWithZone == null ? void 0 : windowWithZone.Zone) == null ? void 0 : _a2.__symbol__) == null ? void 0 : _b.call(_a2, symbolName);
44770
+ if (angularZoneSymbol) {
44771
+ const zonelessImpl = windowWithZone[angularZoneSymbol];
44772
+ if (zonelessImpl) {
44773
+ return zonelessImpl;
44774
+ }
44833
44775
  }
44776
+ return windowWithZone[symbolName];
44834
44777
  }
44835
- const untaintedMethodCache$1 = {};
44836
- function getUntaintedMethod$1(key, instance, method) {
44837
- const cacheKey = `${key}.${String(method)}`;
44838
- if (untaintedMethodCache$1[cacheKey])
44839
- return untaintedMethodCache$1[cacheKey].bind(
44840
- instance
44841
- );
44842
- const untaintedPrototype = getUntaintedPrototype$1(key);
44843
- const untaintedMethod = untaintedPrototype[method];
44844
- if (typeof untaintedMethod !== "function") return instance[method];
44845
- untaintedMethodCache$1[cacheKey] = untaintedMethod;
44846
- return untaintedMethod.bind(instance);
44847
- }
44848
- typeof window !== "undefined" ? getUntaintedMethod$1("Window", window, "setTimeout").bind(window) : global.setTimeout;
44778
+ typeof window !== "undefined" ? getNative("setTimeout").bind(window) : global.setTimeout;
44849
44779
  class BaseRRNode {
44850
44780
  // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
44851
44781
  constructor(..._args) {
@@ -44907,17 +44837,13 @@ const testableAccessors = {
44907
44837
  Node: ["childNodes", "parentNode", "parentElement", "textContent"],
44908
44838
  ShadowRoot: ["host", "styleSheets"],
44909
44839
  Element: ["shadowRoot"],
44910
- MutationObserver: [],
44911
- EventTarget: [],
44912
- Window: []
44840
+ MutationObserver: []
44913
44841
  };
44914
44842
  const testableMethods = {
44915
44843
  Node: ["contains", "getRootNode"],
44916
44844
  ShadowRoot: ["getSelection"],
44917
44845
  Element: ["querySelector", "querySelectorAll"],
44918
- MutationObserver: ["constructor"],
44919
- EventTarget: ["addEventListener", "removeEventListener"],
44920
- Window: ["setTimeout"]
44846
+ MutationObserver: ["constructor"]
44921
44847
  };
44922
44848
  const untaintedBasePrototype = {};
44923
44849
  function angularZoneUnpatchedAlternative(key) {
@@ -45098,11 +45024,20 @@ const index = {
45098
45024
  mutationObserver: mutationObserverCtor,
45099
45025
  patch
45100
45026
  };
45027
+ function getWindow(documentOrWindow) {
45028
+ const defaultView = documentOrWindow.defaultView;
45029
+ return defaultView ? defaultView : documentOrWindow;
45030
+ }
45101
45031
  function on(type, fn, target = document) {
45032
+ const windowObj = getWindow(target);
45033
+ const nativeAddEventListener = getNative$1(
45034
+ "addEventListener",
45035
+ windowObj
45036
+ );
45037
+ const nativeRemoveEventListener = getNative$1("removeEventListener", windowObj);
45102
45038
  const options = { capture: true, passive: true };
45103
- const eventTarget = target;
45104
- getUntaintedMethod("EventTarget", eventTarget, "addEventListener")(type, fn, options);
45105
- return () => getUntaintedMethod("EventTarget", eventTarget, "removeEventListener")(type, fn, options);
45039
+ nativeAddEventListener.call(target, type, fn, options);
45040
+ return () => nativeRemoveEventListener.call(target, type, fn, options);
45106
45041
  }
45107
45042
  const DEPARTED_MIRROR_ACCESS_WARNING = "Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";
45108
45043
  let _mirror = {
@@ -46550,7 +46485,10 @@ function initStyleSheetObserver({ styleSheetRuleCb, mirror: mirror2, stylesheetM
46550
46485
  removes: [{ index: index2 }]
46551
46486
  });
46552
46487
  }
46553
- return target.apply(thisArg, argumentsList);
46488
+ try {
46489
+ return target.apply(thisArg, argumentsList);
46490
+ } catch (e2) {
46491
+ }
46554
46492
  }
46555
46493
  )
46556
46494
  });
@@ -46679,7 +46617,10 @@ function initStyleSheetObserver({ styleSheetRuleCb, mirror: mirror2, stylesheetM
46679
46617
  ]
46680
46618
  });
46681
46619
  }
46682
- return target.apply(thisArg, argumentsList);
46620
+ try {
46621
+ return target.apply(thisArg, argumentsList);
46622
+ } catch (e2) {
46623
+ }
46683
46624
  }
46684
46625
  )
46685
46626
  }
@@ -48685,61 +48626,6 @@ var n;
48685
48626
  }(n || (n = {}));
48686
48627
  return record; }
48687
48628
 
48688
- var SessionRecorderBuffer = /** @class */ (function () {
48689
- function SessionRecorderBuffer(interval, maxCount) {
48690
- if (maxCount === void 0) { maxCount = Infinity; }
48691
- this.data = [];
48692
- this.sequenceNumber = 0;
48693
- this.interval = interval;
48694
- this.maxCount = maxCount;
48695
- this.doubledMaxCount = maxCount * 2;
48696
- }
48697
- SessionRecorderBuffer.prototype.isEmpty = function () {
48698
- return this.data.length === 0;
48699
- };
48700
- SessionRecorderBuffer.prototype.count = function () {
48701
- return this.data.length;
48702
- };
48703
- SessionRecorderBuffer.prototype.clear = function () {
48704
- this.data.length = 0;
48705
- };
48706
- SessionRecorderBuffer.prototype.clearSequence = function () {
48707
- this.sequenceNumber = 0;
48708
- };
48709
- SessionRecorderBuffer.prototype.push = function (event) {
48710
- this.data.push(event);
48711
- this.checkRateLimit();
48712
- };
48713
- SessionRecorderBuffer.prototype.pack = function (envelope, _) {
48714
- var eventsToSend = this.data.splice(0, this.maxCount);
48715
- envelope.recordingPayload = eventsToSend;
48716
- envelope.sequence = this.sequenceNumber;
48717
- envelope.recordingPayloadCount = eventsToSend.length;
48718
- if (eventsToSend.length) {
48719
- envelope.browserTime = eventsToSend[0].timestamp;
48720
- }
48721
- envelope.recordingPayloadMetadata = _.map(eventsToSend, function (event) {
48722
- var metadata = _.pick(event, 'type', 'timestamp');
48723
- if (event.data) {
48724
- metadata.data = _.pick(event.data, 'source', 'type', 'x', 'y', 'id', 'height', 'width', 'href');
48725
- }
48726
- return metadata;
48727
- });
48728
- this.sequenceNumber += eventsToSend.length;
48729
- return envelope;
48730
- };
48731
- SessionRecorderBuffer.prototype.checkRateLimit = function () {
48732
- var length = this.data.length;
48733
- if (length >= this.doubledMaxCount && length % this.maxCount === 0) {
48734
- var elapsed = this.data[length - 1].timestamp - this.data[length - this.doubledMaxCount].timestamp;
48735
- if (elapsed <= this.interval && this.onRateLimit) {
48736
- this.onRateLimit();
48737
- }
48738
- }
48739
- };
48740
- return SessionRecorderBuffer;
48741
- }());
48742
-
48743
48629
  var __assign = function() {
48744
48630
  __assign = Object.assign || function __assign(t) {
48745
48631
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -48806,6 +48692,61 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
48806
48692
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
48807
48693
  };
48808
48694
 
48695
+ var SessionRecorderBuffer = /** @class */ (function () {
48696
+ function SessionRecorderBuffer(interval, maxCount) {
48697
+ if (maxCount === void 0) { maxCount = Infinity; }
48698
+ this.data = [];
48699
+ this.sequenceNumber = 0;
48700
+ this.interval = interval;
48701
+ this.maxCount = maxCount;
48702
+ this.doubledMaxCount = maxCount * 2;
48703
+ }
48704
+ SessionRecorderBuffer.prototype.isEmpty = function () {
48705
+ return this.data.length === 0;
48706
+ };
48707
+ SessionRecorderBuffer.prototype.count = function () {
48708
+ return this.data.length;
48709
+ };
48710
+ SessionRecorderBuffer.prototype.clear = function () {
48711
+ this.data.length = 0;
48712
+ };
48713
+ SessionRecorderBuffer.prototype.clearSequence = function () {
48714
+ this.sequenceNumber = 0;
48715
+ };
48716
+ SessionRecorderBuffer.prototype.push = function (event) {
48717
+ this.data.push(event);
48718
+ this.checkRateLimit();
48719
+ };
48720
+ SessionRecorderBuffer.prototype.pack = function (envelope, _) {
48721
+ var eventsToSend = this.data.splice(0, this.maxCount);
48722
+ envelope.recordingPayload = eventsToSend;
48723
+ envelope.sequence = this.sequenceNumber;
48724
+ envelope.recordingPayloadCount = eventsToSend.length;
48725
+ if (eventsToSend.length) {
48726
+ envelope.browserTime = eventsToSend[0].timestamp;
48727
+ }
48728
+ envelope.recordingPayloadMetadata = _.map(eventsToSend, function (event) {
48729
+ var metadata = _.pick(event, 'type', 'timestamp');
48730
+ if (event.data) {
48731
+ metadata.data = _.pick(event.data, 'source', 'type', 'x', 'y', 'id', 'height', 'width', 'href');
48732
+ }
48733
+ return metadata;
48734
+ });
48735
+ this.sequenceNumber += eventsToSend.length;
48736
+ return envelope;
48737
+ };
48738
+ SessionRecorderBuffer.prototype.checkRateLimit = function () {
48739
+ var length = this.data.length;
48740
+ if (length >= this.doubledMaxCount && length % this.maxCount === 0) {
48741
+ var elapsed = this.data[length - 1].timestamp - this.data[length - this.doubledMaxCount].timestamp;
48742
+ if (elapsed <= this.interval && this.onRateLimit) {
48743
+ this.onRateLimit();
48744
+ }
48745
+ }
48746
+ };
48747
+ return SessionRecorderBuffer;
48748
+ }());
48749
+
48809
48750
  var RECORDING_CONFIG_WORKERURL$1 = 'recording.workerUrl';
48810
48751
  var MAX_SIZE = 2000000;
48811
48752
  var RESOURCE_CACHING$1 = 'resourceCaching';
@@ -49040,33 +48981,33 @@ function maskText(options, text, element) {
49040
48981
  return text;
49041
48982
  }
49042
48983
 
49043
- const RECORDING_CONFIG = 'recording';
49044
- const RECORDING_CONFIG_ENABLED = 'recording.enabled';
49045
- const RECORDING_CONFIG_AUTO_START = 'recording.autoStart';
49046
- const RECORDING_CONFIG_WORKERURL = 'recording.workerUrl';
49047
- const RECORDING_CONFIG_ON_RECORDING_START = 'recording.onRecordingStart';
49048
- const RECORDING_CONFIG_ON_RECORDING_STOP = 'recording.onRecordingStop';
49049
- const RECORDING_CONFIG_WORKER_OVERRIDE = 'recording.workerOverride';
49050
- const RECORDING_CONFIG_TREAT_IFRAME_AS_ROOT = 'recording.treatIframeAsRoot';
49051
- const RECORDING_CONFIG_DISABLE_UNLOAD = 'recording.disableUnload';
49052
- const RESOURCE_CACHING = 'resourceCaching';
49053
- const ONE_DAY_IN_MILLISECONDS = 24 * 60 * 60 * 1000;
49054
- const ONE_MINUTE_IN_MILLISECONDS = 60 * 1000;
49055
- const THIRTY_MINUTES = 1000 * 60 * 30;
49056
- const ONE_HUNDRED_MB_IN_BYTES = 100 * 1024 * 1024;
49057
- const SESSION_RECORDING_ID = 'pendo_srId';
49058
- const SESSION_RECORDING_LAST_USER_INTERACTION_EVENT = 'pendo_srLastUserInteractionEvent';
49059
- const SEND_INTERVAL = 5000;
49060
- const MAX_SEND_COUNT = 20000;
49061
- const EVENT_TYPES = {
48984
+ var RECORDING_CONFIG = 'recording';
48985
+ var RECORDING_CONFIG_ENABLED = 'recording.enabled';
48986
+ var RECORDING_CONFIG_AUTO_START = 'recording.autoStart';
48987
+ var RECORDING_CONFIG_WORKERURL = 'recording.workerUrl';
48988
+ var RECORDING_CONFIG_ON_RECORDING_START = 'recording.onRecordingStart';
48989
+ var RECORDING_CONFIG_ON_RECORDING_STOP = 'recording.onRecordingStop';
48990
+ var RECORDING_CONFIG_WORKER_OVERRIDE = 'recording.workerOverride';
48991
+ var RECORDING_CONFIG_TREAT_IFRAME_AS_ROOT = 'recording.treatIframeAsRoot';
48992
+ var RECORDING_CONFIG_DISABLE_UNLOAD = 'recording.disableUnload';
48993
+ var RESOURCE_CACHING = 'resourceCaching';
48994
+ var ONE_DAY_IN_MILLISECONDS = 24 * 60 * 60 * 1000;
48995
+ var ONE_MINUTE_IN_MILLISECONDS = 60 * 1000;
48996
+ var THIRTY_MINUTES = 1000 * 60 * 30;
48997
+ var ONE_HUNDRED_MB_IN_BYTES = 100 * 1024 * 1024;
48998
+ var SESSION_RECORDING_ID = 'pendo_srId';
48999
+ var SESSION_RECORDING_LAST_USER_INTERACTION_EVENT = 'pendo_srLastUserInteractionEvent';
49000
+ var SEND_INTERVAL = 5000;
49001
+ var MAX_SEND_COUNT = 20000;
49002
+ var EVENT_TYPES = {
49062
49003
  INCREMENTAL_SOURCE_MUTATION: 0,
49063
49004
  FULL_SNAPSHOT: 2,
49064
49005
  INCREMENTAL_SNAPSHOT: 3,
49065
49006
  META: 4,
49066
49007
  INCREMENTAL_SOURCE_INPUT: 5
49067
49008
  };
49068
- class SessionRecorder {
49069
- constructor(rrwebRecord, WorkerClass) {
49009
+ var SessionRecorder = /** @class */ (function () {
49010
+ function SessionRecorder(rrwebRecord, WorkerClass) {
49070
49011
  this.name = 'Replay';
49071
49012
  this.record = rrwebRecord;
49072
49013
  this.WorkerClass = WorkerClass;
@@ -49074,8 +49015,8 @@ class SessionRecorder {
49074
49015
  this.eventsSinceLastKeyFrame = 0;
49075
49016
  this.currentRecordingSize = 0;
49076
49017
  }
49077
- addConfigOptions() {
49078
- const cf = this.api.ConfigReader;
49018
+ SessionRecorder.prototype.addConfigOptions = function () {
49019
+ var cf = this.api.ConfigReader;
49079
49020
  cf.addOption(RECORDING_CONFIG, [cf.sources.PENDO_CONFIG_SRC], {});
49080
49021
  /**
49081
49022
  * Determines if replay will immediately begin collecting data. If false, you can resume collecting
@@ -49161,12 +49102,12 @@ class SessionRecorder {
49161
49102
  */
49162
49103
  cf.addOption(RECORDING_CONFIG_TREAT_IFRAME_AS_ROOT, [cf.sources.SNIPPET_SRC], undefined);
49163
49104
  cf.addOption(RESOURCE_CACHING, [cf.sources.PENDO_CONFIG_SRC], undefined);
49164
- }
49165
- initialize(pendo, PluginAPI) {
49105
+ };
49106
+ SessionRecorder.prototype.initialize = function (pendo, PluginAPI) {
49166
49107
  this.pendo = pendo;
49167
49108
  this.api = PluginAPI;
49168
- const bind = this.pendo._.bind;
49169
- const configReader = this.api.ConfigReader;
49109
+ var bind = this.pendo._.bind;
49110
+ var configReader = this.api.ConfigReader;
49170
49111
  this.buffer = new SessionRecorderBuffer(SEND_INTERVAL, MAX_SEND_COUNT);
49171
49112
  this.buffer.onRateLimit = bind(this.rateLimitExceeded, this);
49172
49113
  this.transport = new Transport(this.WorkerClass, this.pendo, this.api);
@@ -49184,8 +49125,8 @@ class SessionRecorder {
49184
49125
  ? configReader.get(RECORDING_CONFIG_ON_RECORDING_START) : function () { };
49185
49126
  this.onRecordingStop = this.pendo._.isFunction(configReader.get(RECORDING_CONFIG_ON_RECORDING_STOP))
49186
49127
  ? configReader.get(RECORDING_CONFIG_ON_RECORDING_STOP) : function () { };
49187
- let isSessionReplayEnabled = false;
49188
- const snippetOverrideValue = configReader.get(RECORDING_CONFIG_ENABLED);
49128
+ var isSessionReplayEnabled = false;
49129
+ var snippetOverrideValue = configReader.get(RECORDING_CONFIG_ENABLED);
49189
49130
  // The snippet config value should take precedence over whatever value the backend returns,
49190
49131
  // but ONLY for replay being enabled - all other values should be taken from the backend
49191
49132
  if (this.pendo._.isBoolean(snippetOverrideValue)) {
@@ -49204,7 +49145,7 @@ class SessionRecorder {
49204
49145
  this.api.log.info('Session Replay is disabled because excludeNonGuideAnalytics is enabled');
49205
49146
  return;
49206
49147
  }
49207
- const sessionIdKey = this.sessionIdKey = `${SESSION_RECORDING_ID}.${this.pendo.apiKey}`;
49148
+ var sessionIdKey = this.sessionIdKey = "".concat(SESSION_RECORDING_ID, ".").concat(this.pendo.apiKey);
49208
49149
  this.pendo.recording = {
49209
49150
  start: bind(this.start, this),
49210
49151
  stop: bind(this.stop, this)
@@ -49245,8 +49186,8 @@ class SessionRecorder {
49245
49186
  * @label SESSION_RECORDING_LAST_USER_INTERACTION_EVENT
49246
49187
  */
49247
49188
  this.api.agentStorage.registry.addSession(SESSION_RECORDING_LAST_USER_INTERACTION_EVENT);
49248
- }
49249
- teardown() {
49189
+ };
49190
+ SessionRecorder.prototype.teardown = function () {
49250
49191
  delete this.pendo.recording;
49251
49192
  delete this.allowStart;
49252
49193
  this.pendo._.each(this.subscriptions, function (unsubscribe) {
@@ -49256,35 +49197,36 @@ class SessionRecorder {
49256
49197
  this.subscriptions.length = 0;
49257
49198
  this.stop();
49258
49199
  this.transport.stop();
49259
- }
49260
- ready() {
49200
+ };
49201
+ SessionRecorder.prototype.ready = function () {
49261
49202
  if (this.api.ConfigReader.get(RECORDING_CONFIG_AUTO_START) !== false) {
49262
49203
  this.start();
49263
49204
  }
49264
- }
49265
- addPageLifecycleListeners() {
49205
+ };
49206
+ SessionRecorder.prototype.addPageLifecycleListeners = function () {
49207
+ var _this = this;
49266
49208
  // It's important these event listeners use the capture phase, so making it explicit.
49267
- const useCapture = true;
49268
- this.pendo._.each(['pageshow', 'focus', 'blur', 'visibilitychange', 'resume'], (type) => {
49269
- this.pageLifecycleListeners.push(this.api.attachEventInternal(window, type, this.pendo._.bind(this.checkPageLifecycleState, this), useCapture));
49209
+ var useCapture = true;
49210
+ this.pendo._.each(['pageshow', 'focus', 'blur', 'visibilitychange', 'resume'], function (type) {
49211
+ _this.pageLifecycleListeners.push(_this.api.attachEventInternal(window, type, _this.pendo._.bind(_this.checkPageLifecycleState, _this), useCapture));
49270
49212
  });
49271
- }
49272
- removePageLifecycleListeners() {
49213
+ };
49214
+ SessionRecorder.prototype.removePageLifecycleListeners = function () {
49273
49215
  this.pendo._.each(this.pageLifecycleListeners, function (teardownFn) {
49274
49216
  teardownFn();
49275
49217
  });
49276
49218
  this.pageLifecycleListeners = [];
49277
- }
49278
- checkPageLifecycleState() {
49279
- const state = this.getPageLifecycleState();
49219
+ };
49220
+ SessionRecorder.prototype.checkPageLifecycleState = function () {
49221
+ var state = this.getPageLifecycleState();
49280
49222
  if (state === 'active' || state === 'passive') {
49281
49223
  if (!this.isRecording() && this.allowStart) {
49282
49224
  this.removePageLifecycleListeners();
49283
49225
  this.ready();
49284
49226
  }
49285
49227
  }
49286
- }
49287
- getPageLifecycleState() {
49228
+ };
49229
+ SessionRecorder.prototype.getPageLifecycleState = function () {
49288
49230
  if (document.visibilityState === 'hidden') {
49289
49231
  return 'hidden';
49290
49232
  }
@@ -49292,8 +49234,9 @@ class SessionRecorder {
49292
49234
  return 'active';
49293
49235
  }
49294
49236
  return 'passive';
49295
- }
49296
- changeIdentity(identifyEvent) {
49237
+ };
49238
+ SessionRecorder.prototype.changeIdentity = function (identifyEvent) {
49239
+ var _this = this;
49297
49240
  if (!this.allowStart)
49298
49241
  return;
49299
49242
  clearTimeout(this._changeIdentityTimer);
@@ -49308,55 +49251,56 @@ class SessionRecorder {
49308
49251
  }
49309
49252
  this.visitorId = identifyEvent.data[0].visitor_id;
49310
49253
  this.accountId = identifyEvent.data[0].account_id;
49311
- this._changeIdentityTimer = setTimeout$1(() => {
49312
- this._start();
49254
+ this._changeIdentityTimer = setTimeout$1(function () {
49255
+ _this._start();
49313
49256
  }, 500);
49314
- }
49315
- changeMetadata(metadataEvent) {
49316
- const { hashChanged, options } = metadataEvent.data[0];
49257
+ };
49258
+ SessionRecorder.prototype.changeMetadata = function (metadataEvent) {
49259
+ var _a = metadataEvent.data[0], hashChanged = _a.hashChanged, options = _a.options;
49317
49260
  if (this.allowStart && hashChanged) {
49318
49261
  clearTimeout(this._changeIdentityTimer);
49319
49262
  this.visitorId = options.visitor.id;
49320
49263
  this.accountId = options.account.id;
49321
49264
  return this.checkVisitorEligibility();
49322
49265
  }
49323
- }
49324
- checkVisitorEligibility(continuationCallback) {
49266
+ };
49267
+ SessionRecorder.prototype.checkVisitorEligibility = function (continuationCallback) {
49268
+ var _this = this;
49325
49269
  if (!this.isRecording() && this.pendo._.isNull(this.visitorId) && this.pendo._.isNull(this.accountId))
49326
49270
  return;
49327
49271
  this.isCheckingVisitorEligibility = true;
49328
- return this.fetchVisitorConfig().then(visitorConfig => {
49329
- if ((!visitorConfig || !visitorConfig.enable) && this.isRecording()) {
49330
- this.stop();
49272
+ return this.fetchVisitorConfig().then(function (visitorConfig) {
49273
+ if ((!visitorConfig || !visitorConfig.enable) && _this.isRecording()) {
49274
+ _this.stop();
49331
49275
  }
49332
- if (visitorConfig && visitorConfig.enable && this.isRecording()) {
49276
+ if (visitorConfig && visitorConfig.enable && _this.isRecording()) {
49333
49277
  if (continuationCallback) {
49334
- continuationCallback.call(this);
49278
+ continuationCallback.call(_this);
49335
49279
  }
49336
- this.api.Events.trigger('recording:unpaused');
49280
+ _this.api.Events.trigger('recording:unpaused');
49337
49281
  }
49338
- if (visitorConfig && visitorConfig.enable && !this.isRecording()) {
49339
- this._startRecordingForVisitor(visitorConfig);
49282
+ if (visitorConfig && visitorConfig.enable && !_this.isRecording()) {
49283
+ _this._startRecordingForVisitor(visitorConfig);
49340
49284
  }
49341
- this.isCheckingVisitorEligibility = false;
49342
- }).catch((e) => {
49343
- this.isCheckingVisitorEligibility = false;
49344
- this.api.log.critical('Failed to re-fetch recording config', { error: e });
49345
- this.logStopReason('VISITOR_CONFIG_ERROR');
49285
+ _this.isCheckingVisitorEligibility = false;
49286
+ })["catch"](function (e) {
49287
+ _this.isCheckingVisitorEligibility = false;
49288
+ _this.api.log.critical('Failed to re-fetch recording config', { error: e });
49289
+ _this.logStopReason('VISITOR_CONFIG_ERROR');
49346
49290
  });
49347
- }
49348
- snapshot() {
49291
+ };
49292
+ SessionRecorder.prototype.snapshot = function () {
49349
49293
  if (!this.isRecording())
49350
49294
  return;
49351
49295
  this.send();
49352
49296
  this.record.takeFullSnapshot();
49353
- }
49354
- isRecording() {
49297
+ };
49298
+ SessionRecorder.prototype.isRecording = function () {
49355
49299
  return this.interval != null;
49356
- }
49357
- recordingConfig(visitorConfig) {
49358
- const recordingOptions = this.pendo._.extend({}, this.config.options, visitorConfig);
49359
- const maskOptions = {
49300
+ };
49301
+ SessionRecorder.prototype.recordingConfig = function (visitorConfig) {
49302
+ var recordingOptions = this.pendo._.extend({}, this.config.options, visitorConfig);
49303
+ var maskOptions = {
49360
49304
  maskAllText: recordingOptions.privateByDefault != null ? recordingOptions.privateByDefault : true,
49361
49305
  maskTextSelector: ['.pendo-sr-mask'].concat(recordingOptions.maskedSelectors || []).join(','),
49362
49306
  unmaskTextSelector: ['.pendo-sr-unmask'].concat(recordingOptions.unmaskedSelectors || []).join(','),
@@ -49371,9 +49315,9 @@ class SessionRecorder {
49371
49315
  password: true,
49372
49316
  tel: true
49373
49317
  });
49374
- const blockedSelectors = ['.pendo-ignore', '.pendo-sr-ignore'].concat(recordingOptions.blockedSelectors || []);
49375
- const hiddenSelectors = ['.pendo-sr-hide'].concat(recordingOptions.hiddenSelectors || []);
49376
- const config = {
49318
+ var blockedSelectors = ['.pendo-ignore', '.pendo-sr-ignore'].concat(recordingOptions.blockedSelectors || []);
49319
+ var hiddenSelectors = ['.pendo-sr-hide'].concat(recordingOptions.hiddenSelectors || []);
49320
+ var config = {
49377
49321
  maskInputFn: this.pendo._.partial(maskInput, maskOptions),
49378
49322
  maskTextFn: this.pendo._.partial(maskText, maskOptions),
49379
49323
  maskTextSelector: '*',
@@ -49387,7 +49331,7 @@ class SessionRecorder {
49387
49331
  emitFromIframe: !!this.api.ConfigReader.get(RECORDING_CONFIG_TREAT_IFRAME_AS_ROOT)
49388
49332
  };
49389
49333
  return config;
49390
- }
49334
+ };
49391
49335
  /**
49392
49336
  * Used to start collecting replay data.
49393
49337
  *
@@ -49397,67 +49341,71 @@ class SessionRecorder {
49397
49341
  * @example
49398
49342
  * pendo.recording.start()
49399
49343
  */
49400
- start() {
49344
+ SessionRecorder.prototype.start = function () {
49401
49345
  this._restartPtm = this.api.analytics.ptm().pause();
49402
49346
  this.allowStart = true;
49403
49347
  this.visitorId = this.pendo.get_visitor_id();
49404
49348
  this.accountId = this.pendo.get_account_id();
49405
49349
  this._start();
49406
- }
49407
- _markEvents(events) {
49350
+ };
49351
+ SessionRecorder.prototype._markEvents = function (events) {
49408
49352
  if (!this.recordingId || !this.isRecording())
49409
49353
  return;
49410
- for (var e of events) {
49354
+ for (var _i = 0, events_1 = events; _i < events_1.length; _i++) {
49355
+ var e = events_1[_i];
49411
49356
  if ((e.visitor_id === this.visitorId || e.visitorId === this.visitorId) && e.type !== 'identify') {
49412
49357
  e.recordingId = this.recordingId;
49413
49358
  e.recordingSessionId = this.sessionId(this.recordingId);
49414
49359
  }
49415
49360
  }
49416
- }
49417
- restartPtm() {
49361
+ };
49362
+ SessionRecorder.prototype.restartPtm = function () {
49418
49363
  if (this.pendo._.isFunction(this._restartPtm)) {
49419
49364
  this._markEvents(this.pendo.buffers.events);
49420
- for (var silo of this.pendo.buffers.silos) {
49365
+ for (var _i = 0, _a = this.pendo.buffers.silos; _i < _a.length; _i++) {
49366
+ var silo = _a[_i];
49421
49367
  this._markEvents(silo);
49422
49368
  }
49423
49369
  this._restartPtm();
49424
49370
  this._restartPtm = null;
49425
49371
  }
49426
- }
49427
- _start() {
49372
+ };
49373
+ SessionRecorder.prototype._start = function () {
49374
+ var _this = this;
49428
49375
  if (this.isRecording())
49429
49376
  return;
49430
49377
  if (!this.pendo.isSendingEvents())
49431
49378
  return;
49432
49379
  if (!this.allowStart)
49433
49380
  return;
49434
- return this.fetchVisitorConfig().then(visitorConfig => {
49435
- if (!this.allowStart)
49381
+ return this.fetchVisitorConfig().then(function (visitorConfig) {
49382
+ if (!_this.allowStart)
49436
49383
  return;
49437
49384
  if (!visitorConfig || !visitorConfig.enable) {
49438
- this.restartPtm();
49439
- this.logStopReason('VISITOR_DISABLED');
49385
+ _this.restartPtm();
49386
+ _this.logStopReason('VISITOR_DISABLED');
49440
49387
  return;
49441
49388
  }
49442
- this._startRecordingForVisitor(visitorConfig);
49443
- }).catch((e) => {
49444
- this.restartPtm();
49389
+ _this._startRecordingForVisitor(visitorConfig);
49390
+ })["catch"](function (e) {
49391
+ _this.restartPtm();
49445
49392
  if (e && /Failed to fetch/.test(e.toString())) {
49446
49393
  return;
49447
49394
  }
49448
- this.api.log.critical('Failed to fetch recording config', {
49395
+ _this.api.log.critical('Failed to fetch recording config', {
49449
49396
  error: e,
49450
- visitorId: this.visitorId,
49451
- accountId: this.accountId,
49452
- url: this.pendo.url.get()
49397
+ visitorId: _this.visitorId,
49398
+ accountId: _this.accountId,
49399
+ url: _this.pendo.url.get()
49453
49400
  });
49454
- this.logStopReason('VISITOR_CONFIG_ERROR');
49401
+ _this.logStopReason('VISITOR_CONFIG_ERROR');
49455
49402
  });
49456
- }
49457
- _startRecordingForVisitor(visitorConfig) {
49403
+ };
49404
+ SessionRecorder.prototype._startRecordingForVisitor = function (visitorConfig) {
49405
+ var _this = this;
49458
49406
  this.api.Events.trigger('recording:unpaused');
49459
49407
  this.transport.start(this.config);
49460
- const disableFallback = this.pendo._.get(this.config, 'disableFallback', true);
49408
+ var disableFallback = this.pendo._.get(this.config, 'disableFallback', true);
49461
49409
  if (disableFallback && !this.transport.worker) {
49462
49410
  this.restartPtm();
49463
49411
  this.pendo.log('Worker failed to start and main thread fallback is disabled. Recording prevented from starting.');
@@ -49469,9 +49417,9 @@ class SessionRecorder {
49469
49417
  this.visitorConfig = visitorConfig;
49470
49418
  this.clearOldSessionId();
49471
49419
  this.sendQueue.start();
49472
- this.interval = setInterval(() => {
49473
- if (!this.sendQueue.failed()) {
49474
- this.send();
49420
+ this.interval = setInterval(function () {
49421
+ if (!_this.sendQueue.failed()) {
49422
+ _this.send();
49475
49423
  }
49476
49424
  }, SEND_INTERVAL);
49477
49425
  var config = this.recordingConfig(visitorConfig);
@@ -49486,8 +49434,8 @@ class SessionRecorder {
49486
49434
  this.restartPtm();
49487
49435
  this.logStopReason('RECORDING_ERROR');
49488
49436
  }
49489
- }
49490
- _sendIds() {
49437
+ };
49438
+ SessionRecorder.prototype._sendIds = function () {
49491
49439
  if (window != window.top)
49492
49440
  return;
49493
49441
  this.api.frames.getChannel().postMessage({
@@ -49496,16 +49444,16 @@ class SessionRecorder {
49496
49444
  _sessionId: this._sessionId,
49497
49445
  topId: this.api.store.state.frames.topId
49498
49446
  });
49499
- }
49500
- _refreshIds() {
49447
+ };
49448
+ SessionRecorder.prototype._refreshIds = function () {
49501
49449
  if (window == window.top)
49502
49450
  return;
49503
49451
  this.api.frames.getChannel().postMessage({
49504
49452
  type: 'pendo:sr:refresh'
49505
49453
  });
49506
- }
49507
- _frameMessage(e) {
49508
- const message = e.data;
49454
+ };
49455
+ SessionRecorder.prototype._frameMessage = function (e) {
49456
+ var message = e.data;
49509
49457
  if (message.type === 'pendo:sr:id') {
49510
49458
  // When useBroadcastChannel is true, code in filterCrossWindowMessages restricts messages to frames in the
49511
49459
  // current browser window/tab. Due to a race condition in clone-detection, you can have two tabs that
@@ -49521,17 +49469,18 @@ class SessionRecorder {
49521
49469
  else if (message.type === 'pendo:sr:refresh' && window == window.top) {
49522
49470
  this._sendIds();
49523
49471
  }
49524
- }
49525
- clearSessionId() {
49472
+ };
49473
+ SessionRecorder.prototype.clearSessionId = function () {
49526
49474
  delete this._sessionId;
49527
49475
  this.api.sessionStorage.removeItem(SESSION_RECORDING_ID);
49528
49476
  this.api.sessionStorage.removeItem(this.sessionIdKey);
49529
- }
49530
- sessionId(defaultId = this.pendo.randomString(16)) {
49477
+ };
49478
+ SessionRecorder.prototype.sessionId = function (defaultId) {
49479
+ if (defaultId === void 0) { defaultId = this.pendo.randomString(16); }
49531
49480
  if (!this._sessionId) {
49532
- let currentSessionId = this.api.sessionStorage.getItem(this.sessionIdKey);
49481
+ var currentSessionId = this.api.sessionStorage.getItem(this.sessionIdKey);
49533
49482
  if (!currentSessionId) {
49534
- let legacySessionId = this.api.sessionStorage.getItem(SESSION_RECORDING_ID);
49483
+ var legacySessionId = this.api.sessionStorage.getItem(SESSION_RECORDING_ID);
49535
49484
  if (legacySessionId) {
49536
49485
  currentSessionId = legacySessionId;
49537
49486
  this.api.sessionStorage.removeItem(SESSION_RECORDING_ID);
@@ -49544,41 +49493,41 @@ class SessionRecorder {
49544
49493
  this._sessionId = currentSessionId;
49545
49494
  }
49546
49495
  return this._sessionId;
49547
- }
49548
- clearOldSessionId() {
49549
- let lastUserInteractionEventInfo = this.getLastUserInteractionEventInformation();
49496
+ };
49497
+ SessionRecorder.prototype.clearOldSessionId = function () {
49498
+ var lastUserInteractionEventInfo = this.getLastUserInteractionEventInformation();
49550
49499
  if (lastUserInteractionEventInfo) {
49551
- const lastEmitTime = lastUserInteractionEventInfo.timestamp;
49552
- const sameVisitor = lastUserInteractionEventInfo.visitorId === this.visitorId && lastUserInteractionEventInfo.accountId === this.accountId;
49553
- const withinInactivityLimit = lastEmitTime > Date.now() - this.pendo._.get(this.visitorConfig, 'inactivityDuration', THIRTY_MINUTES);
49500
+ var lastEmitTime = lastUserInteractionEventInfo.timestamp;
49501
+ var sameVisitor = lastUserInteractionEventInfo.visitorId === this.visitorId && lastUserInteractionEventInfo.accountId === this.accountId;
49502
+ var withinInactivityLimit = lastEmitTime > Date.now() - this.pendo._.get(this.visitorConfig, 'inactivityDuration', THIRTY_MINUTES);
49554
49503
  if (sameVisitor && withinInactivityLimit)
49555
49504
  return;
49556
49505
  }
49557
49506
  this.clearSessionInfo();
49558
49507
  this.isNewSession = true;
49559
- }
49560
- clearSessionInfo() {
49508
+ };
49509
+ SessionRecorder.prototype.clearSessionInfo = function () {
49561
49510
  this.currentRecordingSize = 0;
49562
49511
  this.clearSessionId();
49563
49512
  this.clearLastUserInteractionEventInformation();
49564
- }
49565
- isUserInteraction(event) {
49513
+ };
49514
+ SessionRecorder.prototype.isUserInteraction = function (event) {
49566
49515
  if (event.type !== EVENT_TYPES.INCREMENTAL_SNAPSHOT) {
49567
49516
  return false;
49568
49517
  }
49569
49518
  return event.data.source > EVENT_TYPES.INCREMENTAL_SOURCE_MUTATION && event.data.source <= EVENT_TYPES.INCREMENTAL_SOURCE_INPUT;
49570
- }
49571
- storeLastUserInteractionEventInformation(event, visitorId, accountId, skipUserInteractionCheck) {
49519
+ };
49520
+ SessionRecorder.prototype.storeLastUserInteractionEventInformation = function (event, visitorId, accountId, skipUserInteractionCheck) {
49572
49521
  if (this.isUserInteraction(event) || skipUserInteractionCheck) {
49573
- this.lastUserInteractionEventInfo = { timestamp: event.timestamp, visitorId, accountId };
49522
+ this.lastUserInteractionEventInfo = { timestamp: event.timestamp, visitorId: visitorId, accountId: accountId };
49574
49523
  this.api.sessionStorage.setItem(SESSION_RECORDING_LAST_USER_INTERACTION_EVENT, JSON.stringify(this.lastUserInteractionEventInfo));
49575
49524
  }
49576
- }
49577
- clearLastUserInteractionEventInformation() {
49525
+ };
49526
+ SessionRecorder.prototype.clearLastUserInteractionEventInformation = function () {
49578
49527
  delete this.lastUserInteractionEventInfo;
49579
49528
  this.api.sessionStorage.removeItem(SESSION_RECORDING_LAST_USER_INTERACTION_EVENT);
49580
- }
49581
- getLastUserInteractionEventInformation() {
49529
+ };
49530
+ SessionRecorder.prototype.getLastUserInteractionEventInformation = function () {
49582
49531
  if (this.lastUserInteractionEventInfo)
49583
49532
  return this.lastUserInteractionEventInfo;
49584
49533
  try {
@@ -49588,7 +49537,7 @@ class SessionRecorder {
49588
49537
  catch (e) { // nothing here yet or failed to be written; don't need to log
49589
49538
  return null;
49590
49539
  }
49591
- }
49540
+ };
49592
49541
  /**
49593
49542
  * Handle new rrweb events coming in. This will also make sure that we are properly sending a "keyframe"
49594
49543
  * as the BE expects it. A "keyframe" should consist of only the events needed to start a recording. This includes
@@ -49599,19 +49548,19 @@ class SessionRecorder {
49599
49548
  * @param event.type The enum type of the specific event (e.g. meta, full snapshot, incremental snapshot)
49600
49549
  * @param event.data The specific data to describe the event, this is different depending on what the type is
49601
49550
  */
49602
- emit(event) {
49603
- const isMeta = event.type === EVENT_TYPES.META;
49604
- const isSnapshot = event.type === EVENT_TYPES.FULL_SNAPSHOT;
49605
- const prevLastEmitTime = this.pendo._.get(this.getLastUserInteractionEventInformation(), 'timestamp');
49606
- const inactivityDuration = this.pendo._.get(this.visitorConfig, 'inactivityDuration', THIRTY_MINUTES);
49607
- let skipUserInteractionCheck = false;
49551
+ SessionRecorder.prototype.emit = function (event) {
49552
+ var isMeta = event.type === EVENT_TYPES.META;
49553
+ var isSnapshot = event.type === EVENT_TYPES.FULL_SNAPSHOT;
49554
+ var prevLastEmitTime = this.pendo._.get(this.getLastUserInteractionEventInformation(), 'timestamp');
49555
+ var inactivityDuration = this.pendo._.get(this.visitorConfig, 'inactivityDuration', THIRTY_MINUTES);
49556
+ var skipUserInteractionCheck = false;
49608
49557
  if (event.timestamp && event.timestamp.getTime) {
49609
49558
  event.timestamp = event.timestamp.getTime();
49610
49559
  }
49611
49560
  if (!event.timestamp) {
49612
49561
  event.timestamp = (new Date()).getTime();
49613
49562
  }
49614
- const withinInactivityLimit = prevLastEmitTime && event.timestamp - prevLastEmitTime <= inactivityDuration;
49563
+ var withinInactivityLimit = prevLastEmitTime && event.timestamp - prevLastEmitTime <= inactivityDuration;
49615
49564
  // If we don't have a last emit time and a META event is emitted, store the META event as the last user interaction
49616
49565
  // event. This most commonly happens when a replay is first started and establishes a baseline timestamp to
49617
49566
  // to compare inactivity against. For subsequent META events that are part of the same replay, we should have
@@ -49634,7 +49583,7 @@ class SessionRecorder {
49634
49583
  this.logStopReason('INACTIVE_HIDDEN_TAB');
49635
49584
  }
49636
49585
  if (!this.isCheckingVisitorEligibility) {
49637
- const continuationCallback = function () {
49586
+ var continuationCallback = function () {
49638
49587
  this.send();
49639
49588
  this.clearSessionInfo();
49640
49589
  this.snapshot();
@@ -49670,13 +49619,13 @@ class SessionRecorder {
49670
49619
  }
49671
49620
  else if (!isMeta) {
49672
49621
  this.eventsSinceLastKeyFrame += 1;
49673
- const timeSinceLastKeyFrame = event.timestamp - this.lastKeyFrameTime;
49674
- const exceeds24Hours = timeSinceLastKeyFrame >= ONE_DAY_IN_MILLISECONDS;
49675
- const exceedsTimeFreq = timeSinceLastKeyFrame >= this.pendo._.get(this.visitorConfig, 'keyframeTimeFrequency', 30645047); // Defaults determined by BE originally, shouldn't really ever be used
49676
- const exceedsEventFreq = this.eventsSinceLastKeyFrame >= this.pendo._.get(this.visitorConfig, 'keyframeEventFrequency', 4548); // Defaults determined by BE originally, shouldn't really ever be used
49677
- const exceedsRecordingSizeLimit = this.currentRecordingSize >= this.pendo._.get(this.visitorConfig, 'recordingSizeLimit', ONE_HUNDRED_MB_IN_BYTES);
49622
+ var timeSinceLastKeyFrame = event.timestamp - this.lastKeyFrameTime;
49623
+ var exceeds24Hours = timeSinceLastKeyFrame >= ONE_DAY_IN_MILLISECONDS;
49624
+ var exceedsTimeFreq = timeSinceLastKeyFrame >= this.pendo._.get(this.visitorConfig, 'keyframeTimeFrequency', 30645047); // Defaults determined by BE originally, shouldn't really ever be used
49625
+ var exceedsEventFreq = this.eventsSinceLastKeyFrame >= this.pendo._.get(this.visitorConfig, 'keyframeEventFrequency', 4548); // Defaults determined by BE originally, shouldn't really ever be used
49626
+ var exceedsRecordingSizeLimit = this.currentRecordingSize >= this.pendo._.get(this.visitorConfig, 'recordingSizeLimit', ONE_HUNDRED_MB_IN_BYTES);
49678
49627
  if (exceeds24Hours || (exceedsTimeFreq && exceedsEventFreq) || exceedsRecordingSizeLimit) {
49679
- const continuationCallback = function () {
49628
+ var continuationCallback = function () {
49680
49629
  this.currentRecordingSize = 0;
49681
49630
  this.snapshot();
49682
49631
  };
@@ -49688,18 +49637,18 @@ class SessionRecorder {
49688
49637
  }
49689
49638
  }
49690
49639
  }
49691
- }
49692
- updateCurrentRecordingSize(recordingPayloadSize) {
49640
+ };
49641
+ SessionRecorder.prototype.updateCurrentRecordingSize = function (recordingPayloadSize) {
49693
49642
  this.currentRecordingSize += recordingPayloadSize;
49694
- }
49695
- onWorkerMessage(messageData) {
49643
+ };
49644
+ SessionRecorder.prototype.onWorkerMessage = function (messageData) {
49696
49645
  switch (messageData.type) {
49697
49646
  case 'workerDied': {
49698
49647
  this.logStopReason('WORKER_DIED');
49699
49648
  break;
49700
49649
  }
49701
49650
  case 'recordingPayloadSize': {
49702
- const { recordingPayloadSize, exceedsPayloadSizeLimit } = messageData;
49651
+ var recordingPayloadSize = messageData.recordingPayloadSize, exceedsPayloadSizeLimit = messageData.exceedsPayloadSizeLimit;
49703
49652
  if (!recordingPayloadSize)
49704
49653
  return;
49705
49654
  // stop recording if recording payload exceeds allowed payload size
@@ -49712,7 +49661,7 @@ class SessionRecorder {
49712
49661
  break;
49713
49662
  }
49714
49663
  case 'hostedResources': {
49715
- const { hostedResourcesEvent } = messageData;
49664
+ var hostedResourcesEvent = messageData.hostedResourcesEvent;
49716
49665
  if (!hostedResourcesEvent)
49717
49666
  return;
49718
49667
  this.sendHostedResources(hostedResourcesEvent);
@@ -49723,12 +49672,12 @@ class SessionRecorder {
49723
49672
  break;
49724
49673
  }
49725
49674
  case 'missingData': {
49726
- this.logStopReason(`MISSING_${messageData.missingData}`);
49675
+ this.logStopReason("MISSING_".concat(messageData.missingData));
49727
49676
  break;
49728
49677
  }
49729
49678
  }
49730
- }
49731
- addRecordingId(event) {
49679
+ };
49680
+ SessionRecorder.prototype.addRecordingId = function (event) {
49732
49681
  if (!this.isRecording())
49733
49682
  return;
49734
49683
  if (!this.recordingId || !event || !event.data || !event.data.length)
@@ -49747,7 +49696,7 @@ class SessionRecorder {
49747
49696
  return;
49748
49697
  }
49749
49698
  this._markEvents([capturedEvent]);
49750
- }
49699
+ };
49751
49700
  /**
49752
49701
  * Used to stop collecting replay data.
49753
49702
  *
@@ -49758,7 +49707,7 @@ class SessionRecorder {
49758
49707
  * @example
49759
49708
  * pendo.recording.stop()
49760
49709
  */
49761
- stop() {
49710
+ SessionRecorder.prototype.stop = function () {
49762
49711
  if (this._stop) {
49763
49712
  this._stop();
49764
49713
  }
@@ -49776,32 +49725,33 @@ class SessionRecorder {
49776
49725
  this.accountId = null;
49777
49726
  this.clearSessionInfo();
49778
49727
  this.onRecordingStop();
49779
- }
49780
- handleHidden() {
49728
+ };
49729
+ SessionRecorder.prototype.handleHidden = function () {
49781
49730
  this.send({ hidden: true });
49782
- }
49783
- handleUnload() {
49731
+ };
49732
+ SessionRecorder.prototype.handleUnload = function () {
49784
49733
  if (this.api.ConfigReader.get(RECORDING_CONFIG_DISABLE_UNLOAD))
49785
49734
  return;
49786
49735
  this.send({ unload: true });
49787
- }
49788
- buildRequestUrl(baseUrl, queryObj) {
49736
+ };
49737
+ SessionRecorder.prototype.buildRequestUrl = function (baseUrl, queryObj) {
49789
49738
  var authedQueryObj = this.pendo._.extend({}, this.api.agent.getJwtInfoCopy(), queryObj);
49790
49739
  var queryString = this.pendo._.map(authedQueryObj, function (value, key) {
49791
- return `${key}=${value}`;
49740
+ return "".concat(key, "=").concat(value);
49792
49741
  }).join('&');
49793
- return queryString.length ? `${baseUrl}?${queryString}` : baseUrl;
49794
- }
49795
- sendFailure(reason) {
49742
+ return queryString.length ? "".concat(baseUrl, "?").concat(queryString) : baseUrl;
49743
+ };
49744
+ SessionRecorder.prototype.sendFailure = function (reason) {
49796
49745
  this.stop();
49797
49746
  this.logStopReason(reason);
49798
- }
49799
- rateLimitExceeded() {
49747
+ };
49748
+ SessionRecorder.prototype.rateLimitExceeded = function () {
49800
49749
  this.send(); // sends first chunk of 20k
49801
49750
  this.stop(); // sends 2nd chunk of 20k, rest is ignored
49802
49751
  this.logStopReason('DATA_OVERLOAD');
49803
- }
49804
- send({ unload = false, keyframe = false, hidden = false } = {}) {
49752
+ };
49753
+ SessionRecorder.prototype.send = function (_a) {
49754
+ var _b = _a === void 0 ? {} : _a, _c = _b.unload, unload = _c === void 0 ? false : _c, _d = _b.keyframe, keyframe = _d === void 0 ? false : _d, _e = _b.hidden, hidden = _e === void 0 ? false : _e;
49805
49755
  if (!this.isRecording())
49806
49756
  return;
49807
49757
  if (!this.buffer)
@@ -49831,7 +49781,7 @@ class SessionRecorder {
49831
49781
  }
49832
49782
  // Used to add promoted metadata onto the recording event
49833
49783
  this.api.Events.eventCaptured.trigger(payload);
49834
- const params = {
49784
+ var params = {
49835
49785
  v: this.pendo.VERSION,
49836
49786
  recordingId: this.recordingId
49837
49787
  };
@@ -49842,11 +49792,11 @@ class SessionRecorder {
49842
49792
  params.ns = 1;
49843
49793
  this.isNewSession = false;
49844
49794
  }
49845
- var url = this.buildRequestUrl(`${this.pendo.HOST}/data/rec/${this.pendo.apiKey}`, params);
49795
+ var url = this.buildRequestUrl("".concat(this.pendo.HOST, "/data/rec/").concat(this.pendo.apiKey), params);
49846
49796
  payload = this.buffer.pack(payload, this.pendo._);
49847
49797
  if (unload || hidden) {
49848
49798
  try {
49849
- this.sendQueue.drain([{ url, payload }], unload);
49799
+ this.sendQueue.drain([{ url: url, payload: payload }], unload);
49850
49800
  }
49851
49801
  catch (e) {
49852
49802
  if (e.reason) {
@@ -49858,29 +49808,30 @@ class SessionRecorder {
49858
49808
  }
49859
49809
  }
49860
49810
  else {
49861
- this.sendQueue.push({ url, payload });
49811
+ this.sendQueue.push({ url: url, payload: payload });
49862
49812
  }
49863
49813
  if (!this.buffer.isEmpty()) {
49864
- this.send({ unload });
49814
+ this.send({ unload: unload });
49865
49815
  }
49866
- }
49867
- fetchVisitorConfig() {
49868
- const jzb = this.pendo.compress({
49816
+ };
49817
+ SessionRecorder.prototype.fetchVisitorConfig = function () {
49818
+ var jzb = this.pendo.compress({
49869
49819
  url: this.pendo.url.get(),
49870
49820
  metadata: this.pendo.getSerializedMetadata(),
49871
49821
  visitorId: this.visitorId,
49872
49822
  accountId: this.accountId
49873
49823
  });
49874
- const url = this.buildRequestUrl(`${this.pendo.HOST}/data/recordingconf/${this.pendo.apiKey}`, {
49875
- jzb,
49824
+ var url = this.buildRequestUrl("".concat(this.pendo.HOST, "/data/recordingconf/").concat(this.pendo.apiKey), {
49825
+ jzb: jzb,
49876
49826
  ct: (new Date().getTime()),
49877
49827
  v: this.pendo.VERSION
49878
49828
  });
49879
49829
  return fetch(url, {
49880
49830
  method: 'GET'
49881
- }).then(response => response.json());
49882
- }
49883
- logStopReason(reason, error) {
49831
+ }).then(function (response) { return response.json(); });
49832
+ };
49833
+ SessionRecorder.prototype.logStopReason = function (reason, error) {
49834
+ var _this = this;
49884
49835
  var tracer = this.api.EventTracer.addTracerIds({});
49885
49836
  var payload = this.pendo._.extend({
49886
49837
  type: 'recording',
@@ -49896,51 +49847,53 @@ class SessionRecorder {
49896
49847
  recordingPayload: [],
49897
49848
  sequence: 0,
49898
49849
  recordingPayloadCount: 0,
49899
- props: Object.assign({ reason }, (error && { error: error instanceof Error ? error === null || error === void 0 ? void 0 : error.message : error }))
49850
+ props: __assign({ reason: reason }, (error && { error: error instanceof Error ? error === null || error === void 0 ? void 0 : error.message : error }))
49900
49851
  }, tracer);
49901
49852
  var jzb = this.pendo.compress(payload);
49902
- var url = this.buildRequestUrl(`${this.pendo.HOST}/data/rec/${this.pendo.apiKey}`, {
49903
- jzb,
49853
+ var url = this.buildRequestUrl("".concat(this.pendo.HOST, "/data/rec/").concat(this.pendo.apiKey), {
49854
+ jzb: jzb,
49904
49855
  ct: (new Date().getTime()),
49905
49856
  v: this.pendo.VERSION,
49906
49857
  recordingId: payload.recordingId
49907
49858
  });
49908
49859
  var body = this.pendo.compress(payload, 'binary');
49909
49860
  return this.transport.post(url, {
49910
- body,
49861
+ body: body,
49911
49862
  keepalive: true
49912
- }).catch((e) => {
49913
- this.api.log.critical('Failed to send reason for stopping recording', { error: e });
49863
+ })["catch"](function (e) {
49864
+ _this.api.log.critical('Failed to send reason for stopping recording', { error: e });
49914
49865
  });
49915
- }
49916
- sendHostedResources(event) {
49866
+ };
49867
+ SessionRecorder.prototype.sendHostedResources = function (event) {
49868
+ var _this = this;
49917
49869
  var tracer = this.api.EventTracer.addTracerIds({});
49918
- var payload = this.pendo._.extend(Object.assign(Object.assign({}, event), { browserTime: new Date().getTime() }), tracer);
49919
- var url = this.buildRequestUrl(`${this.pendo.HOST}/data/rec/${this.pendo.apiKey}`, {
49870
+ var payload = this.pendo._.extend(__assign(__assign({}, event), { browserTime: new Date().getTime() }), tracer);
49871
+ var url = this.buildRequestUrl("".concat(this.pendo.HOST, "/data/rec/").concat(this.pendo.apiKey), {
49920
49872
  ct: (new Date().getTime()),
49921
49873
  v: this.pendo.VERSION,
49922
49874
  recordingId: payload.recordingId
49923
49875
  });
49924
49876
  var body = this.pendo.compress(payload, 'binary');
49925
49877
  return this.transport.post(url, {
49926
- body,
49878
+ body: body,
49927
49879
  keepalive: true
49928
- }).catch((e) => {
49929
- this.api.log.critical('Failed to send hosted resources for recording event', { error: e });
49880
+ })["catch"](function (e) {
49881
+ _this.api.log.critical('Failed to send hosted resources for recording event', { error: e });
49930
49882
  });
49931
- }
49883
+ };
49932
49884
  /**
49933
49885
  * This should fire when an event is triggered in clearClonedStorage. Under normal circumstances, the event will be
49934
49886
  * triggered before recording begins in the cloned tab. On the off chance tabId changes again though, create a new
49935
49887
  * replay. We want to avoid scenarios where a single recordingId is associated with multiple tabIds. This can happen if
49936
49888
  * clone detection runs in a duplicated tab before it runs in the original tab.
49937
49889
  */
49938
- handleTabIdChange() {
49890
+ SessionRecorder.prototype.handleTabIdChange = function () {
49939
49891
  this.send();
49940
49892
  this.clearSessionInfo();
49941
49893
  this.snapshot();
49942
- }
49943
- }
49894
+ };
49895
+ return SessionRecorder;
49896
+ }());
49944
49897
 
49945
49898
  function wrapMethodWithCatch(method) {
49946
49899
  return function () {
@@ -49961,7 +49914,8 @@ function errorLogger(recorder) {
49961
49914
  return recorder;
49962
49915
  if (!recorder.constructor || !recorder.constructor.prototype)
49963
49916
  return recorder;
49964
- for (let methodName of Object.getOwnPropertyNames(recorder.constructor.prototype)) {
49917
+ for (var _i = 0, _a = Object.getOwnPropertyNames(recorder.constructor.prototype); _i < _a.length; _i++) {
49918
+ var methodName = _a[_i];
49965
49919
  if (methodName === 'constructor')
49966
49920
  continue;
49967
49921
  recorder[methodName] = wrapMethodWithCatch(recorder[methodName]);