@brainfish-ai/widgets-initiator 1.4.0-beta.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/web.cjs.js +3 -3
- package/dist/web.cjs.js.map +1 -1
- package/dist/web.js +6 -6
- package/dist/web.js.map +1 -1
- package/package.json +1 -1
package/dist/web.js
CHANGED
|
@@ -31,10 +31,10 @@ var k, z;
|
|
|
31
31
|
(function() {
|
|
32
32
|
try {
|
|
33
33
|
var a = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {}, t = new a.Error().stack;
|
|
34
|
-
t && (a._sentryDebugIds = a._sentryDebugIds || {}, a._sentryDebugIds[t] = "
|
|
34
|
+
t && (a._sentryDebugIds = a._sentryDebugIds || {}, a._sentryDebugIds[t] = "fdedb0f2-a216-46da-93fc-d47cef526c46", a._sentryDebugIdIdentifier = "sentry-dbid-fdedb0f2-a216-46da-93fc-d47cef526c46");
|
|
35
35
|
} catch (n) {
|
|
36
36
|
}
|
|
37
|
-
})(), (typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {}).SENTRY_RELEASE = { id: "
|
|
37
|
+
})(), (typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {}).SENTRY_RELEASE = { id: "89c587444ae8fbf855d0a4a8b3b51a2a95a5849d" }, function(a) {
|
|
38
38
|
a.Sidebar = "sidebar", a.Searchbar = "searchbar";
|
|
39
39
|
}(k || (k = {})), k.Sidebar, k.Searchbar;
|
|
40
40
|
class ie extends Error {
|
|
@@ -62,7 +62,7 @@ const x = (a, t, n, i) => {
|
|
|
62
62
|
((e, u, s) => {
|
|
63
63
|
if (!navigator || navigator.userAgent.toLowerCase().includes("headless")) return;
|
|
64
64
|
const l = u.toJSON();
|
|
65
|
-
fetch(`${e || "https://app.brainfi.sh"}/api/trackError.widget.create`, { method: "POST", headers: { "Content-Type": "application/json", "api-key": s }, body: JSON.stringify({ error: `WebWidgetVersion: 1.4.0
|
|
65
|
+
fetch(`${e || "https://app.brainfi.sh"}/api/trackError.widget.create`, { method: "POST", headers: { "Content-Type": "application/json", "api-key": s }, body: JSON.stringify({ error: `WebWidgetVersion: 1.4.0. ${u.message}`, stack: u.stack, cause: { message: l.message, stack: l.stack, cause: l.cause } }) });
|
|
66
66
|
})(a, new ie(o, { cause: r }), i);
|
|
67
67
|
}, We = (a) => m(void 0, null, function* () {
|
|
68
68
|
let { widgetKey: t, apiHost: n } = a;
|
|
@@ -139,7 +139,7 @@ const x = (a, t, n, i) => {
|
|
|
139
139
|
let he = !1;
|
|
140
140
|
const qe = function(i, o, r) {
|
|
141
141
|
return m(this, arguments, function* (a, t, n) {
|
|
142
|
-
let e = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] :
|
|
142
|
+
let e = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "", u = arguments.length > 4 && arguments[4] !== void 0 && arguments[4];
|
|
143
143
|
if (t || x(n, new Error("Access key is required"), "Access key is required", a), !he) try {
|
|
144
144
|
window.BrainfishAnalytics("init", { apiUrl: e, accessKey: t, trackScreenViews: !0, trackAttributes: !0, trackOutgoingLinks: !0, enableRecording: u }), he = !0, yield ((s, l) => m(this, null, function* () {
|
|
145
145
|
if (document.getElementById("brainfish-analytics")) return window.BrainfishAnalytics;
|
|
@@ -779,7 +779,7 @@ function tt(a, t) {
|
|
|
779
779
|
return n.appendChild(i), n.appendChild(o), { fragment: n, iframe: r };
|
|
780
780
|
}
|
|
781
781
|
const nt = (a, t) => {
|
|
782
|
-
const n = se(a.overrides), i = ((o = a.overrides) == null ? void 0 : o.widgetHost) ||
|
|
782
|
+
const n = se(a.overrides), i = ((o = a.overrides) == null ? void 0 : o.widgetHost) || "https://agent.brainfi.sh";
|
|
783
783
|
var o;
|
|
784
784
|
const r = `${i}/?widgetKey=${a.widgetKey}`;
|
|
785
785
|
try {
|
|
@@ -847,7 +847,7 @@ ve.Widgets.init = (a) => m(void 0, null, function* () {
|
|
|
847
847
|
for (var r = arguments.length, e = new Array(r), u = 0; u < r; u++) e[u] = arguments[u];
|
|
848
848
|
(window.BrainfishAnalytics.q = window.BrainfishAnalytics.q || []).push(e);
|
|
849
849
|
});
|
|
850
|
-
const t = se(a.overrides), n = ((i = a.overrides) == null ? void 0 : i.analyticsApiHost) ||
|
|
850
|
+
const t = se(a.overrides), n = ((i = a.overrides) == null ? void 0 : i.analyticsApiHost) || "";
|
|
851
851
|
var i;
|
|
852
852
|
const { config: o } = yield We({ widgetKey: a.widgetKey, apiHost: t });
|
|
853
853
|
K || (K = function(r, e, u, s) {
|