@brainfish-ai/widgets-initiator 1.4.0-alpha.2 → 1.4.0-alpha.9

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.js CHANGED
@@ -1,45 +1,45 @@
1
1
  var Fe = Object.defineProperty, Oe = Object.defineProperties;
2
- var Be = Object.getOwnPropertyDescriptors;
2
+ var Le = Object.getOwnPropertyDescriptors;
3
3
  var fe = Object.getOwnPropertySymbols;
4
- var Le = Object.prototype.hasOwnProperty, $e = Object.prototype.propertyIsEnumerable;
5
- var F = (a, t, r) => t in a ? Fe(a, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : a[t] = r, O = (a, t) => {
6
- for (var r in t || (t = {}))
7
- Le.call(t, r) && F(a, r, t[r]);
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
8
  if (fe)
9
- for (var r of fe(t))
10
- $e.call(t, r) && F(a, r, t[r]);
11
- return a;
12
- }, B = (a, t) => Oe(a, Be(t));
13
- var ce = (a, t, r) => F(a, typeof t != "symbol" ? t + "" : t, r);
14
- var b = (a, t, r) => new Promise((l, o) => {
15
- var n = (s) => {
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
- d(r.next(s));
17
+ d(n.next(s));
18
18
  } catch (i) {
19
19
  o(i);
20
20
  }
21
21
  }, e = (s) => {
22
22
  try {
23
- d(r.throw(s));
23
+ d(n.throw(s));
24
24
  } catch (i) {
25
25
  o(i);
26
26
  }
27
- }, d = (s) => s.done ? l(s.value) : Promise.resolve(s.value).then(n, e);
28
- d((r = r.apply(a, t)).next());
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 _, T;
30
+ var _, $;
31
31
  (function() {
32
32
  try {
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] = "e618bdd9-e67e-4116-9cbe-81ba8dc5665a", a._sentryDebugIdIdentifier = "sentry-dbid-e618bdd9-e67e-4116-9cbe-81ba8dc5665a");
35
- } catch (r) {
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] = "c0852980-6c03-4f27-bb61-9792c93e20c1", r._sentryDebugIdIdentifier = "sentry-dbid-c0852980-6c03-4f27-bb61-9792c93e20c1");
35
+ } catch (n) {
36
36
  }
37
- })(), (typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {}).SENTRY_RELEASE = { id: "5e55079f7c05de237a76f1e1c8eec36c6436b8f0" }, function(a) {
38
- a.Sidebar = "sidebar", a.Searchbar = "searchbar";
37
+ })(), (typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {}).SENTRY_RELEASE = { id: "f302202eb9a42053715ffe1d7bd47452ac9e99f0" }, function(r) {
38
+ r.Sidebar = "sidebar", r.Searchbar = "searchbar";
39
39
  }(_ || (_ = {})), _.Sidebar, _.Searchbar;
