@ada-support/embed2 1.0.28 → 1.0.32
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/npm-entry/client/components/ButtonFrame/index.d.ts +4 -1
- package/dist/npm-entry/client/components/ChatFrame/index.d.ts +3 -2
- package/dist/npm-entry/client/components/Container/index.d.ts +3 -2
- package/dist/npm-entry/client/components/IFrame/index.d.ts +2 -2
- package/dist/npm-entry/client/components/IntroFrame/index.d.ts +2 -1
- package/dist/npm-entry/client/components/MaskFrame/index.d.ts +2 -1
- package/dist/npm-entry/client/components/XStorageFrame/index.d.ts +2 -1
- package/dist/npm-entry/client/index.d.ts +1 -1
- package/dist/npm-entry/client/lib/ce.d.ts +1 -1
- package/dist/npm-entry/client/lib/connect.d.ts +2 -2
- package/dist/npm-entry/client/lib/contexts.d.ts +2 -1
- package/dist/npm-entry/client/lib/message-service.d.ts +0 -1
- package/dist/npm-entry/client/lib/store-proxy.d.ts +3 -4
- package/dist/npm-entry/common/constants/storage-keys.d.ts +6 -1
- package/dist/npm-entry/common/helpers/getAlignment.d.ts +2 -0
- package/dist/npm-entry/common/helpers/isRTL.d.ts +1 -0
- package/dist/npm-entry/common/lib/ConnectContainer/index.d.ts +9 -9
- package/dist/npm-entry/common/lib/channel.d.ts +1 -1
- package/dist/npm-entry/common/lib/fc/index.d.ts +2 -2
- package/dist/npm-entry/common/types/channels.d.ts +1 -1
- package/dist/npm-entry/common/types/store-state.d.ts +36 -31
- package/dist/npm-entry/common/types/store.d.ts +3 -3
- package/dist/npm-entry/frames/components/x-storage/index.d.ts +12 -0
- package/dist/npm-entry/frames/helpers/frame-init.d.ts +3 -0
- package/dist/npm-entry/frames/helpers/storage/index.d.ts +1 -1
- package/dist/npm-entry/frames/lib/error-tracker.d.ts +6 -0
- package/dist/npm-entry/frames/lib/frame-fc.d.ts +3 -0
- package/dist/npm-entry/frames/lib/safe-storage/index.d.ts +8 -4
- package/dist/npm-entry/frames/lib/store-proxy.d.ts +2 -0
- package/dist/npm-entry/index.js +1192 -535
- package/package.json +6 -5
package/dist/npm-entry/index.js
CHANGED
|
@@ -722,7 +722,7 @@ var browserPerformanceTimeOrigin = (function () {
|
|
|
722
722
|
|
|
723
723
|
/***/ }),
|
|
724
724
|
|
|
725
|
-
/***/
|
|
725
|
+
/***/ 2396:
|
|
726
726
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
727
727
|
|
|
728
728
|
"use strict";
|
|
@@ -1738,7 +1738,7 @@ var States;
|
|
|
1738
1738
|
* Thenable class that behaves like a Promise and follows it's interface
|
|
1739
1739
|
* but is not async internally
|
|
1740
1740
|
*/
|
|
1741
|
-
var
|
|
1741
|
+
var syncpromise_SyncPromise = /** @class */ (function () {
|
|
1742
1742
|
function SyncPromise(executor) {
|
|
1743
1743
|
var _this = this;
|
|
1744
1744
|
this._state = States.PENDING;
|
|
@@ -2287,7 +2287,7 @@ var Scope = /** @class */ (function () {
|
|
|
2287
2287
|
Scope.prototype._notifyEventProcessors = function (processors, event, hint, index) {
|
|
2288
2288
|
var _this = this;
|
|
2289
2289
|
if (index === void 0) { index = 0; }
|
|
2290
|
-
return new
|
|
2290
|
+
return new syncpromise_SyncPromise(function (resolve, reject) {
|
|
2291
2291
|
var processor = processors[index];
|
|
2292
2292
|
if (event === null || typeof processor !== 'function') {
|
|
2293
2293
|
resolve(event);
|
|
@@ -3818,7 +3818,7 @@ function makeMain(hub) {
|
|
|
3818
3818
|
* contains a more recent version, it replaces the registered version.
|
|
3819
3819
|
* Otherwise, the currently registered hub will be returned.
|
|
3820
3820
|
*/
|
|
3821
|
-
function
|
|
3821
|
+
function hub_getCurrentHub() {
|
|
3822
3822
|
// Get main carrier (global for every environment)
|
|
3823
3823
|
var registry = getMainCarrier();
|
|
3824
3824
|
// If there's no hub, or its an old API, assign a new one
|
|
@@ -3924,7 +3924,7 @@ var InboundFilters = /** @class */ (function () {
|
|
|
3924
3924
|
*/
|
|
3925
3925
|
InboundFilters.prototype.setupOnce = function () {
|
|
3926
3926
|
addGlobalEventProcessor(function (event) {
|
|
3927
|
-
var hub =
|
|
3927
|
+
var hub = hub_getCurrentHub();
|
|
3928
3928
|
if (!hub) {
|
|
3929
3929
|
return event;
|
|
3930
3930
|
}
|
|
@@ -5186,7 +5186,7 @@ function eventFromException(options, exception, hint) {
|
|
|
5186
5186
|
if (hint && hint.event_id) {
|
|
5187
5187
|
event.event_id = hint.event_id;
|
|
5188
5188
|
}
|
|
5189
|
-
return
|
|
5189
|
+
return syncpromise_SyncPromise.resolve(event);
|
|
5190
5190
|
}
|
|
5191
5191
|
/**
|
|
5192
5192
|
* Builds and Event from a Message
|
|
@@ -5202,7 +5202,7 @@ function eventFromMessage(options, message, level, hint) {
|
|
|
5202
5202
|
if (hint && hint.event_id) {
|
|
5203
5203
|
event.event_id = hint.event_id;
|
|
5204
5204
|
}
|
|
5205
|
-
return
|
|
5205
|
+
return syncpromise_SyncPromise.resolve(event);
|
|
5206
5206
|
}
|
|
5207
5207
|
/**
|
|
5208
5208
|
* @hidden
|
|
@@ -5512,7 +5512,7 @@ function callOnHub(method) {
|
|
|
5512
5512
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
5513
5513
|
args[_i - 1] = arguments[_i];
|
|
5514
5514
|
}
|
|
5515
|
-
var hub =
|
|
5515
|
+
var hub = hub_getCurrentHub();
|
|
5516
5516
|
if (hub && hub[method]) {
|
|
5517
5517
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5518
5518
|
return hub[method].apply(hub, minimal_node_modules_tslib_tslib_es6_spread(args));
|
|
@@ -6172,7 +6172,7 @@ var GlobalHandlers = /** @class */ (function () {
|
|
|
6172
6172
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6173
6173
|
callback: function (data) {
|
|
6174
6174
|
var error = data.error;
|
|
6175
|
-
var currentHub =
|
|
6175
|
+
var currentHub = hub_getCurrentHub();
|
|
6176
6176
|
var hasIntegration = currentHub.getIntegration(GlobalHandlers);
|
|
6177
6177
|
var isFailedOwnDelivery = error && error.__sentry_own_request__ === true;
|
|
6178
6178
|
if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {
|
|
@@ -6226,7 +6226,7 @@ var GlobalHandlers = /** @class */ (function () {
|
|
|
6226
6226
|
catch (_oO) {
|
|
6227
6227
|
// no-empty
|
|
6228
6228
|
}
|
|
6229
|
-
var currentHub =
|
|
6229
|
+
var currentHub = hub_getCurrentHub();
|
|
6230
6230
|
var hasIntegration = currentHub.getIntegration(GlobalHandlers);
|
|
6231
6231
|
var isFailedOwnDelivery = error && error.__sentry_own_request__ === true;
|
|
6232
6232
|
if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {
|
|
@@ -6588,7 +6588,7 @@ var Breadcrumbs = /** @class */ (function () {
|
|
|
6588
6588
|
if (!this._options.sentry) {
|
|
6589
6589
|
return;
|
|
6590
6590
|
}
|
|
6591
|
-
|
|
6591
|
+
hub_getCurrentHub().addBreadcrumb({
|
|
6592
6592
|
category: "sentry." + (event.type === 'transaction' ? 'transaction' : 'event'),
|
|
6593
6593
|
event_id: event.event_id,
|
|
6594
6594
|
level: event.level,
|
|
@@ -6692,7 +6692,7 @@ var Breadcrumbs = /** @class */ (function () {
|
|
|
6692
6692
|
return;
|
|
6693
6693
|
}
|
|
6694
6694
|
}
|
|
6695
|
-
|
|
6695
|
+
hub_getCurrentHub().addBreadcrumb(breadcrumb, {
|
|
6696
6696
|
input: handlerData.args,
|
|
6697
6697
|
level: handlerData.level,
|
|
6698
6698
|
});
|
|
@@ -6719,7 +6719,7 @@ var Breadcrumbs = /** @class */ (function () {
|
|
|
6719
6719
|
if (target.length === 0) {
|
|
6720
6720
|
return;
|
|
6721
6721
|
}
|
|
6722
|
-
|
|
6722
|
+
hub_getCurrentHub().addBreadcrumb({
|
|
6723
6723
|
category: "ui." + handlerData.name,
|
|
6724
6724
|
message: target,
|
|
6725
6725
|
}, {
|
|
@@ -6739,7 +6739,7 @@ var Breadcrumbs = /** @class */ (function () {
|
|
|
6739
6739
|
return;
|
|
6740
6740
|
}
|
|
6741
6741
|
var _a = handlerData.xhr.__sentry_xhr__ || {}, method = _a.method, url = _a.url, status_code = _a.status_code, body = _a.body;
|
|
6742
|
-
|
|
6742
|
+
hub_getCurrentHub().addBreadcrumb({
|
|
6743
6743
|
category: 'xhr',
|
|
6744
6744
|
data: {
|
|
6745
6745
|
method: method,
|
|
@@ -6768,7 +6768,7 @@ var Breadcrumbs = /** @class */ (function () {
|
|
|
6768
6768
|
return;
|
|
6769
6769
|
}
|
|
6770
6770
|
if (handlerData.error) {
|
|
6771
|
-
|
|
6771
|
+
hub_getCurrentHub().addBreadcrumb({
|
|
6772
6772
|
category: 'fetch',
|
|
6773
6773
|
data: handlerData.fetchData,
|
|
6774
6774
|
level: Severity.Error,
|
|
@@ -6779,7 +6779,7 @@ var Breadcrumbs = /** @class */ (function () {
|
|
|
6779
6779
|
});
|
|
6780
6780
|
}
|
|
6781
6781
|
else {
|
|
6782
|
-
|
|
6782
|
+
hub_getCurrentHub().addBreadcrumb({
|
|
6783
6783
|
category: 'fetch',
|
|
6784
6784
|
data: tslib_es6_assign(tslib_es6_assign({}, handlerData.fetchData), { status_code: handlerData.response.status }),
|
|
6785
6785
|
type: 'http',
|
|
@@ -6812,7 +6812,7 @@ var Breadcrumbs = /** @class */ (function () {
|
|
|
6812
6812
|
if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {
|
|
6813
6813
|
from = parsedFrom.relative;
|
|
6814
6814
|
}
|
|
6815
|
-
|
|
6815
|
+
hub_getCurrentHub().addBreadcrumb({
|
|
6816
6816
|
category: 'navigation',
|
|
6817
6817
|
data: {
|
|
6818
6818
|
from: from,
|
|
@@ -6855,7 +6855,7 @@ var LinkedErrors = /** @class */ (function () {
|
|
|
6855
6855
|
*/
|
|
6856
6856
|
LinkedErrors.prototype.setupOnce = function () {
|
|
6857
6857
|
addGlobalEventProcessor(function (event, hint) {
|
|
6858
|
-
var self =
|
|
6858
|
+
var self = hub_getCurrentHub().getIntegration(LinkedErrors);
|
|
6859
6859
|
if (self) {
|
|
6860
6860
|
var handler = self._handler && self._handler.bind(self);
|
|
6861
6861
|
return typeof handler === 'function' ? handler(event, hint) : event;
|
|
@@ -6913,7 +6913,7 @@ var UserAgent = /** @class */ (function () {
|
|
|
6913
6913
|
UserAgent.prototype.setupOnce = function () {
|
|
6914
6914
|
addGlobalEventProcessor(function (event) {
|
|
6915
6915
|
var _a, _b, _c;
|
|
6916
|
-
if (
|
|
6916
|
+
if (hub_getCurrentHub().getIntegration(UserAgent)) {
|
|
6917
6917
|
// if none of the information we want exists, don't bother
|
|
6918
6918
|
if (!useragent_global.navigator && !useragent_global.location && !useragent_global.document) {
|
|
6919
6919
|
return event;
|
|
@@ -7176,7 +7176,7 @@ function setupIntegration(integration) {
|
|
|
7176
7176
|
if (installedIntegrations.indexOf(integration.name) !== -1) {
|
|
7177
7177
|
return;
|
|
7178
7178
|
}
|
|
7179
|
-
integration.setupOnce(addGlobalEventProcessor,
|
|
7179
|
+
integration.setupOnce(addGlobalEventProcessor, hub_getCurrentHub);
|
|
7180
7180
|
installedIntegrations.push(integration.name);
|
|
7181
7181
|
logger_logger.log("Integration installed: " + integration.name);
|
|
7182
7182
|
}
|
|
@@ -7420,7 +7420,7 @@ var BaseClient = /** @class */ (function () {
|
|
|
7420
7420
|
*/
|
|
7421
7421
|
BaseClient.prototype._isClientDoneProcessing = function (timeout) {
|
|
7422
7422
|
var _this = this;
|
|
7423
|
-
return new
|
|
7423
|
+
return new syncpromise_SyncPromise(function (resolve) {
|
|
7424
7424
|
var ticked = 0;
|
|
7425
7425
|
var tick = 1;
|
|
7426
7426
|
var interval = setInterval(function () {
|
|
@@ -7473,7 +7473,7 @@ var BaseClient = /** @class */ (function () {
|
|
|
7473
7473
|
finalScope = Scope.clone(finalScope).update(hint.captureContext);
|
|
7474
7474
|
}
|
|
7475
7475
|
// We prepare the result here with a resolved Event.
|
|
7476
|
-
var result =
|
|
7476
|
+
var result = syncpromise_SyncPromise.resolve(prepared);
|
|
7477
7477
|
// This should be the last thing called, since we want that
|
|
7478
7478
|
// {@link Hub.addEventProcessor} gets the finished prepared event.
|
|
7479
7479
|
if (finalScope) {
|
|
@@ -7609,14 +7609,14 @@ var BaseClient = /** @class */ (function () {
|
|
|
7609
7609
|
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
7610
7610
|
var _a = this.getOptions(), beforeSend = _a.beforeSend, sampleRate = _a.sampleRate;
|
|
7611
7611
|
if (!this._isEnabled()) {
|
|
7612
|
-
return
|
|
7612
|
+
return syncpromise_SyncPromise.reject(new SentryError('SDK not enabled, will not capture event.'));
|
|
7613
7613
|
}
|
|
7614
7614
|
var isTransaction = event.type === 'transaction';
|
|
7615
7615
|
// 1.0 === 100% events are sent
|
|
7616
7616
|
// 0.0 === 0% events are sent
|
|
7617
7617
|
// Sampling for transaction happens somewhere else
|
|
7618
7618
|
if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) {
|
|
7619
|
-
return
|
|
7619
|
+
return syncpromise_SyncPromise.reject(new SentryError("Discarding event because it's not included in the random sample (sampling rate = " + sampleRate + ")"));
|
|
7620
7620
|
}
|
|
7621
7621
|
return this._prepareEvent(event, scope, hint)
|
|
7622
7622
|
.then(function (prepared) {
|
|
@@ -7747,7 +7747,7 @@ var NoopTransport = /** @class */ (function () {
|
|
|
7747
7747
|
* @inheritDoc
|
|
7748
7748
|
*/
|
|
7749
7749
|
NoopTransport.prototype.sendEvent = function (_) {
|
|
7750
|
-
return
|
|
7750
|
+
return syncpromise_SyncPromise.resolve({
|
|
7751
7751
|
reason: "NoopTransport: Event has been skipped because no Dsn is configured.",
|
|
7752
7752
|
status: Status.Skipped,
|
|
7753
7753
|
});
|
|
@@ -7756,7 +7756,7 @@ var NoopTransport = /** @class */ (function () {
|
|
|
7756
7756
|
* @inheritDoc
|
|
7757
7757
|
*/
|
|
7758
7758
|
NoopTransport.prototype.close = function (_) {
|
|
7759
|
-
return
|
|
7759
|
+
return syncpromise_SyncPromise.resolve(true);
|
|
7760
7760
|
};
|
|
7761
7761
|
return NoopTransport;
|
|
7762
7762
|
}());
|
|
@@ -7937,7 +7937,7 @@ var PromiseBuffer = /** @class */ (function () {
|
|
|
7937
7937
|
PromiseBuffer.prototype.add = function (taskProducer) {
|
|
7938
7938
|
var _this = this;
|
|
7939
7939
|
if (!this.isReady()) {
|
|
7940
|
-
return
|
|
7940
|
+
return syncpromise_SyncPromise.reject(new SentryError('Not adding Promise due to buffer limit reached.'));
|
|
7941
7941
|
}
|
|
7942
7942
|
// start the task and add its promise to the queue
|
|
7943
7943
|
var task = taskProducer();
|
|
@@ -7983,7 +7983,7 @@ var PromiseBuffer = /** @class */ (function () {
|
|
|
7983
7983
|
*/
|
|
7984
7984
|
PromiseBuffer.prototype.drain = function (timeout) {
|
|
7985
7985
|
var _this = this;
|
|
7986
|
-
return new
|
|
7986
|
+
return new syncpromise_SyncPromise(function (resolve) {
|
|
7987
7987
|
// wait for `timeout` ms and then resolve to `false` (if not cancelled first)
|
|
7988
7988
|
var capturedSetTimeout = setTimeout(function () {
|
|
7989
7989
|
if (timeout && timeout > 0) {
|
|
@@ -7991,7 +7991,7 @@ var PromiseBuffer = /** @class */ (function () {
|
|
|
7991
7991
|
}
|
|
7992
7992
|
}, timeout);
|
|
7993
7993
|
// if all promises resolve in time, cancel the timer and resolve to `true`
|
|
7994
|
-
void
|
|
7994
|
+
void syncpromise_SyncPromise.all(_this._buffer)
|
|
7995
7995
|
.then(function () {
|
|
7996
7996
|
clearTimeout(capturedSetTimeout);
|
|
7997
7997
|
resolve(true);
|
|
@@ -8253,7 +8253,7 @@ var FetchTransport = /** @class */ (function (_super) {
|
|
|
8253
8253
|
options.headers = this.options.headers;
|
|
8254
8254
|
}
|
|
8255
8255
|
return this._buffer.add(function () {
|
|
8256
|
-
return new
|
|
8256
|
+
return new syncpromise_SyncPromise(function (resolve, reject) {
|
|
8257
8257
|
void _this._fetch(sentryRequest.url, options)
|
|
8258
8258
|
.then(function (response) {
|
|
8259
8259
|
var headers = {
|
|
@@ -8314,7 +8314,7 @@ var XHRTransport = /** @class */ (function (_super) {
|
|
|
8314
8314
|
});
|
|
8315
8315
|
}
|
|
8316
8316
|
return this._buffer.add(function () {
|
|
8317
|
-
return new
|
|
8317
|
+
return new syncpromise_SyncPromise(function (resolve, reject) {
|
|
8318
8318
|
var request = new XMLHttpRequest();
|
|
8319
8319
|
request.onreadystatechange = function () {
|
|
8320
8320
|
if (request.readyState === 4) {
|
|
@@ -8492,7 +8492,7 @@ var client = new error_tracker_BrowserClient({
|
|
|
8492
8492
|
return event;
|
|
8493
8493
|
},
|
|
8494
8494
|
environment: "production",
|
|
8495
|
-
release: "
|
|
8495
|
+
release: "b927fbc53de55016366277a4933b82a271d7aa9b",
|
|
8496
8496
|
sampleRate: 0.25,
|
|
8497
8497
|
autoSessionTracking: false,
|
|
8498
8498
|
// Integrations don't seem to work with Sentry: https://github.com/getsentry/sentry-javascript/issues/2541
|
|
@@ -8778,7 +8778,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !(c
|
|
|
8778
8778
|
|
|
8779
8779
|
|
|
8780
8780
|
|
|
8781
|
-
|
|
8782
8781
|
/**
|
|
8783
8782
|
* Frame Channel: Used for postMessage communication between iFrames.
|
|
8784
8783
|
* NOTE: iFrames must have the same domain - when postMessages are sent between
|
|
@@ -8843,7 +8842,6 @@ var FC = /*#__PURE__*/function (_Channel) {
|
|
|
8843
8842
|
parsedData = JSON.parse(event.data);
|
|
8844
8843
|
}
|
|
8845
8844
|
} catch (_unused) {
|
|
8846
|
-
(0,errors/* warn */.Z)("postMessage not sent as JSON.");
|
|
8847
8845
|
return;
|
|
8848
8846
|
}
|
|
8849
8847
|
|
|
@@ -8868,7 +8866,7 @@ var FC = /*#__PURE__*/function (_Channel) {
|
|
|
8868
8866
|
key: "constructObjectToSend",
|
|
8869
8867
|
value: function constructObjectToSend() {
|
|
8870
8868
|
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
8871
|
-
var payload = arguments.length > 1
|
|
8869
|
+
var payload = arguments.length > 1 ? arguments[1] : undefined;
|
|
8872
8870
|
var id = arguments.length > 2 ? arguments[2] : undefined;
|
|
8873
8871
|
var status = arguments.length > 3 ? arguments[3] : undefined;
|
|
8874
8872
|
// IE passes event message data as a string, so we normalize to string for all objects
|
|
@@ -9023,7 +9021,7 @@ var CE = /*#__PURE__*/function (_Channel) {
|
|
|
9023
9021
|
// (for all browsers)
|
|
9024
9022
|
return {
|
|
9025
9023
|
type: type || "",
|
|
9026
|
-
payload: payload
|
|
9024
|
+
payload: payload,
|
|
9027
9025
|
id: id,
|
|
9028
9026
|
status: status
|
|
9029
9027
|
};
|
|
@@ -9045,25 +9043,27 @@ var MessageService = /*#__PURE__*/function () {
|
|
|
9045
9043
|
function MessageService() {
|
|
9046
9044
|
(0,classCallCheck/* default */.Z)(this, MessageService);
|
|
9047
9045
|
|
|
9048
|
-
(0,defineProperty/* default */.Z)(this, "channels", {
|
|
9046
|
+
(0,defineProperty/* default */.Z)(this, "channels", {
|
|
9047
|
+
local: new CE()
|
|
9048
|
+
});
|
|
9049
9049
|
}
|
|
9050
9050
|
|
|
9051
9051
|
_createClass(MessageService, [{
|
|
9052
9052
|
key: "registerFrameChannel",
|
|
9053
9053
|
value: function registerFrameChannel(name, targetWindow, targetOrigin) {
|
|
9054
|
-
|
|
9055
|
-
|
|
9056
|
-
|
|
9057
|
-
}, {
|
|
9058
|
-
key: "registerLocalChannel",
|
|
9059
|
-
value: function registerLocalChannel() {
|
|
9060
|
-
this.channels.local = new CE();
|
|
9061
|
-
return this.channels.local;
|
|
9054
|
+
var frameChannel = new FC(name, targetWindow, targetOrigin);
|
|
9055
|
+
this.channels[name] = frameChannel;
|
|
9056
|
+
return frameChannel;
|
|
9062
9057
|
}
|
|
9063
9058
|
}, {
|
|
9064
9059
|
key: "unregisterChannel",
|
|
9065
9060
|
value: function unregisterChannel(name) {
|
|
9066
9061
|
var channel = this.channels[name];
|
|
9062
|
+
|
|
9063
|
+
if (!channel) {
|
|
9064
|
+
throw new errors/* AdaEmbedError */.S("Channel \"".concat(name, " not registered.\""));
|
|
9065
|
+
}
|
|
9066
|
+
|
|
9067
9067
|
channel.clearTimeoutsAndListeners();
|
|
9068
9068
|
delete this.channels[name];
|
|
9069
9069
|
}
|
|
@@ -9073,7 +9073,7 @@ var MessageService = /*#__PURE__*/function () {
|
|
|
9073
9073
|
var channel = this.channels[name];
|
|
9074
9074
|
|
|
9075
9075
|
if (!channel) {
|
|
9076
|
-
(0,errors/* warn */.Z)("
|
|
9076
|
+
(0,errors/* warn */.Z)("Channel \"".concat(name, "\" has not been registered. You may need to wait until app has finished initializing."));
|
|
9077
9077
|
return null;
|
|
9078
9078
|
}
|
|
9079
9079
|
|
|
@@ -9176,7 +9176,7 @@ function getEmbedURL(_ref) {
|
|
|
9176
9176
|
polyfillVersionString = "legacy";
|
|
9177
9177
|
}
|
|
9178
9178
|
|
|
9179
|
-
return concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "".concat(host, "/embed/")).call(_context7, polyfillVersionString, "/")).call(_context6, frameName, "/")).call(_context5, "
|
|
9179
|
+
return concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "".concat(host, "/embed/")).call(_context7, polyfillVersionString, "/")).call(_context6, frameName, "/")).call(_context5, "b927fbc", "/index.html");
|
|
9180
9180
|
}
|
|
9181
9181
|
/**
|
|
9182
9182
|
* Generate the Chat / API URL
|
|
@@ -9213,18 +9213,26 @@ function getURL(_ref2) {
|
|
|
9213
9213
|
}
|
|
9214
9214
|
|
|
9215
9215
|
if (includes_default()(_context17 = window.location.hostname).call(_context17, "localhost") || handle === "e2ereference") {
|
|
9216
|
-
var _context18,
|
|
9216
|
+
var _context18, _context23, _context24, _context25;
|
|
9217
9217
|
|
|
9218
9218
|
var host = window.location.hostname;
|
|
9219
9219
|
var domainName = includes_default()(_context18 = window.location.hostname).call(_context18, "localhost") ? "localhost" : "e2ereference";
|
|
9220
9220
|
|
|
9221
|
+
if (domainName === "localhost" && name === "chat") {
|
|
9222
|
+
var _context19, _context20, _context21, _context22;
|
|
9223
|
+
|
|
9224
|
+
// Chat should be on a different domain (even though the port is different).
|
|
9225
|
+
// We need this to test Embed+Chat behaviour when third-party cookies are disabled (incognito mode).
|
|
9226
|
+
return concat_default()(_context19 = concat_default()(_context20 = concat_default()(_context21 = concat_default()(_context22 = "".concat(window.location.protocol, "//")).call(_context22, handle, ".chat:8002/")).call(_context21, routeString)).call(_context20, questionSym)).call(_context19, queryString);
|
|
9227
|
+
}
|
|
9228
|
+
|
|
9221
9229
|
if (name === "api" || name === "chat") {
|
|
9222
9230
|
host += ":".concat(ports[domainName][name]);
|
|
9223
9231
|
} else {
|
|
9224
9232
|
host += ":".concat(ports[domainName].default);
|
|
9225
9233
|
}
|
|
9226
9234
|
|
|
9227
|
-
return concat_default()(
|
|
9235
|
+
return concat_default()(_context23 = concat_default()(_context24 = concat_default()(_context25 = "http://".concat(host, "/")).call(_context25, routeString)).call(_context24, questionSym)).call(_context23, queryString);
|
|
9228
9236
|
}
|
|
9229
9237
|
|
|
9230
9238
|
return prodUrl;
|
|
@@ -9317,159 +9325,833 @@ var actions = {
|
|
|
9317
9325
|
}
|
|
9318
9326
|
};
|
|
9319
9327
|
/* harmony default export */ var store_actions = (actions);
|
|
9320
|
-
;// CONCATENATED MODULE: ./src/
|
|
9328
|
+
;// CONCATENATED MODULE: ./src/common/constants/storage-keys.ts
|
|
9329
|
+
var CHATTER_TOKEN_STORAGE_KEY = "chatter";
|
|
9330
|
+
var CHATTER_CREATED_STORAGE_KEY = "ada-embed_chatter-created";
|
|
9331
|
+
var IN_LIVE_CHAT_STORAGE_KEY = "inLiveChat";
|
|
9332
|
+
var ZD_SESSION_STORAGE_KEY = "ada-embed_zd-session-id";
|
|
9333
|
+
var ZD_PREVIOUS_TAGS_STORAGE_KEY = "ada-embed_zd-previous-tags";
|
|
9334
|
+
/** @deprecated - Use CHATTER_TOKEN_STORAGE_KEY */
|
|
9321
9335
|
|
|
9336
|
+
var CHATTER_STORAGE_KEY = CHATTER_TOKEN_STORAGE_KEY;
|
|
9337
|
+
;// CONCATENATED MODULE: ./src/frames/lib/frame-fc.ts
|
|
9322
9338
|
|
|
9339
|
+
var frameName = null;
|
|
9340
|
+
/* harmony default export */ var frame_fc = (new FC(frameName, window.parent));
|
|
9341
|
+
;// CONCATENATED MODULE: ./src/frames/helpers/frame-init.ts
|
|
9323
9342
|
|
|
9324
9343
|
|
|
9325
9344
|
|
|
9326
9345
|
|
|
9346
|
+
function initializeFrame() {
|
|
9347
|
+
var waitForOtherFrames = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
9348
|
+
var initialState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
9327
9349
|
|
|
9350
|
+
if (!waitForOtherFrames) {
|
|
9351
|
+
return promise_default().resolve(true);
|
|
9352
|
+
}
|
|
9328
9353
|
|
|
9329
|
-
|
|
9354
|
+
return new (promise_default())(function (resolve) {
|
|
9355
|
+
var timeout;
|
|
9356
|
+
var handlerRef;
|
|
9357
|
+
|
|
9358
|
+
var initMessageHandler = function initMessageHandler(type) {
|
|
9359
|
+
if (type === ALL_FRAMES_LOADED) {
|
|
9360
|
+
frame_fc.removeEventListener(handlerRef);
|
|
9361
|
+
clearTimeout(timeout);
|
|
9362
|
+
resolve(true);
|
|
9363
|
+
}
|
|
9364
|
+
};
|
|
9330
9365
|
|
|
9331
|
-
|
|
9366
|
+
timeout = window.setTimeout(function () {
|
|
9367
|
+
frame_fc.removeEventListener(handlerRef);
|
|
9368
|
+
(0,errors/* warn */.Z)("".concat(null, " frame never received all frames loaded"));
|
|
9369
|
+
resolve(false);
|
|
9370
|
+
}, DEFAULT_CONNECTION_TIMEOUT);
|
|
9371
|
+
handlerRef = frame_fc.addEventListener(initMessageHandler);
|
|
9372
|
+
frame_fc.postMessage("".concat(null, "_INIT"), initialState);
|
|
9373
|
+
});
|
|
9374
|
+
}
|
|
9375
|
+
function addCustomStyles(styles, hasUICustomization) {
|
|
9376
|
+
if (!styles) {
|
|
9377
|
+
return;
|
|
9378
|
+
}
|
|
9332
9379
|
|
|
9380
|
+
if (!hasUICustomization) {
|
|
9381
|
+
warn("UI Customization is not available in your feature set.");
|
|
9382
|
+
return;
|
|
9383
|
+
}
|
|
9333
9384
|
|
|
9385
|
+
var styleSheet = document.createElement("style");
|
|
9386
|
+
styleSheet.type = "text/css";
|
|
9387
|
+
styleSheet.appendChild(document.createTextNode(styles)); // Append the stylesheet to the head of the document
|
|
9334
9388
|
|
|
9389
|
+
document.head.appendChild(styleSheet);
|
|
9390
|
+
}
|
|
9391
|
+
;// CONCATENATED MODULE: ./src/frames/lib/safe-storage/index.ts
|
|
9335
9392
|
|
|
9336
|
-
var mutations = function mutations(state, action) {
|
|
9337
|
-
switch (action.type) {
|
|
9338
|
-
case ActionTypes.TOGGLE_CHAT_TYPE:
|
|
9339
|
-
{
|
|
9340
|
-
var hasChatOpenedAfterProactiveMessagesShown = state.hasChatOpenedAfterProactiveMessagesShown;
|
|
9341
9393
|
|
|
9342
|
-
if (!state.isDrawerOpen && state.latestCampaignKey && !hasChatOpenedAfterProactiveMessagesShown) {
|
|
9343
|
-
hasChatOpenedAfterProactiveMessagesShown = true;
|
|
9344
|
-
}
|
|
9345
9394
|
|
|
9346
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
9347
|
-
isDrawerOpen: !state.isDrawerOpen,
|
|
9348
|
-
isIntroShown: false,
|
|
9349
|
-
drawerHasBeenOpened: true,
|
|
9350
|
-
unreadMessageCount: 0,
|
|
9351
|
-
hasChatOpenedAfterProactiveMessagesShown: hasChatOpenedAfterProactiveMessagesShown
|
|
9352
|
-
});
|
|
9353
|
-
}
|
|
9354
9395
|
|
|
9355
|
-
case ActionTypes.SET_STATE_TYPE:
|
|
9356
|
-
return _objectSpread(_objectSpread({}, state), action.payload);
|
|
9357
9396
|
|
|
9358
|
-
case ActionTypes.INCREMENT_MESSAGE_COUNT_TYPE:
|
|
9359
|
-
{
|
|
9360
|
-
var messages = action.payload.messages; // Filter out Proactive Messages
|
|
9361
9397
|
|
|
9362
|
-
|
|
9363
|
-
return !message.campaign_key;
|
|
9364
|
-
});
|
|
9398
|
+
var StorageTypes;
|
|
9365
9399
|
|
|
9366
|
-
|
|
9367
|
-
|
|
9368
|
-
|
|
9400
|
+
(function (StorageTypes) {
|
|
9401
|
+
StorageTypes["Local"] = "local";
|
|
9402
|
+
StorageTypes["Session"] = "session";
|
|
9403
|
+
})(StorageTypes || (StorageTypes = {}));
|
|
9404
|
+
|
|
9405
|
+
/**
|
|
9406
|
+
* local and session storage can throw exceptions when trying to access them
|
|
9407
|
+
* from the Window object and third-party cookies are disabled. SafeStorage
|
|
9408
|
+
* wraps common Storage methods in try catch blocks.
|
|
9409
|
+
*/
|
|
9410
|
+
var SafeStorage = /*#__PURE__*/function () {
|
|
9411
|
+
function SafeStorage(storageType) {
|
|
9412
|
+
(0,classCallCheck/* default */.Z)(this, SafeStorage);
|
|
9413
|
+
|
|
9414
|
+
(0,defineProperty/* default */.Z)(this, "storageType", void 0);
|
|
9415
|
+
|
|
9416
|
+
(0,defineProperty/* default */.Z)(this, "storage", null);
|
|
9417
|
+
|
|
9418
|
+
this.storageType = storageType;
|
|
9419
|
+
|
|
9420
|
+
try {
|
|
9421
|
+
this.storage = storageType === "local" ? window.localStorage : window.sessionStorage;
|
|
9422
|
+
} catch (e) {
|
|
9423
|
+
(0,errors/* warn */.Z)("".concat(this.storageType, "Storage is disabled. This is likely because your browser is blocking third-party cookies."));
|
|
9424
|
+
}
|
|
9425
|
+
} // eslint-disable-next-line class-methods-use-this
|
|
9426
|
+
|
|
9427
|
+
|
|
9428
|
+
_createClass(SafeStorage, [{
|
|
9429
|
+
key: "seralizeItem",
|
|
9430
|
+
value: function seralizeItem(value) {
|
|
9431
|
+
try {
|
|
9432
|
+
return stringify_default()(value);
|
|
9433
|
+
} catch (error) {
|
|
9434
|
+
(0,errors/* warn */.Z)("Attempt to seralize failed: ".concat(error));
|
|
9369
9435
|
}
|
|
9370
9436
|
|
|
9371
|
-
|
|
9372
|
-
|
|
9373
|
-
var newConnections = _objectSpread(_objectSpread({}, state.connections), action.payload);
|
|
9437
|
+
return null;
|
|
9438
|
+
} // eslint-disable-next-line class-methods-use-this
|
|
9374
9439
|
|
|
9375
|
-
|
|
9440
|
+
}, {
|
|
9441
|
+
key: "deserializeItem",
|
|
9442
|
+
value: function deserializeItem(value) {
|
|
9443
|
+
try {
|
|
9444
|
+
return JSON.parse(value);
|
|
9445
|
+
} catch (error) {
|
|
9446
|
+
(0,errors/* warn */.Z)("Attempt to deserialize failed: ".concat(error));
|
|
9447
|
+
}
|
|
9376
9448
|
|
|
9377
|
-
|
|
9378
|
-
|
|
9379
|
-
|
|
9380
|
-
|
|
9381
|
-
|
|
9382
|
-
|
|
9383
|
-
|
|
9384
|
-
|
|
9385
|
-
|
|
9386
|
-
});
|
|
9449
|
+
return null;
|
|
9450
|
+
}
|
|
9451
|
+
}, {
|
|
9452
|
+
key: "getItem",
|
|
9453
|
+
value: function getItem(key) {
|
|
9454
|
+
try {
|
|
9455
|
+
if (!this.storage) {
|
|
9456
|
+
throw new errors/* AdaEmbedError */.S("`storage` is null");
|
|
9457
|
+
}
|
|
9387
9458
|
|
|
9388
|
-
|
|
9389
|
-
|
|
9390
|
-
|
|
9391
|
-
|
|
9392
|
-
|
|
9393
|
-
|
|
9394
|
-
|
|
9395
|
-
|
|
9459
|
+
return this.deserializeItem(this.storage.getItem(key));
|
|
9460
|
+
} catch (e) {
|
|
9461
|
+
(0,errors/* warn */.Z)("Cannot getItem from ".concat(this.storageType, "Storage."));
|
|
9462
|
+
return null;
|
|
9463
|
+
}
|
|
9464
|
+
}
|
|
9465
|
+
}, {
|
|
9466
|
+
key: "setItem",
|
|
9467
|
+
value: function setItem(key, value) {
|
|
9468
|
+
try {
|
|
9469
|
+
if (!this.storage) {
|
|
9470
|
+
throw new errors/* AdaEmbedError */.S("`storage` is null");
|
|
9396
9471
|
}
|
|
9397
9472
|
|
|
9398
|
-
|
|
9399
|
-
|
|
9400
|
-
|
|
9401
|
-
});
|
|
9473
|
+
this.storage.setItem(key, this.seralizeItem(value));
|
|
9474
|
+
} catch (e) {
|
|
9475
|
+
(0,errors/* warn */.Z)("Cannot setItem in ".concat(this.storageType, "Storage."));
|
|
9402
9476
|
}
|
|
9477
|
+
}
|
|
9478
|
+
}, {
|
|
9479
|
+
key: "removeItem",
|
|
9480
|
+
value: function removeItem(key) {
|
|
9481
|
+
try {
|
|
9482
|
+
if (!this.storage) {
|
|
9483
|
+
throw new errors/* AdaEmbedError */.S("`storage` is null");
|
|
9484
|
+
}
|
|
9403
9485
|
|
|
9404
|
-
|
|
9405
|
-
|
|
9406
|
-
|
|
9407
|
-
}
|
|
9486
|
+
this.storage.removeItem(key);
|
|
9487
|
+
} catch (e) {
|
|
9488
|
+
(0,errors/* warn */.Z)("Cannot removeItem from ".concat(this.storageType, "Storage."));
|
|
9489
|
+
}
|
|
9490
|
+
}
|
|
9491
|
+
}]);
|
|
9408
9492
|
|
|
9409
|
-
|
|
9410
|
-
|
|
9411
|
-
var
|
|
9412
|
-
|
|
9413
|
-
|
|
9414
|
-
return false;
|
|
9415
|
-
}
|
|
9493
|
+
return SafeStorage;
|
|
9494
|
+
}();
|
|
9495
|
+
var safeLocalStorage = new SafeStorage(StorageTypes.Local);
|
|
9496
|
+
var safeSessionStorage = new SafeStorage(StorageTypes.Session);
|
|
9497
|
+
;// CONCATENATED MODULE: ./src/frames/helpers/storage/index.ts
|
|
9416
9498
|
|
|
9417
|
-
|
|
9418
|
-
|
|
9419
|
-
|
|
9420
|
-
|
|
9421
|
-
|
|
9422
|
-
|
|
9499
|
+
var PERSISTENCE_NORMAL = "normal";
|
|
9500
|
+
var PERSISTENCE_SESSION = "session";
|
|
9501
|
+
/**
|
|
9502
|
+
* Retrieves items from local or session storage, depending on the client's
|
|
9503
|
+
* persistence setting. If privateMode is set, it returns null.
|
|
9504
|
+
*/
|
|
9423
9505
|
|
|
9424
|
-
|
|
9425
|
-
|
|
9426
|
-
|
|
9427
|
-
if (
|
|
9506
|
+
function retrieveStorage(key, client, privateMode) {
|
|
9507
|
+
var persistence = client.persistence;
|
|
9508
|
+
|
|
9509
|
+
if (privateMode) {
|
|
9428
9510
|
return null;
|
|
9429
9511
|
}
|
|
9430
9512
|
|
|
9431
|
-
|
|
9432
|
-
|
|
9433
|
-
|
|
9434
|
-
if (onClickHandler) {
|
|
9435
|
-
onClickHandler();
|
|
9436
|
-
}
|
|
9513
|
+
if (persistence === PERSISTENCE_NORMAL) {
|
|
9514
|
+
return safeLocalStorage.getItem(key);
|
|
9515
|
+
}
|
|
9437
9516
|
|
|
9438
|
-
|
|
9439
|
-
|
|
9517
|
+
if (persistence === PERSISTENCE_SESSION) {
|
|
9518
|
+
return safeSessionStorage.getItem(key);
|
|
9519
|
+
}
|
|
9440
9520
|
|
|
9441
|
-
return
|
|
9521
|
+
return null;
|
|
9442
9522
|
}
|
|
9523
|
+
;// CONCATENATED MODULE: ./src/frames/lib/store-proxy.ts
|
|
9443
9524
|
|
|
9444
|
-
|
|
9445
|
-
|
|
9446
|
-
|
|
9525
|
+
|
|
9526
|
+
var store = {
|
|
9527
|
+
get: function get(key) {
|
|
9528
|
+
return frame_fc.fetch(GET_EVENT, GET_RESPONSE_EVENT, {
|
|
9529
|
+
key: key
|
|
9530
|
+
});
|
|
9531
|
+
},
|
|
9532
|
+
getState: function getState() {
|
|
9533
|
+
return frame_fc.fetch(GET_STATE_EVENT, GET_STATE_RESPONSE_EVENT);
|
|
9534
|
+
},
|
|
9535
|
+
dispatch: function dispatch(actionKey, payload) {
|
|
9536
|
+
return frame_fc.fetch(DISPATCH_EVENT, DISPATCH_RESPONSE_EVENT, {
|
|
9537
|
+
actionKey: actionKey,
|
|
9538
|
+
payload: payload
|
|
9539
|
+
});
|
|
9540
|
+
},
|
|
9541
|
+
subscribe: function subscribe(callback) {
|
|
9542
|
+
frame_fc.addEventListener(function (type, payload) {
|
|
9543
|
+
if (type === STATE_CHANGE_EVENT) {
|
|
9544
|
+
callback(payload);
|
|
9545
|
+
}
|
|
9546
|
+
});
|
|
9447
9547
|
}
|
|
9548
|
+
};
|
|
9549
|
+
;// CONCATENATED MODULE: ./node_modules/@sentry/core/esm/sdk.js
|
|
9550
|
+
|
|
9448
9551
|
|
|
9449
|
-
return "default";
|
|
9450
|
-
}
|
|
9451
9552
|
/**
|
|
9452
|
-
*
|
|
9553
|
+
* Internal function to create a new SDK client instance. The client is
|
|
9554
|
+
* installed and then bound to the current scope.
|
|
9555
|
+
*
|
|
9556
|
+
* @param clientClass The client class to instantiate.
|
|
9557
|
+
* @param options Options to pass to the client.
|
|
9453
9558
|
*/
|
|
9559
|
+
function initAndBind(clientClass, options) {
|
|
9560
|
+
var _a;
|
|
9561
|
+
if (options.debug === true) {
|
|
9562
|
+
logger_logger.enable();
|
|
9563
|
+
}
|
|
9564
|
+
var hub = hub_getCurrentHub();
|
|
9565
|
+
(_a = hub.getScope()) === null || _a === void 0 ? void 0 : _a.update(options.initialScope);
|
|
9566
|
+
var client = new clientClass(options);
|
|
9567
|
+
hub.bindClient(client);
|
|
9568
|
+
}
|
|
9569
|
+
//# sourceMappingURL=sdk.js.map
|
|
9570
|
+
;// CONCATENATED MODULE: ./node_modules/@sentry/browser/esm/sdk.js
|
|
9454
9571
|
|
|
9455
9572
|
|
|
9456
|
-
function notificationPermListener(notificationPermChangeHandler) {
|
|
9457
|
-
if (!("permissions" in navigator)) {
|
|
9458
|
-
return;
|
|
9459
|
-
}
|
|
9460
9573
|
|
|
9461
|
-
|
|
9462
|
-
|
|
9463
|
-
|
|
9464
|
-
|
|
9465
|
-
|
|
9466
|
-
|
|
9467
|
-
|
|
9468
|
-
|
|
9469
|
-
|
|
9574
|
+
|
|
9575
|
+
|
|
9576
|
+
|
|
9577
|
+
var defaultIntegrations = [
|
|
9578
|
+
new InboundFilters(),
|
|
9579
|
+
new FunctionToString(),
|
|
9580
|
+
new TryCatch(),
|
|
9581
|
+
new Breadcrumbs(),
|
|
9582
|
+
new GlobalHandlers(),
|
|
9583
|
+
new LinkedErrors(),
|
|
9584
|
+
new Dedupe(),
|
|
9585
|
+
new UserAgent(),
|
|
9586
|
+
];
|
|
9587
|
+
/**
|
|
9588
|
+
* The Sentry Browser SDK Client.
|
|
9589
|
+
*
|
|
9590
|
+
* To use this SDK, call the {@link init} function as early as possible when
|
|
9591
|
+
* loading the web page. To set context information or send manual events, use
|
|
9592
|
+
* the provided methods.
|
|
9593
|
+
*
|
|
9594
|
+
* @example
|
|
9595
|
+
*
|
|
9596
|
+
* ```
|
|
9597
|
+
*
|
|
9598
|
+
* import { init } from '@sentry/browser';
|
|
9599
|
+
*
|
|
9600
|
+
* init({
|
|
9601
|
+
* dsn: '__DSN__',
|
|
9602
|
+
* // ...
|
|
9603
|
+
* });
|
|
9604
|
+
* ```
|
|
9605
|
+
*
|
|
9606
|
+
* @example
|
|
9607
|
+
* ```
|
|
9608
|
+
*
|
|
9609
|
+
* import { configureScope } from '@sentry/browser';
|
|
9610
|
+
* configureScope((scope: Scope) => {
|
|
9611
|
+
* scope.setExtra({ battery: 0.7 });
|
|
9612
|
+
* scope.setTag({ user_mode: 'admin' });
|
|
9613
|
+
* scope.setUser({ id: '4711' });
|
|
9614
|
+
* });
|
|
9615
|
+
* ```
|
|
9616
|
+
*
|
|
9617
|
+
* @example
|
|
9618
|
+
* ```
|
|
9619
|
+
*
|
|
9620
|
+
* import { addBreadcrumb } from '@sentry/browser';
|
|
9621
|
+
* addBreadcrumb({
|
|
9622
|
+
* message: 'My Breadcrumb',
|
|
9623
|
+
* // ...
|
|
9624
|
+
* });
|
|
9625
|
+
* ```
|
|
9626
|
+
*
|
|
9627
|
+
* @example
|
|
9628
|
+
*
|
|
9629
|
+
* ```
|
|
9630
|
+
*
|
|
9631
|
+
* import * as Sentry from '@sentry/browser';
|
|
9632
|
+
* Sentry.captureMessage('Hello, world!');
|
|
9633
|
+
* Sentry.captureException(new Error('Good bye'));
|
|
9634
|
+
* Sentry.captureEvent({
|
|
9635
|
+
* message: 'Manual',
|
|
9636
|
+
* stacktrace: [
|
|
9637
|
+
* // ...
|
|
9638
|
+
* ],
|
|
9639
|
+
* });
|
|
9640
|
+
* ```
|
|
9641
|
+
*
|
|
9642
|
+
* @see {@link BrowserOptions} for documentation on configuration options.
|
|
9643
|
+
*/
|
|
9644
|
+
function init(options) {
|
|
9645
|
+
if (options === void 0) { options = {}; }
|
|
9646
|
+
if (options.defaultIntegrations === undefined) {
|
|
9647
|
+
options.defaultIntegrations = defaultIntegrations;
|
|
9648
|
+
}
|
|
9649
|
+
if (options.release === undefined) {
|
|
9650
|
+
var window_1 = (0,misc/* getGlobalObject */.Rf)();
|
|
9651
|
+
// This supports the variable that sentry-webpack-plugin injects
|
|
9652
|
+
if (window_1.SENTRY_RELEASE && window_1.SENTRY_RELEASE.id) {
|
|
9653
|
+
options.release = window_1.SENTRY_RELEASE.id;
|
|
9654
|
+
}
|
|
9655
|
+
}
|
|
9656
|
+
if (options.autoSessionTracking === undefined) {
|
|
9657
|
+
options.autoSessionTracking = true;
|
|
9658
|
+
}
|
|
9659
|
+
initAndBind(BrowserClient, options);
|
|
9660
|
+
if (options.autoSessionTracking) {
|
|
9661
|
+
startSessionTracking();
|
|
9662
|
+
}
|
|
9663
|
+
}
|
|
9664
|
+
/**
|
|
9665
|
+
* Present the user with a report dialog.
|
|
9666
|
+
*
|
|
9667
|
+
* @param options Everything is optional, we try to fetch all info need from the global scope.
|
|
9668
|
+
*/
|
|
9669
|
+
function showReportDialog(options) {
|
|
9670
|
+
if (options === void 0) { options = {}; }
|
|
9671
|
+
var hub = getCurrentHub();
|
|
9672
|
+
var scope = hub.getScope();
|
|
9673
|
+
if (scope) {
|
|
9674
|
+
options.user = __assign(__assign({}, scope.getUser()), options.user);
|
|
9675
|
+
}
|
|
9676
|
+
if (!options.eventId) {
|
|
9677
|
+
options.eventId = hub.lastEventId();
|
|
9678
|
+
}
|
|
9679
|
+
var client = hub.getClient();
|
|
9680
|
+
if (client) {
|
|
9681
|
+
client.showReportDialog(options);
|
|
9682
|
+
}
|
|
9683
|
+
}
|
|
9684
|
+
/**
|
|
9685
|
+
* This is the getter for lastEventId.
|
|
9686
|
+
*
|
|
9687
|
+
* @returns The last event id of a captured event.
|
|
9688
|
+
*/
|
|
9689
|
+
function lastEventId() {
|
|
9690
|
+
return getCurrentHub().lastEventId();
|
|
9691
|
+
}
|
|
9692
|
+
/**
|
|
9693
|
+
* This function is here to be API compatible with the loader.
|
|
9694
|
+
* @hidden
|
|
9695
|
+
*/
|
|
9696
|
+
function forceLoad() {
|
|
9697
|
+
// Noop
|
|
9698
|
+
}
|
|
9699
|
+
/**
|
|
9700
|
+
* This function is here to be API compatible with the loader.
|
|
9701
|
+
* @hidden
|
|
9702
|
+
*/
|
|
9703
|
+
function onLoad(callback) {
|
|
9704
|
+
callback();
|
|
9705
|
+
}
|
|
9706
|
+
/**
|
|
9707
|
+
* Call `flush()` on the current client, if there is one. See {@link Client.flush}.
|
|
9708
|
+
*
|
|
9709
|
+
* @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause
|
|
9710
|
+
* the client to wait until all events are sent before resolving the promise.
|
|
9711
|
+
* @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it
|
|
9712
|
+
* doesn't (or if there's no client defined).
|
|
9713
|
+
*/
|
|
9714
|
+
function flush(timeout) {
|
|
9715
|
+
var client = getCurrentHub().getClient();
|
|
9716
|
+
if (client) {
|
|
9717
|
+
return client.flush(timeout);
|
|
9718
|
+
}
|
|
9719
|
+
logger.warn('Cannot flush events. No client defined.');
|
|
9720
|
+
return SyncPromise.resolve(false);
|
|
9721
|
+
}
|
|
9722
|
+
/**
|
|
9723
|
+
* Call `close()` on the current client, if there is one. See {@link Client.close}.
|
|
9724
|
+
*
|
|
9725
|
+
* @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this
|
|
9726
|
+
* parameter will cause the client to wait until all events are sent before disabling itself.
|
|
9727
|
+
* @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it
|
|
9728
|
+
* doesn't (or if there's no client defined).
|
|
9729
|
+
*/
|
|
9730
|
+
function sdk_close(timeout) {
|
|
9731
|
+
var client = getCurrentHub().getClient();
|
|
9732
|
+
if (client) {
|
|
9733
|
+
return client.close(timeout);
|
|
9734
|
+
}
|
|
9735
|
+
logger.warn('Cannot flush events and disable SDK. No client defined.');
|
|
9736
|
+
return SyncPromise.resolve(false);
|
|
9737
|
+
}
|
|
9738
|
+
/**
|
|
9739
|
+
* Wrap code within a try/catch block so the SDK is able to capture errors.
|
|
9740
|
+
*
|
|
9741
|
+
* @param fn A function to wrap.
|
|
9742
|
+
*
|
|
9743
|
+
* @returns The result of wrapped function call.
|
|
9744
|
+
*/
|
|
9745
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9746
|
+
function sdk_wrap(fn) {
|
|
9747
|
+
return internalWrap(fn)();
|
|
9748
|
+
}
|
|
9749
|
+
/**
|
|
9750
|
+
* Enable automatic Session Tracking for the initial page load.
|
|
9751
|
+
*/
|
|
9752
|
+
function startSessionTracking() {
|
|
9753
|
+
var window = (0,misc/* getGlobalObject */.Rf)();
|
|
9754
|
+
var document = window.document;
|
|
9755
|
+
if (typeof document === 'undefined') {
|
|
9756
|
+
logger_logger.warn('Session tracking in non-browser environment with @sentry/browser is not supported.');
|
|
9757
|
+
return;
|
|
9758
|
+
}
|
|
9759
|
+
var hub = hub_getCurrentHub();
|
|
9760
|
+
// The only way for this to be false is for there to be a version mismatch between @sentry/browser (>= 6.0.0) and
|
|
9761
|
+
// @sentry/hub (< 5.27.0). In the simple case, there won't ever be such a mismatch, because the two packages are
|
|
9762
|
+
// pinned at the same version in package.json, but there are edge cases where it's possible. See
|
|
9763
|
+
// https://github.com/getsentry/sentry-javascript/issues/3207 and
|
|
9764
|
+
// https://github.com/getsentry/sentry-javascript/issues/3234 and
|
|
9765
|
+
// https://github.com/getsentry/sentry-javascript/issues/3278.
|
|
9766
|
+
if (typeof hub.startSession !== 'function' || typeof hub.captureSession !== 'function') {
|
|
9767
|
+
return;
|
|
9768
|
+
}
|
|
9769
|
+
// The session duration for browser sessions does not track a meaningful
|
|
9770
|
+
// concept that can be used as a metric.
|
|
9771
|
+
// Automatically captured sessions are akin to page views, and thus we
|
|
9772
|
+
// discard their duration.
|
|
9773
|
+
hub.startSession({ ignoreDuration: true });
|
|
9774
|
+
hub.captureSession();
|
|
9775
|
+
// We want to create a session for every navigation as well
|
|
9776
|
+
addInstrumentationHandler({
|
|
9777
|
+
callback: function (_a) {
|
|
9778
|
+
var from = _a.from, to = _a.to;
|
|
9779
|
+
// Don't create an additional session for the initial route or if the location did not change
|
|
9780
|
+
if (from === undefined || from === to) {
|
|
9781
|
+
return;
|
|
9782
|
+
}
|
|
9783
|
+
hub.startSession({ ignoreDuration: true });
|
|
9784
|
+
hub.captureSession();
|
|
9785
|
+
},
|
|
9786
|
+
type: 'history',
|
|
9787
|
+
});
|
|
9788
|
+
}
|
|
9789
|
+
//# sourceMappingURL=sdk.js.map
|
|
9790
|
+
;// CONCATENATED MODULE: ./src/frames/lib/error-tracker.ts
|
|
9791
|
+
var _window$location$host;
|
|
9792
|
+
|
|
9793
|
+
|
|
9794
|
+
|
|
9795
|
+
var IGNORED_ERRORS = [// This error most likely comes from a browser extension
|
|
9796
|
+
/ceCurrentVideo\.currentTime/];
|
|
9797
|
+
init({
|
|
9798
|
+
dsn: null,
|
|
9799
|
+
environment: "production",
|
|
9800
|
+
release: "b927fbc53de55016366277a4933b82a271d7aa9b",
|
|
9801
|
+
ignoreErrors: IGNORED_ERRORS,
|
|
9802
|
+
tracesSampleRate: 0.1,
|
|
9803
|
+
autoSessionTracking: false
|
|
9804
|
+
});
|
|
9805
|
+
setTag("client", (_window$location$host = window.location.hostname) === null || _window$location$host === void 0 ? void 0 : _window$location$host.split(".")[0]);
|
|
9806
|
+
setTag("Embed2 Component", null);
|
|
9807
|
+
var error_tracker_errorTracker = {
|
|
9808
|
+
trackException: function trackException(error) {
|
|
9809
|
+
(0,errors/* warn */.Z)(error.message);
|
|
9810
|
+
captureException(error);
|
|
9811
|
+
},
|
|
9812
|
+
addBreadCrumb: function addBreadCrumb(category, message, data) {
|
|
9813
|
+
var level = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Severity.Info;
|
|
9814
|
+
addBreadcrumb({
|
|
9815
|
+
category: category,
|
|
9816
|
+
message: message,
|
|
9817
|
+
data: data,
|
|
9818
|
+
level: level
|
|
9819
|
+
});
|
|
9820
|
+
}
|
|
9821
|
+
};
|
|
9822
|
+
/* harmony default export */ var lib_error_tracker = ((/* unused pure expression or super */ null && (error_tracker_errorTracker)));
|
|
9823
|
+
;// CONCATENATED MODULE: ./src/frames/components/x-storage/index.ts
|
|
9824
|
+
|
|
9825
|
+
|
|
9826
|
+
|
|
9827
|
+
|
|
9828
|
+
|
|
9829
|
+
|
|
9830
|
+
|
|
9831
|
+
|
|
9832
|
+
|
|
9833
|
+
|
|
9834
|
+
|
|
9835
|
+
var LIVE_CHAT_PENDING_STORAGE_KEY = "liveChatPending";
|
|
9836
|
+
var IS_DRAWER_OPEN_STORAGE_KEY = "ada-embed_is-drawer-open";
|
|
9837
|
+
var lastDrawerState;
|
|
9838
|
+
/**
|
|
9839
|
+
* NOTE: If you import this file into any other file
|
|
9840
|
+
* it will trigger the init() function below - may cause errors!
|
|
9841
|
+
*/
|
|
9842
|
+
|
|
9843
|
+
/**
|
|
9844
|
+
* Auto-opens the chat door if crossWindowPersistence is one, the chatter is in
|
|
9845
|
+
* a live chat, and if the drawer was previously opened.
|
|
9846
|
+
*/
|
|
9847
|
+
|
|
9848
|
+
function setIsDrawerOpen() {
|
|
9849
|
+
return _setIsDrawerOpen.apply(this, arguments);
|
|
9850
|
+
}
|
|
9851
|
+
/**
|
|
9852
|
+
* Retrieves the chatter token from storage.
|
|
9853
|
+
*/
|
|
9854
|
+
|
|
9855
|
+
function _setIsDrawerOpen() {
|
|
9856
|
+
_setIsDrawerOpen = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/regenerator_default().mark(function _callee2() {
|
|
9857
|
+
var _yield$store$getState, crossWindowPersistence, client, privateMode, isDrawerOpen, liveChatPending, inLiveChat, liveChatActive;
|
|
9858
|
+
|
|
9859
|
+
return regenerator_default().wrap(function _callee2$(_context2) {
|
|
9860
|
+
while (1) {
|
|
9861
|
+
switch (_context2.prev = _context2.next) {
|
|
9862
|
+
case 0:
|
|
9863
|
+
_context2.next = 2;
|
|
9864
|
+
return store.getState();
|
|
9865
|
+
|
|
9866
|
+
case 2:
|
|
9867
|
+
_yield$store$getState = _context2.sent;
|
|
9868
|
+
crossWindowPersistence = _yield$store$getState.crossWindowPersistence;
|
|
9869
|
+
client = _yield$store$getState.client;
|
|
9870
|
+
privateMode = _yield$store$getState.privateMode;
|
|
9871
|
+
isDrawerOpen = safeSessionStorage.getItem(IS_DRAWER_OPEN_STORAGE_KEY);
|
|
9872
|
+
liveChatPending = retrieveStorage(LIVE_CHAT_PENDING_STORAGE_KEY, client, privateMode);
|
|
9873
|
+
inLiveChat = retrieveStorage(IN_LIVE_CHAT_STORAGE_KEY, client, privateMode);
|
|
9874
|
+
liveChatActive = inLiveChat || liveChatPending;
|
|
9875
|
+
|
|
9876
|
+
if (crossWindowPersistence && isDrawerOpen && liveChatActive) {
|
|
9877
|
+
store.dispatch(ActionCreators.TOGGLE_CHAT_ACTION);
|
|
9878
|
+
}
|
|
9879
|
+
|
|
9880
|
+
case 11:
|
|
9881
|
+
case "end":
|
|
9882
|
+
return _context2.stop();
|
|
9883
|
+
}
|
|
9884
|
+
}
|
|
9885
|
+
}, _callee2);
|
|
9886
|
+
}));
|
|
9887
|
+
return _setIsDrawerOpen.apply(this, arguments);
|
|
9888
|
+
}
|
|
9889
|
+
|
|
9890
|
+
function getChatterFromStorage() {
|
|
9891
|
+
return _getChatterFromStorage.apply(this, arguments);
|
|
9892
|
+
}
|
|
9893
|
+
/**
|
|
9894
|
+
* Initialization
|
|
9895
|
+
*/
|
|
9896
|
+
|
|
9897
|
+
|
|
9898
|
+
function _getChatterFromStorage() {
|
|
9899
|
+
_getChatterFromStorage = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/regenerator_default().mark(function _callee3() {
|
|
9900
|
+
var _yield$store$getState2, privateMode, client;
|
|
9901
|
+
|
|
9902
|
+
return regenerator_default().wrap(function _callee3$(_context3) {
|
|
9903
|
+
while (1) {
|
|
9904
|
+
switch (_context3.prev = _context3.next) {
|
|
9905
|
+
case 0:
|
|
9906
|
+
_context3.next = 2;
|
|
9907
|
+
return store.getState();
|
|
9908
|
+
|
|
9909
|
+
case 2:
|
|
9910
|
+
_yield$store$getState2 = _context3.sent;
|
|
9911
|
+
privateMode = _yield$store$getState2.privateMode;
|
|
9912
|
+
client = _yield$store$getState2.client;
|
|
9913
|
+
return _context3.abrupt("return", retrieveStorage(CHATTER_STORAGE_KEY, client, Boolean(privateMode)));
|
|
9914
|
+
|
|
9915
|
+
case 6:
|
|
9916
|
+
case "end":
|
|
9917
|
+
return _context3.stop();
|
|
9918
|
+
}
|
|
9919
|
+
}
|
|
9920
|
+
}, _callee3);
|
|
9921
|
+
}));
|
|
9922
|
+
return _getChatterFromStorage.apply(this, arguments);
|
|
9923
|
+
}
|
|
9924
|
+
|
|
9925
|
+
(0,asyncToGenerator/* default */.Z)( /*#__PURE__*/regenerator_default().mark(function _callee() {
|
|
9926
|
+
var chatterFromStorage, frameInitialized;
|
|
9927
|
+
return regenerator_default().wrap(function _callee$(_context) {
|
|
9928
|
+
while (1) {
|
|
9929
|
+
switch (_context.prev = _context.next) {
|
|
9930
|
+
case 0:
|
|
9931
|
+
_context.next = 2;
|
|
9932
|
+
return getChatterFromStorage();
|
|
9933
|
+
|
|
9934
|
+
case 2:
|
|
9935
|
+
chatterFromStorage = _context.sent;
|
|
9936
|
+
_context.next = 5;
|
|
9937
|
+
return initializeFrame(true, {
|
|
9938
|
+
chatterToken: chatterFromStorage || undefined
|
|
9939
|
+
});
|
|
9940
|
+
|
|
9941
|
+
case 5:
|
|
9942
|
+
frameInitialized = _context.sent;
|
|
9943
|
+
|
|
9944
|
+
if (frameInitialized) {
|
|
9945
|
+
_context.next = 8;
|
|
9946
|
+
break;
|
|
9947
|
+
}
|
|
9948
|
+
|
|
9949
|
+
return _context.abrupt("return");
|
|
9950
|
+
|
|
9951
|
+
case 8:
|
|
9952
|
+
setIsDrawerOpen();
|
|
9953
|
+
/**
|
|
9954
|
+
* Listen for FC events
|
|
9955
|
+
*/
|
|
9956
|
+
|
|
9957
|
+
frame_fc.addEventListener(function (type) {
|
|
9958
|
+
switch (type) {
|
|
9959
|
+
case DELETE_HISTORY_EVENT:
|
|
9960
|
+
{
|
|
9961
|
+
safeLocalStorage.removeItem(CHATTER_STORAGE_KEY);
|
|
9962
|
+
safeSessionStorage.removeItem(CHATTER_STORAGE_KEY);
|
|
9963
|
+
safeLocalStorage.removeItem(IN_LIVE_CHAT_STORAGE_KEY);
|
|
9964
|
+
safeSessionStorage.removeItem(IN_LIVE_CHAT_STORAGE_KEY);
|
|
9965
|
+
break;
|
|
9966
|
+
}
|
|
9967
|
+
|
|
9968
|
+
default:
|
|
9969
|
+
break;
|
|
9970
|
+
}
|
|
9971
|
+
});
|
|
9972
|
+
/**
|
|
9973
|
+
* Listen for store changes
|
|
9974
|
+
*/
|
|
9975
|
+
|
|
9976
|
+
store.subscribe(function (state) {
|
|
9977
|
+
/**
|
|
9978
|
+
* Store isDrawerOpen state in sessionStorage if crossWindowPersistence is enabled
|
|
9979
|
+
*/
|
|
9980
|
+
if (state.isDrawerOpen !== lastDrawerState && state.crossWindowPersistence) {
|
|
9981
|
+
safeSessionStorage.setItem(IS_DRAWER_OPEN_STORAGE_KEY, state.isDrawerOpen);
|
|
9982
|
+
}
|
|
9983
|
+
});
|
|
9984
|
+
|
|
9985
|
+
case 11:
|
|
9986
|
+
case "end":
|
|
9987
|
+
return _context.stop();
|
|
9988
|
+
}
|
|
9989
|
+
}
|
|
9990
|
+
}, _callee);
|
|
9991
|
+
}))();
|
|
9992
|
+
;// CONCATENATED MODULE: ./src/client/store/mutations/index.ts
|
|
9993
|
+
|
|
9994
|
+
|
|
9995
|
+
|
|
9996
|
+
|
|
9997
|
+
|
|
9998
|
+
|
|
9999
|
+
|
|
10000
|
+
|
|
10001
|
+
function ownKeys(object, enumerableOnly) { var keys = keys_default()(object); if ((get_own_property_symbols_default())) { var symbols = get_own_property_symbols_default()(object); if (enumerableOnly) { symbols = filter_default()(symbols).call(symbols, function (sym) { return get_own_property_descriptor_default()(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
10002
|
+
|
|
10003
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,defineProperty/* default */.Z)(target, key, source[key]); }); } else if ((get_own_property_descriptors_default())) { Object.defineProperties(target, get_own_property_descriptors_default()(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, get_own_property_descriptor_default()(source, key)); }); } } return target; }
|
|
10004
|
+
|
|
10005
|
+
|
|
10006
|
+
|
|
10007
|
+
|
|
10008
|
+
|
|
10009
|
+
|
|
10010
|
+
var mutations = function mutations(state, action) {
|
|
10011
|
+
switch (action.type) {
|
|
10012
|
+
case ActionTypes.TOGGLE_CHAT_TYPE:
|
|
10013
|
+
{
|
|
10014
|
+
var hasChatOpenedAfterProactiveMessagesShown = state.hasChatOpenedAfterProactiveMessagesShown;
|
|
10015
|
+
|
|
10016
|
+
if (!state.isDrawerOpen && state.latestCampaignKey && !hasChatOpenedAfterProactiveMessagesShown) {
|
|
10017
|
+
hasChatOpenedAfterProactiveMessagesShown = true;
|
|
10018
|
+
}
|
|
10019
|
+
|
|
10020
|
+
safeLocalStorage.setItem(IS_DRAWER_OPEN_STORAGE_KEY, !state.isDrawerOpen);
|
|
10021
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
10022
|
+
isDrawerOpen: !state.isDrawerOpen,
|
|
10023
|
+
isIntroShown: false,
|
|
10024
|
+
drawerHasBeenOpened: true,
|
|
10025
|
+
unreadMessageCount: 0,
|
|
10026
|
+
hasChatOpenedAfterProactiveMessagesShown: hasChatOpenedAfterProactiveMessagesShown
|
|
10027
|
+
});
|
|
10028
|
+
}
|
|
10029
|
+
|
|
10030
|
+
case ActionTypes.SET_STATE_TYPE:
|
|
10031
|
+
return _objectSpread(_objectSpread({}, state), action.payload);
|
|
10032
|
+
|
|
10033
|
+
case ActionTypes.INCREMENT_MESSAGE_COUNT_TYPE:
|
|
10034
|
+
{
|
|
10035
|
+
var messages = action.payload.messages; // Filter out Proactive Messages
|
|
10036
|
+
|
|
10037
|
+
var nonProactive = filter_default()(messages).call(messages, function (message) {
|
|
10038
|
+
return !message.campaign_key;
|
|
10039
|
+
});
|
|
10040
|
+
|
|
10041
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
10042
|
+
unreadMessageCount: nonProactive.length
|
|
10043
|
+
});
|
|
10044
|
+
}
|
|
10045
|
+
|
|
10046
|
+
case ActionTypes.SET_CONNECTION_STATE_TYPE:
|
|
10047
|
+
{
|
|
10048
|
+
var newConnections = _objectSpread(_objectSpread({}, state.connections), action.payload);
|
|
10049
|
+
|
|
10050
|
+
var connectionValues = values_default()(newConnections);
|
|
10051
|
+
|
|
10052
|
+
var appConnectionState;
|
|
10053
|
+
var done = connectionValues.every(function (connectionState) {
|
|
10054
|
+
return connectionState === ConnectionState.Done;
|
|
10055
|
+
});
|
|
10056
|
+
var loading = connectionValues.some(function (connectionState) {
|
|
10057
|
+
return connectionState === ConnectionState.Done;
|
|
10058
|
+
});
|
|
10059
|
+
var failure = connectionValues.some(function (connectionState) {
|
|
10060
|
+
return connectionState === ConnectionState.Failure;
|
|
10061
|
+
});
|
|
10062
|
+
|
|
10063
|
+
if (done) {
|
|
10064
|
+
appConnectionState = ConnectionState.Done;
|
|
10065
|
+
} else if (failure) {
|
|
10066
|
+
appConnectionState = ConnectionState.Failure;
|
|
10067
|
+
} else if (loading) {
|
|
10068
|
+
appConnectionState = ConnectionState.Loading;
|
|
10069
|
+
} else {
|
|
10070
|
+
appConnectionState = ConnectionState.Uninitiated;
|
|
10071
|
+
}
|
|
10072
|
+
|
|
10073
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
10074
|
+
connections: newConnections,
|
|
10075
|
+
appConnectionState: appConnectionState
|
|
10076
|
+
});
|
|
10077
|
+
}
|
|
10078
|
+
|
|
10079
|
+
default:
|
|
10080
|
+
return state;
|
|
10081
|
+
}
|
|
10082
|
+
};
|
|
10083
|
+
|
|
10084
|
+
/* harmony default export */ var store_mutations = (mutations);
|
|
10085
|
+
;// CONCATENATED MODULE: ./src/client/helpers/local-notifications/index.ts
|
|
10086
|
+
var browserHasNotificationSupport = ("Notification" in window);
|
|
10087
|
+
function checkIfUserHasGivenPermission() {
|
|
10088
|
+
if (!browserHasNotificationSupport) {
|
|
10089
|
+
return false;
|
|
10090
|
+
}
|
|
10091
|
+
|
|
10092
|
+
return Notification.permission === "granted";
|
|
10093
|
+
}
|
|
10094
|
+
function requestNotificationPermission() {
|
|
10095
|
+
if (!browserHasNotificationSupport) {
|
|
10096
|
+
return null;
|
|
10097
|
+
}
|
|
10098
|
+
|
|
10099
|
+
return Notification.requestPermission();
|
|
10100
|
+
}
|
|
10101
|
+
function createNotification(title, isChatOpen, onClickHandler, options) {
|
|
10102
|
+
if (!checkIfUserHasGivenPermission() || !document.hidden && isChatOpen) {
|
|
10103
|
+
return null;
|
|
10104
|
+
}
|
|
10105
|
+
|
|
10106
|
+
var notification = new Notification(title, options);
|
|
10107
|
+
|
|
10108
|
+
notification.onclick = function () {
|
|
10109
|
+
if (onClickHandler) {
|
|
10110
|
+
onClickHandler();
|
|
10111
|
+
}
|
|
10112
|
+
|
|
10113
|
+
notification.close();
|
|
10114
|
+
};
|
|
10115
|
+
|
|
10116
|
+
return notification;
|
|
10117
|
+
}
|
|
10118
|
+
|
|
10119
|
+
function notificationPermissionGuard(state) {
|
|
10120
|
+
if (state === "granted" || state === "denied") {
|
|
10121
|
+
return state;
|
|
10122
|
+
}
|
|
10123
|
+
|
|
10124
|
+
return "default";
|
|
10125
|
+
}
|
|
10126
|
+
/**
|
|
10127
|
+
* Used to listen for changes in Notification permission state
|
|
10128
|
+
*/
|
|
10129
|
+
|
|
10130
|
+
|
|
10131
|
+
function notificationPermListener(notificationPermChangeHandler) {
|
|
10132
|
+
if (!("permissions" in navigator)) {
|
|
10133
|
+
return;
|
|
10134
|
+
}
|
|
10135
|
+
|
|
10136
|
+
navigator.permissions.query({
|
|
10137
|
+
name: "notifications"
|
|
10138
|
+
}).then(function (notificationPerm) {
|
|
10139
|
+
// eslint-disable-next-line no-param-reassign
|
|
10140
|
+
notificationPerm.onchange = function () {
|
|
10141
|
+
notificationPermChangeHandler(notificationPermissionGuard(notificationPerm.state));
|
|
10142
|
+
};
|
|
10143
|
+
});
|
|
10144
|
+
}
|
|
9470
10145
|
;// CONCATENATED MODULE: ./src/client/store/state.ts
|
|
9471
10146
|
|
|
9472
10147
|
|
|
10148
|
+
|
|
10149
|
+
|
|
10150
|
+
|
|
10151
|
+
function getValueFromStorage(key) {
|
|
10152
|
+
return safeLocalStorage.getItem(key) || safeSessionStorage.getItem(key);
|
|
10153
|
+
}
|
|
10154
|
+
|
|
9473
10155
|
var state = {
|
|
9474
10156
|
handle: undefined,
|
|
9475
10157
|
styles: undefined,
|
|
@@ -9493,7 +10175,10 @@ var state = {
|
|
|
9493
10175
|
initialURL: undefined,
|
|
9494
10176
|
privateMode: false,
|
|
9495
10177
|
rolloutOverride: undefined,
|
|
9496
|
-
chatterToken: undefined,
|
|
10178
|
+
chatterToken: getValueFromStorage(CHATTER_TOKEN_STORAGE_KEY) || undefined,
|
|
10179
|
+
chatterCreated: getValueFromStorage(CHATTER_CREATED_STORAGE_KEY) || undefined,
|
|
10180
|
+
zdSessionId: getValueFromStorage(ZD_SESSION_STORAGE_KEY) || undefined,
|
|
10181
|
+
zdPreviousTags: getValueFromStorage(ZD_PREVIOUS_TAGS_STORAGE_KEY) || undefined,
|
|
9497
10182
|
connections: {},
|
|
9498
10183
|
appConnectionState: ConnectionState.Uninitiated,
|
|
9499
10184
|
testMode: false,
|
|
@@ -9505,7 +10190,8 @@ var state = {
|
|
|
9505
10190
|
isChatWebsocketConnected: false,
|
|
9506
10191
|
latestCampaignKey: undefined,
|
|
9507
10192
|
hasChatOpenedAfterProactiveMessagesShown: false,
|
|
9508
|
-
chatterInLiveChat: false
|
|
10193
|
+
chatterInLiveChat: false,
|
|
10194
|
+
adaSettings: {}
|
|
9509
10195
|
};
|
|
9510
10196
|
/* harmony default export */ var store_state = (state);
|
|
9511
10197
|
;// CONCATENATED MODULE: ./src/client/store/index.ts
|
|
@@ -9675,7 +10361,6 @@ var Store = /*#__PURE__*/function () {
|
|
|
9675
10361
|
|
|
9676
10362
|
|
|
9677
10363
|
|
|
9678
|
-
|
|
9679
10364
|
var StoreProxy = function StoreProxy(messageService) {
|
|
9680
10365
|
var _this = this;
|
|
9681
10366
|
|
|
@@ -9723,8 +10408,6 @@ var StoreProxy = function StoreProxy(messageService) {
|
|
|
9723
10408
|
}
|
|
9724
10409
|
});
|
|
9725
10410
|
};
|
|
9726
|
-
|
|
9727
|
-
|
|
9728
10411
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js-stable/instance/find.js
|
|
9729
10412
|
var find = __webpack_require__(4473);
|
|
9730
10413
|
var find_default = /*#__PURE__*/__webpack_require__.n(find);
|
|
@@ -9872,121 +10555,100 @@ var DEFAULT_LANGUAGE_CODE = "en";
|
|
|
9872
10555
|
* I'M SO SORRY.
|
|
9873
10556
|
*/
|
|
9874
10557
|
|
|
9875
|
-
var
|
|
10558
|
+
var get_browser_language_getBrowserLanguage = function getBrowserLanguage() {
|
|
9876
10559
|
return (navigator.languages && navigator.languages[0] || navigator.language || navigator.userLanguage || navigator.browserLanguage || navigator.systemLanguage || DEFAULT_LANGUAGE_CODE).split("-")[0];
|
|
9877
10560
|
};
|
|
9878
10561
|
|
|
9879
|
-
/* harmony default export */ var get_browser_language = (
|
|
9880
|
-
|
|
9881
|
-
|
|
9882
|
-
|
|
9883
|
-
|
|
10562
|
+
/* harmony default export */ var get_browser_language = (get_browser_language_getBrowserLanguage);
|
|
10563
|
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js-stable/instance/trim.js
|
|
10564
|
+
var trim = __webpack_require__(5843);
|
|
10565
|
+
var trim_default = /*#__PURE__*/__webpack_require__.n(trim);
|
|
10566
|
+
;// CONCATENATED MODULE: ./src/common/helpers/get-intro-for-url.ts
|
|
9884
10567
|
|
|
9885
10568
|
|
|
9886
|
-
var StorageTypes;
|
|
9887
10569
|
|
|
9888
|
-
|
|
9889
|
-
|
|
9890
|
-
|
|
9891
|
-
|
|
10570
|
+
var INTRO_STYLE_EMOJI = "Emoji";
|
|
10571
|
+
var INTRO_STYLE_TEXT = "Text";
|
|
10572
|
+
function getProcessedPath(path) {
|
|
10573
|
+
var regex = new RegExp("^http(s)?://(www.)?");
|
|
10574
|
+
return trim_default()(path).call(path).replace(regex, "");
|
|
10575
|
+
}
|
|
10576
|
+
function getPathSearchRegex(path) {
|
|
10577
|
+
var params = path.split("?");
|
|
9892
10578
|
|
|
9893
|
-
|
|
9894
|
-
|
|
9895
|
-
* from the Window object and third-party cookies are disabled. SafeStorage
|
|
9896
|
-
* wraps common Storage methods in try catch blocks.
|
|
9897
|
-
*/
|
|
9898
|
-
var SafeStorage = /*#__PURE__*/function () {
|
|
9899
|
-
function SafeStorage(storageType) {
|
|
9900
|
-
(0,classCallCheck/* default */.Z)(this, SafeStorage);
|
|
10579
|
+
if (params.length > 1) {
|
|
10580
|
+
var _context;
|
|
9901
10581
|
|
|
9902
|
-
|
|
10582
|
+
var escapedParams = encodeURI(params[1]);
|
|
10583
|
+
return new RegExp(concat_default()(_context = "^".concat(params[0], "\\?")).call(_context, escapedParams, "$"));
|
|
10584
|
+
}
|
|
9903
10585
|
|
|
9904
|
-
|
|
10586
|
+
var newPath = path.replace("*", ".*");
|
|
10587
|
+
return new RegExp("^".concat(newPath, "$"));
|
|
10588
|
+
}
|
|
10589
|
+
function doesUrlMatchPath(url, path) {
|
|
10590
|
+
var processedUrl = getProcessedPath(url);
|
|
10591
|
+
var processedPath = getProcessedPath(path);
|
|
10592
|
+
var pathRegex = getPathSearchRegex(processedPath);
|
|
10593
|
+
var matches = pathRegex.exec(processedUrl);
|
|
10594
|
+
return matches !== null;
|
|
10595
|
+
}
|
|
9905
10596
|
|
|
9906
|
-
|
|
10597
|
+
function findMatchingIntro(intros) {
|
|
10598
|
+
var currentUrl = window.location.href;
|
|
9907
10599
|
|
|
9908
|
-
|
|
9909
|
-
|
|
9910
|
-
} catch (e) {
|
|
9911
|
-
(0,errors/* warn */.Z)("".concat(this.storageType, "Storage is disabled. This is likely because your browser is blocking third-party cookies."));
|
|
9912
|
-
}
|
|
9913
|
-
} // eslint-disable-next-line class-methods-use-this
|
|
10600
|
+
var matchingIntros = filter_default()(intros).call(intros, function (intro) {
|
|
10601
|
+
var _context2;
|
|
9914
10602
|
|
|
10603
|
+
var matchingPaths = filter_default()(_context2 = intro.paths).call(_context2, function (path) {
|
|
10604
|
+
return doesUrlMatchPath(currentUrl, path);
|
|
10605
|
+
});
|
|
9915
10606
|
|
|
9916
|
-
|
|
9917
|
-
|
|
9918
|
-
value: function seralizeItem(value) {
|
|
9919
|
-
try {
|
|
9920
|
-
return stringify_default()(value);
|
|
9921
|
-
} catch (error) {
|
|
9922
|
-
(0,errors/* warn */.Z)("Attempt to seralize failed: ".concat(error));
|
|
9923
|
-
}
|
|
10607
|
+
return matchingPaths.length > 0;
|
|
10608
|
+
});
|
|
9924
10609
|
|
|
9925
|
-
|
|
9926
|
-
|
|
10610
|
+
if (matchingIntros.length === 0) {
|
|
10611
|
+
return null;
|
|
10612
|
+
}
|
|
9927
10613
|
|
|
9928
|
-
|
|
9929
|
-
|
|
9930
|
-
value: function deserializeItem(value) {
|
|
9931
|
-
try {
|
|
9932
|
-
return JSON.parse(value);
|
|
9933
|
-
} catch (error) {
|
|
9934
|
-
(0,errors/* warn */.Z)("Attempt to deserialize failed: ".concat(error));
|
|
9935
|
-
}
|
|
10614
|
+
return matchingIntros[0];
|
|
10615
|
+
}
|
|
9936
10616
|
|
|
9937
|
-
|
|
9938
|
-
|
|
9939
|
-
}, {
|
|
9940
|
-
key: "getItem",
|
|
9941
|
-
value: function getItem(key) {
|
|
9942
|
-
try {
|
|
9943
|
-
if (!this.storage) {
|
|
9944
|
-
throw new errors/* AdaEmbedError */.S("`storage` is null");
|
|
9945
|
-
}
|
|
10617
|
+
function getIntroForCurrentUrl(intros, language) {
|
|
10618
|
+
var matchingIntro = findMatchingIntro(intros);
|
|
9946
10619
|
|
|
9947
|
-
|
|
9948
|
-
|
|
9949
|
-
|
|
9950
|
-
return null;
|
|
9951
|
-
}
|
|
9952
|
-
}
|
|
9953
|
-
}, {
|
|
9954
|
-
key: "setItem",
|
|
9955
|
-
value: function setItem(key, value) {
|
|
9956
|
-
try {
|
|
9957
|
-
if (!this.storage) {
|
|
9958
|
-
throw new errors/* AdaEmbedError */.S("`storage` is null");
|
|
9959
|
-
}
|
|
10620
|
+
if (!matchingIntro) {
|
|
10621
|
+
return null;
|
|
10622
|
+
}
|
|
9960
10623
|
|
|
9961
|
-
|
|
9962
|
-
|
|
9963
|
-
|
|
9964
|
-
|
|
9965
|
-
|
|
9966
|
-
|
|
9967
|
-
|
|
9968
|
-
|
|
9969
|
-
|
|
9970
|
-
if (!this.storage) {
|
|
9971
|
-
throw new errors/* AdaEmbedError */.S("`storage` is null");
|
|
9972
|
-
}
|
|
10624
|
+
if (matchingIntro.style === INTRO_STYLE_TEXT) {
|
|
10625
|
+
return {
|
|
10626
|
+
response_id: matchingIntro.response_id,
|
|
10627
|
+
body: matchingIntro.body.message_text[language],
|
|
10628
|
+
style: matchingIntro.style,
|
|
10629
|
+
delay: matchingIntro.delay,
|
|
10630
|
+
duration: matchingIntro.duration
|
|
10631
|
+
};
|
|
10632
|
+
}
|
|
9973
10633
|
|
|
9974
|
-
|
|
9975
|
-
|
|
9976
|
-
|
|
9977
|
-
|
|
9978
|
-
|
|
9979
|
-
|
|
10634
|
+
if (matchingIntro.style === INTRO_STYLE_EMOJI) {
|
|
10635
|
+
return {
|
|
10636
|
+
response_id: matchingIntro.response_id,
|
|
10637
|
+
body: matchingIntro.body.emoji_link,
|
|
10638
|
+
style: matchingIntro.style,
|
|
10639
|
+
delay: matchingIntro.delay,
|
|
10640
|
+
duration: matchingIntro.duration
|
|
10641
|
+
};
|
|
10642
|
+
}
|
|
9980
10643
|
|
|
9981
|
-
return
|
|
9982
|
-
}
|
|
9983
|
-
var safeLocalStorage = new SafeStorage(StorageTypes.Local);
|
|
9984
|
-
var safeSessionStorage = new SafeStorage(StorageTypes.Session);
|
|
10644
|
+
return null;
|
|
10645
|
+
}
|
|
9985
10646
|
;// CONCATENATED MODULE: ./src/campaigns/TriggerConditionEvaluator.ts
|
|
9986
10647
|
|
|
9987
10648
|
|
|
9988
10649
|
|
|
9989
10650
|
|
|
10651
|
+
|
|
9990
10652
|
var TriggerConditionEvaluator_stripTrailingSlash = function stripTrailingSlash(url) {
|
|
9991
10653
|
return ends_with_default()(url).call(url, "/") ? slice_default()(url).call(url, 0, -1) : url;
|
|
9992
10654
|
};
|
|
@@ -10014,7 +10676,9 @@ var TriggerConditionEvaluator_evalUrlMatchTriggerCondition = function evalUrlMat
|
|
|
10014
10676
|
return includes_default()(url).call(url, condition.value);
|
|
10015
10677
|
|
|
10016
10678
|
case "equals":
|
|
10017
|
-
|
|
10679
|
+
{
|
|
10680
|
+
return doesUrlMatchPath(urlWithoutQueryParams, condition.value);
|
|
10681
|
+
}
|
|
10018
10682
|
|
|
10019
10683
|
case "regex":
|
|
10020
10684
|
{
|
|
@@ -10426,7 +11090,6 @@ function ConnectContainer_createSuper(Derived) { var hasNativeReflectConstruct =
|
|
|
10426
11090
|
function ConnectContainer_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !(construct_default())) return false; if ((construct_default()).sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(construct_default()(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
10427
11091
|
|
|
10428
11092
|
|
|
10429
|
-
|
|
10430
11093
|
var ConnectContainer = /*#__PURE__*/function (_Component) {
|
|
10431
11094
|
(0,inherits/* default */.Z)(ConnectContainer, _Component);
|
|
10432
11095
|
|
|
@@ -10500,15 +11163,13 @@ var ConnectContainer = /*#__PURE__*/function (_Component) {
|
|
|
10500
11163
|
|
|
10501
11164
|
return ConnectContainer;
|
|
10502
11165
|
}(d);
|
|
10503
|
-
|
|
10504
|
-
|
|
10505
11166
|
;// CONCATENATED MODULE: ./src/client/lib/connect.tsx
|
|
10506
11167
|
|
|
10507
11168
|
|
|
10508
11169
|
|
|
10509
11170
|
|
|
10510
11171
|
function connect(mapStateToProps, mapDispatchToProps) {
|
|
10511
|
-
return function (WrappedComponent) {
|
|
11172
|
+
return function connector(WrappedComponent) {
|
|
10512
11173
|
return function (ownProps) {
|
|
10513
11174
|
return v(StoreContext.Consumer, null, function (store) {
|
|
10514
11175
|
return v(ConnectContainer, _extends({
|
|
@@ -10527,92 +11188,6 @@ function bindActionCreators(action, dispatch) {
|
|
|
10527
11188
|
return dispatch(action, payload);
|
|
10528
11189
|
};
|
|
10529
11190
|
}
|
|
10530
|
-
;// CONCATENATED MODULE: ./src/common/constants/storage-keys.ts
|
|
10531
|
-
var CHATTER_STORAGE_KEY = "chatter";
|
|
10532
|
-
var IN_LIVE_CHAT_STORAGE_KEY = "inLiveChat";
|
|
10533
|
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js-stable/instance/trim.js
|
|
10534
|
-
var trim = __webpack_require__(5843);
|
|
10535
|
-
var trim_default = /*#__PURE__*/__webpack_require__.n(trim);
|
|
10536
|
-
;// CONCATENATED MODULE: ./src/common/helpers/get-intro-for-url.ts
|
|
10537
|
-
|
|
10538
|
-
|
|
10539
|
-
|
|
10540
|
-
var INTRO_STYLE_EMOJI = "Emoji";
|
|
10541
|
-
var INTRO_STYLE_TEXT = "Text";
|
|
10542
|
-
function getProcessedPath(path) {
|
|
10543
|
-
var regex = new RegExp("^http(s)?://(www.)?");
|
|
10544
|
-
return trim_default()(path).call(path).replace(regex, "");
|
|
10545
|
-
}
|
|
10546
|
-
function getPathSearchRegex(path) {
|
|
10547
|
-
var params = path.split("?");
|
|
10548
|
-
|
|
10549
|
-
if (params.length > 1) {
|
|
10550
|
-
var _context;
|
|
10551
|
-
|
|
10552
|
-
var escapedParams = encodeURI(params[1]);
|
|
10553
|
-
return new RegExp(concat_default()(_context = "^".concat(params[0], "\\?")).call(_context, escapedParams, "$"));
|
|
10554
|
-
}
|
|
10555
|
-
|
|
10556
|
-
var newPath = path.replace("*", ".*");
|
|
10557
|
-
return new RegExp("^".concat(newPath, "$"));
|
|
10558
|
-
}
|
|
10559
|
-
function doesUrlMatchPath(url, path) {
|
|
10560
|
-
var processedUrl = getProcessedPath(url);
|
|
10561
|
-
var processedPath = getProcessedPath(path);
|
|
10562
|
-
var pathRegex = getPathSearchRegex(processedPath);
|
|
10563
|
-
var matches = pathRegex.exec(processedUrl);
|
|
10564
|
-
return matches !== null;
|
|
10565
|
-
}
|
|
10566
|
-
|
|
10567
|
-
function findMatchingIntro(intros) {
|
|
10568
|
-
var currentUrl = window.location.href;
|
|
10569
|
-
|
|
10570
|
-
var matchingIntros = filter_default()(intros).call(intros, function (intro) {
|
|
10571
|
-
var _context2;
|
|
10572
|
-
|
|
10573
|
-
var matchingPaths = filter_default()(_context2 = intro.paths).call(_context2, function (path) {
|
|
10574
|
-
return doesUrlMatchPath(currentUrl, path);
|
|
10575
|
-
});
|
|
10576
|
-
|
|
10577
|
-
return matchingPaths.length > 0;
|
|
10578
|
-
});
|
|
10579
|
-
|
|
10580
|
-
if (matchingIntros.length === 0) {
|
|
10581
|
-
return null;
|
|
10582
|
-
}
|
|
10583
|
-
|
|
10584
|
-
return matchingIntros[0];
|
|
10585
|
-
}
|
|
10586
|
-
|
|
10587
|
-
function getIntroForCurrentUrl(intros, language) {
|
|
10588
|
-
var matchingIntro = findMatchingIntro(intros);
|
|
10589
|
-
|
|
10590
|
-
if (!matchingIntro) {
|
|
10591
|
-
return null;
|
|
10592
|
-
}
|
|
10593
|
-
|
|
10594
|
-
if (matchingIntro.style === INTRO_STYLE_TEXT) {
|
|
10595
|
-
return {
|
|
10596
|
-
response_id: matchingIntro.response_id,
|
|
10597
|
-
body: matchingIntro.body.message_text[language],
|
|
10598
|
-
style: matchingIntro.style,
|
|
10599
|
-
delay: matchingIntro.delay,
|
|
10600
|
-
duration: matchingIntro.duration
|
|
10601
|
-
};
|
|
10602
|
-
}
|
|
10603
|
-
|
|
10604
|
-
if (matchingIntro.style === INTRO_STYLE_EMOJI) {
|
|
10605
|
-
return {
|
|
10606
|
-
response_id: matchingIntro.response_id,
|
|
10607
|
-
body: matchingIntro.body.emoji_link,
|
|
10608
|
-
style: matchingIntro.style,
|
|
10609
|
-
delay: matchingIntro.delay,
|
|
10610
|
-
duration: matchingIntro.duration
|
|
10611
|
-
};
|
|
10612
|
-
}
|
|
10613
|
-
|
|
10614
|
-
return null;
|
|
10615
|
-
}
|
|
10616
11191
|
;// CONCATENATED MODULE: ./src/common/helpers/fetch-client.ts
|
|
10617
11192
|
|
|
10618
11193
|
|
|
@@ -10724,12 +11299,26 @@ function _fetchClient() {
|
|
|
10724
11299
|
|
|
10725
11300
|
|
|
10726
11301
|
var RTLLanguages = ["ar", "he"];
|
|
11302
|
+
var isRTLLanguage = function isRTLLanguage(language) {
|
|
11303
|
+
return Boolean(language && includes_default()(RTLLanguages).call(RTLLanguages, language)) || false;
|
|
11304
|
+
};
|
|
10727
11305
|
var isRTL = function isRTL(client, language) {
|
|
10728
|
-
var rtlLanguageBool =
|
|
10729
|
-
|
|
11306
|
+
var rtlLanguageBool = isRTLLanguage(language) || isRTLLanguage(getBrowserLanguage());
|
|
10730
11307
|
var featureFlagsBool = (client === null || client === void 0 ? void 0 : client.features.chat_ui_v2) && (client === null || client === void 0 ? void 0 : client.features.rtl_language_support) && (client === null || client === void 0 ? void 0 : client.features.translations);
|
|
10731
11308
|
return featureFlagsBool && rtlLanguageBool || false;
|
|
10732
11309
|
};
|
|
11310
|
+
;// CONCATENATED MODULE: ./src/common/helpers/getAlignment.ts
|
|
11311
|
+
|
|
11312
|
+
function getAlignment(adaSettings) {
|
|
11313
|
+
var language = adaSettings.language,
|
|
11314
|
+
align = adaSettings.align;
|
|
11315
|
+
|
|
11316
|
+
if (align === "auto") {
|
|
11317
|
+
return isRTLLanguage(language) ? "left" : "right";
|
|
11318
|
+
}
|
|
11319
|
+
|
|
11320
|
+
return align || "right";
|
|
11321
|
+
}
|
|
10733
11322
|
;// CONCATENATED MODULE: ./src/common/helpers/wait.ts
|
|
10734
11323
|
|
|
10735
11324
|
function wait(ms) {
|
|
@@ -10808,32 +11397,6 @@ var INTRO_IFRAME = "intro";
|
|
|
10808
11397
|
var BUTTON_IFRAME = "button";
|
|
10809
11398
|
var MASK_IFRAME = "drawer-mask";
|
|
10810
11399
|
var XSTORAGE_IFRAME = "x-storage";
|
|
10811
|
-
;// CONCATENATED MODULE: ./src/frames/helpers/storage/index.ts
|
|
10812
|
-
|
|
10813
|
-
var PERSISTENCE_NORMAL = "normal";
|
|
10814
|
-
var PERSISTENCE_SESSION = "session";
|
|
10815
|
-
/**
|
|
10816
|
-
* Retrieves items from local or session storage, depending on the client's
|
|
10817
|
-
* persistence setting. If privateMode is set, it returns null.
|
|
10818
|
-
*/
|
|
10819
|
-
|
|
10820
|
-
function retrieveStorage(key, client, privateMode) {
|
|
10821
|
-
var persistence = client.persistence;
|
|
10822
|
-
|
|
10823
|
-
if (privateMode) {
|
|
10824
|
-
return null;
|
|
10825
|
-
}
|
|
10826
|
-
|
|
10827
|
-
if (persistence === PERSISTENCE_NORMAL) {
|
|
10828
|
-
return safeLocalStorage.getItem(key);
|
|
10829
|
-
}
|
|
10830
|
-
|
|
10831
|
-
if (persistence === PERSISTENCE_SESSION) {
|
|
10832
|
-
return safeSessionStorage.getItem(key);
|
|
10833
|
-
}
|
|
10834
|
-
|
|
10835
|
-
return null;
|
|
10836
|
-
}
|
|
10837
11400
|
// EXTERNAL MODULE: ./src/services/logger/index.ts
|
|
10838
11401
|
var services_logger = __webpack_require__(9517);
|
|
10839
11402
|
;// CONCATENATED MODULE: ./src/client/components/IFrame/index.tsx
|
|
@@ -11118,7 +11681,7 @@ var ButtonFrame = /*#__PURE__*/function (_Component) {
|
|
|
11118
11681
|
buttonSize = _this$props.buttonSize,
|
|
11119
11682
|
buttonStyle = _this$props.buttonStyle,
|
|
11120
11683
|
frameWidth = _this$props.frameWidth,
|
|
11121
|
-
|
|
11684
|
+
adaSettings = _this$props.adaSettings;
|
|
11122
11685
|
|
|
11123
11686
|
if (!client) {
|
|
11124
11687
|
return "";
|
|
@@ -11133,12 +11696,12 @@ var ButtonFrame = /*#__PURE__*/function (_Component) {
|
|
|
11133
11696
|
var frameHeight = buttonSize + BOX_SHADOW_BUFFER;
|
|
11134
11697
|
var stylesForHiding = "\n top: -9999px !important;\n left: -9999px !important;\n ";
|
|
11135
11698
|
|
|
11136
|
-
var styles = concat_default()(_context2 = concat_default()(_context3 = concat_default()(_context4 = concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "\n position: fixed;\n bottom: ".concat(buttonPosition, "px;\n ")).call(_context7,
|
|
11699
|
+
var styles = concat_default()(_context2 = concat_default()(_context3 = concat_default()(_context4 = concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "\n position: fixed;\n bottom: ".concat(buttonPosition, "px;\n ")).call(_context7, getAlignment(adaSettings), ": ")).call(_context6, buttonPosition, "px;\n z-index: 10000;\n height: ")).call(_context5, buttonSizeWithBuffer, "px;\n width: ")).call(_context4, buttonSizeWithBuffer, "px;\n overflow: hidden;\n visibility: ")).call(_context3, this.isShown ? "visible" : "hidden", ";\n opacity: ")).call(_context2, this.isShown ? "1" : "0", ";\n transition: visibility 200ms ease, opacity 200ms ease;\n ");
|
|
11137
11700
|
|
|
11138
11701
|
if (client.features.chat_ui_v2) {
|
|
11139
11702
|
var _context8;
|
|
11140
11703
|
|
|
11141
|
-
styles += concat_default()(_context8 = "\n transform: translate(0, 10%);\n transition: visibility 250ms ease, opacity 250ms ease, transform 250ms ease;\n ".concat(
|
|
11704
|
+
styles += concat_default()(_context8 = "\n transform: translate(0, 10%);\n transition: visibility 250ms ease, opacity 250ms ease, transform 250ms ease;\n ".concat(getAlignment(adaSettings), ": 0;\n bottom: 0;\n \n ")).call(_context8, this.isShown ? "transform: translate(0, 0);" : "", "\n ");
|
|
11142
11705
|
|
|
11143
11706
|
if (buttonStyle === "text") {
|
|
11144
11707
|
var _context9;
|
|
@@ -11202,7 +11765,7 @@ function ButtonFrame_mapStateToProps(storeState) {
|
|
|
11202
11765
|
};
|
|
11203
11766
|
}
|
|
11204
11767
|
|
|
11205
|
-
/* harmony default export */ var components_ButtonFrame = (connect(ButtonFrame_mapStateToProps
|
|
11768
|
+
/* harmony default export */ var components_ButtonFrame = (connect(ButtonFrame_mapStateToProps)(ButtonFrame));
|
|
11206
11769
|
;// CONCATENATED MODULE: ./src/common/constants/timeouts.ts
|
|
11207
11770
|
var ANIMATION_DELAY = 50;
|
|
11208
11771
|
;// CONCATENATED MODULE: ./src/common/helpers/is-mobile.ts
|
|
@@ -11238,6 +11801,7 @@ function ChatFrame_isNativeReflectConstruct() { if (typeof Reflect === "undefine
|
|
|
11238
11801
|
|
|
11239
11802
|
|
|
11240
11803
|
|
|
11804
|
+
|
|
11241
11805
|
var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
11242
11806
|
(0,inherits/* default */.Z)(ChatFrame, _Component);
|
|
11243
11807
|
|
|
@@ -11357,7 +11921,8 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
11357
11921
|
skipGreeting = _this$props3.skipGreeting,
|
|
11358
11922
|
wasIntroShown = _this$props3.wasIntroShown,
|
|
11359
11923
|
privateMode = _this$props3.privateMode,
|
|
11360
|
-
testMode = _this$props3.testMode
|
|
11924
|
+
testMode = _this$props3.testMode,
|
|
11925
|
+
adaSettings = _this$props3.adaSettings;
|
|
11361
11926
|
return getURL({
|
|
11362
11927
|
name: name,
|
|
11363
11928
|
handle: handle,
|
|
@@ -11370,7 +11935,8 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
11370
11935
|
introShown: wasIntroShown,
|
|
11371
11936
|
embed2: 1,
|
|
11372
11937
|
private: privateMode ? 1 : null,
|
|
11373
|
-
test_user: testMode ? 1 : null
|
|
11938
|
+
test_user: testMode ? 1 : null,
|
|
11939
|
+
align: getAlignment(adaSettings)
|
|
11374
11940
|
}
|
|
11375
11941
|
});
|
|
11376
11942
|
}
|
|
@@ -11383,7 +11949,7 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
11383
11949
|
isDrawerOpen = _this$props4.isDrawerOpen,
|
|
11384
11950
|
client = _this$props4.client,
|
|
11385
11951
|
testMode = _this$props4.testMode,
|
|
11386
|
-
|
|
11952
|
+
adaSettings = _this$props4.adaSettings;
|
|
11387
11953
|
|
|
11388
11954
|
if (!client) {
|
|
11389
11955
|
return "";
|
|
@@ -11403,10 +11969,10 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
11403
11969
|
if (client.features.chat_ui_v2) {
|
|
11404
11970
|
var _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9;
|
|
11405
11971
|
|
|
11406
|
-
return concat_default()(_context2 = concat_default()(_context3 = concat_default()(_context4 = concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "\n position: fixed;\n\n ".concat(isMobile ? "\n ".concat(
|
|
11972
|
+
return concat_default()(_context2 = concat_default()(_context3 = concat_default()(_context4 = concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "\n position: fixed;\n\n ".concat(isMobile ? "\n ".concat(getAlignment(adaSettings), ": 0;\n bottom: 0;\n height: 100%;\n ") : concat_default()(_context8 = concat_default()(_context9 = "\n height: 90%;\n ".concat(getAlignment(adaSettings), ": 24px;\n bottom: 24px;\n max-width: 375px;\n max-height: ")).call(_context9, totalWindowHeight, ";\n border-radius: ")).call(_context8, borderRadius, ";\n "), "\n\n width: 100%;\n ")).call(_context7, this.hasVisibleProactiveMessages || isShown ? "pointer-events: auto" : "pointer-events: none", ";\n opacity: 0;\n transform: translate(0, 100px);\n transition: transform ")).call(_context6, closeTransitionTime, "ms ease, opacity ")).call(_context5, closeTransitionTime, "ms ease, visibility 0ms linear ")).call(_context4, closeTransitionTime, "ms;\n box-shadow: 0px 12px 48px 4px rgba(0, 0, 0, 0.12);\n background-color: ")).call(_context3, backgroundColor, ";\n visibility: hidden;\n z-index: 10010;\n\n ")).call(_context2, isShown && "\n opacity: 1;\n transform: translate(0, 0);\n transition: transform 300ms ease, opacity 300ms ease;\n visibility: visible;\n ", "\n ");
|
|
11407
11973
|
}
|
|
11408
11974
|
|
|
11409
|
-
return concat_default()(_context10 = concat_default()(_context11 = concat_default()(_context12 = concat_default()(_context13 = concat_default()(_context14 = "\n position: fixed;\n ".concat(
|
|
11975
|
+
return concat_default()(_context10 = concat_default()(_context11 = concat_default()(_context12 = concat_default()(_context13 = concat_default()(_context14 = "\n position: fixed;\n ".concat(getAlignment(adaSettings), ": 0;\n bottom: 0;\n transform: translate(")).call(_context14, isDrawerOpen && isMounted ? "0" : "375px", ", 0);\n opacity: ")).call(_context13, isDrawerOpen && isMounted ? "1" : "0", ";\n transition: transform 200ms ease, opacity 200ms ease;\n z-index: 9999;\n box-shadow: -1px 0 0 rgba(0, 0, 0, .1), -3px 0 9px rgba(0, 0, 0, .15);\n background-color: #ffffff;\n width: 100%;\n max-width: ")).call(_context12, isMobile ? "none" : "375px", ";\n height: ")).call(_context11, isMobile ? "100%" : "100vh", ";\n min-height: ")).call(_context10, isMobile ? "100%" : "initial", ";\n max-height: -webkit-fill-available;\n max-height: -moz-available;\n max-height: stretch;\n ");
|
|
11410
11976
|
}
|
|
11411
11977
|
}, {
|
|
11412
11978
|
key: "hasVisibleProactiveMessages",
|
|
@@ -11423,13 +11989,13 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
11423
11989
|
var _this$props5 = this.props,
|
|
11424
11990
|
chatDimensions = _this$props5.chatDimensions,
|
|
11425
11991
|
client = _this$props5.client,
|
|
11426
|
-
|
|
11992
|
+
adaSettings = _this$props5.adaSettings; // delta is used to determine how much of the button's height should be ignored
|
|
11427
11993
|
// when spacing the proactive message
|
|
11428
11994
|
|
|
11429
11995
|
var delta = 14;
|
|
11430
11996
|
var TEXT_BUTTON_HEIGHT = 44;
|
|
11431
11997
|
var bottomOffset = (client === null || client === void 0 ? void 0 : (_client$ui_settings3 = client.ui_settings) === null || _client$ui_settings3 === void 0 ? void 0 : (_client$ui_settings3$ = _client$ui_settings3.embed) === null || _client$ui_settings3$ === void 0 ? void 0 : _client$ui_settings3$.style) === "text" ? TEXT_BUTTON_HEIGHT - delta : (client === null || client === void 0 ? void 0 : (_client$chat_button = client.chat_button) === null || _client$chat_button === void 0 ? void 0 : _client$chat_button.size) - delta;
|
|
11432
|
-
return concat_default()(_context15 = concat_default()(_context16 = concat_default()(_context17 = "\n box-shadow: none;\n background: none;\n height: ".concat(chatDimensions === null || chatDimensions === void 0 ? void 0 : chatDimensions.height, "px !important;\n width: ")).call(_context17, chatDimensions === null || chatDimensions === void 0 ? void 0 : chatDimensions.width, "px !important;\n ")).call(_context16,
|
|
11998
|
+
return concat_default()(_context15 = concat_default()(_context16 = concat_default()(_context17 = "\n box-shadow: none;\n background: none;\n height: ".concat(chatDimensions === null || chatDimensions === void 0 ? void 0 : chatDimensions.height, "px !important;\n width: ")).call(_context17, chatDimensions === null || chatDimensions === void 0 ? void 0 : chatDimensions.width, "px !important;\n ")).call(_context16, getAlignment(adaSettings), ": 0;\n bottom: ")).call(_context15, bottomOffset, "px;\n z-index: 9999;\n ");
|
|
11433
11999
|
}
|
|
11434
12000
|
}, {
|
|
11435
12001
|
key: "chooseStyles",
|
|
@@ -11564,7 +12130,7 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
11564
12130
|
var _handleChatEvent = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/regenerator_default().mark(function _callee(type, payload, id) {
|
|
11565
12131
|
var _this4 = this;
|
|
11566
12132
|
|
|
11567
|
-
var _this$props8, adaSettings, setState, setConnectionState, _ref, eventKey, data, _ref2, analytics, analyticsCallback, client, _ref3, chatter, chatterTokenCallback, _client, _ref4, inLiveChat, eventCallbacks, customJavascriptEvent, specificCallback, genericCallback, resetChat, zdChatterAuthCallback, conversationEndCallback;
|
|
12133
|
+
var _this$props8, adaSettings, setState, setConnectionState, _ref, eventKey, data, _ref2, analytics, analyticsCallback, client, _ref3, chatter, created, chatterTokenCallback, _client, _ref4, zdSessionId, zdPreviousTags, storage, _client2, _ref5, inLiveChat, eventCallbacks, customJavascriptEvent, specificCallback, genericCallback, resetChat, zdChatterAuthCallback, conversationEndCallback;
|
|
11568
12134
|
|
|
11569
12135
|
return regenerator_default().wrap(function _callee$(_context22) {
|
|
11570
12136
|
while (1) {
|
|
@@ -11572,30 +12138,30 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
11572
12138
|
case 0:
|
|
11573
12139
|
_this$props8 = this.props, adaSettings = _this$props8.adaSettings, setState = _this$props8.setState, setConnectionState = _this$props8.setConnectionState;
|
|
11574
12140
|
_context22.t0 = type;
|
|
11575
|
-
_context22.next = _context22.t0 === GET_WINDOW_ORIGIN ? 4 : _context22.t0 === CHAT_STARTED ? 6 : _context22.t0 === CHAT_WEBSOCKET_CONNECTED ? 9 : _context22.t0 === PUBLISH_EVENT ? 11 : _context22.t0 === ANALYTICS_EVENT ? 14 : _context22.t0 === CHATTER_EVENT ? 18 : _context22.t0 === CHATTER_LIVECHAT_EVENT ?
|
|
12141
|
+
_context22.next = _context22.t0 === GET_WINDOW_ORIGIN ? 4 : _context22.t0 === CHAT_STARTED ? 6 : _context22.t0 === CHAT_WEBSOCKET_CONNECTED ? 9 : _context22.t0 === PUBLISH_EVENT ? 11 : _context22.t0 === ANALYTICS_EVENT ? 14 : _context22.t0 === CHATTER_EVENT ? 18 : _context22.t0 === "ZD_SESSION" ? 28 : _context22.t0 === CHATTER_LIVECHAT_EVENT ? 37 : _context22.t0 === CUSTOM_JAVASCRIPT_EVENT ? 43 : _context22.t0 === RESET_FROM_CHAT_EVENT ? 52 : _context22.t0 === ZD_JWT_AUTH_EVENT ? 55 : _context22.t0 === CREATE_NOTIFICATION_EVENT ? 58 : _context22.t0 === BROWSER_HAS_NOTIFICATIONS_EVENT ? 60 : _context22.t0 === REQUEST_NOTIFICATIONS_EVENT ? 62 : _context22.t0 === END_CONVERSATION_EVENT ? 64 : 67;
|
|
11576
12142
|
break;
|
|
11577
12143
|
|
|
11578
12144
|
case 4:
|
|
11579
12145
|
this.channel.postMessage("SET_WINDOW_ORIGIN", window.location, id);
|
|
11580
|
-
return _context22.abrupt("break",
|
|
12146
|
+
return _context22.abrupt("break", 68);
|
|
11581
12147
|
|
|
11582
12148
|
case 6:
|
|
11583
12149
|
this.channel.isConnected = true;
|
|
11584
12150
|
setConnectionState({
|
|
11585
12151
|
"chat": ConnectionState.Done
|
|
11586
12152
|
});
|
|
11587
|
-
return _context22.abrupt("break",
|
|
12153
|
+
return _context22.abrupt("break", 68);
|
|
11588
12154
|
|
|
11589
12155
|
case 9:
|
|
11590
12156
|
setState({
|
|
11591
12157
|
isChatWebsocketConnected: true
|
|
11592
12158
|
});
|
|
11593
|
-
return _context22.abrupt("break",
|
|
12159
|
+
return _context22.abrupt("break", 68);
|
|
11594
12160
|
|
|
11595
12161
|
case 11:
|
|
11596
12162
|
_ref = payload, eventKey = _ref.eventKey, data = _ref.data;
|
|
11597
12163
|
publishEvent(eventKey, data);
|
|
11598
|
-
return _context22.abrupt("break",
|
|
12164
|
+
return _context22.abrupt("break", 68);
|
|
11599
12165
|
|
|
11600
12166
|
case 14:
|
|
11601
12167
|
_ref2 = payload, analytics = _ref2.analytics;
|
|
@@ -11605,66 +12171,124 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
11605
12171
|
analyticsCallback(analytics);
|
|
11606
12172
|
}
|
|
11607
12173
|
|
|
11608
|
-
return _context22.abrupt("break",
|
|
12174
|
+
return _context22.abrupt("break", 68);
|
|
11609
12175
|
|
|
11610
12176
|
case 18:
|
|
11611
12177
|
client = this.props.client;
|
|
11612
|
-
_ref3 = payload, chatter = _ref3.chatter;
|
|
12178
|
+
_ref3 = payload, chatter = _ref3.chatter, created = _ref3.created;
|
|
11613
12179
|
chatterTokenCallback = adaSettings.chatterTokenCallback;
|
|
11614
|
-
|
|
12180
|
+
|
|
12181
|
+
if (client) {
|
|
12182
|
+
_context22.next = 23;
|
|
12183
|
+
break;
|
|
12184
|
+
}
|
|
12185
|
+
|
|
12186
|
+
throw new errors/* AdaEmbedError */.S("`client` is undefined");
|
|
12187
|
+
|
|
12188
|
+
case 23:
|
|
12189
|
+
_context22.next = 25;
|
|
11615
12190
|
return setState({
|
|
11616
|
-
chatterToken: chatter
|
|
12191
|
+
chatterToken: chatter,
|
|
12192
|
+
chatterCreated: created
|
|
11617
12193
|
});
|
|
11618
12194
|
|
|
11619
|
-
case
|
|
12195
|
+
case 25:
|
|
11620
12196
|
/**
|
|
11621
12197
|
* Store the token so when embed loads in the future, it doesn't have to wait for it to
|
|
11622
12198
|
* come from chat. This is important for campaign and business event triggers.
|
|
11623
12199
|
*/
|
|
11624
12200
|
if (client.persistence === PERSISTENCE_NORMAL) {
|
|
11625
12201
|
safeLocalStorage.setItem(CHATTER_STORAGE_KEY, chatter);
|
|
12202
|
+
safeLocalStorage.setItem(CHATTER_CREATED_STORAGE_KEY, created);
|
|
11626
12203
|
} else if (client.persistence === PERSISTENCE_SESSION) {
|
|
11627
12204
|
safeSessionStorage.setItem(CHATTER_STORAGE_KEY, chatter);
|
|
12205
|
+
safeSessionStorage.setItem(CHATTER_CREATED_STORAGE_KEY, created);
|
|
11628
12206
|
}
|
|
11629
12207
|
|
|
11630
12208
|
if (chatterTokenCallback) {
|
|
11631
12209
|
chatterTokenCallback(chatter);
|
|
11632
12210
|
}
|
|
11633
12211
|
|
|
11634
|
-
return _context22.abrupt("break",
|
|
12212
|
+
return _context22.abrupt("break", 68);
|
|
11635
12213
|
|
|
11636
|
-
case
|
|
12214
|
+
case 28:
|
|
11637
12215
|
_client = this.props.client;
|
|
11638
|
-
_ref4 = payload,
|
|
11639
|
-
|
|
12216
|
+
_ref4 = payload, zdSessionId = _ref4.zdSessionId, zdPreviousTags = _ref4.zdPreviousTags;
|
|
12217
|
+
|
|
12218
|
+
if (_client) {
|
|
12219
|
+
_context22.next = 32;
|
|
12220
|
+
break;
|
|
12221
|
+
}
|
|
12222
|
+
|
|
12223
|
+
throw new errors/* AdaEmbedError */.S("`client` is undefined");
|
|
12224
|
+
|
|
12225
|
+
case 32:
|
|
12226
|
+
_context22.next = 34;
|
|
12227
|
+
return setState({
|
|
12228
|
+
zdSessionId: zdSessionId
|
|
12229
|
+
});
|
|
12230
|
+
|
|
12231
|
+
case 34:
|
|
12232
|
+
storage = function () {
|
|
12233
|
+
if (_client.persistence === PERSISTENCE_NORMAL) {
|
|
12234
|
+
return safeLocalStorage;
|
|
12235
|
+
}
|
|
12236
|
+
|
|
12237
|
+
if (_client.persistence === PERSISTENCE_SESSION) {
|
|
12238
|
+
return safeSessionStorage;
|
|
12239
|
+
}
|
|
12240
|
+
|
|
12241
|
+
return null;
|
|
12242
|
+
}();
|
|
12243
|
+
|
|
12244
|
+
if (storage) {
|
|
12245
|
+
if (zdSessionId === null) {
|
|
12246
|
+
storage.removeItem(ZD_SESSION_STORAGE_KEY);
|
|
12247
|
+
} else {
|
|
12248
|
+
storage.setItem(ZD_SESSION_STORAGE_KEY, zdSessionId);
|
|
12249
|
+
}
|
|
12250
|
+
|
|
12251
|
+
if (zdPreviousTags === null) {
|
|
12252
|
+
storage.removeItem(ZD_PREVIOUS_TAGS_STORAGE_KEY);
|
|
12253
|
+
} else {
|
|
12254
|
+
storage.setItem(ZD_PREVIOUS_TAGS_STORAGE_KEY, zdPreviousTags);
|
|
12255
|
+
}
|
|
12256
|
+
}
|
|
12257
|
+
|
|
12258
|
+
return _context22.abrupt("break", 68);
|
|
12259
|
+
|
|
12260
|
+
case 37:
|
|
12261
|
+
_client2 = this.props.client;
|
|
12262
|
+
_ref5 = payload, inLiveChat = _ref5.inLiveChat;
|
|
12263
|
+
_context22.next = 41;
|
|
11640
12264
|
return setState({
|
|
11641
12265
|
chatterInLiveChat: inLiveChat
|
|
11642
12266
|
});
|
|
11643
12267
|
|
|
11644
|
-
case
|
|
12268
|
+
case 41:
|
|
11645
12269
|
/**
|
|
11646
12270
|
* Store the token so when embed loads in the future, it doesn't have to wait for it to
|
|
11647
12271
|
* come from chat. This is important for campaign and business event triggers.
|
|
11648
12272
|
*/
|
|
11649
|
-
if (
|
|
12273
|
+
if (_client2.persistence === PERSISTENCE_NORMAL) {
|
|
11650
12274
|
safeLocalStorage.setItem(IN_LIVE_CHAT_STORAGE_KEY, inLiveChat);
|
|
11651
|
-
} else if (
|
|
12275
|
+
} else if (_client2.persistence === PERSISTENCE_SESSION) {
|
|
11652
12276
|
safeSessionStorage.setItem(IN_LIVE_CHAT_STORAGE_KEY, inLiveChat);
|
|
11653
12277
|
}
|
|
11654
12278
|
|
|
11655
|
-
return _context22.abrupt("break",
|
|
12279
|
+
return _context22.abrupt("break", 68);
|
|
11656
12280
|
|
|
11657
|
-
case
|
|
12281
|
+
case 43:
|
|
11658
12282
|
eventCallbacks = adaSettings.eventCallbacks;
|
|
11659
12283
|
|
|
11660
12284
|
if (eventCallbacks) {
|
|
11661
|
-
_context22.next =
|
|
12285
|
+
_context22.next = 46;
|
|
11662
12286
|
break;
|
|
11663
12287
|
}
|
|
11664
12288
|
|
|
11665
|
-
return _context22.abrupt("break",
|
|
12289
|
+
return _context22.abrupt("break", 68);
|
|
11666
12290
|
|
|
11667
|
-
case
|
|
12291
|
+
case 46:
|
|
11668
12292
|
customJavascriptEvent = payload.event_data;
|
|
11669
12293
|
specificCallback = eventCallbacks[customJavascriptEvent.event_name];
|
|
11670
12294
|
genericCallback = eventCallbacks["*"];
|
|
@@ -11677,14 +12301,14 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
11677
12301
|
genericCallback(customJavascriptEvent);
|
|
11678
12302
|
}
|
|
11679
12303
|
|
|
11680
|
-
return _context22.abrupt("break",
|
|
12304
|
+
return _context22.abrupt("break", 68);
|
|
11681
12305
|
|
|
11682
|
-
case
|
|
12306
|
+
case 52:
|
|
11683
12307
|
resetChat = this.props.resetChat;
|
|
11684
12308
|
resetChat();
|
|
11685
|
-
return _context22.abrupt("break",
|
|
12309
|
+
return _context22.abrupt("break", 68);
|
|
11686
12310
|
|
|
11687
|
-
case
|
|
12311
|
+
case 55:
|
|
11688
12312
|
zdChatterAuthCallback = adaSettings.zdChatterAuthCallback;
|
|
11689
12313
|
|
|
11690
12314
|
if (zdChatterAuthCallback) {
|
|
@@ -11702,35 +12326,35 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
|
|
|
11702
12326
|
this.channel.postMessage(ZD_JWT_AUTH_RESPONSE_EVENT, {}, id);
|
|
11703
12327
|
}
|
|
11704
12328
|
|
|
11705
|
-
return _context22.abrupt("break",
|
|
12329
|
+
return _context22.abrupt("break", 68);
|
|
11706
12330
|
|
|
11707
|
-
case
|
|
12331
|
+
case 58:
|
|
11708
12332
|
this.handleNotifications(payload);
|
|
11709
|
-
return _context22.abrupt("break",
|
|
12333
|
+
return _context22.abrupt("break", 68);
|
|
11710
12334
|
|
|
11711
|
-
case
|
|
12335
|
+
case 60:
|
|
11712
12336
|
this.channel.postMessage(BROWSER_HAS_NOTIFICATIONS_RESPONSE_EVENT, {
|
|
11713
12337
|
browserHasNotificationSupport: browserHasNotificationSupport
|
|
11714
12338
|
});
|
|
11715
|
-
return _context22.abrupt("break",
|
|
12339
|
+
return _context22.abrupt("break", 68);
|
|
11716
12340
|
|
|
11717
|
-
case
|
|
12341
|
+
case 62:
|
|
11718
12342
|
requestNotificationPermission();
|
|
11719
|
-
return _context22.abrupt("break",
|
|
12343
|
+
return _context22.abrupt("break", 68);
|
|
11720
12344
|
|
|
11721
|
-
case
|
|
12345
|
+
case 64:
|
|
11722
12346
|
conversationEndCallback = adaSettings.conversationEndCallback;
|
|
11723
12347
|
|
|
11724
12348
|
if (conversationEndCallback) {
|
|
11725
12349
|
conversationEndCallback(payload);
|
|
11726
12350
|
}
|
|
11727
12351
|
|
|
11728
|
-
return _context22.abrupt("break",
|
|
12352
|
+
return _context22.abrupt("break", 68);
|
|
11729
12353
|
|
|
11730
|
-
case
|
|
11731
|
-
return _context22.abrupt("break",
|
|
12354
|
+
case 67:
|
|
12355
|
+
return _context22.abrupt("break", 68);
|
|
11732
12356
|
|
|
11733
|
-
case
|
|
12357
|
+
case 68:
|
|
11734
12358
|
case "end":
|
|
11735
12359
|
return _context22.stop();
|
|
11736
12360
|
}
|
|
@@ -11878,12 +12502,12 @@ var IntroFrame = /*#__PURE__*/function (_Component) {
|
|
|
11878
12502
|
client = _this$props2.client,
|
|
11879
12503
|
buttonSize = _this$props2.buttonSize,
|
|
11880
12504
|
introDimensions = _this$props2.introDimensions,
|
|
11881
|
-
|
|
12505
|
+
adaSettings = _this$props2.adaSettings;
|
|
11882
12506
|
var INTRO_BUTTON_PADDING = 16;
|
|
11883
12507
|
var introPositionRight = INTRO_BUTTON_PADDING + buttonSize;
|
|
11884
12508
|
var stylesForHiding = "\n visibility: \"hidden\";\n top: -9999px !important;\n left: -9999px !important;\n ";
|
|
11885
12509
|
|
|
11886
|
-
var styles = concat_default()(_context = concat_default()(_context2 = concat_default()(_context3 = concat_default()(_context4 = concat_default()(_context5 = "\n position: fixed;\n ".concat(
|
|
12510
|
+
var styles = concat_default()(_context = concat_default()(_context2 = concat_default()(_context3 = concat_default()(_context4 = concat_default()(_context5 = "\n position: fixed;\n ".concat(getAlignment(adaSettings), ": ")).call(_context5, introPositionRight, "px;\n bottom: 8px;\n z-index: 10000;\n max-height: 300px;\n max-width: 250px;\n opacity: ")).call(_context4, this.isShown ? "1" : "0", ";\n height: ")).call(_context3, introDimensions === null || introDimensions === void 0 ? void 0 : introDimensions.height, "px;\n width: ")).call(_context2, introDimensions === null || introDimensions === void 0 ? void 0 : introDimensions.width, "px;\n\n ")).call(_context, Boolean(client === null || client === void 0 ? void 0 : client.features.chat_ui_v2) && concat_default()(_context6 = "\n max-height: auto;\n max-width: 350px;\n z-index: 9999;\n ".concat(getAlignment(adaSettings), ": 0;\n bottom: ")).call(_context6, buttonSize - 20, "px;\n "), "\n ");
|
|
11887
12511
|
|
|
11888
12512
|
if (!this.isShown) {
|
|
11889
12513
|
return styles + stylesForHiding;
|
|
@@ -11919,18 +12543,20 @@ function IntroFrame_mapStateToProps(storeState) {
|
|
|
11919
12543
|
introDimensions = storeState.introDimensions,
|
|
11920
12544
|
isIntroShown = storeState.isIntroShown,
|
|
11921
12545
|
isDrawerOpen = storeState.isDrawerOpen,
|
|
11922
|
-
language = storeState.language
|
|
12546
|
+
language = storeState.language,
|
|
12547
|
+
adaSettings = storeState.adaSettings;
|
|
11923
12548
|
return {
|
|
11924
12549
|
client: client,
|
|
11925
12550
|
buttonSize: client === null || client === void 0 ? void 0 : (_client$chat_button = client.chat_button) === null || _client$chat_button === void 0 ? void 0 : _client$chat_button.size,
|
|
11926
12551
|
introDimensions: introDimensions,
|
|
11927
12552
|
isIntroShown: isIntroShown,
|
|
11928
12553
|
isDrawerOpen: isDrawerOpen,
|
|
11929
|
-
language: language
|
|
12554
|
+
language: language,
|
|
12555
|
+
adaSettings: adaSettings
|
|
11930
12556
|
};
|
|
11931
12557
|
}
|
|
11932
12558
|
|
|
11933
|
-
/* harmony default export */ var components_IntroFrame = (connect(IntroFrame_mapStateToProps
|
|
12559
|
+
/* harmony default export */ var components_IntroFrame = (connect(IntroFrame_mapStateToProps)(IntroFrame));
|
|
11934
12560
|
;// CONCATENATED MODULE: ./src/client/components/MaskFrame/index.tsx
|
|
11935
12561
|
|
|
11936
12562
|
|
|
@@ -12037,7 +12663,7 @@ function MaskFrame_mapStateToProps(storeState) {
|
|
|
12037
12663
|
};
|
|
12038
12664
|
}
|
|
12039
12665
|
|
|
12040
|
-
/* harmony default export */ var components_MaskFrame = (connect(MaskFrame_mapStateToProps
|
|
12666
|
+
/* harmony default export */ var components_MaskFrame = (connect(MaskFrame_mapStateToProps)(MaskFrame));
|
|
12041
12667
|
;// CONCATENATED MODULE: ./src/client/components/XStorageFrame/index.tsx
|
|
12042
12668
|
|
|
12043
12669
|
|
|
@@ -12091,7 +12717,7 @@ var XStorageFrame = /*#__PURE__*/function (_Component) {
|
|
|
12091
12717
|
return XStorageFrame;
|
|
12092
12718
|
}(d);
|
|
12093
12719
|
|
|
12094
|
-
/* harmony default export */ var components_XStorageFrame = (connect(
|
|
12720
|
+
/* harmony default export */ var components_XStorageFrame = (connect()(XStorageFrame));
|
|
12095
12721
|
;// CONCATENATED MODULE: ./src/client/components/Container/index.tsx
|
|
12096
12722
|
|
|
12097
12723
|
|
|
@@ -12148,6 +12774,7 @@ function Container_isNativeReflectConstruct() { if (typeof Reflect === "undefine
|
|
|
12148
12774
|
|
|
12149
12775
|
|
|
12150
12776
|
|
|
12777
|
+
|
|
12151
12778
|
|
|
12152
12779
|
|
|
12153
12780
|
var Container = /*#__PURE__*/function (_Component) {
|
|
@@ -12205,8 +12832,13 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
12205
12832
|
_createClass(Container, [{
|
|
12206
12833
|
key: "componentDidMount",
|
|
12207
12834
|
value: function componentDidMount() {
|
|
12208
|
-
var
|
|
12209
|
-
|
|
12835
|
+
var _this$props = this.props,
|
|
12836
|
+
adaSettings = _this$props.adaSettings,
|
|
12837
|
+
setState = _this$props.setState;
|
|
12838
|
+
var onAdaEmbedLoaded = adaSettings.onAdaEmbedLoaded;
|
|
12839
|
+
setState({
|
|
12840
|
+
adaSettings: adaSettings
|
|
12841
|
+
}); // We want to make sure this happens before any publishEvent calls
|
|
12210
12842
|
// This is why it happens even before calling initialize
|
|
12211
12843
|
|
|
12212
12844
|
if (onAdaEmbedLoaded) {
|
|
@@ -12225,17 +12857,17 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
12225
12857
|
_client$ui_settings$e,
|
|
12226
12858
|
_this2 = this;
|
|
12227
12859
|
|
|
12228
|
-
var _this$
|
|
12229
|
-
isDrawerOpen = _this$
|
|
12230
|
-
appConnectionState = _this$
|
|
12231
|
-
initializationReject = _this$
|
|
12232
|
-
initializationResolve = _this$
|
|
12233
|
-
chatterToken = _this$
|
|
12234
|
-
client = _this$
|
|
12235
|
-
isChatWebsocketConnected = _this$
|
|
12236
|
-
adaSettings = _this$
|
|
12237
|
-
chatterInLiveChat = _this$
|
|
12238
|
-
messageService = _this$
|
|
12860
|
+
var _this$props2 = this.props,
|
|
12861
|
+
isDrawerOpen = _this$props2.isDrawerOpen,
|
|
12862
|
+
appConnectionState = _this$props2.appConnectionState,
|
|
12863
|
+
initializationReject = _this$props2.initializationReject,
|
|
12864
|
+
initializationResolve = _this$props2.initializationResolve,
|
|
12865
|
+
chatterToken = _this$props2.chatterToken,
|
|
12866
|
+
client = _this$props2.client,
|
|
12867
|
+
isChatWebsocketConnected = _this$props2.isChatWebsocketConnected,
|
|
12868
|
+
adaSettings = _this$props2.adaSettings,
|
|
12869
|
+
chatterInLiveChat = _this$props2.chatterInLiveChat,
|
|
12870
|
+
messageService = _this$props2.messageService;
|
|
12239
12871
|
var adaReadyCallback = adaSettings.adaReadyCallback,
|
|
12240
12872
|
toggleCallback = adaSettings.toggleCallback;
|
|
12241
12873
|
|
|
@@ -12271,7 +12903,6 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
12271
12903
|
campaignToTrigger = _this$state.campaignToTrigger,
|
|
12272
12904
|
campaignTriggerOptions = _this$state.campaignTriggerOptions,
|
|
12273
12905
|
followUpResponseId = _this$state.followUpResponseId;
|
|
12274
|
-
var chatChannel = messageService.getChannel(CHAT_IFRAME);
|
|
12275
12906
|
/* We wait for all necessary preconditions (e.g. necessary connections established) to be true,
|
|
12276
12907
|
* then trigger the campaign. campaignToTrigger is cleared after triggering, so we do not need
|
|
12277
12908
|
* to worry about duplicate triggers.
|
|
@@ -12294,13 +12925,17 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
12294
12925
|
} // If a follow-up response has been queued by a triggered Campaign, tell chat to show it
|
|
12295
12926
|
|
|
12296
12927
|
|
|
12297
|
-
if (
|
|
12298
|
-
chatChannel.
|
|
12299
|
-
|
|
12300
|
-
|
|
12301
|
-
|
|
12302
|
-
|
|
12303
|
-
|
|
12928
|
+
if (isChatWebsocketConnected && isDrawerOpen && followUpResponseId) {
|
|
12929
|
+
var chatChannel = messageService.getChannel(CHAT_IFRAME);
|
|
12930
|
+
|
|
12931
|
+
if (chatChannel) {
|
|
12932
|
+
chatChannel.postMessage(SEND_GREETING, {
|
|
12933
|
+
responseId: followUpResponseId
|
|
12934
|
+
});
|
|
12935
|
+
this.setState({
|
|
12936
|
+
followUpResponseId: null
|
|
12937
|
+
});
|
|
12938
|
+
}
|
|
12304
12939
|
}
|
|
12305
12940
|
|
|
12306
12941
|
if (prevProps.isDrawerOpen !== isDrawerOpen && toggleCallback) {
|
|
@@ -12324,10 +12959,10 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
12324
12959
|
}, {
|
|
12325
12960
|
key: "shouldRenderChatFrame",
|
|
12326
12961
|
get: function get() {
|
|
12327
|
-
var _this$
|
|
12328
|
-
isDrawerOpen = _this$
|
|
12329
|
-
adaSettings = _this$
|
|
12330
|
-
chatterInLiveChat = _this$
|
|
12962
|
+
var _this$props3 = this.props,
|
|
12963
|
+
isDrawerOpen = _this$props3.isDrawerOpen,
|
|
12964
|
+
adaSettings = _this$props3.adaSettings,
|
|
12965
|
+
chatterInLiveChat = _this$props3.chatterInLiveChat;
|
|
12331
12966
|
var parentElement = adaSettings.parentElement,
|
|
12332
12967
|
preload = adaSettings.preload;
|
|
12333
12968
|
var _this$state2 = this.state,
|
|
@@ -12371,9 +13006,9 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
12371
13006
|
}, {
|
|
12372
13007
|
key: "computeButtonFrameWidth",
|
|
12373
13008
|
value: function computeButtonFrameWidth() {
|
|
12374
|
-
var _this$
|
|
12375
|
-
entryContainer = _this$
|
|
12376
|
-
client = _this$
|
|
13009
|
+
var _this$props4 = this.props,
|
|
13010
|
+
entryContainer = _this$props4.entryContainer,
|
|
13011
|
+
client = _this$props4.client;
|
|
12377
13012
|
var buttonPadding = 26;
|
|
12378
13013
|
var iconWithSpace = 30;
|
|
12379
13014
|
var margins = 48;
|
|
@@ -12392,10 +13027,10 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
12392
13027
|
}, {
|
|
12393
13028
|
key: "unmount",
|
|
12394
13029
|
value: function unmount() {
|
|
12395
|
-
var _this$
|
|
12396
|
-
entryContainer = _this$
|
|
12397
|
-
messageService = _this$
|
|
12398
|
-
unmountCallback = _this$
|
|
13030
|
+
var _this$props5 = this.props,
|
|
13031
|
+
entryContainer = _this$props5.entryContainer,
|
|
13032
|
+
messageService = _this$props5.messageService,
|
|
13033
|
+
unmountCallback = _this$props5.unmountCallback;
|
|
12399
13034
|
entryContainer.parentNode.removeChild(entryContainer);
|
|
12400
13035
|
messageService.getAllChannels().forEach(function (channel) {
|
|
12401
13036
|
channel.clearTimeoutsAndListeners();
|
|
@@ -12407,9 +13042,9 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
12407
13042
|
}, {
|
|
12408
13043
|
key: "trackEvent",
|
|
12409
13044
|
value: function trackEvent(trackEventParams) {
|
|
12410
|
-
var _this$
|
|
12411
|
-
adaSettings = _this$
|
|
12412
|
-
chatterToken = _this$
|
|
13045
|
+
var _this$props6 = this.props,
|
|
13046
|
+
adaSettings = _this$props6.adaSettings,
|
|
13047
|
+
chatterToken = _this$props6.chatterToken;
|
|
12413
13048
|
trackEventImpl(adaSettings, chatterToken, trackEventParams);
|
|
12414
13049
|
}
|
|
12415
13050
|
}, {
|
|
@@ -12436,10 +13071,10 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
12436
13071
|
value: function triggerCampaign(params) {
|
|
12437
13072
|
var _client$marketing_cam;
|
|
12438
13073
|
|
|
12439
|
-
var _this$
|
|
12440
|
-
client = _this$
|
|
12441
|
-
isDrawerOpen = _this$
|
|
12442
|
-
setState = _this$
|
|
13074
|
+
var _this$props7 = this.props,
|
|
13075
|
+
client = _this$props7.client,
|
|
13076
|
+
isDrawerOpen = _this$props7.isDrawerOpen,
|
|
13077
|
+
setState = _this$props7.setState;
|
|
12443
13078
|
var chatHasBeenRendered = this.state.chatHasBeenRendered;
|
|
12444
13079
|
var campaignKey = params.campaignKey,
|
|
12445
13080
|
ignoreStatus = params.ignoreStatus,
|
|
@@ -12478,10 +13113,10 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
12478
13113
|
var _this4 = this;
|
|
12479
13114
|
|
|
12480
13115
|
var useDelay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
12481
|
-
var _this$
|
|
12482
|
-
adaSettings = _this$
|
|
12483
|
-
chatterToken = _this$
|
|
12484
|
-
client = _this$
|
|
13116
|
+
var _this$props8 = this.props,
|
|
13117
|
+
adaSettings = _this$props8.adaSettings,
|
|
13118
|
+
chatterToken = _this$props8.chatterToken,
|
|
13119
|
+
client = _this$props8.client;
|
|
12485
13120
|
|
|
12486
13121
|
if (!hasCampaignsEnabled(client)) {
|
|
12487
13122
|
return;
|
|
@@ -12509,13 +13144,13 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
12509
13144
|
var _handleEmbedAction = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/regenerator_default().mark(function _callee2(type, payload, id) {
|
|
12510
13145
|
var _this5 = this;
|
|
12511
13146
|
|
|
12512
|
-
var _this$
|
|
13147
|
+
var _this$props9, client, messageService, adaSettings, parentElement, localChannel, xStorageChannel, toggleChat, _this$props10, isDrawerOpen, drawerHasBeenOpened, chatterToken, contentToReturn, _this$props11, metaFields, setState, metaData, newMetaFields, _this$props12, sensitiveMetaFields, _setState, _ref, greeting, language, _newMetaFields, _sensitiveMetaFields, _ref$resetChatHistory, resetChatHistory, _setState2, chatHasBeenRendered, newState, _setState3, _ref2, body, duration, EXTRA_PROACTIVE_DELAY, canCreateProactive;
|
|
12513
13148
|
|
|
12514
13149
|
return regenerator_default().wrap(function _callee2$(_context3) {
|
|
12515
13150
|
while (1) {
|
|
12516
13151
|
switch (_context3.prev = _context3.next) {
|
|
12517
13152
|
case 0:
|
|
12518
|
-
_this$
|
|
13153
|
+
_this$props9 = this.props, client = _this$props9.client, messageService = _this$props9.messageService, adaSettings = _this$props9.adaSettings;
|
|
12519
13154
|
parentElement = adaSettings.parentElement;
|
|
12520
13155
|
localChannel = messageService.getChannel("local");
|
|
12521
13156
|
xStorageChannel = messageService.getChannel(XSTORAGE_IFRAME);
|
|
@@ -12529,7 +13164,7 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
12529
13164
|
|
|
12530
13165
|
case 6:
|
|
12531
13166
|
_context3.t0 = type;
|
|
12532
|
-
_context3.next = _context3.t0 === TRACK_EVENT ? 9 : _context3.t0 === TRIGGER_CAMPAIGN ? 14 : _context3.t0 === EVAL_CAMPAIGN_CONDITIONS ? 19 : _context3.t0 === TOGGLE ? 24 : _context3.t0 === GET_INFO ? 29 : _context3.t0 === SET_META_FIELDS ? 33 : _context3.t0 === "SET_SENSITIVE_META_FIELDS" ? 40 : _context3.t0 === STOP ? 45 : _context3.t0 === RESET ? 48 : _context3.t0 === DELETE_HISTORY ?
|
|
13167
|
+
_context3.next = _context3.t0 === TRACK_EVENT ? 9 : _context3.t0 === TRIGGER_CAMPAIGN ? 14 : _context3.t0 === EVAL_CAMPAIGN_CONDITIONS ? 19 : _context3.t0 === TOGGLE ? 24 : _context3.t0 === GET_INFO ? 29 : _context3.t0 === SET_META_FIELDS ? 33 : _context3.t0 === "SET_SENSITIVE_META_FIELDS" ? 40 : _context3.t0 === STOP ? 45 : _context3.t0 === RESET ? 48 : _context3.t0 === DELETE_HISTORY ? 66 : _context3.t0 === CREATE_PROACTIVE ? 78 : 89;
|
|
12533
13168
|
break;
|
|
12534
13169
|
|
|
12535
13170
|
case 9:
|
|
@@ -12543,7 +13178,7 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
12543
13178
|
|
|
12544
13179
|
case 12:
|
|
12545
13180
|
this.trackEvent(payload);
|
|
12546
|
-
return _context3.abrupt("break",
|
|
13181
|
+
return _context3.abrupt("break", 89);
|
|
12547
13182
|
|
|
12548
13183
|
case 14:
|
|
12549
13184
|
if (client.features.afm_proactive_messaging) {
|
|
@@ -12556,7 +13191,7 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
12556
13191
|
|
|
12557
13192
|
case 17:
|
|
12558
13193
|
this.triggerCampaign(payload);
|
|
12559
|
-
return _context3.abrupt("break",
|
|
13194
|
+
return _context3.abrupt("break", 89);
|
|
12560
13195
|
|
|
12561
13196
|
case 19:
|
|
12562
13197
|
if (client.features.afm_proactive_messaging) {
|
|
@@ -12569,7 +13204,7 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
12569
13204
|
|
|
12570
13205
|
case 22:
|
|
12571
13206
|
this.evaluateCampaignConditions(payload);
|
|
12572
|
-
return _context3.abrupt("break",
|
|
13207
|
+
return _context3.abrupt("break", 89);
|
|
12573
13208
|
|
|
12574
13209
|
case 24:
|
|
12575
13210
|
toggleChat = this.props.toggleChat;
|
|
@@ -12578,10 +13213,10 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
12578
13213
|
|
|
12579
13214
|
case 27:
|
|
12580
13215
|
localChannel.postMessage(TOGGLE_RESPONSE, null, id);
|
|
12581
|
-
return _context3.abrupt("break",
|
|
13216
|
+
return _context3.abrupt("break", 89);
|
|
12582
13217
|
|
|
12583
13218
|
case 29:
|
|
12584
|
-
_this$
|
|
13219
|
+
_this$props10 = this.props, isDrawerOpen = _this$props10.isDrawerOpen, drawerHasBeenOpened = _this$props10.drawerHasBeenOpened, chatterToken = _this$props10.chatterToken;
|
|
12585
13220
|
contentToReturn = {
|
|
12586
13221
|
isDrawerOpen: isDrawerOpen,
|
|
12587
13222
|
isChatOpen: isDrawerOpen || Boolean(parentElement),
|
|
@@ -12589,10 +13224,10 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
12589
13224
|
hasClosedChat: drawerHasBeenOpened && !isDrawerOpen
|
|
12590
13225
|
};
|
|
12591
13226
|
localChannel.postMessage(GET_INFO_RESPONSE, contentToReturn, id);
|
|
12592
|
-
return _context3.abrupt("break",
|
|
13227
|
+
return _context3.abrupt("break", 89);
|
|
12593
13228
|
|
|
12594
13229
|
case 33:
|
|
12595
|
-
_this$
|
|
13230
|
+
_this$props11 = this.props, metaFields = _this$props11.metaFields, setState = _this$props11.setState;
|
|
12596
13231
|
metaData = payload;
|
|
12597
13232
|
newMetaFields = Container_objectSpread(Container_objectSpread({}, metaFields), metaData);
|
|
12598
13233
|
_context3.next = 38;
|
|
@@ -12602,10 +13237,10 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
12602
13237
|
|
|
12603
13238
|
case 38:
|
|
12604
13239
|
localChannel.postMessage(SET_META_FIELDS_RESPONSE, null, id);
|
|
12605
|
-
return _context3.abrupt("break",
|
|
13240
|
+
return _context3.abrupt("break", 89);
|
|
12606
13241
|
|
|
12607
13242
|
case 40:
|
|
12608
|
-
_this$
|
|
13243
|
+
_this$props12 = this.props, sensitiveMetaFields = _this$props12.sensitiveMetaFields, _setState = _this$props12.setState;
|
|
12609
13244
|
_context3.next = 43;
|
|
12610
13245
|
return _setState({
|
|
12611
13246
|
sensitiveMetaFields: Container_objectSpread(Container_objectSpread({}, sensitiveMetaFields), payload)
|
|
@@ -12613,42 +13248,54 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
12613
13248
|
|
|
12614
13249
|
case 43:
|
|
12615
13250
|
localChannel.postMessage("SET_SENSITIVE_META_FIELDS_RESPONSE", null, id);
|
|
12616
|
-
return _context3.abrupt("break",
|
|
13251
|
+
return _context3.abrupt("break", 89);
|
|
12617
13252
|
|
|
12618
13253
|
case 45:
|
|
12619
13254
|
localChannel.postMessage(STOP_RESPONSE, null, id);
|
|
12620
13255
|
this.unmount();
|
|
12621
|
-
return _context3.abrupt("break",
|
|
13256
|
+
return _context3.abrupt("break", 89);
|
|
12622
13257
|
|
|
12623
13258
|
case 48:
|
|
12624
13259
|
_ref = payload, greeting = _ref.greeting, language = _ref.language, _newMetaFields = _ref.metaFields, _sensitiveMetaFields = _ref.sensitiveMetaFields, _ref$resetChatHistory = _ref.resetChatHistory, resetChatHistory = _ref$resetChatHistory === void 0 ? true : _ref$resetChatHistory;
|
|
12625
13260
|
_setState2 = this.props.setState;
|
|
12626
13261
|
chatHasBeenRendered = this.state.chatHasBeenRendered;
|
|
12627
|
-
|
|
12628
|
-
return _setState2({
|
|
13262
|
+
newState = {
|
|
12629
13263
|
greeting: greeting,
|
|
12630
13264
|
language: language,
|
|
12631
13265
|
metaFields: _newMetaFields,
|
|
12632
13266
|
sensitiveMetaFields: _sensitiveMetaFields
|
|
12633
|
-
}
|
|
13267
|
+
};
|
|
12634
13268
|
|
|
12635
|
-
case 53:
|
|
12636
13269
|
if (!resetChatHistory) {
|
|
12637
|
-
_context3.next =
|
|
13270
|
+
_context3.next = 61;
|
|
12638
13271
|
break;
|
|
12639
13272
|
}
|
|
12640
13273
|
|
|
12641
13274
|
if (xStorageChannel) {
|
|
12642
|
-
_context3.next =
|
|
13275
|
+
_context3.next = 55;
|
|
12643
13276
|
break;
|
|
12644
13277
|
}
|
|
12645
13278
|
|
|
12646
13279
|
throw new errors/* AdaEmbedError */.S("`xStorageChannel` is null");
|
|
12647
13280
|
|
|
12648
|
-
case
|
|
12649
|
-
xStorageChannel.postMessage(DELETE_HISTORY_EVENT);
|
|
13281
|
+
case 55:
|
|
13282
|
+
xStorageChannel.postMessage(DELETE_HISTORY_EVENT); // Clear chatter data from local storage
|
|
13283
|
+
|
|
13284
|
+
safeLocalStorage.removeItem(CHATTER_TOKEN_STORAGE_KEY);
|
|
13285
|
+
safeSessionStorage.removeItem(CHATTER_TOKEN_STORAGE_KEY);
|
|
13286
|
+
safeLocalStorage.removeItem(CHATTER_CREATED_STORAGE_KEY);
|
|
13287
|
+
safeSessionStorage.removeItem(CHATTER_CREATED_STORAGE_KEY); // And from state
|
|
13288
|
+
|
|
13289
|
+
newState = Container_objectSpread(Container_objectSpread({}, newState), {}, {
|
|
13290
|
+
chatterToken: null,
|
|
13291
|
+
chatterCreated: null
|
|
13292
|
+
});
|
|
13293
|
+
|
|
13294
|
+
case 61:
|
|
13295
|
+
_context3.next = 63;
|
|
13296
|
+
return _setState2(newState);
|
|
12650
13297
|
|
|
12651
|
-
case
|
|
13298
|
+
case 63:
|
|
12652
13299
|
if (chatHasBeenRendered) {
|
|
12653
13300
|
this.setState({
|
|
12654
13301
|
hideChatOverride: true
|
|
@@ -12660,36 +13307,51 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
12660
13307
|
}
|
|
12661
13308
|
|
|
12662
13309
|
localChannel.postMessage(RESET_RESPONSE, null, id);
|
|
12663
|
-
return _context3.abrupt("break",
|
|
13310
|
+
return _context3.abrupt("break", 89);
|
|
13311
|
+
|
|
13312
|
+
case 66:
|
|
13313
|
+
_setState3 = this.props.setState;
|
|
12664
13314
|
|
|
12665
|
-
case 60:
|
|
12666
13315
|
if (xStorageChannel) {
|
|
12667
|
-
_context3.next =
|
|
13316
|
+
_context3.next = 69;
|
|
12668
13317
|
break;
|
|
12669
13318
|
}
|
|
12670
13319
|
|
|
12671
13320
|
throw new errors/* AdaEmbedError */.S("`xStorageChannel` is null");
|
|
12672
13321
|
|
|
12673
|
-
case
|
|
13322
|
+
case 69:
|
|
13323
|
+
// Clear chatter data from local storage
|
|
13324
|
+
safeLocalStorage.removeItem(CHATTER_TOKEN_STORAGE_KEY);
|
|
13325
|
+
safeSessionStorage.removeItem(CHATTER_TOKEN_STORAGE_KEY);
|
|
13326
|
+
safeLocalStorage.removeItem(CHATTER_CREATED_STORAGE_KEY);
|
|
13327
|
+
safeSessionStorage.removeItem(CHATTER_CREATED_STORAGE_KEY); // And from state
|
|
13328
|
+
|
|
13329
|
+
_context3.next = 75;
|
|
13330
|
+
return _setState3({
|
|
13331
|
+
chatterToken: null,
|
|
13332
|
+
chatterCreated: null
|
|
13333
|
+
});
|
|
13334
|
+
|
|
13335
|
+
case 75:
|
|
12674
13336
|
xStorageChannel.postMessage(DELETE_HISTORY_EVENT);
|
|
12675
13337
|
localChannel.postMessage(DELETE_HISTORY_RESPONSE, null, id);
|
|
12676
|
-
return _context3.abrupt("break",
|
|
13338
|
+
return _context3.abrupt("break", 89);
|
|
12677
13339
|
|
|
12678
|
-
case
|
|
13340
|
+
case 78:
|
|
12679
13341
|
_ref2 = payload, body = _ref2.body, duration = _ref2.duration;
|
|
12680
13342
|
EXTRA_PROACTIVE_DELAY = 1000; // Free tier campaigns re-use the createProactive infrastructure
|
|
12681
13343
|
|
|
12682
13344
|
canCreateProactive = client.features.developer_proactive || client.features.afm_proactive_messaging_free_tier;
|
|
12683
13345
|
|
|
12684
13346
|
if (canCreateProactive) {
|
|
12685
|
-
_context3.next =
|
|
13347
|
+
_context3.next = 84;
|
|
12686
13348
|
break;
|
|
12687
13349
|
}
|
|
12688
13350
|
|
|
12689
13351
|
localChannel.postMessage(CREATE_PROACTIVE_RESPONSE, "Ada Embed - Proactive intros are not available in your feature set.", id, FetchEventStatus.Failure);
|
|
12690
13352
|
return _context3.abrupt("return");
|
|
12691
13353
|
|
|
12692
|
-
case
|
|
13354
|
+
case 84:
|
|
12693
13355
|
this.setState({
|
|
12694
13356
|
hideIntroOverride: true
|
|
12695
13357
|
}, /*#__PURE__*/(0,asyncToGenerator/* default */.Z)( /*#__PURE__*/regenerator_default().mark(function _callee() {
|
|
@@ -12727,14 +13389,14 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
12727
13389
|
}
|
|
12728
13390
|
}, _callee);
|
|
12729
13391
|
})));
|
|
12730
|
-
_context3.next =
|
|
13392
|
+
_context3.next = 87;
|
|
12731
13393
|
return wait(duration * 1000 + EXTRA_PROACTIVE_DELAY);
|
|
12732
13394
|
|
|
12733
|
-
case
|
|
13395
|
+
case 87:
|
|
12734
13396
|
localChannel.postMessage(CREATE_PROACTIVE_RESPONSE, null, id);
|
|
12735
|
-
return _context3.abrupt("break",
|
|
13397
|
+
return _context3.abrupt("break", 89);
|
|
12736
13398
|
|
|
12737
|
-
case
|
|
13399
|
+
case 89:
|
|
12738
13400
|
case "end":
|
|
12739
13401
|
return _context3.stop();
|
|
12740
13402
|
}
|
|
@@ -12796,13 +13458,13 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
12796
13458
|
var _initialize = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/regenerator_default().mark(function _callee3() {
|
|
12797
13459
|
var _context4;
|
|
12798
13460
|
|
|
12799
|
-
var _this$
|
|
13461
|
+
var _this$props13, adaSettings, setState, handle, cluster, domain, rolloutOverride, adaReadyCallback, privateMode, language, adaSettingsWithoutFunctions, clientResponse, newClient, baseApiUrl, businessEvents, marketingCampaigns, _context5, _context6, chatIsOn, rollout, chatterInLiveChat;
|
|
12800
13462
|
|
|
12801
13463
|
return regenerator_default().wrap(function _callee3$(_context8) {
|
|
12802
13464
|
while (1) {
|
|
12803
13465
|
switch (_context8.prev = _context8.next) {
|
|
12804
13466
|
case 0:
|
|
12805
|
-
_this$
|
|
13467
|
+
_this$props13 = this.props, adaSettings = _this$props13.adaSettings, setState = _this$props13.setState;
|
|
12806
13468
|
handle = adaSettings.handle, cluster = adaSettings.cluster, domain = adaSettings.domain, rolloutOverride = adaSettings.rolloutOverride, adaReadyCallback = adaSettings.adaReadyCallback, privateMode = adaSettings.privateMode;
|
|
12807
13469
|
language = adaSettings.language || get_browser_language(); // We do not want to store functions in our store. The rest of the values are useful however.
|
|
12808
13470
|
|
|
@@ -13007,10 +13669,10 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
13007
13669
|
key: "renderChatFrame",
|
|
13008
13670
|
value: function renderChatFrame() {
|
|
13009
13671
|
var name = CHAT_IFRAME;
|
|
13010
|
-
var _this$
|
|
13011
|
-
messageService = _this$
|
|
13012
|
-
store = _this$
|
|
13013
|
-
adaSettings = _this$
|
|
13672
|
+
var _this$props14 = this.props,
|
|
13673
|
+
messageService = _this$props14.messageService,
|
|
13674
|
+
store = _this$props14.store,
|
|
13675
|
+
adaSettings = _this$props14.adaSettings;
|
|
13014
13676
|
var _this$state3 = this.state,
|
|
13015
13677
|
campaignToTrigger = _this$state3.campaignToTrigger,
|
|
13016
13678
|
followUpResponseId = _this$state3.followUpResponseId;
|
|
@@ -13034,9 +13696,9 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
13034
13696
|
value: function renderIntroFrame() {
|
|
13035
13697
|
var _intro$style;
|
|
13036
13698
|
|
|
13037
|
-
var _this$
|
|
13038
|
-
adaSettings = _this$
|
|
13039
|
-
intro = _this$
|
|
13699
|
+
var _this$props15 = this.props,
|
|
13700
|
+
adaSettings = _this$props15.adaSettings,
|
|
13701
|
+
intro = _this$props15.intro;
|
|
13040
13702
|
var parentElement = adaSettings.parentElement;
|
|
13041
13703
|
var hideIntroOverride = this.state.hideIntroOverride;
|
|
13042
13704
|
|
|
@@ -13050,9 +13712,9 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
13050
13712
|
}, {
|
|
13051
13713
|
key: "renderMaskFrame",
|
|
13052
13714
|
value: function renderMaskFrame() {
|
|
13053
|
-
var _this$
|
|
13054
|
-
adaSettings = _this$
|
|
13055
|
-
hideMask = _this$
|
|
13715
|
+
var _this$props16 = this.props,
|
|
13716
|
+
adaSettings = _this$props16.adaSettings,
|
|
13717
|
+
hideMask = _this$props16.hideMask;
|
|
13056
13718
|
var parentElement = adaSettings.parentElement;
|
|
13057
13719
|
|
|
13058
13720
|
if (parentElement || hideMask) {
|
|
@@ -13064,13 +13726,12 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
13064
13726
|
}, {
|
|
13065
13727
|
key: "renderBackdrop",
|
|
13066
13728
|
value: function renderBackdrop() {
|
|
13067
|
-
var _this$
|
|
13068
|
-
client = _this$
|
|
13069
|
-
adaSettings = _this$
|
|
13070
|
-
chatDimensions = _this$
|
|
13071
|
-
isDrawerOpen = _this$
|
|
13072
|
-
isIntroShown = _this$
|
|
13073
|
-
language = _this$props16.language;
|
|
13729
|
+
var _this$props17 = this.props,
|
|
13730
|
+
client = _this$props17.client,
|
|
13731
|
+
adaSettings = _this$props17.adaSettings,
|
|
13732
|
+
chatDimensions = _this$props17.chatDimensions,
|
|
13733
|
+
isDrawerOpen = _this$props17.isDrawerOpen,
|
|
13734
|
+
isIntroShown = _this$props17.isIntroShown;
|
|
13074
13735
|
var parentElement = adaSettings.parentElement; // checking for a non-empty parentElement here to
|
|
13075
13736
|
// hide the backdrop in the SDKs
|
|
13076
13737
|
|
|
@@ -13081,15 +13742,11 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
13081
13742
|
var hasProactiveMessagesShown = Boolean(chatDimensions === null || chatDimensions === void 0 ? void 0 : chatDimensions.height);
|
|
13082
13743
|
var shouldShowShadow = isDrawerOpen || hasProactiveMessagesShown || isIntroShown;
|
|
13083
13744
|
return v("div", {
|
|
13084
|
-
style: Container_objectSpread(Container_objectSpread(
|
|
13745
|
+
style: Container_objectSpread(Container_objectSpread((0,defineProperty/* default */.Z)({
|
|
13085
13746
|
position: "fixed",
|
|
13086
13747
|
width: "635px",
|
|
13087
13748
|
height: "785px"
|
|
13088
|
-
},
|
|
13089
|
-
left: 0
|
|
13090
|
-
} : {
|
|
13091
|
-
right: 0
|
|
13092
|
-
}), isRTL(client, language) ? {
|
|
13749
|
+
}, getAlignment(adaSettings), 0), getAlignment(adaSettings) === "left" ? {
|
|
13093
13750
|
background: "linear-gradient(45deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0) 40.92%)"
|
|
13094
13751
|
} : {
|
|
13095
13752
|
background: "linear-gradient(315.92deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0) 40.92%)"
|
|
@@ -13121,7 +13778,8 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
13121
13778
|
var frameWidth = this.frameWidth; // when using text button style, the frame shouldn't be wider than the button
|
|
13122
13779
|
|
|
13123
13780
|
return v(components_ButtonFrame, {
|
|
13124
|
-
frameWidth: frameWidth
|
|
13781
|
+
frameWidth: frameWidth,
|
|
13782
|
+
adaSettings: adaSettings
|
|
13125
13783
|
});
|
|
13126
13784
|
}
|
|
13127
13785
|
}, {
|
|
@@ -13243,7 +13901,6 @@ var Embed = /*#__PURE__*/function () {
|
|
|
13243
13901
|
this.adaSettings = adaSettings;
|
|
13244
13902
|
this.unmountCallback = unmountCallback;
|
|
13245
13903
|
this.messageService = new MessageService();
|
|
13246
|
-
this.messageService.registerLocalChannel();
|
|
13247
13904
|
this.store = new StoreProxy(this.messageService);
|
|
13248
13905
|
this.localChannel = this.messageService.channels.local;
|
|
13249
13906
|
this.initialized = new (promise_default())(function (resolve, reject) {
|
|
@@ -13708,7 +14365,7 @@ window.__AdaEmbedConstructor = Embed;
|
|
|
13708
14365
|
/* harmony export */ });
|
|
13709
14366
|
var isModern = new RegExp("((CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS)[ +]+(14|(1[5-9]|[2-9]\\d|\\d{3,}))[_.]\\d+(?:[_.]\\d+)?)|((Chromium|Chrome)\\/(92|(9[3-9]|\\d{3,}))\\.\\d+(?:\\.\\d+)?)|(Version\\/(14|(1[5-9]|[2-9]\\d|\\d{3,}))\\.\\d+(?:\\.\\d+)? Safari\\/)|(Firefox\\/(91|(9[2-9]|\\d{3,}))\\.\\d+\\.\\d+)|(Firefox\\/(91|(9[2-9]|\\d{3,}))\\.\\d+(pre|[ab]\\d+[a-z]*)?)").test(navigator.userAgent);
|
|
13710
14367
|
var isProduction = "production" === "production";
|
|
13711
|
-
var embed2Version = "
|
|
14368
|
+
var embed2Version = "b927fbc";
|
|
13712
14369
|
|
|
13713
14370
|
/***/ }),
|
|
13714
14371
|
|
|
@@ -23105,7 +23762,7 @@ function _loadEmbed() {
|
|
|
23105
23762
|
polyfillVersionString = "legacy";
|
|
23106
23763
|
}
|
|
23107
23764
|
|
|
23108
|
-
embedScriptSource = concat_default()(_context16 = concat_default()(_context17 = "".concat(host, "/embed/")).call(_context17, polyfillVersionString, "/client/")).call(_context16, "
|
|
23765
|
+
embedScriptSource = concat_default()(_context16 = concat_default()(_context17 = "".concat(host, "/embed/")).call(_context17, polyfillVersionString, "/client/")).call(_context16, "b927fbc", "/index.js");
|
|
23109
23766
|
}
|
|
23110
23767
|
|
|
23111
23768
|
clientScriptExists = Boolean( true || // The client script is bundled with npm module
|
|
@@ -23232,10 +23889,10 @@ function createEmbedObject() {
|
|
|
23232
23889
|
handle: adaSettings.handle,
|
|
23233
23890
|
embedVersion: 2,
|
|
23234
23891
|
embedSettings: adaSettings,
|
|
23235
|
-
version: "1.0.
|
|
23892
|
+
version: "1.0.32",
|
|
23236
23893
|
isNpm: true,
|
|
23237
23894
|
hostPage: window.location.href,
|
|
23238
|
-
commitHash: "
|
|
23895
|
+
commitHash: "b927fbc"
|
|
23239
23896
|
}, {
|
|
23240
23897
|
sampleRate: 0.01 // 1% of logs will go through
|
|
23241
23898
|
|
|
@@ -23650,7 +24307,7 @@ function createEmbedObject() {
|
|
|
23650
24307
|
}
|
|
23651
24308
|
;// CONCATENATED MODULE: ./src/index-npm.ts
|
|
23652
24309
|
|
|
23653
|
-
Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
24310
|
+
Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2396));
|
|
23654
24311
|
/* harmony default export */ var index_npm = (createEmbedObject());
|
|
23655
24312
|
}();
|
|
23656
24313
|
module.exports = __webpack_exports__;
|