@ada-support/embed2 1.7.17 → 1.7.18
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/index.js
CHANGED
|
@@ -13260,7 +13260,7 @@ const client = new error_tracker_BrowserClient({
|
|
|
13260
13260
|
return event;
|
|
13261
13261
|
},
|
|
13262
13262
|
environment: "production",
|
|
13263
|
-
release: "1.7.
|
|
13263
|
+
release: "1.7.18-7c6b6b5",
|
|
13264
13264
|
sampleRate: 0.25,
|
|
13265
13265
|
autoSessionTracking: false,
|
|
13266
13266
|
// Integrations don't seem to work with Sentry: https://github.com/getsentry/sentry-javascript/issues/2541
|
|
@@ -13832,7 +13832,7 @@ function getEmbedURL(_ref) {
|
|
|
13832
13832
|
} else {
|
|
13833
13833
|
host = `http://${handle}.localhost:9001`;
|
|
13834
13834
|
}
|
|
13835
|
-
return `${host}/embed/${frameName}/${"
|
|
13835
|
+
return `${host}/embed/${frameName}/${"7c6b6b5"}/index.html`;
|
|
13836
13836
|
}
|
|
13837
13837
|
function constructQueryString(query) {
|
|
13838
13838
|
return Object.keys(query).map(key => {
|
|
@@ -13903,6 +13903,23 @@ function getChatURL(_ref3) {
|
|
|
13903
13903
|
}
|
|
13904
13904
|
return prodUrl;
|
|
13905
13905
|
}
|
|
13906
|
+
function escapeUrlParam(param) {
|
|
13907
|
+
/**
|
|
13908
|
+
* Escapes a URL parameter to prevent XSS attacks.
|
|
13909
|
+
*
|
|
13910
|
+
* The following characters are escaped:
|
|
13911
|
+
* & is replaced with &, but only if it is not already part of an existing HTML entity (&, <, >, ", ')
|
|
13912
|
+
* < is replaced with <
|
|
13913
|
+
* > is replaced with >
|
|
13914
|
+
* " is replaced with "
|
|
13915
|
+
* ' is replaced with '
|
|
13916
|
+
* / is replaced with /
|
|
13917
|
+
* ? is replaced with ?
|
|
13918
|
+
* = is replaced with =
|
|
13919
|
+
* . is replaced with .
|
|
13920
|
+
*/
|
|
13921
|
+
return param.replace(/&(?!amp)(?!lt;)(?!gt;)(?!quot)(?!apos;)/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/\//g, "/").replace(/\?/g, "?").replace(/=/g, "=").replace(/\./g, ".");
|
|
13922
|
+
}
|
|
13906
13923
|
;// CONCATENATED MODULE: ./src/client/store/actions/index.ts
|
|
13907
13924
|
|
|
13908
13925
|
|
|
@@ -14993,9 +15010,9 @@ async function log(message, extra, options) {
|
|
|
14993
15010
|
service: "embed",
|
|
14994
15011
|
env: "production",
|
|
14995
15012
|
embedVersion: 2,
|
|
14996
|
-
version: "1.7.
|
|
15013
|
+
version: "1.7.18",
|
|
14997
15014
|
isNpm: true,
|
|
14998
|
-
commitHash: "
|
|
15015
|
+
commitHash: "7c6b6b5"
|
|
14999
15016
|
}))
|
|
15000
15017
|
});
|
|
15001
15018
|
}
|
|
@@ -15008,6 +15025,7 @@ function alternative_bot_rollout_objectSpread(e) { for (var r = 1; r < arguments
|
|
|
15008
15025
|
|
|
15009
15026
|
|
|
15010
15027
|
|
|
15028
|
+
|
|
15011
15029
|
const PRIMARY_BOT_ASSIGNMENT_LABEL = "primary";
|
|
15012
15030
|
const ALTERNATIVE_BOT_ASSIGNMENT_LABEL = "alternative";
|
|
15013
15031
|
const BOT_ASSIGNMENT_STORAGE_KEY = "botAssignment";
|
|
@@ -15168,7 +15186,11 @@ async function fetchClientUsingAlternativeBotRollout(primaryBotClientObject, alt
|
|
|
15168
15186
|
language
|
|
15169
15187
|
} = adaSettings;
|
|
15170
15188
|
if (adaBotHandleOverride) {
|
|
15171
|
-
const
|
|
15189
|
+
const sanitizedAdaBotHandleOverride = escapeUrlParam(adaBotHandleOverride);
|
|
15190
|
+
if (sanitizedAdaBotHandleOverride !== adaBotHandleOverride) {
|
|
15191
|
+
return primaryBotClientObject;
|
|
15192
|
+
}
|
|
15193
|
+
const overrideBotClientObject = await fetchClient(sanitizedAdaBotHandleOverride, cluster, domain, language || get_browser_language());
|
|
15172
15194
|
if (!overrideBotClientObject) {
|
|
15173
15195
|
return null;
|
|
15174
15196
|
}
|
|
@@ -16033,7 +16055,7 @@ class ChatFrame extends d {
|
|
|
16033
16055
|
const hostPageUrlParams = new URL(window.location.href).searchParams;
|
|
16034
16056
|
const smsToken = hostPageUrlParams.get("adaSMSToken");
|
|
16035
16057
|
const queryParams = {
|
|
16036
|
-
embedVersion: "
|
|
16058
|
+
embedVersion: "7c6b6b5".slice(0, 7),
|
|
16037
16059
|
greeting,
|
|
16038
16060
|
language,
|
|
16039
16061
|
skipGreeting,
|