@brainfish-ai/widgets-initiator 1.3.2-alpha.1 → 1.4.0-alpha.10
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/types/initIframeTrigger/index.d.ts +6 -0
- package/dist/types/initIframeTrigger/insertStyles.d.ts +1 -0
- package/dist/types/utils/createElementWithClass.d.ts +1 -0
- package/dist/types/utils/getApiHost.d.ts +3 -0
- package/dist/web.cjs.js +164 -2
- package/dist/web.cjs.js.map +1 -1
- package/dist/web.js +787 -167
- package/dist/web.js.map +1 -1
- package/package.json +7 -3
package/dist/web.js
CHANGED
|
@@ -1,217 +1,837 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
1
|
+
var Fe = Object.defineProperty, Oe = Object.defineProperties;
|
|
2
|
+
var Le = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var fe = Object.getOwnPropertySymbols;
|
|
4
|
+
var Be = Object.prototype.hasOwnProperty, Te = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var F = (r, t, n) => t in r ? Fe(r, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : r[t] = n, O = (r, t) => {
|
|
6
|
+
for (var n in t || (t = {}))
|
|
7
|
+
Be.call(t, n) && F(r, n, t[n]);
|
|
8
|
+
if (fe)
|
|
9
|
+
for (var n of fe(t))
|
|
10
|
+
Te.call(t, n) && F(r, n, t[n]);
|
|
11
|
+
return r;
|
|
12
|
+
}, L = (r, t) => Oe(r, Le(t));
|
|
13
|
+
var ce = (r, t, n) => F(r, typeof t != "symbol" ? t + "" : t, n);
|
|
14
|
+
var m = (r, t, n) => new Promise((l, o) => {
|
|
15
|
+
var a = (s) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
18
|
-
} catch (
|
|
19
|
-
i
|
|
17
|
+
d(n.next(s));
|
|
18
|
+
} catch (i) {
|
|
19
|
+
o(i);
|
|
20
20
|
}
|
|
21
|
-
}, e = (
|
|
21
|
+
}, e = (s) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
24
|
-
} catch (
|
|
25
|
-
i
|
|
23
|
+
d(n.throw(s));
|
|
24
|
+
} catch (i) {
|
|
25
|
+
o(i);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, d = (s) => s.done ? l(s.value) : Promise.resolve(s.value).then(a, e);
|
|
28
|
+
d((n = n.apply(r, t)).next());
|
|
29
29
|
});
|
|
30
|
-
var
|
|
30
|
+
var _, $;
|
|
31
31
|
(function() {
|
|
32
32
|
try {
|
|
33
|
-
var
|
|
34
|
-
|
|
35
|
-
} catch (
|
|
36
|
-
}
|
|
37
|
-
})(), (typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {}).SENTRY_RELEASE = { id: "
|
|
38
|
-
|
|
39
|
-
}(
|
|
40
|
-
class
|
|
41
|
-
constructor(
|
|
42
|
-
super(
|
|
43
|
-
|
|
44
|
-
this.name = "BrainfishWidgetError", this.cause =
|
|
33
|
+
var r = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {}, t = new r.Error().stack;
|
|
34
|
+
t && (r._sentryDebugIds = r._sentryDebugIds || {}, r._sentryDebugIds[t] = "42c83350-5e4c-4137-801d-f1d3fefc2b58", r._sentryDebugIdIdentifier = "sentry-dbid-42c83350-5e4c-4137-801d-f1d3fefc2b58");
|
|
35
|
+
} catch (n) {
|
|
36
|
+
}
|
|
37
|
+
})(), (typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {}).SENTRY_RELEASE = { id: "edb322d1f8179ed719ad46e757c431c8dddf9f92" }, function(r) {
|
|
38
|
+
r.Sidebar = "sidebar", r.Searchbar = "searchbar";
|
|
39
|
+
}(_ || (_ = {})), _.Sidebar, _.Searchbar;
|
|
40
|
+
class ae extends Error {
|
|
41
|
+
constructor(n, l) {
|
|
42
|
+
super(n, l);
|
|
43
|
+
ce(this, "cause");
|
|
44
|
+
this.name = "BrainfishWidgetError", this.cause = l == null ? void 0 : l.cause, Error.captureStackTrace && Error.captureStackTrace(this, ae), this.cause instanceof Error && this.cause.stack && (this.stack = this.stack + `
|
|
45
45
|
Caused by: ` + this.cause.stack);
|
|
46
46
|
}
|
|
47
47
|
toJSON() {
|
|
48
48
|
return { name: this.name, message: this.message, stack: this.stack, cause: this.cause instanceof Error ? { name: this.cause.name, message: this.cause.message, stack: this.cause.stack } : this.cause };
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
(function(
|
|
52
|
-
|
|
53
|
-
})(
|
|
54
|
-
const
|
|
55
|
-
let
|
|
56
|
-
if (
|
|
57
|
-
|
|
51
|
+
(function(r) {
|
|
52
|
+
r.LINK = "link", r.CALLBACK = "callback", r.EMAIL = "email", r.PHONE = "phone";
|
|
53
|
+
})($ || ($ = {}));
|
|
54
|
+
const w = (r, t, n, l) => {
|
|
55
|
+
let o = n, a = {};
|
|
56
|
+
if (t instanceof Error) try {
|
|
57
|
+
a = JSON.parse(t.message), o += ` - ${a.message || t.message}`;
|
|
58
58
|
} catch (e) {
|
|
59
|
-
|
|
59
|
+
o += ` - ${t.message}`;
|
|
60
60
|
}
|
|
61
|
-
else
|
|
62
|
-
((e,
|
|
61
|
+
else o += ` - ${String(t)}`;
|
|
62
|
+
((e, d, s) => {
|
|
63
63
|
if (!navigator || navigator.userAgent.toLowerCase().includes("headless")) return;
|
|
64
|
-
const
|
|
65
|
-
fetch(`${e || "https://app.brainfi.sh"}/api/trackError.widget.create`, { method: "POST", headers: { "Content-Type": "application/json", "api-key":
|
|
66
|
-
})(
|
|
67
|
-
},
|
|
68
|
-
let { widgetKey:
|
|
69
|
-
return function(
|
|
70
|
-
return
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
64
|
+
const i = d.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-alpha.10. ${d.message}`, stack: d.stack, cause: { message: i.message, stack: i.stack, cause: i.cause } }) });
|
|
66
|
+
})(r, new ae(o, { cause: a }), l);
|
|
67
|
+
}, $e = (r) => m(void 0, null, function* () {
|
|
68
|
+
let { widgetKey: t, apiHost: n } = r;
|
|
69
|
+
return function(l, o, a) {
|
|
70
|
+
return m(this, null, function* () {
|
|
71
|
+
let e, d = 0;
|
|
72
|
+
for (; d < 3; ) try {
|
|
73
|
+
const s = yield fetch(`${l}${o}`, { method: "POST", headers: { "Content-Type": "application/json", "api-key": a } });
|
|
74
|
+
if (!s.ok) throw new Error(`API call failed with status: ${s.status}`);
|
|
75
|
+
const i = yield s.json();
|
|
76
|
+
if (!i) throw new Error("Error loading config: empty response");
|
|
77
|
+
return i;
|
|
78
|
+
} catch (s) {
|
|
79
|
+
if (e = s, d++, d >= 3) throw w(l, s, "Error fetching config", a), e;
|
|
80
|
+
yield new Promise((i) => setTimeout(i, 500));
|
|
81
|
+
}
|
|
80
82
|
});
|
|
81
|
-
}(
|
|
82
|
-
}),
|
|
83
|
-
let { config:
|
|
84
|
-
const
|
|
85
|
-
return ["bodyActionButtons", "footerActionButtons", "nextBestActions"].forEach((
|
|
86
|
-
|
|
87
|
-
}),
|
|
88
|
-
},
|
|
83
|
+
}(n, "/api/searchWidgets.getConfigByKey", t);
|
|
84
|
+
}), Ke = (r) => {
|
|
85
|
+
let { config: t, apiKey: n, apiHost: l } = r;
|
|
86
|
+
const o = t.settings || {};
|
|
87
|
+
return ["bodyActionButtons", "footerActionButtons", "nextBestActions"].forEach((a) => {
|
|
88
|
+
o[a] && (o[a] = o[a].map((e) => e.type === $.CALLBACK && e.value ? L(O({}, e), { value: new Function(`return ${e.value}`)() }) : e));
|
|
89
|
+
}), L(O({}, t), { settings: o, apiHost: l, widgetMode: t.widgetType, apiKey: n });
|
|
90
|
+
}, oe = (r) => (r == null ? void 0 : r.apiHost) || "https://app.brainfi.sh", B = (() => {
|
|
89
91
|
if (typeof window == "undefined") return;
|
|
90
|
-
const
|
|
91
|
-
if (!(
|
|
92
|
-
const
|
|
93
|
-
return
|
|
94
|
-
})(),
|
|
95
|
-
let { apiHost:
|
|
92
|
+
const r = window.navigator.userAgent;
|
|
93
|
+
if (!(r.match(/iPad/i) || r.match(/iPhone/i))) return !1;
|
|
94
|
+
const t = r.match(/OS (\d+)_/i);
|
|
95
|
+
return t && parseInt(t[1], 10) <= 14;
|
|
96
|
+
})(), He = (r) => m(void 0, null, function* () {
|
|
97
|
+
let { apiHost: t, widgetKey: n, version: l } = r;
|
|
96
98
|
try {
|
|
97
|
-
const
|
|
98
|
-
return { widget: yield ((
|
|
99
|
-
return document.getElementById("brainfish-widget") ? window.Brainfish : new Promise((
|
|
100
|
-
const
|
|
101
|
-
|
|
99
|
+
const o = `https://cdn.jsdelivr.net/npm/@brainfish-ai/search-widget@${l}/dist/web.js`, a = B ? o.replace("web.js", "web.umd.js") : o;
|
|
100
|
+
return { widget: yield ((d) => m(void 0, null, function* () {
|
|
101
|
+
return document.getElementById("brainfish-widget") ? window.Brainfish : new Promise((s, i) => {
|
|
102
|
+
const u = document.createElement("script");
|
|
103
|
+
u.id = "brainfish-widget", u.src = d, u.type = B ? "text/javascript" : "module", u.async = !0, u.crossOrigin = "anonymous", u.onload = () => {
|
|
102
104
|
setTimeout(() => {
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
+
const c = window.Brainfish;
|
|
106
|
+
c ? s(c) : i(new Error("Failed to load Brainfish module"));
|
|
105
107
|
}, 200);
|
|
106
|
-
},
|
|
107
|
-
const f =
|
|
108
|
-
|
|
109
|
-
},
|
|
108
|
+
}, u.onerror = (c) => {
|
|
109
|
+
const f = c, h = { message: `Failed to load script: ${d}`, type: f.type, fileName: f.filename, lineNumber: f.lineno, columnNumber: f.colno, error: f.error ? f.error.toString() : "Unknown error" };
|
|
110
|
+
i(new Error(JSON.stringify(h)));
|
|
111
|
+
}, B || document.head.appendChild(u);
|
|
110
112
|
});
|
|
111
|
-
}))(
|
|
112
|
-
} catch (
|
|
113
|
-
|
|
113
|
+
}))(a) };
|
|
114
|
+
} catch (o) {
|
|
115
|
+
w(t, o, o.message, n);
|
|
114
116
|
}
|
|
115
|
-
}),
|
|
116
|
-
const
|
|
117
|
+
}), pe = /* @__PURE__ */ new Set(), qe = (r, t) => m(void 0, null, function* () {
|
|
118
|
+
const n = oe(r.overrides);
|
|
117
119
|
try {
|
|
118
|
-
if (
|
|
119
|
-
const
|
|
120
|
-
if (
|
|
121
|
-
const { widget:
|
|
122
|
-
return
|
|
123
|
-
let [
|
|
124
|
-
|
|
125
|
-
let
|
|
126
|
-
const
|
|
127
|
-
return
|
|
128
|
-
}(
|
|
129
|
-
}), function(e,
|
|
130
|
-
|
|
131
|
-
}(
|
|
120
|
+
if (pe.has(r.widgetKey)) return;
|
|
121
|
+
const l = yield He({ apiHost: n, widgetKey: r.widgetKey, version: t.version || "latest" });
|
|
122
|
+
if (l) {
|
|
123
|
+
const { widget: o } = l, a = Ke({ config: t, apiKey: r.widgetKey, apiHost: n });
|
|
124
|
+
return r.overrides && t.settings && Object.entries(r.overrides).forEach((e) => {
|
|
125
|
+
let [d, s] = e;
|
|
126
|
+
t.settings && d in t.settings && (t.settings[d] = function() {
|
|
127
|
+
let i = arguments.length > 1 ? arguments[1] : void 0;
|
|
128
|
+
const u = new Map((arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []).map((c) => [c.label, c]));
|
|
129
|
+
return i.forEach((c) => u.set(c.label, c)), Array.from(u.values());
|
|
130
|
+
}(t.settings[d], s));
|
|
131
|
+
}), function(e, d) {
|
|
132
|
+
d.widgetType === _.Searchbar || d.widgetType === "Search" ? e.SearchWidget.initStandard(d) : e.HelpWidget.initPopup(d);
|
|
133
|
+
}(o, a), pe.add(r.widgetKey), o;
|
|
132
134
|
}
|
|
133
|
-
} catch (
|
|
134
|
-
|
|
135
|
+
} catch (l) {
|
|
136
|
+
w(n, l, l.message, r.widgetKey);
|
|
135
137
|
}
|
|
136
138
|
});
|
|
137
|
-
let
|
|
138
|
-
const
|
|
139
|
-
return
|
|
140
|
-
let e = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : void 0,
|
|
141
|
-
if (
|
|
142
|
-
window.BrainfishAnalytics("init", { apiUrl: e, accessKey:
|
|
139
|
+
let ge = !1;
|
|
140
|
+
const ze = function(l, o, a) {
|
|
141
|
+
return m(this, arguments, function* (r, t, n) {
|
|
142
|
+
let e = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : void 0, d = arguments.length > 4 && arguments[4] !== void 0 && arguments[4];
|
|
143
|
+
if (t || w(n, new Error("Access key is required"), "Access key is required", r), !ge) try {
|
|
144
|
+
window.BrainfishAnalytics("init", { apiUrl: e, accessKey: t, trackScreenViews: !0, trackAttributes: !0, trackOutgoingLinks: !0, enableRecording: d }), ge = !0, yield ((s, i) => m(this, null, function* () {
|
|
143
145
|
if (document.getElementById("brainfish-analytics")) return window.BrainfishAnalytics;
|
|
144
|
-
const
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}, document.head.appendChild(
|
|
148
|
-
}))(
|
|
149
|
-
} catch (
|
|
150
|
-
|
|
146
|
+
const u = document.createElement("script");
|
|
147
|
+
u.id = "brainfish-analytics", u.src = "https://cdn.jsdelivr.net/npm/@brainfish-ai/web-tracker@latest/dist/tracker.js", u.type = "module", u.async = !0, u.crossOrigin = "anonymous", u.onerror = () => {
|
|
148
|
+
w(s, new Error(`Failed to load script: ${u.src}`), `Failed to load script: ${u.src}`, i);
|
|
149
|
+
}, document.head.appendChild(u);
|
|
150
|
+
}))(n, r);
|
|
151
|
+
} catch (s) {
|
|
152
|
+
w(n, s, "Failed to initialize BrainfishAnalytics", r);
|
|
151
153
|
}
|
|
152
154
|
});
|
|
153
155
|
};
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
156
|
+
function P(r, t) {
|
|
157
|
+
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
158
|
+
const l = document.createElement(r);
|
|
159
|
+
return l.className = t, Object.entries(n).forEach((o) => {
|
|
160
|
+
let [a, e] = o;
|
|
161
|
+
l.setAttribute(a, e);
|
|
162
|
+
}), l;
|
|
163
|
+
}
|
|
164
|
+
function se(r) {
|
|
165
|
+
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
166
|
+
}
|
|
167
|
+
var K = { exports: {} }, H = { exports: {} }, q = { exports: {} };
|
|
168
|
+
(function(r, t) {
|
|
169
|
+
function n(o) {
|
|
170
|
+
return Math.round(255 * o);
|
|
171
|
+
}
|
|
172
|
+
function l(o, a, e) {
|
|
173
|
+
return n(o) + "," + n(a) + "," + n(e);
|
|
174
|
+
}
|
|
175
|
+
t.__esModule = !0, t.default = void 0, t.default = function(o, a, e, d) {
|
|
176
|
+
if (d === void 0 && (d = l), a === 0) return d(e, e, e);
|
|
177
|
+
var s = (o % 360 + 360) % 360 / 60, i = (1 - Math.abs(2 * e - 1)) * a, u = i * (1 - Math.abs(s % 2 - 1)), c = 0, f = 0, h = 0;
|
|
178
|
+
s >= 0 && s < 1 ? (c = i, f = u) : s >= 1 && s < 2 ? (c = u, f = i) : s >= 2 && s < 3 ? (f = i, h = u) : s >= 3 && s < 4 ? (f = u, h = i) : s >= 4 && s < 5 ? (c = u, h = i) : s >= 5 && s < 6 && (c = i, h = u);
|
|
179
|
+
var g = e - i / 2;
|
|
180
|
+
return d(c + g, f + g, h + g);
|
|
181
|
+
}, r.exports = t.default;
|
|
182
|
+
})(q, q.exports);
|
|
183
|
+
var ie = q.exports, z = { exports: {} };
|
|
184
|
+
(function(r, t) {
|
|
185
|
+
t.__esModule = !0, t.default = void 0;
|
|
186
|
+
var n = { aliceblue: "f0f8ff", antiquewhite: "faebd7", aqua: "00ffff", aquamarine: "7fffd4", azure: "f0ffff", beige: "f5f5dc", bisque: "ffe4c4", black: "000", blanchedalmond: "ffebcd", blue: "0000ff", blueviolet: "8a2be2", brown: "a52a2a", burlywood: "deb887", cadetblue: "5f9ea0", chartreuse: "7fff00", chocolate: "d2691e", coral: "ff7f50", cornflowerblue: "6495ed", cornsilk: "fff8dc", crimson: "dc143c", cyan: "00ffff", darkblue: "00008b", darkcyan: "008b8b", darkgoldenrod: "b8860b", darkgray: "a9a9a9", darkgreen: "006400", darkgrey: "a9a9a9", darkkhaki: "bdb76b", darkmagenta: "8b008b", darkolivegreen: "556b2f", darkorange: "ff8c00", darkorchid: "9932cc", darkred: "8b0000", darksalmon: "e9967a", darkseagreen: "8fbc8f", darkslateblue: "483d8b", darkslategray: "2f4f4f", darkslategrey: "2f4f4f", darkturquoise: "00ced1", darkviolet: "9400d3", deeppink: "ff1493", deepskyblue: "00bfff", dimgray: "696969", dimgrey: "696969", dodgerblue: "1e90ff", firebrick: "b22222", floralwhite: "fffaf0", forestgreen: "228b22", fuchsia: "ff00ff", gainsboro: "dcdcdc", ghostwhite: "f8f8ff", gold: "ffd700", goldenrod: "daa520", gray: "808080", green: "008000", greenyellow: "adff2f", grey: "808080", honeydew: "f0fff0", hotpink: "ff69b4", indianred: "cd5c5c", indigo: "4b0082", ivory: "fffff0", khaki: "f0e68c", lavender: "e6e6fa", lavenderblush: "fff0f5", lawngreen: "7cfc00", lemonchiffon: "fffacd", lightblue: "add8e6", lightcoral: "f08080", lightcyan: "e0ffff", lightgoldenrodyellow: "fafad2", lightgray: "d3d3d3", lightgreen: "90ee90", lightgrey: "d3d3d3", lightpink: "ffb6c1", lightsalmon: "ffa07a", lightseagreen: "20b2aa", lightskyblue: "87cefa", lightslategray: "789", lightslategrey: "789", lightsteelblue: "b0c4de", lightyellow: "ffffe0", lime: "0f0", limegreen: "32cd32", linen: "faf0e6", magenta: "f0f", maroon: "800000", mediumaquamarine: "66cdaa", mediumblue: "0000cd", mediumorchid: "ba55d3", mediumpurple: "9370db", mediumseagreen: "3cb371", mediumslateblue: "7b68ee", mediumspringgreen: "00fa9a", mediumturquoise: "48d1cc", mediumvioletred: "c71585", midnightblue: "191970", mintcream: "f5fffa", mistyrose: "ffe4e1", moccasin: "ffe4b5", navajowhite: "ffdead", navy: "000080", oldlace: "fdf5e6", olive: "808000", olivedrab: "6b8e23", orange: "ffa500", orangered: "ff4500", orchid: "da70d6", palegoldenrod: "eee8aa", palegreen: "98fb98", paleturquoise: "afeeee", palevioletred: "db7093", papayawhip: "ffefd5", peachpuff: "ffdab9", peru: "cd853f", pink: "ffc0cb", plum: "dda0dd", powderblue: "b0e0e6", purple: "800080", rebeccapurple: "639", red: "f00", rosybrown: "bc8f8f", royalblue: "4169e1", saddlebrown: "8b4513", salmon: "fa8072", sandybrown: "f4a460", seagreen: "2e8b57", seashell: "fff5ee", sienna: "a0522d", silver: "c0c0c0", skyblue: "87ceeb", slateblue: "6a5acd", slategray: "708090", slategrey: "708090", snow: "fffafa", springgreen: "00ff7f", steelblue: "4682b4", tan: "d2b48c", teal: "008080", thistle: "d8bfd8", tomato: "ff6347", turquoise: "40e0d0", violet: "ee82ee", wheat: "f5deb3", white: "fff", whitesmoke: "f5f5f5", yellow: "ff0", yellowgreen: "9acd32" };
|
|
187
|
+
t.default = function(l) {
|
|
188
|
+
if (typeof l != "string") return l;
|
|
189
|
+
var o = l.toLowerCase();
|
|
190
|
+
return n[o] ? "#" + n[o] : l;
|
|
191
|
+
}, r.exports = t.default;
|
|
192
|
+
})(z, z.exports);
|
|
193
|
+
var Re = z.exports, R = { exports: {} };
|
|
194
|
+
(function(r, t) {
|
|
195
|
+
function n(s) {
|
|
196
|
+
var i = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
197
|
+
return n = function(u) {
|
|
198
|
+
if (u === null || !function(f) {
|
|
199
|
+
try {
|
|
200
|
+
return Function.toString.call(f).indexOf("[native code]") !== -1;
|
|
201
|
+
} catch (h) {
|
|
202
|
+
return typeof f == "function";
|
|
203
|
+
}
|
|
204
|
+
}(u)) return u;
|
|
205
|
+
if (typeof u != "function") throw new TypeError("Super expression must either be null or a function");
|
|
206
|
+
if (i !== void 0) {
|
|
207
|
+
if (i.has(u)) return i.get(u);
|
|
208
|
+
i.set(u, c);
|
|
209
|
+
}
|
|
210
|
+
function c() {
|
|
211
|
+
return function(f, h, g) {
|
|
212
|
+
if (l()) return Reflect.construct.apply(null, arguments);
|
|
213
|
+
var p = [null];
|
|
214
|
+
p.push.apply(p, h);
|
|
215
|
+
var b = new (f.bind.apply(f, p))();
|
|
216
|
+
return g && o(b, g.prototype), b;
|
|
217
|
+
}(u, arguments, a(this).constructor);
|
|
218
|
+
}
|
|
219
|
+
return c.prototype = Object.create(u.prototype, { constructor: { value: c, enumerable: !1, writable: !0, configurable: !0 } }), o(c, u);
|
|
220
|
+
}, n(s);
|
|
221
|
+
}
|
|
222
|
+
function l() {
|
|
223
|
+
try {
|
|
224
|
+
var s = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
225
|
+
}));
|
|
226
|
+
} catch (i) {
|
|
227
|
+
}
|
|
228
|
+
return (l = function() {
|
|
229
|
+
return !!s;
|
|
230
|
+
})();
|
|
231
|
+
}
|
|
232
|
+
function o(s, i) {
|
|
233
|
+
return o = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(u, c) {
|
|
234
|
+
return u.__proto__ = c, u;
|
|
235
|
+
}, o(s, i);
|
|
236
|
+
}
|
|
237
|
+
function a(s) {
|
|
238
|
+
return a = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(i) {
|
|
239
|
+
return i.__proto__ || Object.getPrototypeOf(i);
|
|
240
|
+
}, a(s);
|
|
241
|
+
}
|
|
242
|
+
t.__esModule = !0, t.default = void 0;
|
|
243
|
+
var e = { 1: `Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).
|
|
244
|
+
|
|
245
|
+
`, 2: `Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).
|
|
246
|
+
|
|
247
|
+
`, 3: `Passed an incorrect argument to a color function, please pass a string representation of a color.
|
|
248
|
+
|
|
249
|
+
`, 4: `Couldn't generate valid rgb string from %s, it returned %s.
|
|
250
|
+
|
|
251
|
+
`, 5: `Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.
|
|
252
|
+
|
|
253
|
+
`, 6: `Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).
|
|
254
|
+
|
|
255
|
+
`, 7: `Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).
|
|
256
|
+
|
|
257
|
+
`, 8: `Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.
|
|
258
|
+
|
|
259
|
+
`, 9: `Please provide a number of steps to the modularScale helper.
|
|
260
|
+
|
|
261
|
+
`, 10: `Please pass a number or one of the predefined scales to the modularScale helper as the ratio.
|
|
262
|
+
|
|
263
|
+
`, 11: `Invalid value passed as base to modularScale, expected number or em string but got "%s"
|
|
264
|
+
|
|
265
|
+
`, 12: `Expected a string ending in "px" or a number passed as the first argument to %s(), got "%s" instead.
|
|
266
|
+
|
|
267
|
+
`, 13: `Expected a string ending in "px" or a number passed as the second argument to %s(), got "%s" instead.
|
|
268
|
+
|
|
269
|
+
`, 14: `Passed invalid pixel value ("%s") to %s(), please pass a value like "12px" or 12.
|
|
270
|
+
|
|
271
|
+
`, 15: `Passed invalid base value ("%s") to %s(), please pass a value like "12px" or 12.
|
|
272
|
+
|
|
273
|
+
`, 16: `You must provide a template to this method.
|
|
274
|
+
|
|
275
|
+
`, 17: `You passed an unsupported selector state to this method.
|
|
276
|
+
|
|
277
|
+
`, 18: `minScreen and maxScreen must be provided as stringified numbers with the same units.
|
|
278
|
+
|
|
279
|
+
`, 19: `fromSize and toSize must be provided as stringified numbers with the same units.
|
|
280
|
+
|
|
281
|
+
`, 20: `expects either an array of objects or a single object with the properties prop, fromSize, and toSize.
|
|
282
|
+
|
|
283
|
+
`, 21: "expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n", 22: "expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n", 23: `fontFace expects a name of a font-family.
|
|
284
|
+
|
|
285
|
+
`, 24: `fontFace expects either the path to the font file(s) or a name of a local copy.
|
|
286
|
+
|
|
287
|
+
`, 25: `fontFace expects localFonts to be an array.
|
|
288
|
+
|
|
289
|
+
`, 26: `fontFace expects fileFormats to be an array.
|
|
290
|
+
|
|
291
|
+
`, 27: `radialGradient requries at least 2 color-stops to properly render.
|
|
292
|
+
|
|
293
|
+
`, 28: `Please supply a filename to retinaImage() as the first argument.
|
|
294
|
+
|
|
295
|
+
`, 29: `Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.
|
|
296
|
+
|
|
297
|
+
`, 30: "Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n", 31: `The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation
|
|
298
|
+
|
|
299
|
+
`, 32: `To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])
|
|
300
|
+
To pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')
|
|
301
|
+
|
|
302
|
+
`, 33: `The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation
|
|
303
|
+
|
|
304
|
+
`, 34: `borderRadius expects a radius value as a string or number as the second argument.
|
|
305
|
+
|
|
306
|
+
`, 35: `borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.
|
|
307
|
+
|
|
308
|
+
`, 36: `Property must be a string value.
|
|
309
|
+
|
|
310
|
+
`, 37: `Syntax Error at %s.
|
|
311
|
+
|
|
312
|
+
`, 38: `Formula contains a function that needs parentheses at %s.
|
|
313
|
+
|
|
314
|
+
`, 39: `Formula is missing closing parenthesis at %s.
|
|
315
|
+
|
|
316
|
+
`, 40: `Formula has too many closing parentheses at %s.
|
|
317
|
+
|
|
318
|
+
`, 41: `All values in a formula must have the same unit or be unitless.
|
|
319
|
+
|
|
320
|
+
`, 42: `Please provide a number of steps to the modularScale helper.
|
|
321
|
+
|
|
322
|
+
`, 43: `Please pass a number or one of the predefined scales to the modularScale helper as the ratio.
|
|
323
|
+
|
|
324
|
+
`, 44: `Invalid value passed as base to modularScale, expected number or em/rem string but got %s.
|
|
325
|
+
|
|
326
|
+
`, 45: `Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.
|
|
327
|
+
|
|
328
|
+
`, 46: `Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.
|
|
329
|
+
|
|
330
|
+
`, 47: `minScreen and maxScreen must be provided as stringified numbers with the same units.
|
|
331
|
+
|
|
332
|
+
`, 48: `fromSize and toSize must be provided as stringified numbers with the same units.
|
|
333
|
+
|
|
334
|
+
`, 49: `Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.
|
|
335
|
+
|
|
336
|
+
`, 50: `Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.
|
|
337
|
+
|
|
338
|
+
`, 51: `Expects the first argument object to have the properties prop, fromSize, and toSize.
|
|
339
|
+
|
|
340
|
+
`, 52: `fontFace expects either the path to the font file(s) or a name of a local copy.
|
|
341
|
+
|
|
342
|
+
`, 53: `fontFace expects localFonts to be an array.
|
|
343
|
+
|
|
344
|
+
`, 54: `fontFace expects fileFormats to be an array.
|
|
345
|
+
|
|
346
|
+
`, 55: `fontFace expects a name of a font-family.
|
|
347
|
+
|
|
348
|
+
`, 56: `linearGradient requries at least 2 color-stops to properly render.
|
|
349
|
+
|
|
350
|
+
`, 57: `radialGradient requries at least 2 color-stops to properly render.
|
|
351
|
+
|
|
352
|
+
`, 58: `Please supply a filename to retinaImage() as the first argument.
|
|
353
|
+
|
|
354
|
+
`, 59: `Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.
|
|
355
|
+
|
|
356
|
+
`, 60: "Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n", 61: `Property must be a string value.
|
|
357
|
+
|
|
358
|
+
`, 62: `borderRadius expects a radius value as a string or number as the second argument.
|
|
359
|
+
|
|
360
|
+
`, 63: `borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.
|
|
361
|
+
|
|
362
|
+
`, 64: `The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.
|
|
363
|
+
|
|
364
|
+
`, 65: `To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').
|
|
365
|
+
|
|
366
|
+
`, 66: `The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.
|
|
367
|
+
|
|
368
|
+
`, 67: `You must provide a template to this method.
|
|
369
|
+
|
|
370
|
+
`, 68: `You passed an unsupported selector state to this method.
|
|
371
|
+
|
|
372
|
+
`, 69: `Expected a string ending in "px" or a number passed as the first argument to %s(), got %s instead.
|
|
373
|
+
|
|
374
|
+
`, 70: `Expected a string ending in "px" or a number passed as the second argument to %s(), got %s instead.
|
|
375
|
+
|
|
376
|
+
`, 71: `Passed invalid pixel value %s to %s(), please pass a value like "12px" or 12.
|
|
377
|
+
|
|
378
|
+
`, 72: `Passed invalid base value %s to %s(), please pass a value like "12px" or 12.
|
|
379
|
+
|
|
380
|
+
`, 73: `Please provide a valid CSS variable.
|
|
381
|
+
|
|
382
|
+
`, 74: `CSS variable not found and no default was provided.
|
|
383
|
+
|
|
384
|
+
`, 75: `important requires a valid style object, got a %s instead.
|
|
385
|
+
|
|
386
|
+
`, 76: `fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.
|
|
387
|
+
|
|
388
|
+
`, 77: `remToPx expects a value in "rem" but you provided it in "%s".
|
|
389
|
+
|
|
390
|
+
`, 78: `base must be set in "px" or "%" but you set it in "%s".
|
|
391
|
+
` };
|
|
392
|
+
function d() {
|
|
393
|
+
for (var s = arguments.length, i = new Array(s), u = 0; u < s; u++) i[u] = arguments[u];
|
|
394
|
+
var c, f = i[0], h = [];
|
|
395
|
+
for (c = 1; c < i.length; c += 1) h.push(i[c]);
|
|
396
|
+
return h.forEach(function(g) {
|
|
397
|
+
f = f.replace(/%[a-z]/, g);
|
|
398
|
+
}), f;
|
|
399
|
+
}
|
|
400
|
+
t.default = function(s) {
|
|
401
|
+
var i, u;
|
|
402
|
+
function c(f) {
|
|
403
|
+
var h;
|
|
404
|
+
if (process.env.NODE_ENV === "production") h = s.call(this, "An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#" + f + " for more information.") || this;
|
|
405
|
+
else {
|
|
406
|
+
for (var g = arguments.length, p = new Array(g > 1 ? g - 1 : 0), b = 1; b < g; b++) p[b - 1] = arguments[b];
|
|
407
|
+
h = s.call(this, d.apply(void 0, [e[f]].concat(p))) || this;
|
|
408
|
+
}
|
|
409
|
+
return function(k) {
|
|
410
|
+
if (k === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
411
|
+
return k;
|
|
412
|
+
}(h);
|
|
413
|
+
}
|
|
414
|
+
return u = s, (i = c).prototype = Object.create(u.prototype), i.prototype.constructor = i, o(i, u), c;
|
|
415
|
+
}(n(Error)), r.exports = t.default;
|
|
416
|
+
})(R, R.exports);
|
|
417
|
+
var x = R.exports;
|
|
418
|
+
(function(r, t) {
|
|
419
|
+
t.__esModule = !0, t.default = function(g) {
|
|
420
|
+
if (typeof g != "string") throw new o.default(3);
|
|
421
|
+
var p = (0, l.default)(g);
|
|
422
|
+
if (p.match(e)) return { red: parseInt("" + p[1] + p[2], 16), green: parseInt("" + p[3] + p[4], 16), blue: parseInt("" + p[5] + p[6], 16) };
|
|
423
|
+
if (p.match(d)) {
|
|
424
|
+
var b = parseFloat((parseInt("" + p[7] + p[8], 16) / 255).toFixed(2));
|
|
425
|
+
return { red: parseInt("" + p[1] + p[2], 16), green: parseInt("" + p[3] + p[4], 16), blue: parseInt("" + p[5] + p[6], 16), alpha: b };
|
|
426
|
+
}
|
|
427
|
+
if (p.match(s)) return { red: parseInt("" + p[1] + p[1], 16), green: parseInt("" + p[2] + p[2], 16), blue: parseInt("" + p[3] + p[3], 16) };
|
|
428
|
+
if (p.match(i)) {
|
|
429
|
+
var k = parseFloat((parseInt("" + p[4] + p[4], 16) / 255).toFixed(2));
|
|
430
|
+
return { red: parseInt("" + p[1] + p[1], 16), green: parseInt("" + p[2] + p[2], 16), blue: parseInt("" + p[3] + p[3], 16), alpha: k };
|
|
431
|
+
}
|
|
432
|
+
var C = u.exec(p);
|
|
433
|
+
if (C) return { red: parseInt("" + C[1], 10), green: parseInt("" + C[2], 10), blue: parseInt("" + C[3], 10) };
|
|
434
|
+
var v = c.exec(p.substring(0, 50));
|
|
435
|
+
if (v) return { red: parseInt("" + v[1], 10), green: parseInt("" + v[2], 10), blue: parseInt("" + v[3], 10), alpha: parseFloat("" + v[4]) > 1 ? parseFloat("" + v[4]) / 100 : parseFloat("" + v[4]) };
|
|
436
|
+
var E = f.exec(p);
|
|
437
|
+
if (E) {
|
|
438
|
+
var Ee = parseInt("" + E[1], 10), Ae = parseInt("" + E[2], 10) / 100, Ie = parseInt("" + E[3], 10) / 100, ue = "rgb(" + (0, n.default)(Ee, Ae, Ie) + ")", A = u.exec(ue);
|
|
439
|
+
if (!A) throw new o.default(4, p, ue);
|
|
440
|
+
return { red: parseInt("" + A[1], 10), green: parseInt("" + A[2], 10), blue: parseInt("" + A[3], 10) };
|
|
441
|
+
}
|
|
442
|
+
var y = h.exec(p.substring(0, 50));
|
|
443
|
+
if (y) {
|
|
444
|
+
var je = parseInt("" + y[1], 10), Me = parseInt("" + y[2], 10) / 100, Pe = parseInt("" + y[3], 10) / 100, de = "rgb(" + (0, n.default)(je, Me, Pe) + ")", I = u.exec(de);
|
|
445
|
+
if (!I) throw new o.default(4, p, de);
|
|
446
|
+
return { red: parseInt("" + I[1], 10), green: parseInt("" + I[2], 10), blue: parseInt("" + I[3], 10), alpha: parseFloat("" + y[4]) > 1 ? parseFloat("" + y[4]) / 100 : parseFloat("" + y[4]) };
|
|
447
|
+
}
|
|
448
|
+
throw new o.default(5);
|
|
449
|
+
};
|
|
450
|
+
var n = a(ie), l = a(Re), o = a(x);
|
|
451
|
+
function a(g) {
|
|
452
|
+
return g && g.__esModule ? g : { default: g };
|
|
453
|
+
}
|
|
454
|
+
var e = /^#[a-fA-F0-9]{6}$/, d = /^#[a-fA-F0-9]{8}$/, s = /^#[a-fA-F0-9]{3}$/, i = /^#[a-fA-F0-9]{4}$/, u = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i, c = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i, f = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i, h = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
455
|
+
r.exports = t.default;
|
|
456
|
+
})(H, H.exports);
|
|
457
|
+
var le = H.exports;
|
|
458
|
+
(function(r, t) {
|
|
459
|
+
t.__esModule = !0, t.default = function(o) {
|
|
460
|
+
if (o === "transparent") return 0;
|
|
461
|
+
var a = (0, l.default)(o), e = Object.keys(a).map(function(u) {
|
|
462
|
+
var c = a[u] / 255;
|
|
463
|
+
return c <= 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);
|
|
464
|
+
}), d = e[0], s = e[1], i = e[2];
|
|
465
|
+
return parseFloat((0.2126 * d + 0.7152 * s + 0.0722 * i).toFixed(3));
|
|
466
|
+
};
|
|
467
|
+
var n, l = (n = le) && n.__esModule ? n : { default: n };
|
|
468
|
+
r.exports = t.default;
|
|
469
|
+
})(K, K.exports);
|
|
470
|
+
const We = se(K.exports);
|
|
471
|
+
var W = { exports: {} }, D = { exports: {} };
|
|
472
|
+
(function(r, t) {
|
|
473
|
+
function n(l, o, a) {
|
|
474
|
+
return function() {
|
|
475
|
+
var e = a.concat(Array.prototype.slice.call(arguments));
|
|
476
|
+
return e.length >= o ? l.apply(this, e) : n(l, o, e);
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
t.__esModule = !0, t.default = function(l) {
|
|
480
|
+
return n(l, l.length, []);
|
|
481
|
+
}, r.exports = t.default;
|
|
482
|
+
})(D, D.exports);
|
|
483
|
+
var he, j, ve = D.exports, N = { exports: {} };
|
|
484
|
+
he = N, (j = N.exports).__esModule = !0, j.default = void 0, j.default = function(r, t, n) {
|
|
485
|
+
return Math.max(r, Math.min(t, n));
|
|
486
|
+
}, he.exports = j.default;
|
|
487
|
+
var ye = N.exports, Y = { exports: {} }, G = { exports: {} };
|
|
488
|
+
(function(r, t) {
|
|
489
|
+
t.__esModule = !0, t.default = void 0, t.default = function(n) {
|
|
490
|
+
var l, o = n.red / 255, a = n.green / 255, e = n.blue / 255, d = Math.max(o, a, e), s = Math.min(o, a, e), i = (d + s) / 2;
|
|
491
|
+
if (d === s) return n.alpha !== void 0 ? { hue: 0, saturation: 0, lightness: i, alpha: n.alpha } : { hue: 0, saturation: 0, lightness: i };
|
|
492
|
+
var u = d - s, c = i > 0.5 ? u / (2 - d - s) : u / (d + s);
|
|
493
|
+
switch (d) {
|
|
494
|
+
case o:
|
|
495
|
+
l = (a - e) / u + (a < e ? 6 : 0);
|
|
496
|
+
break;
|
|
497
|
+
case a:
|
|
498
|
+
l = (e - o) / u + 2;
|
|
499
|
+
break;
|
|
500
|
+
default:
|
|
501
|
+
l = (o - a) / u + 4;
|
|
502
|
+
}
|
|
503
|
+
return l *= 60, n.alpha !== void 0 ? { hue: l, saturation: c, lightness: i, alpha: n.alpha } : { hue: l, saturation: c, lightness: i };
|
|
504
|
+
}, r.exports = t.default;
|
|
505
|
+
})(G, G.exports);
|
|
506
|
+
var De = G.exports;
|
|
507
|
+
(function(r, t) {
|
|
508
|
+
t.__esModule = !0, t.default = function(a) {
|
|
509
|
+
return (0, l.default)((0, n.default)(a));
|
|
510
|
+
};
|
|
511
|
+
var n = o(le), l = o(De);
|
|
512
|
+
function o(a) {
|
|
513
|
+
return a && a.__esModule ? a : { default: a };
|
|
514
|
+
}
|
|
515
|
+
r.exports = t.default;
|
|
516
|
+
})(Y, Y.exports);
|
|
517
|
+
var we = Y.exports, J = { exports: {} }, Z = { exports: {} }, U = { exports: {} }, V = { exports: {} };
|
|
518
|
+
(function(r, t) {
|
|
519
|
+
t.__esModule = !0, t.default = void 0, t.default = function(n) {
|
|
520
|
+
return n.length === 7 && n[1] === n[2] && n[3] === n[4] && n[5] === n[6] ? "#" + n[1] + n[3] + n[5] : n;
|
|
521
|
+
}, r.exports = t.default;
|
|
522
|
+
})(V, V.exports);
|
|
523
|
+
var xe = V.exports, Q = { exports: {} };
|
|
524
|
+
(function(r, t) {
|
|
525
|
+
t.__esModule = !0, t.default = void 0, t.default = function(n) {
|
|
526
|
+
var l = n.toString(16);
|
|
527
|
+
return l.length === 1 ? "0" + l : l;
|
|
528
|
+
}, r.exports = t.default;
|
|
529
|
+
})(Q, Q.exports);
|
|
530
|
+
var _e = Q.exports;
|
|
531
|
+
(function(r, t) {
|
|
532
|
+
t.__esModule = !0, t.default = void 0;
|
|
533
|
+
var n = a(ie), l = a(xe), o = a(_e);
|
|
534
|
+
function a(s) {
|
|
535
|
+
return s && s.__esModule ? s : { default: s };
|
|
536
|
+
}
|
|
537
|
+
function e(s) {
|
|
538
|
+
return (0, o.default)(Math.round(255 * s));
|
|
539
|
+
}
|
|
540
|
+
function d(s, i, u) {
|
|
541
|
+
return (0, l.default)("#" + e(s) + e(i) + e(u));
|
|
542
|
+
}
|
|
543
|
+
t.default = function(s, i, u) {
|
|
544
|
+
return (0, n.default)(s, i, u, d);
|
|
545
|
+
}, r.exports = t.default;
|
|
546
|
+
})(U, U.exports);
|
|
547
|
+
var Se = U.exports;
|
|
548
|
+
(function(r, t) {
|
|
549
|
+
t.__esModule = !0, t.default = function(a, e, d) {
|
|
550
|
+
if (typeof a == "number" && typeof e == "number" && typeof d == "number") return (0, n.default)(a, e, d);
|
|
551
|
+
if (typeof a == "object" && e === void 0 && d === void 0) return (0, n.default)(a.hue, a.saturation, a.lightness);
|
|
552
|
+
throw new l.default(1);
|
|
553
|
+
};
|
|
554
|
+
var n = o(Se), l = o(x);
|
|
555
|
+
function o(a) {
|
|
556
|
+
return a && a.__esModule ? a : { default: a };
|
|
557
|
+
}
|
|
558
|
+
r.exports = t.default;
|
|
559
|
+
})(Z, Z.exports);
|
|
560
|
+
var Ne = Z.exports, X = { exports: {} };
|
|
561
|
+
(function(r, t) {
|
|
562
|
+
t.__esModule = !0, t.default = function(e, d, s, i) {
|
|
563
|
+
if (typeof e == "number" && typeof d == "number" && typeof s == "number" && typeof i == "number") return i >= 1 ? (0, n.default)(e, d, s) : "rgba(" + (0, l.default)(e, d, s) + "," + i + ")";
|
|
564
|
+
if (typeof e == "object" && d === void 0 && s === void 0 && i === void 0) return e.alpha >= 1 ? (0, n.default)(e.hue, e.saturation, e.lightness) : "rgba(" + (0, l.default)(e.hue, e.saturation, e.lightness) + "," + e.alpha + ")";
|
|
565
|
+
throw new o.default(2);
|
|
566
|
+
};
|
|
567
|
+
var n = a(Se), l = a(ie), o = a(x);
|
|
568
|
+
function a(e) {
|
|
569
|
+
return e && e.__esModule ? e : { default: e };
|
|
570
|
+
}
|
|
571
|
+
r.exports = t.default;
|
|
572
|
+
})(X, X.exports);
|
|
573
|
+
var Ye = X.exports, ee = { exports: {} };
|
|
574
|
+
(function(r, t) {
|
|
575
|
+
t.__esModule = !0, t.default = function(e, d, s) {
|
|
576
|
+
if (typeof e == "number" && typeof d == "number" && typeof s == "number") return (0, n.default)("#" + (0, l.default)(e) + (0, l.default)(d) + (0, l.default)(s));
|
|
577
|
+
if (typeof e == "object" && d === void 0 && s === void 0) return (0, n.default)("#" + (0, l.default)(e.red) + (0, l.default)(e.green) + (0, l.default)(e.blue));
|
|
578
|
+
throw new o.default(6);
|
|
579
|
+
};
|
|
580
|
+
var n = a(xe), l = a(_e), o = a(x);
|
|
581
|
+
function a(e) {
|
|
582
|
+
return e && e.__esModule ? e : { default: e };
|
|
583
|
+
}
|
|
584
|
+
r.exports = t.default;
|
|
585
|
+
})(ee, ee.exports);
|
|
586
|
+
var ke = ee.exports, te = { exports: {} };
|
|
587
|
+
(function(r, t) {
|
|
588
|
+
t.__esModule = !0, t.default = function(e, d, s, i) {
|
|
589
|
+
if (typeof e == "string" && typeof d == "number") {
|
|
590
|
+
var u = (0, n.default)(e);
|
|
591
|
+
return "rgba(" + u.red + "," + u.green + "," + u.blue + "," + d + ")";
|
|
592
|
+
}
|
|
593
|
+
if (typeof e == "number" && typeof d == "number" && typeof s == "number" && typeof i == "number") return i >= 1 ? (0, l.default)(e, d, s) : "rgba(" + e + "," + d + "," + s + "," + i + ")";
|
|
594
|
+
if (typeof e == "object" && d === void 0 && s === void 0 && i === void 0) return e.alpha >= 1 ? (0, l.default)(e.red, e.green, e.blue) : "rgba(" + e.red + "," + e.green + "," + e.blue + "," + e.alpha + ")";
|
|
595
|
+
throw new o.default(7);
|
|
596
|
+
};
|
|
597
|
+
var n = a(le), l = a(ke), o = a(x);
|
|
598
|
+
function a(e) {
|
|
599
|
+
return e && e.__esModule ? e : { default: e };
|
|
600
|
+
}
|
|
601
|
+
r.exports = t.default;
|
|
602
|
+
})(te, te.exports);
|
|
603
|
+
var Ge = te.exports;
|
|
604
|
+
(function(r, t) {
|
|
605
|
+
t.__esModule = !0, t.default = function(f) {
|
|
606
|
+
if (typeof f != "object") throw new e.default(8);
|
|
607
|
+
if (i(f)) return (0, a.default)(f);
|
|
608
|
+
if (s(f)) return (0, o.default)(f);
|
|
609
|
+
if (c(f)) return (0, l.default)(f);
|
|
610
|
+
if (u(f)) return (0, n.default)(f);
|
|
611
|
+
throw new e.default(8);
|
|
612
|
+
};
|
|
613
|
+
var n = d(Ne), l = d(Ye), o = d(ke), a = d(Ge), e = d(x);
|
|
614
|
+
function d(f) {
|
|
615
|
+
return f && f.__esModule ? f : { default: f };
|
|
616
|
+
}
|
|
617
|
+
var s = function(f) {
|
|
618
|
+
return typeof f.red == "number" && typeof f.green == "number" && typeof f.blue == "number" && (typeof f.alpha != "number" || f.alpha === void 0);
|
|
619
|
+
}, i = function(f) {
|
|
620
|
+
return typeof f.red == "number" && typeof f.green == "number" && typeof f.blue == "number" && typeof f.alpha == "number";
|
|
621
|
+
}, u = function(f) {
|
|
622
|
+
return typeof f.hue == "number" && typeof f.saturation == "number" && typeof f.lightness == "number" && (typeof f.alpha != "number" || f.alpha === void 0);
|
|
623
|
+
}, c = function(f) {
|
|
624
|
+
return typeof f.hue == "number" && typeof f.saturation == "number" && typeof f.lightness == "number" && typeof f.alpha == "number";
|
|
625
|
+
};
|
|
626
|
+
r.exports = t.default;
|
|
627
|
+
})(J, J.exports);
|
|
628
|
+
var Ce = J.exports;
|
|
629
|
+
(function(r, t) {
|
|
630
|
+
t.__esModule = !0, t.default = void 0;
|
|
631
|
+
var n = e(ve), l = e(ye), o = e(we), a = e(Ce);
|
|
632
|
+
function e(i) {
|
|
633
|
+
return i && i.__esModule ? i : { default: i };
|
|
634
|
+
}
|
|
635
|
+
function d() {
|
|
636
|
+
return d = Object.assign ? Object.assign.bind() : function(i) {
|
|
637
|
+
for (var u = 1; u < arguments.length; u++) {
|
|
638
|
+
var c = arguments[u];
|
|
639
|
+
for (var f in c) Object.prototype.hasOwnProperty.call(c, f) && (i[f] = c[f]);
|
|
640
|
+
}
|
|
641
|
+
return i;
|
|
642
|
+
}, d.apply(this, arguments);
|
|
643
|
+
}
|
|
644
|
+
var s = (0, n.default)(function(i, u) {
|
|
645
|
+
if (u === "transparent") return u;
|
|
646
|
+
var c = (0, o.default)(u);
|
|
647
|
+
return (0, a.default)(d({}, c, { lightness: (0, l.default)(0, 1, c.lightness - parseFloat(i)) }));
|
|
648
|
+
});
|
|
649
|
+
t.default = s, r.exports = t.default;
|
|
650
|
+
})(W, W.exports);
|
|
651
|
+
const Je = se(W.exports);
|
|
652
|
+
var ne = { exports: {} };
|
|
653
|
+
(function(r, t) {
|
|
654
|
+
t.__esModule = !0, t.default = void 0;
|
|
655
|
+
var n = e(ve), l = e(ye), o = e(we), a = e(Ce);
|
|
656
|
+
function e(i) {
|
|
657
|
+
return i && i.__esModule ? i : { default: i };
|
|
658
|
+
}
|
|
659
|
+
function d() {
|
|
660
|
+
return d = Object.assign ? Object.assign.bind() : function(i) {
|
|
661
|
+
for (var u = 1; u < arguments.length; u++) {
|
|
662
|
+
var c = arguments[u];
|
|
663
|
+
for (var f in c) Object.prototype.hasOwnProperty.call(c, f) && (i[f] = c[f]);
|
|
664
|
+
}
|
|
665
|
+
return i;
|
|
666
|
+
}, d.apply(this, arguments);
|
|
667
|
+
}
|
|
668
|
+
var s = (0, n.default)(function(i, u) {
|
|
669
|
+
if (u === "transparent") return u;
|
|
670
|
+
var c = (0, o.default)(u);
|
|
671
|
+
return (0, a.default)(d({}, c, { lightness: (0, l.default)(0, 1, c.lightness + parseFloat(i)) }));
|
|
672
|
+
});
|
|
673
|
+
t.default = s, r.exports = t.default;
|
|
674
|
+
})(ne, ne.exports);
|
|
675
|
+
const Ze = se(ne.exports), me = /* @__PURE__ */ new Set(), S = "bf-iframe-container", re = "bf-trigger-button";
|
|
676
|
+
function Ue(r) {
|
|
677
|
+
if (!document.querySelector("style[data-widget-styles]")) {
|
|
678
|
+
var t, n;
|
|
679
|
+
(function() {
|
|
680
|
+
let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "#000", o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "FFF";
|
|
681
|
+
const a = document.createElement("style");
|
|
682
|
+
a.attributes.setNamedItem(document.createAttribute("data-widget-styles"));
|
|
683
|
+
const e = We(l) > 0.5;
|
|
684
|
+
a.textContent = `
|
|
685
|
+
.bf-trigger-button{position:fixed;bottom:16px;right:16px;width:56px;height:56px;border-radius:50%;border:none;box-shadow:0 20px 25px -5px #1212171a,0 10px 10px -5px #1212170a;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:1000;padding:12px;gap:10px;overflow:hidden}.trigger-button-icon{width:36px;height:36px;position:relative}.trigger-button-icon svg{width:100%;height:100%;position:absolute;inset:0}.trigger-button-icon>svg>path{transition:transform .3s ease,opacity .3s ease;transform:scale(.5);transform-origin:center;opacity:0}.trigger-button-icon svg.visible{display:block}.trigger-button-icon>svg.visible>path{opacity:1;transform:scale(1)}.trigger-iframe{position:relative;width:100%;height:100%;border:none;outline:none;transform:translateZ(0)}.bf-iframe-container{position:fixed;bottom:0;right:0;width:100vw;height:100vh;border:none;overflow:hidden;z-index:999;opacity:0;pointer-events:none;transform:translateY(20px);transition:opacity .3s ease,transform .3s ease,width .2s ease-in-out,height .2s ease-in-out}.bf-iframe-container.open{opacity:1;transform:translateY(0);pointer-events:auto;top:0;left:0}@media (min-width: 768px){.bf-iframe-container{bottom:80px;right:24px;width:448px;height:min(750px,calc(100vh - 80px));border-radius:8px;border:1px solid var(--Dark-300, #D4D4D4);box-shadow:0 20px 25px -5px #1212171a,0 10px 10px -5px #1212170a}.bf-iframe-container.open{top:unset;left:unset}.bf-iframe-container.expanded{width:min(calc(448px * 1.35),calc(100vw - 16px));height:min(calc(750px * 1.35),calc(100vh - 80px))}}
|
|
686
|
+
.${re} { background: ${l}; }
|
|
687
|
+
.${re}:hover {
|
|
688
|
+
background: ${e ? Je(0.05, l) : Ze(0.05, l)};
|
|
689
|
+
}
|
|
690
|
+
.trigger-button-icon { color: ${o}; }
|
|
691
|
+
`, document.head.appendChild(a);
|
|
692
|
+
})((r == null || (t = r.theme) === null || t === void 0 ? void 0 : t.inputButtonBgColor) || "#007bff", (r == null || (n = r.theme) === null || n === void 0 ? void 0 : n.textBaseColor) || "#ffffff");
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
function Ve(r) {
|
|
696
|
+
const t = P("button", re, { id: `trigger-button-${r}`, "aria-controls": S, "aria-expanded": "false" }), n = P("div", "trigger-button-icon", { "aria-hidden": "true" });
|
|
697
|
+
return n.innerHTML = `
|
|
698
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" fill="currentColor" viewBox="0 0 256 256" class="close-icon">
|
|
699
|
+
<path class="icon-path" d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"></path>
|
|
700
|
+
</svg>
|
|
701
|
+
<svg width="24" height="14" viewBox="0 0 24 14" fill="none" xmlns="http://www.w3.org/2000/svg" class="fish-icon visible">
|
|
702
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.71844 10.3882L4.60606 6.98384L1.71844 3.58375C1.4014 3.21362 1.44424 2.65841 1.81269 2.33993C1.97978 2.1979 2.65242 1.98701 3.04657 2.43461L5.78425 5.65824C6.14281 5.29523 6.51693 4.95924 6.90479 4.65114C8.88976 3.07437 11.2345 2.22803 13.6931 2.22803C16.9492 2.22803 20.0039 3.71718 22.2917 6.41142C22.5702 6.74282 22.5702 7.22916 22.2917 7.56056C20.0039 10.2591 16.9492 11.744 13.6931 11.744C11.2348 11.744 8.89035 10.8948 6.90554 9.31995C6.51741 9.01199 6.14304 8.67628 5.78425 8.31374L3.04657 11.5374C2.72953 11.9075 2.18114 11.9505 1.81269 11.632C1.44852 11.3179 1.40568 10.7584 1.71844 10.3882ZM5.93026 10.4683C8.17161 12.2599 10.8546 13.25 13.6931 13.25C17.4881 13.25 21.019 11.4034 23.4447 8.52942C24.1873 7.64571 24.1843 6.31801 23.4397 5.43663C20.8944 2.43919 17.4337 0.722025 13.6931 0.722025C10.8555 0.722025 8.17194 1.70845 5.92952 3.50276L4.17682 1.43933C3.57943 0.760929 2.79325 0.630009 2.25286 0.662947C1.98116 0.679506 1.73125 0.736852 1.51895 0.811846C1.26839 0.900352 1.03017 1.02718 0.827835 1.20058C-0.165283 2.05903 -0.283916 3.561 0.574656 4.56345L2.63075 6.98445L0.568104 9.41623C-0.272133 10.4106 -0.166523 11.9125 0.827835 12.7714C1.81372 13.6243 3.34308 13.5062 4.19036 12.5171L5.93026 10.4683Z" fill="currentColor"/>
|
|
703
|
+
</svg>
|
|
704
|
+
`, t.setAttribute("aria-label", "Open Brainfish widget"), t.appendChild(n), function(l, o) {
|
|
705
|
+
let a = !1;
|
|
706
|
+
const e = o.querySelector(".fish-icon"), d = o.querySelector(".close-icon");
|
|
707
|
+
l.addEventListener("click", () => {
|
|
708
|
+
a = !a;
|
|
709
|
+
const s = document.querySelector(`.${S}`), i = s == null ? void 0 : s.querySelector("iframe");
|
|
710
|
+
var u;
|
|
711
|
+
a ? (s == null || s.classList.add("open"), s == null || s.setAttribute("aria-hidden", "false"), l.setAttribute("aria-expanded", "true"), e.classList.remove("visible"), d.classList.add("visible"), i == null || (u = i.contentWindow) === null || u === void 0 || u.postMessage({ type: "FOCUS_SEARCH_FIELD" }, "*")) : (s == null || s.classList.remove("open"), s == null || s.setAttribute("aria-hidden", "true"), l.setAttribute("aria-expanded", "false"), d.classList.remove("visible"), e.classList.add("visible"));
|
|
712
|
+
});
|
|
713
|
+
}(t, n), t;
|
|
714
|
+
}
|
|
715
|
+
function Qe(r, t) {
|
|
716
|
+
const n = () => {
|
|
717
|
+
((l) => {
|
|
718
|
+
var o;
|
|
719
|
+
(o = r.contentWindow) === null || o === void 0 || o.postMessage({ type: "UPDATE_BODY_CLASS", isDarkMode: l }, "*");
|
|
720
|
+
})(document.body.classList.contains("dark"));
|
|
721
|
+
};
|
|
722
|
+
n(), (() => {
|
|
723
|
+
const l = new MutationObserver(n);
|
|
724
|
+
l.observe(document.body, { attributes: !0, attributeFilter: ["class"] }), t.addEventListener("abort", () => l.disconnect());
|
|
725
|
+
})();
|
|
726
|
+
}
|
|
727
|
+
function Xe(r, t) {
|
|
728
|
+
const n = document.createDocumentFragment(), l = Ve(r), { iframeContainer: o, iframe: a } = function(e) {
|
|
729
|
+
const d = P("div", S, { id: S, "aria-live": "polite", "aria-hidden": "true" }), s = P("iframe", "trigger-iframe", { src: e, sandbox: "allow-scripts allow-same-origin allow-popups", allow: "clipboard-write", role: "dialog" });
|
|
730
|
+
return d.appendChild(s), { iframeContainer: d, iframe: s };
|
|
731
|
+
}(t);
|
|
732
|
+
return n.appendChild(l), n.appendChild(o), { fragment: n, iframe: a };
|
|
733
|
+
}
|
|
734
|
+
function et(r, t) {
|
|
735
|
+
window.addEventListener("message", (n) => {
|
|
736
|
+
if (n.origin !== r) return;
|
|
737
|
+
const { type: l } = n.data;
|
|
738
|
+
if (l === "TOGGLE_WIDGET_SIZE" && function() {
|
|
739
|
+
const o = document.querySelector(`.${S}`);
|
|
740
|
+
o.classList.contains("expanded") ? o.classList.remove("expanded") : o.classList.add("expanded");
|
|
741
|
+
}(), l === "TRACK_EVENT") {
|
|
742
|
+
if (!window.BrainfishAnalytics) return;
|
|
743
|
+
const { eventName: o, data: a } = n.data;
|
|
744
|
+
window.BrainfishAnalytics("track", o, a);
|
|
745
|
+
}
|
|
746
|
+
}, { signal: t });
|
|
747
|
+
}
|
|
748
|
+
const tt = (r, t) => {
|
|
749
|
+
const n = oe(r.overrides), l = ((o = r.overrides) == null ? void 0 : o.widgetHost) || void 0;
|
|
750
|
+
var o;
|
|
751
|
+
const a = `${l}/?widgetKey=${r.widgetKey}`;
|
|
752
|
+
try {
|
|
753
|
+
if (e = r.widgetKey, me.has(e) || function(f) {
|
|
754
|
+
return !!document.getElementById(`trigger-button-${f}`);
|
|
755
|
+
}(r.widgetKey)) return;
|
|
756
|
+
Ue(t);
|
|
757
|
+
const { fragment: d, iframe: s } = Xe(r.widgetKey, a), i = new AbortController(), { signal: u } = i;
|
|
758
|
+
s.onload = () => {
|
|
759
|
+
setTimeout(() => {
|
|
760
|
+
Qe(s, u), et(l, u);
|
|
761
|
+
}, 0);
|
|
762
|
+
}, document.body.appendChild(d), me.add(r.widgetKey);
|
|
763
|
+
const c = () => {
|
|
764
|
+
i.abort(), window.removeEventListener("beforeunload", c);
|
|
765
|
+
};
|
|
766
|
+
return void window.addEventListener("beforeunload", c);
|
|
767
|
+
} catch (d) {
|
|
768
|
+
(function(s, i, u) {
|
|
769
|
+
w(s, i, i.message, u);
|
|
770
|
+
})(n, d, r.widgetKey);
|
|
771
|
+
}
|
|
772
|
+
var e;
|
|
773
|
+
};
|
|
774
|
+
let M = null;
|
|
775
|
+
const be = typeof window != "undefined" && window.Brainfish ? window.Brainfish : (M || (M = /* @__PURE__ */ function() {
|
|
776
|
+
let r = [], t = null;
|
|
777
|
+
function n(o, a) {
|
|
778
|
+
if (t) {
|
|
779
|
+
const e = o.split(".");
|
|
780
|
+
let d = t;
|
|
781
|
+
for (let i = 0; i < e.length - 1; i++) d = d[e[i]];
|
|
782
|
+
const s = d[e[e.length - 1]];
|
|
783
|
+
if (typeof s == "function") return s.apply(d, a);
|
|
784
|
+
} else r.push([o, a]);
|
|
165
785
|
}
|
|
166
786
|
return { Widgets: { init: function() {
|
|
167
|
-
for (var
|
|
168
|
-
return
|
|
787
|
+
for (var o = arguments.length, a = new Array(o), e = 0; e < o; e++) a[e] = arguments[e];
|
|
788
|
+
return n("Widgets.init", a);
|
|
169
789
|
} }, SearchWidget: { initStandard: function() {
|
|
170
|
-
for (var
|
|
171
|
-
return
|
|
790
|
+
for (var o = arguments.length, a = new Array(o), e = 0; e < o; e++) a[e] = arguments[e];
|
|
791
|
+
return n("SearchWidget.initStandard", a);
|
|
172
792
|
} }, HelpWidget: { initPopup: function() {
|
|
173
|
-
for (var
|
|
174
|
-
return
|
|
793
|
+
for (var o = arguments.length, a = new Array(o), e = 0; e < o; e++) a[e] = arguments[e];
|
|
794
|
+
return n("HelpWidget.initPopup", a);
|
|
175
795
|
}, close: function() {
|
|
176
|
-
for (var
|
|
177
|
-
return
|
|
796
|
+
for (var o = arguments.length, a = new Array(o), e = 0; e < o; e++) a[e] = arguments[e];
|
|
797
|
+
return n("HelpWidget.close", a);
|
|
178
798
|
}, open: function() {
|
|
179
|
-
for (var
|
|
180
|
-
return
|
|
799
|
+
for (var o = arguments.length, a = new Array(o), e = 0; e < o; e++) a[e] = arguments[e];
|
|
800
|
+
return n("HelpWidget.open", a);
|
|
181
801
|
}, toggle: function() {
|
|
182
|
-
for (var
|
|
183
|
-
return
|
|
184
|
-
} }, _setRealBrainfish: function(
|
|
185
|
-
for (
|
|
186
|
-
const [
|
|
187
|
-
|
|
802
|
+
for (var o = arguments.length, a = new Array(o), e = 0; e < o; e++) a[e] = arguments[e];
|
|
803
|
+
return n("HelpWidget.toggle", a);
|
|
804
|
+
} }, _setRealBrainfish: function(o) {
|
|
805
|
+
for (t = o; r.length > 0; ) {
|
|
806
|
+
const [a, e] = r.shift();
|
|
807
|
+
n(a, e);
|
|
188
808
|
}
|
|
189
809
|
} };
|
|
190
|
-
}(), typeof window != "undefined" && (window.Brainfish =
|
|
191
|
-
let
|
|
192
|
-
|
|
810
|
+
}(), typeof window != "undefined" && (window.Brainfish = M)), M);
|
|
811
|
+
let T = null;
|
|
812
|
+
be.Widgets.init = (r) => m(void 0, null, function* () {
|
|
193
813
|
window && (window.BrainfishAnalytics = window.BrainfishAnalytics || function() {
|
|
194
|
-
for (var
|
|
814
|
+
for (var a = arguments.length, e = new Array(a), d = 0; d < a; d++) e[d] = arguments[d];
|
|
195
815
|
(window.BrainfishAnalytics.q = window.BrainfishAnalytics.q || []).push(e);
|
|
196
816
|
});
|
|
197
|
-
const
|
|
198
|
-
var
|
|
199
|
-
const { config:
|
|
200
|
-
|
|
201
|
-
return
|
|
202
|
-
var u, c
|
|
203
|
-
const f = ((
|
|
204
|
-
|
|
205
|
-
const [
|
|
206
|
-
|
|
817
|
+
const t = oe(r.overrides), n = ((l = r.overrides) == null ? void 0 : l.analyticsApiHost) || void 0;
|
|
818
|
+
var l;
|
|
819
|
+
const { config: o } = yield $e({ widgetKey: r.widgetKey, apiHost: t });
|
|
820
|
+
T || (T = function(a, e, d, s) {
|
|
821
|
+
return m(this, null, function* () {
|
|
822
|
+
var i, u, c;
|
|
823
|
+
const f = ((i = a.overrides) === null || i === void 0 ? void 0 : i.enableRecording) || (e == null || (u = e.settings) === null || u === void 0 ? void 0 : u.enableRecording) || !1, h = ((c = a.overrides) === null || c === void 0 ? void 0 : c.version) || (e == null ? void 0 : e.version), g = [];
|
|
824
|
+
h != null && h.startsWith("2.") ? tt(a, e) : g.push(qe(a, e)), g.push(ze(a.widgetKey, e.trackingToken || "", d, s, f));
|
|
825
|
+
const [p] = yield Promise.allSettled(g);
|
|
826
|
+
p && p.status === "fulfilled" && p.value && be._setRealBrainfish(p.value);
|
|
207
827
|
});
|
|
208
|
-
}(
|
|
828
|
+
}(r, o, t, n)), yield T;
|
|
209
829
|
});
|
|
210
|
-
const
|
|
830
|
+
const rt = function() {
|
|
211
831
|
typeof window != "undefined" && window.BrainfishAnalytics && window.BrainfishAnalytics(...arguments);
|
|
212
832
|
};
|
|
213
833
|
export {
|
|
214
|
-
|
|
215
|
-
|
|
834
|
+
rt as BrainfishAnalytics,
|
|
835
|
+
be as default
|
|
216
836
|
};
|
|
217
837
|
//# sourceMappingURL=web.js.map
|