40
40
  class ae extends Error {
41
- constructor(r, l) {
42
- super(r, l);
41
+ constructor(n, l) {
42
+ super(n, l);
43
43
  ce(this, "cause");
44
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);
@@ -48,13 +48,13 @@ Caused by: ` + this.cause.stack);
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(a) {
52
- a.LINK = "link", a.CALLBACK = "callback", a.EMAIL = "email", a.PHONE = "phone";
53
- })(T || (T = {}));
54
- const w = (a, t, r, l) => {
55
- let o = r, n = {};
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
56
  if (t instanceof Error) try {
57
- n = JSON.parse(t.message), o += ` - ${n.message || t.message}`;
57
+ a = JSON.parse(t.message), o += ` - ${a.message || t.message}`;
58
58
  } catch (e) {
59
59
  o += ` - ${t.message}`;
60
60
  }
@@ -62,45 +62,45 @@ const w = (a, t, r, l) => {
62
62
  ((e, d, s) => {
63
63
  if (!navigator || navigator.userAgent.toLowerCase().includes("headless")) return;
64
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.2. ${d.message}`, stack: d.stack, cause: { message: i.message, stack: i.stack, cause: i.cause } }) });
66
- })(a, new ae(o, { cause: n }), l);
67
- }, Te = (a) => b(void 0, null, function* () {
68
- let { widgetKey: t, apiHost: r } = a;
69
- return function(l, o, n) {
70
- return b(this, null, function* () {
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.9. ${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
71
  let e, d = 0;
72
72
  for (; d < 3; ) try {
73
- const s = yield fetch(`${l}${o}`, { method: "POST", headers: { "Content-Type": "application/json", "api-key": n } });
73
+ const s = yield fetch(`${l}${o}`, { method: "POST", headers: { "Content-Type": "application/json", "api-key": a } });
74
74
  if (!s.ok) throw new Error(`API call failed with status: ${s.status}`);
75
75
  const i = yield s.json();
76
76
  if (!i) throw new Error("Error loading config: empty response");
77
77
  return i;
78
78
  } catch (s) {
79
- if (e = s, d++, d >= 3) throw w(l, s, "Error fetching config", n), e;
79
+ if (e = s, d++, d >= 3) throw w(l, s, "Error fetching config", a), e;
80
80
  yield new Promise((i) => setTimeout(i, 500));
81
81
  }
82
82
  });
83
- }(r, "/api/searchWidgets.getConfigByKey", t);
84
- }), Ke = (a) => {
85
- let { config: t, apiKey: r, apiHost: l } = a;
83
+ }(n, "/api/searchWidgets.getConfigByKey", t);
84
+ }), Ke = (r) => {
85
+ let { config: t, apiKey: n, apiHost: l } = r;
86
86
  const o = t.settings || {};
87
- return ["bodyActionButtons", "footerActionButtons", "nextBestActions"].forEach((n) => {
88
- o[n] && (o[n] = o[n].map((e) => e.type === T.CALLBACK && e.value ? B(O({}, e), { value: new Function(`return ${e.value}`)() }) : e));
89
- }), B(O({}, t), { settings: o, apiHost: l, widgetMode: t.widgetType, apiKey: r });
90
- }, oe = (a) => (a == null ? void 0 : a.apiHost) || "https://app.brainfi.sh", L = (() => {
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 = (() => {
91
91
  if (typeof window == "undefined") return;
92
- const a = window.navigator.userAgent;
93
- if (!(a.match(/iPad/i) || a.match(/iPhone/i))) return !1;
94
- const t = a.match(/OS (\d+)_/i);
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
95
  return t && parseInt(t[1], 10) <= 14;
96
- })(), He = (a) => b(void 0, null, function* () {
97
- let { apiHost: t, widgetKey: r, version: l } = a;
96
+ })(), He = (r) => m(void 0, null, function* () {
97
+ let { apiHost: t, widgetKey: n, version: l } = r;
98
98
  try {
99
- const o = `https://cdn.jsdelivr.net/npm/@brainfish-ai/search-widget@${l}/dist/web.js`, n = L ? o.replace("web.js", "web.umd.js") : o;
100
- return { widget: yield ((d) => b(void 0, null, function* () {
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
101
  return document.getElementById("brainfish-widget") ? window.Brainfish : new Promise((s, i) => {
102
102
  const u = document.createElement("script");
103
- u.id = "brainfish-widget", u.src = d, u.type = L ? "text/javascript" : "module", u.async = !0, u.crossOrigin = "anonymous", u.onload = () => {
103
+ u.id = "brainfish-widget", u.src = d, u.type = B ? "text/javascript" : "module", u.async = !0, u.crossOrigin = "anonymous", u.onload = () => {
104
104
  setTimeout(() => {
105
105
  const c = window.Brainfish;
106
106
  c ? s(c) : i(new Error("Failed to load Brainfish module"));
@@ -108,20 +108,20 @@ const w = (a, t, r, l) => {
108
108
  }, u.onerror = (c) => {
109
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
110
  i(new Error(JSON.stringify(h)));
111
- }, L || document.head.appendChild(u);
111
+ }, B || document.head.appendChild(u);
112
112
  });
113
- }))(n) };
113
+ }))(a) };
114
114
  } catch (o) {
115
- w(t, o, o.message, r);
115
+ w(t, o, o.message, n);
116
116
  }
117
- }), pe = /* @__PURE__ */ new Set(), qe = (a, t) => b(void 0, null, function* () {
118
- const r = oe(a.overrides);
117
+ }), pe = /* @__PURE__ */ new Set(), qe = (r, t) => m(void 0, null, function* () {
118
+ const n = oe(r.overrides);
119
119
  try {
120
- if (pe.has(a.widgetKey)) return;
121
- const l = yield He({ apiHost: r, widgetKey: a.widgetKey, version: t.version || "latest" });
120
+ if (pe.has(r.widgetKey)) return;
121
+ const l = yield He({ apiHost: n, widgetKey: r.widgetKey, version: t.version || "latest" });
122
122
  if (l) {
123
- const { widget: o } = l, n = Ke({ config: t, apiKey: a.widgetKey, apiHost: r });
124
- return a.overrides && t.settings && Object.entries(a.overrides).forEach((e) => {
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
125
  let [d, s] = e;
126
126
  t.settings && d in t.settings && (t.settings[d] = function() {
127
127
  let i = arguments.length > 1 ? arguments[1] : void 0;
@@ -130,71 +130,71 @@ const w = (a, t, r, l) => {
130
130
  }(t.settings[d], s));
131
131
  }), function(e, d) {
132
132
  d.widgetType === _.Searchbar || d.widgetType === "Search" ? e.SearchWidget.initStandard(d) : e.HelpWidget.initPopup(d);
133
- }(o, n), pe.add(a.widgetKey), o;
133
+ }(o, a), pe.add(r.widgetKey), o;
134
134
  }
135
135
  } catch (l) {
136
- w(r, l, l.message, a.widgetKey);
136
+ w(n, l, l.message, r.widgetKey);
137
137
  }
138
138
  });
139
139
  let ge = !1;
140
- const ze = function(l, o, n) {
141
- return b(this, arguments, function* (a, t, r) {
140
+ const ze = function(l, o, a) {
141
+ return m(this, arguments, function* (r, t, n) {
142
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(r, new Error("Access key is required"), "Access key is required", a), !ge) try {
144
- window.BrainfishAnalytics("init", { apiUrl: e, accessKey: t, trackScreenViews: !0, trackAttributes: !0, trackOutgoingLinks: !0, enableRecording: d }), ge = !0, yield ((s, i) => b(this, null, function* () {
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* () {
145
145
  if (document.getElementById("brainfish-analytics")) return window.BrainfishAnalytics;
146
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 = () => {
147
+ u.id = "brainfish-analytics", u.src = "https://cdn.jsdelivr.net/npm/@brainfish-ai/web-tracker@alpha/dist/tracker.js", u.type = "module", u.async = !0, u.crossOrigin = "anonymous", u.onerror = () => {
148
148
  w(s, new Error(`Failed to load script: ${u.src}`), `Failed to load script: ${u.src}`, i);
149
149
  }, document.head.appendChild(u);
150
- }))(r, a);
150
+ }))(n, r);
151
151
  } catch (s) {
152
- w(r, s, "Failed to initialize BrainfishAnalytics", a);
152
+ w(n, s, "Failed to initialize BrainfishAnalytics", r);
153
153
  }
154
154
  });
155
155
  };
156
- function P(a, t) {
157
- let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
158
- const l = document.createElement(a);
159
- return l.className = t, Object.entries(r).forEach((o) => {
160
- let [n, e] = o;
161
- l.setAttribute(n, e);
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
162
  }), l;
163
163
  }
164
- function se(a) {
165
- return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
164
+ function se(r) {
165
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
166
166
  }
167
167
  var K = { exports: {} }, H = { exports: {} }, q = { exports: {} };
168
- (function(a, t) {
169
- function r(o) {
168
+ (function(r, t) {
169
+ function n(o) {
170
170
  return Math.round(255 * o);
171
171
  }
172
- function l(o, n, e) {
173
- return r(o) + "," + r(n) + "," + r(e);
172
+ function l(o, a, e) {
173
+ return n(o) + "," + n(a) + "," + n(e);
174
174
  }
175
- t.__esModule = !0, t.default = void 0, t.default = function(o, n, e, d) {
176
- if (d === void 0 && (d = l), n === 0) return d(e, e, e);
177
- var s = (o % 360 + 360) % 360 / 60, i = (1 - Math.abs(2 * e - 1)) * n, u = i * (1 - Math.abs(s % 2 - 1)), c = 0, f = 0, h = 0;
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
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
179
  var g = e - i / 2;
180
180
  return d(c + g, f + g, h + g);
181
- }, a.exports = t.default;
181
+ }, r.exports = t.default;
182
182
  })(q, q.exports);
183
183
  var ie = q.exports, z = { exports: {} };
184
- (function(a, t) {
184
+ (function(r, t) {
185
185
  t.__esModule = !0, t.default = void 0;
186
- var r = { 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" };
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
187
  t.default = function(l) {
188
188
  if (typeof l != "string") return l;
189
189
  var o = l.toLowerCase();
190
- return r[o] ? "#" + r[o] : l;
191
- }, a.exports = t.default;
190
+ return n[o] ? "#" + n[o] : l;
191
+ }, r.exports = t.default;
192
192
  })(z, z.exports);
193
193
  var Re = z.exports, R = { exports: {} };
194
- (function(a, t) {
195
- function r(s) {
194
+ (function(r, t) {
195
+ function n(s) {
196
196
  var i = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
197
- return r = function(u) {
197
+ return n = function(u) {
198
198
  if (u === null || !function(f) {
199
199
  try {
200
200
  return Function.toString.call(f).indexOf("[native code]") !== -1;
@@ -212,12 +212,12 @@ var Re = z.exports, R = { exports: {} };
212
212
  if (l()) return Reflect.construct.apply(null, arguments);
213
213
  var p = [null];
214
214
  p.push.apply(p, h);
215
- var m = new (f.bind.apply(f, p))();
216
- return g && o(m, g.prototype), m;
217
- }(u, arguments, n(this).constructor);
215
+ var b = new (f.bind.apply(f, p))();
216
+ return g && o(b, g.prototype), b;
217
+ }(u, arguments, a(this).constructor);
218
218
  }
219
219
  return c.prototype = Object.create(u.prototype, { constructor: { value: c, enumerable: !1, writable: !0, configurable: !0 } }), o(c, u);
220
- }, r(s);
220
+ }, n(s);
221
221
  }
222
222
  function l() {
223
223
  try {
@@ -234,10 +234,10 @@ var Re = z.exports, R = { exports: {} };
234
234
  return u.__proto__ = c, u;
235
235
  }, o(s, i);
236
236
  }
237
- function n(s) {
238
- return n = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(i) {
237
+ function a(s) {
238
+ return a = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(i) {
239
239
  return i.__proto__ || Object.getPrototypeOf(i);
240
- }, n(s);
240
+ }, a(s);
241
241
  }
242
242
  t.__esModule = !0, t.default = void 0;
243
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 }).
@@ -403,31 +403,31 @@ To pass a single animation please supply them in simple values, e.g. animation('
403
403
  var h;
404
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
405
  else {
406
- for (var g = arguments.length, p = new Array(g > 1 ? g - 1 : 0), m = 1; m < g; m++) p[m - 1] = arguments[m];
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
407
  h = s.call(this, d.apply(void 0, [e[f]].concat(p))) || this;
408
408
  }
409
- return function(S) {
410
- if (S === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
411
- return S;
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
412
  }(h);
413
413
  }
414
414
  return u = s, (i = c).prototype = Object.create(u.prototype), i.prototype.constructor = i, o(i, u), c;
415
- }(r(Error)), a.exports = t.default;
415
+ }(n(Error)), r.exports = t.default;
416
416
  })(R, R.exports);
417
417
  var x = R.exports;
418
- (function(a, t) {
418
+ (function(r, t) {
419
419
  t.__esModule = !0, t.default = function(g) {
420
420
  if (typeof g != "string") throw new o.default(3);
421
421
  var p = (0, l.default)(g);
422
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
423
  if (p.match(d)) {
424
- var m = 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: m };
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
426
  }
427
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
428
  if (p.match(i)) {
429
- var S = 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: S };
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
431
  }
432
432
  var C = u.exec(p);
433
433
  if (C) return { red: parseInt("" + C[1], 10), green: parseInt("" + C[2], 10), blue: parseInt("" + C[3], 10) };
@@ -435,103 +435,103 @@ var x = R.exports;
435
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
436
  var E = f.exec(p);
437
437
  if (E) {
438
- var Ee = parseInt("" + E[1], 10), Ae = parseInt("" + E[2], 10) / 100, je = parseInt("" + E[3], 10) / 100, ue = "rgb(" + (0, r.default)(Ee, Ae, je) + ")", A = u.exec(ue);
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
439
  if (!A) throw new o.default(4, p, ue);
440
440
  return { red: parseInt("" + A[1], 10), green: parseInt("" + A[2], 10), blue: parseInt("" + A[3], 10) };
441
441
  }
442
442
  var y = h.exec(p.substring(0, 50));
443
443
  if (y) {
444
- var Me = parseInt("" + y[1], 10), Ie = parseInt("" + y[2], 10) / 100, Pe = parseInt("" + y[3], 10) / 100, de = "rgb(" + (0, r.default)(Me, Ie, Pe) + ")", j = u.exec(de);
445
- if (!j) throw new o.default(4, p, de);
446
- return { red: parseInt("" + j[1], 10), green: parseInt("" + j[2], 10), blue: parseInt("" + j[3], 10), alpha: parseFloat("" + y[4]) > 1 ? parseFloat("" + y[4]) / 100 : parseFloat("" + y[4]) };
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
447
  }
448
448
  throw new o.default(5);
449
449
  };
450
- var r = n(ie), l = n(Re), o = n(x);
451
- function n(g) {
450
+ var n = a(ie), l = a(Re), o = a(x);
451
+ function a(g) {
452
452
  return g && g.__esModule ? g : { default: g };
453
453
  }
454
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
- a.exports = t.default;
455
+ r.exports = t.default;
456
456
  })(H, H.exports);
457
457
  var le = H.exports;
458
- (function(a, t) {
458
+ (function(r, t) {
459
459
  t.__esModule = !0, t.default = function(o) {
460
460
  if (o === "transparent") return 0;
461
- var n = (0, l.default)(o), e = Object.keys(n).map(function(u) {
462
- var c = n[u] / 255;
461
+ var a = (0, l.default)(o), e = Object.keys(a).map(function(u) {
462
+ var c = a[u] / 255;
463
463
  return c <= 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);
464
464
  }), d = e[0], s = e[1], i = e[2];
465
465
  return parseFloat((0.2126 * d + 0.7152 * s + 0.0722 * i).toFixed(3));
466
466
  };
467
- var r, l = (r = le) && r.__esModule ? r : { default: r };
468
- a.exports = t.default;
467
+ var n, l = (n = le) && n.__esModule ? n : { default: n };
468
+ r.exports = t.default;
469
469
  })(K, K.exports);
470
470
  const We = se(K.exports);
471
- var W = { exports: {} }, N = { exports: {} };
472
- (function(a, t) {
473
- function r(l, o, n) {
471
+ var W = { exports: {} }, D = { exports: {} };
472
+ (function(r, t) {
473
+ function n(l, o, a) {
474
474
  return function() {
475
- var e = n.concat(Array.prototype.slice.call(arguments));
476
- return e.length >= o ? l.apply(this, e) : r(l, o, e);
475
+ var e = a.concat(Array.prototype.slice.call(arguments));
476
+ return e.length >= o ? l.apply(this, e) : n(l, o, e);
477
477
  };
478
478
  }
479
479
  t.__esModule = !0, t.default = function(l) {
480
- return r(l, l.length, []);
481
- }, a.exports = t.default;
482
- })(N, N.exports);
483
- var he, M, ve = N.exports, D = { exports: {} };
484
- he = D, (M = D.exports).__esModule = !0, M.default = void 0, M.default = function(a, t, r) {
485
- return Math.max(a, Math.min(t, r));
486
- }, he.exports = M.default;
487
- var ye = D.exports, Y = { exports: {} }, G = { exports: {} };
488
- (function(a, t) {
489
- t.__esModule = !0, t.default = void 0, t.default = function(r) {
490
- var l, o = r.red / 255, n = r.green / 255, e = r.blue / 255, d = Math.max(o, n, e), s = Math.min(o, n, e), i = (d + s) / 2;
491
- if (d === s) return r.alpha !== void 0 ? { hue: 0, saturation: 0, lightness: i, alpha: r.alpha } : { hue: 0, saturation: 0, lightness: i };
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
492
  var u = d - s, c = i > 0.5 ? u / (2 - d - s) : u / (d + s);
493
493
  switch (d) {
494
494
  case o:
495
- l = (n - e) / u + (n < e ? 6 : 0);
495
+ l = (a - e) / u + (a < e ? 6 : 0);
496
496
  break;
497
- case n:
497
+ case a:
498
498
  l = (e - o) / u + 2;
499
499
  break;
500
500
  default:
501
- l = (o - n) / u + 4;
501
+ l = (o - a) / u + 4;
502
502
  }
503
- return l *= 60, r.alpha !== void 0 ? { hue: l, saturation: c, lightness: i, alpha: r.alpha } : { hue: l, saturation: c, lightness: i };
504
- }, a.exports = t.default;
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
505
  })(G, G.exports);
506
- var Ne = G.exports;
507
- (function(a, t) {
508
- t.__esModule = !0, t.default = function(n) {
509
- return (0, l.default)((0, r.default)(n));
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
510
  };
511
- var r = o(le), l = o(Ne);
512
- function o(n) {
513
- return n && n.__esModule ? n : { default: n };
511
+ var n = o(le), l = o(De);
512
+ function o(a) {
513
+ return a && a.__esModule ? a : { default: a };
514
514
  }
515
- a.exports = t.default;
515
+ r.exports = t.default;
516
516
  })(Y, Y.exports);
517
- var we = Y.exports, J = { exports: {} }, Z = { exports: {} }, V = { exports: {} }, U = { exports: {} };
518
- (function(a, t) {
519
- t.__esModule = !0, t.default = void 0, t.default = function(r) {
520
- return r.length === 7 && r[1] === r[2] && r[3] === r[4] && r[5] === r[6] ? "#" + r[1] + r[3] + r[5] : r;
521
- }, a.exports = t.default;
522
- })(U, U.exports);
523
- var xe = U.exports, Q = { exports: {} };
524
- (function(a, t) {
525
- t.__esModule = !0, t.default = void 0, t.default = function(r) {
526
- var l = r.toString(16);
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
527
  return l.length === 1 ? "0" + l : l;
528
- }, a.exports = t.default;
528
+ }, r.exports = t.default;
529
529
  })(Q, Q.exports);
530
530
  var _e = Q.exports;
531
- (function(a, t) {
531
+ (function(r, t) {
532
532
  t.__esModule = !0, t.default = void 0;
533
- var r = n(ie), l = n(xe), o = n(_e);
534
- function n(s) {
533
+ var n = a(ie), l = a(xe), o = a(_e);
534
+ function a(s) {
535
535
  return s && s.__esModule ? s : { default: s };
536
536
  }
537
537
  function e(s) {
@@ -541,76 +541,76 @@ var _e = Q.exports;
541
541
  return (0, l.default)("#" + e(s) + e(i) + e(u));
542
542
  }
543
543
  t.default = function(s, i, u) {
544
- return (0, r.default)(s, i, u, d);
545
- }, a.exports = t.default;
546
- })(V, V.exports);
547
- var ke = V.exports;
548
- (function(a, t) {
549
- t.__esModule = !0, t.default = function(n, e, d) {
550
- if (typeof n == "number" && typeof e == "number" && typeof d == "number") return (0, r.default)(n, e, d);
551
- if (typeof n == "object" && e === void 0 && d === void 0) return (0, r.default)(n.hue, n.saturation, n.lightness);
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
552
  throw new l.default(1);
553
553
  };
554
- var r = o(ke), l = o(x);
555
- function o(n) {
556
- return n && n.__esModule ? n : { default: n };
554
+ var n = o(Se), l = o(x);
555
+ function o(a) {
556
+ return a && a.__esModule ? a : { default: a };
557
557
  }
558
- a.exports = t.default;
558
+ r.exports = t.default;
559
559
  })(Z, Z.exports);
560
- var De = Z.exports, X = { exports: {} };
561
- (function(a, t) {
560
+ var Ne = Z.exports, X = { exports: {} };
561
+ (function(r, t) {
562
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, r.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, r.default)(e.hue, e.saturation, e.lightness) : "rgba(" + (0, l.default)(e.hue, e.saturation, e.lightness) + "," + e.alpha + ")";
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
565
  throw new o.default(2);
566
566
  };
567
- var r = n(ke), l = n(ie), o = n(x);
568
- function n(e) {
567
+ var n = a(Se), l = a(ie), o = a(x);
568
+ function a(e) {
569
569
  return e && e.__esModule ? e : { default: e };
570
570
  }
571
- a.exports = t.default;
571
+ r.exports = t.default;
572
572
  })(X, X.exports);
573
573
  var Ye = X.exports, ee = { exports: {} };
574
- (function(a, t) {
574
+ (function(r, t) {
575
575
  t.__esModule = !0, t.default = function(e, d, s) {
576
- if (typeof e == "number" && typeof d == "number" && typeof s == "number") return (0, r.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, r.default)("#" + (0, l.default)(e.red) + (0, l.default)(e.green) + (0, l.default)(e.blue));
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
578
  throw new o.default(6);
579
579
  };
580
- var r = n(xe), l = n(_e), o = n(x);
581
- function n(e) {
580
+ var n = a(xe), l = a(_e), o = a(x);
581
+ function a(e) {
582
582
  return e && e.__esModule ? e : { default: e };
583
583
  }
584
- a.exports = t.default;
584
+ r.exports = t.default;
585
585
  })(ee, ee.exports);
586
- var Se = ee.exports, te = { exports: {} };
587
- (function(a, t) {
586
+ var ke = ee.exports, te = { exports: {} };
587
+ (function(r, t) {
588
588
  t.__esModule = !0, t.default = function(e, d, s, i) {
589
589
  if (typeof e == "string" && typeof d == "number") {
590
- var u = (0, r.default)(e);
590
+ var u = (0, n.default)(e);
591
591
  return "rgba(" + u.red + "," + u.green + "," + u.blue + "," + d + ")";
592
592
  }
593
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
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
595
  throw new o.default(7);
596
596
  };
597
- var r = n(le), l = n(Se), o = n(x);
598
- function n(e) {
597
+ var n = a(le), l = a(ke), o = a(x);
598
+ function a(e) {
599
599
  return e && e.__esModule ? e : { default: e };
600
600
  }
601
- a.exports = t.default;
601
+ r.exports = t.default;
602
602
  })(te, te.exports);
603
603
  var Ge = te.exports;
604
- (function(a, t) {
604
+ (function(r, t) {
605
605
  t.__esModule = !0, t.default = function(f) {
606
606
  if (typeof f != "object") throw new e.default(8);
607
- if (i(f)) return (0, n.default)(f);
607
+ if (i(f)) return (0, a.default)(f);
608
608
  if (s(f)) return (0, o.default)(f);
609
609
  if (c(f)) return (0, l.default)(f);
610
- if (u(f)) return (0, r.default)(f);
610
+ if (u(f)) return (0, n.default)(f);
611
611
  throw new e.default(8);
612
612
  };
613
- var r = d(De), l = d(Ye), o = d(Se), n = d(Ge), e = d(x);
613
+ var n = d(Ne), l = d(Ye), o = d(ke), a = d(Ge), e = d(x);
614
614
  function d(f) {
615
615
  return f && f.__esModule ? f : { default: f };
616
616
  }
@@ -623,12 +623,12 @@ var Ge = te.exports;
623
623
  }, c = function(f) {
624
624
  return typeof f.hue == "number" && typeof f.saturation == "number" && typeof f.lightness == "number" && typeof f.alpha == "number";
625
625
  };
626
- a.exports = t.default;
626
+ r.exports = t.default;
627
627
  })(J, J.exports);
628
628
  var Ce = J.exports;
629
- (function(a, t) {
629
+ (function(r, t) {
630
630
  t.__esModule = !0, t.default = void 0;
631
- var r = e(ve), l = e(ye), o = e(we), n = e(Ce);
631
+ var n = e(ve), l = e(ye), o = e(we), a = e(Ce);
632
632
  function e(i) {
633
633
  return i && i.__esModule ? i : { default: i };
634
634
  }
@@ -641,18 +641,18 @@ var Ce = J.exports;
641
641
  return i;
642
642
  }, d.apply(this, arguments);
643
643
  }
644
- var s = (0, r.default)(function(i, u) {
644
+ var s = (0, n.default)(function(i, u) {
645
645
  if (u === "transparent") return u;
646
646
  var c = (0, o.default)(u);
647
- return (0, n.default)(d({}, c, { lightness: (0, l.default)(0, 1, c.lightness - parseFloat(i)) }));
647
+ return (0, a.default)(d({}, c, { lightness: (0, l.default)(0, 1, c.lightness - parseFloat(i)) }));
648
648
  });
649
- t.default = s, a.exports = t.default;
649
+ t.default = s, r.exports = t.default;
650
650
  })(W, W.exports);
651
651
  const Je = se(W.exports);
652
652
  var ne = { exports: {} };
653
- (function(a, t) {
653
+ (function(r, t) {
654
654
  t.__esModule = !0, t.default = void 0;
655
- var r = e(ve), l = e(ye), o = e(we), n = e(Ce);
655
+ var n = e(ve), l = e(ye), o = e(we), a = e(Ce);
656
656
  function e(i) {
657
657
  return i && i.__esModule ? i : { default: i };
658
658
  }
@@ -665,160 +665,173 @@ var ne = { exports: {} };
665
665
  return i;
666
666
  }, d.apply(this, arguments);
667
667
  }
668
- var s = (0, r.default)(function(i, u) {
668
+ var s = (0, n.default)(function(i, u) {
669
669
  if (u === "transparent") return u;
670
670
  var c = (0, o.default)(u);
671
- return (0, n.default)(d({}, c, { lightness: (0, l.default)(0, 1, c.lightness + parseFloat(i)) }));
671
+ return (0, a.default)(d({}, c, { lightness: (0, l.default)(0, 1, c.lightness + parseFloat(i)) }));
672
672
  });
673
- t.default = s, a.exports = t.default;
673
+ t.default = s, r.exports = t.default;
674
674
  })(ne, ne.exports);
675
- const Ze = se(ne.exports), me = /* @__PURE__ */ new Set(), k = "bf-iframe-container", re = "bf-trigger-button";
676
- function Ve(a) {
675
+ const Ze = se(ne.exports), me = /* @__PURE__ */ new Set(), S = "bf-iframe-container", re = "bf-trigger-button";
676
+ function Ue(r) {
677
677
  if (!document.querySelector("style[data-widget-styles]")) {
678
- var t, r;
678
+ var t, n;
679
679
  (function() {
680
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 n = document.createElement("style");
682
- n.attributes.setNamedItem(document.createAttribute("data-widget-styles"));
681
+ const a = document.createElement("style");
682
+ a.attributes.setNamedItem(document.createAttribute("data-widget-styles"));
683
683
  const e = We(l) > 0.5;
684
- n.textContent = `
684
+ a.textContent = `
685
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
686
  .${re} { background: ${l}; }
687
687
  .${re}:hover {
688
688
  background: ${e ? Je(0.05, l) : Ze(0.05, l)};
689
689
  }
690
690
  .trigger-button-icon { color: ${o}; }
691
- `, document.head.appendChild(n);
692
- })((a == null || (t = a.theme) === null || t === void 0 ? void 0 : t.inputButtonBgColor) || "#007bff", (a == null || (r = a.theme) === null || r === void 0 ? void 0 : r.textBaseColor) || "#ffffff");
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
693
  }
694
694
  }
695
- function Ue(a) {
696
- const t = P("button", re, { id: `trigger-button-${a}`, "aria-controls": k, "aria-expanded": "false" }), r = P("div", "trigger-button-icon", { "aria-hidden": "true" });
697
- return r.innerHTML = `
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
698
  <svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" fill="currentColor" viewBox="0 0 256 256" class="close-icon">
699
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
700
  </svg>
701
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
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
703
  </svg>
704
- `, t.setAttribute("aria-label", "Open Brainfish widget"), t.appendChild(r), function(l, o) {
705
- let n = !1;
704
+ `, t.setAttribute("aria-label", "Open Brainfish widget"), t.appendChild(n), function(l, o) {
705
+ let a = !1;
706
706
  const e = o.querySelector(".fish-icon"), d = o.querySelector(".close-icon");
707
707
  l.addEventListener("click", () => {
708
- n = !n;
709
- const s = document.querySelector(`.${k}`), i = s == null ? void 0 : s.querySelector("iframe");
708
+ a = !a;
709
+ const s = document.querySelector(`.${S}`), i = s == null ? void 0 : s.querySelector("iframe");
710
710
  var u;
711
- n ? (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"));
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
712
  });
713
- }(t, r), t;
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
+ })();
714
726
  }
715
- function Qe(a, t) {
716
- const r = document.createDocumentFragment(), l = Ue(a), o = function(n) {
717
- const e = P("div", k, { id: k, "aria-live": "polite", "aria-hidden": "true" }), d = P("iframe", "trigger-iframe", { src: n, sandbox: "allow-scripts allow-same-origin allow-popups", allow: "clipboard-write", role: "dialog" });
718
- return e.appendChild(d), e;
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 };
719
731
  }(t);
720
- return r.appendChild(l), r.appendChild(o), r;
732
+ return n.appendChild(l), n.appendChild(o), { fragment: n, iframe: a };
721
733
  }
722
- function Xe(a) {
723
- const t = new AbortController(), { signal: r } = t;
724
- return window.addEventListener("message", (l) => {
725
- if (l.origin !== a) return;
726
- const { type: o } = l.data;
727
- if (o === "TOGGLE_WIDGET_SIZE" && function() {
728
- const n = document.querySelector(`.${k}`);
729
- n.classList.contains("expanded") ? n.classList.remove("expanded") : n.classList.add("expanded");
730
- }(), o === "TRACK_EVENT") {
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") {
731
742
  if (!window.BrainfishAnalytics) return;
732
- const { eventName: n, data: e } = l.data;
733
- window.BrainfishAnalytics("track", n, e);
743
+ const { eventName: o, data: a } = n.data;
744
+ window.BrainfishAnalytics("track", o, a);
734
745
  }
735
- }, { signal: r }), t;
746
+ }, { signal: t });
736
747
  }
737
- const et = (a, t) => {
738
- const r = oe(a.overrides), l = ((o = a.overrides) == null ? void 0 : o.widgetHost) || void 0;
748
+ const tt = (r, t) => {
749
+ const n = oe(r.overrides), l = ((o = r.overrides) == null ? void 0 : o.widgetHost) || void 0;
739
750
  var o;
740
- const n = `${l}/?widgetKey=${a.widgetKey}`;
751
+ const a = `${l}/?widgetKey=${r.widgetKey}`;
741
752
  try {
742
- if (e = a.widgetKey, me.has(e) || function(u) {
743
- return !!document.getElementById(`trigger-button-${u}`);
744
- }(a.widgetKey)) return;
745
- Ve(t);
746
- const d = Qe(a.widgetKey, n);
747
- document.body.appendChild(d);
748
- const s = Xe(l);
749
- me.add(a.widgetKey);
750
- const i = () => {
751
- s.abort(), window.removeEventListener("beforeunload", i);
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);
752
765
  };
753
- return void window.addEventListener("beforeunload", i);
766
+ return void window.addEventListener("beforeunload", c);
754
767
  } catch (d) {
755
768
  (function(s, i, u) {
756
769
  w(s, i, i.message, u);
757
- })(r, d, a.widgetKey);
770
+ })(n, d, r.widgetKey);
758
771
  }
759
772
  var e;
760
773
  };
761
- let I = null;
762
- const be = typeof window != "undefined" && window.Brainfish ? window.Brainfish : (I || (I = /* @__PURE__ */ function() {
763
- let a = [], t = null;
764
- function r(o, n) {
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) {
765
778
  if (t) {
766
779
  const e = o.split(".");
767
780
  let d = t;
768
781
  for (let i = 0; i < e.length - 1; i++) d = d[e[i]];
769
782
  const s = d[e[e.length - 1]];
770
- if (typeof s == "function") return s.apply(d, n);
771
- } else a.push([o, n]);
783
+ if (typeof s == "function") return s.apply(d, a);
784
+ } else r.push([o, a]);
772
785
  }
773
786
  return { Widgets: { init: function() {
774
- for (var o = arguments.length, n = new Array(o), e = 0; e < o; e++) n[e] = arguments[e];
775
- return r("Widgets.init", n);
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);
776
789
  } }, SearchWidget: { initStandard: function() {
777
- for (var o = arguments.length, n = new Array(o), e = 0; e < o; e++) n[e] = arguments[e];
778
- return r("SearchWidget.initStandard", n);
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);
779
792
  } }, HelpWidget: { initPopup: function() {
780
- for (var o = arguments.length, n = new Array(o), e = 0; e < o; e++) n[e] = arguments[e];
781
- return r("HelpWidget.initPopup", n);
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);
782
795
  }, close: function() {
783
- for (var o = arguments.length, n = new Array(o), e = 0; e < o; e++) n[e] = arguments[e];
784
- return r("HelpWidget.close", n);
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);
785
798
  }, open: function() {
786
- for (var o = arguments.length, n = new Array(o), e = 0; e < o; e++) n[e] = arguments[e];
787
- return r("HelpWidget.open", n);
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);
788
801
  }, toggle: function() {
789
- for (var o = arguments.length, n = new Array(o), e = 0; e < o; e++) n[e] = arguments[e];
790
- return r("HelpWidget.toggle", n);
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);
791
804
  } }, _setRealBrainfish: function(o) {
792
- for (t = o; a.length > 0; ) {
793
- const [n, e] = a.shift();
794
- r(n, e);
805
+ for (t = o; r.length > 0; ) {
806
+ const [a, e] = r.shift();
807
+ n(a, e);
795
808
  }
796
809
  } };
797
- }(), typeof window != "undefined" && (window.Brainfish = I)), I);
798
- let $ = null;
799
- be.Widgets.init = (a) => b(void 0, null, function* () {
810
+ }(), typeof window != "undefined" && (window.Brainfish = M)), M);
811
+ let T = null;
812
+ be.Widgets.init = (r) => m(void 0, null, function* () {
800
813
  window && (window.BrainfishAnalytics = window.BrainfishAnalytics || function() {
801
- for (var n = arguments.length, e = new Array(n), d = 0; d < n; d++) e[d] = arguments[d];
814
+ for (var a = arguments.length, e = new Array(a), d = 0; d < a; d++) e[d] = arguments[d];
802
815
  (window.BrainfishAnalytics.q = window.BrainfishAnalytics.q || []).push(e);
803
816
  });
804
- const t = oe(a.overrides), r = ((l = a.overrides) == null ? void 0 : l.analyticsApiHost) || void 0;
817
+ const t = oe(r.overrides), n = ((l = r.overrides) == null ? void 0 : l.analyticsApiHost) || void 0;
805
818
  var l;
806
- const { config: o } = yield Te({ widgetKey: a.widgetKey, apiHost: t });
807
- $ || ($ = function(n, e, d, s) {
808
- return b(this, null, function* () {
809
- var i, u, c, f;
810
- const h = ((i = n.overrides) === null || i === void 0 ? void 0 : i.enableRecording) || (e == null || (u = e.settings) === null || u === void 0 ? void 0 : u.enableRecording) || !1, g = ((c = n.overrides) === null || c === void 0 ? void 0 : c.version) || (e == null ? void 0 : e.version), p = [];
811
- g != null && g.startsWith("2.") ? et(n, e) : p.push(qe(n, e)), e != null && (f = e.settings) !== null && f !== void 0 && f.enableTracking && p.push(ze(n.widgetKey, e.trackingToken || "", d, s, h));
812
- const [m] = yield Promise.allSettled(p);
813
- m && m.status === "fulfilled" && m.value && be._setRealBrainfish(m.value);
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);
814
827
  });
815
- }(a, o, t, r)), yield $;
828
+ }(r, o, t, n)), yield T;
816
829
  });
817
- const nt = function() {
830
+ const rt = function() {
818
831
  typeof window != "undefined" && window.BrainfishAnalytics && window.BrainfishAnalytics(...arguments);
819
832
  };
820
833
  export {
821
- nt as BrainfishAnalytics,
834
+ rt as BrainfishAnalytics,
822
835
  be as default
823
836
  };
824
837
  //# sourceMappingURL=web.js.map