@pendo/agent 2.289.1 → 2.290.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dom.esm.js CHANGED
@@ -5283,6 +5283,16 @@ function isElementShadowRoot(elem, _win) {
5283
5283
  function getParent(elem, _win) {
5284
5284
  return isElementShadowRoot(elem, _win) ? elem.host : elem.parentNode;
5285
5285
  }
5286
+ function contains(context, elem, _win) {
5287
+ var parent = elem;
5288
+ while (parent) {
5289
+ if (parent === context) {
5290
+ return true;
5291
+ }
5292
+ parent = getParent(parent, _win);
5293
+ }
5294
+ return false;
5295
+ }
5286
5296
 
5287
5297
  var shadowAPI = (function () {
5288
5298
  function isShadowSelector(selector) {
@@ -5315,10 +5325,19 @@ var shadowAPI = (function () {
5315
5325
  isElementShadowRoot: isElementShadowRoot,
5316
5326
  getParent: getParent,
5317
5327
  isShadowSelector: isShadowSelector,
5318
- wrapSizzle: function (Sizzle) {
5328
+ wrapSizzle: function (Sizzle, shadowDomManager) {
5319
5329
  Sizzle.intercept(function (Sizzle, selection, context, results, seed) {
5320
5330
  if (!isShadowSelector(selection)) {
5321
- return Sizzle(selection, context, results, seed);
5331
+ var queryResults_1 = Sizzle(selection, context, results, seed);
5332
+ if (shadowDomManager.cache.size > 0) {
5333
+ // eslint-disable-next-line agent-eslint-rules/no-array-foreach
5334
+ shadowDomManager.cache.forEach(function (shadowRoot) {
5335
+ if (!context || context === document || contains(context, shadowRoot)) {
5336
+ queryResults_1.push.apply(queryResults_1, Sizzle(selection, shadowRoot, results, seed));
5337
+ }
5338
+ });
5339
+ }
5340
+ return queryResults_1;
5322
5341
  }
5323
5342
  if (!_.isFunction(document.documentElement.attachShadow)) {
5324
5343
  return Sizzle(selection.replace(shadowAPI.PSEUDO_REGEX, ''), context, results, seed);
@@ -7292,7 +7311,7 @@ function getScreenPosition(element) {
7292
7311
  };
7293
7312
  }
7294
7313
 
7295
- var VERSION = '2.289.1_';
7314
+ var VERSION = '2.290.1_';
7296
7315
 
7297
7316
  var decodeURIComponent = _.isFunction(window.decodeURIComponent) ? window.decodeURIComponent : _.identity;
7298
7317
 
@@ -3903,8 +3903,8 @@ var SERVER = '';
3903
3903
  var ASSET_HOST = '';
3904
3904
  var ASSET_PATH = '';
3905
3905
  var DESIGNER_SERVER = '';
3906
- var VERSION = '2.289.1_';
3907
- var PACKAGE_VERSION = '2.289.1';
3906
+ var VERSION = '2.290.1_';
3907
+ var PACKAGE_VERSION = '2.290.1';
3908
3908
  var LOADER = 'xhr';
3909
3909
  /* eslint-enable agent-eslint-rules/no-gulp-env-references */
3910
3910
  /**
@@ -6131,6 +6131,16 @@ function isElementShadowRoot(elem, _win) {
6131
6131
  function getParent(elem, _win) {
6132
6132
  return isElementShadowRoot(elem, _win) ? elem.host : elem.parentNode;
6133
6133
  }
6134
+ function contains(context, elem, _win) {
6135
+ let parent = elem;
6136
+ while (parent) {
6137
+ if (parent === context) {
6138
+ return true;
6139
+ }
6140
+ parent = getParent(parent, _win);
6141
+ }
6142
+ return false;
6143
+ }
6134
6144
 
6135
6145
  var shadowAPI = (function () {
6136
6146
  function isShadowSelector(selector) {
@@ -6163,10 +6173,19 @@ var shadowAPI = (function () {
6163
6173
  isElementShadowRoot: isElementShadowRoot,
6164
6174
  getParent: getParent,
6165
6175
  isShadowSelector,
6166
- wrapSizzle(Sizzle) {
6176
+ wrapSizzle(Sizzle, shadowDomManager) {
6167
6177
  Sizzle.intercept(function (Sizzle, selection, context, results, seed) {
6168
6178
  if (!isShadowSelector(selection)) {
6169
- return Sizzle(selection, context, results, seed);
6179
+ const queryResults = Sizzle(selection, context, results, seed);
6180
+ if (shadowDomManager.cache.size > 0) {
6181
+ // eslint-disable-next-line agent-eslint-rules/no-array-foreach
6182
+ shadowDomManager.cache.forEach(shadowRoot => {
6183
+ if (!context || context === document || contains(context, shadowRoot)) {
6184
+ queryResults.push(...Sizzle(selection, shadowRoot, results, seed));
6185
+ }
6186
+ });
6187
+ }
6188
+ return queryResults;
6170
6189
  }
6171
6190
  if (!_.isFunction(document.documentElement.attachShadow)) {
6172
6191
  return Sizzle(selection.replace(shadowAPI.PSEUDO_REGEX, ''), context, results, seed);
@@ -11796,6 +11815,7 @@ var restrictP1Access = _.memoize(function () {
11796
11815
 
11797
11816
  var eventCache = [];
11798
11817
  var trackEventCache = [];
11818
+ var agenticEventCache = [];
11799
11819
  // Send compressed event logs at least every 2 minutes
11800
11820
  var SEND_INTERVAL = 2 * 60 * 1000;
11801
11821
  var MAX_NUM_EVENTS = 16;
@@ -11815,8 +11835,10 @@ var buffers = {
11815
11835
  flushBy: _.noop,
11816
11836
  flushEvents: flushNow,
11817
11837
  flushTrackEvents: flushNow,
11838
+ flushAgenticEvents: flushNow,
11818
11839
  flushSilos: flushNow,
11819
11840
  flushTrackEventSilos: flushNow,
11841
+ flushAgenticEventSilos: flushNow,
11820
11842
  flushBeacons: flushNow,
11821
11843
  flushNow,
11822
11844
  flushLater,
@@ -11825,6 +11847,7 @@ var buffers = {
11825
11847
  beacons: [],
11826
11848
  silos: [],
11827
11849
  trackEventSilos: [],
11850
+ agenticEventSilos: [],
11828
11851
  lock: lockEvents,
11829
11852
  unlock: unlockAndClear
11830
11853
  };
@@ -12227,6 +12250,10 @@ function collectEvent(type, props, url, name, eventProperties, context) {
12227
12250
  trackEventQueue.push(event);
12228
12251
  return;
12229
12252
  }
12253
+ if (name === 'agentic') {
12254
+ agenticEventQueue.push(event);
12255
+ return;
12256
+ }
12230
12257
  eventQueue.push(attachMonitoringData(store, event));
12231
12258
  }
12232
12259
  function attachMonitoringData(store, event) {
@@ -12788,9 +12815,12 @@ var events;
12788
12815
  var trackEvents;
12789
12816
  var eventQueue;
12790
12817
  var trackEventQueue;
12818
+ var agenticEventQueue;
12819
+ var agenticEvents;
12791
12820
  function initializeEventBuffer(options) {
12792
12821
  events = buffers.events = eventCache;
12793
12822
  trackEvents = buffers.trackEvents = trackEventCache;
12823
+ agenticEvents = buffers.agenticEvents = agenticEventCache;
12794
12824
  eventQueue = createEventQueue(_.extend({
12795
12825
  cache: events,
12796
12826
  silos: buffers.silos,
@@ -12808,13 +12838,23 @@ function initializeEventBuffer(options) {
12808
12838
  type: 'track'
12809
12839
  }
12810
12840
  }, options));
12841
+ agenticEventQueue = createEventQueue(_.extend({
12842
+ cache: agenticEvents,
12843
+ silos: buffers.agenticEventSilos,
12844
+ apiKey: getAllApiKeys,
12845
+ beacon: 'agentic',
12846
+ class: 'agentic',
12847
+ allowPost: true
12848
+ }, options));
12811
12849
  addEventQueue(eventQueue);
12812
12850
  addEventQueue(trackEventQueue);
12851
+ addEventQueue(agenticEventQueue);
12813
12852
  return () => {
12814
12853
  buffersClearAll();
12815
12854
  removeEventQueue(eventQueue);
12816
12855
  removeEventQueue(trackEventQueue);
12817
- eventQueue = trackEventQueue = undefined;
12856
+ removeEventQueue(agenticEventQueue);
12857
+ eventQueue = trackEventQueue = agenticEventQueue = undefined;
12818
12858
  };
12819
12859
  }
12820
12860
 
@@ -25557,7 +25597,7 @@ function securityPolicyViolationFn(evt) {
25557
25597
  * @example
25558
25598
  * pendo.initGuides()
25559
25599
  */
25560
- var initGuides = function () {
25600
+ var initGuides = function (observer) {
25561
25601
  const teardownFns = [];
25562
25602
  teardownFns.push(initGuideAnalytics({
25563
25603
  localStorageUnload: ConfigReader.get('analytics.localStorageUnload')
@@ -25621,8 +25661,8 @@ var initGuides = function () {
25621
25661
  teardownFns.push(attachEventInternal(window, 'gestureend', adjustGuidesOnGestureEnd, true));
25622
25662
  teardownFns.push(attachEventInternal(window, 'securitypolicyviolation', securityPolicyViolationFn));
25623
25663
  teardownFns.push(createVideoFullScreenListeners());
25624
- if (ConfigReader.get('preferMutationObserver') && sniffer.MutationObserver) {
25625
- var updateGuide = function (event) {
25664
+ if (observer.observing) {
25665
+ var updateGuide = function () {
25626
25666
  store.dispatch('guideUpdate/documentChanged');
25627
25667
  };
25628
25668
  const debouncedUpdate = _.debounce(updateGuide, 50);
@@ -25630,10 +25670,8 @@ var initGuides = function () {
25630
25670
  teardownFns.push(attachEvent(window, 'animationend', debouncedUpdate));
25631
25671
  teardownFns.push(attachEvent(window, 'transitionend', debouncedUpdate));
25632
25672
  teardownFns.push(attachEvent(window, 'mouseover', debouncedUpdate));
25673
+ store.commit('guideUpdate/setObserver', observer);
25633
25674
  store.commit('guideUpdate/setUseObserver');
25634
- if (ConfigReader.get('observeShadowRoots')) {
25635
- store.commit('guideUpdate/setObserveShadowRoots');
25636
- }
25637
25675
  teardownFns.push(() => store.dispatch('guideUpdate/stopObserver'));
25638
25676
  }
25639
25677
  /**
@@ -27014,6 +27052,159 @@ const isReady = (pendoObj) => {
27014
27052
  return pendoObj.doesExist(pendoObj.apiKey);
27015
27053
  };
27016
27054
 
27055
+ class ShadowDomManager extends EventTarget {
27056
+ constructor() {
27057
+ super();
27058
+ this.cache = new Set();
27059
+ this.foundShadowRoots = false;
27060
+ this.stoppedSearchEarly = false;
27061
+ }
27062
+ updateCache() {
27063
+ // eslint-disable-next-line agent-eslint-rules/no-array-foreach
27064
+ this.cache.forEach(shadowRoot => {
27065
+ if (!isInDocument(shadowRoot)) {
27066
+ this.cache.delete(shadowRoot);
27067
+ this.dispatchEvent({
27068
+ type: 'detachShadow',
27069
+ shadowRoot
27070
+ });
27071
+ }
27072
+ });
27073
+ }
27074
+ patchAttachShadow(Element) {
27075
+ const original = Element.prototype.attachShadow;
27076
+ const self = this;
27077
+ Element.prototype.attachShadow = function (options) {
27078
+ const shadowRoot = original.call(this, options);
27079
+ if (this.shadowRoot) {
27080
+ self.triggerAttachShadow(this.shadowRoot);
27081
+ }
27082
+ return shadowRoot;
27083
+ };
27084
+ Element.prototype.attachShadow.toString = function () {
27085
+ return original.toString();
27086
+ };
27087
+ return () => {
27088
+ Element.prototype.attachShadow = original;
27089
+ };
27090
+ }
27091
+ initialize() {
27092
+ this.unpatchAttachShadow = this.patchAttachShadow(Element);
27093
+ this.findShadowRoots(document);
27094
+ }
27095
+ triggerAttachShadow(shadowRoot) {
27096
+ this.cache.add(shadowRoot);
27097
+ this.dispatchEvent({
27098
+ type: 'attachShadow',
27099
+ shadowRoot
27100
+ });
27101
+ }
27102
+ findShadowRoots(document, maxPerSearch = 5000) {
27103
+ if (!_.isFunction(document.createNodeIterator))
27104
+ return;
27105
+ let nodesChecked = 0;
27106
+ let queue = [getBody(document)];
27107
+ let currentNode;
27108
+ function eachShadowRoot(iterator) {
27109
+ do {
27110
+ if (!iterator) {
27111
+ iterator = document.createNodeIterator(queue.pop(), NodeFilter.SHOW_ELEMENT);
27112
+ }
27113
+ if (!iterator || !iterator.nextNode)
27114
+ break;
27115
+ while ((currentNode = iterator.nextNode())) {
27116
+ nodesChecked++;
27117
+ if (currentNode && currentNode.shadowRoot) {
27118
+ this.triggerAttachShadow(currentNode.shadowRoot);
27119
+ queue.push(currentNode.shadowRoot);
27120
+ this.foundShadowRoots = true;
27121
+ }
27122
+ if (nodesChecked % maxPerSearch === 0)
27123
+ break;
27124
+ }
27125
+ if (currentNode)
27126
+ break;
27127
+ iterator = null;
27128
+ } while (queue.length);
27129
+ if (currentNode && this.foundShadowRoots) {
27130
+ this.findTimeout = setTimeout$1(() => {
27131
+ this.findTimeout = null;
27132
+ eachShadowRoot.call(this, iterator);
27133
+ }, 50);
27134
+ }
27135
+ if (nodesChecked === maxPerSearch && !this.foundShadowRoots) {
27136
+ this.stoppedSearchEarly = true;
27137
+ }
27138
+ }
27139
+ eachShadowRoot.call(this);
27140
+ }
27141
+ teardown() {
27142
+ this.cache.clear();
27143
+ if (_.isFunction(this.unpatchAttachShadow)) {
27144
+ this.unpatchAttachShadow();
27145
+ this.unpatchAttachShadow = null;
27146
+ }
27147
+ if (this.findTimeout) {
27148
+ clearTimeout(this.findTimeout);
27149
+ this.findTimeout = null;
27150
+ }
27151
+ }
27152
+ }
27153
+
27154
+ class UberMutationObserver extends EventTarget {
27155
+ constructor(observerClass = getZoneSafeMethod('MutationObserver')) {
27156
+ super();
27157
+ this.ObserverClass = observerClass;
27158
+ this.observing = false;
27159
+ this.observers = new Map();
27160
+ this.shadowDom = new ShadowDomManager();
27161
+ this.shadowDom.addEventListener('attachShadow', _.bind(this.handleAttachShadow, this));
27162
+ this.shadowDom.addEventListener('detachShadow', _.bind(this.handleDetachShadow, this));
27163
+ this.addEventListener('mutation', () => {
27164
+ this.shadowDom.updateCache();
27165
+ });
27166
+ }
27167
+ initialize(pendo, PluginAPI) {
27168
+ const configReader = PluginAPI.ConfigReader;
27169
+ if (!configReader.get('preferMutationObserver') || !pendo.sniffer.MutationObserver) {
27170
+ return;
27171
+ }
27172
+ this.observeShadowRoots = configReader.get('observeShadowRoots');
27173
+ this.startObserver(document.documentElement);
27174
+ this.observing = true;
27175
+ if (this.observeShadowRoots) {
27176
+ this.shadowDom.initialize();
27177
+ }
27178
+ }
27179
+ startObserver(target) {
27180
+ const observer = new this.ObserverClass(_.bind(this.triggerMutation, this));
27181
+ this.observers.set(target, observer);
27182
+ observer.observe(target, {
27183
+ subtree: true,
27184
+ attributes: true,
27185
+ childList: true,
27186
+ characterData: true
27187
+ });
27188
+ }
27189
+ teardown() {
27190
+ this.observers.clear();
27191
+ this.shadowDom.teardown();
27192
+ }
27193
+ triggerMutation(mutation) {
27194
+ this.dispatchEvent({
27195
+ type: 'mutation',
27196
+ mutation
27197
+ });
27198
+ }
27199
+ handleAttachShadow({ shadowRoot }) {
27200
+ this.startObserver(shadowRoot);
27201
+ }
27202
+ handleDetachShadow({ shadowRoot }) {
27203
+ this.observers.delete(shadowRoot);
27204
+ }
27205
+ }
27206
+ var observer = new UberMutationObserver();
27207
+
27017
27208
  // ---------------------------------------------------------------------------
27018
27209
  function registerEventHandlers({ events = [] }) {
27019
27210
  _.each(events, (callback, eventName) => {
@@ -27124,6 +27315,9 @@ const initialize = makeSafe(function (options) {
27124
27315
  teardownFns.push(initializeEventBuffer({
27125
27316
  localStorageUnload: localStorageUnloadEnabled
27126
27317
  }));
27318
+ // needs to happen before initGuides
27319
+ observer.initialize(pendo$1, PluginAPI);
27320
+ teardownFns.push(() => observer.teardown());
27127
27321
  if (pendoCore) {
27128
27322
  /**
27129
27323
  * Current visitor id for pendo installation, either anonymous or identified. Used to determine
@@ -27177,7 +27371,7 @@ const initialize = makeSafe(function (options) {
27177
27371
  // Register handlers passed through pendo_options
27178
27372
  teardownFns.push(forwardInternalEvents(Events));
27179
27373
  registerEventHandlers(options);
27180
- teardownFns.push(initGuides()); // this is safe. loadGuides actually does the loading.
27374
+ teardownFns.push(initGuides(observer)); // this is safe. loadGuides actually does the loading.
27181
27375
  initIdentityEvents(); // setup identify and meta event listeners
27182
27376
  teardownFns.push(wirePage());
27183
27377
  teardownFns.push(initializePlugins());
@@ -28188,26 +28382,59 @@ logPublic.showLogHistory = showLogHistory;
28188
28382
  logPublic.getLoggedContexts = getLoggedContexts;
28189
28383
 
28190
28384
  /**
28191
- * Method to manually track events. Requires a non-empty name string to collect event.
28192
- *
28193
- * @access public
28194
- * @category Events
28195
- * @param {string} name name of the collected event
28196
- * @param {Object} [props] optional properties object to collect with to the event
28197
- * @example
28198
- * pendo.track('scroll')
28385
+ * Shared helper for event collection
28199
28386
  */
28200
- function track(name, props) {
28387
+ function collectEventHelper({ type, name, props }) {
28201
28388
  if (!name || !_.isString(name)) {
28202
28389
  log.error('Must provide valid name string for event tracking');
28203
28390
  return;
28204
28391
  }
28392
+ if (!type || !_.isString(type)) {
28393
+ log.error('Must provide valid type string for event tracking');
28394
+ return;
28395
+ }
28205
28396
  let correctedProps = props;
28206
28397
  if (!_.isObject(props)) {
28207
28398
  correctedProps = { __err__: props };
28208
28399
  }
28209
28400
  var url = pendoDotUrl.get();
28210
- collectEvent('track', correctedProps, url, name);
28401
+ collectEvent(type, correctedProps, url, name);
28402
+ }
28403
+ /**
28404
+ * Method to manually track events. Requires a non-empty name string to collect event.
28405
+ *
28406
+ * @access public
28407
+ * @category Events
28408
+ * @param {string} name name of the collected event
28409
+ * @param {Object} [props] optional properties object to collect with to the event
28410
+ * @example
28411
+ * pendo.track('scroll')
28412
+ */
28413
+ function track(name, props) {
28414
+ collectEventHelper({ type: 'track', name, props });
28415
+ }
28416
+
28417
+ /**
28418
+ * Method to manually track agentic events. Uses agent functions for IDs and context.
28419
+ *
28420
+ * @access public
28421
+ * @category Events
28422
+ * @param {string} type type of the collected agentic event ['prompt', 'system_response', 'user_reaction']
28423
+ * @param {Object} props event-specific properties object
28424
+ * @example
28425
+ * pendo.trackAgent('type_of_event', {
28426
+ * agentId: 'weather_assistant',
28427
+ * conversationId: 'conv_abc123',
28428
+ * messageId: 'msg_xyz789',
28429
+ * content: 'thumbs_up',
28430
+ * modelUsed: 'gpt-4',
28431
+ * suggestedPrompt: false,
28432
+ * toolsUsed: [],
28433
+ * fileUploaded: false
28434
+ * })
28435
+ */
28436
+ function trackAgent(type, props) {
28437
+ collectEventHelper({ type, name: 'agentic', props });
28211
28438
  }
28212
28439
 
28213
28440
  /**
@@ -29193,6 +29420,7 @@ function exportPublicApi(pendo) {
29193
29420
  pendo.fromByteArray = b64.uint8ToBase64;
29194
29421
  pendo.events = exportPendoCoreOnly(PublicEvents);
29195
29422
  pendo.track = exportPendoCoreOnly(track);
29423
+ pendo.trackAgent = exportPendoCoreOnly(trackAgent);
29196
29424
  pendo.validateInstall = validateInstall;
29197
29425
  pendo.validateNativeMethods = validateNativeMethods;
29198
29426
  pendo.validateBuiltInGlobals = validateBuiltInGlobals;
@@ -32089,75 +32317,6 @@ function updateMasterGuideList(state) {
32089
32317
  }
32090
32318
  }
32091
32319
 
32092
- function addShadowObserver(shadowRoot, observerCallback) {
32093
- const MutationObserver = getZoneSafeMethod('MutationObserver');
32094
- const shadowObserver = new MutationObserver(observerCallback);
32095
- shadowObserver.observe(shadowRoot, {
32096
- subtree: true,
32097
- attributes: true,
32098
- childList: true,
32099
- characterData: true
32100
- });
32101
- }
32102
- function patchAttachShadow(observerCallback) {
32103
- const original = Element.prototype.attachShadow;
32104
- Element.prototype.attachShadow = function (options) {
32105
- const shadowRoot = original.call(this, options);
32106
- if (this.shadowRoot) {
32107
- addShadowObserver(this.shadowRoot, observerCallback);
32108
- }
32109
- return shadowRoot;
32110
- };
32111
- Element.prototype.attachShadow.toString = function () {
32112
- return original.toString();
32113
- };
32114
- }
32115
- function startObserver(observerCallback) {
32116
- patchAttachShadow(observerCallback);
32117
- if (!_.isFunction(document.createNodeIterator))
32118
- return;
32119
- const maxPerSearch = 5000;
32120
- let nodesChecked = 0;
32121
- let queue = [getBody()];
32122
- let currentNode;
32123
- function eachShadowRoot(iterator) {
32124
- do {
32125
- if (!iterator) {
32126
- iterator = document.createNodeIterator(queue.pop(), NodeFilter.SHOW_ELEMENT);
32127
- }
32128
- if (!iterator || !iterator.nextNode)
32129
- break;
32130
- while ((currentNode = iterator.nextNode())) {
32131
- nodesChecked++;
32132
- if (currentNode && currentNode.shadowRoot) {
32133
- addShadowObserver(currentNode.shadowRoot, observerCallback);
32134
- queue.push(currentNode.shadowRoot);
32135
- shadowDomManager.foundShadowRoots = true;
32136
- }
32137
- if (nodesChecked % maxPerSearch === 0)
32138
- break;
32139
- }
32140
- if (currentNode)
32141
- break;
32142
- iterator = null;
32143
- } while (queue.length);
32144
- if (currentNode && shadowDomManager.foundShadowRoots) {
32145
- setTimeout$1(() => {
32146
- eachShadowRoot(iterator);
32147
- }, 50);
32148
- }
32149
- if (nodesChecked === maxPerSearch && !shadowDomManager.foundShadowRoots) {
32150
- shadowDomManager.stoppedSearchEarly = true;
32151
- }
32152
- }
32153
- eachShadowRoot();
32154
- }
32155
- const shadowDomManager = {
32156
- startObserver,
32157
- foundShadowRoots: false,
32158
- stoppedSearchEarly: false
32159
- };
32160
-
32161
32320
  var GuideUpdateModule = (function () {
32162
32321
  var observer;
32163
32322
  function observerCallback() {
@@ -32168,7 +32327,6 @@ var GuideUpdateModule = (function () {
32168
32327
  }
32169
32328
  var state = {
32170
32329
  useObserver: false,
32171
- observeShadowRoots: false,
32172
32330
  observing: false,
32173
32331
  needsUpdate: false,
32174
32332
  scheduledUpdate: null,
@@ -32199,43 +32357,31 @@ var GuideUpdateModule = (function () {
32199
32357
  context.commit('setScheduledUpdate', null);
32200
32358
  }
32201
32359
  },
32202
- startObserverIfNeeded(context, observerClass) {
32360
+ startObserverIfNeeded(context) {
32203
32361
  if (context.state.useObserver) {
32204
- var observerInstance = context.getters.observer();
32205
- if (!observerInstance) {
32206
- observerInstance = new (observerClass || getZoneSafeMethod('MutationObserver'))(observerCallback);
32207
- observer = observerInstance;
32208
- }
32209
32362
  if (!context.state.observing) {
32210
- observerInstance.observe(document.documentElement, {
32211
- subtree: true,
32212
- attributes: true,
32213
- childList: true,
32214
- characterData: true
32215
- });
32216
- if (context.state.observeShadowRoots) {
32217
- shadowDomManager.startObserver(observerCallback);
32218
- }
32363
+ const observer = context.getters.observer();
32364
+ observer.addEventListener('mutation', observerCallback);
32219
32365
  context.commit('setObserving', true);
32220
32366
  }
32221
32367
  }
32222
32368
  },
32223
32369
  stopObserver(context) {
32224
- var observerInstance = context.getters.observer();
32225
- if (observerInstance && _.isFunction(observerInstance.disconnect)) {
32226
- observerInstance.disconnect();
32370
+ const observer = context.getters.observer();
32371
+ if (observer) {
32372
+ observer.removeEventListener('mutation', observerCallback);
32227
32373
  }
32228
32374
  context.commit('setObserving', false);
32229
32375
  context.dispatch('stopScheduledUpdate');
32230
32376
  }
32231
32377
  };
32232
32378
  var mutations = {
32379
+ setObserver(state, _observer) {
32380
+ observer = _observer;
32381
+ },
32233
32382
  setUseObserver(state) {
32234
32383
  state.useObserver = true;
32235
32384
  },
32236
- setObserveShadowRoots(state) {
32237
- state.observeShadowRoots = true;
32238
- },
32239
32385
  setObserving(state, observing) {
32240
32386
  state.observing = observing;
32241
32387
  },
@@ -36150,7 +36296,8 @@ function debuggerExports() {
36150
36296
  isStagingServer,
36151
36297
  AutoDisplay,
36152
36298
  isLeader,
36153
- Events
36299
+ Events,
36300
+ observer
36154
36301
  };
36155
36302
  }
36156
36303
  function startDebuggingModuleIfEnabled() {
@@ -38482,7 +38629,7 @@ function populatePendoObject(pendo) {
38482
38629
  exportPublicApi(pendo);
38483
38630
  exportDeprecated(pendo);
38484
38631
  // Delay execution of these methods until initialize is called:
38485
- _.each(['identify', 'updateOptions', 'pageLoad', 'track'], function (method) {
38632
+ _.each(['identify', 'updateOptions', 'pageLoad', 'track', 'trackAgent'], function (method) {
38486
38633
  var originalMethod = pendo[method];
38487
38634
  pendo[method] = function () {
38488
38635
  try {
@@ -38500,7 +38647,7 @@ function populatePendoObject(pendo) {
38500
38647
  });
38501
38648
  }
38502
38649
  function stubSnippetMethods(pendo) {
38503
- _.each(['initialize', 'identify', 'updateOptions', 'pageLoad', 'track'], function (method) {
38650
+ _.each(['initialize', 'identify', 'updateOptions', 'pageLoad', 'track', 'trackAgent'], function (method) {
38504
38651
  pendo[method] = function () {
38505
38652
  console.log('Pendo is currently disabled.');
38506
38653
  };
@@ -38529,7 +38676,7 @@ function initAgent(pendo, PendoConfig) {
38529
38676
  AsyncContent.reset();
38530
38677
  store.dispatch('frames/init');
38531
38678
  logPublic.init();
38532
- shadowAPI.wrapSizzle(SizzleProxy);
38679
+ shadowAPI.wrapSizzle(SizzleProxy, observer.shadowDom);
38533
38680
  SizzleProxy.intercept(sizzleAttachPointInterceptor);
38534
38681
  populatePendoObject(pendo);
38535
38682
  log.addEventListener('log', _.partial(store.dispatch, 'errorLog/write'));
@@ -48210,7 +48357,7 @@ var WorkerFactory = /*#__PURE__*/createInlineWorkerFactory(/* rollup-plugin-web-
48210
48357
 
48211
48358
  const ONE_HUNDRED_MB_IN_BYTES = 100 * 1024 * 1024;
48212
48359
  function matchHostedResources(recordingEvent, stringifiedRecordingPayload) {
48213
- const fontURLRegex = /https:\/\/[^\s]+?\.(woff|woff2|ttf|otf|eot)\b/g;
48360
+ const fontURLRegex = /https:\/\/[^\s]+?\.(woff2?|ttf|otf|eot)(\?[^\s]*)?\b/g;
48214
48361
  const hostedResources = stringifiedRecordingPayload.match(fontURLRegex);
48215
48362
  return {
48216
48363
  type: 'recording',