@gengage/assistant-fe 0.1.2 → 0.1.4

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/common.js CHANGED
@@ -1,48 +1,48 @@
1
- import { o as u, s as d, U as A, _ as v, d as f, v as y, V as S, W as x, A as E } from "./schemas-CPkzbgia.js";
2
- import { B as Pe, X as Ue, a as Re, z as qe, Y as Fe, b as Me, N as Be, Z as Le, $ as ze, c as De, a0 as Ne, a1 as Oe, j as We, k as $e, a2 as He, a3 as Ge, P as Ke, m as Qe, M as Ye, a4 as je, q as Ve, p as Xe, a5 as Ze, a6 as Je, r as et, a7 as tt, T as ot, h as it, l as nt, a8 as at, g as rt, Q as st, a9 as lt, w as dt, aa as ct, ab as ut, ac as ft } from "./schemas-CPkzbgia.js";
3
- import { G as P } from "./index-CXbH-cw8.js";
4
- import { V as gt, i as mt, r as pt } from "./index-CXbH-cw8.js";
5
- import { s as wt } from "./quantity-stepper-B8kX8GbN.js";
6
- import { GengageQNA as U } from "./qna.js";
7
- import { GengageSimRel as R } from "./simrel.js";
8
- const m = u({
9
- enabled: f().default(!0)
10
- }), q = u({
11
- chat: d().optional(),
12
- qna: d().optional(),
13
- simrel: d().optional()
14
- }), F = u({}), M = v(["none", "x-api-key-header", "bearer-header", "body-api-key"]), B = u({
15
- mode: M.default("none"),
16
- key: d().optional(),
17
- headerName: d().optional(),
18
- bodyField: d().default("api_key")
19
- }), L = u({
20
- enabled: f().default(!0),
21
- endpoint: d().default("/analytics"),
22
- auth: B.default({ mode: "none", bodyField: "api_key" }),
23
- fireAndForget: f().default(!0),
24
- useBeacon: f().default(!0),
25
- keepaliveFetch: f().default(!0),
26
- timeoutMs: y().int().positive().default(4e3),
27
- maxRetries: y().int().min(0).max(5).default(1)
28
- }), _ = "__gengageWidgetsInit", z = u({
29
- idempotencyKey: d().default(_),
30
- requireDomReady: f().default(!0)
31
- }), D = v(["log-and-ignore", "throw", "delegate"]), N = u({
1
+ import { o as d, s as l, U as k, _ as w, d as u, v as m, V as S, W as x, A as E } from "./schemas-CPkzbgia.js";
2
+ import { B as xe, X as Ee, a as Ie, z as Ae, Y as qe, b as Pe, N as Ue, Z as Re, $ as Me, c as Le, a0 as Fe, a1 as De, j as Oe, k as Be, a2 as Ne, a3 as $e, P as We, m as He, M as ze, a4 as Ge, q as Ke, p as Qe, a5 as Ve, a6 as je, r as Ye, a7 as Xe, T as Ze, h as Je, l as et, a8 as tt, g as it, Q as nt, a9 as ot, w as st, aa as at, ab as rt, ac as lt } from "./schemas-CPkzbgia.js";
3
+ import { G as I } from "./index-DC0Bo9EA.js";
4
+ import { V as dt, i as ut, r as ht } from "./index-DC0Bo9EA.js";
5
+ import { s as ft } from "./quantity-stepper-B8kX8GbN.js";
6
+ import { GengageQNA as A } from "./qna.js";
7
+ import { GengageSimRel as q } from "./simrel.js";
8
+ const f = d({
9
+ enabled: u().default(!0)
10
+ }), P = d({
11
+ chat: l().optional(),
12
+ qna: l().optional(),
13
+ simrel: l().optional()
14
+ }), U = d({}), R = w(["none", "x-api-key-header", "bearer-header", "body-api-key"]), M = d({
15
+ mode: R.default("none"),
16
+ key: l().optional(),
17
+ headerName: l().optional(),
18
+ bodyField: l().default("api_key")
19
+ }), L = d({
20
+ enabled: u().default(!0),
21
+ endpoint: l().default("/analytics"),
22
+ auth: M.default({ mode: "none", bodyField: "api_key" }),
23
+ fireAndForget: u().default(!0),
24
+ useBeacon: u().default(!0),
25
+ keepaliveFetch: u().default(!0),
26
+ timeoutMs: m().int().positive().default(4e3),
27
+ maxRetries: m().int().min(0).max(5).default(1)
28
+ }), v = "__gengageWidgetsInit", F = d({
29
+ idempotencyKey: l().default(v),
30
+ requireDomReady: u().default(!0)
31
+ }), D = w(["log-and-ignore", "throw", "delegate"]), O = d({
32
32
  unknownActionPolicy: D.default("log-and-ignore"),
33
- allowScriptCall: f().default(!1)
34
- }), C = u({
35
- version: A("1"),
36
- accountId: d().min(1),
37
- middlewareUrl: d().url(),
38
- locale: d().optional(),
39
- widgets: u({
40
- chat: m.default({ enabled: !0 }),
41
- qna: m.default({ enabled: !0 }),
42
- simrel: m.default({ enabled: !0 })
33
+ allowScriptCall: u().default(!1)
34
+ }), _ = d({
35
+ version: k("1"),
36
+ accountId: l().min(1),
37
+ middlewareUrl: l().url(),
38
+ locale: l().optional(),
39
+ widgets: d({
40
+ chat: f.default({ enabled: !0 }),
41
+ qna: f.default({ enabled: !0 }),
42
+ simrel: f.default({ enabled: !0 })
43
43
  }),
44
- mounts: q.default({}),
45
- transport: F.default({}),
44
+ mounts: P.default({}),
45
+ transport: U.default({}),
46
46
  analytics: L.default({
47
47
  enabled: !0,
48
48
  endpoint: "/analytics",
@@ -53,23 +53,23 @@ const m = u({
53
53
  timeoutMs: 4e3,
54
54
  maxRetries: 1
55
55
  }),
56
- gtm: z.default({
56
+ gtm: F.default({
57
57
  idempotencyKey: "__gengageWidgetsInit",
58
58
  requireDomReady: !0
59
59
  }),
60
- actionHandling: N.default({
60
+ actionHandling: O.default({
61
61
  unknownActionPolicy: "log-and-ignore",
62
62
  allowScriptCall: !1
63
63
  })
64
64
  });
65
- function O(e) {
66
- return C.parse(e);
65
+ function B(e) {
66
+ return _.parse(e);
67
67
  }
68
- function W(e) {
69
- return C.safeParse(e);
68
+ function N(e) {
69
+ return _.safeParse(e);
70
70
  }
71
- function ge(e) {
72
- return O({
71
+ function he(e) {
72
+ return B({
73
73
  version: "1",
74
74
  accountId: e.accountId,
75
75
  middlewareUrl: e.middlewareUrl,
@@ -81,7 +81,7 @@ function ge(e) {
81
81
  }
82
82
  });
83
83
  }
84
- const b = `${_}_overlay_`, $ = "#gengage-qna", H = "#gengage-simrel";
84
+ const T = `${v}_overlay_`, $ = "#gengage-qna", W = "#gengage-simrel";
85
85
  function p() {
86
86
  const e = window;
87
87
  return e.__gengageOverlayRegistry || (e.__gengageOverlayRegistry = {
@@ -89,29 +89,29 @@ function p() {
89
89
  pending: {}
90
90
  }), e.__gengageOverlayRegistry;
91
91
  }
92
- function G(e) {
92
+ function H(e) {
93
93
  const t = {
94
94
  pageType: e.pageContext?.pageType ?? (e.sku !== void 0 ? "pdp" : "other")
95
- }, o = e.pageContext;
96
- return o?.sku !== void 0 && (t.sku = o.sku), o?.price !== void 0 && (t.price = o.price), o?.categoryTree !== void 0 && (t.categoryTree = o.categoryTree), o?.url !== void 0 && (t.url = o.url), o?.extra !== void 0 && (t.extra = o.extra), e.sku !== void 0 && (t.sku = e.sku), t;
95
+ }, i = e.pageContext;
96
+ return i?.sku !== void 0 && (t.sku = i.sku), i?.price !== void 0 && (t.price = i.price), i?.categoryTree !== void 0 && (t.categoryTree = i.categoryTree), i?.url !== void 0 && (t.url = i.url), i?.extra !== void 0 && (t.extra = i.extra), e.sku !== void 0 && (t.sku = e.sku), t;
97
97
  }
98
- function K(e, t) {
99
- const o = {
98
+ function z(e, t) {
99
+ const i = {
100
100
  ...e,
101
101
  ...t,
102
102
  pageType: t.pageType ?? e.pageType
103
103
  };
104
- return t.sku === void 0 && e.sku !== void 0 && (o.sku = e.sku), o;
104
+ return t.sku === void 0 && e.sku !== void 0 && (i.sku = e.sku), i;
105
105
  }
106
- function w(e) {
106
+ function y(e) {
107
107
  return e instanceof HTMLElement || document.querySelector(e) ? e : null;
108
108
  }
109
- function T(e) {
110
- return e.idempotencyKey ?? `${b}${e.accountId}`;
109
+ function C(e) {
110
+ return e.idempotencyKey ?? `${T}${e.accountId}`;
111
111
  }
112
- class Q {
113
- constructor(t, o) {
114
- this.options = t, this.onDestroy = o, this._chat = null, this._qna = null, this._simrel = null, this._analyticsClient = null, this._destroyed = !1, this._queue = Promise.resolve(), this._warnedQnaMountMissing = !1, this._warnedSimRelMountMissing = !1, this.idempotencyKey = T(t), this.session = S(t.session), this._pageContext = G(t);
112
+ class G {
113
+ constructor(t, i) {
114
+ this.options = t, this.onDestroy = i, this._chat = null, this._qna = null, this._simrel = null, this._analyticsClient = null, this._destroyed = !1, this._queue = Promise.resolve(), this._warnedQnaMountMissing = !1, this._warnedSimRelMountMissing = !1, this.idempotencyKey = C(t), this.session = S(t.session), this._pageContext = H(t);
115
115
  }
116
116
  get chat() {
117
117
  return this._chat;
@@ -136,25 +136,25 @@ class Q {
136
136
  }
137
137
  async updateContext(t) {
138
138
  this._destroyed || await this._enqueue(async () => {
139
- this._pageContext = K(this._pageContext, t), window.gengage || (window.gengage = {}), window.gengage.pageContext = this._pageContext, this._chat?.update(t), this._qna?.update(t), this._simrel?.update(t), await this._syncPdpWidgets();
139
+ this._pageContext = z(this._pageContext, t), window.gengage || (window.gengage = {}), window.gengage.pageContext = this._pageContext, this._chat?.update(t), this._qna?.update(t), this._simrel?.update(t), await this._syncPdpWidgets();
140
140
  });
141
141
  }
142
- async updateSku(t, o = "pdp") {
143
- await this.updateContext({ sku: t, pageType: o });
142
+ async updateSku(t, i = "pdp") {
143
+ await this.updateContext({ sku: t, pageType: i });
144
144
  }
145
145
  destroy() {
146
146
  this._destroyed || (this._destroyed = !0, this._chat?.destroy(), this._qna?.destroy(), this._simrel?.destroy(), this._chat = null, this._qna = null, this._simrel = null, window.gengage?.overlay === this && delete window.gengage.overlay, this.onDestroy());
147
147
  }
148
148
  async _initChat() {
149
149
  if (this.options.chat?.enabled === !1) return;
150
- const t = this.options.middlewareUrl, o = {
150
+ const t = this.options.middlewareUrl, i = {
151
151
  accountId: this.options.accountId,
152
152
  middlewareUrl: t,
153
153
  session: this.session,
154
154
  pageContext: this._pageContext,
155
155
  variant: this.options.chat?.variant ?? "floating"
156
156
  };
157
- this.options.theme !== void 0 && (o.theme = this.options.theme), this.options.locale !== void 0 && (o.locale = this.options.locale), this.options.pricing !== void 0 && (o.pricing = this.options.pricing), this.options.chat?.mountTarget !== void 0 && (o.mountTarget = this.options.chat.mountTarget), this.options.chat?.launcherSvg !== void 0 && (o.launcherSvg = this.options.chat.launcherSvg), this.options.chat?.hideMobileLauncher !== void 0 && (o.hideMobileLauncher = this.options.chat.hideMobileLauncher), this.options.chat?.mobileBreakpoint !== void 0 && (o.mobileBreakpoint = this.options.chat.mobileBreakpoint), this.options.chat?.mobileInitialState !== void 0 && (o.mobileInitialState = this.options.chat.mobileInitialState), this.options.chat?.i18n !== void 0 && (o.i18n = this.options.chat.i18n), this.options.chat?.actionHandling !== void 0 && (o.actionHandling = this.options.chat.actionHandling), this.options.onScriptCall !== void 0 && (o.onScriptCall = this.options.onScriptCall), this._chat = new P(), await this._chat.init(o);
157
+ this.options.theme !== void 0 && (i.theme = this.options.theme), this.options.locale !== void 0 && (i.locale = this.options.locale), this.options.pricing !== void 0 && (i.pricing = this.options.pricing), this.options.chat?.mountTarget !== void 0 && (i.mountTarget = this.options.chat.mountTarget), this.options.chat?.launcherSvg !== void 0 && (i.launcherSvg = this.options.chat.launcherSvg), this.options.chat?.hideMobileLauncher !== void 0 && (i.hideMobileLauncher = this.options.chat.hideMobileLauncher), this.options.chat?.mobileBreakpoint !== void 0 && (i.mobileBreakpoint = this.options.chat.mobileBreakpoint), this.options.chat?.mobileInitialState !== void 0 && (i.mobileInitialState = this.options.chat.mobileInitialState), this.options.chat?.i18n !== void 0 && (i.i18n = this.options.chat.i18n), this.options.chat?.actionHandling !== void 0 && (i.actionHandling = this.options.chat.actionHandling), this.options.onScriptCall !== void 0 && (i.onScriptCall = this.options.onScriptCall), this._chat = new I(), await this._chat.init(i);
158
158
  }
159
159
  async _syncPdpWidgets() {
160
160
  if (this._destroyed) return;
@@ -163,48 +163,48 @@ class Q {
163
163
  this._destroyPdpWidgets();
164
164
  return;
165
165
  }
166
- const i = this.options.middlewareUrl;
166
+ const n = this.options.middlewareUrl;
167
167
  if (this.options.qna?.enabled !== !1) {
168
- const a = this.options.qna?.mountTarget ?? $, r = w(a);
169
- if (r)
168
+ const s = this.options.qna?.mountTarget ?? $, a = y(s);
169
+ if (a)
170
170
  if (this._warnedQnaMountMissing = !1, this._qna)
171
171
  this._qna.show(), this._qna.update({ pageType: "pdp", sku: t });
172
172
  else {
173
- const s = new U(), n = {
173
+ const r = new A(), o = {
174
174
  accountId: this.options.accountId,
175
- middlewareUrl: i,
175
+ middlewareUrl: n,
176
176
  session: this.session,
177
177
  pageContext: {
178
178
  pageType: "pdp",
179
179
  sku: t
180
180
  },
181
- mountTarget: r
181
+ mountTarget: a
182
182
  };
183
- this.options.theme !== void 0 && (n.theme = this.options.theme), this.options.qna?.ctaText !== void 0 && (n.ctaText = this.options.qna.ctaText), this.options.qna?.inputPlaceholder !== void 0 && (n.inputPlaceholder = this.options.qna.inputPlaceholder), await s.init(n), this._qna = s;
183
+ this.options.theme !== void 0 && (o.theme = this.options.theme), this.options.qna?.ctaText !== void 0 && (o.ctaText = this.options.qna.ctaText), this.options.qna?.inputPlaceholder !== void 0 && (o.inputPlaceholder = this.options.qna.inputPlaceholder), await r.init(o), this._qna = r;
184
184
  }
185
185
  else
186
- this._qna?.destroy(), this._qna = null, this._warnedQnaMountMissing || (console.warn(`[gengage] QNA mount target not found: ${a}`), this._warnedQnaMountMissing = !0);
186
+ this._qna?.destroy(), this._qna = null, this._warnedQnaMountMissing || (console.warn(`[gengage] QNA mount target not found: ${s}`), this._warnedQnaMountMissing = !0);
187
187
  } else
188
188
  this._qna?.destroy(), this._qna = null;
189
189
  if (this.options.simrel?.enabled !== !1) {
190
- const a = this.options.simrel?.mountTarget ?? H, r = w(a);
191
- if (r)
190
+ const s = this.options.simrel?.mountTarget ?? W, a = y(s);
191
+ if (a)
192
192
  if (this._warnedSimRelMountMissing = !1, this._simrel)
193
193
  this._simrel.show(), this._simrel.update({ pageType: "pdp", sku: t });
194
194
  else {
195
- const s = new R(), n = {
195
+ const r = new q(), o = {
196
196
  accountId: this.options.accountId,
197
- middlewareUrl: i,
197
+ middlewareUrl: n,
198
198
  session: this.session,
199
199
  sku: t,
200
- mountTarget: r
200
+ mountTarget: a
201
201
  };
202
- this.options.theme !== void 0 && (n.theme = this.options.theme), this.options.pricing !== void 0 && (n.pricing = this.options.pricing), this.options.simrel?.discountType !== void 0 && (n.discountType = this.options.simrel.discountType), this.options.onAddToCart !== void 0 && (n.onAddToCart = this.options.onAddToCart), this.options.onProductNavigate !== void 0 ? n.onProductNavigate = this.options.onProductNavigate : n.onProductNavigate = (c, h, g) => {
202
+ this.options.theme !== void 0 && (o.theme = this.options.theme), this.options.pricing !== void 0 && (o.pricing = this.options.pricing), this.options.simrel?.discountType !== void 0 && (o.discountType = this.options.simrel.discountType), this.options.onAddToCart !== void 0 && (o.onAddToCart = this.options.onAddToCart), this.options.onProductNavigate !== void 0 ? o.onProductNavigate = this.options.onProductNavigate : o.onProductNavigate = (c, h, g) => {
203
203
  this._chat?.saveSession(g ?? this.session.sessionId, h), window.location.href = c;
204
- }, await s.init(n), this._simrel = s;
204
+ }, await r.init(o), this._simrel = r;
205
205
  }
206
206
  else
207
- this._simrel?.destroy(), this._simrel = null, this._warnedSimRelMountMissing || (console.warn(`[gengage] SimRel mount target not found: ${a}`), this._warnedSimRelMountMissing = !0);
207
+ this._simrel?.destroy(), this._simrel = null, this._warnedSimRelMountMissing || (console.warn(`[gengage] SimRel mount target not found: ${s}`), this._warnedSimRelMountMissing = !0);
208
208
  } else
209
209
  this._simrel?.destroy(), this._simrel = null;
210
210
  }
@@ -212,32 +212,32 @@ class Q {
212
212
  this._qna?.destroy(), this._simrel?.destroy(), this._qna = null, this._simrel = null;
213
213
  }
214
214
  _enqueue(t) {
215
- const o = this._queue.then(t);
216
- return this._queue = o.catch((i) => {
217
- }), o;
218
- }
219
- }
220
- async function Y(e) {
221
- const t = T(e), o = p(), i = o.instances[t];
222
- if (i) return i;
223
- const a = o.pending[t];
224
- if (a) return a;
225
- const r = new Q(e, () => {
226
- const n = p();
227
- delete n.instances[t], delete n.pending[t];
228
- }), s = r.init().then(() => (o.instances[t] = r, delete o.pending[t], r)).catch((n) => {
229
- throw delete o.pending[t], n;
215
+ const i = this._queue.then(t);
216
+ return this._queue = i.catch((n) => {
217
+ }), i;
218
+ }
219
+ }
220
+ async function K(e) {
221
+ const t = C(e), i = p(), n = i.instances[t];
222
+ if (n) return n;
223
+ const s = i.pending[t];
224
+ if (s) return s;
225
+ const a = new G(e, () => {
226
+ const o = p();
227
+ delete o.instances[t], delete o.pending[t];
228
+ }), r = a.init().then(() => (i.instances[t] = a, delete i.pending[t], a)).catch((o) => {
229
+ throw delete i.pending[t], o;
230
230
  });
231
- return o.pending[t] = s, s;
231
+ return i.pending[t] = r, r;
232
232
  }
233
- function j(e) {
233
+ function Q(e) {
234
234
  return p().instances[e] ?? null;
235
235
  }
236
- function me(e) {
237
- j(e)?.destroy();
236
+ function ge(e) {
237
+ Q(e)?.destroy();
238
238
  }
239
- function pe(e) {
240
- return `${b}${e}`;
239
+ function fe(e) {
240
+ return `${T}${e}`;
241
241
  }
242
242
  const V = {
243
243
  enabled: !0,
@@ -249,19 +249,19 @@ const V = {
249
249
  maxRetries: 1,
250
250
  batchSize: 10,
251
251
  flushIntervalMs: 250
252
- }, X = {
252
+ }, j = {
253
253
  mode: "none",
254
254
  key: "",
255
255
  headerName: "X-API-Key",
256
256
  bodyField: "api_key"
257
257
  };
258
- class Z {
258
+ class Y {
259
259
  constructor(t) {
260
260
  this.queue = [], this.flushTimer = null, this.config = {
261
261
  ...V,
262
262
  ...t,
263
263
  auth: {
264
- ...X,
264
+ ...j,
265
265
  ...t.auth ?? {}
266
266
  }
267
267
  }, this.onPageHideBound = () => {
@@ -270,8 +270,8 @@ class Z {
270
270
  }
271
271
  track(t) {
272
272
  if (!this.config.enabled) return;
273
- const o = J(t);
274
- if (this.queue.push(o), this.queue.length >= this.config.batchSize) {
273
+ const i = X(t);
274
+ if (this.queue.push(i), this.queue.length >= this.config.batchSize) {
275
275
  this.scheduleImmediateFlush();
276
276
  return;
277
277
  }
@@ -279,8 +279,8 @@ class Z {
279
279
  }
280
280
  async flush(t = {}) {
281
281
  if (!this.config.enabled || this.queue.length === 0) return;
282
- const o = this.queue.splice(0, this.config.batchSize), i = this.buildTransportBody(o), a = ee(this.config.endpoint, this.config.middlewareUrl), r = t.preferBeacon ?? this.config.useBeacon;
283
- await this.sendWithRetry(a, i, r);
282
+ const i = this.queue.splice(0, this.config.batchSize), n = this.buildTransportBody(i), s = Z(this.config.endpoint, this.config.middlewareUrl), a = t.preferBeacon ?? this.config.useBeacon;
283
+ await this.sendWithRetry(s, n, a);
284
284
  }
285
285
  /** Drain the entire queue, flushing in batch-sized chunks. */
286
286
  async flushAll(t = {}) {
@@ -299,49 +299,49 @@ class Z {
299
299
  this.flushTimer && (clearTimeout(this.flushTimer), this.flushTimer = null), this.flush();
300
300
  }
301
301
  buildTransportBody(t) {
302
- const o = { events: t };
303
- return this.config.auth.mode === "body-api-key" && this.config.auth.key && (o[this.config.auth.bodyField] = this.config.auth.key), o;
302
+ const i = { events: t };
303
+ return this.config.auth.mode === "body-api-key" && this.config.auth.key && (i[this.config.auth.bodyField] = this.config.auth.key), i;
304
304
  }
305
- async sendWithRetry(t, o, i) {
306
- let a = 0;
307
- for (; a <= this.config.maxRetries; ) {
308
- a += 1;
305
+ async sendWithRetry(t, i, n) {
306
+ let s = 0;
307
+ for (; s <= this.config.maxRetries; ) {
308
+ s += 1;
309
309
  try {
310
- if (await this.send(t, o, i)) return;
310
+ if (await this.send(t, i, n)) return;
311
311
  } catch {
312
312
  }
313
- a <= this.config.maxRetries && await new Promise((r) => setTimeout(r, Math.min(1e3, 100 * Math.pow(2, a - 1))));
313
+ s <= this.config.maxRetries && await new Promise((a) => setTimeout(a, Math.min(1e3, 100 * Math.pow(2, s - 1))));
314
314
  }
315
315
  }
316
- async send(t, o, i) {
317
- const a = JSON.stringify(o);
318
- if (i && this.config.useBeacon && this.config.auth.mode !== "x-api-key-header" && this.config.auth.mode !== "bearer-header" && te()) {
319
- const h = new Blob([a], { type: "application/json" });
316
+ async send(t, i, n) {
317
+ const s = JSON.stringify(i);
318
+ if (n && this.config.useBeacon && this.config.auth.mode !== "x-api-key-header" && this.config.auth.mode !== "bearer-header" && J()) {
319
+ const h = new Blob([s], { type: "application/json" });
320
320
  if (navigator.sendBeacon(t, h)) return !0;
321
321
  }
322
322
  if (typeof fetch > "u") return !1;
323
- const s = {
323
+ const r = {
324
324
  "Content-Type": "application/json"
325
325
  };
326
- this.config.auth.mode === "x-api-key-header" && this.config.auth.key && (s[this.config.auth.headerName] = this.config.auth.key), this.config.auth.mode === "bearer-header" && this.config.auth.key && (s.Authorization = `Bearer ${this.config.auth.key}`);
327
- const n = typeof AbortController < "u" ? new AbortController() : null, c = n ? setTimeout(() => n.abort(), this.config.timeoutMs) : null;
326
+ this.config.auth.mode === "x-api-key-header" && this.config.auth.key && (r[this.config.auth.headerName] = this.config.auth.key), this.config.auth.mode === "bearer-header" && this.config.auth.key && (r.Authorization = `Bearer ${this.config.auth.key}`);
327
+ const o = typeof AbortController < "u" ? new AbortController() : null, c = o ? setTimeout(() => o.abort(), this.config.timeoutMs) : null;
328
328
  try {
329
329
  const h = {
330
330
  method: "POST",
331
- headers: s,
332
- body: a,
331
+ headers: r,
332
+ body: s,
333
333
  keepalive: this.config.keepaliveFetch && this.config.fireAndForget
334
334
  };
335
- return n && (h.signal = n.signal), (await fetch(t, h)).ok;
335
+ return o && (h.signal = o.signal), (await fetch(t, h)).ok;
336
336
  } finally {
337
337
  c && clearTimeout(c);
338
338
  }
339
339
  }
340
340
  }
341
- function ye(e) {
342
- return new Z(e);
341
+ function pe(e) {
342
+ return new Y(e);
343
343
  }
344
- function J(e) {
344
+ function X(e) {
345
345
  const t = {
346
346
  event_name: e.event_name,
347
347
  event_version: e.event_version ?? "1",
@@ -353,15 +353,15 @@ function J(e) {
353
353
  };
354
354
  return e.view_id !== void 0 && (t.view_id = e.view_id), e.user_id !== void 0 && (t.user_id = e.user_id), e.widget !== void 0 && (t.widget = e.widget), e.page_type !== void 0 && (t.page_type = e.page_type), e.sku !== void 0 && (t.sku = e.sku), t;
355
355
  }
356
- function ee(e, t) {
356
+ function Z(e, t) {
357
357
  if (/^https?:\/\//i.test(e)) return e;
358
- const o = E(t), i = e.startsWith("/") ? e : `/${e}`;
359
- return `${o}${i}`;
358
+ const i = E(t), n = e.startsWith("/") ? e : `/${e}`;
359
+ return `${i}${n}`;
360
360
  }
361
- function te() {
361
+ function J() {
362
362
  return typeof navigator < "u" && typeof navigator.sendBeacon == "function";
363
363
  }
364
- const oe = {
364
+ const ee = {
365
365
  primaryColor: "#000000",
366
366
  primaryForeground: "#ffffff",
367
367
  backgroundColor: "#ffffff",
@@ -386,30 +386,30 @@ const oe = {
386
386
  "--gengage-qna-input-radius": "14px",
387
387
  "--gengage-simrel-card-radius": "14px"
388
388
  };
389
- function we(e) {
390
- return { ...oe, ...e };
389
+ function me(e) {
390
+ return { ...ee, ...e };
391
391
  }
392
- const k = "tr";
393
- function ve(e) {
392
+ const b = "tr";
393
+ function ye(e) {
394
394
  return {
395
395
  ACCOUNT_ID: e.accountId,
396
396
  MIDDLEWARE_URL: e.middlewareUrl,
397
- LOCALE: e.locale ?? k
397
+ LOCALE: e.locale ?? b
398
398
  };
399
399
  }
400
- function _e(e, t = {}) {
401
- const o = {
400
+ function we(e, t = {}) {
401
+ const i = {
402
402
  accountId: e.accountId,
403
403
  middlewareUrl: e.middlewareUrl,
404
404
  session: { sessionId: e.sessionId },
405
405
  variant: "floating",
406
- locale: e.locale ?? k,
406
+ locale: e.locale ?? b,
407
407
  ...t
408
408
  };
409
- return e.theme !== void 0 && (o.theme = e.theme), o;
409
+ return e.theme !== void 0 && (i.theme = e.theme), i;
410
410
  }
411
- function Ce(e, t = {}) {
412
- const o = {
411
+ function ve(e, t = {}) {
412
+ const i = {
413
413
  accountId: e.accountId,
414
414
  middlewareUrl: e.middlewareUrl,
415
415
  session: { sessionId: e.sessionId },
@@ -417,10 +417,10 @@ function Ce(e, t = {}) {
417
417
  mountTarget: e.mountTarget,
418
418
  ...t
419
419
  };
420
- return e.theme !== void 0 && (o.theme = e.theme), o;
420
+ return e.theme !== void 0 && (i.theme = e.theme), i;
421
421
  }
422
- function be(e, t = {}) {
423
- const o = {
422
+ function _e(e, t = {}) {
423
+ const i = {
424
424
  accountId: e.accountId,
425
425
  middlewareUrl: e.middlewareUrl,
426
426
  session: { sessionId: e.sessionId },
@@ -428,7 +428,7 @@ function be(e, t = {}) {
428
428
  mountTarget: e.mountTarget,
429
429
  ...t
430
430
  };
431
- return e.theme !== void 0 && (o.theme = e.theme), o;
431
+ return e.theme !== void 0 && (i.theme = e.theme), i;
432
432
  }
433
433
  function Te(e, t = {}) {
434
434
  return {
@@ -440,109 +440,109 @@ function Te(e, t = {}) {
440
440
  ...t
441
441
  };
442
442
  }
443
- function ie(e) {
443
+ function te(e) {
444
444
  try {
445
445
  return document.querySelector(e), !0;
446
446
  } catch {
447
447
  return !1;
448
448
  }
449
449
  }
450
- function ne(e, t) {
451
- const o = [], i = e.mounts, a = [
452
- ["qna", i.qna],
453
- ["simrel", i.simrel],
454
- ["chat", i.chat]
450
+ function ie(e, t) {
451
+ const i = [], n = e.mounts, s = [
452
+ ["qna", n.qna],
453
+ ["simrel", n.simrel],
454
+ ["chat", n.chat]
455
455
  ];
456
- for (const [s, n] of a)
457
- if (n !== void 0) {
458
- if (!ie(n)) {
459
- o.push({
456
+ for (const [r, o] of s)
457
+ if (o !== void 0) {
458
+ if (!te(o)) {
459
+ i.push({
460
460
  code: "INVALID_SELECTOR",
461
- message: `[gengage preflight] ${s} mount selector is invalid CSS: "${n}"`,
461
+ message: `[gengage preflight] ${r} mount selector is invalid CSS: "${o}"`,
462
462
  severity: "error"
463
463
  });
464
464
  continue;
465
465
  }
466
- document.querySelector(n) || o.push({
466
+ document.querySelector(o) || i.push({
467
467
  code: "MOUNT_NOT_FOUND",
468
- message: `[gengage preflight] ${s} mount target not found: "${n}" — widget will skip or wait for DOM`,
468
+ message: `[gengage preflight] ${r} mount target not found: "${o}" — widget will skip or wait for DOM`,
469
469
  severity: "warn"
470
470
  });
471
471
  }
472
- const r = e.gtm.idempotencyKey;
473
- if (window[r] !== void 0 && o.push({
472
+ const a = e.gtm.idempotencyKey;
473
+ if (window[a] !== void 0 && i.push({
474
474
  code: "DUPLICATE_IDEMPOTENCY",
475
- message: `[gengage preflight] window["${r}"] already exists — widgets may have already initialized`,
475
+ message: `[gengage preflight] window["${a}"] already exists — widgets may have already initialized`,
476
476
  severity: "warn"
477
477
  }), !t?.skipCspCheck) {
478
- let s = !1;
479
- const n = (c) => {
480
- c.blockedURI && e.middlewareUrl.startsWith(c.blockedURI) && (s = !0);
478
+ let r = !1;
479
+ const o = (c) => {
480
+ c.blockedURI && e.middlewareUrl.startsWith(c.blockedURI) && (r = !0);
481
481
  };
482
- document.addEventListener("securitypolicyviolation", n);
482
+ document.addEventListener("securitypolicyviolation", o);
483
483
  try {
484
484
  fetch(e.middlewareUrl, { method: "HEAD", mode: "no-cors" }).catch(() => {
485
485
  });
486
486
  } catch {
487
- s = !0;
487
+ r = !0;
488
488
  }
489
- document.removeEventListener("securitypolicyviolation", n), s && o.push({
489
+ document.removeEventListener("securitypolicyviolation", o), r && i.push({
490
490
  code: "CSP_BLOCKED",
491
491
  message: `[gengage preflight] middleware URL may be blocked by Content-Security-Policy: "${e.middlewareUrl}". Add it to connect-src.`,
492
492
  severity: "warn"
493
493
  });
494
494
  }
495
- for (const s of o)
496
- s.severity === "error" ? console.error(s.message) : console.warn(s.message);
495
+ for (const r of i)
496
+ r.severity === "error" ? console.error(r.message) : console.warn(r.message);
497
497
  return {
498
- ok: o.every((s) => s.severity !== "error"),
499
- warnings: o
498
+ ok: i.every((r) => r.severity !== "error"),
499
+ warnings: i
500
500
  };
501
501
  }
502
- function ae(e) {
503
- const t = W(e);
502
+ function ne(e) {
503
+ const t = N(e);
504
504
  if (!t.success) {
505
- const o = t.error.issues.map((i) => `${i.path.join(".")}: ${i.message}`).join("; ");
506
- throw new Error(`[gengage] Invalid runtime config: ${o}`);
505
+ const i = t.error.issues.map((n) => `${n.path.join(".")}: ${n.message}`).join("; ");
506
+ throw new Error(`[gengage] Invalid runtime config: ${i}`);
507
507
  }
508
508
  return t.data;
509
509
  }
510
- function re(e, t, o) {
511
- const i = {
510
+ function oe(e, t, i) {
511
+ const n = {
512
512
  accountId: e.accountId,
513
513
  middlewareUrl: e.middlewareUrl,
514
514
  idempotencyKey: e.gtm.idempotencyKey
515
515
  };
516
- return e.locale !== void 0 && (i.locale = e.locale), o !== void 0 && (i.pageContext = o, o.sku !== void 0 && (i.sku = o.sku)), i.chat = {
516
+ return e.locale !== void 0 && (n.locale = e.locale), i !== void 0 && (n.pageContext = i, i.sku !== void 0 && (n.sku = i.sku)), n.chat = {
517
517
  enabled: e.widgets.chat.enabled
518
- }, e.mounts.chat !== void 0 && (i.chat.mountTarget = e.mounts.chat), i.qna = {
518
+ }, e.mounts.chat !== void 0 && (n.chat.mountTarget = e.mounts.chat), n.qna = {
519
519
  enabled: e.widgets.qna.enabled
520
- }, e.mounts.qna !== void 0 && (i.qna.mountTarget = e.mounts.qna), i.simrel = {
520
+ }, e.mounts.qna !== void 0 && (n.qna.mountTarget = e.mounts.qna), n.simrel = {
521
521
  enabled: e.widgets.simrel.enabled
522
- }, e.mounts.simrel !== void 0 && (i.simrel.mountTarget = e.mounts.simrel), t?.onAddToCart !== void 0 && (i.onAddToCart = t.onAddToCart), t?.onProductNavigate !== void 0 && (i.onProductNavigate = t.onProductNavigate), t?.onScriptCall !== void 0 && (i.onScriptCall = t.onScriptCall), i;
522
+ }, e.mounts.simrel !== void 0 && (n.simrel.mountTarget = e.mounts.simrel), t?.onAddToCart !== void 0 && (n.onAddToCart = t.onAddToCart), t?.onProductNavigate !== void 0 && (n.onProductNavigate = t.onProductNavigate), t?.onScriptCall !== void 0 && (n.onScriptCall = t.onScriptCall), n;
523
523
  }
524
- async function ke(e) {
525
- const t = ae(e.runtimeConfig);
524
+ async function Ce(e) {
525
+ const t = ne(e.runtimeConfig);
526
526
  if (e.preflight !== !1) {
527
- const r = ne(t);
528
- if (!r.ok) {
529
- const s = r.warnings.filter((n) => n.severity === "error");
530
- throw new Error(`[gengage] Preflight failed: ${s.map((n) => n.message).join("; ")}`);
527
+ const a = ie(t);
528
+ if (!a.ok) {
529
+ const r = a.warnings.filter((o) => o.severity === "error");
530
+ throw new Error(`[gengage] Preflight failed: ${r.map((o) => o.message).join("; ")}`);
531
531
  }
532
532
  }
533
- const o = e.contextResolver?.(), i = re(t, e.hostActions, o), a = await Y(i);
533
+ const i = e.contextResolver?.(), n = oe(t, e.hostActions, i), s = await K(n);
534
534
  if (e.contextResolver !== void 0) {
535
- const r = e.contextResolver, s = () => {
536
- const c = r();
537
- a.updateContext(c);
535
+ const a = e.contextResolver, r = () => {
536
+ const c = a();
537
+ s.updateContext(c);
538
538
  };
539
- window.addEventListener("gengage:context:update", s);
540
- const n = a.destroy.bind(a);
541
- a.destroy = () => {
542
- window.removeEventListener("gengage:context:update", s), n();
539
+ window.addEventListener("gengage:context:update", r);
540
+ const o = s.destroy.bind(s);
541
+ s.destroy = () => {
542
+ window.removeEventListener("gengage:context:update", r), o();
543
543
  };
544
544
  }
545
- return a;
545
+ return s;
546
546
  }
547
547
  const se = [
548
548
  {
@@ -567,338 +567,106 @@ const se = [
567
567
  urlPatterns: ["/urun/", "/product/", "/p/", "/-p-", "/-pm-"]
568
568
  }
569
569
  ];
570
- function le(e, t) {
571
- const o = t ?? (typeof window < "u" ? new URL(window.location.href) : null);
572
- if (!o) return "other";
573
- const i = e ?? se, a = o.pathname;
574
- for (const r of i)
575
- if (!(r.urlPatterns && !r.urlPatterns.some((n) => {
570
+ function ae(e, t) {
571
+ const i = t ?? (typeof window < "u" ? new URL(window.location.href) : null);
572
+ if (!i) return "other";
573
+ const n = e ?? se, s = i.pathname;
574
+ for (const a of n)
575
+ if (!(a.urlPatterns && !a.urlPatterns.some((o) => {
576
576
  try {
577
- return new RegExp(n, "i").test(a);
577
+ return new RegExp(o, "i").test(s);
578
578
  } catch {
579
579
  return !1;
580
580
  }
581
- })) && !(r.queryParam && !o.searchParams.has(r.queryParam)) && !(r.selector && typeof document < "u" && !document.querySelector(r.selector)))
582
- return r.pageType;
581
+ })) && !(a.queryParam && !i.searchParams.has(a.queryParam)) && !(a.selector && typeof document < "u" && !document.querySelector(a.selector)))
582
+ return a.pageType;
583
583
  return "other";
584
584
  }
585
- function de(e) {
585
+ function re(e) {
586
586
  const t = e ?? (typeof window < "u" ? new URL(window.location.href) : null);
587
587
  if (!t) return;
588
- const o = t.pathname, i = o.match(/\/(?:p|urun|product)\/([^/?#]+)/i);
589
- if (i?.[1]) return i[1];
590
- const a = o.match(/-p-(\d+)/i);
591
- if (a?.[1]) return a[1];
588
+ const i = t.pathname, n = i.match(/\/(?:p|urun|product)\/([^/?#]+)/i);
589
+ if (n?.[1]) return n[1];
590
+ const s = i.match(/-p-(\d+)/i);
591
+ if (s?.[1]) return s[1];
592
592
  }
593
- function Ie(e) {
594
- const t = le(e), o = { pageType: t };
593
+ function be(e) {
594
+ const t = ae(e), i = { pageType: t };
595
595
  if (t === "pdp") {
596
- const i = de();
597
- i && (o.sku = i);
598
- }
599
- return typeof window < "u" && (o.url = window.location.href), o;
600
- }
601
- const l = "https://chatbe-dev.gengage.ai", I = {
602
- koctascomtr: {
603
- accountId: "koctascomtr",
604
- locale: "tr",
605
- middlewareUrl: l,
606
- theme: {
607
- primaryColor: "#ec6e00",
608
- primaryForeground: "#ffffff",
609
- backgroundColor: "#ffffff",
610
- foregroundColor: "#222222",
611
- borderRadius: "8px",
612
- fontFamily: '"Source Sans Pro", "Helvetica Neue", Arial, sans-serif',
613
- fontSize: "14px"
614
- },
615
- chatI18n: {
616
- inputPlaceholder: "Ürün ara, soru sor",
617
- poweredBy: "Koçtaş AI Asistan"
618
- }
619
- },
620
- n11com: {
621
- accountId: "n11com",
622
- locale: "tr",
623
- middlewareUrl: l,
624
- theme: {
625
- primaryColor: "#ff44ef",
626
- primaryForeground: "#ffffff",
627
- backgroundColor: "#ffffff",
628
- foregroundColor: "#222222",
629
- borderRadius: "8px",
630
- fontFamily: "Arial, Helvetica, sans-serif",
631
- fontSize: "14px"
632
- },
633
- chatI18n: {
634
- inputPlaceholder: "Ne aramıştınız?",
635
- poweredBy: "n11 AI Asistan"
636
- }
637
- },
638
- hepsiburadacom: {
639
- accountId: "hepsiburadacom",
640
- locale: "tr",
641
- middlewareUrl: l,
642
- theme: {
643
- primaryColor: "#ff6000",
644
- primaryForeground: "#ffffff",
645
- backgroundColor: "#ffffff",
646
- foregroundColor: "#333333",
647
- borderRadius: "8px",
648
- fontFamily: '"Open Sans", Arial, sans-serif',
649
- fontSize: "14px"
650
- },
651
- chatI18n: {
652
- inputPlaceholder: "Ürün ara veya soru sor",
653
- poweredBy: "Hepsiburada AI Asistan"
654
- }
655
- },
656
- arcelikcomtr: {
657
- accountId: "arcelikcomtr",
658
- locale: "tr",
659
- middlewareUrl: l,
660
- theme: {
661
- primaryColor: "#e4002b",
662
- primaryForeground: "#ffffff",
663
- backgroundColor: "#ffffff",
664
- foregroundColor: "#222222",
665
- borderRadius: "8px",
666
- fontFamily: '"Arcelik Sans", "Helvetica Neue", Arial, sans-serif',
667
- fontSize: "14px"
668
- },
669
- chatI18n: {
670
- inputPlaceholder: "Size nasıl yardımcı olabilirim?",
671
- poweredBy: "Arçelik AI Asistan"
672
- }
673
- },
674
- yatasbeddingcomtr: {
675
- accountId: "yatasbeddingcomtr",
676
- locale: "tr",
677
- middlewareUrl: l,
678
- theme: {
679
- primaryColor: "#c8102e",
680
- primaryForeground: "#ffffff",
681
- backgroundColor: "#ffffff",
682
- foregroundColor: "#333333",
683
- borderRadius: "8px",
684
- fontFamily: '"Nunito Sans", Arial, sans-serif',
685
- fontSize: "14px"
686
- },
687
- chatI18n: {
688
- inputPlaceholder: "Yatak, baza veya ürün arayın",
689
- poweredBy: "Yataş AI Asistan"
690
- }
691
- },
692
- trendyolcom: {
693
- accountId: "trendyolcom",
694
- locale: "tr",
695
- middlewareUrl: l,
696
- theme: {
697
- primaryColor: "#f27a1a",
698
- primaryForeground: "#ffffff",
699
- backgroundColor: "#ffffff",
700
- foregroundColor: "#333333",
701
- borderRadius: "6px",
702
- fontFamily: '"Source Sans Pro", Arial, sans-serif',
703
- fontSize: "14px"
704
- },
705
- chatI18n: {
706
- inputPlaceholder: "Ne aramıştınız?",
707
- poweredBy: "Trendyol AI Asistan"
708
- }
709
- },
710
- boynercomtr: {
711
- accountId: "boynercomtr",
712
- locale: "tr",
713
- middlewareUrl: l,
714
- theme: {
715
- primaryColor: "#000000",
716
- primaryForeground: "#ffffff",
717
- backgroundColor: "#ffffff",
718
- foregroundColor: "#333333",
719
- borderRadius: "4px",
720
- fontFamily: '"Montserrat", Arial, sans-serif',
721
- fontSize: "14px"
722
- },
723
- chatI18n: {
724
- inputPlaceholder: "Moda, kozmetik veya ev ürünleri arayın",
725
- poweredBy: "Boyner AI Asistan"
726
- }
727
- },
728
- evideacom: {
729
- accountId: "evideacom",
730
- locale: "tr",
731
- middlewareUrl: l,
732
- theme: {
733
- primaryColor: "#e84393",
734
- primaryForeground: "#ffffff",
735
- backgroundColor: "#ffffff",
736
- foregroundColor: "#2d3436",
737
- borderRadius: "8px",
738
- fontFamily: '"Poppins", Arial, sans-serif',
739
- fontSize: "14px"
740
- },
741
- chatI18n: {
742
- inputPlaceholder: "Ev dekorasyon ürünleri arayın",
743
- poweredBy: "Evidea AI Asistan"
744
- }
745
- },
746
- aygazcomtr: {
747
- accountId: "aygazcomtr",
748
- locale: "tr",
749
- middlewareUrl: l,
750
- theme: {
751
- primaryColor: "#e30613",
752
- primaryForeground: "#ffffff",
753
- backgroundColor: "#ffffff",
754
- foregroundColor: "#333333",
755
- borderRadius: "8px",
756
- fontFamily: "Arial, Helvetica, sans-serif",
757
- fontSize: "14px"
758
- },
759
- chatI18n: {
760
- inputPlaceholder: "Aygaz ürünleri hakkında sorun",
761
- poweredBy: "Aygaz AI Asistan"
762
- }
763
- },
764
- otokoccomtr: {
765
- accountId: "otokoccomtr",
766
- locale: "tr",
767
- middlewareUrl: l,
768
- theme: {
769
- primaryColor: "#003087",
770
- primaryForeground: "#ffffff",
771
- backgroundColor: "#ffffff",
772
- foregroundColor: "#333333",
773
- borderRadius: "8px",
774
- fontFamily: '"Roboto", Arial, sans-serif',
775
- fontSize: "14px"
776
- },
777
- chatI18n: {
778
- inputPlaceholder: "Araç veya hizmet arayın",
779
- poweredBy: "Otokoç AI Asistan"
780
- }
781
- },
782
- divanpastanelericomtr: {
783
- accountId: "divanpastanelericomtr",
784
- locale: "tr",
785
- middlewareUrl: l,
786
- theme: {
787
- primaryColor: "#8b1a2d",
788
- primaryForeground: "#ffffff",
789
- backgroundColor: "#faf8f5",
790
- foregroundColor: "#3d2c2e",
791
- borderRadius: "8px",
792
- fontFamily: '"Georgia", serif',
793
- fontSize: "14px"
794
- },
795
- chatI18n: {
796
- inputPlaceholder: "Ürün veya mağaza arayın",
797
- poweredBy: "Divan AI Asistan"
798
- }
799
- },
800
- screwfixcom: {
801
- accountId: "screwfixcom",
802
- locale: "en",
803
- middlewareUrl: l,
804
- theme: {
805
- primaryColor: "#f6a623",
806
- primaryForeground: "#1a1a1a",
807
- backgroundColor: "#ffffff",
808
- foregroundColor: "#333333",
809
- borderRadius: "4px",
810
- fontFamily: '"Arial", Helvetica, sans-serif',
811
- fontSize: "14px"
812
- },
813
- pricing: {
814
- currencySymbol: "£",
815
- currencyPosition: "prefix",
816
- thousandsSeparator: ",",
817
- decimalSeparator: "."
818
- },
819
- chatI18n: {
820
- inputPlaceholder: "Search products or ask a question",
821
- poweredBy: "Screwfix AI Assistant"
822
- }
596
+ const n = re();
597
+ n && (i.sku = n);
823
598
  }
824
- };
825
- function Ae(e) {
826
- return I[e];
827
- }
828
- function Se() {
829
- return Object.keys(I);
599
+ return typeof window < "u" && (i.url = window.location.href), i;
830
600
  }
831
601
  export {
832
- C as AccountRuntimeConfigSchema,
833
- M as AnalyticsAuthModeSchema,
834
- Z as AnalyticsClient,
835
- oe as BASE_WIDGET_THEME,
836
- Pe as BaseWidget,
837
- k as DEFAULT_CUSTOMIZATION_LOCALE,
838
- Ue as DEFAULT_WIDGET_THEME_TOKENS,
602
+ _ as AccountRuntimeConfigSchema,
603
+ R as AnalyticsAuthModeSchema,
604
+ Y as AnalyticsClient,
605
+ ee as BASE_WIDGET_THEME,
606
+ xe as BaseWidget,
607
+ b as DEFAULT_CUSTOMIZATION_LOCALE,
608
+ Ee as DEFAULT_WIDGET_THEME_TOKENS,
839
609
  D as UnknownActionPolicySchema,
840
- gt as VoiceInput,
841
- Re as adaptV1Event,
842
- Ie as autoDetectPageContext,
843
- qe as basketAddEvent,
844
- Fe as bootstrapSession,
845
- Me as buildChatEndpointUrl,
846
- pe as buildOverlayIdempotencyKey,
847
- Be as chatHistorySnapshotEvent,
848
- Le as checkoutCompleteEvent,
849
- ze as checkoutStartEvent,
850
- De as consumeStream,
851
- ve as createAccountIdentity,
852
- ye as createAnalyticsClient,
853
- ge as createDefaultAccountRuntimeConfig,
610
+ dt as VoiceInput,
611
+ Ie as adaptV1Event,
612
+ be as autoDetectPageContext,
613
+ Ae as basketAddEvent,
614
+ qe as bootstrapSession,
615
+ Pe as buildChatEndpointUrl,
616
+ fe as buildOverlayIdempotencyKey,
617
+ Ue as chatHistorySnapshotEvent,
618
+ Re as checkoutCompleteEvent,
619
+ Me as checkoutStartEvent,
620
+ Le as consumeStream,
621
+ ye as createAccountIdentity,
622
+ pe as createAnalyticsClient,
623
+ he as createDefaultAccountRuntimeConfig,
854
624
  Te as createDefaultAnalyticsConfig,
855
- _e as createFloatingChatConfig,
856
- Ce as createPdpQnaConfig,
857
- be as createPdpSimRelConfig,
858
- Ne as defaultUnknownUISpecRenderer,
859
- me as destroyOverlayWidgets,
860
- le as detectPageType,
861
- Oe as dismissGlobalErrorToast,
862
- We as dispatch,
863
- de as extractSkuFromUrl,
864
- $e as getGlobalErrorMessage,
865
- Ae as getMerchantConfig,
866
- Se as getMerchantIds,
867
- j as getOverlayWidgets,
868
- He as getWindowPageContext,
869
- ke as initGengageClient,
870
- Y as initOverlayWidgets,
871
- mt as isVoiceInputSupported,
872
- Ge as listen,
873
- Ke as llmUsageEvent,
874
- Qe as mergeUISpecRegistry,
875
- Ye as meteringIncrementEvent,
876
- je as meteringSummaryEvent,
625
+ we as createFloatingChatConfig,
626
+ ve as createPdpQnaConfig,
627
+ _e as createPdpSimRelConfig,
628
+ Fe as defaultUnknownUISpecRenderer,
629
+ ge as destroyOverlayWidgets,
630
+ ae as detectPageType,
631
+ De as dismissGlobalErrorToast,
632
+ Oe as dispatch,
633
+ re as extractSkuFromUrl,
634
+ Be as getGlobalErrorMessage,
635
+ Q as getOverlayWidgets,
636
+ Ne as getWindowPageContext,
637
+ Ce as initGengageClient,
638
+ K as initOverlayWidgets,
639
+ ut as isVoiceInputSupported,
640
+ $e as listen,
641
+ We as llmUsageEvent,
642
+ He as mergeUISpecRegistry,
643
+ ze as meteringIncrementEvent,
644
+ Ge as meteringSummaryEvent,
877
645
  E as normalizeMiddlewareUrl,
878
- Ve as normalizeProductGroupingsResponse,
879
- Xe as normalizeSimilarProductsResponse,
880
- O as parseAccountRuntimeConfig,
881
- ne as preflightDiagnostics,
882
- Ze as productToNormalized,
883
- Je as registerGlobalErrorToastListener,
884
- et as renderUISpecWithRegistry,
646
+ Ke as normalizeProductGroupingsResponse,
647
+ Qe as normalizeSimilarProductsResponse,
648
+ B as parseAccountRuntimeConfig,
649
+ ie as preflightDiagnostics,
650
+ Ve as productToNormalized,
651
+ je as registerGlobalErrorToastListener,
652
+ Ye as renderUISpecWithRegistry,
885
653
  S as resolveSession,
886
- pt as routeStreamAction,
887
- W as safeParseAccountRuntimeConfig,
888
- wt as sanitizeHtml,
889
- tt as showGlobalErrorToast,
890
- ot as streamChunkEvent,
891
- it as streamDoneEvent,
892
- nt as streamErrorEvent,
893
- at as streamPost,
894
- rt as streamStartEvent,
895
- st as streamUiSpecEvent,
896
- lt as updatePageContext,
897
- dt as widgetHistorySnapshotEvent,
898
- ct as wireGADataLayer,
654
+ ht as routeStreamAction,
655
+ N as safeParseAccountRuntimeConfig,
656
+ ft as sanitizeHtml,
657
+ Xe as showGlobalErrorToast,
658
+ Ze as streamChunkEvent,
659
+ Je as streamDoneEvent,
660
+ et as streamErrorEvent,
661
+ tt as streamPost,
662
+ it as streamStartEvent,
663
+ nt as streamUiSpecEvent,
664
+ ot as updatePageContext,
665
+ st as widgetHistorySnapshotEvent,
666
+ at as wireGADataLayer,
899
667
  x as wireQNAToChat,
900
- ut as wireSimilarToChat,
901
- we as withBaseTheme,
902
- ft as withDefaultWidgetTheme
668
+ rt as wireSimilarToChat,
669
+ me as withBaseTheme,
670
+ lt as withDefaultWidgetTheme
903
671
  };
904
672
  //# sourceMappingURL=common.js.map