@pendo/agent 2.279.4 → 2.280.0
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 +25 -10
- package/dist/pendo.module.js +285 -162
- package/dist/pendo.module.min.js +19 -21
- package/package.json +1 -1
package/dist/pendo.module.js
CHANGED
|
@@ -3118,6 +3118,16 @@ var ConfigReader = (function () {
|
|
|
3118
3118
|
* @type {string[]}
|
|
3119
3119
|
*/
|
|
3120
3120
|
addOption('analytics.excludeEvents', [SNIPPET_SRC, PENDO_CONFIG_SRC], []);
|
|
3121
|
+
/**
|
|
3122
|
+
* Write events to localStorage when the page is unloaded instead of sending them immediately.
|
|
3123
|
+
*
|
|
3124
|
+
* @access public
|
|
3125
|
+
* @category Config/Analytics
|
|
3126
|
+
* @name analytics.localStorageUnload
|
|
3127
|
+
* @default false
|
|
3128
|
+
* @type {boolean}
|
|
3129
|
+
*/
|
|
3130
|
+
addOption('analytics.localStorageUnload', [SNIPPET_SRC, PENDO_CONFIG_SRC], false);
|
|
3121
3131
|
/**
|
|
3122
3132
|
* If set to `true`, the Agent will log out when various events internal to the Agent occur.
|
|
3123
3133
|
*
|
|
@@ -3891,8 +3901,8 @@ var SERVER = '';
|
|
|
3891
3901
|
var ASSET_HOST = '';
|
|
3892
3902
|
var ASSET_PATH = '';
|
|
3893
3903
|
var DESIGNER_ENV = '';
|
|
3894
|
-
var VERSION = '2.
|
|
3895
|
-
var PACKAGE_VERSION = '2.
|
|
3904
|
+
var VERSION = '2.280.0_';
|
|
3905
|
+
var PACKAGE_VERSION = '2.280.0';
|
|
3896
3906
|
var LOADER = 'xhr';
|
|
3897
3907
|
/* eslint-enable agent-eslint-rules/no-gulp-env-references */
|
|
3898
3908
|
/**
|
|
@@ -4024,6 +4034,18 @@ function compress(json_obj, encoding) {
|
|
|
4024
4034
|
}
|
|
4025
4035
|
}
|
|
4026
4036
|
|
|
4037
|
+
function getZoneSafeMethod$1(_, method, target = window) {
|
|
4038
|
+
var zoneSymbol = '__symbol__';
|
|
4039
|
+
/* global Zone */
|
|
4040
|
+
if (typeof Zone !== 'undefined' && _.isFunction(Zone[zoneSymbol])) {
|
|
4041
|
+
var fn = target[Zone[zoneSymbol](method)];
|
|
4042
|
+
if (_.isFunction(fn)) {
|
|
4043
|
+
return fn;
|
|
4044
|
+
}
|
|
4045
|
+
}
|
|
4046
|
+
return target[method];
|
|
4047
|
+
}
|
|
4048
|
+
|
|
4027
4049
|
var crc32_min = {exports: {}};
|
|
4028
4050
|
|
|
4029
4051
|
/*
|
|
@@ -4117,15 +4139,7 @@ function isSfdcLightning() {
|
|
|
4117
4139
|
return typeof $A !== 'undefined' && _.isFunction($A.get) && _.isString($A.get('$Browser.formFactor'));
|
|
4118
4140
|
}
|
|
4119
4141
|
function getZoneSafeMethod(method, target = window) {
|
|
4120
|
-
|
|
4121
|
-
/* global Zone */
|
|
4122
|
-
if (typeof Zone !== 'undefined' && _.isFunction(Zone[zoneSymbol])) {
|
|
4123
|
-
var fn = target[Zone[zoneSymbol](method)];
|
|
4124
|
-
if (_.isFunction(fn)) {
|
|
4125
|
-
return fn;
|
|
4126
|
-
}
|
|
4127
|
-
}
|
|
4128
|
-
return target[method];
|
|
4142
|
+
return getZoneSafeMethod$1(_, method, target);
|
|
4129
4143
|
}
|
|
4130
4144
|
function getIsFiniteImpl(window) {
|
|
4131
4145
|
return _.isFunction(window.isFinite) ? window.isFinite
|
|
@@ -11252,7 +11266,7 @@ class ElementGetter {
|
|
|
11252
11266
|
if (el && !isInDoc) {
|
|
11253
11267
|
return undefined;
|
|
11254
11268
|
}
|
|
11255
|
-
|
|
11269
|
+
el = dom(this.cssSelector)[0];
|
|
11256
11270
|
if (!el) {
|
|
11257
11271
|
return undefined;
|
|
11258
11272
|
}
|
|
@@ -12035,6 +12049,53 @@ class SendQueue {
|
|
|
12035
12049
|
}
|
|
12036
12050
|
}
|
|
12037
12051
|
|
|
12052
|
+
const UNSENT_EVENTS_KEY = 'unsentEvents';
|
|
12053
|
+
const UNSENT_EVENTS_DURATION = 6 * 24 * 60 * 60 * 1000; // 6 days
|
|
12054
|
+
class LocalStorageEventBuffer {
|
|
12055
|
+
constructor() {
|
|
12056
|
+
this.events = {};
|
|
12057
|
+
}
|
|
12058
|
+
send(key, queue) {
|
|
12059
|
+
const data = this.events[key];
|
|
12060
|
+
if (!data)
|
|
12061
|
+
return;
|
|
12062
|
+
let request = data.shift();
|
|
12063
|
+
while (request) {
|
|
12064
|
+
queue.push(request);
|
|
12065
|
+
request = data.shift();
|
|
12066
|
+
}
|
|
12067
|
+
delete this.events[key];
|
|
12068
|
+
}
|
|
12069
|
+
push(key, obj) {
|
|
12070
|
+
const data = this.events[key] || [];
|
|
12071
|
+
data.push(obj);
|
|
12072
|
+
this.events[key] = data;
|
|
12073
|
+
}
|
|
12074
|
+
read(storage) {
|
|
12075
|
+
/**
|
|
12076
|
+
* If enabled, Pendo will write pending events to local storage before unloading the page
|
|
12077
|
+
* rather than attempting to send them. The events will be sent the next time the page is loaded.
|
|
12078
|
+
*
|
|
12079
|
+
* @name _pendo_unsentEvents
|
|
12080
|
+
* @category Cookies/localStorage
|
|
12081
|
+
* @access public
|
|
12082
|
+
* @label UNSENT_EVENTS_KEY
|
|
12083
|
+
*/
|
|
12084
|
+
storage.registry.addLocal(UNSENT_EVENTS_KEY);
|
|
12085
|
+
this.events = JSON.parse(storage.read(UNSENT_EVENTS_KEY) || '{}');
|
|
12086
|
+
storage.clear(UNSENT_EVENTS_KEY);
|
|
12087
|
+
}
|
|
12088
|
+
write(storage) {
|
|
12089
|
+
if (_.size(this.events) > 0) {
|
|
12090
|
+
storage.write(UNSENT_EVENTS_KEY, JSON.stringify(this.events), UNSENT_EVENTS_DURATION);
|
|
12091
|
+
}
|
|
12092
|
+
else {
|
|
12093
|
+
storage.clear(UNSENT_EVENTS_KEY);
|
|
12094
|
+
}
|
|
12095
|
+
}
|
|
12096
|
+
}
|
|
12097
|
+
var localStorageEventBuffer = new LocalStorageEventBuffer();
|
|
12098
|
+
|
|
12038
12099
|
var defaultTrackName = '_PENDO_UNNAMED_';
|
|
12039
12100
|
var SILO_AVG_COMPRESSION_RATIO = 5;
|
|
12040
12101
|
/**
|
|
@@ -12487,9 +12548,19 @@ function reliableSendEventForUnload(options) {
|
|
|
12487
12548
|
return q.resolve();
|
|
12488
12549
|
};
|
|
12489
12550
|
}
|
|
12551
|
+
function convertSiloToObject(silo, next) {
|
|
12552
|
+
silo.length = 0;
|
|
12553
|
+
const siloObj = {};
|
|
12554
|
+
for (let key in silo) {
|
|
12555
|
+
if (silo.hasOwnProperty(key)) {
|
|
12556
|
+
siloObj[key] = silo[key];
|
|
12557
|
+
}
|
|
12558
|
+
}
|
|
12559
|
+
next(siloObj);
|
|
12560
|
+
}
|
|
12490
12561
|
function createSiloQueue(options) {
|
|
12491
12562
|
return pipeline(filterAnalyticsDisabled, filterAccountIdsForSendQueue, compressSilo, shortenUrlFields(options.shorten), compressSilo, // re-compress only if the url was shortened
|
|
12492
|
-
errorLogger(), addSiloParams(options), addAccountIdParamIfAdoptPartner, addSourceParamIfPresent);
|
|
12563
|
+
errorLogger(), addSiloParams(options), addAccountIdParamIfAdoptPartner, addSourceParamIfPresent, convertSiloToObject);
|
|
12493
12564
|
}
|
|
12494
12565
|
class SendQueueSplitter {
|
|
12495
12566
|
constructor(queues) {
|
|
@@ -12514,14 +12585,20 @@ function createSendQueue(options, send, guaranteedSend) {
|
|
|
12514
12585
|
send = send || defaultSendEvent(options);
|
|
12515
12586
|
guaranteedSend = guaranteedSend || reliableSendEventForUnload(options);
|
|
12516
12587
|
const apiKeys = getApiKeysFromOptions(options);
|
|
12517
|
-
const queues = _.map(apiKeys, (apiKey) => {
|
|
12588
|
+
const queues = _.map(apiKeys, (apiKey, i) => {
|
|
12518
12589
|
const queue = new SendQueue(function (request, isUnload, failureCount) {
|
|
12519
12590
|
if (failureCount) {
|
|
12520
12591
|
request.params = _.extend({}, request.params, {
|
|
12521
12592
|
'rt': failureCount
|
|
12522
12593
|
});
|
|
12523
12594
|
}
|
|
12524
|
-
if (isUnload) {
|
|
12595
|
+
if (options.localStorageUnload && isUnload) {
|
|
12596
|
+
if (i === 0) {
|
|
12597
|
+
localStorageEventBuffer.push(options.beacon, request);
|
|
12598
|
+
}
|
|
12599
|
+
return q.resolve();
|
|
12600
|
+
}
|
|
12601
|
+
else if (isUnload) {
|
|
12525
12602
|
return guaranteedSend(apiKey, request);
|
|
12526
12603
|
}
|
|
12527
12604
|
else {
|
|
@@ -12534,7 +12611,9 @@ function createSendQueue(options, send, guaranteedSend) {
|
|
|
12534
12611
|
queue.retryPending = true;
|
|
12535
12612
|
return queue;
|
|
12536
12613
|
});
|
|
12537
|
-
|
|
12614
|
+
const queueSplitter = new SendQueueSplitter(queues);
|
|
12615
|
+
localStorageEventBuffer.send(options.beacon, queueSplitter);
|
|
12616
|
+
return queueSplitter;
|
|
12538
12617
|
}
|
|
12539
12618
|
function filterNonGuideAnalytics(beacon) {
|
|
12540
12619
|
return function (event, next) {
|
|
@@ -12633,17 +12712,17 @@ var events;
|
|
|
12633
12712
|
var trackEvents;
|
|
12634
12713
|
var eventQueue;
|
|
12635
12714
|
var trackEventQueue;
|
|
12636
|
-
function initializeEventBuffer() {
|
|
12715
|
+
function initializeEventBuffer(options) {
|
|
12637
12716
|
events = buffers.events = eventCache;
|
|
12638
12717
|
trackEvents = buffers.trackEvents = trackEventCache;
|
|
12639
|
-
eventQueue = createEventQueue({
|
|
12718
|
+
eventQueue = createEventQueue(_.extend({
|
|
12640
12719
|
'cache': events,
|
|
12641
12720
|
'silos': buffers.silos,
|
|
12642
12721
|
'apiKey': getAllApiKeys,
|
|
12643
12722
|
'beacon': 'ptm',
|
|
12644
12723
|
'allowPost': true
|
|
12645
|
-
});
|
|
12646
|
-
trackEventQueue = createEventQueue({
|
|
12724
|
+
}, options));
|
|
12725
|
+
trackEventQueue = createEventQueue(_.extend({
|
|
12647
12726
|
'cache': trackEvents,
|
|
12648
12727
|
'silos': buffers.trackEventSilos,
|
|
12649
12728
|
'apiKey': getAllApiKeys,
|
|
@@ -12652,7 +12731,7 @@ function initializeEventBuffer() {
|
|
|
12652
12731
|
'params': {
|
|
12653
12732
|
'type': 'track'
|
|
12654
12733
|
}
|
|
12655
|
-
});
|
|
12734
|
+
}, options));
|
|
12656
12735
|
addEventQueue(eventQueue);
|
|
12657
12736
|
addEventQueue(trackEventQueue);
|
|
12658
12737
|
return () => {
|
|
@@ -13163,12 +13242,6 @@ var wirePage = function (eventList) {
|
|
|
13163
13242
|
Events.appHidden.trigger();
|
|
13164
13243
|
}
|
|
13165
13244
|
}, ConfigReader.get('preventUnloadListener')));
|
|
13166
|
-
Events.appHidden.on(() => {
|
|
13167
|
-
flushNow(true, { 'hidden': true });
|
|
13168
|
-
});
|
|
13169
|
-
Events.appUnloaded.on(() => {
|
|
13170
|
-
flushNow(true, { 'unload': true });
|
|
13171
|
-
});
|
|
13172
13245
|
const shouldInterceptStopPropagation = ConfigReader.get('interceptStopPropagation', true);
|
|
13173
13246
|
const shouldInterceptPreventDefault = ConfigReader.get('interceptPreventDefault', true);
|
|
13174
13247
|
if (shouldInterceptStopPropagation) {
|
|
@@ -14870,6 +14943,20 @@ function findBlockById(id, json) {
|
|
|
14870
14943
|
}
|
|
14871
14944
|
}
|
|
14872
14945
|
|
|
14946
|
+
function addInlineStyles(config, id, styles, element = document.head) {
|
|
14947
|
+
let styleTag = document.getElementById(id);
|
|
14948
|
+
if (!styleTag) {
|
|
14949
|
+
styleTag = document.createElement('style');
|
|
14950
|
+
styleTag.setAttribute('id', id);
|
|
14951
|
+
if (config.get('inlineStyleNonce')) {
|
|
14952
|
+
styleTag.setAttribute('nonce', config.get('inlineStyleNonce'));
|
|
14953
|
+
}
|
|
14954
|
+
styleTag.innerHTML = styles;
|
|
14955
|
+
styleTag = element.appendChild(styleTag);
|
|
14956
|
+
}
|
|
14957
|
+
return styleTag;
|
|
14958
|
+
}
|
|
14959
|
+
|
|
14873
14960
|
var BuildingBlockTemplates = (function () {
|
|
14874
14961
|
return {
|
|
14875
14962
|
'buildNodesFromTemplate': buildNodesFromTemplate,
|
|
@@ -15288,8 +15375,7 @@ var BuildingBlockTemplates = (function () {
|
|
|
15288
15375
|
var generatedHtml = announcementStep.guideElement;
|
|
15289
15376
|
var elementId = generatedHtml[0].id;
|
|
15290
15377
|
var styleString = '#' + elementId + ' h1::after { display:none; }';
|
|
15291
|
-
|
|
15292
|
-
styleElem.innerHTML = styleString;
|
|
15378
|
+
addInlineStyles(ConfigReader, `pendo-whats-new-style-${elementId}`, styleString, generatedHtml[0]);
|
|
15293
15379
|
if (bubbleConfig) {
|
|
15294
15380
|
miniBubble = generateUnreadAnnouncementMiniBubble(bubbleConfig);
|
|
15295
15381
|
miniBubble.props.style.top = '20px';
|
|
@@ -19141,9 +19227,7 @@ var BuildingBlockResourceCenter = (function () {
|
|
|
19141
19227
|
var mergedUnseenCountCss = _.extend(defaultUnseenCountCss, unseenCountCss);
|
|
19142
19228
|
bubbleEle.css(mergedBubbleCss);
|
|
19143
19229
|
unseenCountEle.css(mergedUnseenCountCss);
|
|
19144
|
-
var styleEle;
|
|
19145
19230
|
if (!isOldIE(10) && !shouldNotAddInlineStyles()) {
|
|
19146
|
-
styleEle = dom(document.createElement('style')).attr('id', 'pendo-resource-center-bubble-animation');
|
|
19147
19231
|
var rgbColor = hexToRgb(notificationBubbleConfig['background-color']);
|
|
19148
19232
|
var rgbString = 'rgb(' + rgbColor.r + ', ' + rgbColor.g + ', ' + rgbColor.b + ')';
|
|
19149
19233
|
var pulseAnimation = '@keyframes pulse { ' +
|
|
@@ -19164,24 +19248,15 @@ var BuildingBlockResourceCenter = (function () {
|
|
|
19164
19248
|
'will-change: transform; ' +
|
|
19165
19249
|
'}';
|
|
19166
19250
|
var bubbleStyles = pulseAnimation + ' ' + bubblePseudoEleCss;
|
|
19167
|
-
|
|
19168
|
-
styleEle.styleSheet.cssText = bubbleStyles;
|
|
19169
|
-
}
|
|
19170
|
-
else {
|
|
19171
|
-
styleEle[0].innerHTML = bubbleStyles;
|
|
19172
|
-
}
|
|
19251
|
+
addInlineStyles(ConfigReader, 'pendo-resource-center-bubble-animation', bubbleStyles);
|
|
19173
19252
|
}
|
|
19174
19253
|
unseenCountEle.text(unseenCount);
|
|
19175
19254
|
return {
|
|
19176
19255
|
'bubbleEle': bubbleEle,
|
|
19177
|
-
'unseenCountEle': unseenCountEle
|
|
19178
|
-
'styleEle': styleEle
|
|
19256
|
+
'unseenCountEle': unseenCountEle
|
|
19179
19257
|
};
|
|
19180
19258
|
}
|
|
19181
19259
|
function appendNotificationBubble(notificationBubbleElements, targetElement) {
|
|
19182
|
-
if (notificationBubbleElements.styleEle) {
|
|
19183
|
-
notificationBubbleElements.styleEle.appendTo(targetElement);
|
|
19184
|
-
}
|
|
19185
19260
|
notificationBubbleElements.unseenCountEle.appendTo(notificationBubbleElements.bubbleEle);
|
|
19186
19261
|
notificationBubbleElements.bubbleEle.appendTo(targetElement);
|
|
19187
19262
|
}
|
|
@@ -20745,7 +20820,11 @@ function Wrappable() {
|
|
|
20745
20820
|
var debugEnabled = 'debug-enabled';
|
|
20746
20821
|
function getDebuggingStorage() {
|
|
20747
20822
|
try {
|
|
20748
|
-
|
|
20823
|
+
const debuggingStorage = JSON.parse(agentStorage.read(debugEnabled, true) || getCookie(debugEnabled));
|
|
20824
|
+
if (typeof debuggingStorage === 'boolean') { // v1 debugger storage format
|
|
20825
|
+
return { 'enabled': debuggingStorage };
|
|
20826
|
+
}
|
|
20827
|
+
return debuggingStorage || {};
|
|
20749
20828
|
}
|
|
20750
20829
|
catch (e) {
|
|
20751
20830
|
return {};
|
|
@@ -22131,7 +22210,6 @@ var DesignerV2 = (function () {
|
|
|
22131
22210
|
'isValidDesignerHost': isValidDesignerHost,
|
|
22132
22211
|
'isValidTarget': isValidTarget,
|
|
22133
22212
|
'addCommunicationIframe': addCommunicationIframe,
|
|
22134
|
-
'addStylesToPage': addStylesToPage,
|
|
22135
22213
|
'hostConfig': { 'host': host },
|
|
22136
22214
|
'isDesignerFrame': isDesignerFrame,
|
|
22137
22215
|
'addScriptToPage': addScriptToPage
|
|
@@ -22311,7 +22389,7 @@ var DesignerV2 = (function () {
|
|
|
22311
22389
|
function launchDesigner(options) {
|
|
22312
22390
|
var baseFolder = 'latest';
|
|
22313
22391
|
var gcsBucket = 'designer';
|
|
22314
|
-
|
|
22392
|
+
addInlineStyles(ConfigReader, 'designer-styles', getStyles());
|
|
22315
22393
|
var designerShimsSrc = host + '/' + gcsBucket + '/' + baseFolder + '/plugin.js';
|
|
22316
22394
|
addScriptToPage('designer-shims', designerShimsSrc);
|
|
22317
22395
|
if (pendo$1.DESIGNER_VERSION) {
|
|
@@ -22384,16 +22462,6 @@ var DesignerV2 = (function () {
|
|
|
22384
22462
|
container.appendChild(iframe);
|
|
22385
22463
|
return container;
|
|
22386
22464
|
}
|
|
22387
|
-
function addStylesToPage(styleId, styles) {
|
|
22388
|
-
if (document.getElementById(styleId))
|
|
22389
|
-
return;
|
|
22390
|
-
var styleNode = document.createElement('style');
|
|
22391
|
-
styleNode.setAttribute('id', styleId);
|
|
22392
|
-
styleNode.type = 'text/css';
|
|
22393
|
-
var styleText = document.createTextNode(styles);
|
|
22394
|
-
styleNode.appendChild(styleText);
|
|
22395
|
-
document.getElementsByTagName('head')[0].appendChild(styleNode);
|
|
22396
|
-
}
|
|
22397
22465
|
function addScriptToPage(scriptId, scriptURL, attributes) {
|
|
22398
22466
|
if (document.getElementById(scriptId))
|
|
22399
22467
|
return;
|
|
@@ -22514,7 +22582,7 @@ var P2AutoLaunch = (function () {
|
|
|
22514
22582
|
'box-sizing': 'border-box'
|
|
22515
22583
|
};
|
|
22516
22584
|
var modalContainer = createUIElement('div', ids.container, modalStyles);
|
|
22517
|
-
|
|
22585
|
+
addInlineStyles(ConfigReader, ids.style, buildPseudoStyles(pseudoStyles), modalContainer);
|
|
22518
22586
|
modalContainer.appendChild(createHeader(isVia));
|
|
22519
22587
|
modalContainer.appendChild(createBody());
|
|
22520
22588
|
modalContainer.appendChild(createFooter(token));
|
|
@@ -22639,14 +22707,6 @@ var P2AutoLaunch = (function () {
|
|
|
22639
22707
|
return acc + key + '{' + buildStyles(value) + '} ';
|
|
22640
22708
|
}, '');
|
|
22641
22709
|
}
|
|
22642
|
-
function createPseudoStyles() {
|
|
22643
|
-
var styleNode = document.createElement('style');
|
|
22644
|
-
styleNode.setAttribute('id', ids.style);
|
|
22645
|
-
styleNode.type = 'text/css';
|
|
22646
|
-
var styleText = document.createTextNode(buildPseudoStyles(pseudoStyles));
|
|
22647
|
-
styleNode.appendChild(styleText);
|
|
22648
|
-
return styleNode;
|
|
22649
|
-
}
|
|
22650
22710
|
function createUIElement(type, id, styles) {
|
|
22651
22711
|
var ele = document.createElement(type);
|
|
22652
22712
|
ele.setAttribute('id', id);
|
|
@@ -23532,11 +23592,12 @@ var findAllItemsInGuidelistBy = function (fn) {
|
|
|
23532
23592
|
return arr;
|
|
23533
23593
|
}, []);
|
|
23534
23594
|
};
|
|
23535
|
-
var _updateGuideStepStatus = function (guideId, stepId, seenState, time, dismissCount) {
|
|
23595
|
+
var _updateGuideStepStatus = function (guideId, stepId, seenState, time, dismissCount, destinationStepId) {
|
|
23536
23596
|
var step = findStepInGuide(findGuideById(guideId), stepId);
|
|
23537
23597
|
if (step) {
|
|
23538
23598
|
step.seenState = seenState;
|
|
23539
23599
|
step.lastSeenAt = time;
|
|
23600
|
+
step.destinationStepId = destinationStepId;
|
|
23540
23601
|
if (dismissCount !== undefined) {
|
|
23541
23602
|
step.dismissCount = dismissCount;
|
|
23542
23603
|
}
|
|
@@ -24017,7 +24078,7 @@ var onGuideAdvanced = function (evt, step, isIntermediateStep) {
|
|
|
24017
24078
|
'seenReason': step.seenReason,
|
|
24018
24079
|
'visitorId': get_visitor_id()
|
|
24019
24080
|
});
|
|
24020
|
-
_updateGuideStepStatus(currentGuide.id, step.id, 'advanced', stepNow);
|
|
24081
|
+
_updateGuideStepStatus(currentGuide.id, step.id, 'advanced', stepNow, undefined, destinationStepId);
|
|
24021
24082
|
}
|
|
24022
24083
|
return onGuideAdvanced(currentGuide.steps[destinationIndex], step, true);
|
|
24023
24084
|
}
|
|
@@ -24043,7 +24104,7 @@ var onGuideAdvanced = function (evt, step, isIntermediateStep) {
|
|
|
24043
24104
|
dismissCount = _.get(step, 'dismissCount', 0) + 1;
|
|
24044
24105
|
}
|
|
24045
24106
|
var now = new Date().getTime();
|
|
24046
|
-
_updateGuideStepStatus(guideId, stepId, 'advanced', now, dismissCount);
|
|
24107
|
+
_updateGuideStepStatus(guideId, stepId, 'advanced', now, dismissCount, destinationStepId);
|
|
24047
24108
|
var guide = _.isFunction(step.getGuide) && step.getGuide();
|
|
24048
24109
|
var doNotResume = guide && guide.attributes && guide.attributes.doNotResume;
|
|
24049
24110
|
if (!doNotResume) {
|
|
@@ -24129,7 +24190,7 @@ var onGuidePrevious = function (evt, step) {
|
|
|
24129
24190
|
advancedGuide(guideId, step.id, get_visitor_id(), seenReason, language, false, destinationStepId);
|
|
24130
24191
|
log.info('update guide status');
|
|
24131
24192
|
var now = new Date().getTime();
|
|
24132
|
-
_updateGuideStepStatus(step.guideId, step.id, 'advanced', now);
|
|
24193
|
+
_updateGuideStepStatus(step.guideId, step.id, 'advanced', now, undefined, destinationStepId);
|
|
24133
24194
|
var guide = _.isFunction(step.getGuide) && step.getGuide();
|
|
24134
24195
|
var doNotResume = guide && guide.attributes && guide.attributes.doNotResume;
|
|
24135
24196
|
if (!doNotResume) {
|
|
@@ -25149,7 +25210,7 @@ var getGuideEventCache = function () {
|
|
|
25149
25210
|
return guideEvtCache;
|
|
25150
25211
|
};
|
|
25151
25212
|
function createGuideEventQueue(options) {
|
|
25152
|
-
const processSilos = pipeline(filterAnalyticsDisabled, splitSiloOnFieldChange('visitor_id'), splitSiloOnFieldChange('props.guide_id'), splitSiloOnFieldChange('props.source'), compressSilo, errorLogger(), addSiloParams(options), addAccountIdParamIfAdoptPartner, addSourceParamIfPresent);
|
|
25213
|
+
const processSilos = pipeline(filterAnalyticsDisabled, splitSiloOnFieldChange('visitor_id'), splitSiloOnFieldChange('props.guide_id'), splitSiloOnFieldChange('props.source'), compressSilo, errorLogger(), addSiloParams(options), addAccountIdParamIfAdoptPartner, addSourceParamIfPresent, convertSiloToObject);
|
|
25153
25214
|
const packageSilos = pipeline(eventSequence, siloReducer(options.cache), _.noop // do not move to the silo queue until manual flush
|
|
25154
25215
|
);
|
|
25155
25216
|
return new EventQueue(_.extend({ processSilos, packageSilos }, options));
|
|
@@ -25175,28 +25236,32 @@ function listenForTabIdChange() {
|
|
|
25175
25236
|
store.dispatch('frames/join');
|
|
25176
25237
|
});
|
|
25177
25238
|
}
|
|
25178
|
-
function initGuideAnalytics() {
|
|
25239
|
+
function initGuideAnalytics(options) {
|
|
25179
25240
|
if (!guideEventQueue) {
|
|
25180
|
-
guideEventQueue = createGuideEventQueue({
|
|
25241
|
+
guideEventQueue = createGuideEventQueue(_.extend({
|
|
25181
25242
|
'cache': guideEvtCache,
|
|
25182
25243
|
'apiKey': function () { return pendo$1.apiKey; },
|
|
25183
25244
|
'beacon': 'guide',
|
|
25184
25245
|
'allowPost': true,
|
|
25185
25246
|
'preferFetch': sniffer.safari
|
|
25186
|
-
});
|
|
25247
|
+
}, options));
|
|
25187
25248
|
}
|
|
25188
25249
|
if (!pollEventQueue) {
|
|
25189
|
-
pollEventQueue = createGuideEventQueue({
|
|
25250
|
+
pollEventQueue = createGuideEventQueue(_.extend({
|
|
25190
25251
|
'cache': [],
|
|
25191
25252
|
'apiKey': function () { return pendo$1.apiKey; },
|
|
25192
25253
|
'beacon': 'poll',
|
|
25193
25254
|
'allowPost': true,
|
|
25194
25255
|
'preferFetch': sniffer.safari
|
|
25195
|
-
});
|
|
25256
|
+
}, options));
|
|
25196
25257
|
}
|
|
25258
|
+
addEventQueue(guideEventQueue);
|
|
25259
|
+
addEventQueue(pollEventQueue);
|
|
25197
25260
|
return () => {
|
|
25198
25261
|
guideEventQueue.clear();
|
|
25199
25262
|
pollEventQueue.clear();
|
|
25263
|
+
removeEventQueue(guideEventQueue);
|
|
25264
|
+
removeEventQueue(pollEventQueue);
|
|
25200
25265
|
};
|
|
25201
25266
|
}
|
|
25202
25267
|
function securityPolicyViolationFn(evt) {
|
|
@@ -25221,14 +25286,12 @@ function securityPolicyViolationFn(evt) {
|
|
|
25221
25286
|
*/
|
|
25222
25287
|
var initGuides = function () {
|
|
25223
25288
|
const teardownFns = [];
|
|
25224
|
-
teardownFns.push(initGuideAnalytics(
|
|
25289
|
+
teardownFns.push(initGuideAnalytics({
|
|
25290
|
+
'localStorageUnload': ConfigReader.get('analytics.localStorageUnload')
|
|
25291
|
+
}));
|
|
25225
25292
|
GuideMonitor.run();
|
|
25226
25293
|
teardownFns.push(GuideMonitor.stop);
|
|
25227
|
-
Events.appHidden.on(function () {
|
|
25228
|
-
processGuideEventCache({ 'hidden': true });
|
|
25229
|
-
});
|
|
25230
25294
|
Events.appUnloaded.on(function () {
|
|
25231
|
-
processGuideEventCache({ 'unload': true });
|
|
25232
25295
|
store.dispatch('frames/leave');
|
|
25233
25296
|
});
|
|
25234
25297
|
Events.metadata.on(function (event) {
|
|
@@ -26345,7 +26408,8 @@ const PluginAPI = {
|
|
|
26345
26408
|
'util': {
|
|
26346
26409
|
'trim': trim,
|
|
26347
26410
|
'base64EncodeString': base64EncodeString,
|
|
26348
|
-
'parseUrl': parseUrl
|
|
26411
|
+
'parseUrl': parseUrl,
|
|
26412
|
+
'addInlineStyles': _.partial(addInlineStyles, ConfigReader)
|
|
26349
26413
|
},
|
|
26350
26414
|
'constants': {
|
|
26351
26415
|
URL_MAX_LENGTH
|
|
@@ -26726,7 +26790,11 @@ const initialize = makeSafe(function (options) {
|
|
|
26726
26790
|
if (ConfigReader.get('preferBroadcastChannel')) {
|
|
26727
26791
|
SingletonMessageHandler.secure(true);
|
|
26728
26792
|
}
|
|
26729
|
-
|
|
26793
|
+
const localStorageUnloadEnabled = ConfigReader.get('analytics.localStorageUnload');
|
|
26794
|
+
localStorageEventBuffer.read(agentStorage);
|
|
26795
|
+
teardownFns.push(initializeEventBuffer({
|
|
26796
|
+
'localStorageUnload': localStorageUnloadEnabled
|
|
26797
|
+
}));
|
|
26730
26798
|
if (pendoCore) {
|
|
26731
26799
|
/**
|
|
26732
26800
|
* Current visitor id for pendo installation, either anonymous or identified. Used to determine
|
|
@@ -26789,6 +26857,15 @@ const initialize = makeSafe(function (options) {
|
|
|
26789
26857
|
Events.appUsage.on(ResourceCenterActivity.handler);
|
|
26790
26858
|
teardownFns.push(flushEvery(SEND_INTERVAL));
|
|
26791
26859
|
}
|
|
26860
|
+
Events.appHidden.on(() => {
|
|
26861
|
+
flushNow(true, { 'hidden': true });
|
|
26862
|
+
});
|
|
26863
|
+
Events.appUnloaded.on(() => {
|
|
26864
|
+
flushNow(true, { 'unload': true });
|
|
26865
|
+
if (localStorageUnloadEnabled) {
|
|
26866
|
+
localStorageEventBuffer.write(agentStorage);
|
|
26867
|
+
}
|
|
26868
|
+
});
|
|
26792
26869
|
// Remove existing visitor and account identification cookies if
|
|
26793
26870
|
// disablePersistence is set to true via administration UI or snippet
|
|
26794
26871
|
if (!shouldPersist()) {
|
|
@@ -32929,30 +33006,28 @@ var DesignerConnect = (function () {
|
|
|
32929
33006
|
}
|
|
32930
33007
|
}
|
|
32931
33008
|
function onConnectMessage(data, msg) {
|
|
32932
|
-
|
|
32933
|
-
|
|
32934
|
-
|
|
32935
|
-
|
|
32936
|
-
|
|
32937
|
-
|
|
32938
|
-
|
|
32939
|
-
|
|
32940
|
-
|
|
32941
|
-
|
|
32942
|
-
|
|
32943
|
-
|
|
32944
|
-
|
|
32945
|
-
|
|
32946
|
-
|
|
32947
|
-
|
|
32948
|
-
|
|
32949
|
-
|
|
32950
|
-
|
|
32951
|
-
|
|
32952
|
-
|
|
32953
|
-
|
|
32954
|
-
pluginAPI.Events.designerLaunched.trigger();
|
|
32955
|
-
}
|
|
33009
|
+
var messageOrigin = msg.origin;
|
|
33010
|
+
globalPendo.stopGuides();
|
|
33011
|
+
globalPendo.buffers.lock();
|
|
33012
|
+
var designerWindow = msg.source;
|
|
33013
|
+
setDesignerWindow(designerWindow);
|
|
33014
|
+
// Special handling for classic designer (p1)
|
|
33015
|
+
if (!globalPendo.designerv2.hostConfig) {
|
|
33016
|
+
pluginAPI.store.dispatch('frames/leave'); // p1 still needs to stop the frame controller
|
|
33017
|
+
// need an unload listener for classic designer to tell the designer to remove it from its frame list
|
|
33018
|
+
unloadListener = globalPendo._.partial(disconnectDesigner, designerWindow, messageOrigin);
|
|
33019
|
+
pluginAPI.Events.appUnloaded.on(unloadListener);
|
|
33020
|
+
}
|
|
33021
|
+
addDesignerFunctionality();
|
|
33022
|
+
tellMaster(msg.source, {
|
|
33023
|
+
'status': 'success',
|
|
33024
|
+
'type': 'connect'
|
|
33025
|
+
}, messageOrigin);
|
|
33026
|
+
if (findModuleByName('selection.js')) {
|
|
33027
|
+
globalPendo.log('Designer Modules already loaded.');
|
|
33028
|
+
tellMaster({ 'type': 'ready' }, messageOrigin);
|
|
33029
|
+
}
|
|
33030
|
+
pluginAPI.Events.designerLaunched.trigger();
|
|
32956
33031
|
}
|
|
32957
33032
|
function disconnectDesigner(designerWindow, messageOrigin) {
|
|
32958
33033
|
globalPendo.buffers.unlock();
|
|
@@ -33116,8 +33191,14 @@ var PromoteMetadata = (function () {
|
|
|
33116
33191
|
}
|
|
33117
33192
|
function createSchemaGroup(metadata) {
|
|
33118
33193
|
if (shouldPersist()) {
|
|
33119
|
-
|
|
33120
|
-
|
|
33194
|
+
try {
|
|
33195
|
+
const storedSchemaGroup = pluginApi.agentStorage.read(SCHEMA_GROUP);
|
|
33196
|
+
cachedSchemaGroup = storedSchemaGroup ? JSON.parse(storedSchemaGroup) : {};
|
|
33197
|
+
cachedSchemaGroup = removePrefixes(cachedSchemaGroup);
|
|
33198
|
+
}
|
|
33199
|
+
catch (e) {
|
|
33200
|
+
resetCachedSchemaGroup();
|
|
33201
|
+
}
|
|
33121
33202
|
}
|
|
33122
33203
|
var __sg__ = getSchemaGroup();
|
|
33123
33204
|
_.each(['visitor', 'account', 'parentAccount'], function (kind) {
|
|
@@ -35132,7 +35213,7 @@ var Branding = (function () {
|
|
|
35132
35213
|
link.href = 'https://www.pendo.io/pendo-free/nps?utm_source=pendo_app&utm_medium=branded-nps&utm_campaign=free-branded-nps';
|
|
35133
35214
|
link.target = '_blank';
|
|
35134
35215
|
var img = document.createElement('img');
|
|
35135
|
-
img.setAttribute('src',
|
|
35216
|
+
img.setAttribute('src', getAssetHost() + '/img/nps-branding.png');
|
|
35136
35217
|
link.appendChild(img);
|
|
35137
35218
|
link.style.display = 'inline-block';
|
|
35138
35219
|
var div = document.createElement('div');
|
|
@@ -36180,9 +36261,11 @@ const FrustrationEvent = (function () {
|
|
|
36180
36261
|
|
|
36181
36262
|
// A guide that show nested inside another element.
|
|
36182
36263
|
// Multiple embedded guides can show at the same time.
|
|
36183
|
-
const buildGuideBehaviors = function ({
|
|
36264
|
+
const buildGuideBehaviors = function ({ globalPendo, pluginApi }) {
|
|
36265
|
+
const guide = this;
|
|
36184
36266
|
const { _ } = globalPendo;
|
|
36185
|
-
const
|
|
36267
|
+
const { store } = pluginApi;
|
|
36268
|
+
this.process = function () {
|
|
36186
36269
|
const guide = this;
|
|
36187
36270
|
let guideElement = null;
|
|
36188
36271
|
const containerSelector = '[id^="pendo-guide-container"]';
|
|
@@ -36204,7 +36287,7 @@ const buildGuideBehaviors = function ({ store, globalPendo }) {
|
|
|
36204
36287
|
guide.hide();
|
|
36205
36288
|
}
|
|
36206
36289
|
};
|
|
36207
|
-
|
|
36290
|
+
this.getActiveStep = function () {
|
|
36208
36291
|
const guide = this;
|
|
36209
36292
|
if (!guide)
|
|
36210
36293
|
return null;
|
|
@@ -36212,31 +36295,51 @@ const buildGuideBehaviors = function ({ store, globalPendo }) {
|
|
|
36212
36295
|
return step.isShown();
|
|
36213
36296
|
});
|
|
36214
36297
|
};
|
|
36215
|
-
|
|
36298
|
+
this.shouldAutoDisplay = function () {
|
|
36216
36299
|
const guide = this;
|
|
36217
36300
|
return (guide.shouldShowSnoozedGuide() || guide.shouldRepeatGuide() || _.all(guide.steps, function (step) {
|
|
36218
36301
|
return step.shouldRepeat() || (!step.isSnoozed() && step.seenState !== 'dismissed');
|
|
36219
36302
|
}));
|
|
36220
36303
|
};
|
|
36221
|
-
|
|
36304
|
+
this.show = function (reason) {
|
|
36222
36305
|
const guide = this;
|
|
36223
36306
|
const firstStep = _.first(guide.steps);
|
|
36224
|
-
|
|
36225
|
-
|
|
36226
|
-
|
|
36227
|
-
|
|
36228
|
-
|
|
36307
|
+
if (guide.forceShowFirstStep) {
|
|
36308
|
+
guide.forceShowFirstStep = false;
|
|
36309
|
+
return firstStep.show('reason');
|
|
36310
|
+
}
|
|
36311
|
+
const steps = guide.steps.map((step) => {
|
|
36312
|
+
// The stored step state is most up to date. Fallback to the guides payload
|
|
36313
|
+
return _.get(store, `state.guideState.steps.${step.id}`, stepToLastSeenObject(step));
|
|
36314
|
+
});
|
|
36315
|
+
const lastSeenStep = _.max(steps, function ({ time }) { return time; });
|
|
36316
|
+
if (lastSeenStep && lastSeenStep.state == 'advanced' && !lastSeenStep.destinationStepId) {
|
|
36317
|
+
return guide.findStepById(lastSeenStep.guideStepId).dismiss();
|
|
36229
36318
|
}
|
|
36230
36319
|
const nextStep = guide.nextStep(lastSeenStep) || firstStep;
|
|
36231
36320
|
return nextStep.show(reason);
|
|
36232
36321
|
};
|
|
36233
|
-
|
|
36322
|
+
// when embedded guide is initialized set the forceShowFirstStep property.
|
|
36323
|
+
// This property is deleted after the guide shows because we no longer want to foce show the first step.
|
|
36324
|
+
// The propert is reset on urlChanged events.
|
|
36325
|
+
if (!this.hasOwnProperty('forceShowFirstStep')) {
|
|
36326
|
+
this.forceShowFirstStep = _.get(guide, 'attributes.restartOnReload');
|
|
36327
|
+
}
|
|
36328
|
+
this.isShownInThisFrame = function () {
|
|
36234
36329
|
const guide = this;
|
|
36235
36330
|
return _.any(guide.steps, function (step) {
|
|
36236
36331
|
return step.isRendered() || step.isLocked();
|
|
36237
36332
|
});
|
|
36238
36333
|
};
|
|
36239
|
-
|
|
36334
|
+
// Maps step fields to an last seen step object. See the guide.nextStep function.
|
|
36335
|
+
const stepToLastSeenObject = ({ id, guideId, seenReason, seenState, lastSeenAt, destinationStepId }) => ({
|
|
36336
|
+
guideId,
|
|
36337
|
+
'guideStepId': id,
|
|
36338
|
+
seenReason,
|
|
36339
|
+
'state': seenState,
|
|
36340
|
+
'time': lastSeenAt,
|
|
36341
|
+
destinationStepId
|
|
36342
|
+
});
|
|
36240
36343
|
};
|
|
36241
36344
|
const buildStepBehaviors = function ({ pluginApi, _ }) {
|
|
36242
36345
|
const step = this;
|
|
@@ -36250,18 +36353,16 @@ const buildStepBehaviors = function ({ pluginApi, _ }) {
|
|
|
36250
36353
|
}
|
|
36251
36354
|
if (!step._onShown)
|
|
36252
36355
|
return null;
|
|
36253
|
-
|
|
36356
|
+
this.onShown = function (reason) {
|
|
36254
36357
|
const step = this;
|
|
36255
36358
|
const shouldTriggerGuideSeen = !step.lastSeenAt || !!pluginApi.ConfigReader.get('enableAllEmbeddedGuideEvents');
|
|
36256
36359
|
return step._onShown(reason, shouldTriggerGuideSeen);
|
|
36257
36360
|
};
|
|
36258
|
-
return { onShown };
|
|
36259
36361
|
};
|
|
36260
36362
|
|
|
36261
36363
|
const EmbeddedGuides = (function () {
|
|
36262
36364
|
let pluginApi;
|
|
36263
36365
|
let globalPendo;
|
|
36264
|
-
let embeddedGuideBehaviors;
|
|
36265
36366
|
let _;
|
|
36266
36367
|
const embeddedGuides = [];
|
|
36267
36368
|
let _oldEmbeddedGuides = [];
|
|
@@ -36276,11 +36377,11 @@ const EmbeddedGuides = (function () {
|
|
|
36276
36377
|
globalPendo = pendo;
|
|
36277
36378
|
_ = globalPendo._;
|
|
36278
36379
|
exportPublicEmbeddedGuideApi(pendo);
|
|
36279
|
-
embeddedGuideBehaviors = buildGuideBehaviors({ 'store': pluginApi.store, globalPendo });
|
|
36280
36380
|
pluginApi.Events.on('deliverablesLoaded', clearEmbeddedGuides);
|
|
36281
36381
|
pluginApi.Events.on('guideLoopStopped', hideAllEmbeddedGuides);
|
|
36282
36382
|
pluginApi.Events.on('guideListChanged', initializeEmbeddedGuides);
|
|
36283
|
-
pluginApi.
|
|
36383
|
+
pluginApi.Events.on('urlChanged', setForceShowFirstStepFlags);
|
|
36384
|
+
pluginApi.GuideLoop.addUpdatePhase(processEmbeddedGuides);
|
|
36284
36385
|
pluginApi.guides.addProcessor(extractEmbeddedGuides);
|
|
36285
36386
|
pluginApi.GuideActivity.registerGuideResolver(getGuideObjectFromEvent);
|
|
36286
36387
|
this.removeResizeEvent = pendo.attachEvent(window, 'resize', redrawEmbeddedGuides);
|
|
@@ -36290,16 +36391,17 @@ const EmbeddedGuides = (function () {
|
|
|
36290
36391
|
pluginApi.Events.off('deliverablesLoaded', clearEmbeddedGuides);
|
|
36291
36392
|
pluginApi.Events.off('guideLoopStopped', hideAllEmbeddedGuides);
|
|
36292
36393
|
pluginApi.Events.off('guideListChanged', initializeEmbeddedGuides);
|
|
36293
|
-
pluginApi.
|
|
36394
|
+
pluginApi.Events.off('urlChanged', setForceShowFirstStepFlags);
|
|
36395
|
+
pluginApi.GuideLoop.removeUpdatePhase(processEmbeddedGuides);
|
|
36294
36396
|
pluginApi.guides.removeProcessor(extractEmbeddedGuides);
|
|
36295
36397
|
pluginApi.GuideActivity.removeGuideResolver(getGuideObjectFromEvent);
|
|
36296
36398
|
if (this.removeResizeEvent)
|
|
36297
36399
|
this.removeResizeEvent();
|
|
36298
36400
|
_oldEmbeddedGuides.length = 0;
|
|
36299
36401
|
}
|
|
36300
|
-
function
|
|
36402
|
+
function processEmbeddedGuides() {
|
|
36301
36403
|
_.forEach(embeddedGuides, function (guide) {
|
|
36302
|
-
guide.
|
|
36404
|
+
guide.process();
|
|
36303
36405
|
});
|
|
36304
36406
|
}
|
|
36305
36407
|
function hideAllEmbeddedGuides() {
|
|
@@ -36315,6 +36417,13 @@ const EmbeddedGuides = (function () {
|
|
|
36315
36417
|
pluginApi.guides.removeDisplayableGuides('embeddedGuides');
|
|
36316
36418
|
embeddedGuides.length = 0;
|
|
36317
36419
|
}
|
|
36420
|
+
// This function syncs the forceShowFirstStep with the restartOnReload property on guides
|
|
36421
|
+
// This function is run on the urlChanged event.
|
|
36422
|
+
function setForceShowFirstStepFlags() {
|
|
36423
|
+
_.forEach(embeddedGuides, function (guide) {
|
|
36424
|
+
guide.forceShowFirstStep = !!_.get(guide, 'attributes.restartOnReload');
|
|
36425
|
+
});
|
|
36426
|
+
}
|
|
36318
36427
|
function extractEmbeddedGuides(guide) {
|
|
36319
36428
|
if (isEmbedded(guide)) {
|
|
36320
36429
|
if (!_.some(embeddedGuides, ({ id }) => id === guide.id)) {
|
|
@@ -36377,10 +36486,9 @@ const EmbeddedGuides = (function () {
|
|
|
36377
36486
|
}
|
|
36378
36487
|
function applyEmbeddedGuideBehaviors() {
|
|
36379
36488
|
_.map(embeddedGuides, function (guide) {
|
|
36380
|
-
|
|
36489
|
+
buildGuideBehaviors.call(guide, { globalPendo, pluginApi });
|
|
36381
36490
|
_.map(guide.steps, function (step) {
|
|
36382
|
-
|
|
36383
|
-
Object.assign(step, stepBehaviors);
|
|
36491
|
+
buildStepBehaviors.call(step, { pluginApi, _ });
|
|
36384
36492
|
});
|
|
36385
36493
|
});
|
|
36386
36494
|
}
|
|
@@ -36454,6 +36562,7 @@ class SessionManager {
|
|
|
36454
36562
|
* @label SESSION_ID
|
|
36455
36563
|
*/
|
|
36456
36564
|
this.api.agentStorage.registry.addLocal(SESSION_ID);
|
|
36565
|
+
this.suffix = this.api.ConfigReader.get('identityStorageSuffix');
|
|
36457
36566
|
}
|
|
36458
36567
|
teardown() {
|
|
36459
36568
|
_.each(this.subscriptions, function (unsubscribe) {
|
|
@@ -36483,23 +36592,25 @@ class SessionManager {
|
|
|
36483
36592
|
capturedEvent.sessionId = sessionInfo.sessionId;
|
|
36484
36593
|
}
|
|
36485
36594
|
sessionInfo(defaultId = this.pendo.randomString(16)) {
|
|
36486
|
-
let currentSessionInfo = this.api.agentStorage.read(SESSION_ID)
|
|
36595
|
+
let currentSessionInfo = this.api.agentStorage.read(SESSION_ID, false, this.suffix) ||
|
|
36596
|
+
this.api.agentStorage.read(SESSION_ID);
|
|
36487
36597
|
if (!currentSessionInfo) {
|
|
36488
36598
|
currentSessionInfo = JSON.stringify({
|
|
36489
36599
|
'sessionId': defaultId,
|
|
36490
36600
|
'timestamp': new Date().getTime()
|
|
36491
36601
|
});
|
|
36492
|
-
this.api.agentStorage.write(SESSION_ID, currentSessionInfo);
|
|
36602
|
+
this.api.agentStorage.write(SESSION_ID, currentSessionInfo, undefined, false, true, this.suffix);
|
|
36493
36603
|
}
|
|
36494
36604
|
return JSON.parse(currentSessionInfo);
|
|
36495
36605
|
}
|
|
36496
36606
|
clearSessionInfo() {
|
|
36497
36607
|
this.api.agentStorage.clear(SESSION_ID);
|
|
36608
|
+
this.api.agentStorage.clear(SESSION_ID, false, this.suffix);
|
|
36498
36609
|
return this.sessionInfo();
|
|
36499
36610
|
}
|
|
36500
36611
|
storeLastInteractionEventInformation(sessionInfo, timestamp) {
|
|
36501
36612
|
sessionInfo.timestamp = timestamp;
|
|
36502
|
-
this.api.agentStorage.write(SESSION_ID, JSON.stringify(sessionInfo));
|
|
36613
|
+
this.api.agentStorage.write(SESSION_ID, JSON.stringify(sessionInfo), undefined, false, true, this.suffix);
|
|
36503
36614
|
}
|
|
36504
36615
|
}
|
|
36505
36616
|
var SessionManager$1 = new SessionManager();
|
|
@@ -36855,6 +36966,7 @@ class WebAnalytics {
|
|
|
36855
36966
|
*/
|
|
36856
36967
|
this.api.agentStorage.registry.addLocal(WEB_ANALYTICS_STORAGE_KEY);
|
|
36857
36968
|
this.storeParameters(params, PluginAPI.agentStorage);
|
|
36969
|
+
this.suffix = this.api.ConfigReader.get('identityStorageSuffix');
|
|
36858
36970
|
}
|
|
36859
36971
|
extractParameters(url, referrer) {
|
|
36860
36972
|
const locationUrl = new URL(url);
|
|
@@ -36915,11 +37027,12 @@ class WebAnalytics {
|
|
|
36915
37027
|
storeParameters(params, storage) {
|
|
36916
37028
|
if (this.pendo._.size(params) > 0) {
|
|
36917
37029
|
this.utm = params;
|
|
36918
|
-
storage.write(WEB_ANALYTICS_STORAGE_KEY, JSON.stringify(params));
|
|
37030
|
+
storage.write(WEB_ANALYTICS_STORAGE_KEY, JSON.stringify(params), undefined, false, true, this.suffix);
|
|
36919
37031
|
}
|
|
36920
37032
|
}
|
|
36921
37033
|
loadParameters(storage) {
|
|
36922
|
-
const storedParamsJson = storage.read(WEB_ANALYTICS_STORAGE_KEY)
|
|
37034
|
+
const storedParamsJson = storage.read(WEB_ANALYTICS_STORAGE_KEY, false, this.suffix) ||
|
|
37035
|
+
storage.read(WEB_ANALYTICS_STORAGE_KEY);
|
|
36923
37036
|
if (storedParamsJson)
|
|
36924
37037
|
return JSON.parse(storedParamsJson);
|
|
36925
37038
|
return null;
|
|
@@ -36941,6 +37054,7 @@ class WebAnalytics {
|
|
|
36941
37054
|
this.utm = null;
|
|
36942
37055
|
const agentStorage = this.api.agentStorage;
|
|
36943
37056
|
agentStorage.clear(WEB_ANALYTICS_STORAGE_KEY);
|
|
37057
|
+
agentStorage.clear(WEB_ANALYTICS_STORAGE_KEY, false, this.suffix);
|
|
36944
37058
|
const params = this.extractParameters(window.location.href, document.referrer);
|
|
36945
37059
|
this.storeParameters(params, agentStorage);
|
|
36946
37060
|
}
|
|
@@ -37304,14 +37418,12 @@ const FormValidation = (function () {
|
|
|
37304
37418
|
return true;
|
|
37305
37419
|
}
|
|
37306
37420
|
function appendValidationStyles() {
|
|
37307
|
-
|
|
37308
|
-
|
|
37309
|
-
|
|
37421
|
+
if (validationGuides.length === 0)
|
|
37422
|
+
return;
|
|
37423
|
+
pluginApi.util.addInlineStyles('pendo-form-validation-styles', `input[data-pendo-field-valid="false"] {
|
|
37310
37424
|
border-color: red !important;
|
|
37311
37425
|
outline-color: red !important;
|
|
37312
|
-
}
|
|
37313
|
-
`;
|
|
37314
|
-
document.head.appendChild(style);
|
|
37426
|
+
}`);
|
|
37315
37427
|
}
|
|
37316
37428
|
function focusField(event) {
|
|
37317
37429
|
var _a, _b;
|
|
@@ -37990,6 +38102,18 @@ var guideMarkdownUtil = {
|
|
|
37990
38102
|
removeMarkdownSyntax
|
|
37991
38103
|
};
|
|
37992
38104
|
|
|
38105
|
+
function getZoneSafeMethod(_, method, target = window) {
|
|
38106
|
+
var zoneSymbol = '__symbol__';
|
|
38107
|
+
/* global Zone */
|
|
38108
|
+
if (typeof Zone !== 'undefined' && _.isFunction(Zone[zoneSymbol])) {
|
|
38109
|
+
var fn = target[Zone[zoneSymbol](method)];
|
|
38110
|
+
if (_.isFunction(fn)) {
|
|
38111
|
+
return fn;
|
|
38112
|
+
}
|
|
38113
|
+
}
|
|
38114
|
+
return target[method];
|
|
38115
|
+
}
|
|
38116
|
+
|
|
37993
38117
|
// Does not support submit and go to
|
|
37994
38118
|
const goToRegex = new RegExp(guideMarkdownUtil.goToString);
|
|
37995
38119
|
const PollBranching = {
|
|
@@ -38029,6 +38153,7 @@ const PollBranching = {
|
|
|
38029
38153
|
'characterData': true,
|
|
38030
38154
|
'subtree': false
|
|
38031
38155
|
};
|
|
38156
|
+
const MutationObserver = getZoneSafeMethod(pendo._, 'MutationObserver');
|
|
38032
38157
|
const observer = new MutationObserver(applyBranchingIndicators);
|
|
38033
38158
|
observer.observe(target, config);
|
|
38034
38159
|
function applyBranchingIndicators(mutations) {
|
|
@@ -38176,6 +38301,7 @@ const MetadataSubstitution = {
|
|
|
38176
38301
|
'characterData': true,
|
|
38177
38302
|
'subtree': false
|
|
38178
38303
|
};
|
|
38304
|
+
const MutationObserver = getZoneSafeMethod(pendo._, 'MutationObserver');
|
|
38179
38305
|
const observer = new MutationObserver(applySubstitutionIndicators);
|
|
38180
38306
|
observer.observe(target, config);
|
|
38181
38307
|
function applySubstitutionIndicators(mutations) {
|
|
@@ -38491,6 +38617,7 @@ const RequiredQuestions = {
|
|
|
38491
38617
|
'characterData': true,
|
|
38492
38618
|
'subtree': false
|
|
38493
38619
|
};
|
|
38620
|
+
const MutationObserver = getZoneSafeMethod(pendo._, 'MutationObserver');
|
|
38494
38621
|
const observer = new MutationObserver(applyRequiredIndicators);
|
|
38495
38622
|
observer.observe(target, config);
|
|
38496
38623
|
function applyRequiredIndicators(mutations) {
|
|
@@ -38613,6 +38740,7 @@ const SkipToEligibleStep = {
|
|
|
38613
38740
|
'characterData': true,
|
|
38614
38741
|
'subtree': false
|
|
38615
38742
|
};
|
|
38743
|
+
const MutationObserver = getZoneSafeMethod(pendo._, 'MutationObserver');
|
|
38616
38744
|
const observer = new MutationObserver(applySkipStepIndicator);
|
|
38617
38745
|
observer.observe(target, config);
|
|
38618
38746
|
// create an observer instance
|
|
@@ -43866,15 +43994,14 @@ function VocPortal() {
|
|
|
43866
43994
|
const width = `${widthValue}${widthUnit}${widthIsImportant ? ' !important' : ''}`;
|
|
43867
43995
|
const height = `${heightValue}${heightUnit}${heightIsImportant ? ' !important' : ''}`;
|
|
43868
43996
|
const container = document.getElementById('pendo-resource-center-container');
|
|
43869
|
-
|
|
43870
|
-
styleElem.innerHTML = `#pendo-resource-center-container:has(iframe[src*="portal"][src*="mode=rc"]) {
|
|
43871
|
-
width: ${width};
|
|
43872
|
-
height: ${height};
|
|
43873
|
-
._pendo-step-container-size {
|
|
43997
|
+
pluginAPI.util.addInlineStyles('pendo-voc-portal-styles', `#pendo-resource-center-container:has(iframe[src*="portal"][src*="mode=rc"]) {
|
|
43874
43998
|
width: ${width};
|
|
43875
43999
|
height: ${height};
|
|
43876
|
-
|
|
43877
|
-
|
|
44000
|
+
._pendo-step-container-size {
|
|
44001
|
+
width: ${width};
|
|
44002
|
+
height: ${height};
|
|
44003
|
+
}
|
|
44004
|
+
}`, container);
|
|
43878
44005
|
resizePortalIframe();
|
|
43879
44006
|
}
|
|
43880
44007
|
catch (err) {
|
|
@@ -44005,8 +44132,10 @@ function Feedback() {
|
|
|
44005
44132
|
}
|
|
44006
44133
|
function handleIdentityChange(event) {
|
|
44007
44134
|
const visitorId = globalPendo._.get(event, 'data.0.visitor_id') || globalPendo._.get(event, 'data.0.options.visitor.id');
|
|
44008
|
-
if (globalPendo.isAnonymousVisitor(visitorId))
|
|
44135
|
+
if (globalPendo.isAnonymousVisitor(visitorId)) {
|
|
44136
|
+
removeFeedbackWidget();
|
|
44009
44137
|
return;
|
|
44138
|
+
}
|
|
44010
44139
|
pingOrInitialize();
|
|
44011
44140
|
}
|
|
44012
44141
|
function handleReady() {
|
|
@@ -44021,6 +44150,8 @@ function Feedback() {
|
|
|
44021
44150
|
widgetLoaded = false;
|
|
44022
44151
|
feedbackAllowedProductId = '';
|
|
44023
44152
|
initialized = false;
|
|
44153
|
+
pluginApi.agentStorage.clear(notificationCountCookie);
|
|
44154
|
+
pluginApi.agentStorage.clear(PING_COOKIE);
|
|
44024
44155
|
}
|
|
44025
44156
|
function getWidgetInitialSource() {
|
|
44026
44157
|
return siteUrl + '/html/widget/notLoaded.html';
|
|
@@ -44272,14 +44403,6 @@ function Feedback() {
|
|
|
44272
44403
|
break;
|
|
44273
44404
|
}
|
|
44274
44405
|
}
|
|
44275
|
-
function addStylesToPage(styleId, styles) {
|
|
44276
|
-
if (globalPendo.dom(`#${styleId}`)[0])
|
|
44277
|
-
return;
|
|
44278
|
-
const styleNode = globalPendo.dom(document.createElement('style'));
|
|
44279
|
-
styleNode.attr('id', styleId);
|
|
44280
|
-
styleNode.html(styles);
|
|
44281
|
-
styleNode.appendTo(document.head);
|
|
44282
|
-
}
|
|
44283
44406
|
function initialiseWidget(settings) {
|
|
44284
44407
|
var feedbackSettings = globalPendo._.extend(settings, {
|
|
44285
44408
|
'triggerColor': '#' + settings.triggerColor,
|
|
@@ -44287,7 +44410,7 @@ function Feedback() {
|
|
|
44287
44410
|
});
|
|
44288
44411
|
registerTurbolinksHook();
|
|
44289
44412
|
var positionInfo = getTriggerPositions(feedbackSettings);
|
|
44290
|
-
|
|
44413
|
+
pluginApi.util.addInlineStyles(elemIds.feedbackStyles, getPseudoStyles(positionInfo.horizontalPosition));
|
|
44291
44414
|
if (!settings.customTrigger) {
|
|
44292
44415
|
createTrigger(feedbackSettings, positionInfo);
|
|
44293
44416
|
}
|
|
@@ -44410,7 +44533,7 @@ function Feedback() {
|
|
|
44410
44533
|
background: #3e566f !important;
|
|
44411
44534
|
}
|
|
44412
44535
|
`;
|
|
44413
|
-
|
|
44536
|
+
pluginApi.util.addInlineStyles('pendo-feedback-trigger-styles', pseudoStyles);
|
|
44414
44537
|
}
|
|
44415
44538
|
function createTrigger(settings, positionInfo) {
|
|
44416
44539
|
addTriggerPseudoStyles();
|
|
@@ -44468,7 +44591,7 @@ function Feedback() {
|
|
|
44468
44591
|
z-index: 9002 !important;
|
|
44469
44592
|
}
|
|
44470
44593
|
`;
|
|
44471
|
-
|
|
44594
|
+
pluginApi.util.addInlineStyles(elemIds.feedbackFrameStyles, styles);
|
|
44472
44595
|
}
|
|
44473
44596
|
function initialiseWidgetFrame(horizontalPosition) {
|
|
44474
44597
|
addWidgetVisibleButtonStyles(horizontalPosition);
|
|
@@ -44937,7 +45060,7 @@ function stringifyStylesheet(s2) {
|
|
|
44937
45060
|
}
|
|
44938
45061
|
let sheetHref = s2.href;
|
|
44939
45062
|
if (!sheetHref && s2.ownerNode && s2.ownerNode.ownerDocument) {
|
|
44940
|
-
sheetHref = s2.ownerNode.ownerDocument.
|
|
45063
|
+
sheetHref = s2.ownerNode.ownerDocument.baseURI;
|
|
44941
45064
|
}
|
|
44942
45065
|
const stringifiedRules = Array.from(
|
|
44943
45066
|
rules2,
|