@gengage/assistant-fe 0.1.9 → 0.2.1

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.
Files changed (71) hide show
  1. package/dist/assistant-fe.css +1 -1
  2. package/dist/chat/components/CategoriesContainer.d.ts.map +1 -1
  3. package/dist/chat/components/ChatDrawer.d.ts.map +1 -1
  4. package/dist/chat/components/renderUISpec.d.ts.map +1 -1
  5. package/dist/chat/index.d.ts.map +1 -1
  6. package/dist/chat/panel-manager.d.ts +16 -0
  7. package/dist/chat/panel-manager.d.ts.map +1 -1
  8. package/dist/chat.cjs +1 -1
  9. package/dist/chat.iife.js +28 -28
  10. package/dist/chat.iife.js.map +1 -1
  11. package/dist/chat.js +2 -2
  12. package/dist/common/action-router.d.ts.map +1 -1
  13. package/dist/common/debug.d.ts.map +1 -1
  14. package/dist/common/events.d.ts.map +1 -1
  15. package/dist/common/native-webview.d.ts.map +1 -1
  16. package/dist/common/product-utils.d.ts +10 -0
  17. package/dist/common/product-utils.d.ts.map +1 -1
  18. package/dist/common/protocol-adapter.d.ts.map +1 -1
  19. package/dist/common.cjs +1 -1
  20. package/dist/common.js +5 -5
  21. package/dist/index-BUtw0Jlm.cjs +2 -0
  22. package/dist/index-BUtw0Jlm.cjs.map +1 -0
  23. package/dist/index-D-tVifN8.cjs +13 -0
  24. package/dist/index-D-tVifN8.cjs.map +1 -0
  25. package/dist/{index-DR2uepzb.js → index-DjPldwe7.js} +181 -187
  26. package/dist/index-DjPldwe7.js.map +1 -0
  27. package/dist/{index-CEt87kCd.js → index-TY0qKDI-.js} +1291 -1292
  28. package/dist/index-TY0qKDI-.js.map +1 -0
  29. package/dist/index.cjs +1 -1
  30. package/dist/index.js +3 -3
  31. package/dist/native.cjs +1 -1
  32. package/dist/native.iife.js +30 -30
  33. package/dist/native.iife.js.map +1 -1
  34. package/dist/native.js +1 -1
  35. package/dist/qna.cjs +1 -1
  36. package/dist/qna.iife.js +2 -2
  37. package/dist/qna.iife.js.map +1 -1
  38. package/dist/qna.js +1 -1
  39. package/dist/quantity-stepper-BKtPQUR1.js +78 -0
  40. package/dist/quantity-stepper-BKtPQUR1.js.map +1 -0
  41. package/dist/quantity-stepper-DU6va4sS.cjs +2 -0
  42. package/dist/quantity-stepper-DU6va4sS.cjs.map +1 -0
  43. package/dist/{schemas-DIhL3DkL.js → schemas-BAEbjFPE.js} +17 -12
  44. package/dist/schemas-BAEbjFPE.js.map +1 -0
  45. package/dist/{schemas-Dsr0bbO_.cjs → schemas-DIyHm5pa.cjs} +4 -4
  46. package/dist/{schemas-DIhL3DkL.js.map → schemas-DIyHm5pa.cjs.map} +1 -1
  47. package/dist/simrel/api.d.ts.map +1 -1
  48. package/dist/simrel/components/ProductCard.d.ts.map +1 -1
  49. package/dist/simrel/locales/en.d.ts.map +1 -1
  50. package/dist/simrel/locales/tr.d.ts.map +1 -1
  51. package/dist/simrel/types.d.ts +1 -0
  52. package/dist/simrel/types.d.ts.map +1 -1
  53. package/dist/simrel.cjs +1 -1
  54. package/dist/simrel.cjs.map +1 -1
  55. package/dist/simrel.css +1 -1
  56. package/dist/simrel.iife.js +6 -6
  57. package/dist/simrel.iife.js.map +1 -1
  58. package/dist/simrel.js +236 -234
  59. package/dist/simrel.js.map +1 -1
  60. package/package.json +1 -1
  61. package/dist/index-BWPx4pM7.cjs +0 -13
  62. package/dist/index-BWPx4pM7.cjs.map +0 -1
  63. package/dist/index-CEt87kCd.js.map +0 -1
  64. package/dist/index-DL4CAkyL.cjs +0 -2
  65. package/dist/index-DL4CAkyL.cjs.map +0 -1
  66. package/dist/index-DR2uepzb.js.map +0 -1
  67. package/dist/quantity-stepper-C-nV4lwi.js +0 -77
  68. package/dist/quantity-stepper-C-nV4lwi.js.map +0 -1
  69. package/dist/quantity-stepper-CURMkwRF.cjs +0 -2
  70. package/dist/quantity-stepper-CURMkwRF.cjs.map +0 -1
  71. package/dist/schemas-Dsr0bbO_.cjs.map +0 -1
@@ -1,12 +1,12 @@
1
- import { D as Re, E as H, b as De, c as Fe, a as Ue, v as $, x as G, F as U, r as qe, o as B, s as w, f as D, G as te, d as re, u as se, y as Q, e as Y, _ as we, B as He, H as Oe, j as V, t as je, i as Ve, I as We, J as $e, g as Ge, K as Ye, L as Ke, M as de, m as Qe, N as Xe, A as Je, z as Ze, n as et, O as tt, P as pe, h as at, Q as nt, R as it, l as ot, S as rt, T as st, U as ct, V as lt, W as gt, X as dt } from "./schemas-DIhL3DkL.js";
2
- import { f as q, c as ce, a as X, r as ye, d as _e, b as ke } from "./quantity-stepper-C-nV4lwi.js";
3
- function pt() {
1
+ import { D as He, E as O, b as Oe, c as je, a as Ve, v as G, x as K, F as U, r as We, o as B, s as x, f as F, G as re, d as ge, u as de, y as Z, e as Q, _ as Se, B as $e, H as Ge, j as W, t as Ye, i as Ke, I as Qe, J as Xe, g as Je, K as Ze, L as et, M as be, m as tt, N as at, A as nt, z as it, n as ot, O as rt, P as xe, h as st, Q as ct, R as lt, l as gt, S as dt, T as pt, U as ht, V as ut, W as mt, X as ft } from "./schemas-BAEbjFPE.js";
2
+ import { f as H, c as pe, a as J, b as Te, e as bt, d as Le } from "./quantity-stepper-BKtPQUR1.js";
3
+ function xt() {
4
4
  const o = Date.now(), e = new Uint8Array(16);
5
5
  crypto.getRandomValues(e), e[0] = o / 2 ** 40 & 255, e[1] = o / 2 ** 32 & 255, e[2] = o / 2 ** 24 & 255, e[3] = o / 2 ** 16 & 255, e[4] = o / 2 ** 8 & 255, e[5] = o & 255, e[6] = e[6] & 15 | 112, e[8] = e[8] & 63 | 128;
6
6
  const t = Array.from(e, (a) => a.toString(16).padStart(2, "0")).join("");
7
7
  return `${t.slice(0, 8)}-${t.slice(8, 12)}-${t.slice(12, 16)}-${t.slice(16, 20)}-${t.slice(20)}`;
8
8
  }
9
- class ht {
9
+ class vt {
10
10
  constructor(e) {
11
11
  this._handlers = /* @__PURE__ */ new Map(), this._destroyed = !1, this._namespace = e.namespace, this._allowedOrigins = e.allowedOrigins ?? ["*"], this._onMessage = e.onMessage, this._allowedOrigins.includes("*"), this._messageListener = (t) => this._handlePostMessage(t), window.addEventListener("message", this._messageListener);
12
12
  }
@@ -45,7 +45,7 @@ class ht {
45
45
  _handlePostMessage(e) {
46
46
  if (this._destroyed || !this._isOriginAllowed(e.origin)) return;
47
47
  const t = e.data;
48
- if (!ut(t) || t.gengage !== this._namespace) return;
48
+ if (!wt(t) || t.gengage !== this._namespace) return;
49
49
  const a = { type: t.type };
50
50
  t.payload !== void 0 && (a.payload = t.payload), this._onMessage?.(a);
51
51
  const n = this._handlers.get(a.type);
@@ -57,35 +57,35 @@ class ht {
57
57
  return this._allowedOrigins.includes("*") ? !0 : this._allowedOrigins.includes(e);
58
58
  }
59
59
  }
60
- function ut(o) {
60
+ function wt(o) {
61
61
  if (typeof o != "object" || o === null) return !1;
62
62
  const e = o;
63
63
  return typeof e.gengage == "string" && typeof e.type == "string";
64
64
  }
65
- const mt = console;
66
- function ft(o, e, t = {}) {
67
- const a = o.action, n = t.logger ?? mt;
68
- switch (Re("action", `routing action: ${a.kind}`, a), a.kind) {
65
+ const yt = console;
66
+ function _t(o, e, t = {}) {
67
+ const a = o.action, n = t.logger ?? yt;
68
+ switch (He("action", `routing action: ${a.kind}`, a), a.kind) {
69
69
  case "open_chat": {
70
70
  e.openChat?.(a.payload);
71
71
  return;
72
72
  }
73
73
  case "navigate": {
74
74
  if (typeof a.url != "string") {
75
- J(a, e, t, n);
75
+ te(a, e, t, n);
76
76
  return;
77
77
  }
78
78
  const i = typeof a.newTab == "boolean" ? a.newTab : void 0;
79
79
  if (e.navigate) {
80
- i !== void 0 ? e.navigate({ url: a.url, newTab: i }) : e.navigate({ url: a.url });
80
+ e.navigate({ url: a.url, ...i !== void 0 && { newTab: i } });
81
81
  return;
82
82
  }
83
- bt(a.url, i);
83
+ kt(a.url, i);
84
84
  return;
85
85
  }
86
86
  case "save_session": {
87
87
  if (typeof a.sessionId != "string" || typeof a.sku != "string") {
88
- J(a, e, t, n);
88
+ te(a, e, t, n);
89
89
  return;
90
90
  }
91
91
  e.saveSession?.({ sessionId: a.sessionId, sku: a.sku });
@@ -93,7 +93,7 @@ function ft(o, e, t = {}) {
93
93
  }
94
94
  case "add_to_cart": {
95
95
  if (typeof a.sku != "string" || typeof a.quantity != "number" || typeof a.cartCode != "string") {
96
- J(a, e, t, n);
96
+ te(a, e, t, n);
97
97
  return;
98
98
  }
99
99
  e.addToCart?.({
@@ -105,22 +105,22 @@ function ft(o, e, t = {}) {
105
105
  }
106
106
  case "script_call": {
107
107
  if (t.allowScriptCall === !1) {
108
- J(a, e, t, n);
108
+ te(a, e, t, n);
109
109
  return;
110
110
  }
111
111
  if (typeof a.name != "string") {
112
- J(a, e, t, n);
112
+ te(a, e, t, n);
113
113
  return;
114
114
  }
115
- const i = xt(a.payload) ? a.payload : void 0;
116
- i !== void 0 ? e.scriptCall?.({ name: a.name, payload: i }) : e.scriptCall?.({ name: a.name });
115
+ const i = Ct(a.payload) ? a.payload : void 0;
116
+ e.scriptCall?.({ name: a.name, ...i !== void 0 && { payload: i } });
117
117
  return;
118
118
  }
119
119
  default:
120
- J(a, e, t, n);
120
+ te(a, e, t, n);
121
121
  }
122
122
  }
123
- function J(o, e, t, a) {
123
+ function te(o, e, t, a) {
124
124
  const n = t.unknownActionPolicy ?? "log-and-ignore";
125
125
  if (n === "delegate") {
126
126
  e.unknown?.(o), e.unknown || a.warn("[gengage] Unknown action received without delegate handler", o);
@@ -130,9 +130,9 @@ function J(o, e, t, a) {
130
130
  throw new Error(`[gengage] Unknown action kind: ${o.kind}`);
131
131
  a.warn("[gengage] Unknown action ignored", o);
132
132
  }
133
- function bt(o, e) {
133
+ function kt(o, e) {
134
134
  if (!(typeof window > "u")) {
135
- if (!H(o)) {
135
+ if (!O(o)) {
136
136
  console.warn("[gengage] Blocked navigation to unsafe URL:", o);
137
137
  return;
138
138
  }
@@ -143,18 +143,18 @@ function bt(o, e) {
143
143
  window.location.href = o;
144
144
  }
145
145
  }
146
- function xt(o) {
146
+ function Ct(o) {
147
147
  return typeof o == "object" && o !== null && !Array.isArray(o);
148
148
  }
149
- const vt = ["image/jpeg", "image/png", "image/webp"], wt = 5 * 1024 * 1024;
150
- function yt(o) {
151
- return vt.includes(o.type) ? o.size > wt ? { ok: !1, reason: "too_large" } : { ok: !0 } : { ok: !1, reason: "invalid_type" };
149
+ const Et = ["image/jpeg", "image/png", "image/webp"], St = 5 * 1024 * 1024;
150
+ function Tt(o) {
151
+ return Et.includes(o.type) ? o.size > St ? { ok: !1, reason: "too_large" } : { ok: !0 } : { ok: !1, reason: "invalid_type" };
152
152
  }
153
- function _t(o, e) {
153
+ function Lt(o, e) {
154
154
  const t = o.type, a = o.payload != null && typeof o.payload == "object" && !Array.isArray(o.payload) ? o.payload : {}, n = (i) => {
155
155
  const s = { ...a };
156
- for (const [l, r] of Object.entries(i))
157
- l in s || (s[l] = r);
156
+ for (const [l, d] of Object.entries(i))
157
+ l in s || (s[l] = d);
158
158
  return s;
159
159
  };
160
160
  switch (t) {
@@ -184,41 +184,41 @@ function _t(o, e) {
184
184
  return o;
185
185
  }
186
186
  }
187
- const kt = {
187
+ const It = {
188
188
  user_message: "inputText"
189
189
  };
190
- function Ct(o) {
191
- const { action: e, type: t, payload: a, ...n } = o, i = t ?? e?.type ?? "inputText", s = a ?? e?.payload, l = kt[i] ?? i, r = {
190
+ function At(o) {
191
+ const { action: e, type: t, payload: a, ...n } = o, i = t ?? e?.type ?? "inputText", s = a ?? e?.payload, l = It[i] ?? i, d = {
192
192
  ...n,
193
193
  type: l
194
194
  };
195
- return s !== void 0 && (r.payload = typeof s == "string" ? { text: s } : s), JSON.stringify(r);
195
+ return s !== void 0 && (d.payload = typeof s == "string" ? { text: s } : s), JSON.stringify(d);
196
196
  }
197
- function Et(o, e, t) {
198
- const a = De("process_action", t), n = new AbortController();
197
+ function Pt(o, e, t) {
198
+ const a = Oe("process_action", t), n = new AbortController();
199
199
  return (async () => {
200
200
  try {
201
- const s = Ct(o), l = t.attachment !== void 0;
202
- let r;
201
+ const s = At(o), l = t.attachment !== void 0;
202
+ let d;
203
203
  if (l) {
204
204
  const m = new FormData();
205
- m.append("request", s), t.attachment !== void 0 && m.append("attachment", t.attachment), r = {
205
+ m.append("request", s), t.attachment !== void 0 && m.append("attachment", t.attachment), d = {
206
206
  method: "POST",
207
207
  body: m,
208
208
  signal: n.signal
209
209
  };
210
210
  } else
211
- r = {
211
+ d = {
212
212
  method: "POST",
213
213
  headers: { "Content-Type": "application/json" },
214
214
  body: s,
215
215
  signal: n.signal
216
216
  };
217
- const c = await fetch(a, r);
217
+ const c = await fetch(a, d);
218
218
  if (!c.ok) {
219
219
  let m = c.statusText;
220
220
  try {
221
- const p = await c.json(), y = p.detail ?? p.message ?? p.error;
221
+ const h = await c.json(), y = h.detail ?? h.message ?? h.error;
222
222
  typeof y == "string" && (m = y);
223
223
  } catch {
224
224
  }
@@ -226,48 +226,48 @@ function Et(o, e, t) {
226
226
  return;
227
227
  }
228
228
  let g = !1;
229
- const d = () => {
229
+ const r = () => {
230
230
  g || (g = !0, e.onDone());
231
231
  };
232
- await Fe(c, {
232
+ await je(c, {
233
233
  onEvent: (m) => {
234
- const p = Ue(m);
235
- if (p)
236
- switch (p.type) {
234
+ const h = Ve(m);
235
+ if (h)
236
+ switch (h.type) {
237
237
  case "text_chunk":
238
- e.onTextChunk(p.content, p.final === !0, {
239
- productMentions: p.productMentions,
240
- skuToProductItem: p.skuToProductItem,
241
- conversationMode: p.conversationMode
238
+ e.onTextChunk(h.content, h.final === !0, {
239
+ productMentions: h.productMentions,
240
+ skuToProductItem: h.skuToProductItem,
241
+ conversationMode: h.conversationMode
242
242
  });
243
243
  break;
244
244
  case "ui_spec":
245
- e.onUISpec(p.spec, p.widget, p.panelHint);
245
+ e.onUISpec(h.spec, h.widget, h.panelHint);
246
246
  break;
247
247
  case "action":
248
- e.onAction(p);
248
+ e.onAction(h);
249
249
  break;
250
250
  case "metadata":
251
- e.onMetadata(p);
251
+ e.onMetadata(h);
252
252
  break;
253
253
  case "error":
254
- e.onError(new Error(p.message));
254
+ e.onError(new Error(h.message));
255
255
  break;
256
256
  case "done":
257
- d();
257
+ r();
258
258
  break;
259
259
  }
260
260
  },
261
261
  onError: e.onError,
262
262
  signal: n.signal
263
- }), d();
263
+ }), r();
264
264
  } catch (s) {
265
265
  if (s instanceof DOMException && s.name === "AbortError") return;
266
266
  e.onError(s instanceof Error ? s : new Error(String(s)));
267
267
  }
268
268
  })(), n;
269
269
  }
270
- const le = {
270
+ const he = {
271
271
  headerTitle: "Ürün Uzmanı",
272
272
  inputPlaceholder: "Ürün ara, soru sor",
273
273
  sendButton: "Gönder",
@@ -348,7 +348,7 @@ const le = {
348
348
  reviewFilterNegative: "Olumsuz",
349
349
  decreaseLabel: "Azalt",
350
350
  increaseLabel: "Artır"
351
- }, St = {
351
+ }, Nt = {
352
352
  headerTitle: "Product Expert",
353
353
  inputPlaceholder: "Search products, ask questions",
354
354
  sendButton: "Send",
@@ -430,20 +430,20 @@ const le = {
430
430
  decreaseLabel: "Decrease",
431
431
  increaseLabel: "Increase"
432
432
  };
433
- function Tt(o) {
433
+ function Mt(o) {
434
434
  return o ? o.toLowerCase().split("-")[0] ?? "tr" : "tr";
435
435
  }
436
- function Lt(o) {
437
- return Tt(o) === "en" ? St : le;
436
+ function Bt(o) {
437
+ return Mt(o) === "en" ? Nt : he;
438
438
  }
439
- function It() {
440
- return Ce() !== null;
439
+ function zt() {
440
+ return Ie() !== null;
441
441
  }
442
- function Ce() {
442
+ function Ie() {
443
443
  const o = globalThis;
444
444
  return o.SpeechRecognition ?? o.webkitSpeechRecognition ?? null;
445
445
  }
446
- class At {
446
+ class Rt {
447
447
  constructor(e, t) {
448
448
  this.recognition = null, this._state = "idle", this.silenceTimer = null, this.accumulatedTranscript = "", this.intentionalStop = !1, this._lastRestartAt = 0, this.callbacks = e, this.lang = t?.lang ?? "tr-TR", this.silenceTimeoutMs = t?.silenceTimeoutMs ?? 1500, this.autoSubmit = t?.autoSubmit ?? !0;
449
449
  }
@@ -455,7 +455,7 @@ class At {
455
455
  */
456
456
  start() {
457
457
  if (this._state === "listening") return;
458
- const e = Ce();
458
+ const e = Ie();
459
459
  if (!e) {
460
460
  this.setState("error"), this.callbacks.onError?.("not-supported", "Web Speech API is not supported in this browser.");
461
461
  return;
@@ -474,12 +474,12 @@ class At {
474
474
  for (let s = a.resultIndex; s < a.results.length; s++) {
475
475
  const l = a.results[s];
476
476
  if (!l) continue;
477
- const r = l[0];
478
- r && (l.isFinal ? i += r.transcript : n += r.transcript);
477
+ const d = l[0];
478
+ d && (l.isFinal ? i += d.transcript : n += d.transcript);
479
479
  }
480
480
  i && (this.accumulatedTranscript += i, this.callbacks.onFinal?.(this.accumulatedTranscript)), n && this.callbacks.onInterim?.(this.accumulatedTranscript + n), this.autoSubmit && this.accumulatedTranscript && this.startSilenceTimer();
481
481
  }, t.onerror = (a) => {
482
- const n = Nt(a.error);
482
+ const n = Dt(a.error);
483
483
  this.intentionalStop && (a.error === "no-speech" || a.error === "aborted") || (this.setState("error"), this.callbacks.onError?.(n, a.message || a.error));
484
484
  }, t.onend = () => {
485
485
  if (this.clearSilenceTimer(), this._state === "listening" && !this.intentionalStop) {
@@ -547,7 +547,7 @@ class At {
547
547
  this.silenceTimer !== null && (clearTimeout(this.silenceTimer), this.silenceTimer = null);
548
548
  }
549
549
  }
550
- function Nt(o) {
550
+ function Dt(o) {
551
551
  switch (o) {
552
552
  case "not-allowed":
553
553
  return "not-allowed";
@@ -563,15 +563,15 @@ function Nt(o) {
563
563
  return "unknown";
564
564
  }
565
565
  }
566
- function Pt(o) {
566
+ function Ft(o) {
567
567
  const e = document.createElement("div");
568
568
  e.className = "gengage-chat-kvkk-banner", e.setAttribute("role", "alert");
569
569
  const t = document.createElement("div");
570
- t.className = "gengage-chat-kvkk-content", t.innerHTML = $(o.htmlContent), e.appendChild(t);
570
+ t.className = "gengage-chat-kvkk-content", t.innerHTML = G(o.htmlContent), e.appendChild(t);
571
571
  const a = document.createElement("button");
572
572
  return a.className = "gengage-chat-kvkk-dismiss", a.type = "button", a.setAttribute("aria-label", o.closeAriaLabel ?? "Close privacy notice"), a.textContent = "×", a.addEventListener("click", o.onDismiss), e.appendChild(a), e;
573
573
  }
574
- class Mt {
574
+ class Ut {
575
575
  constructor(e) {
576
576
  this._el = document.createElement("div"), this._el.className = "gengage-chat-panel-topbar", this._backBtn = document.createElement("button"), this._backBtn.className = "gengage-chat-panel-topbar-back", this._backBtn.type = "button", this._backBtn.disabled = !0, this._backBtn.setAttribute("aria-label", e.backAriaLabel ?? "Back"), this._backBtn.textContent = "←", this._backBtn.addEventListener("click", () => e.onBack()), this._titleEl = document.createElement("span"), this._titleEl.className = "gengage-chat-panel-topbar-title", this._forwardBtn = document.createElement("button"), this._forwardBtn.className = "gengage-chat-panel-topbar-forward", this._forwardBtn.type = "button", this._forwardBtn.disabled = !0, this._forwardBtn.setAttribute("aria-label", e.forwardAriaLabel ?? "Forward"), this._forwardBtn.textContent = "→", this._forwardBtn.addEventListener("click", () => e.onForward()), this._el.appendChild(this._backBtn), this._el.appendChild(this._titleEl), this._el.appendChild(this._forwardBtn);
577
577
  }
@@ -582,7 +582,7 @@ class Mt {
582
582
  return this._el;
583
583
  }
584
584
  }
585
- class Bt {
585
+ class qt {
586
586
  constructor(e) {
587
587
  this._onThumbnailClick = e.onThumbnailClick, this._el = document.createElement("div"), this._el.className = "gengage-chat-thumbnails-column", this._el.style.display = "none";
588
588
  }
@@ -596,7 +596,7 @@ class Bt {
596
596
  this._el.innerHTML = "";
597
597
  for (const n of a) {
598
598
  const i = document.createElement("button");
599
- if (i.type = "button", i.className = "gengage-chat-thumbnail-btn", i.title = n.sku, G(n.imageUrl)) {
599
+ if (i.type = "button", i.className = "gengage-chat-thumbnail-btn", i.title = n.sku, K(n.imageUrl)) {
600
600
  const s = document.createElement("img");
601
601
  s.className = "gengage-chat-thumbnail-img", s.src = n.imageUrl, s.alt = n.sku, s.width = 40, s.height = 40, i.appendChild(s);
602
602
  }
@@ -612,21 +612,21 @@ class Bt {
612
612
  this._el.style.display = "none";
613
613
  }
614
614
  }
615
- const he = {
615
+ const ve = {
616
616
  search: '<svg viewBox="0 0 16 16" class="gengage-chat-icon"><circle cx="6.5" cy="6.5" r="5" fill="none" stroke="currentColor" stroke-width="1.5"/><line x1="10" y1="10" x2="15" y2="15" stroke="currentColor" stroke-width="1.5"/></svg>',
617
617
  review: '<svg viewBox="0 0 16 16" class="gengage-chat-icon"><polygon points="8,1 10,6 15,6 11,9 12.5,14 8,11 3.5,14 5,9 1,6 6,6" fill="none" stroke="currentColor" stroke-width="1.5"/></svg>',
618
618
  info: '<svg viewBox="0 0 16 16" class="gengage-chat-icon"><circle cx="8" cy="8" r="7" fill="none" stroke="currentColor" stroke-width="1.5"/><line x1="8" y1="7" x2="8" y2="12" stroke="currentColor" stroke-width="1.5"/><circle cx="8" cy="4.5" r="0.8" fill="currentColor"/></svg>',
619
619
  similar: '<svg viewBox="0 0 16 16" class="gengage-chat-icon"><rect x="1" y="3" width="6" height="6" rx="1" fill="none" stroke="currentColor" stroke-width="1.5"/><rect x="9" y="3" width="6" height="6" rx="1" fill="none" stroke="currentColor" stroke-width="1.5"/></svg>'
620
- }, zt = le;
621
- class Rt {
620
+ }, Ht = he;
621
+ class Ot {
622
622
  constructor(e, t) {
623
- this._panelVisible = !1, this._panelCollapsed = !1, this._onPanelToggle = void 0, this._pendingAttachment = null, this._onAttachment = void 0, this._onRollback = void 0, this._onLinkClick = void 0, this._userScrolledUp = !1, this._scrollLockedUntil = 0, this._thinkingSteps = [], this._firstBotMessageIds = /* @__PURE__ */ new Set(), this._voiceInput = null, this._micBtn = null, this._voiceEnabled = !1, this._voiceLang = "tr-TR", this._ignoreNextDividerClick = !1, this._cleanups = [], this._focusTrapHandler = null, this._previouslyFocusedElement = null, this._stillWorkingTimer = null, this.i18n = { ...zt, ...t.i18n }, this.onSend = t.onSend, t.onPanelToggle !== void 0 && (this._onPanelToggle = t.onPanelToggle), t.onAttachment !== void 0 && (this._onAttachment = t.onAttachment), t.onRollback !== void 0 && (this._onRollback = t.onRollback), t.onLinkClick !== void 0 && (this._onLinkClick = t.onLinkClick), t.voiceEnabled && (this._voiceEnabled = !0), t.voiceLang !== void 0 && (this._voiceLang = t.voiceLang), this.root = document.createElement("div"), this.root.className = "gengage-chat-drawer", this.root.setAttribute("role", "dialog"), this.root.setAttribute("aria-label", this.i18n.headerTitle ?? "Chat"), this.root.setAttribute("aria-modal", "true");
623
+ this._panelVisible = !1, this._panelCollapsed = !1, this._onPanelToggle = void 0, this._pendingAttachment = null, this._onAttachment = void 0, this._onRollback = void 0, this._onLinkClick = void 0, this._userScrolledUp = !1, this._scrollLockedUntil = 0, this._thinkingSteps = [], this._firstBotMessageIds = /* @__PURE__ */ new Set(), this._voiceInput = null, this._micBtn = null, this._voiceEnabled = !1, this._voiceLang = "tr-TR", this._ignoreNextDividerClick = !1, this._cleanups = [], this._focusTrapHandler = null, this._previouslyFocusedElement = null, this._stillWorkingTimer = null, this.i18n = { ...Ht, ...t.i18n }, this.onSend = t.onSend, t.onPanelToggle !== void 0 && (this._onPanelToggle = t.onPanelToggle), t.onAttachment !== void 0 && (this._onAttachment = t.onAttachment), t.onRollback !== void 0 && (this._onRollback = t.onRollback), t.onLinkClick !== void 0 && (this._onLinkClick = t.onLinkClick), t.voiceEnabled && (this._voiceEnabled = !0), t.voiceLang !== void 0 && (this._voiceLang = t.voiceLang), this.root = document.createElement("div"), this.root.className = "gengage-chat-drawer", this.root.setAttribute("role", "dialog"), this.root.setAttribute("aria-label", this.i18n.headerTitle ?? "Chat"), this.root.setAttribute("aria-modal", "true");
624
624
  const a = document.createElement("div");
625
625
  a.className = "gengage-chat-header";
626
626
  const n = document.createElement("div");
627
627
  if (n.className = "gengage-chat-header-left", t.headerAvatarUrl) {
628
- const f = document.createElement("img");
629
- f.className = "gengage-chat-header-avatar", f.src = t.headerAvatarUrl, f.alt = t.headerTitle ?? "Assistant", n.appendChild(f);
628
+ const u = document.createElement("img");
629
+ u.className = "gengage-chat-header-avatar", u.src = t.headerAvatarUrl, u.alt = t.headerTitle ?? "Assistant", n.appendChild(u);
630
630
  }
631
631
  const i = document.createElement("div");
632
632
  i.className = "gengage-chat-header-info";
@@ -634,63 +634,49 @@ class Rt {
634
634
  s.className = "gengage-chat-header-title-row";
635
635
  const l = document.createElement("span");
636
636
  if (l.className = "gengage-chat-header-title", l.textContent = t.headerTitle ?? this.i18n.headerTitle ?? "Product Expert", s.appendChild(l), t.headerBadge) {
637
- const f = document.createElement("span");
638
- f.className = "gengage-chat-header-badge", f.textContent = t.headerBadge, s.appendChild(f);
637
+ const u = document.createElement("span");
638
+ u.className = "gengage-chat-header-badge", u.textContent = t.headerBadge, s.appendChild(u);
639
639
  }
640
640
  i.appendChild(s);
641
- const r = document.createElement("a");
642
- r.className = "gengage-chat-header-powered", r.href = "https://gengage.ai/", r.target = "_blank", r.rel = "noopener noreferrer", r.innerHTML = '<svg viewBox="0 0 16 16" fill="currentColor"><path d="M8 1a7 7 0 110 14A7 7 0 018 1zm0 1.5a5.5 5.5 0 100 11 5.5 5.5 0 000-11zM7 4.5h2v4H7v-4zm0 5h2v2H7v-2z"/></svg>Powered by Gengage', i.appendChild(r), n.appendChild(i), a.appendChild(n);
641
+ const d = document.createElement("a");
642
+ d.className = "gengage-chat-header-powered", d.href = "https://gengage.ai/", d.target = "_blank", d.rel = "noopener noreferrer", d.innerHTML = '<svg viewBox="0 0 16 16" fill="currentColor"><path d="M8 1a7 7 0 110 14A7 7 0 018 1zm0 1.5a5.5 5.5 0 100 11 5.5 5.5 0 000-11zM7 4.5h2v4H7v-4zm0 5h2v2H7v-2z"/></svg>Powered by Gengage', i.appendChild(d), n.appendChild(i), a.appendChild(n);
643
643
  const c = document.createElement("div");
644
644
  if (c.className = "gengage-chat-header-right", t.headerCartUrl) {
645
- const f = document.createElement("a");
646
- f.className = "gengage-chat-header-btn", U(f, "href", t.headerCartUrl), f.target = "_blank", f.rel = "noopener noreferrer", f.setAttribute("aria-label", this.i18n.cartAriaLabel), f.innerHTML = '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="21" r="1"/><circle cx="20" cy="21" r="1"/><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"/></svg>', c.appendChild(f);
645
+ const u = document.createElement("a");
646
+ u.className = "gengage-chat-header-btn", U(u, "href", t.headerCartUrl), u.target = "_blank", u.rel = "noopener noreferrer", u.setAttribute("aria-label", this.i18n.cartAriaLabel), u.innerHTML = '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="21" r="1"/><circle cx="20" cy="21" r="1"/><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"/></svg>', c.appendChild(u);
647
647
  }
648
648
  if (t.headerFavoritesToggle) {
649
- const f = document.createElement("button");
650
- f.className = "gengage-chat-header-btn", f.type = "button", f.setAttribute("aria-label", this.i18n.favoritesAriaLabel), f.innerHTML = '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/></svg>', f.addEventListener("click", () => t.onFavoritesClick?.()), c.appendChild(f);
649
+ const u = document.createElement("button");
650
+ u.className = "gengage-chat-header-btn", u.type = "button", u.setAttribute("aria-label", this.i18n.favoritesAriaLabel), u.innerHTML = '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/></svg>', u.addEventListener("click", () => t.onFavoritesClick?.()), c.appendChild(u);
651
651
  }
652
652
  const g = document.createElement("button");
653
653
  g.className = "gengage-chat-close", g.type = "button", g.setAttribute("aria-label", this.i18n.closeButton), g.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>', g.addEventListener("click", t.onClose), c.appendChild(g), a.appendChild(c);
654
654
  {
655
- let f = null, C = 0;
656
- const M = 80;
657
- a.addEventListener(
658
- "touchstart",
659
- (F) => {
660
- if (window.innerWidth > 768) return;
661
- const R = F.changedTouches?.[0];
662
- R && (f = R.clientY, C = 0, this.root.style.transition = "none");
663
- },
664
- { passive: !0 }
665
- ), a.addEventListener(
666
- "touchmove",
667
- (F) => {
668
- if (f === null) return;
669
- const R = F.changedTouches?.[0];
670
- R && (C = Math.max(0, R.clientY - f), this.root.style.transform = `translateY(${C}px)`, this.root.style.opacity = String(1 - C / 300));
671
- },
672
- { passive: !0 }
673
- ), a.addEventListener(
674
- "touchend",
675
- () => {
676
- f !== null && (f = null, this.root.style.transition = "", C >= M && t.onClose(), this.root.style.transform = "", this.root.style.opacity = "", C = 0);
677
- },
678
- { passive: !0 }
679
- ), a.addEventListener(
680
- "touchcancel",
681
- () => {
682
- f !== null && (f = null, this.root.style.transition = "", this.root.style.transform = "", this.root.style.opacity = "", C = 0);
683
- },
684
- { passive: !0 }
685
- );
655
+ let u = null, P = 0;
656
+ const Y = 80, ee = (se) => {
657
+ if (window.innerWidth > 768) return;
658
+ const ie = se.changedTouches?.[0];
659
+ ie && (u = ie.clientY, P = 0, this.root.style.transition = "none");
660
+ }, ne = (se) => {
661
+ if (u === null) return;
662
+ const ie = se.changedTouches?.[0];
663
+ ie && (P = Math.max(0, ie.clientY - u), this.root.style.transform = `translateY(${P}px)`, this.root.style.opacity = String(1 - P / 300));
664
+ }, me = () => {
665
+ u !== null && (u = null, this.root.style.transition = "", P >= Y && t.onClose(), this.root.style.transform = "", this.root.style.opacity = "", P = 0);
666
+ }, fe = () => {
667
+ u !== null && (u = null, this.root.style.transition = "", this.root.style.transform = "", this.root.style.opacity = "", P = 0);
668
+ };
669
+ a.addEventListener("touchstart", ee, { passive: !0 }), a.addEventListener("touchmove", ne, { passive: !0 }), a.addEventListener("touchend", me, { passive: !0 }), a.addEventListener("touchcancel", fe, { passive: !0 }), this._cleanups.push(() => {
670
+ a.removeEventListener("touchstart", ee), a.removeEventListener("touchmove", ne), a.removeEventListener("touchend", me), a.removeEventListener("touchcancel", fe);
671
+ });
686
672
  }
687
- const d = document.createElement("div");
688
- d.className = "gengage-chat-body", this._panelEl = document.createElement("div"), this._panelEl.className = "gengage-chat-panel", this._panelTopBar = new Mt({
673
+ const r = document.createElement("div");
674
+ r.className = "gengage-chat-body", this._panelEl = document.createElement("div"), this._panelEl.className = "gengage-chat-panel", this._panelTopBar = new Ut({
689
675
  onBack: () => t.onPanelBack?.(),
690
676
  onForward: () => t.onPanelForward?.(),
691
677
  backAriaLabel: this.i18n.backAriaLabel,
692
678
  forwardAriaLabel: this.i18n.forwardAriaLabel
693
- }), this._panelEl.appendChild(this._panelTopBar.getElement()), d.appendChild(this._panelEl), this._dividerEl = document.createElement("div"), this._dividerEl.className = "gengage-chat-panel-divider gengage-chat-panel-divider--hidden", this._dividerEl.setAttribute("role", "separator"), this._dividerEl.setAttribute("aria-label", this.i18n.togglePanelAriaLabel);
679
+ }), this._panelEl.appendChild(this._panelTopBar.getElement()), r.appendChild(this._panelEl), this._dividerEl = document.createElement("div"), this._dividerEl.className = "gengage-chat-panel-divider gengage-chat-panel-divider--hidden", this._dividerEl.setAttribute("role", "separator"), this._dividerEl.setAttribute("aria-label", this.i18n.togglePanelAriaLabel);
694
680
  const m = document.createElement("button");
695
681
  m.className = "gengage-chat-panel-divider-toggle", m.type = "button", m.setAttribute("aria-label", this.i18n.togglePanelAriaLabel), m.textContent = "»", m.addEventListener("click", () => {
696
682
  if (this._ignoreNextDividerClick) {
@@ -699,124 +685,116 @@ class Rt {
699
685
  }
700
686
  this.togglePanel(), this._onPanelToggle?.();
701
687
  });
702
- let p = null, y = null;
703
- const _ = 24;
704
- this._dividerEl.addEventListener(
705
- "touchstart",
706
- (f) => {
707
- if (window.innerWidth > 768) return;
708
- const C = f.changedTouches?.[0];
709
- C && (p = C.clientX, y = C.clientY);
710
- },
711
- { passive: !0 }
712
- ), this._dividerEl.addEventListener(
713
- "touchend",
714
- (f) => {
715
- if (window.innerWidth > 768 || p === null || y === null) return;
716
- const C = f.changedTouches?.[0];
717
- if (!C) return;
718
- const M = C.clientX - p, F = C.clientY - y;
719
- if (p = null, y = null, Math.abs(F) < _ || Math.abs(F) < Math.abs(M)) return;
720
- const R = F < 0;
721
- R !== this._panelCollapsed && (this._ignoreNextDividerClick = !0, this.setPanelCollapsed(R), this._onPanelToggle?.());
722
- },
723
- { passive: !0 }
724
- ), this._dividerEl.appendChild(m), d.appendChild(this._dividerEl);
725
- const x = document.createElement("div");
726
- x.className = "gengage-chat-conversation", x.appendChild(a);
688
+ let h = null, y = null;
689
+ const _ = 24, v = (u) => {
690
+ if (window.innerWidth > 768) return;
691
+ const P = u.changedTouches?.[0];
692
+ P && (h = P.clientX, y = P.clientY);
693
+ }, C = (u) => {
694
+ if (window.innerWidth > 768 || h === null || y === null) return;
695
+ const P = u.changedTouches?.[0];
696
+ if (!P) return;
697
+ const Y = P.clientX - h, ee = P.clientY - y;
698
+ if (h = null, y = null, Math.abs(ee) < _ || Math.abs(ee) < Math.abs(Y)) return;
699
+ const ne = ee < 0;
700
+ ne !== this._panelCollapsed && (this._ignoreNextDividerClick = !0, this.setPanelCollapsed(ne), this._onPanelToggle?.());
701
+ };
702
+ this._dividerEl.addEventListener("touchstart", v, { passive: !0 }), this._dividerEl.addEventListener("touchend", C, { passive: !0 }), this._cleanups.push(() => {
703
+ this._dividerEl.removeEventListener("touchstart", v), this._dividerEl.removeEventListener("touchend", C);
704
+ }), this._dividerEl.appendChild(m), r.appendChild(this._dividerEl);
727
705
  const E = document.createElement("div");
728
- E.className = "gengage-chat-offline-bar", E.setAttribute("role", "status"), E.setAttribute("aria-live", "polite"), E.textContent = this.i18n.offlineMessage, typeof navigator < "u" && !navigator.onLine && E.classList.add("gengage-chat-offline-bar--visible"), x.appendChild(E);
729
- const I = () => E.classList.add("gengage-chat-offline-bar--visible"), S = () => E.classList.remove("gengage-chat-offline-bar--visible");
730
- window.addEventListener("offline", I), window.addEventListener("online", S), this._cleanups.push(() => {
731
- window.removeEventListener("offline", I), window.removeEventListener("online", S);
732
- }), this._kvkkSlot = document.createElement("div"), this._kvkkSlot.className = "gengage-chat-kvkk-slot", x.appendChild(this._kvkkSlot), this.messagesEl = document.createElement("div"), this.messagesEl.className = "gengage-chat-messages", this.messagesEl.setAttribute("role", "log"), this.messagesEl.setAttribute("aria-live", "polite"), this.messagesEl.setAttribute("aria-label", this.i18n.chatMessagesAriaLabel);
733
- let v = !1;
734
- this.messagesEl.addEventListener(
735
- "scroll",
736
- () => {
737
- v || (v = !0, requestAnimationFrame(() => {
738
- v = !1;
739
- const { scrollTop: f, scrollHeight: C, clientHeight: M } = this.messagesEl;
740
- this._userScrolledUp = C - f - M > 10;
741
- }));
742
- },
743
- { passive: !0 }
744
- ), x.appendChild(this.messagesEl), this._thumbnailsColumn = new Bt({
745
- onThumbnailClick: (f) => t.onThumbnailClick?.(f)
706
+ E.className = "gengage-chat-conversation", E.appendChild(a);
707
+ const S = document.createElement("div");
708
+ S.className = "gengage-chat-offline-bar", S.setAttribute("role", "status"), S.setAttribute("aria-live", "polite"), S.textContent = this.i18n.offlineMessage, typeof navigator < "u" && !navigator.onLine && S.classList.add("gengage-chat-offline-bar--visible"), E.appendChild(S);
709
+ const w = () => S.classList.add("gengage-chat-offline-bar--visible"), L = () => S.classList.remove("gengage-chat-offline-bar--visible");
710
+ window.addEventListener("offline", w), window.addEventListener("online", L), this._cleanups.push(() => {
711
+ window.removeEventListener("offline", w), window.removeEventListener("online", L);
712
+ }), this._kvkkSlot = document.createElement("div"), this._kvkkSlot.className = "gengage-chat-kvkk-slot", E.appendChild(this._kvkkSlot), this.messagesEl = document.createElement("div"), this.messagesEl.className = "gengage-chat-messages", this.messagesEl.setAttribute("role", "log"), this.messagesEl.setAttribute("aria-live", "polite"), this.messagesEl.setAttribute("aria-label", this.i18n.chatMessagesAriaLabel);
713
+ let R = !1;
714
+ const q = () => {
715
+ R || (R = !0, requestAnimationFrame(() => {
716
+ R = !1;
717
+ const { scrollTop: u, scrollHeight: P, clientHeight: Y } = this.messagesEl;
718
+ this._userScrolledUp = P - u - Y > 10;
719
+ }));
720
+ };
721
+ this.messagesEl.addEventListener("scroll", q, { passive: !0 }), this._cleanups.push(() => {
722
+ this.messagesEl.removeEventListener("scroll", q);
723
+ }), E.appendChild(this.messagesEl), this._thumbnailsColumn = new qt({
724
+ onThumbnailClick: (u) => t.onThumbnailClick?.(u)
746
725
  }), this._panelEl.appendChild(this._thumbnailsColumn.getElement()), this._pillsEl = document.createElement("div"), this._pillsEl.className = "gengage-chat-pills", this._pillsEl.setAttribute("role", "toolbar"), this._pillsEl.setAttribute("aria-label", this.i18n.suggestionsAriaLabel), this._pillsEl.style.display = "none";
747
- const h = document.createElement("div");
748
- h.className = "gengage-chat-pills-scroll", this._pillsEl.appendChild(h);
749
- const L = document.createElement("button");
750
- L.className = "gengage-chat-pills-arrow", L.type = "button", L.setAttribute("aria-label", this.i18n.moreSuggestionsAriaLabel), L.textContent = "›", L.addEventListener("click", () => {
751
- h.scrollBy({ left: 150, behavior: "smooth" });
752
- }), this._pillsEl.appendChild(L);
753
- let A = !1;
754
- h.addEventListener(
755
- "scroll",
756
- () => {
757
- A || (A = !0, requestAnimationFrame(() => {
758
- A = !1;
759
- const f = h.scrollLeft + h.clientWidth >= h.scrollWidth - 4;
760
- L.style.display = f ? "none" : "";
761
- }));
762
- },
763
- { passive: !0 }
764
- ), x.appendChild(this._pillsEl), this._inputChipsEl = document.createElement("div"), this._inputChipsEl.className = "gengage-chat-input-chips", this._inputChipsEl.style.display = "none", x.appendChild(this._inputChipsEl);
765
- const u = document.createElement("div");
766
- u.className = "gengage-chat-input-area", this.inputEl = document.createElement("textarea"), this.inputEl.className = "gengage-chat-input", this.inputEl.rows = 1, this.inputEl.placeholder = this.i18n.inputPlaceholder, this.inputEl.addEventListener("input", () => {
726
+ const p = document.createElement("div");
727
+ p.className = "gengage-chat-pills-scroll", this._pillsEl.appendChild(p);
728
+ const b = document.createElement("button");
729
+ b.className = "gengage-chat-pills-arrow", b.type = "button", b.setAttribute("aria-label", this.i18n.moreSuggestionsAriaLabel), b.textContent = "›", b.addEventListener("click", () => {
730
+ p.scrollBy({ left: 150, behavior: "smooth" });
731
+ }), this._pillsEl.appendChild(b);
732
+ let f = !1;
733
+ const k = () => {
734
+ f || (f = !0, requestAnimationFrame(() => {
735
+ f = !1;
736
+ const u = p.scrollLeft + p.clientWidth >= p.scrollWidth - 4;
737
+ b.style.display = u ? "none" : "";
738
+ }));
739
+ };
740
+ p.addEventListener("scroll", k, { passive: !0 }), this._cleanups.push(() => {
741
+ p.removeEventListener("scroll", k);
742
+ }), E.appendChild(this._pillsEl), this._inputChipsEl = document.createElement("div"), this._inputChipsEl.className = "gengage-chat-input-chips", this._inputChipsEl.style.display = "none", E.appendChild(this._inputChipsEl);
743
+ const T = document.createElement("div");
744
+ T.className = "gengage-chat-input-area", this.inputEl = document.createElement("textarea"), this.inputEl.className = "gengage-chat-input", this.inputEl.rows = 1, this.inputEl.placeholder = this.i18n.inputPlaceholder, this.inputEl.addEventListener("input", () => {
767
745
  requestAnimationFrame(() => {
768
746
  this.inputEl.style.height = "auto", this.inputEl.style.height = `${Math.min(this.inputEl.scrollHeight, 120)}px`;
769
747
  });
770
- }), this.inputEl.addEventListener("keydown", (f) => {
771
- f.key === "Enter" && (window.innerWidth < 768 || !f.shiftKey) && (f.preventDefault(), this._submit());
772
- }), this.inputEl.addEventListener("paste", (f) => {
773
- const C = f.clipboardData?.files[0];
774
- C && C.type.startsWith("image/") && (f.preventDefault(), this._onAttachment ? this._onAttachment(C) : this.stageAttachment(C));
748
+ }), this.inputEl.addEventListener("keydown", (u) => {
749
+ u.key === "Enter" && (window.innerWidth < 768 || !u.shiftKey) && (u.preventDefault(), this._submit());
750
+ }), this.inputEl.addEventListener("paste", (u) => {
751
+ const P = u.clipboardData?.files[0];
752
+ P && P.type.startsWith("image/") && (u.preventDefault(), this._onAttachment ? this._onAttachment(P) : this.stageAttachment(P));
775
753
  }), this._fileInput = document.createElement("input"), this._fileInput.type = "file", this._fileInput.accept = "image/jpeg,image/png,image/webp", this._fileInput.style.display = "none", this._fileInput.addEventListener("change", () => {
776
- const f = this._fileInput.files?.[0];
777
- f && (this._onAttachment ? this._onAttachment(f) : this.stageAttachment(f)), this._fileInput.value = "";
754
+ const u = this._fileInput.files?.[0];
755
+ u && (this._onAttachment ? this._onAttachment(u) : this.stageAttachment(u)), this._fileInput.value = "";
778
756
  });
779
- const b = document.createElement("button");
780
- b.className = "gengage-chat-attach-btn", b.type = "button", b.setAttribute("aria-label", this.i18n.attachImageButton), b.innerHTML = '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/><circle cx="12" cy="13" r="4"/></svg>', b.addEventListener("click", () => this._fileInput.click()), this._previewStrip = document.createElement("div"), this._previewStrip.className = "gengage-chat-attachment-preview gengage-chat-attachment-preview--hidden";
781
- const k = document.createElement("img");
782
- k.className = "gengage-chat-attachment-preview-thumb", k.alt = "", this._previewName = document.createElement("span"), this._previewName.className = "gengage-chat-attachment-name";
783
- const P = document.createElement("button");
784
- P.className = "gengage-chat-attachment-remove", P.type = "button", P.setAttribute("aria-label", this.i18n.removeAttachmentButton), P.textContent = "×", P.addEventListener("click", () => this.clearAttachment()), this._previewStrip.appendChild(k), this._previewStrip.appendChild(this._previewName), this._previewStrip.appendChild(P), this.sendBtn = document.createElement("button"), this.sendBtn.className = "gengage-chat-send", this.sendBtn.type = "button", this.sendBtn.setAttribute("aria-label", this.i18n.sendButton), this.sendBtn.innerHTML = '<svg viewBox="0 0 24 24" fill="currentColor"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>', this.sendBtn.addEventListener("click", () => this._submit()), u.addEventListener("dragover", (f) => {
785
- f.preventDefault(), u.classList.add("gengage-chat-input-area--dragover");
786
- }), u.addEventListener("dragleave", () => {
787
- u.classList.remove("gengage-chat-input-area--dragover");
788
- }), u.addEventListener("drop", (f) => {
789
- f.preventDefault(), u.classList.remove("gengage-chat-input-area--dragover");
790
- const C = f.dataTransfer?.files[0];
791
- C && (this._onAttachment ? this._onAttachment(C) : this.stageAttachment(C));
757
+ const I = document.createElement("button");
758
+ I.className = "gengage-chat-attach-btn", I.type = "button", I.setAttribute("aria-label", this.i18n.attachImageButton), I.innerHTML = '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/><circle cx="12" cy="13" r="4"/></svg>', I.addEventListener("click", () => this._fileInput.click()), this._previewStrip = document.createElement("div"), this._previewStrip.className = "gengage-chat-attachment-preview gengage-chat-attachment-preview--hidden";
759
+ const z = document.createElement("img");
760
+ z.className = "gengage-chat-attachment-preview-thumb", z.alt = "", this._previewName = document.createElement("span"), this._previewName.className = "gengage-chat-attachment-name";
761
+ const D = document.createElement("button");
762
+ D.className = "gengage-chat-attachment-remove", D.type = "button", D.setAttribute("aria-label", this.i18n.removeAttachmentButton), D.textContent = "×", D.addEventListener("click", () => this.clearAttachment()), this._previewStrip.appendChild(z), this._previewStrip.appendChild(this._previewName), this._previewStrip.appendChild(D), this.sendBtn = document.createElement("button"), this.sendBtn.className = "gengage-chat-send", this.sendBtn.type = "button", this.sendBtn.setAttribute("aria-label", this.i18n.sendButton), this.sendBtn.innerHTML = '<svg viewBox="0 0 24 24" fill="currentColor"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>', this.sendBtn.addEventListener("click", () => this._submit()), T.addEventListener("dragover", (u) => {
763
+ u.preventDefault(), T.classList.add("gengage-chat-input-area--dragover");
764
+ }), T.addEventListener("dragleave", () => {
765
+ T.classList.remove("gengage-chat-input-area--dragover");
766
+ }), T.addEventListener("drop", (u) => {
767
+ u.preventDefault(), T.classList.remove("gengage-chat-input-area--dragover");
768
+ const P = u.dataTransfer?.files[0];
769
+ P && (this._onAttachment ? this._onAttachment(P) : this.stageAttachment(P));
792
770
  });
793
- const z = document.createElement("div");
794
- z.className = "gengage-chat-input-pill", z.appendChild(b), z.appendChild(this.inputEl), this._voiceEnabled && It() && (this._micBtn = document.createElement("button"), this._micBtn.className = "gengage-chat-mic-btn", this._micBtn.type = "button", this._micBtn.setAttribute("aria-label", this.i18n.voiceButton), this._micBtn.innerHTML = '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"/><path d="M19 10v2a7 7 0 0 1-14 0v-2"/><line x1="12" y1="19" x2="12" y2="23"/><line x1="8" y1="23" x2="16" y2="23"/></svg>', this._micBtn.addEventListener("click", () => this._toggleVoice()), z.appendChild(this._micBtn), this._voiceInput = new At(
771
+ const N = document.createElement("div");
772
+ N.className = "gengage-chat-input-pill", N.appendChild(I), N.appendChild(this.inputEl), this._voiceEnabled && zt() && (this._micBtn = document.createElement("button"), this._micBtn.className = "gengage-chat-mic-btn", this._micBtn.type = "button", this._micBtn.setAttribute("aria-label", this.i18n.voiceButton), this._micBtn.innerHTML = '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"/><path d="M19 10v2a7 7 0 0 1-14 0v-2"/><line x1="12" y1="19" x2="12" y2="23"/><line x1="8" y1="23" x2="16" y2="23"/></svg>', this._micBtn.addEventListener("click", () => this._toggleVoice()), N.appendChild(this._micBtn), this._voiceInput = new Rt(
795
773
  {
796
- onInterim: (f) => {
797
- this.inputEl.value = f, this.inputEl.style.height = "auto", this.inputEl.style.height = `${Math.min(this.inputEl.scrollHeight, 120)}px`;
774
+ onInterim: (u) => {
775
+ this.inputEl.value = u, this.inputEl.style.height = "auto", this.inputEl.style.height = `${Math.min(this.inputEl.scrollHeight, 120)}px`;
798
776
  },
799
- onFinal: (f) => {
800
- this.inputEl.value = f;
777
+ onFinal: (u) => {
778
+ this.inputEl.value = u;
801
779
  },
802
- onAutoSubmit: (f) => {
803
- this.inputEl.value = f, this._micBtn?.classList.remove("gengage-chat-mic-btn--active"), this._submit();
780
+ onAutoSubmit: (u) => {
781
+ this.inputEl.value = u, this._micBtn?.classList.remove("gengage-chat-mic-btn--active"), this._submit();
804
782
  },
805
- onStateChange: (f) => {
806
- f === "listening" ? this._micBtn?.classList.add("gengage-chat-mic-btn--active") : this._micBtn?.classList.remove("gengage-chat-mic-btn--active");
783
+ onStateChange: (u) => {
784
+ u === "listening" ? this._micBtn?.classList.add("gengage-chat-mic-btn--active") : this._micBtn?.classList.remove("gengage-chat-mic-btn--active");
807
785
  },
808
- onError: (f, C) => {
786
+ onError: (u, P) => {
809
787
  this._micBtn?.classList.remove("gengage-chat-mic-btn--active");
810
788
  }
811
789
  },
812
790
  { lang: this._voiceLang }
813
- )), z.appendChild(this.sendBtn), u.appendChild(this._previewStrip), u.appendChild(this._fileInput), u.appendChild(z), x.appendChild(u), d.appendChild(x), this.root.appendChild(d);
814
- const T = document.createElement("div");
815
- T.className = "gengage-chat-footer", T.textContent = this.i18n.poweredBy, this.root.appendChild(T);
816
- const N = (f) => {
817
- f.key === "Escape" && t.onClose();
791
+ )), N.appendChild(this.sendBtn), T.appendChild(this._previewStrip), T.appendChild(this._fileInput), T.appendChild(N), E.appendChild(T), r.appendChild(E), this.root.appendChild(r);
792
+ const A = document.createElement("div");
793
+ A.className = "gengage-chat-footer", A.textContent = this.i18n.poweredBy, this.root.appendChild(A);
794
+ const M = (u) => {
795
+ u.key === "Escape" && t.onClose();
818
796
  };
819
- this.root.addEventListener("keydown", N), this._cleanups.push(() => this.root.removeEventListener("keydown", N)), e.appendChild(this.root);
797
+ this.root.addEventListener("keydown", M), this._cleanups.push(() => this.root.removeEventListener("keydown", M)), e.appendChild(this.root);
820
798
  }
821
799
  addMessage(e) {
822
800
  const t = document.createElement("div");
@@ -829,7 +807,7 @@ class Rt {
829
807
  if (e.content) {
830
808
  const a = document.createElement("div");
831
809
  if (a.className = "gengage-chat-bubble-text", e.role === "assistant") {
832
- if (a.innerHTML = $(e.content), this._onLinkClick) {
810
+ if (a.innerHTML = G(e.content), this._onLinkClick) {
833
811
  const n = a.querySelectorAll("a[href]");
834
812
  for (const i of n)
835
813
  i.addEventListener("click", (s) => {
@@ -928,13 +906,13 @@ class Rt {
928
906
  for (const n of e) {
929
907
  const i = document.createElement("button");
930
908
  if (i.className = n.image ? "gengage-chat-pill gengage-chat-pill--rich" : "gengage-chat-pill", i.type = "button", n.icon) {
931
- const l = he[n.icon];
909
+ const l = ve[n.icon];
932
910
  if (l) {
933
- const r = document.createElement("span");
934
- r.className = "gengage-chat-pill-icon", r.innerHTML = l, i.appendChild(r);
911
+ const d = document.createElement("span");
912
+ d.className = "gengage-chat-pill-icon", d.innerHTML = l, i.appendChild(d);
935
913
  }
936
914
  }
937
- if (n.image && G(n.image)) {
915
+ if (n.image && K(n.image)) {
938
916
  const l = document.createElement("img");
939
917
  l.className = "gengage-chat-pill-img", l.src = n.image, l.alt = "", i.appendChild(l);
940
918
  }
@@ -955,7 +933,7 @@ class Rt {
955
933
  }
956
934
  showKvkkBanner(e, t) {
957
935
  this._kvkkSlot.innerHTML = "";
958
- const a = Pt({ htmlContent: e, onDismiss: t, closeAriaLabel: this.i18n.closeAriaLabel });
936
+ const a = Ft({ htmlContent: e, onDismiss: t, closeAriaLabel: this.i18n.closeAriaLabel });
959
937
  this._kvkkSlot.appendChild(a);
960
938
  }
961
939
  hideKvkkBanner() {
@@ -1157,7 +1135,7 @@ class Rt {
1157
1135
  const a = this.messagesEl.querySelector(`[data-message-id="${CSS.escape(e)}"]`);
1158
1136
  if (!a) return;
1159
1137
  let n = a.querySelector(".gengage-chat-bubble-text");
1160
- n || (n = document.createElement("div"), n.className = "gengage-chat-bubble-text", a.appendChild(n)), n.innerHTML = $(t), this._scrollToBottom(!1);
1138
+ n || (n = document.createElement("div"), n.className = "gengage-chat-bubble-text", a.appendChild(n)), n.innerHTML = G(t), this._scrollToBottom(!1);
1161
1139
  }
1162
1140
  /** Mark a message as the first bot message in its thread (for special styling). */
1163
1141
  markFirstBotMessage(e) {
@@ -1192,7 +1170,7 @@ class Rt {
1192
1170
  for (const t of e) {
1193
1171
  const a = document.createElement("button");
1194
1172
  if (a.className = "gengage-chat-input-chip", a.type = "button", t.icon) {
1195
- const i = he[t.icon];
1173
+ const i = ve[t.icon];
1196
1174
  if (i) {
1197
1175
  const s = document.createElement("span");
1198
1176
  s.className = "gengage-chat-input-chip-icon", s.innerHTML = i, a.appendChild(s);
@@ -1243,7 +1221,7 @@ class Rt {
1243
1221
  this._cleanups.length = 0, this._voiceInput?.destroy(), this._voiceInput = null;
1244
1222
  }
1245
1223
  }
1246
- const Dt = `<svg width="28" height="28" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1224
+ const jt = `<svg width="28" height="28" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1247
1225
  <rect x="3" y="7" width="18" height="13" rx="3" fill="currentColor" opacity="0.15"/>
1248
1226
  <rect x="3" y="7" width="18" height="13" rx="3" stroke="currentColor" stroke-width="1.5"/>
1249
1227
  <circle cx="9" cy="13" r="1.5" fill="currentColor"/>
@@ -1254,13 +1232,13 @@ const Dt = `<svg width="28" height="28" viewBox="0 0 24 24" fill="none" xmlns="h
1254
1232
  <path d="M1 12V14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
1255
1233
  <path d="M23 12V14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
1256
1234
  </svg>`;
1257
- function Ft(o) {
1235
+ function Vt(o) {
1258
1236
  const e = document.createElement("div");
1259
1237
  e.className = "gengage-chat-launcher-container";
1260
1238
  const t = document.createElement("div");
1261
1239
  t.className = "gengage-chat-launcher-content-area", e.appendChild(t);
1262
1240
  const a = document.createElement("button");
1263
- if (a.className = "gengage-chat-launcher", a.type = "button", a.setAttribute("aria-label", o.ariaLabel ?? "Open chat"), a.innerHTML = o.svgMarkup ?? Dt, o.tooltip !== void 0) {
1241
+ if (a.className = "gengage-chat-launcher", a.type = "button", a.setAttribute("aria-label", o.ariaLabel ?? "Open chat"), a.innerHTML = o.svgMarkup ?? jt, o.tooltip !== void 0) {
1264
1242
  const i = document.createElement("span");
1265
1243
  i.className = "gengage-chat-launcher-tooltip", i.textContent = o.tooltip, a.appendChild(i);
1266
1244
  }
@@ -1268,7 +1246,7 @@ function Ft(o) {
1268
1246
  const n = document.createElement("div");
1269
1247
  return n.className = "gengage-chat-launcher-content-area-bottom", e.appendChild(n), { container: e, button: a, contentArea: t, contentAreaBottom: n };
1270
1248
  }
1271
- const Ut = /* @__PURE__ */ new Set([
1249
+ const Wt = /* @__PURE__ */ new Set([
1272
1250
  "audio/ogg",
1273
1251
  "audio/mpeg",
1274
1252
  "audio/mp3",
@@ -1276,25 +1254,25 @@ const Ut = /* @__PURE__ */ new Set([
1276
1254
  "audio/webm",
1277
1255
  "audio/aac",
1278
1256
  "audio/mp4"
1279
- ]), Ee = /* @__PURE__ */ new Set();
1280
- function ie(o) {
1281
- o.pause(), o.removeAttribute("src"), o.load(), Ee.delete(o);
1257
+ ]), Ae = /* @__PURE__ */ new Set();
1258
+ function ce(o) {
1259
+ o.pause(), o.removeAttribute("src"), o.load(), Ae.delete(o);
1282
1260
  }
1283
- function qt(o, e = "audio/ogg") {
1261
+ function $t(o, e = "audio/ogg") {
1284
1262
  const t = e.split(";")[0].trim();
1285
- if (!Ut.has(t)) return null;
1263
+ if (!Wt.has(t)) return null;
1286
1264
  try {
1287
1265
  const a = new Audio(`data:${e};base64,${o}`);
1288
- return Ee.add(a), a.addEventListener("ended", () => ie(a), { once: !0 }), a.play().catch(() => {
1289
- ie(a);
1266
+ return Ae.add(a), a.addEventListener("ended", () => ce(a), { once: !0 }), a.play().catch(() => {
1267
+ ce(a);
1290
1268
  }), {
1291
- stop: () => ie(a)
1269
+ stop: () => ce(a)
1292
1270
  };
1293
1271
  } catch {
1294
1272
  return null;
1295
1273
  }
1296
1274
  }
1297
- const Ht = {
1275
+ const Gt = {
1298
1276
  screen_size: "Screen Size",
1299
1277
  weight: "Weight",
1300
1278
  battery_capacity: "Battery Capacity",
@@ -1326,80 +1304,80 @@ const Ht = {
1326
1304
  height: "Height",
1327
1305
  depth: "Depth"
1328
1306
  };
1329
- function Ot(o, e) {
1330
- return e?.[o] ?? Ht[o] ?? o.replace(/_/g, " ").replace(/^\w/, (t) => t.toUpperCase());
1307
+ function Yt(o, e) {
1308
+ return e?.[o] ?? Gt[o] ?? o.replace(/_/g, " ").replace(/^\w/, (t) => t.toUpperCase());
1331
1309
  }
1332
- function jt(o) {
1333
- const { recommended: e, products: t, attributes: a, highlights: n, specialCases: i, onProductClick: s, i18n: l } = o, r = document.createElement("div");
1334
- r.className = "gengage-chat-comparison";
1310
+ function Kt(o) {
1311
+ const { recommended: e, products: t, attributes: a, highlights: n, specialCases: i, onProductClick: s, i18n: l } = o, d = document.createElement("div");
1312
+ d.className = "gengage-chat-comparison";
1335
1313
  const c = document.createElement("h3");
1336
- if (c.className = "gengage-chat-comparison-heading", c.textContent = l?.comparisonHeading ?? "COMPARISON RESULTS", r.appendChild(c), e) {
1314
+ if (c.className = "gengage-chat-comparison-heading", c.textContent = l?.comparisonHeading ?? "COMPARISON RESULTS", d.appendChild(c), e) {
1337
1315
  const g = document.createElement("div");
1338
1316
  g.className = "gengage-chat-comparison-recommended";
1339
- const d = document.createElement("div");
1340
- d.className = "gengage-chat-comparison-recommended-label", d.textContent = l?.recommendedChoiceLabel ?? "Recommended Choice", g.appendChild(d);
1317
+ const r = document.createElement("div");
1318
+ r.className = "gengage-chat-comparison-recommended-label", r.textContent = l?.recommendedChoiceLabel ?? "Recommended Choice", g.appendChild(r);
1341
1319
  const m = document.createElement("div");
1342
- if (m.className = "gengage-chat-comparison-recommended-body", e.imageUrl && G(e.imageUrl)) {
1343
- const x = document.createElement("img");
1344
- x.src = e.imageUrl, x.alt = e.name, x.loading = "lazy", x.addEventListener(
1320
+ if (m.className = "gengage-chat-comparison-recommended-body", e.imageUrl && K(e.imageUrl)) {
1321
+ const v = document.createElement("img");
1322
+ v.src = e.imageUrl, v.alt = e.name, v.loading = "lazy", v.addEventListener(
1345
1323
  "error",
1346
1324
  () => {
1347
- x.style.display = "none";
1325
+ v.style.display = "none";
1348
1326
  },
1349
1327
  { once: !0 }
1350
- ), m.appendChild(x);
1328
+ ), m.appendChild(v);
1351
1329
  }
1352
- const p = document.createElement("div");
1353
- p.className = "gengage-chat-comparison-recommended-info";
1330
+ const h = document.createElement("div");
1331
+ h.className = "gengage-chat-comparison-recommended-info";
1354
1332
  const y = document.createElement("div");
1355
- y.className = "gengage-chat-comparison-recommended-title", y.textContent = e.name, p.appendChild(y);
1333
+ y.className = "gengage-chat-comparison-recommended-title", y.textContent = e.name, h.appendChild(y);
1356
1334
  const _ = document.createElement("div");
1357
- if (_.className = "gengage-chat-comparison-recommended-price", _.textContent = q(e.price, o.pricing), p.appendChild(_), m.appendChild(p), m.addEventListener("click", () => {
1335
+ if (_.className = "gengage-chat-comparison-recommended-price", _.textContent = H(e.price, o.pricing), h.appendChild(_), m.appendChild(h), m.addEventListener("click", () => {
1358
1336
  s(e.sku);
1359
1337
  }), m.style.cursor = "pointer", g.appendChild(m), n.length > 0) {
1360
- const x = document.createElement("div");
1361
- x.className = "gengage-chat-comparison-highlights";
1362
- const E = document.createElement("div");
1363
- E.className = "gengage-chat-comparison-highlights-label", E.textContent = l?.highlightsLabel ?? "Key Highlights", x.appendChild(E);
1364
- const I = document.createElement("ul");
1338
+ const v = document.createElement("div");
1339
+ v.className = "gengage-chat-comparison-highlights";
1340
+ const C = document.createElement("div");
1341
+ C.className = "gengage-chat-comparison-highlights-label", C.textContent = l?.highlightsLabel ?? "Key Highlights", v.appendChild(C);
1342
+ const E = document.createElement("ul");
1365
1343
  for (const S of n) {
1366
- const v = document.createElement("li");
1367
- v.textContent = S, I.appendChild(v);
1344
+ const w = document.createElement("li");
1345
+ w.textContent = S, E.appendChild(w);
1368
1346
  }
1369
- x.appendChild(I), g.appendChild(x);
1347
+ v.appendChild(E), g.appendChild(v);
1370
1348
  }
1371
1349
  if (o.recommendedText) {
1372
- const x = document.createElement("div");
1373
- x.className = "gengage-chat-comparison-recommended-text", x.innerHTML = $(o.recommendedText), g.appendChild(x);
1350
+ const v = document.createElement("div");
1351
+ v.className = "gengage-chat-comparison-recommended-text", v.innerHTML = G(o.recommendedText), g.appendChild(v);
1374
1352
  }
1375
- r.appendChild(g);
1353
+ d.appendChild(g);
1376
1354
  }
1377
1355
  if (o.keyDifferencesHtml) {
1378
1356
  const g = document.createElement("div");
1379
1357
  g.className = "gengage-chat-comparison-key-differences";
1380
- const d = document.createElement("h4");
1381
- d.textContent = l?.keyDifferencesLabel ?? "Key Differences", g.appendChild(d);
1358
+ const r = document.createElement("h4");
1359
+ r.textContent = l?.keyDifferencesLabel ?? "Key Differences", g.appendChild(r);
1382
1360
  const m = document.createElement("div");
1383
- m.className = "gengage-chat-comparison-key-differences-content", m.innerHTML = $(Vt(o.keyDifferencesHtml)), g.appendChild(m), r.appendChild(g);
1361
+ m.className = "gengage-chat-comparison-key-differences-content", m.innerHTML = G(Qt(o.keyDifferencesHtml)), g.appendChild(m), d.appendChild(g);
1384
1362
  }
1385
1363
  if (i && i.length > 0) {
1386
1364
  const g = document.createElement("details");
1387
1365
  g.className = "gengage-chat-comparison-special";
1388
- const d = document.createElement("summary");
1389
- d.textContent = l?.specialCasesLabel ?? "For Special Cases", g.appendChild(d);
1366
+ const r = document.createElement("summary");
1367
+ r.textContent = l?.specialCasesLabel ?? "For Special Cases", g.appendChild(r);
1390
1368
  const m = document.createElement("ul");
1391
- for (const p of i)
1392
- Wt(m, p);
1393
- m.childElementCount > 0 && g.appendChild(m), r.appendChild(g);
1369
+ for (const h of i)
1370
+ Xt(m, h);
1371
+ m.childElementCount > 0 && g.appendChild(m), d.appendChild(g);
1394
1372
  }
1395
1373
  if (t.length > 0 && a.length > 0) {
1396
1374
  const g = document.createElement("table");
1397
1375
  g.className = "gengage-chat-comparison-table";
1398
- const d = document.createElement("thead"), m = document.createElement("tr"), p = document.createElement("th");
1399
- m.appendChild(p);
1376
+ const r = document.createElement("thead"), m = document.createElement("tr"), h = document.createElement("th");
1377
+ m.appendChild(h);
1400
1378
  for (const _ of t) {
1401
- const x = document.createElement("th");
1402
- if (_.sku === e?.sku && (x.className = "gengage-chat-comparison-selected"), _.imageUrl && G(_.imageUrl)) {
1379
+ const v = document.createElement("th");
1380
+ if (_.sku === e?.sku && (v.className = "gengage-chat-comparison-selected"), _.imageUrl && K(_.imageUrl)) {
1403
1381
  const S = document.createElement("img");
1404
1382
  S.src = _.imageUrl, S.alt = _.name, S.loading = "lazy", S.addEventListener(
1405
1383
  "error",
@@ -1407,46 +1385,46 @@ function jt(o) {
1407
1385
  S.style.display = "none";
1408
1386
  },
1409
1387
  { once: !0 }
1410
- ), x.appendChild(S);
1388
+ ), v.appendChild(S);
1411
1389
  }
1390
+ const C = document.createElement("div");
1391
+ C.textContent = _.name, v.appendChild(C);
1412
1392
  const E = document.createElement("div");
1413
- E.textContent = _.name, x.appendChild(E);
1414
- const I = document.createElement("div");
1415
- I.className = "gengage-chat-comparison-table-price", I.textContent = q(_.price, o.pricing), x.appendChild(I), m.appendChild(x);
1393
+ E.className = "gengage-chat-comparison-table-price", E.textContent = H(_.price, o.pricing), v.appendChild(E), m.appendChild(v);
1416
1394
  }
1417
- d.appendChild(m), g.appendChild(d);
1395
+ r.appendChild(m), g.appendChild(r);
1418
1396
  const y = document.createElement("tbody");
1419
1397
  for (const _ of a) {
1420
- const x = document.createElement("tr"), E = document.createElement("td");
1421
- E.className = "gengage-chat-comparison-label", E.textContent = Ot(_.label, l?.criteriaLabels), x.appendChild(E);
1422
- for (let I = 0; I < _.values.length; I++) {
1398
+ const v = document.createElement("tr"), C = document.createElement("td");
1399
+ C.className = "gengage-chat-comparison-label", C.textContent = Yt(_.label, l?.criteriaLabels), v.appendChild(C);
1400
+ for (let E = 0; E < _.values.length; E++) {
1423
1401
  const S = document.createElement("td");
1424
- t[I]?.sku === e?.sku && (S.className = "gengage-chat-comparison-selected"), S.textContent = _.values[I] ?? "", x.appendChild(S);
1402
+ t[E]?.sku === e?.sku && (S.className = "gengage-chat-comparison-selected"), S.textContent = _.values[E] ?? "", v.appendChild(S);
1425
1403
  }
1426
- y.appendChild(x);
1404
+ y.appendChild(v);
1427
1405
  }
1428
- g.appendChild(y), r.appendChild(g);
1406
+ g.appendChild(y), d.appendChild(g);
1429
1407
  }
1430
1408
  if (o.productActions) {
1431
1409
  const g = document.createElement("div");
1432
1410
  g.className = "gengage-chat-comparison-product-actions";
1433
- for (const d of t)
1434
- if (o.productActions[d.sku]) {
1435
- const p = document.createElement("button");
1436
- p.className = "gengage-chat-comparison-view-btn", p.type = "button", p.textContent = d.name, p.addEventListener("click", () => s(d.sku)), g.appendChild(p);
1411
+ for (const r of t)
1412
+ if (o.productActions[r.sku]) {
1413
+ const h = document.createElement("button");
1414
+ h.className = "gengage-chat-comparison-view-btn", h.type = "button", h.textContent = r.name, h.addEventListener("click", () => s(r.sku)), g.appendChild(h);
1437
1415
  }
1438
- g.childElementCount > 0 && r.appendChild(g);
1416
+ g.childElementCount > 0 && d.appendChild(g);
1439
1417
  }
1440
- return r;
1418
+ return d;
1441
1419
  }
1442
- function Vt(o) {
1420
+ function Qt(o) {
1443
1421
  if (/<[uo]l[\s>]/i.test(o) || /<li[\s>]/i.test(o)) return o;
1444
1422
  const e = o.split(`
1445
1423
  `).filter((t) => t.trim());
1446
1424
  return e.length <= 1 ? o : "<ul>" + e.map((t) => `<li>${t.trim()}</li>`).join("") + "</ul>";
1447
1425
  }
1448
- function Wt(o, e) {
1449
- const t = $(e);
1426
+ function Xt(o, e) {
1427
+ const t = G(e);
1450
1428
  if (!t) return;
1451
1429
  const a = document.createElement("template");
1452
1430
  a.innerHTML = t;
@@ -1454,17 +1432,17 @@ function Wt(o, e) {
1454
1432
  if (n.length > 0) {
1455
1433
  for (const s of n) {
1456
1434
  const l = document.createElement("li");
1457
- l.innerHTML = $(s.innerHTML), o.appendChild(l);
1435
+ l.innerHTML = G(s.innerHTML), o.appendChild(l);
1458
1436
  }
1459
1437
  return;
1460
1438
  }
1461
1439
  const i = document.createElement("li");
1462
- $t(e) ? i.innerHTML = t : i.textContent = e, o.appendChild(i);
1440
+ Jt(e) ? i.innerHTML = t : i.textContent = e, o.appendChild(i);
1463
1441
  }
1464
- function $t(o) {
1442
+ function Jt(o) {
1465
1443
  return /<\/?[a-z][\s\S]*>/i.test(o);
1466
1444
  }
1467
- function Gt(o, e) {
1445
+ function Zt(o, e) {
1468
1446
  const t = document.createElement("div");
1469
1447
  t.className = "gengage-chat-review-highlights";
1470
1448
  const a = o.props?.reviews;
@@ -1479,85 +1457,85 @@ function Gt(o, e) {
1479
1457
  _.review_class === "positive" ? i.positive++ : _.review_class === "negative" ? i.negative++ : i.neutral++;
1480
1458
  const s = document.createElement("div");
1481
1459
  s.className = "gengage-chat-review-tabs";
1482
- const l = e?.reviewFilterAll ?? "All", r = e?.reviewFilterPositive ?? "Positive", c = e?.reviewFilterNegative ?? "Negative", g = [{ label: `${l} (${i.all})`, filter: "all" }];
1483
- i.positive > 0 && g.push({ label: `${r} (${i.positive})`, filter: "positive" }), i.negative > 0 && g.push({ label: `${c} (${i.negative})`, filter: "negative" });
1484
- let d = "all";
1460
+ const l = e?.reviewFilterAll ?? "All", d = e?.reviewFilterPositive ?? "Positive", c = e?.reviewFilterNegative ?? "Negative", g = [{ label: `${l} (${i.all})`, filter: "all" }];
1461
+ i.positive > 0 && g.push({ label: `${d} (${i.positive})`, filter: "positive" }), i.negative > 0 && g.push({ label: `${c} (${i.negative})`, filter: "negative" });
1462
+ let r = "all";
1485
1463
  const m = document.createElement("div");
1486
1464
  m.className = "gengage-chat-review-items";
1487
- function p() {
1465
+ function h() {
1488
1466
  for (; m.firstChild; ) m.removeChild(m.firstChild);
1489
- const _ = d === "all" ? n : n.filter((x) => x.review_class === d);
1490
- for (const x of _) {
1491
- const E = document.createElement("article");
1492
- E.className = "gengage-chat-review-item";
1493
- const I = x.review_class;
1494
- if ((I === "positive" || I === "negative" || I === "neutral") && (E.dataset.tone = I), typeof x.review_tag == "string" && x.review_tag.length > 0) {
1467
+ const _ = r === "all" ? n : n.filter((v) => v.review_class === r);
1468
+ for (const v of _) {
1469
+ const C = document.createElement("article");
1470
+ C.className = "gengage-chat-review-item";
1471
+ const E = v.review_class;
1472
+ if ((E === "positive" || E === "negative" || E === "neutral") && (C.dataset.tone = E), typeof v.review_tag == "string" && v.review_tag.length > 0) {
1495
1473
  const S = document.createElement("div");
1496
- S.className = "gengage-chat-review-tag", S.textContent = x.review_tag, E.appendChild(S);
1474
+ S.className = "gengage-chat-review-tag", S.textContent = v.review_tag, C.appendChild(S);
1497
1475
  }
1498
- if (typeof x.review_text == "string" && x.review_text.length > 0) {
1476
+ if (typeof v.review_text == "string" && v.review_text.length > 0) {
1499
1477
  const S = document.createElement("div");
1500
- S.className = "gengage-chat-review-text", S.textContent = x.review_text, E.appendChild(S);
1478
+ S.className = "gengage-chat-review-text", S.textContent = v.review_text, C.appendChild(S);
1501
1479
  }
1502
- if (x.review_rating !== void 0 && String(x.review_rating).length > 0) {
1480
+ if (v.review_rating !== void 0 && String(v.review_rating).length > 0) {
1503
1481
  const S = document.createElement("div");
1504
- S.className = "gengage-chat-review-rating", S.textContent = String(x.review_rating), E.appendChild(S);
1482
+ S.className = "gengage-chat-review-rating", S.textContent = String(v.review_rating), C.appendChild(S);
1505
1483
  }
1506
- m.appendChild(E);
1484
+ m.appendChild(C);
1507
1485
  }
1508
1486
  }
1509
1487
  for (const _ of g) {
1510
- const x = document.createElement("button");
1511
- x.className = "gengage-chat-review-tab", x.type = "button", x.textContent = _.label, _.filter === d && x.classList.add("gengage-chat-review-tab--active"), x.addEventListener("click", () => {
1512
- d = _.filter;
1513
- for (const E of s.querySelectorAll(".gengage-chat-review-tab"))
1514
- E.classList.toggle("gengage-chat-review-tab--active", E === x);
1515
- p();
1516
- }), s.appendChild(x);
1488
+ const v = document.createElement("button");
1489
+ v.className = "gengage-chat-review-tab", v.type = "button", v.textContent = _.label, _.filter === r && v.classList.add("gengage-chat-review-tab--active"), v.addEventListener("click", () => {
1490
+ r = _.filter;
1491
+ for (const C of s.querySelectorAll(".gengage-chat-review-tab"))
1492
+ C.classList.toggle("gengage-chat-review-tab--active", C === v);
1493
+ h();
1494
+ }), s.appendChild(v);
1517
1495
  }
1518
1496
  t.appendChild(s);
1519
1497
  const y = /* @__PURE__ */ new Map();
1520
1498
  for (const _ of n)
1521
1499
  if (typeof _.review_tag == "string" && _.review_tag.length > 0) {
1522
- const x = y.get(_.review_tag);
1523
- x ? x.count++ : y.set(_.review_tag, { count: 1, sentiment: _.review_class ?? "neutral" });
1500
+ const v = y.get(_.review_tag);
1501
+ v ? v.count++ : y.set(_.review_tag, { count: 1, sentiment: _.review_class ?? "neutral" });
1524
1502
  }
1525
1503
  if (y.size > 0) {
1526
1504
  const _ = document.createElement("div");
1527
1505
  _.className = "gengage-chat-review-pills";
1528
- for (const [x, E] of y) {
1529
- const I = document.createElement("span");
1530
- I.className = "gengage-chat-review-pill", I.dataset.tone = E.sentiment;
1506
+ for (const [v, C] of y) {
1507
+ const E = document.createElement("span");
1508
+ E.className = "gengage-chat-review-pill", E.dataset.tone = C.sentiment;
1531
1509
  const S = document.createElement("span");
1532
- S.className = "gengage-chat-review-pill-icon", S.textContent = E.sentiment === "positive" ? "✓" : E.sentiment === "negative" ? "✕" : "●", I.appendChild(S);
1533
- const v = document.createElement("span");
1534
- if (v.textContent = x, I.appendChild(v), E.count > 1) {
1535
- const h = document.createElement("span");
1536
- h.className = "gengage-chat-review-pill-count", h.textContent = String(E.count), I.appendChild(h);
1510
+ S.className = "gengage-chat-review-pill-icon", S.textContent = C.sentiment === "positive" ? "✓" : C.sentiment === "negative" ? "✕" : "●", E.appendChild(S);
1511
+ const w = document.createElement("span");
1512
+ if (w.textContent = v, E.appendChild(w), C.count > 1) {
1513
+ const L = document.createElement("span");
1514
+ L.className = "gengage-chat-review-pill-count", L.textContent = String(C.count), E.appendChild(L);
1537
1515
  }
1538
- _.appendChild(I);
1516
+ _.appendChild(E);
1539
1517
  }
1540
1518
  t.appendChild(_);
1541
1519
  }
1542
- return p(), t.appendChild(m), t;
1520
+ return h(), t.appendChild(m), t;
1543
1521
  }
1544
- function Se(o) {
1522
+ function Pe(o) {
1545
1523
  const e = o.product.sku;
1546
1524
  if (typeof e == "string" && e.length > 0) return e;
1547
1525
  const t = o.action?.payload;
1548
1526
  return t && typeof t == "object" && "sku" in t && typeof t.sku == "string" ? t.sku : null;
1549
1527
  }
1550
- const Yt = {
1528
+ const ea = {
1551
1529
  winner: "roleWinner",
1552
1530
  best_value: "roleBestValue",
1553
1531
  best_alternative: "roleBestAlternative"
1554
1532
  };
1555
- function Te(o, e) {
1533
+ function Ne(o, e) {
1556
1534
  if (!o || !e) return null;
1557
- const t = Yt[o];
1535
+ const t = ea[o];
1558
1536
  return t ? e[t] ?? o : o;
1559
1537
  }
1560
- function Kt(o, e) {
1538
+ function ta(o, e) {
1561
1539
  const t = document.createElement("div");
1562
1540
  t.className = "gengage-chat-ai-top-picks";
1563
1541
  const a = o.props?.suggestions ?? [];
@@ -1567,64 +1545,64 @@ function Kt(o, e) {
1567
1545
  const i = document.createElement("div");
1568
1546
  i.className = "gengage-chat-ai-top-picks-cards";
1569
1547
  for (let s = 0; s < a.length; s++) {
1570
- const l = a[s], c = l.role === "winner" || s === 0 ? Qt(l, e) : Xt(l, e);
1548
+ const l = a[s], c = l.role === "winner" || s === 0 ? aa(l, e) : na(l, e);
1571
1549
  i.appendChild(c);
1572
1550
  }
1573
1551
  return t.appendChild(i), t;
1574
1552
  }
1575
- function Qt(o, e) {
1553
+ function aa(o, e) {
1576
1554
  const t = document.createElement("div");
1577
1555
  t.className = "gengage-chat-ai-toppick-card gengage-chat-ai-toppick-card--winner";
1578
1556
  const a = document.createElement("span");
1579
- a.className = "gengage-chat-ai-toppick-badge", a.textContent = Te(o.role, e.i18n) ?? e.i18n?.roleWinner ?? "TOP MATCH", t.appendChild(a);
1557
+ a.className = "gengage-chat-ai-toppick-badge", a.textContent = Ne(o.role, e.i18n) ?? e.i18n?.roleWinner ?? "TOP MATCH", t.appendChild(a);
1580
1558
  const n = o.product, i = n.discountPercent;
1581
1559
  if (typeof i == "number" && i > 0) {
1582
- const d = document.createElement("span");
1583
- d.className = "gengage-chat-ai-toppick-discount-badge", d.textContent = `%${ce(i)}`, t.appendChild(d);
1560
+ const r = document.createElement("span");
1561
+ r.className = "gengage-chat-ai-toppick-discount-badge", r.textContent = `%${pe(i)}`, t.appendChild(r);
1584
1562
  }
1585
1563
  const s = n.imageUrl;
1586
- if (s && G(s)) {
1587
- const d = document.createElement("img");
1588
- d.className = "gengage-chat-ai-toppick-img", U(d, "src", s), d.loading = "lazy", d.alt = n.name || "Product image", X(d), t.appendChild(d);
1564
+ if (s && K(s)) {
1565
+ const r = document.createElement("img");
1566
+ r.className = "gengage-chat-ai-toppick-img", U(r, "src", s), r.loading = "lazy", r.alt = n.name || "Product image", J(r), t.appendChild(r);
1589
1567
  }
1590
1568
  const l = document.createElement("div");
1591
1569
  l.className = "gengage-chat-ai-toppick-body";
1592
- const r = n.name;
1593
- if (r) {
1594
- const d = document.createElement("div");
1595
- d.className = "gengage-chat-ai-toppick-name", d.textContent = r, l.appendChild(d);
1570
+ const d = n.name;
1571
+ if (d) {
1572
+ const r = document.createElement("div");
1573
+ r.className = "gengage-chat-ai-toppick-name", r.textContent = d, l.appendChild(r);
1596
1574
  }
1597
1575
  if (o.reason) {
1598
- const d = document.createElement("div");
1599
- d.className = "gengage-chat-ai-toppick-reason", d.textContent = o.reason, l.appendChild(d);
1576
+ const r = document.createElement("div");
1577
+ r.className = "gengage-chat-ai-toppick-reason", r.textContent = o.reason, l.appendChild(r);
1600
1578
  }
1601
- if (o.labels && o.labels.length > 0 && l.appendChild(Le(o.labels)), typeof o.expertQualityScore == "number") {
1602
- const d = document.createElement("div");
1603
- d.className = "gengage-chat-ai-toppick-score";
1604
- const m = o.expertQualityScore <= 5 ? 5 : 10;
1605
- d.textContent = `${o.expertQualityScore}/${m}`, l.appendChild(d);
1579
+ if (o.labels && o.labels.length > 0 && l.appendChild(Me(o.labels)), typeof o.expertQualityScore == "number") {
1580
+ const r = document.createElement("div");
1581
+ r.className = "gengage-chat-ai-toppick-score";
1582
+ let m = o.expertQualityScore, h = 10;
1583
+ m > 10 ? m = Math.round(m) / 10 : m <= 5 && (h = 5), r.textContent = `${m}/${h}`, l.appendChild(r);
1606
1584
  }
1607
1585
  if (o.reviewHighlight) {
1608
- const d = document.createElement("blockquote");
1609
- d.className = "gengage-chat-ai-toppick-review", d.textContent = o.reviewHighlight, l.appendChild(d);
1586
+ const r = document.createElement("blockquote");
1587
+ r.className = "gengage-chat-ai-toppick-review", r.textContent = o.reviewHighlight, l.appendChild(r);
1610
1588
  }
1611
1589
  const c = n.price, g = n.originalPrice;
1612
1590
  if (c) {
1613
- const d = document.createElement("div");
1614
- if (d.className = "gengage-chat-ai-toppick-price", g && g !== c) {
1615
- const p = document.createElement("span");
1616
- p.className = "gengage-chat-ai-toppick-original-price", p.textContent = q(g, e.pricing), d.appendChild(p), d.appendChild(document.createTextNode(" "));
1591
+ const r = document.createElement("div");
1592
+ if (r.className = "gengage-chat-ai-toppick-price", g && g !== c) {
1593
+ const h = document.createElement("span");
1594
+ h.className = "gengage-chat-ai-toppick-original-price", h.textContent = H(g, e.pricing), r.appendChild(h), r.appendChild(document.createTextNode(" "));
1617
1595
  }
1618
1596
  const m = document.createElement("span");
1619
- m.textContent = q(c, e.pricing), d.appendChild(m), l.appendChild(d);
1597
+ m.textContent = H(c, e.pricing), r.appendChild(m), l.appendChild(r);
1620
1598
  }
1621
1599
  if (t.appendChild(l), o.action) {
1622
- const d = Se(o), m = n.url ?? "", p = document.createElement("div");
1623
- p.className = "gengage-chat-ai-toppick-spinner", p.style.display = d && e.topPicksLoadingSku === d ? "" : "none", t.appendChild(p);
1600
+ const r = Pe(o), m = n.url ?? "", h = document.createElement("div");
1601
+ h.className = "gengage-chat-ai-toppick-spinner", h.style.display = r && e.topPicksLoadingSku === r ? "" : "none", t.appendChild(h);
1624
1602
  const y = document.createElement("button");
1625
1603
  y.className = "gengage-chat-ai-toppick-cta", y.type = "button", y.textContent = e.i18n?.viewDetails ?? "View Details", y.addEventListener("click", () => {
1626
- if (o.action?.type === "findSimilar" && d && e.onProductClick) {
1627
- e.onProductClick({ sku: d, url: m });
1604
+ if (o.action?.type === "findSimilar" && r && e.onProductClick) {
1605
+ e.onProductClick({ sku: r, url: m });
1628
1606
  return;
1629
1607
  }
1630
1608
  e.onAction(o.action);
@@ -1632,56 +1610,56 @@ function Qt(o, e) {
1632
1610
  }
1633
1611
  return t;
1634
1612
  }
1635
- function Xt(o, e) {
1613
+ function na(o, e) {
1636
1614
  const t = document.createElement("div");
1637
1615
  t.className = "gengage-chat-ai-toppick-card gengage-chat-ai-toppick-card--compact";
1638
1616
  const a = o.product, n = a.discountPercent;
1639
1617
  if (typeof n == "number" && n > 0) {
1640
1618
  const g = document.createElement("span");
1641
- g.className = "gengage-chat-ai-toppick-discount-badge", g.textContent = `%${ce(n)}`, t.appendChild(g);
1619
+ g.className = "gengage-chat-ai-toppick-discount-badge", g.textContent = `%${pe(n)}`, t.appendChild(g);
1642
1620
  }
1643
1621
  const i = a.imageUrl;
1644
- if (i && G(i)) {
1622
+ if (i && K(i)) {
1645
1623
  const g = document.createElement("img");
1646
- g.className = "gengage-chat-ai-toppick-img", U(g, "src", i), g.loading = "lazy", g.alt = a.name || "Product image", X(g), t.appendChild(g);
1624
+ g.className = "gengage-chat-ai-toppick-img", U(g, "src", i), g.loading = "lazy", g.alt = a.name || "Product image", J(g), t.appendChild(g);
1647
1625
  }
1648
1626
  const s = document.createElement("div");
1649
1627
  s.className = "gengage-chat-ai-toppick-body";
1650
- const l = Te(o.role, e.i18n);
1628
+ const l = Ne(o.role, e.i18n);
1651
1629
  if (l) {
1652
1630
  const g = document.createElement("div");
1653
1631
  g.className = "gengage-chat-ai-toppick-role", g.textContent = l, s.appendChild(g);
1654
1632
  }
1655
- const r = a.name;
1656
- if (r) {
1633
+ const d = a.name;
1634
+ if (d) {
1657
1635
  const g = document.createElement("div");
1658
- g.className = "gengage-chat-ai-toppick-name", g.textContent = r, s.appendChild(g);
1636
+ g.className = "gengage-chat-ai-toppick-name", g.textContent = d, s.appendChild(g);
1659
1637
  }
1660
1638
  if (o.reason) {
1661
1639
  const g = document.createElement("div");
1662
1640
  g.className = "gengage-chat-ai-toppick-reason", g.textContent = o.reason, s.appendChild(g);
1663
1641
  }
1664
- o.labels && o.labels.length > 0 && s.appendChild(Le(o.labels));
1642
+ o.labels && o.labels.length > 0 && s.appendChild(Me(o.labels));
1665
1643
  const c = a.price;
1666
1644
  if (c) {
1667
1645
  const g = document.createElement("div");
1668
- g.className = "gengage-chat-ai-toppick-price", g.textContent = q(c, e.pricing), s.appendChild(g);
1646
+ g.className = "gengage-chat-ai-toppick-price", g.textContent = H(c, e.pricing), s.appendChild(g);
1669
1647
  }
1670
1648
  if (t.appendChild(s), o.action) {
1671
- const g = Se(o), d = a.url ?? "", m = document.createElement("div");
1649
+ const g = Pe(o), r = a.url ?? "", m = document.createElement("div");
1672
1650
  m.className = "gengage-chat-ai-toppick-spinner", m.style.display = g && e.topPicksLoadingSku === g ? "" : "none", t.appendChild(m);
1673
- const p = document.createElement("button");
1674
- p.className = "gengage-chat-ai-toppick-cta", p.type = "button", p.textContent = e.i18n?.viewDetails ?? "View Details", p.addEventListener("click", () => {
1651
+ const h = document.createElement("button");
1652
+ h.className = "gengage-chat-ai-toppick-cta", h.type = "button", h.textContent = e.i18n?.viewDetails ?? "View Details", h.addEventListener("click", () => {
1675
1653
  if (o.action?.type === "findSimilar" && g && e.onProductClick) {
1676
- e.onProductClick({ sku: g, url: d });
1654
+ e.onProductClick({ sku: g, url: r });
1677
1655
  return;
1678
1656
  }
1679
1657
  e.onAction(o.action);
1680
- }), t.appendChild(p);
1658
+ }), t.appendChild(h);
1681
1659
  }
1682
1660
  return t;
1683
1661
  }
1684
- function Le(o) {
1662
+ function Me(o) {
1685
1663
  const e = document.createElement("div");
1686
1664
  e.className = "gengage-chat-ai-toppick-labels";
1687
1665
  for (const t of o) {
@@ -1690,25 +1668,25 @@ function Le(o) {
1690
1668
  }
1691
1669
  return e;
1692
1670
  }
1693
- function Jt(o, e) {
1671
+ function ia(o, e) {
1694
1672
  const t = document.createElement("div");
1695
1673
  t.className = "gengage-chat-grounding-review";
1696
- const a = o.props ?? {}, n = a.title, i = a.reviewCount, s = a.action, l = e.i18n?.groundingReviewCta ?? "Read Reviews", r = document.createElement("span");
1697
- r.className = "gengage-chat-grounding-review-icon", r.textContent = "📋", t.appendChild(r);
1674
+ const a = o.props ?? {}, n = a.title, i = a.reviewCount, s = a.action, l = e.i18n?.groundingReviewCta ?? "Read Reviews", d = document.createElement("span");
1675
+ d.className = "gengage-chat-grounding-review-icon", d.textContent = "📋", t.appendChild(d);
1698
1676
  const c = document.createElement("div");
1699
1677
  c.className = "gengage-chat-grounding-review-body";
1700
1678
  const g = document.createElement("div");
1701
1679
  if (g.className = "gengage-chat-grounding-review-title", g.textContent = n ?? e.i18n?.customerReviewsTitle ?? "Customer Reviews", c.appendChild(g), i) {
1702
1680
  const m = document.createElement("div");
1703
1681
  m.className = "gengage-chat-grounding-review-subtitle";
1704
- const p = e.i18n?.groundingReviewSubtitle ?? "{count} yorum mevcut";
1705
- m.textContent = p.replace("{count}", i), c.appendChild(m);
1682
+ const h = e.i18n?.groundingReviewSubtitle ?? "{count} yorum mevcut";
1683
+ m.textContent = h.replace("{count}", i), c.appendChild(m);
1706
1684
  }
1707
1685
  t.appendChild(c);
1708
- const d = document.createElement("span");
1709
- return d.className = "gengage-chat-grounding-review-cta", d.textContent = `${l} →`, t.appendChild(d), s && (t.style.cursor = "pointer", t.addEventListener("click", () => e.onAction(s))), t;
1686
+ const r = document.createElement("span");
1687
+ return r.className = "gengage-chat-grounding-review-cta", r.textContent = `${l} →`, t.appendChild(r), s && (t.style.cursor = "pointer", t.addEventListener("click", () => e.onAction(s))), t;
1710
1688
  }
1711
- function Zt(o) {
1689
+ function oa(o) {
1712
1690
  if (o.action.type !== "findSimilar") return o.action;
1713
1691
  const e = o.action.payload && typeof o.action.payload == "object" ? o.action.payload : null, t = typeof e?.input == "string" && e.input.trim() || typeof e?.text == "string" && e.text.trim() || o.name.trim();
1714
1692
  if (!t) return o.action;
@@ -1726,14 +1704,14 @@ function Zt(o) {
1726
1704
  payload: a
1727
1705
  };
1728
1706
  }
1729
- function ea(o, e) {
1707
+ function ra(o, e) {
1730
1708
  const t = document.createElement("div");
1731
1709
  t.className = "gengage-chat-grouping-cards";
1732
1710
  const a = o.props?.entries ?? [];
1733
1711
  if (a.length === 0) return t;
1734
1712
  for (const n of a) {
1735
1713
  const i = document.createElement("div");
1736
- if (i.className = "gengage-chat-grouping-card", i.style.cursor = "pointer", i.addEventListener("click", () => e.onAction(Zt(n))), n.image && G(n.image)) {
1714
+ if (i.className = "gengage-chat-grouping-card", i.style.cursor = "pointer", i.addEventListener("click", () => e.onAction(oa(n))), n.image && K(n.image)) {
1737
1715
  const c = document.createElement("img");
1738
1716
  c.className = "gengage-chat-grouping-card-img", c.src = n.image, c.alt = n.name, c.width = 20, c.height = 20, i.appendChild(c);
1739
1717
  }
@@ -1749,38 +1727,38 @@ function ea(o, e) {
1749
1727
  c.className = "gengage-chat-grouping-card-labels", c.textContent = n.labels.slice(0, 3).join(" · "), s.appendChild(c);
1750
1728
  }
1751
1729
  i.appendChild(s);
1752
- const r = document.createElement("span");
1753
- r.className = "gengage-chat-grouping-card-arrow", r.textContent = "↳", i.insertBefore(r, i.firstChild), t.appendChild(i);
1730
+ const d = document.createElement("span");
1731
+ d.className = "gengage-chat-grouping-card-arrow", d.textContent = "↳", i.insertBefore(d, i.firstChild), t.appendChild(i);
1754
1732
  }
1755
1733
  return t;
1756
1734
  }
1757
- function ta(o, e) {
1735
+ function sa(o, e) {
1758
1736
  const t = document.createElement("div");
1759
1737
  t.className = "gengage-chat-suggested-search-cards";
1760
1738
  const a = o.props?.entries ?? [];
1761
1739
  if (a.length === 0) return t;
1762
1740
  for (const n of a) {
1763
1741
  const i = document.createElement("div");
1764
- if (i.className = "gengage-chat-suggested-search-card", i.style.cursor = "pointer", i.addEventListener("click", () => e.onAction(n.action)), n.image && G(n.image)) {
1765
- const r = document.createElement("img");
1766
- r.className = "gengage-chat-suggested-search-card-img", r.src = n.image, r.alt = n.shortName, r.width = 40, r.height = 40, i.appendChild(r);
1742
+ if (i.className = "gengage-chat-suggested-search-card", i.style.cursor = "pointer", i.addEventListener("click", () => e.onAction(n.action)), n.image && K(n.image)) {
1743
+ const d = document.createElement("img");
1744
+ d.className = "gengage-chat-suggested-search-card-img", d.src = n.image, d.alt = n.shortName, d.width = 40, d.height = 40, i.appendChild(d);
1767
1745
  }
1768
1746
  const s = document.createElement("div");
1769
1747
  s.className = "gengage-chat-suggested-search-card-body";
1770
1748
  const l = document.createElement("div");
1771
1749
  if (l.className = "gengage-chat-suggested-search-card-name", l.textContent = n.shortName, s.appendChild(l), n.detailedMessage) {
1772
- const r = document.createElement("div");
1773
- r.className = "gengage-chat-suggested-search-card-desc", r.textContent = n.detailedMessage, s.appendChild(r);
1750
+ const d = document.createElement("div");
1751
+ d.className = "gengage-chat-suggested-search-card-desc", d.textContent = n.detailedMessage, s.appendChild(d);
1774
1752
  }
1775
1753
  if (n.whyDifferent) {
1776
- const r = document.createElement("div");
1777
- r.className = "gengage-chat-suggested-search-card-diff", r.textContent = n.whyDifferent, s.appendChild(r);
1754
+ const d = document.createElement("div");
1755
+ d.className = "gengage-chat-suggested-search-card-diff", d.textContent = n.whyDifferent, s.appendChild(d);
1778
1756
  }
1779
1757
  i.appendChild(s), t.appendChild(i);
1780
1758
  }
1781
1759
  return t;
1782
1760
  }
1783
- function aa(o, e) {
1761
+ function ca(o, e) {
1784
1762
  const t = document.createElement("button");
1785
1763
  t.className = "gengage-chat-comparison-floating-btn", t.type = "button";
1786
1764
  const a = e.i18n?.compareSelected ?? "Compare";
@@ -1792,7 +1770,7 @@ function aa(o, e) {
1792
1770
  });
1793
1771
  }), t;
1794
1772
  }
1795
- function na(o) {
1773
+ function la(o) {
1796
1774
  const e = document.createElement("div");
1797
1775
  e.className = "gengage-chat-pros-cons";
1798
1776
  const t = o.props?.productName;
@@ -1807,8 +1785,8 @@ function na(o) {
1807
1785
  for (const s of a) {
1808
1786
  const l = document.createElement("li");
1809
1787
  l.className = "gengage-chat-pros-cons-item";
1810
- const r = document.createElement("span");
1811
- r.className = "gengage-chat-pros-cons-icon gengage-chat-pros-cons-icon--pro", r.textContent = "✓", l.appendChild(r);
1788
+ const d = document.createElement("span");
1789
+ d.className = "gengage-chat-pros-cons-icon gengage-chat-pros-cons-icon--pro", d.textContent = "✓", l.appendChild(d);
1812
1790
  const c = document.createElement("span");
1813
1791
  c.textContent = s, l.appendChild(c), i.appendChild(l);
1814
1792
  }
@@ -1820,8 +1798,8 @@ function na(o) {
1820
1798
  for (const s of n) {
1821
1799
  const l = document.createElement("li");
1822
1800
  l.className = "gengage-chat-pros-cons-item";
1823
- const r = document.createElement("span");
1824
- r.className = "gengage-chat-pros-cons-icon gengage-chat-pros-cons-icon--con", r.textContent = "✗", l.appendChild(r);
1801
+ const d = document.createElement("span");
1802
+ d.className = "gengage-chat-pros-cons-icon gengage-chat-pros-cons-icon--con", d.textContent = "✗", l.appendChild(d);
1825
1803
  const c = document.createElement("span");
1826
1804
  c.textContent = s, l.appendChild(c), i.appendChild(l);
1827
1805
  }
@@ -1829,28 +1807,28 @@ function na(o) {
1829
1807
  }
1830
1808
  return e;
1831
1809
  }
1832
- function ia(o, e) {
1810
+ function ga(o, e) {
1833
1811
  const t = o.props?.groups ?? [], a = o.props?.filterTags ?? [], n = document.createElement("div");
1834
1812
  if (n.className = "gengage-chat-categories", t.length === 0) return n;
1835
1813
  const i = document.createElement("div");
1836
1814
  i.className = "gengage-chat-categories-tabs", i.setAttribute("role", "tablist");
1837
- const s = [], l = [], r = (c) => {
1815
+ const s = [], l = [], d = (c) => {
1838
1816
  for (let g = 0; g < s.length; g++) {
1839
- const d = g === c;
1840
- s[g].classList.toggle("gengage-chat-categories-tab--active", d), s[g].setAttribute("aria-selected", String(d)), s[g].tabIndex = d ? 0 : -1, l[g].style.display = d ? "" : "none";
1817
+ const r = g === c;
1818
+ s[g].classList.toggle("gengage-chat-categories-tab--active", r), s[g].setAttribute("aria-selected", String(r)), s[g].tabIndex = r ? 0 : -1, l[g].style.display = r ? "" : "none";
1841
1819
  }
1842
1820
  };
1843
1821
  for (let c = 0; c < t.length; c++) {
1844
- const g = t[c], d = `gengage-cat-tab-${c}`, m = `gengage-cat-panel-${c}`, p = document.createElement("button");
1845
- p.className = "gengage-chat-categories-tab", p.type = "button", p.id = d, p.setAttribute("role", "tab"), p.setAttribute("aria-controls", m), p.setAttribute("aria-selected", String(c === 0)), p.tabIndex = c === 0 ? 0 : -1, c === 0 && p.classList.add("gengage-chat-categories-tab--active"), p.textContent = g.groupName, p.addEventListener("click", () => r(c)), p.addEventListener("keydown", (_) => {
1846
- let x = -1;
1847
- _.key === "ArrowRight" || _.key === "ArrowDown" ? x = (c + 1) % t.length : _.key === "ArrowLeft" || _.key === "ArrowUp" ? x = (c - 1 + t.length) % t.length : _.key === "Home" ? x = 0 : _.key === "End" && (x = t.length - 1), x >= 0 && (_.preventDefault(), r(x), s[x].focus());
1848
- }), s.push(p), i.appendChild(p);
1822
+ const g = t[c], r = `gengage-cat-tab-${c}`, m = `gengage-cat-panel-${c}`, h = document.createElement("button");
1823
+ h.className = "gengage-chat-categories-tab", h.type = "button", h.id = r, h.setAttribute("role", "tab"), h.setAttribute("aria-controls", m), h.setAttribute("aria-selected", String(c === 0)), h.tabIndex = c === 0 ? 0 : -1, c === 0 && h.classList.add("gengage-chat-categories-tab--active"), h.textContent = g.groupName, h.addEventListener("click", () => d(c)), h.addEventListener("keydown", (_) => {
1824
+ let v = -1;
1825
+ _.key === "ArrowRight" || _.key === "ArrowDown" ? v = (c + 1) % t.length : _.key === "ArrowLeft" || _.key === "ArrowUp" ? v = (c - 1 + t.length) % t.length : _.key === "Home" ? v = 0 : _.key === "End" && (v = t.length - 1), v >= 0 && (_.preventDefault(), d(v), s[v].focus());
1826
+ }), s.push(h), i.appendChild(h);
1849
1827
  const y = document.createElement("div");
1850
- y.className = "gengage-chat-categories-grid", y.id = m, y.setAttribute("role", "tabpanel"), y.setAttribute("aria-labelledby", d), c !== 0 && (y.style.display = "none");
1828
+ y.className = "gengage-chat-categories-grid", y.id = m, y.setAttribute("role", "tabpanel"), y.setAttribute("aria-labelledby", r), c !== 0 && (y.style.display = "none");
1851
1829
  for (const _ of g.products) {
1852
- const x = oa(_, e);
1853
- y.appendChild(x);
1830
+ const v = da(_, e);
1831
+ y.appendChild(v);
1854
1832
  }
1855
1833
  l.push(y);
1856
1834
  }
@@ -1860,33 +1838,33 @@ function ia(o, e) {
1860
1838
  const c = document.createElement("div");
1861
1839
  c.className = "gengage-chat-categories-filter-tags";
1862
1840
  for (const g of a) {
1863
- const d = document.createElement("button");
1864
- d.className = "gengage-chat-categories-filter-tag", d.type = "button", d.textContent = g.title, g.action && d.addEventListener("click", () => {
1841
+ const r = document.createElement("button");
1842
+ r.className = "gengage-chat-categories-filter-tag", r.type = "button", r.textContent = g.title, g.action && r.addEventListener("click", () => {
1865
1843
  e.onAction(g.action);
1866
- }), c.appendChild(d);
1844
+ }), c.appendChild(r);
1867
1845
  }
1868
1846
  n.appendChild(c);
1869
1847
  }
1870
1848
  return n;
1871
1849
  }
1872
- function oa(o, e) {
1850
+ function da(o, e) {
1873
1851
  const t = document.createElement("div");
1874
- if (t.className = "gengage-chat-product-card", o.imageUrl && G(o.imageUrl)) {
1852
+ if (t.className = "gengage-chat-product-card", o.imageUrl && K(o.imageUrl)) {
1875
1853
  const i = document.createElement("img");
1876
- i.className = "gengage-chat-product-card-img", i.src = o.imageUrl, i.alt = o.name, t.appendChild(i);
1854
+ i.className = "gengage-chat-product-card-img", i.src = o.imageUrl, i.alt = o.name, i.loading = "lazy", J(i), t.appendChild(i);
1877
1855
  }
1878
1856
  const a = document.createElement("div");
1879
1857
  a.className = "gengage-chat-product-card-body";
1880
1858
  const n = document.createElement("div");
1881
1859
  if (n.className = "gengage-chat-product-card-name", n.textContent = o.name, a.appendChild(n), o.price) {
1882
1860
  const i = document.createElement("div");
1883
- i.className = "gengage-chat-product-card-price", i.textContent = o.price, a.appendChild(i);
1861
+ i.className = "gengage-chat-product-card-price", i.textContent = H(o.price, e.pricing), a.appendChild(i);
1884
1862
  }
1885
1863
  return t.appendChild(a), e.onProductSelect && (t.style.cursor = "pointer", t.addEventListener("click", () => {
1886
1864
  e.onProductSelect?.(o);
1887
1865
  })), t;
1888
1866
  }
1889
- function ra(o, e) {
1867
+ function pa(o, e) {
1890
1868
  const t = document.createElement("div");
1891
1869
  t.className = "gengage-chat-handoff-notice", t.setAttribute("role", "alert");
1892
1870
  const a = document.createElement("span");
@@ -1900,83 +1878,83 @@ function ra(o, e) {
1900
1878
  }
1901
1879
  return t;
1902
1880
  }
1903
- function sa(o, e) {
1881
+ function ha(o, e) {
1904
1882
  const t = o.props?.product ?? o.props, a = document.createElement("div");
1905
1883
  if (a.className = "gengage-chat-product-summary", !t) return a;
1906
- a.style.cursor = "pointer", a.addEventListener("click", (p) => {
1907
- p.target.closest("a") || e.onProductSelect?.(t);
1884
+ a.style.cursor = "pointer", a.addEventListener("click", (h) => {
1885
+ h.target.closest("a") || e.onProductSelect?.(t);
1908
1886
  });
1909
1887
  const n = t.imageUrl;
1910
- if (n && H(n)) {
1911
- const p = document.createElement("div");
1912
- p.className = "gengage-chat-product-summary__image";
1888
+ if (n && O(n)) {
1889
+ const h = document.createElement("div");
1890
+ h.className = "gengage-chat-product-summary__image";
1913
1891
  const y = document.createElement("img");
1914
1892
  y.loading = "lazy", U(y, "src", n);
1915
1893
  const _ = t.name;
1916
- y.alt = _ || "Product image", X(y), p.appendChild(y), a.appendChild(p);
1894
+ y.alt = _ || "Product image", J(y), h.appendChild(y), a.appendChild(h);
1917
1895
  }
1918
1896
  const i = document.createElement("div");
1919
1897
  i.className = "gengage-chat-product-summary__content";
1920
1898
  const s = t.brand, l = t.name;
1921
1899
  if (l) {
1922
- const p = document.createElement("div");
1923
- p.className = "gengage-chat-product-summary__name";
1900
+ const h = document.createElement("div");
1901
+ h.className = "gengage-chat-product-summary__name";
1924
1902
  const y = s && !l.toLowerCase().startsWith(s.toLowerCase());
1925
- p.textContent = y ? `${s} ${l}` : l, i.appendChild(p);
1903
+ h.textContent = y ? `${s} ${l}` : l, i.appendChild(h);
1926
1904
  }
1927
- const r = t.rating, c = t.reviewCount;
1928
- if (typeof r == "number" && Number.isFinite(r) && r > 0) {
1929
- const p = document.createElement("div");
1930
- if (p.className = "gengage-chat-product-summary__rating", p.textContent = ye(_e(r)), typeof c == "number" && Number.isFinite(c)) {
1905
+ const d = t.rating, c = t.reviewCount;
1906
+ if (typeof d == "number" && Number.isFinite(d) && d > 0) {
1907
+ const h = document.createElement("div");
1908
+ if (h.className = "gengage-chat-product-summary__rating", h.appendChild(Te(d)), typeof c == "number" && Number.isFinite(c)) {
1931
1909
  const y = document.createElement("span");
1932
- y.className = "gengage-chat-product-summary__review-count", y.textContent = ` (${c})`, p.appendChild(y);
1910
+ y.className = "gengage-chat-product-summary__review-count", y.textContent = ` (${c})`, h.appendChild(y);
1933
1911
  }
1934
- i.appendChild(p);
1912
+ i.appendChild(h);
1935
1913
  }
1936
- const g = t.price, d = t.originalPrice;
1914
+ const g = t.price, r = t.originalPrice;
1937
1915
  if (g) {
1938
- const p = document.createElement("div");
1939
- if (p.className = "gengage-chat-product-summary__price", d && d !== g) {
1916
+ const h = document.createElement("div");
1917
+ if (h.className = "gengage-chat-product-summary__price", r && r !== g) {
1940
1918
  const _ = document.createElement("span");
1941
- _.className = "gengage-chat-product-summary__price-original", _.textContent = q(d, e.pricing), p.appendChild(_), p.appendChild(document.createTextNode(" "));
1919
+ _.className = "gengage-chat-product-summary__price-original", _.textContent = H(r, e.pricing), h.appendChild(_), h.appendChild(document.createTextNode(" "));
1942
1920
  }
1943
1921
  const y = document.createElement("span");
1944
- y.className = "gengage-chat-product-summary__price-current", y.textContent = q(g, e.pricing), p.appendChild(y), i.appendChild(p);
1922
+ y.className = "gengage-chat-product-summary__price-current", y.textContent = H(g, e.pricing), h.appendChild(y), i.appendChild(h);
1945
1923
  }
1946
1924
  a.appendChild(i);
1947
1925
  const m = t.url;
1948
- if (m && H(m)) {
1949
- const p = document.createElement("a");
1950
- p.className = "gengage-chat-product-summary__cta", U(p, "href", m), U(p, "target", "_blank"), U(p, "rel", "noopener noreferrer"), p.textContent = e.i18n?.productCtaLabel ?? "View", a.appendChild(p);
1926
+ if (m && O(m)) {
1927
+ const h = document.createElement("a");
1928
+ h.className = "gengage-chat-product-summary__cta", U(h, "href", m), U(h, "target", "_blank"), U(h, "rel", "noopener noreferrer"), h.textContent = e.i18n?.productCtaLabel ?? "View", a.appendChild(h);
1951
1929
  }
1952
1930
  return a;
1953
1931
  }
1954
- function Ie() {
1932
+ function Be() {
1955
1933
  return window.innerWidth < 768;
1956
1934
  }
1957
- const Ae = {
1958
- ActionButtons: ({ element: o, context: e }) => ga(o, e),
1959
- ActionButton: ({ element: o, context: e }) => da(o, e),
1960
- ProductCard: ({ element: o, context: e }) => pa(o, e),
1961
- ProductDetailsPanel: ({ element: o, context: e }) => ha(o, e),
1962
- ProductGrid: ({ element: o, spec: e, renderElement: t, context: a }) => fa(o, e, t, a),
1963
- ReviewHighlights: ({ element: o, context: e }) => Gt(o, {
1935
+ const ze = {
1936
+ ActionButtons: ({ element: o, context: e }) => fa(o, e),
1937
+ ActionButton: ({ element: o, context: e }) => ba(o, e),
1938
+ ProductCard: ({ element: o, context: e }) => xa(o, e),
1939
+ ProductDetailsPanel: ({ element: o, context: e }) => va(o, e),
1940
+ ProductGrid: ({ element: o, spec: e, renderElement: t, context: a }) => _a(o, e, t, a),
1941
+ ReviewHighlights: ({ element: o, context: e }) => Zt(o, {
1964
1942
  emptyReviewsMessage: e.i18n?.emptyReviewsMessage,
1965
1943
  reviewFilterAll: e.i18n?.reviewFilterAll,
1966
1944
  reviewFilterPositive: e.i18n?.reviewFilterPositive,
1967
1945
  reviewFilterNegative: e.i18n?.reviewFilterNegative
1968
1946
  }),
1969
- ComparisonTable: ({ element: o, context: e }) => ba(o, e),
1970
- AITopPicks: ({ element: o, context: e }) => Kt(o, e),
1971
- GroundingReviewCard: ({ element: o, context: e }) => Jt(o, e),
1972
- AIGroupingCards: ({ element: o, context: e }) => ea(o, e),
1973
- AISuggestedSearchCards: ({ element: o, context: e }) => ta(o, e),
1974
- ProsAndCons: ({ element: o }) => na(o),
1975
- CategoriesContainer: ({ element: o, context: e }) => ia(o, e),
1976
- HandoffNotice: ({ element: o, context: e }) => ra(o, e),
1977
- ProductSummaryCard: ({ element: o, context: e }) => sa(o, e),
1978
- Divider: ({ element: o }) => xa(o)
1979
- }, Ne = ({
1947
+ ComparisonTable: ({ element: o, context: e }) => ka(o, e),
1948
+ AITopPicks: ({ element: o, context: e }) => ta(o, e),
1949
+ GroundingReviewCard: ({ element: o, context: e }) => ia(o, e),
1950
+ AIGroupingCards: ({ element: o, context: e }) => ra(o, e),
1951
+ AISuggestedSearchCards: ({ element: o, context: e }) => sa(o, e),
1952
+ ProsAndCons: ({ element: o }) => la(o),
1953
+ CategoriesContainer: ({ element: o, context: e }) => ga(o, e),
1954
+ HandoffNotice: ({ element: o, context: e }) => pa(o, e),
1955
+ ProductSummaryCard: ({ element: o, context: e }) => ha(o, e),
1956
+ Divider: ({ element: o }) => Ca(o)
1957
+ }, Re = ({
1980
1958
  element: o,
1981
1959
  renderElement: e
1982
1960
  }) => {
@@ -1989,11 +1967,11 @@ const Ae = {
1989
1967
  }
1990
1968
  return t;
1991
1969
  };
1992
- function ca() {
1993
- return { ...Ae };
1970
+ function ua() {
1971
+ return { ...ze };
1994
1972
  }
1995
- function la(o, e, t = Ae, a = Ne) {
1996
- return qe({
1973
+ function ma(o, e, t = ze, a = Re) {
1974
+ return We({
1997
1975
  spec: o,
1998
1976
  context: e,
1999
1977
  registry: t,
@@ -2001,7 +1979,7 @@ function la(o, e, t = Ae, a = Ne) {
2001
1979
  unknownRenderer: a
2002
1980
  });
2003
1981
  }
2004
- function ga(o, e) {
1982
+ function fa(o, e) {
2005
1983
  const t = document.createElement("div");
2006
1984
  t.className = "gengage-chat-action-buttons";
2007
1985
  const a = o.props?.buttons;
@@ -2012,7 +1990,7 @@ function ga(o, e) {
2012
1990
  }
2013
1991
  return t;
2014
1992
  }
2015
- function da(o, e) {
1993
+ function ba(o, e) {
2016
1994
  const t = document.createElement("button");
2017
1995
  t.className = "gengage-chat-action-btn";
2018
1996
  const a = o.props?.label;
@@ -2020,310 +1998,310 @@ function da(o, e) {
2020
1998
  const n = o.props?.action;
2021
1999
  return n && t.addEventListener("click", () => e.onAction(n)), t;
2022
2000
  }
2023
- function pa(o, e) {
2001
+ function xa(o, e) {
2024
2002
  const t = document.createElement("div");
2025
2003
  t.className = "gengage-chat-product-card";
2026
2004
  const a = o.props?.product ?? o.props;
2027
2005
  if (!a) return t;
2028
2006
  const n = a.sku;
2029
- n && (t.dataset.sku = n), e.onProductSelect && (t.style.cursor = "pointer", t.addEventListener("click", (v) => {
2030
- v.target.closest(".gengage-chat-product-card-atc") || v.target.closest(".gengage-chat-product-card-cta") || e.onProductSelect?.(a);
2007
+ n && (t.dataset.sku = n), e.onProductSelect && (t.style.cursor = "pointer", t.addEventListener("click", (w) => {
2008
+ w.target.closest(".gengage-chat-product-card-atc") || w.target.closest(".gengage-chat-product-card-cta") || e.onProductSelect?.(a);
2031
2009
  }));
2032
2010
  const i = a.imageUrl;
2033
- if (i && H(i)) {
2034
- const v = document.createElement("div");
2035
- v.className = "gengage-chat-product-card-img-wrapper";
2036
- const h = document.createElement("img");
2037
- h.className = "gengage-chat-product-card-img", h.loading = "lazy", U(h, "src", i);
2038
- const L = a.name;
2039
- L && (h.alt = L), X(h), v.appendChild(h);
2040
- const A = a.discountPercent;
2041
- if (typeof A == "number" && A > 0) {
2042
- const k = document.createElement("span");
2043
- k.className = "gengage-chat-product-card-discount-badge", k.textContent = `%${ce(A)}`, v.appendChild(k);
2011
+ if (i && O(i)) {
2012
+ const w = document.createElement("div");
2013
+ w.className = "gengage-chat-product-card-img-wrapper";
2014
+ const L = document.createElement("img");
2015
+ L.className = "gengage-chat-product-card-img", L.loading = "lazy", U(L, "src", i);
2016
+ const R = a.name;
2017
+ R && (L.alt = R), J(L), w.appendChild(L);
2018
+ const q = a.discountPercent;
2019
+ if (typeof q == "number" && q > 0) {
2020
+ const f = document.createElement("span");
2021
+ f.className = "gengage-chat-product-card-discount-badge", f.textContent = `%${pe(q)}`, w.appendChild(f);
2044
2022
  }
2045
- const u = a.sku;
2046
- if (u) {
2047
- const k = document.createElement("button");
2048
- k.className = "gengage-chat-find-similar-pill", k.type = "button", k.textContent = e.i18n?.findSimilarLabel ?? "Find Similar", k.addEventListener("click", (P) => {
2049
- P.stopPropagation(), e.onAction({
2023
+ const p = a.sku;
2024
+ if (p) {
2025
+ const f = document.createElement("button");
2026
+ f.className = "gengage-chat-find-similar-pill", f.type = "button", f.textContent = e.i18n?.findSimilarLabel ?? "Find Similar", f.addEventListener("click", (k) => {
2027
+ k.stopPropagation(), e.onAction({
2050
2028
  title: e.i18n?.findSimilarLabel ?? "Find Similar",
2051
2029
  type: "findSimilar",
2052
- payload: { sku: u, ...i ? { image_url: i } : {} }
2030
+ payload: { sku: p, ...i ? { image_url: i } : {} }
2053
2031
  });
2054
- }), v.appendChild(k);
2032
+ }), w.appendChild(f);
2055
2033
  }
2056
2034
  const b = a.sku;
2057
2035
  if (b && e.onFavoriteToggle) {
2058
- const k = document.createElement("button");
2059
- k.className = "gengage-chat-favorite-btn", k.type = "button", k.setAttribute("aria-label", e.i18n?.addToFavoritesLabel ?? "Add to favorites");
2060
- const P = e.favoritedSkus?.has(b) ?? !1;
2061
- P && k.classList.add("gengage-chat-favorite-btn--active");
2062
- const z = P ? "currentColor" : "none";
2063
- k.innerHTML = `<svg width="16" height="16" viewBox="0 0 24 24" fill="${z}" stroke="currentColor" stroke-width="2"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/></svg>`, k.addEventListener("click", (T) => {
2064
- T.stopPropagation(), k.classList.toggle("gengage-chat-favorite-btn--active");
2065
- const N = k.querySelector("svg");
2066
- N && N.setAttribute(
2036
+ const f = document.createElement("button");
2037
+ f.className = "gengage-chat-favorite-btn", f.type = "button", f.setAttribute("aria-label", e.i18n?.addToFavoritesLabel ?? "Add to favorites");
2038
+ const k = e.favoritedSkus?.has(b) ?? !1;
2039
+ k && f.classList.add("gengage-chat-favorite-btn--active");
2040
+ const T = k ? "currentColor" : "none";
2041
+ f.innerHTML = `<svg width="16" height="16" viewBox="0 0 24 24" fill="${T}" stroke="currentColor" stroke-width="2"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/></svg>`, f.addEventListener("click", (I) => {
2042
+ I.stopPropagation(), f.classList.toggle("gengage-chat-favorite-btn--active");
2043
+ const z = f.querySelector("svg");
2044
+ z && z.setAttribute(
2067
2045
  "fill",
2068
- k.classList.contains("gengage-chat-favorite-btn--active") ? "currentColor" : "none"
2046
+ f.classList.contains("gengage-chat-favorite-btn--active") ? "currentColor" : "none"
2069
2047
  ), e.onFavoriteToggle(b, a);
2070
- }), v.appendChild(k);
2048
+ }), w.appendChild(f);
2071
2049
  }
2072
- t.appendChild(v);
2050
+ t.appendChild(w);
2073
2051
  }
2074
2052
  const s = document.createElement("div");
2075
2053
  s.className = "gengage-chat-product-card-body";
2076
2054
  const l = a.brand;
2077
2055
  if (l) {
2078
- const v = document.createElement("div");
2079
- v.className = "gengage-chat-product-card-brand", v.textContent = l, s.appendChild(v);
2056
+ const w = document.createElement("div");
2057
+ w.className = "gengage-chat-product-card-brand", w.textContent = l, s.appendChild(w);
2080
2058
  }
2081
- const r = a.name;
2082
- if (r) {
2083
- const v = document.createElement("div");
2084
- v.className = "gengage-chat-product-card-name", v.textContent = r, s.appendChild(v);
2059
+ const d = a.name;
2060
+ if (d) {
2061
+ const w = document.createElement("div");
2062
+ w.className = "gengage-chat-product-card-name", w.textContent = d, s.appendChild(w);
2085
2063
  }
2086
2064
  const c = a.rating, g = a.reviewCount;
2087
2065
  if (typeof c == "number" && Number.isFinite(c)) {
2088
- const v = document.createElement("div");
2089
- if (v.className = "gengage-chat-product-card-rating", v.textContent = ye(c), typeof g == "number" && Number.isFinite(g)) {
2090
- const h = document.createElement("span");
2091
- h.className = "gengage-chat-product-card-review-count", h.textContent = ` (${g})`, v.appendChild(h);
2066
+ const w = document.createElement("div");
2067
+ if (w.className = "gengage-chat-product-card-rating", w.appendChild(Te(c)), typeof g == "number" && Number.isFinite(g)) {
2068
+ const L = document.createElement("span");
2069
+ L.className = "gengage-chat-product-card-review-count", L.textContent = ` (${g})`, w.appendChild(L);
2092
2070
  }
2093
- s.appendChild(v);
2071
+ s.appendChild(w);
2094
2072
  }
2095
- const d = a.price, m = a.originalPrice;
2073
+ const r = a.price, m = a.originalPrice;
2096
2074
  if (a.price_async === !0) {
2097
- const v = document.createElement("div");
2098
- v.className = "gengage-chat-product-card-price";
2099
- const h = document.createElement("span");
2100
- h.className = "gengage-chat-price-skeleton", v.appendChild(h), s.appendChild(v), setTimeout(() => {
2101
- h.parentElement && (d ? h.replaceWith(document.createTextNode(q(d, e.pricing))) : h.remove());
2075
+ const w = document.createElement("div");
2076
+ w.className = "gengage-chat-product-card-price";
2077
+ const L = document.createElement("span");
2078
+ L.className = "gengage-chat-price-skeleton", w.appendChild(L), s.appendChild(w), setTimeout(() => {
2079
+ L.parentElement && (r ? L.replaceWith(document.createTextNode(H(r, e.pricing))) : L.remove());
2102
2080
  }, 300);
2103
- } else if (d) {
2104
- const v = document.createElement("div");
2105
- if (v.className = "gengage-chat-product-card-price", m && m !== d) {
2106
- const L = document.createElement("span");
2107
- L.className = "gengage-chat-product-card-original-price", L.textContent = q(m, e.pricing), v.appendChild(L), v.appendChild(document.createTextNode(" "));
2081
+ } else if (r) {
2082
+ const w = document.createElement("div");
2083
+ if (w.className = "gengage-chat-product-card-price", m && m !== r) {
2084
+ const R = document.createElement("span");
2085
+ R.className = "gengage-chat-product-card-original-price", R.textContent = H(m, e.pricing), w.appendChild(R), w.appendChild(document.createTextNode(" "));
2108
2086
  }
2109
- const h = document.createElement("span");
2110
- h.textContent = q(d, e.pricing), v.appendChild(h), s.appendChild(v);
2087
+ const L = document.createElement("span");
2088
+ L.textContent = H(r, e.pricing), w.appendChild(L), s.appendChild(w);
2111
2089
  }
2112
2090
  const y = a.inStock;
2113
2091
  if (typeof y == "boolean") {
2114
- const v = document.createElement("div");
2115
- v.className = `gengage-chat-product-card-stock ${y ? "is-in-stock" : "is-out-of-stock"}`, v.textContent = y ? e.i18n?.inStockLabel ?? "In Stock" : e.i18n?.outOfStockLabel ?? "Out of Stock", s.appendChild(v);
2092
+ const w = document.createElement("div");
2093
+ w.className = `gengage-chat-product-card-stock ${y ? "is-in-stock" : "is-out-of-stock"}`, w.textContent = y ? e.i18n?.inStockLabel ?? "In Stock" : e.i18n?.outOfStockLabel ?? "Out of Stock", s.appendChild(w);
2116
2094
  }
2117
2095
  const _ = a.promotions;
2118
2096
  if (_ && _.length > 0) {
2119
- const v = document.createElement("div");
2120
- v.className = "gengage-chat-product-card-promos";
2121
- for (const h of _) {
2122
- const L = document.createElement("span");
2123
- L.className = "gengage-chat-product-card-promo-badge", L.textContent = h, v.appendChild(L);
2097
+ const w = document.createElement("div");
2098
+ w.className = "gengage-chat-product-card-promos";
2099
+ for (const L of _) {
2100
+ const R = document.createElement("span");
2101
+ R.className = "gengage-chat-product-card-promo-badge", R.textContent = L, w.appendChild(R);
2124
2102
  }
2125
- s.appendChild(v);
2103
+ s.appendChild(w);
2126
2104
  }
2127
2105
  t.appendChild(s);
2128
- const x = a.url, E = a.sku, I = o.props?.action;
2129
- if (I) {
2130
- const v = document.createElement("button");
2131
- v.className = "gengage-chat-product-card-cta", v.type = "button", v.textContent = I.title || e.i18n?.productCtaLabel || "View", v.addEventListener("click", () => e.onAction(I)), t.appendChild(v);
2132
- } else if (x && H(x)) {
2133
- const v = document.createElement("a");
2134
- v.className = "gengage-chat-product-card-cta", U(v, "href", x), U(v, "target", "_blank"), U(v, "rel", "noopener noreferrer"), v.textContent = e.i18n?.productCtaLabel ?? "View", v.addEventListener("click", (h) => {
2135
- e.onProductClick && E && (h.preventDefault(), e.onProductClick({ sku: E, url: x }));
2136
- }), t.appendChild(v);
2106
+ const v = a.url, C = a.sku, E = o.props?.action;
2107
+ if (E) {
2108
+ const w = document.createElement("button");
2109
+ w.className = "gengage-chat-product-card-cta", w.type = "button", w.textContent = E.title || e.i18n?.productCtaLabel || "View", w.addEventListener("click", () => e.onAction(E)), t.appendChild(w);
2110
+ } else if (v && O(v)) {
2111
+ const w = document.createElement("a");
2112
+ w.className = "gengage-chat-product-card-cta", U(w, "href", v), U(w, "target", "_blank"), U(w, "rel", "noopener noreferrer"), w.textContent = e.i18n?.productCtaLabel ?? "View", w.addEventListener("click", (L) => {
2113
+ e.onProductClick && C && (L.preventDefault(), e.onProductClick({ sku: C, url: v }));
2114
+ }), t.appendChild(w);
2137
2115
  }
2138
2116
  const S = a.cartCode;
2139
- if (S && E && y !== !1) {
2140
- const v = ke({
2117
+ if (S && C && y !== !1) {
2118
+ const w = Le({
2141
2119
  compact: !0,
2142
2120
  label: e.i18n?.addToCartButton ?? "Add to Cart",
2143
2121
  decreaseLabel: e.i18n?.decreaseLabel,
2144
2122
  increaseLabel: e.i18n?.increaseLabel,
2145
- onSubmit: (h) => {
2123
+ onSubmit: (L) => {
2146
2124
  e.onAction({
2147
2125
  title: e.i18n?.addToCartButton ?? "Add to Cart",
2148
2126
  type: "addToCart",
2149
- payload: { sku: E, cartCode: S, quantity: h }
2127
+ payload: { sku: C, cartCode: S, quantity: L }
2150
2128
  });
2151
2129
  }
2152
2130
  });
2153
- v.classList.add("gengage-chat-product-card-atc"), t.appendChild(v);
2131
+ w.classList.add("gengage-chat-product-card-atc"), t.appendChild(w);
2154
2132
  }
2155
- if (e.comparisonSelectMode && E && e.onToggleComparisonSku) {
2156
- const v = document.createElement("div");
2157
- v.className = "gengage-chat-comparison-select-wrapper";
2158
- const h = document.createElement("input");
2159
- return h.type = "checkbox", h.className = "gengage-chat-comparison-checkbox", h.checked = e.comparisonSelectedSkus?.includes(E) ?? !1, h.addEventListener("change", () => {
2160
- e.onToggleComparisonSku?.(E);
2161
- }), v.appendChild(h), v.appendChild(t), v;
2133
+ if (e.comparisonSelectMode && C && e.onToggleComparisonSku) {
2134
+ const w = document.createElement("div");
2135
+ w.className = "gengage-chat-comparison-select-wrapper";
2136
+ const L = document.createElement("input");
2137
+ return L.type = "checkbox", L.className = "gengage-chat-comparison-checkbox", L.checked = e.comparisonSelectedSkus?.includes(C) ?? !1, L.addEventListener("change", () => {
2138
+ e.onToggleComparisonSku?.(C);
2139
+ }), w.appendChild(L), w.appendChild(t), w;
2162
2140
  }
2163
2141
  return t;
2164
2142
  }
2165
- function ha(o, e) {
2143
+ function va(o, e) {
2166
2144
  const t = document.createElement("article");
2167
2145
  t.className = "gengage-chat-product-details-panel";
2168
2146
  const a = o.props?.product ?? o.props;
2169
2147
  if (!a) return t;
2170
2148
  const n = a.images, i = a.imageUrl, s = a.sku;
2171
2149
  if (n && n.length > 1) {
2172
- const u = document.createElement("div");
2173
- u.className = "gengage-chat-product-details-media gengage-chat-product-details-gallery gengage-chat-product-details-img-wrap";
2150
+ const p = document.createElement("div");
2151
+ p.className = "gengage-chat-product-details-media gengage-chat-product-details-gallery gengage-chat-product-details-img-wrap";
2174
2152
  const b = document.createElement("img");
2175
2153
  b.className = "gengage-chat-product-details-img";
2176
- const k = n.find((M) => H(M));
2177
- k && U(b, "src", k);
2178
- const P = a.name;
2179
- P && (b.alt = P), X(b), u.appendChild(b);
2180
- const z = document.createElement("div");
2181
- z.className = "gengage-chat-product-gallery-thumbs";
2182
- let T = null, N = 0;
2183
- for (let M = 0; M < n.length; M++) {
2184
- const F = n[M];
2185
- if (!F || !H(F)) continue;
2186
- const R = document.createElement("img");
2187
- R.className = "gengage-chat-product-gallery-thumb", M === 0 && (R.classList.add("gengage-chat-product-gallery-thumb--active"), T = R), U(R, "src", F), R.alt = `${P ?? "Product"} ${M + 1}`, R.width = 48, R.height = 48, X(R), R.addEventListener("click", () => {
2188
- U(b, "src", F), T && T.classList.remove("gengage-chat-product-gallery-thumb--active"), R.classList.add("gengage-chat-product-gallery-thumb--active"), T = R, N = M;
2189
- }), z.appendChild(R);
2154
+ const f = n.find((A) => O(A));
2155
+ f && U(b, "src", f);
2156
+ const k = a.name;
2157
+ k && (b.alt = k), J(b), p.appendChild(b);
2158
+ const T = document.createElement("div");
2159
+ T.className = "gengage-chat-product-gallery-thumbs";
2160
+ let I = null, z = 0;
2161
+ for (let A = 0; A < n.length; A++) {
2162
+ const M = n[A];
2163
+ if (!M || !O(M)) continue;
2164
+ const u = document.createElement("img");
2165
+ u.className = "gengage-chat-product-gallery-thumb", A === 0 && (u.classList.add("gengage-chat-product-gallery-thumb--active"), I = u), U(u, "src", M), u.alt = `${k ?? "Product"} ${A + 1}`, u.width = 48, u.height = 48, J(u), u.addEventListener("click", () => {
2166
+ U(b, "src", M), I && I.classList.remove("gengage-chat-product-gallery-thumb--active"), u.classList.add("gengage-chat-product-gallery-thumb--active"), I = u, z = A;
2167
+ }), T.appendChild(u);
2190
2168
  }
2191
- let f = 0;
2192
- const C = 50;
2169
+ let D = 0;
2170
+ const N = 50;
2193
2171
  if (b.addEventListener(
2194
2172
  "touchstart",
2195
- (M) => {
2196
- f = M.changedTouches[0].clientX;
2173
+ (A) => {
2174
+ D = A.changedTouches[0].clientX;
2197
2175
  },
2198
2176
  { passive: !0 }
2199
- ), b.addEventListener("touchend", (M) => {
2200
- const F = M.changedTouches[0].clientX, R = f - F;
2201
- if (Math.abs(R) < C) return;
2202
- const ae = z.querySelectorAll(".gengage-chat-product-gallery-thumb"), ne = R > 0 ? Math.min(N + 1, ae.length - 1) : Math.max(N - 1, 0);
2203
- ne !== N && ae[ne] && ae[ne].click();
2204
- }), u.appendChild(z), s) {
2205
- const M = document.createElement("button");
2206
- M.className = "gengage-chat-find-similar-pill", M.type = "button", M.textContent = e.i18n?.findSimilarLabel ?? "Find Similar", M.addEventListener("click", () => {
2177
+ ), b.addEventListener("touchend", (A) => {
2178
+ const M = A.changedTouches[0].clientX, u = D - M;
2179
+ if (Math.abs(u) < N) return;
2180
+ const P = T.querySelectorAll(".gengage-chat-product-gallery-thumb"), Y = u > 0 ? Math.min(z + 1, P.length - 1) : Math.max(z - 1, 0);
2181
+ Y !== z && P[Y] && P[Y].click();
2182
+ }), p.appendChild(T), s) {
2183
+ const A = document.createElement("button");
2184
+ A.className = "gengage-chat-find-similar-pill", A.type = "button", A.textContent = e.i18n?.findSimilarLabel ?? "Find Similar", A.addEventListener("click", () => {
2207
2185
  e.onAction({
2208
2186
  title: e.i18n?.findSimilarLabel ?? "Find Similar",
2209
2187
  type: "findSimilar",
2210
- payload: { sku: s, ...k ? { image_url: k } : {} }
2188
+ payload: { sku: s, ...f ? { image_url: f } : {} }
2211
2189
  });
2212
- }), u.appendChild(M);
2190
+ }), p.appendChild(A);
2213
2191
  }
2214
- t.appendChild(u);
2215
- } else if (i && H(i)) {
2216
- const u = document.createElement("div");
2217
- u.className = "gengage-chat-product-details-media gengage-chat-product-details-img-wrap";
2192
+ t.appendChild(p);
2193
+ } else if (i && O(i)) {
2194
+ const p = document.createElement("div");
2195
+ p.className = "gengage-chat-product-details-media gengage-chat-product-details-img-wrap";
2218
2196
  const b = document.createElement("img");
2219
- b.className = "gengage-chat-product-details-img", b.loading = "lazy", U(b, "src", i), X(b);
2220
- const k = a.name;
2221
- if (k && (b.alt = k), u.appendChild(b), s) {
2222
- const P = document.createElement("button");
2223
- P.className = "gengage-chat-find-similar-pill", P.type = "button", P.textContent = e.i18n?.findSimilarLabel ?? "Find Similar", P.addEventListener("click", () => {
2197
+ b.className = "gengage-chat-product-details-img", b.loading = "lazy", U(b, "src", i), J(b);
2198
+ const f = a.name;
2199
+ if (f && (b.alt = f), p.appendChild(b), s) {
2200
+ const k = document.createElement("button");
2201
+ k.className = "gengage-chat-find-similar-pill", k.type = "button", k.textContent = e.i18n?.findSimilarLabel ?? "Find Similar", k.addEventListener("click", () => {
2224
2202
  e.onAction({
2225
2203
  title: e.i18n?.findSimilarLabel ?? "Find Similar",
2226
2204
  type: "findSimilar",
2227
2205
  payload: { sku: s, ...i ? { image_url: i } : {} }
2228
2206
  });
2229
- }), u.appendChild(P);
2207
+ }), p.appendChild(k);
2230
2208
  }
2231
- t.appendChild(u);
2209
+ t.appendChild(p);
2232
2210
  }
2233
2211
  const l = document.createElement("div");
2234
2212
  l.className = "gengage-chat-product-details-content";
2235
- const r = a.name;
2236
- if (r) {
2237
- const u = document.createElement("h3");
2238
- u.className = "gengage-chat-product-details-title", u.textContent = r, l.appendChild(u);
2213
+ const d = a.name;
2214
+ if (d) {
2215
+ const p = document.createElement("h3");
2216
+ p.className = "gengage-chat-product-details-title", p.textContent = d, l.appendChild(p);
2239
2217
  }
2240
2218
  const c = a.rating, g = a.reviewCount;
2241
2219
  if (typeof c == "number" && Number.isFinite(c)) {
2242
- const u = document.createElement("div");
2243
- if (u.className = "gengage-chat-product-details-rating", u.textContent = `★ ${_e(c).toFixed(1)}`, typeof g == "number" && Number.isFinite(g)) {
2220
+ const p = document.createElement("div");
2221
+ if (p.className = "gengage-chat-product-details-rating", p.textContent = `★ ${bt(c).toFixed(1)}`, typeof g == "number" && Number.isFinite(g)) {
2244
2222
  const b = document.createElement("span");
2245
- b.className = "gengage-chat-product-details-review-count", b.textContent = ` (${g})`, u.appendChild(b);
2223
+ b.className = "gengage-chat-product-details-review-count", b.textContent = ` (${g})`, p.appendChild(b);
2246
2224
  }
2247
- l.appendChild(u);
2225
+ l.appendChild(p);
2248
2226
  }
2249
- const d = a.price, m = a.originalPrice;
2227
+ const r = a.price, m = a.originalPrice;
2250
2228
  if (a.price_async === !0) {
2251
- const u = document.createElement("div");
2252
- u.className = "gengage-chat-product-details-price";
2229
+ const p = document.createElement("div");
2230
+ p.className = "gengage-chat-product-details-price";
2253
2231
  const b = document.createElement("span");
2254
- b.className = "gengage-chat-price-skeleton", u.appendChild(b), l.appendChild(u), setTimeout(() => {
2232
+ b.className = "gengage-chat-price-skeleton", p.appendChild(b), l.appendChild(p), setTimeout(() => {
2255
2233
  if (b.parentElement)
2256
- if (d) {
2257
- const k = document.createElement("span");
2258
- k.className = "gengage-chat-product-details-current-price", k.textContent = q(d, e.pricing), b.replaceWith(k);
2234
+ if (r) {
2235
+ const f = document.createElement("span");
2236
+ f.className = "gengage-chat-product-details-current-price", f.textContent = H(r, e.pricing), b.replaceWith(f);
2259
2237
  } else
2260
2238
  b.remove();
2261
2239
  }, 300);
2262
- } else if (d) {
2263
- const u = document.createElement("div");
2264
- if (u.className = "gengage-chat-product-details-price", m && m !== d) {
2265
- const k = document.createElement("span");
2266
- k.className = "gengage-chat-product-details-original-price", k.textContent = q(m, e.pricing), u.appendChild(k), u.appendChild(document.createTextNode(" "));
2240
+ } else if (r) {
2241
+ const p = document.createElement("div");
2242
+ if (p.className = "gengage-chat-product-details-price", m && m !== r) {
2243
+ const f = document.createElement("span");
2244
+ f.className = "gengage-chat-product-details-original-price", f.textContent = H(m, e.pricing), p.appendChild(f), p.appendChild(document.createTextNode(" "));
2267
2245
  }
2268
2246
  const b = document.createElement("span");
2269
- b.className = "gengage-chat-product-details-current-price", b.textContent = q(d, e.pricing), u.appendChild(b), l.appendChild(u);
2247
+ b.className = "gengage-chat-product-details-current-price", b.textContent = H(r, e.pricing), p.appendChild(b), l.appendChild(p);
2270
2248
  }
2271
2249
  const y = a.inStock;
2272
2250
  if (typeof y == "boolean") {
2273
- const u = document.createElement("div");
2274
- u.className = `gengage-chat-product-details-stock ${y ? "is-in-stock" : "is-out-of-stock"}`, u.textContent = y ? e.i18n?.inStockLabel ?? "In Stock" : e.i18n?.outOfStockLabel ?? "Out of Stock", l.appendChild(u);
2251
+ const p = document.createElement("div");
2252
+ p.className = `gengage-chat-product-details-stock ${y ? "is-in-stock" : "is-out-of-stock"}`, p.textContent = y ? e.i18n?.inStockLabel ?? "In Stock" : e.i18n?.outOfStockLabel ?? "Out of Stock", l.appendChild(p);
2275
2253
  }
2276
2254
  const _ = a.promotions;
2277
2255
  if (_ && _.length > 0) {
2278
- const u = document.createElement("div");
2279
- u.className = "gengage-chat-product-details-promos";
2256
+ const p = document.createElement("div");
2257
+ p.className = "gengage-chat-product-details-promos";
2280
2258
  for (const b of _) {
2281
- const k = document.createElement("span");
2282
- k.className = "gengage-chat-product-details-promo-badge", k.textContent = b, u.appendChild(k);
2259
+ const f = document.createElement("span");
2260
+ f.className = "gengage-chat-product-details-promo-badge", f.textContent = b, p.appendChild(f);
2283
2261
  }
2284
- l.appendChild(u);
2262
+ l.appendChild(p);
2285
2263
  }
2286
- const x = a.variants;
2287
- if (x && x.length > 0) {
2288
- const u = document.createElement("div");
2289
- u.className = "gengage-chat-product-variants";
2264
+ const v = a.variants;
2265
+ if (v && v.length > 0) {
2266
+ const p = document.createElement("div");
2267
+ p.className = "gengage-chat-product-variants";
2290
2268
  const b = document.createElement("div");
2291
- b.className = "gengage-chat-product-variants-label", b.textContent = e.i18n?.variantsLabel ?? "Variants", u.appendChild(b);
2292
- const k = document.createElement("div");
2293
- k.className = "gengage-chat-product-variants-list";
2294
- for (const P of x) {
2295
- const z = P.name ?? P.variant_name, T = P.sku;
2296
- if (!z && !T) continue;
2297
- const N = document.createElement("button");
2298
- N.className = "gengage-chat-product-variant-btn", N.type = "button";
2299
- const f = z ?? T ?? "", C = P.price;
2300
- C && String(C) !== String(d) ? N.textContent = `${f} - ${q(String(C), e.pricing)}` : N.textContent = f, T && N.addEventListener("click", () => {
2269
+ b.className = "gengage-chat-product-variants-label", b.textContent = e.i18n?.variantsLabel ?? "Variants", p.appendChild(b);
2270
+ const f = document.createElement("div");
2271
+ f.className = "gengage-chat-product-variants-list";
2272
+ for (const k of v) {
2273
+ const T = k.name ?? k.variant_name, I = k.sku;
2274
+ if (!T && !I) continue;
2275
+ const z = document.createElement("button");
2276
+ z.className = "gengage-chat-product-variant-btn", z.type = "button";
2277
+ const D = T ?? I ?? "", N = k.price;
2278
+ N && String(N) !== String(r) ? z.textContent = `${D} - ${H(String(N), e.pricing)}` : z.textContent = D, I && z.addEventListener("click", () => {
2301
2279
  e.onAction({
2302
- title: f,
2280
+ title: D,
2303
2281
  type: "launchVariant",
2304
- payload: { sku: T }
2282
+ payload: { sku: I }
2305
2283
  });
2306
- }), k.appendChild(N);
2284
+ }), f.appendChild(z);
2307
2285
  }
2308
- u.appendChild(k), l.appendChild(u);
2286
+ p.appendChild(f), l.appendChild(p);
2309
2287
  }
2310
- const E = a.sku, I = a.cartCode, S = document.createElement("div");
2288
+ const C = a.sku, E = a.cartCode, S = document.createElement("div");
2311
2289
  S.className = "gengage-chat-product-details-actions";
2312
- const v = o.props?.action;
2313
- if (v) {
2314
- const u = document.createElement("button");
2315
- u.className = "gengage-chat-product-details-cta", u.type = "button", u.textContent = v.title || e.i18n?.productCtaLabel || "View", u.addEventListener("click", () => e.onAction(v)), S.appendChild(u);
2290
+ const w = o.props?.action;
2291
+ if (w) {
2292
+ const p = document.createElement("button");
2293
+ p.className = "gengage-chat-product-details-cta", p.type = "button", p.textContent = w.title || e.i18n?.productCtaLabel || "View", p.addEventListener("click", () => e.onAction(w)), S.appendChild(p);
2316
2294
  } else {
2317
- const u = a.url;
2318
- if (u && H(u)) {
2295
+ const p = a.url;
2296
+ if (p && O(p)) {
2319
2297
  const b = document.createElement("a");
2320
- b.className = "gengage-chat-product-details-cta", U(b, "href", u), U(b, "target", "_blank"), U(b, "rel", "noopener noreferrer"), b.textContent = e.i18n?.productCtaLabel ?? "View", b.addEventListener("click", (k) => {
2321
- e.onProductClick && E && (k.preventDefault(), e.onProductClick({ sku: E, url: u }));
2298
+ b.className = "gengage-chat-product-details-cta", U(b, "href", p), U(b, "target", "_blank"), U(b, "rel", "noopener noreferrer"), b.textContent = e.i18n?.productCtaLabel ?? "View", b.addEventListener("click", (f) => {
2299
+ e.onProductClick && C && (f.preventDefault(), e.onProductClick({ sku: C, url: p }));
2322
2300
  }), S.appendChild(b);
2323
2301
  }
2324
2302
  }
2325
- if (I && E && y !== !1) {
2326
- const u = ke({
2303
+ if (E && C && y !== !1) {
2304
+ const p = Le({
2327
2305
  compact: !1,
2328
2306
  label: e.i18n?.addToCartButton ?? "Add to Cart",
2329
2307
  decreaseLabel: e.i18n?.decreaseLabel,
@@ -2332,39 +2310,39 @@ function ha(o, e) {
2332
2310
  e.onAction({
2333
2311
  title: e.i18n?.addToCartButton ?? "Add to Cart",
2334
2312
  type: "addToCart",
2335
- payload: { sku: E, cartCode: I, quantity: b }
2313
+ payload: { sku: C, cartCode: E, quantity: b }
2336
2314
  });
2337
2315
  }
2338
2316
  });
2339
- u.classList.add("gengage-chat-product-details-atc-stepper"), S.appendChild(u);
2340
- }
2341
- const h = a.url;
2342
- if (h && H(h)) {
2343
- let u = function(N, f) {
2344
- const C = document.createElementNS(z, "circle");
2345
- C.setAttribute("cx", N), C.setAttribute("cy", f), C.setAttribute("r", "3"), T.appendChild(C);
2346
- }, b = function(N, f, C, M) {
2347
- const F = document.createElementNS(z, "line");
2348
- F.setAttribute("x1", N), F.setAttribute("y1", f), F.setAttribute("x2", C), F.setAttribute("y2", M), T.appendChild(F);
2317
+ p.classList.add("gengage-chat-product-details-atc-stepper"), S.appendChild(p);
2318
+ }
2319
+ const L = a.url;
2320
+ if (L && O(L)) {
2321
+ let p = function(z, D) {
2322
+ const N = document.createElementNS(T, "circle");
2323
+ N.setAttribute("cx", z), N.setAttribute("cy", D), N.setAttribute("r", "3"), I.appendChild(N);
2324
+ }, b = function(z, D, N, A) {
2325
+ const M = document.createElementNS(T, "line");
2326
+ M.setAttribute("x1", z), M.setAttribute("y1", D), M.setAttribute("x2", N), M.setAttribute("y2", A), I.appendChild(M);
2349
2327
  };
2350
- const k = document.createElement("button");
2351
- k.className = "gengage-chat-product-details-share", k.type = "button";
2352
- const P = e.i18n?.shareButton ?? "Share";
2353
- k.title = P, k.setAttribute("aria-label", P);
2354
- const z = "http://www.w3.org/2000/svg", T = document.createElementNS(z, "svg");
2355
- T.setAttribute("width", "18"), T.setAttribute("height", "18"), T.setAttribute("viewBox", "0 0 24 24"), T.setAttribute("fill", "none"), T.setAttribute("stroke", "currentColor"), T.setAttribute("stroke-width", "2"), T.setAttribute("stroke-linecap", "round"), T.setAttribute("stroke-linejoin", "round"), u("18", "5"), u("6", "12"), u("18", "19"), b("8.59", "13.51", "15.42", "17.49"), b("15.41", "6.51", "8.59", "10.49"), k.appendChild(T), k.addEventListener("click", async () => {
2356
- const N = a.name;
2328
+ const f = document.createElement("button");
2329
+ f.className = "gengage-chat-product-details-share", f.type = "button";
2330
+ const k = e.i18n?.shareButton ?? "Share";
2331
+ f.title = k, f.setAttribute("aria-label", k);
2332
+ const T = "http://www.w3.org/2000/svg", I = document.createElementNS(T, "svg");
2333
+ I.setAttribute("width", "18"), I.setAttribute("height", "18"), I.setAttribute("viewBox", "0 0 24 24"), I.setAttribute("fill", "none"), I.setAttribute("stroke", "currentColor"), I.setAttribute("stroke-width", "2"), I.setAttribute("stroke-linecap", "round"), I.setAttribute("stroke-linejoin", "round"), p("18", "5"), p("6", "12"), p("18", "19"), b("8.59", "13.51", "15.42", "17.49"), b("15.41", "6.51", "8.59", "10.49"), f.appendChild(I), f.addEventListener("click", async () => {
2334
+ const z = a.name;
2357
2335
  try {
2358
- navigator.share ? await navigator.share({ title: N ?? "", url: h }) : navigator.clipboard && (await navigator.clipboard.writeText(h), k.classList.add("gengage-chat-product-details-share--copied"), setTimeout(() => k.classList.remove("gengage-chat-product-details-share--copied"), 1500));
2336
+ navigator.share ? await navigator.share({ title: z ?? "", url: L }) : navigator.clipboard && (await navigator.clipboard.writeText(L), f.classList.add("gengage-chat-product-details-share--copied"), setTimeout(() => f.classList.remove("gengage-chat-product-details-share--copied"), 1500));
2359
2337
  } catch {
2360
2338
  }
2361
- }), S.appendChild(k);
2339
+ }), S.appendChild(f);
2362
2340
  }
2363
2341
  S.childElementCount > 0 && l.appendChild(S), t.appendChild(l);
2364
- const L = a.description, A = a.specifications;
2365
- return (L || A) && t.appendChild(ua(L, A, e)), t;
2342
+ const R = a.description, q = a.specifications;
2343
+ return (R || q) && t.appendChild(wa(R, q, e)), t;
2366
2344
  }
2367
- function ua(o, e, t) {
2345
+ function wa(o, e, t) {
2368
2346
  const a = document.createElement("div");
2369
2347
  a.className = "gengage-chat-product-detail-tabs";
2370
2348
  const n = document.createElement("div");
@@ -2373,37 +2351,37 @@ function ua(o, e, t) {
2373
2351
  if (o) {
2374
2352
  const l = document.createElement("button");
2375
2353
  l.className = "gengage-chat-product-detail-tab gengage-chat-product-detail-tab--active", l.type = "button", l.textContent = t.i18n?.productInfoTab ?? "Product Info", n.appendChild(l);
2376
- const r = document.createElement("div");
2377
- r.className = "gengage-chat-product-detail-tab-panel", r.textContent = o, i.push(r);
2354
+ const d = document.createElement("div");
2355
+ d.className = "gengage-chat-product-detail-tab-panel", d.textContent = o, i.push(d);
2378
2356
  }
2379
2357
  if (e) {
2380
2358
  const l = document.createElement("button");
2381
2359
  l.className = `gengage-chat-product-detail-tab${o ? "" : " gengage-chat-product-detail-tab--active"}`, l.type = "button", l.textContent = t.i18n?.specificationsTab ?? "Specifications", n.appendChild(l);
2382
- const r = document.createElement("div");
2383
- r.className = "gengage-chat-product-detail-tab-panel", o && (r.style.display = "none");
2360
+ const d = document.createElement("div");
2361
+ d.className = "gengage-chat-product-detail-tab-panel", o && (d.style.display = "none");
2384
2362
  const c = document.createElement("table");
2385
2363
  c.className = "gengage-chat-product-specs-table";
2386
- const g = Array.isArray(e) ? e : Object.entries(e).map(([d, m]) => ({ key: d, value: m }));
2387
- for (const d of g) {
2388
- const m = document.createElement("tr"), p = document.createElement("td");
2389
- p.className = "gengage-chat-product-specs-key", p.textContent = d.key;
2364
+ const g = Array.isArray(e) ? e : Object.entries(e).map(([r, m]) => ({ key: r, value: m }));
2365
+ for (const r of g) {
2366
+ const m = document.createElement("tr"), h = document.createElement("td");
2367
+ h.className = "gengage-chat-product-specs-key", h.textContent = r.key;
2390
2368
  const y = document.createElement("td");
2391
- y.className = "gengage-chat-product-specs-value", y.textContent = d.value, m.appendChild(p), m.appendChild(y), c.appendChild(m);
2369
+ y.className = "gengage-chat-product-specs-value", y.textContent = r.value, m.appendChild(h), m.appendChild(y), c.appendChild(m);
2392
2370
  }
2393
- r.appendChild(c), i.push(r);
2371
+ d.appendChild(c), i.push(d);
2394
2372
  }
2395
2373
  const s = n.querySelectorAll(".gengage-chat-product-detail-tab");
2396
- s.forEach((l, r) => {
2374
+ s.forEach((l, d) => {
2397
2375
  l.addEventListener("click", () => {
2398
2376
  s.forEach((c) => c.classList.remove("gengage-chat-product-detail-tab--active")), l.classList.add("gengage-chat-product-detail-tab--active"), i.forEach((c, g) => {
2399
- c.style.display = g === r ? "" : "none";
2377
+ c.style.display = g === d ? "" : "none";
2400
2378
  });
2401
2379
  });
2402
2380
  }), a.appendChild(n);
2403
2381
  for (const l of i) a.appendChild(l);
2404
2382
  return a;
2405
2383
  }
2406
- function Pe(o, e, t) {
2384
+ function De(o, e, t) {
2407
2385
  if (!t || t.type === "related") return o;
2408
2386
  const a = o.map((n) => {
2409
2387
  const s = e.elements[n]?.props?.product, l = s ? Number(s.price) : NaN;
@@ -2411,8 +2389,8 @@ function Pe(o, e, t) {
2411
2389
  });
2412
2390
  return a.sort((n, i) => n.price === 1 / 0 && i.price === 1 / 0 ? 0 : n.price === 1 / 0 ? 1 : i.price === 1 / 0 ? -1 : t.direction === "desc" ? i.price - n.price : n.price - i.price), a.map((n) => n.id);
2413
2391
  }
2414
- function ma(o, e, t, a) {
2415
- const n = Pe(e, t, a), i = /* @__PURE__ */ new Map();
2392
+ function ya(o, e, t, a) {
2393
+ const n = De(e, t, a), i = /* @__PURE__ */ new Map();
2416
2394
  for (const s of Array.from(o.children)) {
2417
2395
  const l = s.dataset.elementId;
2418
2396
  l && i.set(l, s);
@@ -2422,56 +2400,56 @@ function ma(o, e, t, a) {
2422
2400
  l && o.appendChild(l);
2423
2401
  }
2424
2402
  }
2425
- function fa(o, e, t, a) {
2403
+ function _a(o, e, t, a) {
2426
2404
  const n = document.createElement("div");
2427
2405
  n.className = "gengage-chat-product-grid-wrapper";
2428
2406
  const i = o.children ?? [];
2429
2407
  if (i.length > 1 && a?.onSortChange) {
2430
2408
  const c = document.createElement("div");
2431
2409
  c.className = "gengage-chat-product-sort-toolbar";
2432
- const g = a.productSort ?? { type: "related" }, d = [
2410
+ const g = a.productSort ?? { type: "related" }, r = [
2433
2411
  { label: a.i18n?.sortRelated ?? "Related", sortState: { type: "related" } },
2434
2412
  { label: a.i18n?.sortPriceAsc ?? "Price ↑", sortState: { type: "price", direction: "asc" } },
2435
2413
  { label: a.i18n?.sortPriceDesc ?? "Price ↓", sortState: { type: "price", direction: "desc" } }
2436
2414
  ];
2437
- for (const m of d) {
2438
- const p = document.createElement("button");
2439
- p.className = "gengage-chat-product-sort-btn", p.type = "button", g.type === m.sortState.type && g.direction === m.sortState.direction && p.classList.add("gengage-chat-product-sort-btn--active"), p.textContent = m.label, p.addEventListener("click", () => {
2440
- a.onSortChange?.(m.sortState), ma(s, i, e, m.sortState), c.querySelectorAll(".gengage-chat-product-sort-btn").forEach((_) => _.classList.remove("gengage-chat-product-sort-btn--active")), p.classList.add("gengage-chat-product-sort-btn--active");
2441
- }), c.appendChild(p);
2415
+ for (const m of r) {
2416
+ const h = document.createElement("button");
2417
+ h.className = "gengage-chat-product-sort-btn", h.type = "button", g.type === m.sortState.type && g.direction === m.sortState.direction && h.classList.add("gengage-chat-product-sort-btn--active"), h.textContent = m.label, h.addEventListener("click", () => {
2418
+ a.onSortChange?.(m.sortState), ya(s, i, e, m.sortState), c.querySelectorAll(".gengage-chat-product-sort-btn").forEach((_) => _.classList.remove("gengage-chat-product-sort-btn--active")), h.classList.add("gengage-chat-product-sort-btn--active");
2419
+ }), c.appendChild(h);
2442
2420
  }
2443
2421
  if (a.onToggleComparisonSku) {
2444
2422
  const m = document.createElement("div");
2445
2423
  m.className = "gengage-chat-product-sort-separator", c.appendChild(m);
2446
- const p = document.createElement("button");
2447
- p.className = "gengage-chat-comparison-toggle-btn", p.type = "button", a.comparisonSelectMode && p.classList.add("gengage-chat-comparison-toggle-btn--active"), p.textContent = a.i18n?.compareSelected ?? "Compare", p.addEventListener("click", () => {
2424
+ const h = document.createElement("button");
2425
+ h.className = "gengage-chat-comparison-toggle-btn", h.type = "button", a.comparisonSelectMode && h.classList.add("gengage-chat-comparison-toggle-btn--active"), h.textContent = a.i18n?.compareSelected ?? "Compare", h.addEventListener("click", () => {
2448
2426
  a.onToggleComparisonSku?.("");
2449
- }), c.appendChild(p);
2427
+ }), c.appendChild(h);
2450
2428
  }
2451
2429
  n.appendChild(c);
2452
2430
  }
2453
2431
  const s = document.createElement("div");
2454
2432
  s.className = "gengage-chat-product-grid";
2455
- const l = Pe(i, e, a?.productSort);
2433
+ const l = De(i, e, a?.productSort);
2456
2434
  for (const c of l) {
2457
2435
  if (!e.elements[c]) continue;
2458
2436
  const g = t(c);
2459
2437
  g && (g.dataset.elementId = c, s.appendChild(g));
2460
2438
  }
2461
- if (Ie() && s.classList.add("gengage-chat-product-grid--mobile"), n.appendChild(s), o.props?.endOfList !== !0 && i.length > 0) {
2439
+ if (Be() && s.classList.add("gengage-chat-product-grid--mobile"), n.appendChild(s), o.props?.endOfList !== !0 && i.length > 0) {
2462
2440
  const c = document.createElement("button");
2463
2441
  c.className = "gengage-chat-product-grid-view-more", c.type = "button", c.textContent = a?.i18n?.viewMoreLabel ?? "Show More", c.addEventListener("click", () => {
2464
2442
  a?.onAction({ title: "More", type: "moreProductList", payload: {} });
2465
2443
  }), n.appendChild(c);
2466
2444
  }
2467
2445
  if (a?.comparisonSelectMode && a.comparisonSelectedSkus && a.comparisonSelectedSkus.length >= 2) {
2468
- const c = aa(a.comparisonSelectedSkus, a);
2446
+ const c = ca(a.comparisonSelectedSkus, a);
2469
2447
  n.appendChild(c);
2470
2448
  }
2471
2449
  return n;
2472
2450
  }
2473
- function ba(o, e) {
2474
- const t = o.props ?? {}, a = t.keyDifferencesHtml, n = t.recommended, i = t.products ?? [], s = t.attributes ?? [], l = t.highlights ?? [], r = t.specialCases, c = t.recommendedText, g = t.winnerHits, d = t.productActions;
2451
+ function ka(o, e) {
2452
+ const t = o.props ?? {}, a = t.keyDifferencesHtml, n = t.recommended, i = t.products ?? [], s = t.attributes ?? [], l = t.highlights ?? [], d = t.specialCases, c = t.recommendedText, g = t.winnerHits, r = t.productActions;
2475
2453
  if (!n)
2476
2454
  return document.createElement("div");
2477
2455
  const m = {
@@ -2479,13 +2457,13 @@ function ba(o, e) {
2479
2457
  products: i,
2480
2458
  attributes: s,
2481
2459
  highlights: l,
2482
- specialCases: r,
2460
+ specialCases: d,
2483
2461
  onProductClick: (y) => {
2484
2462
  e.onProductClick?.({ sku: y, url: "" });
2485
2463
  },
2486
2464
  pricing: e.pricing
2487
2465
  };
2488
- c !== void 0 && (m.recommendedText = c), g !== void 0 && (m.winnerHits = g), d !== void 0 && (m.productActions = d), a !== void 0 && (m.keyDifferencesHtml = a), e.i18n && (m.i18n = {
2466
+ c !== void 0 && (m.recommendedText = c), g !== void 0 && (m.winnerHits = g), r !== void 0 && (m.productActions = r), a !== void 0 && (m.keyDifferencesHtml = a), e.i18n && (m.i18n = {
2489
2467
  comparisonHeading: e.i18n.panelTitleComparisonResults,
2490
2468
  recommendedChoiceLabel: e.i18n.recommendedChoiceLabel,
2491
2469
  highlightsLabel: e.i18n.highlightsLabel,
@@ -2493,10 +2471,10 @@ function ba(o, e) {
2493
2471
  specialCasesLabel: e.i18n.specialCasesLabel,
2494
2472
  addToCartButton: e.i18n.addToCartButton
2495
2473
  });
2496
- const p = jt(m);
2497
- return Ie() && p.classList.add("gengage-chat-comparison--mobile"), p;
2474
+ const h = Kt(m);
2475
+ return Be() && h.classList.add("gengage-chat-comparison--mobile"), h;
2498
2476
  }
2499
- function xa(o) {
2477
+ function Ca(o) {
2500
2478
  const e = document.createElement("hr");
2501
2479
  e.className = "gengage-chat-divider";
2502
2480
  const t = o.props?.label;
@@ -2508,7 +2486,7 @@ function xa(o) {
2508
2486
  }
2509
2487
  return e;
2510
2488
  }
2511
- const va = /* @__PURE__ */ new Set([
2489
+ const Ea = /* @__PURE__ */ new Set([
2512
2490
  "P",
2513
2491
  "DIV",
2514
2492
  "H1",
@@ -2531,45 +2509,45 @@ const va = /* @__PURE__ */ new Set([
2531
2509
  "DT",
2532
2510
  "DD"
2533
2511
  ]);
2534
- function wa(o) {
2512
+ function Sa(o) {
2535
2513
  const e = [];
2536
2514
  let t = [];
2537
2515
  for (const a of o)
2538
- a.nodeType === Node.ELEMENT_NODE && va.has(a.tagName) ? (t.length > 0 && (e.push(t), t = []), e.push([a])) : t.push(a);
2516
+ a.nodeType === Node.ELEMENT_NODE && Ea.has(a.tagName) ? (t.length > 0 && (e.push(t), t = []), e.push([a])) : t.push(a);
2539
2517
  return t.length > 0 && e.push(t), e;
2540
2518
  }
2541
- function ya(o) {
2519
+ function Ta(o) {
2542
2520
  for (const e of o)
2543
2521
  for (const t of e)
2544
2522
  if (t.nodeType === Node.ELEMENT_NODE && (t.tagName === "TABLE" || t.querySelector?.("table")))
2545
2523
  return !0;
2546
2524
  return !1;
2547
2525
  }
2548
- function _a() {
2526
+ function La() {
2549
2527
  return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia("(prefers-reduced-motion: reduce)").matches;
2550
2528
  }
2551
- function ka(o) {
2529
+ function Ia(o) {
2552
2530
  const { container: e, html: t, delayMs: a = 30, onTick: n, onComplete: i } = o, s = document.createElement("template");
2553
2531
  s.innerHTML = t;
2554
- const l = wa(s.content.childNodes);
2555
- if (_a() || l.length <= 1 || ya(l))
2532
+ const l = Sa(s.content.childNodes);
2533
+ if (La() || l.length <= 1 || Ta(l))
2556
2534
  return e.innerHTML = t, i?.(), { complete() {
2557
2535
  }, cancel() {
2558
2536
  }, isRunning: !1 };
2559
2537
  e.innerHTML = "";
2560
- let r = 0, c = null, g = !0;
2561
- function d() {
2562
- if (!g || r >= l.length) {
2538
+ let d = 0, c = null, g = !0;
2539
+ function r() {
2540
+ if (!g || d >= l.length) {
2563
2541
  g = !1, i?.();
2564
2542
  return;
2565
2543
  }
2566
- const m = l[r], p = document.createElement("span");
2567
- p.className = "gengage-chat-typewriter-block";
2544
+ const m = l[d], h = document.createElement("span");
2545
+ h.className = "gengage-chat-typewriter-block";
2568
2546
  for (const y of m)
2569
- p.appendChild(y.cloneNode(!0));
2570
- e.appendChild(p), r++, n?.(), r < l.length ? c = setTimeout(d, a) : (g = !1, i?.());
2547
+ h.appendChild(y.cloneNode(!0));
2548
+ e.appendChild(h), d++, n?.(), d < l.length ? c = setTimeout(r, a) : (g = !1, i?.());
2571
2549
  }
2572
- return d(), {
2550
+ return r(), {
2573
2551
  complete() {
2574
2552
  g && (c !== null && clearTimeout(c), g = !1, e.innerHTML = t, i?.());
2575
2553
  },
@@ -2581,10 +2559,10 @@ function ka(o) {
2581
2559
  }
2582
2560
  };
2583
2561
  }
2584
- function ue(o) {
2562
+ function we(o) {
2585
2563
  return o !== void 0 && /[\p{L}\p{N}_]/u.test(o);
2586
2564
  }
2587
- function Ca(o) {
2565
+ function Aa(o) {
2588
2566
  const { container: e, mentions: t, onProductClick: a } = o;
2589
2567
  if (t.length === 0) return;
2590
2568
  const n = /* @__PURE__ */ new Map();
@@ -2593,42 +2571,42 @@ function Ca(o) {
2593
2571
  if (n.size !== 0)
2594
2572
  for (const [i, s] of n) {
2595
2573
  const l = document.createTreeWalker(e, NodeFilter.SHOW_TEXT);
2596
- let r = l.nextNode(), c = !1;
2597
- for (; r && !c; ) {
2598
- const g = r.textContent ?? "", d = g.toLowerCase().indexOf(i);
2599
- if (d === -1) {
2600
- r = l.nextNode();
2574
+ let d = l.nextNode(), c = !1;
2575
+ for (; d && !c; ) {
2576
+ const g = d.textContent ?? "", r = g.toLowerCase().indexOf(i);
2577
+ if (r === -1) {
2578
+ d = l.nextNode();
2601
2579
  continue;
2602
2580
  }
2603
- const m = d > 0 ? g[d - 1] : void 0, p = g[d + s.short_name.length];
2604
- if (ue(m) || ue(p)) {
2605
- r = l.nextNode();
2581
+ const m = r > 0 ? g[r - 1] : void 0, h = g[r + s.short_name.length];
2582
+ if (we(m) || we(h)) {
2583
+ d = l.nextNode();
2606
2584
  continue;
2607
2585
  }
2608
- const y = g.slice(0, d), _ = g.slice(d, d + s.short_name.length), x = g.slice(d + s.short_name.length), E = r.parentNode;
2609
- if (!E) {
2610
- r = l.nextNode();
2586
+ const y = g.slice(0, r), _ = g.slice(r, r + s.short_name.length), v = g.slice(r + s.short_name.length), C = d.parentNode;
2587
+ if (!C) {
2588
+ d = l.nextNode();
2611
2589
  continue;
2612
2590
  }
2613
- const I = document.createElement("a");
2614
- I.className = "gengage-product-mention", I.textContent = _, I.href = "#", I.addEventListener("click", (S) => {
2591
+ const E = document.createElement("a");
2592
+ E.className = "gengage-product-mention", E.textContent = _, E.href = "#", E.addEventListener("click", (S) => {
2615
2593
  S.preventDefault(), a(s.sku);
2616
- }), y && E.insertBefore(document.createTextNode(y), r), E.insertBefore(I, r), x && E.insertBefore(document.createTextNode(x), r), E.removeChild(r), c = !0;
2594
+ }), y && C.insertBefore(document.createTextNode(y), d), C.insertBefore(E, d), v && C.insertBefore(document.createTextNode(v), d), C.removeChild(d), c = !0;
2617
2595
  }
2618
2596
  }
2619
2597
  }
2620
- const Ea = /* @__PURE__ */ new Set(["search", "info", "review", "similar"]), Sa = /* @__PURE__ */ new Set([
2598
+ const Pa = /* @__PURE__ */ new Set(["search", "info", "review", "similar"]), Na = /* @__PURE__ */ new Set([
2621
2599
  "quickAnswer",
2622
2600
  "reviewSummary",
2623
2601
  "searchDiscovery",
2624
2602
  "launchDiscovery",
2625
2603
  "exploreTogetherV2"
2626
2604
  ]);
2627
- function Ta(o) {
2628
- return !!(o.icon && Ea.has(o.icon) || o.action?.type && Sa.has(o.action.type));
2605
+ function Ma(o) {
2606
+ return !!(o.icon && Pa.has(o.icon) || o.action?.type && Na.has(o.action.type));
2629
2607
  }
2630
- const Me = "gengage_choice_prompter_dismissed";
2631
- function La(o) {
2608
+ const Fe = "gengage_choice_prompter_dismissed";
2609
+ function Ba(o) {
2632
2610
  const e = document.createElement("div");
2633
2611
  e.className = "gengage-chat-choice-prompter";
2634
2612
  const t = document.createElement("div");
@@ -2637,39 +2615,39 @@ function La(o) {
2637
2615
  a.className = "gengage-chat-choice-prompter-suggestion", a.textContent = o.suggestion, e.appendChild(a);
2638
2616
  const n = document.createElement("button");
2639
2617
  n.type = "button", n.className = "gengage-chat-choice-prompter-cta", n.textContent = o.ctaLabel, n.addEventListener("click", () => {
2640
- me(), e.remove(), o.onCtaClick();
2618
+ ye(), e.remove(), o.onCtaClick();
2641
2619
  }), e.appendChild(n);
2642
2620
  const i = document.createElement("button");
2643
2621
  return i.type = "button", i.className = "gengage-chat-choice-prompter-dismiss", i.textContent = "×", i.setAttribute("aria-label", o.dismissAriaLabel ?? "Dismiss"), i.addEventListener("click", () => {
2644
- me(), e.remove(), o.onDismiss?.();
2622
+ ye(), e.remove(), o.onDismiss?.();
2645
2623
  }), e.appendChild(i), e;
2646
2624
  }
2647
- function Ia() {
2625
+ function za() {
2648
2626
  try {
2649
- return sessionStorage.getItem(Me) === "1";
2627
+ return sessionStorage.getItem(Fe) === "1";
2650
2628
  } catch {
2651
2629
  return !1;
2652
2630
  }
2653
2631
  }
2654
- function me() {
2632
+ function ye() {
2655
2633
  try {
2656
- sessionStorage.setItem(Me, "1");
2634
+ sessionStorage.setItem(Fe, "1");
2657
2635
  } catch {
2658
2636
  }
2659
2637
  }
2660
- const Aa = "gengage_assistant", Na = 3, K = "sessions", O = "context", W = "payload", j = "favorites";
2661
- function ee(o) {
2638
+ const Ra = "gengage_assistant", Da = 3, X = "sessions", j = "context", $ = "payload", V = "favorites";
2639
+ function oe(o) {
2662
2640
  return new Promise((e, t) => {
2663
2641
  o.onsuccess = () => e(o.result), o.onerror = () => t(o.error);
2664
2642
  });
2665
2643
  }
2666
- function Z(o) {
2644
+ function ae(o) {
2667
2645
  return new Promise((e, t) => {
2668
2646
  o.oncomplete = () => e(), o.onerror = () => t(o.error), o.onabort = () => t(o.error ?? new DOMException("Transaction aborted"));
2669
2647
  });
2670
2648
  }
2671
- class Pa {
2672
- constructor(e = Aa, t = Na) {
2649
+ class Fa {
2650
+ constructor(e = Ra, t = Da) {
2673
2651
  this._db = null, this._dbName = e, this._version = t;
2674
2652
  }
2675
2653
  // -------------------------------------------------------------------------
@@ -2680,11 +2658,11 @@ class Pa {
2680
2658
  const a = indexedDB.open(this._dbName, this._version);
2681
2659
  a.onupgradeneeded = (n) => {
2682
2660
  const i = a.result, s = n.oldVersion;
2683
- s < 1 && (i.createObjectStore(K, { keyPath: ["userId", "appId", "sessionId"] }), i.createObjectStore(O, { keyPath: ["sessionId", "threadId"] }), i.createObjectStore(W, {
2661
+ s < 1 && (i.createObjectStore(X, { keyPath: ["userId", "appId", "sessionId"] }), i.createObjectStore(j, { keyPath: ["sessionId", "threadId"] }), i.createObjectStore($, {
2684
2662
  keyPath: ["threadId", "messageId"]
2685
- }).createIndex("threadId", "threadId", { unique: !1 }), i.createObjectStore(j, { keyPath: ["userId", "appId", "sku"] })), s >= 1 && s < 2 && (i.objectStoreNames.contains(K) && i.deleteObjectStore(K), i.objectStoreNames.contains(W) && i.deleteObjectStore(W), i.createObjectStore(K, { keyPath: ["userId", "appId", "sessionId"] }), i.createObjectStore(W, {
2663
+ }).createIndex("threadId", "threadId", { unique: !1 }), i.createObjectStore(V, { keyPath: ["userId", "appId", "sku"] })), s >= 1 && s < 2 && (i.objectStoreNames.contains(X) && i.deleteObjectStore(X), i.objectStoreNames.contains($) && i.deleteObjectStore($), i.createObjectStore(X, { keyPath: ["userId", "appId", "sessionId"] }), i.createObjectStore($, {
2686
2664
  keyPath: ["threadId", "messageId"]
2687
- }).createIndex("threadId", "threadId", { unique: !1 }), i.objectStoreNames.contains(O) || i.createObjectStore(O, { keyPath: ["sessionId", "threadId"] })), s < 3 && (i.objectStoreNames.contains(j) || i.createObjectStore(j, { keyPath: ["userId", "appId", "sku"] }));
2665
+ }).createIndex("threadId", "threadId", { unique: !1 }), i.objectStoreNames.contains(j) || i.createObjectStore(j, { keyPath: ["sessionId", "threadId"] })), s < 3 && (i.objectStoreNames.contains(V) || i.createObjectStore(V, { keyPath: ["userId", "appId", "sku"] }));
2688
2666
  }, a.onsuccess = () => {
2689
2667
  this._db = a.result, e(this._db);
2690
2668
  }, a.onerror = () => t(a.error);
@@ -2697,23 +2675,23 @@ class Pa {
2697
2675
  // Sessions
2698
2676
  // -------------------------------------------------------------------------
2699
2677
  async saveSession(e) {
2700
- const a = this._requireDb().transaction(K, "readwrite");
2701
- a.objectStore(K).put(e), await Z(a);
2678
+ const a = this._requireDb().transaction(X, "readwrite");
2679
+ a.objectStore(X).put(e), await ae(a);
2702
2680
  }
2703
2681
  async loadSession(e, t, a) {
2704
- const i = this._requireDb().transaction(K, "readonly");
2705
- return await ee(i.objectStore(K).get([e, t, a])) ?? null;
2682
+ const i = this._requireDb().transaction(X, "readonly");
2683
+ return await oe(i.objectStore(X).get([e, t, a])) ?? null;
2706
2684
  }
2707
2685
  // -------------------------------------------------------------------------
2708
2686
  // Context (compound key: [sessionId, threadId])
2709
2687
  // -------------------------------------------------------------------------
2710
2688
  async saveContext(e) {
2711
- const a = this._requireDb().transaction(O, "readwrite");
2712
- a.objectStore(O).put(e), await Z(a);
2689
+ const a = this._requireDb().transaction(j, "readwrite");
2690
+ a.objectStore(j).put(e), await ae(a);
2713
2691
  }
2714
2692
  async loadContext(e, t) {
2715
- const n = this._requireDb().transaction(O, "readonly");
2716
- return await ee(n.objectStore(O).get([e, t])) ?? null;
2693
+ const n = this._requireDb().transaction(j, "readonly");
2694
+ return await oe(n.objectStore(j).get([e, t])) ?? null;
2717
2695
  }
2718
2696
  /**
2719
2697
  * Delete all context entries for a session whose threadId is lexicographically
@@ -2723,8 +2701,8 @@ class Pa {
2723
2701
  * comparison is sufficient.
2724
2702
  */
2725
2703
  async deleteContextsAfterThread(e, t) {
2726
- const n = this._requireDb().transaction(O, "readwrite"), s = n.objectStore(O).openCursor();
2727
- await new Promise((l, r) => {
2704
+ const n = this._requireDb().transaction(j, "readwrite"), s = n.objectStore(j).openCursor();
2705
+ await new Promise((l, d) => {
2728
2706
  s.onsuccess = () => {
2729
2707
  const c = s.result;
2730
2708
  if (!c) {
@@ -2738,66 +2716,66 @@ class Pa {
2738
2716
  } catch {
2739
2717
  }
2740
2718
  c.continue();
2741
- }, s.onerror = () => r(s.error);
2742
- }), await Z(n);
2719
+ }, s.onerror = () => d(s.error);
2720
+ }), await ae(n);
2743
2721
  }
2744
2722
  /**
2745
2723
  * Load the most recent context for a session (latest threadId).
2746
2724
  * Uses lexicographic ordering of UUIDv7 threadIds for chronological sort.
2747
2725
  */
2748
2726
  async loadLatestContext(e) {
2749
- const n = this._requireDb().transaction(O, "readonly").objectStore(O), i = IDBKeyRange.bound([e, ""], [e, "￿"]);
2727
+ const n = this._requireDb().transaction(j, "readonly").objectStore(j), i = IDBKeyRange.bound([e, ""], [e, "￿"]);
2750
2728
  return new Promise((s, l) => {
2751
- const r = n.openCursor(i, "prev");
2752
- r.onsuccess = () => {
2753
- const c = r.result;
2729
+ const d = n.openCursor(i, "prev");
2730
+ d.onsuccess = () => {
2731
+ const c = d.result;
2754
2732
  s(c ? c.value : null);
2755
- }, r.onerror = () => l(r.error);
2733
+ }, d.onerror = () => l(d.error);
2756
2734
  });
2757
2735
  }
2758
2736
  // -------------------------------------------------------------------------
2759
2737
  // Payload
2760
2738
  // -------------------------------------------------------------------------
2761
2739
  async savePayload(e) {
2762
- const a = this._requireDb().transaction(W, "readwrite");
2763
- a.objectStore(W).put(e), await Z(a);
2740
+ const a = this._requireDb().transaction($, "readwrite");
2741
+ a.objectStore($).put(e), await ae(a);
2764
2742
  }
2765
2743
  async loadPayload(e, t) {
2766
- const n = this._requireDb().transaction(W, "readonly");
2767
- return await ee(n.objectStore(W).get([e, t])) ?? null;
2744
+ const n = this._requireDb().transaction($, "readonly");
2745
+ return await oe(n.objectStore($).get([e, t])) ?? null;
2768
2746
  }
2769
2747
  async loadPayloadsByThread(e) {
2770
- const n = this._requireDb().transaction(W, "readonly").objectStore(W).index("threadId"), i = [];
2748
+ const n = this._requireDb().transaction($, "readonly").objectStore($).index("threadId"), i = [];
2771
2749
  return new Promise((s, l) => {
2772
- const r = n.openCursor(IDBKeyRange.only(e));
2773
- r.onsuccess = () => {
2774
- const c = r.result;
2750
+ const d = n.openCursor(IDBKeyRange.only(e));
2751
+ d.onsuccess = () => {
2752
+ const c = d.result;
2775
2753
  if (!c) {
2776
2754
  s(i);
2777
2755
  return;
2778
2756
  }
2779
2757
  i.push(c.value), c.continue();
2780
- }, r.onerror = () => l(r.error);
2758
+ }, d.onerror = () => l(d.error);
2781
2759
  });
2782
2760
  }
2783
2761
  // -------------------------------------------------------------------------
2784
2762
  // Favorites
2785
2763
  // -------------------------------------------------------------------------
2786
2764
  async saveFavorite(e) {
2787
- const a = this._requireDb().transaction(j, "readwrite");
2788
- a.objectStore(j).put(e), await Z(a);
2765
+ const a = this._requireDb().transaction(V, "readwrite");
2766
+ a.objectStore(V).put(e), await ae(a);
2789
2767
  }
2790
2768
  async removeFavorite(e, t, a) {
2791
- const i = this._requireDb().transaction(j, "readwrite");
2792
- i.objectStore(j).delete([e, t, a]), await Z(i);
2769
+ const i = this._requireDb().transaction(V, "readwrite");
2770
+ i.objectStore(V).delete([e, t, a]), await ae(i);
2793
2771
  }
2794
2772
  async loadFavorites(e, t) {
2795
- const n = this._requireDb().transaction(j, "readonly");
2796
- return (await ee(n.objectStore(j).getAll())).filter((s) => s.userId === e && s.appId === t);
2773
+ const n = this._requireDb().transaction(V, "readonly");
2774
+ return (await oe(n.objectStore(V).getAll())).filter((s) => s.userId === e && s.appId === t);
2797
2775
  }
2798
2776
  async isFavorite(e, t, a) {
2799
- const i = this._requireDb().transaction(j, "readonly");
2800
- return await ee(i.objectStore(j).get([e, t, a])) !== void 0;
2777
+ const i = this._requireDb().transaction(V, "readonly");
2778
+ return await oe(i.objectStore(V).get([e, t, a])) !== void 0;
2801
2779
  }
2802
2780
  // -------------------------------------------------------------------------
2803
2781
  // Internal
@@ -2808,16 +2786,16 @@ class Pa {
2808
2786
  return this._db;
2809
2787
  }
2810
2788
  }
2811
- const Ma = [
2789
+ const Ua = [
2812
2790
  "comparisonTable",
2813
2791
  "groupList",
2814
2792
  "productDetailsSimilars",
2815
2793
  "productList"
2816
2794
  ];
2817
- class Ba {
2795
+ class qa {
2818
2796
  constructor(e) {
2819
2797
  this._lockCount = 1, this._hiddenByUser = !1, this._lastPanelContentType = null, this._chatShown = !1, this._isFavoritesMode = !1, this._lastExtended = !1, this._onChange = e.onChange;
2820
- const t = new Set(Ma);
2798
+ const t = new Set(Ua);
2821
2799
  e.productDetailsInPanel && t.add("productDetails"), this._panelContentTypes = t;
2822
2800
  }
2823
2801
  get isExtended() {
@@ -2846,7 +2824,7 @@ class Ba {
2846
2824
  e !== this._lastExtended && (this._lastExtended = e, this._onChange(e));
2847
2825
  }
2848
2826
  }
2849
- class za {
2827
+ class Ha {
2850
2828
  constructor(e) {
2851
2829
  this.deps = e, this.snapshots = /* @__PURE__ */ new Map(), this.snapshotTypes = /* @__PURE__ */ new Map(), this.activePanelMessageId = null, this.currentType = null, this.threads = [], this.lastActionType = null;
2852
2830
  }
@@ -2904,7 +2882,7 @@ class za {
2904
2882
  case "ProductDetailsPanel":
2905
2883
  return a.panelTitleProductDetails;
2906
2884
  case "ProductGrid":
2907
- return fe(this.lastActionType) ? a.panelTitleSearchResults : a.panelTitleSimilarProducts;
2885
+ return _e(this.lastActionType) ? a.panelTitleSearchResults : a.panelTitleSimilarProducts;
2908
2886
  case "ComparisonTable":
2909
2887
  return a.panelTitleComparisonResults;
2910
2888
  case "AIGroupingCards":
@@ -2930,13 +2908,13 @@ class za {
2930
2908
  updateTopBarForLoading(e) {
2931
2909
  const t = this.deps.i18n(), n = {
2932
2910
  productDetails: t.panelTitleProductDetails,
2933
- productList: fe(this.lastActionType) ? t.panelTitleSearchResults : t.panelTitleSimilarProducts,
2911
+ productList: _e(this.lastActionType) ? t.panelTitleSearchResults : t.panelTitleSimilarProducts,
2934
2912
  comparisonTable: t.panelTitleComparisonResults,
2935
2913
  groupList: t.panelTitleCategories
2936
2914
  }[e] ?? "";
2937
2915
  if (n) {
2938
- const i = this.deps.currentThreadId(), s = i ? this.threads.indexOf(i) : -1, l = s > 0, r = s >= 0 && s < this.threads.length - 1;
2939
- this.deps.drawer()?.updatePanelTopBar(l, r, n);
2916
+ const i = this.deps.currentThreadId(), s = i ? this.threads.indexOf(i) : -1, l = s > 0, d = s >= 0 && s < this.threads.length - 1;
2917
+ this.deps.drawer()?.updatePanelTopBar(l, d, n);
2940
2918
  }
2941
2919
  }
2942
2920
  /**
@@ -2995,10 +2973,13 @@ class za {
2995
2973
  this.snapshots.clear(), this.snapshotTypes.clear(), this.activePanelMessageId = null, this.currentType = null, this.threads = [];
2996
2974
  }
2997
2975
  }
2998
- function fe(o) {
2976
+ function _e(o) {
2999
2977
  return o === "user_message" || o === "inputText";
3000
2978
  }
3001
- class be {
2979
+ function Oa(o) {
2980
+ return o.similarsAppend && o.currentPanelType === "ProductDetailsPanel" && o.hasPanelContent && !o.isPanelLoading ? "appendSimilars" : o.componentType === "ProductGrid" && !o.isFirstPanelContentInStream && o.hasPanelContent && !o.isPanelLoading ? "append" : "replace";
2981
+ }
2982
+ class ke {
3002
2983
  constructor(e) {
3003
2984
  this.favoritedSkus = /* @__PURE__ */ new Set(), this._persistLock = Promise.resolve(), this._db = e;
3004
2985
  }
@@ -3076,7 +3057,7 @@ class be {
3076
3057
  await t();
3077
3058
  } catch {
3078
3059
  }
3079
- a?.send("openURLInNewTab", { url: e }), H(e) && (window.location.href = e);
3060
+ a?.send("openURLInNewTab", { url: e }), O(e) && (window.location.href = e);
3080
3061
  }
3081
3062
  /**
3082
3063
  * Load a UISpec payload from IndexedDB with retry logic.
@@ -3123,313 +3104,313 @@ class be {
3123
3104
  this._db?.close(), this._db = null;
3124
3105
  }
3125
3106
  }
3126
- const Be = "gengage_kvkk_shown", Ra = ["kvkk", "kişisel veri", "kisisel veri"], Da = /\b6698\b/;
3127
- function ge(o) {
3107
+ const Ue = "gengage_kvkk_shown", ja = ["kvkk", "kişisel veri", "kisisel veri"], Va = /\b6698\b/;
3108
+ function ue(o) {
3128
3109
  const e = o.toLowerCase();
3129
- return Ra.some((t) => e.includes(t)) || Da.test(e);
3110
+ return ja.some((t) => e.includes(t)) || Va.test(e);
3130
3111
  }
3131
- function xe(o) {
3112
+ function Ce(o) {
3132
3113
  try {
3133
- return localStorage.getItem(`${Be}_${o}`) === "1";
3114
+ return localStorage.getItem(`${Ue}_${o}`) === "1";
3134
3115
  } catch {
3135
3116
  return !1;
3136
3117
  }
3137
3118
  }
3138
- function Fa(o) {
3119
+ function Wa(o) {
3139
3120
  try {
3140
- localStorage.setItem(`${Be}_${o}`, "1");
3121
+ localStorage.setItem(`${Ue}_${o}`, "1");
3141
3122
  } catch {
3142
3123
  }
3143
3124
  }
3144
- function Ua(o) {
3125
+ function $a(o) {
3145
3126
  const t = new DOMParser().parseFromString(o, "text/html").body, a = Array.from(t.children);
3146
3127
  for (const n of a)
3147
- if (ge(n.textContent ?? "")) {
3128
+ if (ue(n.textContent ?? "")) {
3148
3129
  n.remove();
3149
3130
  break;
3150
3131
  }
3151
3132
  return t.innerHTML.trim();
3152
3133
  }
3153
- function qa(o) {
3134
+ function Ga(o) {
3154
3135
  const e = new DOMParser().parseFromString(o, "text/html");
3155
3136
  for (const t of Array.from(e.body.children))
3156
- if (ge(t.textContent ?? ""))
3137
+ if (ue(t.textContent ?? ""))
3157
3138
  return t.outerHTML;
3158
3139
  return null;
3159
3140
  }
3160
- const Ha = {
3141
+ const Ya = {
3161
3142
  tr: "TURKISH",
3162
3143
  en: "ENGLISH",
3163
3144
  de: "GERMAN",
3164
3145
  fr: "FRENCH"
3165
3146
  };
3166
- function Oa(o) {
3167
- return o ? Ha[o.toLowerCase().slice(0, 2)] ?? "TURKISH" : "TURKISH";
3147
+ function Ka(o) {
3148
+ return o ? Ya[o.toLowerCase().slice(0, 2)] ?? "TURKISH" : "TURKISH";
3168
3149
  }
3169
- const ja = ':host{all:initial;font-family:var(--gengage-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);font-size:var(--gengage-font-size, 14px)}.gengage-chat-root button,.gengage-chat-root [role=button],.gengage-chat-root a{cursor:pointer}.gengage-chat-root{position:fixed;z-index:var(--gengage-z-index, 2147483647);--_gengage-chat-offset: var(--gengage-chat-offset, 20px);--_gengage-chat-launcher-bottom: var(--gengage-chat-launcher-bottom, 20px);--_gengage-chat-launcher-right: var(--gengage-chat-launcher-right, 20px);--_gengage-chat-launcher-size: var(--gengage-chat-launcher-size, 56px);--_gengage-chat-drawer-width: var(--gengage-chat-width, 400px);--_gengage-chat-radius: var(--gengage-chat-shell-radius, 12px);--_gengage-chat-header-height: var(--gengage-chat-header-height, 60px);--_gengage-chat-conversation-width: var(--gengage-chat-conversation-width, 396px);--_gengage-chat-panel-min-width: var(--gengage-chat-panel-min-width, 320px);--_gengage-chat-panel-max-width: var(--gengage-chat-panel-max-width, 860px);--_gengage-chat-input-height: var(--gengage-chat-input-height, 48px);--_gengage-chat-shadow: var(--gengage-chat-shadow, 0 12px 40px rgba(15, 23, 42, .18));--_gengage-border-color: var(--gengage-border-color, #e5e7eb);--_gengage-discount-color: var(--gengage-discount-color, #ef4444);--_gengage-success-color: var(--gengage-success-color, #16a34a);--_gengage-text-primary: var(--gengage-text-primary, #1f2937);--_gengage-text-secondary: var(--gengage-text-secondary, #64748b);--_gengage-surface-secondary: var(--gengage-surface-secondary, #f3f4f6);--_gengage-surface-muted: var(--gengage-surface-muted, #f8fafc);--_gengage-surface-dark: var(--gengage-surface-dark, #1e293b);--_gengage-rating-color: var(--gengage-rating-color, #d97706);--_gengage-qty-btn-size: var(--gengage-qty-btn-size, 28px);--_gengage-qty-btn-size-compact: var(--gengage-qty-btn-size-compact, 24px)}.gengage-chat-launcher-container{position:fixed;bottom:var(--_gengage-chat-launcher-bottom);right:var(--_gengage-chat-launcher-right);display:flex;flex-direction:column;align-items:flex-end;gap:10px;z-index:var(--gengage-z-index, 2147483647)}.gengage-chat-launcher-content-area,.gengage-chat-launcher-content-area-bottom{display:flex;flex-direction:column;align-items:flex-end;gap:8px}.gengage-chat-launcher-content-area:empty,.gengage-chat-launcher-content-area-bottom:empty{display:none}.gengage-chat-root--open .gengage-chat-launcher-content-area,.gengage-chat-root--open .gengage-chat-launcher-content-area-bottom{display:none}.gengage-chat-root--open .gengage-chat-launcher-container{pointer-events:none;opacity:0;transition:opacity .2s ease}.gengage-chat-launcher{width:var(--_gengage-chat-launcher-size);height:var(--_gengage-chat-launcher-size);border-radius:50%;border:none;background:var(--gengage-primary-color, #3b82f6);color:var(--gengage-primary-foreground, #fff);cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 8px 22px #0f172a47;transition:transform .18s cubic-bezier(.2,.8,.2,1),box-shadow .18s ease;position:relative;flex-shrink:0}.gengage-chat-launcher:hover{transform:scale(1.05);box-shadow:0 14px 28px #0f172a47}.gengage-chat-launcher svg{width:24px;height:24px}.gengage-chat-launcher--hidden-mobile{display:none!important}.gengage-chat-launcher-tooltip{position:absolute;right:calc(100% + 12px);top:50%;transform:translateY(-50%);padding:6px 12px;border-radius:8px;background:var(--_gengage-surface-dark);color:#fff;font-size:13px;font-weight:500;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .2s ease;box-shadow:0 2px 8px #00000026}.gengage-chat-launcher-tooltip:after{content:"";position:absolute;left:100%;top:50%;transform:translateY(-50%);border:5px solid transparent;border-left-color:var(--_gengage-surface-dark)}.gengage-chat-launcher:hover .gengage-chat-launcher-tooltip{opacity:1}.gengage-chat-root--open .gengage-chat-launcher-tooltip{display:none}.gengage-chat-drawer{position:fixed;top:0;bottom:0;right:0;width:var(--_gengage-chat-drawer-width);max-height:-webkit-fill-available;max-height:100dvh;border-radius:0;background:var(--gengage-background-color, #fff);box-shadow:var(--_gengage-chat-shadow);display:flex;flex-direction:column;overflow:hidden;z-index:var(--gengage-z-index, 2147483647);transform:translate(0);transition:transform .25s cubic-bezier(.4,0,.2,1),opacity .2s ease;opacity:1}.gengage-chat-root--mobile .gengage-chat-launcher-container{right:var(--gengage-chat-launcher-mobile-right, 16px);bottom:calc(var(--gengage-chat-launcher-mobile-bottom, 16px) + env(safe-area-inset-bottom,0px))}.gengage-chat-root--mobile .gengage-chat-drawer{left:0;right:0;bottom:0;width:100%;max-width:none;max-height:-webkit-fill-available;max-height:100dvh;border-radius:16px 16px 0 0;border-top:1px solid rgba(0,0,0,.06);box-shadow:0 -4px 16px #0000001a,0 12px 40px #0f172a2e;padding-bottom:env(safe-area-inset-bottom,0px)}.gengage-chat-root--mobile.gengage-chat-root--open:before{content:"";position:fixed;inset:0;background:#0000001f;z-index:-1;pointer-events:none}.gengage-chat-root--mobile.gengage-chat-root--mobile-half .gengage-chat-drawer{top:auto;height:min(72dvh,620px);max-height:min(72dvh,620px)}.gengage-chat-root--mobile.gengage-chat-root--mobile-full .gengage-chat-drawer{top:0;height:100dvh;max-height:100dvh;border-radius:0;border-top:none}.gengage-chat-root--mobile .gengage-chat-input-area{padding-bottom:calc(10px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--_gengage-border-color, #e5e7eb);transform:translateY(calc(-1 * var(--gengage-keyboard-offset, 0px)))}.gengage-chat-header{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;min-height:var(--_gengage-chat-header-height);padding:4px 12px;background:var(--gengage-chat-header-bg, #1d2939);color:var(--gengage-chat-header-foreground, #fff);box-shadow:0 4px 20px #00000014,0 0 2px #0000001f;border:none;position:relative;z-index:2}.gengage-chat-header-left{display:flex;align-items:center;gap:10px;min-width:0}.gengage-chat-header-avatar{width:40px;height:40px;border-radius:50%;object-fit:cover;flex-shrink:0;border:2px solid rgba(255,255,255,.15)}.gengage-chat-header-info{display:flex;flex-direction:column;gap:2px;min-width:0}.gengage-chat-header-title-row{display:flex;align-items:center;gap:6px}.gengage-chat-header-title{font-weight:700;font-size:15px;line-height:1.25;letter-spacing:.01em;color:inherit}.gengage-chat-header-badge{display:inline-flex;align-items:center;padding:1px 6px;border-radius:4px;background:var(--gengage-primary-color, #3b82f6);color:#fff;font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;line-height:1.5}.gengage-chat-header-powered{display:flex;align-items:center;gap:4px;font-size:11px;color:#ffffffbf;text-decoration:none;transition:color .15s}.gengage-chat-header-powered:hover{color:#fffc}.gengage-chat-header-powered svg{width:12px;height:12px;opacity:.6}.gengage-chat-header-right{display:flex;align-items:center;gap:4px;flex-shrink:0}.gengage-chat-header-btn{width:32px;height:32px;border-radius:8px;background:transparent;border:1px solid rgba(255,255,255,.12);color:#ffffffb3;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;line-height:1;transition:background-color .15s ease,color .15s ease,border-color .15s ease}.gengage-chat-header-btn:hover{background:#ffffff1a;color:#fff;border-color:#ffffff40}.gengage-chat-close{width:32px;height:32px;border-radius:8px;background:transparent;border:1px solid rgba(255,255,255,.12);color:#ffffffb3;font-size:18px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;line-height:1;transition:background-color .15s ease,color .15s ease,border-color .15s ease}.gengage-chat-close:hover{background:#ffffff1a;color:#fff;border-color:#ffffff40}.gengage-chat-body{display:flex;flex:1;overflow:hidden;min-height:0}.gengage-chat-panel{display:none;width:0;overflow:hidden;transition:width .22s cubic-bezier(.2,.72,.2,1)}.gengage-chat-panel--visible{display:flex;flex-direction:column;position:relative;box-sizing:border-box;width:440px;min-width:440px;background:var(--gengage-chat-panel-bg, #fff);border-right:1px solid var(--_gengage-border-color);overflow-y:auto;padding:16px;background:var(--_gengage-surface-muted)}.gengage-chat-panel-divider{display:flex;align-items:center;width:4px;cursor:pointer;background:var(--_gengage-border-color);position:relative;flex-shrink:0;transition:background .15s;z-index:2}.gengage-chat-panel-divider:hover{background:#cbd5e1}.gengage-chat-panel-divider--hidden{display:none}.gengage-chat-panel-divider-toggle{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:24px;height:48px;border:1px solid var(--_gengage-border-color);border-radius:6px;background:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:14px;color:var(--_gengage-text-secondary);box-shadow:0 1px 3px #00000014;transition:background .15s,color .15s;padding:0;line-height:1}.gengage-chat-panel-divider-toggle:hover{background:var(--_gengage-surface-muted);color:#334155}.gengage-chat-panel--collapsed{flex:0 0 0px!important;width:0!important;min-width:0!important;max-width:0!important;padding:0!important;border-right:none!important;overflow:hidden}.gengage-chat-panel--collapsed~.gengage-chat-panel-divider{width:0;background:transparent}.gengage-chat-panel--collapsed~.gengage-chat-panel-divider .gengage-chat-panel-divider-toggle{left:0;transform:translateY(-50%)}.gengage-chat-conversation{display:flex;flex-direction:column;flex:1;min-width:0;overflow:hidden;background:var(--gengage-background-color, #fff);position:relative;z-index:1}.gengage-chat-drawer--with-panel{width:auto;background:transparent;box-shadow:none}.gengage-chat-drawer--with-panel .gengage-chat-header{border-radius:0;flex-shrink:0}.gengage-chat-drawer--with-panel .gengage-chat-body{flex:1 1 0;min-height:0;gap:0;padding:0;align-items:stretch}.gengage-chat-drawer--with-panel .gengage-chat-panel--visible{flex:0 0 auto;width:clamp(var(--_gengage-chat-panel-min-width),50vw,var(--_gengage-chat-panel-max-width));min-width:var(--_gengage-chat-panel-min-width);max-width:var(--_gengage-chat-panel-max-width);border-right:none;background:#fff;padding:0 16px 16px;overflow-y:auto;margin:0;border-radius:0;box-shadow:0 8px 32px #0f172a1f,0 2px 8px #0f172a0f;max-height:100dvh}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider{width:0;background:transparent}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle{width:20px;height:48px;border-radius:10px;background:var(--gengage-primary-color, #3b82f6);color:#fff;border:2px solid #fff;box-shadow:0 2px 8px #0f172a2e;font-size:12px;z-index:10}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle:hover{background:var(--gengage-primary-hover, #2563eb);color:#fff}.gengage-chat-drawer--with-panel .gengage-chat-conversation{flex:0 0 var(--_gengage-chat-conversation-width);width:var(--_gengage-chat-conversation-width);border-left:none;background:var(--gengage-background-color, #fff);box-shadow:-4px 0 24px #0f172a1f,-1px 0 4px #0f172a0f}.gengage-chat-drawer--with-panel .gengage-chat-messages{padding-right:6px;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.12) transparent}.gengage-chat-drawer--with-panel .gengage-chat-messages::-webkit-scrollbar{width:0}.gengage-chat-drawer--with-panel:has(.gengage-chat-panel--collapsed){width:var(--_gengage-chat-conversation-width);background:var(--gengage-background-color, #fff);box-shadow:var(--_gengage-chat-shadow)}.gengage-chat-drawer--with-panel .gengage-chat-footer{display:none}.gengage-chat-messages{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:16px;min-height:0;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;touch-action:pan-y}.gengage-chat-messages::-webkit-scrollbar{width:6px}.gengage-chat-messages::-webkit-scrollbar-track{background:transparent}.gengage-chat-messages::-webkit-scrollbar-thumb{background:#0000001f;border-radius:3px}.gengage-chat-messages::-webkit-scrollbar-thumb:hover{background:#0003}.gengage-chat-bubble{max-width:85%;padding:12px 16px;border-radius:12px;line-height:1.5;font-size:14px;font-weight:500;word-wrap:break-word;overflow-wrap:break-word;animation:gengage-chat-msg-in .3s cubic-bezier(.2,.7,.2,1)}@keyframes gengage-chat-msg-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.gengage-chat-bubble--user{align-self:flex-end;background:var(--gengage-primary-color, #3b82f6);color:var(--gengage-primary-foreground, #fff);border-bottom-right-radius:4px}.gengage-chat-bubble--assistant{align-self:flex-start;background:var(--_gengage-surface-secondary);color:var(--_gengage-text-primary);border-bottom-left-radius:4px;min-width:120px}.gengage-chat-bubble--active{outline:2px solid var(--gengage-primary-color, #3b82f6);outline-offset:-2px}.gengage-chat-bubble--assistant:empty{display:none}.gengage-chat-bubble--assistant .gengage-chat-bubble-text a{color:var(--gengage-primary-color, #2563eb);text-decoration:underline}.gengage-chat-bubble--assistant .gengage-chat-bubble-text a:hover{text-decoration:none}.gengage-chat-bubble--assistant .gengage-chat-bubble-text p{margin:0 0 8px}.gengage-chat-bubble--assistant .gengage-chat-bubble-text p:last-child{margin-bottom:0}.gengage-chat-bubble--assistant .gengage-chat-bubble-text ul,.gengage-chat-bubble--assistant .gengage-chat-bubble-text ol{margin:6px 0;padding-left:20px}.gengage-chat-bubble--assistant .gengage-chat-bubble-text li{margin-bottom:6px;line-height:1.5}.gengage-chat-bubble--assistant .gengage-chat-bubble-text code{background:#0000000f;padding:1px 4px;border-radius:3px;font-size:.9em}.gengage-chat-bubble--assistant .gengage-chat-bubble-text pre{background:#0000000a;padding:8px;border-radius:6px;overflow-x:auto;margin:4px 0}.gengage-chat-bubble--assistant .gengage-chat-bubble-text table{border-collapse:collapse;margin:4px 0;font-size:.9em}.gengage-chat-bubble--assistant .gengage-chat-bubble-text th,.gengage-chat-bubble--assistant .gengage-chat-bubble-text td{border:1px solid var(--_gengage-border-color);padding:4px 8px}.gengage-chat-bubble--assistant .gengage-chat-bubble-text img{max-width:100%;height:auto;border-radius:4px;margin:4px 0}.gengage-chat-bubble--assistant .gengage-chat-bubble-text h1,.gengage-chat-bubble--assistant .gengage-chat-bubble-text h2,.gengage-chat-bubble--assistant .gengage-chat-bubble-text h3,.gengage-chat-bubble--assistant .gengage-chat-bubble-text h4,.gengage-chat-bubble--assistant .gengage-chat-bubble-text h5,.gengage-chat-bubble--assistant .gengage-chat-bubble-text h6{margin:8px 0 4px;line-height:1.3;color:#0f172a}.gengage-chat-bubble--assistant .gengage-chat-bubble-text blockquote{border-left:3px solid var(--_gengage-border-color);padding-left:12px;margin:4px 0;color:var(--_gengage-text-secondary)}.gengage-chat-bubble--first{border-left:3px solid var(--gengage-accent-primary, #3b82f6);padding-left:12px}.gengage-chat-bubble--first .gengage-chat-bubble-text{font-size:15px}.gengage-chat-typing{display:flex;align-items:center;gap:5px;padding:8px 4px;align-self:flex-start;max-width:85%}.gengage-chat-typing:has(.gengage-chat-typing-text),.gengage-chat-typing:has(.gengage-chat-thinking-steps){background:var(--_gengage-surface-secondary);padding:10px 14px;border-radius:12px 12px 12px 4px;gap:8px}.gengage-chat-typing-dots{display:flex;align-items:center;gap:5px}.gengage-chat-typing-dots span{width:6px;height:6px;border-radius:50%;background:#94a3b8;display:inline-block;animation:gengage-chat-typing-fade 1.4s ease-in-out infinite}.gengage-chat-typing-dots span:nth-child(2){animation-delay:.2s}.gengage-chat-typing-dots span:nth-child(3){animation-delay:.4s}@keyframes gengage-chat-typing-fade{0%,to{opacity:.25}50%{opacity:1}}.gengage-chat-typing-sparkle{animation:gengage-sparkle-pulse 1.2s infinite}@keyframes gengage-sparkle-pulse{0%,to{opacity:1}50%{opacity:.4}}.gengage-chat-typing-text{font-size:13px;color:var(--_gengage-text-secondary);font-style:italic;flex:1;min-width:0;word-wrap:break-word;overflow-wrap:break-word}.gengage-chat-stop-btn{display:flex;align-items:center;gap:6px;margin:4px 0 8px;padding:6px 14px;border:1px solid #d1d5db;border-radius:16px;background:#fff;color:var(--_gengage-text-secondary);font-size:13px;cursor:pointer;transition:background .15s ease,border-color .15s ease}.gengage-chat-stop-btn:hover{background:var(--_gengage-surface-secondary);border-color:#9ca3af}.gengage-chat-stop-btn:focus-visible{outline:2px solid var(--gengage-chat-primary, #f27a1a);outline-offset:2px}.gengage-chat-stop-icon{display:inline-block;width:10px;height:10px;background:currentColor;border-radius:2px;flex-shrink:0}.gengage-chat-offline-bar{display:none;align-items:center;gap:6px;padding:6px 12px;font-size:12px;line-height:1.4;color:#92400e;background:#fef3c7;border-bottom:1px solid #fde68a}.gengage-chat-offline-bar--visible{display:flex}.gengage-chat-offline-bar:before{content:"";display:inline-block;width:8px;height:8px;background:var(--_gengage-rating-color);border-radius:50%;flex-shrink:0}.gengage-chat-still-working{font-size:12px;color:var(--gengage-chat-text-secondary, #666);margin-top:6px;animation:gengage-fade-in .3s ease}@keyframes gengage-fade-in{0%{opacity:0}to{opacity:1}}.gengage-chat-thinking-steps{display:flex;flex-direction:column;gap:4px;padding:4px 0}.gengage-chat-thinking-step{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--gengage-chat-text-secondary, #666)}.gengage-chat-thinking-step-marker{font-size:12px;width:16px;text-align:center;flex-shrink:0}.gengage-chat-thinking-step-marker--done{color:var(--gengage-chat-success, #4caf50)}.gengage-chat-thinking-step-marker--active{color:var(--gengage-chat-primary, #1976d2);animation:gengage-thinking-pulse 1.5s ease-in-out infinite}@keyframes gengage-thinking-pulse{0%,to{opacity:1}50%{opacity:.4}}.gengage-chat-thinking-step-text{line-height:1.4}.gengage-chat-error{display:flex;align-items:center;justify-content:center;gap:10px;padding:10px 14px;border-radius:10px;background:#fef2f2;color:#991b1b;font-size:13px;text-align:center;border:1px solid #fecaca}.gengage-chat-error-retry{flex-shrink:0;padding:4px 12px;border:1px solid #fca5a5;border-radius:6px;background:#fff;color:#991b1b;font-size:12px;font-weight:500;cursor:pointer;transition:background .15s}.gengage-chat-error-retry:hover{background:#fee2e2}.gengage-chat-input-area{display:flex;flex-wrap:wrap;align-items:center;gap:0;padding:8px 12px;border-top:1px solid var(--_gengage-border-color);background:var(--gengage-background-color, #fff)}.gengage-chat-input-pill{display:flex;align-items:center;gap:4px;flex:1;min-width:0;height:44px;background:var(--_gengage-surface-secondary);border:1px solid var(--_gengage-border-color);border-radius:30px;padding:2px 8px;overflow:hidden;transition:border-color .2s ease,box-shadow .2s ease}.gengage-chat-input-pill:focus-within{border-color:var(--gengage-primary-color, #3b82f6);box-shadow:0 0 0 2px #3b82f626}.gengage-chat-input{flex:1;min-width:0;min-height:40px;max-height:120px;padding:0 6px 0 14px;border:none;border-radius:0;font-size:14px;font-family:inherit;line-height:1.4;align-content:center;outline:none;background:transparent;color:var(--_gengage-text-primary);resize:none;overflow-y:hidden}@media(max-width:767px){.gengage-chat-input-pill{height:52px;padding:3px 8px}.gengage-chat-input{min-height:44px;max-height:44px;font-size:16px;white-space:nowrap;overflow:hidden}.gengage-chat-input::placeholder{font-size:15px}}.gengage-chat-input::placeholder{font-size:14px;color:#6b7280}.gengage-chat-send{width:36px;height:36px;min-width:36px;padding:0;border:none;border-radius:50%;background:var(--gengage-primary-color, #3b82f6);color:var(--gengage-primary-foreground, #fff);font-weight:700;font-size:0;font-family:inherit;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background-color .2s cubic-bezier(.4,0,.2,1),box-shadow .2s ease,transform .15s ease;box-shadow:0 2px 4px #0000001f}.gengage-chat-send:hover{filter:brightness(.92);transform:translateY(-1px);box-shadow:0 4px 8px #0000002e}.gengage-chat-send:active{transform:translateY(0);box-shadow:0 1px 2px #0000001f}.gengage-chat-send svg{width:18px;height:18px}.gengage-chat-send:disabled{background:#d1d5db;box-shadow:none;cursor:not-allowed}.gengage-chat-footer{padding:4px 10px;text-align:center;font-size:10px;color:#6b7280;border-top:1px solid var(--_gengage-surface-muted);background:var(--gengage-background-color, #fff)}.gengage-chat-uispec{width:100%}.gengage-chat-uispec:empty{display:none}.gengage-chat-uispec>*{animation:gengage-chat-widget-enter .16s cubic-bezier(.2,.7,.2,1) both}@keyframes gengage-chat-widget-enter{0%{opacity:0;transform:translateY(5px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}.gengage-chat-action-buttons{display:flex;gap:8px;padding:6px 0 4px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}.gengage-chat-action-buttons::-webkit-scrollbar{display:none}.gengage-chat-action-btn{flex:0 0 auto;padding:8px 16px;border:none;border-radius:999px;background:var(--gengage-primary-color, #3b82f6);color:var(--gengage-primary-foreground, #fff);font-size:13px;font-weight:600;line-height:1.25;font-family:inherit;cursor:pointer;white-space:nowrap;transition:filter .15s ease,transform .1s ease}.gengage-chat-action-btn:hover{filter:brightness(.92)}.gengage-chat-action-btn:active{transform:scale(.97)}.gengage-chat-product-card{position:relative;border:1px solid #eee;border-radius:16px;overflow:hidden;background:#fff;width:160px;min-width:160px;max-width:160px;box-shadow:0 2px 8px #0000000f;transition:transform .1s ease,box-shadow .2s ease}.gengage-chat-product-card:hover{transform:translateY(-2px);box-shadow:0 4px 16px #0000001f}.gengage-chat-product-card-img{width:100%;height:120px;object-fit:contain;display:block;background:#fff;padding:8px;box-sizing:border-box}.gengage-chat-product-card-body{display:flex;flex-direction:column;gap:4px;padding:8px 10px 10px;text-align:center}.gengage-chat-product-card-name{font-size:13px;font-weight:600;color:var(--_gengage-text-primary);line-height:1.35;margin-bottom:0;min-height:0;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.gengage-chat-product-card-brand{font-size:10px;color:#666}.gengage-chat-product-card-rating{font-size:11px;color:var(--_gengage-rating-color);line-height:1}.gengage-chat-product-card-review-count{color:#475569;font-size:10px}.gengage-chat-product-card-price{display:flex;align-items:baseline;justify-content:center;gap:4px;font-size:16px;font-weight:800;color:#0f172a}.gengage-chat-product-card-original-price{text-decoration:line-through;color:#64748b;font-weight:400;font-size:12px}.gengage-chat-price-skeleton{display:inline-block;width:80px;height:16px;background:linear-gradient(90deg,#e2e8f0 25%,#f1f5f9,#e2e8f0 75%);background-size:200% 100%;animation:gengage-skeleton-price-pulse 1.5s ease-in-out infinite;border-radius:4px;vertical-align:middle}@keyframes gengage-skeleton-price-pulse{0%{background-position:200% 0}to{background-position:-200% 0}}.gengage-chat-product-card-cta{display:block;padding:8px 10px;text-align:center;background:transparent;color:var(--gengage-primary-color, #3b82f6);text-decoration:none;font-size:12px;font-weight:700;letter-spacing:.01em;border-top:1px solid var(--_gengage-surface-muted);cursor:pointer;transition:color .15s ease,background .15s ease}.gengage-chat-product-card-cta:hover{color:var(--gengage-primary-color, #0b24d6);background:var(--_gengage-surface-muted)}.gengage-chat-product-card-cta:active{background:var(--_gengage-surface-muted)}.gengage-chat-product-summary{display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid var(--_gengage-border-color);border-radius:12px;background:#fff;cursor:pointer;transition:background .15s,box-shadow .15s;margin:4px 0}.gengage-chat-product-summary:hover{background:#f9fafb;box-shadow:0 1px 4px #0000000f}.gengage-chat-product-summary__image{flex-shrink:0;width:64px;height:64px;border-radius:8px;overflow:hidden;border:1px solid var(--_gengage-surface-secondary);background:#f9fafb}.gengage-chat-product-summary__image img{width:100%;height:100%;object-fit:cover;display:block}.gengage-chat-product-summary__content{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.gengage-chat-product-summary__name{font-size:13px;font-weight:500;line-height:1.3;color:#111827;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.gengage-chat-product-summary__rating{font-size:11px;color:var(--_gengage-rating-color);line-height:1}.gengage-chat-product-summary__review-count{color:#475569;font-size:11px}.gengage-chat-product-summary__price{font-size:13px;font-weight:600;color:#111827;line-height:1;margin-top:2px}.gengage-chat-product-summary__price-original{text-decoration:line-through;color:#6b7280;font-weight:400;font-size:11px}.gengage-chat-product-summary__price-current{color:var(--gengage-primary-color, #111827)}.gengage-chat-product-summary__cta{flex-shrink:0;font-size:12px;font-weight:500;color:var(--gengage-primary-color, #2563eb);text-decoration:none;padding:4px 10px;border-radius:8px;transition:background .15s;white-space:nowrap}.gengage-chat-product-summary__cta:hover{background:#0000000a}.gengage-chat-product-summary__cta:focus-visible{outline:2px solid var(--gengage-primary-color, #2563eb);outline-offset:2px}.gengage-chat-product-grid{display:flex;gap:12px;overflow-x:auto;padding:8px 0;-webkit-overflow-scrolling:touch;scrollbar-width:none;scroll-snap-type:x proximity;min-height:180px}.gengage-chat-product-grid>*{scroll-snap-align:start;flex:0 0 auto}.gengage-chat-product-grid::-webkit-scrollbar{display:none}.gengage-chat-review-highlights{padding:2px 0 6px}.gengage-chat-review-item{border:1px solid var(--_gengage-border-color);border-radius:12px;padding:10px 12px;background:#fff}.gengage-chat-review-item[data-tone=positive]{border-color:#bbf7d0;background:#f0fdf4}.gengage-chat-review-item[data-tone=negative]{border-color:#fecaca;background:#fef2f2}.gengage-chat-review-tag{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:var(--_gengage-text-secondary);margin-bottom:4px}.gengage-chat-review-text{font-size:13px;line-height:1.45;color:var(--_gengage-text-primary);display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.gengage-chat-review-rating{margin-top:6px;font-size:12px;font-weight:700;color:#0f172a}.gengage-chat-review-empty{font-size:12px;color:var(--_gengage-text-secondary)}.gengage-chat-review-tabs{display:flex;gap:6px;margin-bottom:10px}.gengage-chat-review-tab{padding:6px 14px;border:1px solid var(--_gengage-border-color);border-radius:999px;background:#fff;color:var(--_gengage-text-secondary);font-size:12px;font-weight:600;font-family:inherit;cursor:pointer;transition:background .15s,border-color .15s}.gengage-chat-review-tab:hover{background:var(--_gengage-surface-muted)}.gengage-chat-review-tab--active{background:var(--_gengage-surface-muted);border-color:#94a3b8;color:#0f172a}.gengage-chat-review-pills{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}.gengage-chat-review-pill{display:flex;align-items:center;gap:6px;padding:6px 10px;border:1px solid var(--_gengage-border-color);border-radius:8px;background:#fff;font-size:12px;color:#334155;box-shadow:0 1px 2px #0000000a}.gengage-chat-review-pill[data-tone=positive]{border-color:#bbf7d0}.gengage-chat-review-pill[data-tone=negative]{border-color:#fecaca}.gengage-chat-review-pill-icon{font-size:11px;font-weight:700}.gengage-chat-review-pill[data-tone=positive] .gengage-chat-review-pill-icon{color:var(--_gengage-success-color)}.gengage-chat-review-pill[data-tone=negative] .gengage-chat-review-pill-icon{color:#dc2626}.gengage-chat-review-pill-count{font-size:10px;font-weight:700;background:var(--_gengage-surface-muted);color:var(--_gengage-text-secondary);border-radius:4px;padding:1px 5px}.gengage-chat-review-items{display:grid;gap:10px}.gengage-chat-divider{border:none;border-top:1px solid var(--_gengage-border-color);margin:8px 0}.gengage-chat-divider-wrapper{display:flex;align-items:center;gap:8px;margin:8px 0}.gengage-chat-divider-wrapper hr{flex:1;border:none;border-top:1px solid var(--_gengage-border-color);margin:0}.gengage-chat-divider-label{font-size:11px;color:#6b7280;white-space:nowrap}.gengage-chat--overlay .gengage-chat-drawer{position:fixed;inset:0;width:100%;max-width:480px;max-height:100%;margin:0 auto;border-radius:0;animation:gengage-chat-overlay-in .24s cubic-bezier(.2,.72,.2,1)}.gengage-chat--overlay:before{content:"";position:fixed;inset:0;background:#00000073;z-index:-1}@keyframes gengage-chat-overlay-in{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}.gengage-chat-panel-skeleton{display:flex;flex-direction:column;gap:14px;padding:6px 0}.gengage-chat-panel-skeleton-block{height:110px;border-radius:10px;background:linear-gradient(90deg,#e5e7eb 25%,#f3f4f6,#e5e7eb 75%);background-size:200% 100%;animation:gengage-panel-shimmer 1.4s infinite}@keyframes gengage-panel-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.gengage-chat-panel-skeleton-block--image{height:200px;border-radius:8px;margin-bottom:12px}.gengage-chat-panel-skeleton-block--text{height:16px;border-radius:4px;margin-bottom:8px}.gengage-chat-panel-skeleton-block--text:nth-child(3){width:80%}.gengage-chat-panel-skeleton-block--text:nth-child(4){width:60%}.gengage-chat-panel-skeleton-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.gengage-chat-panel-skeleton-block--card{height:120px;border-radius:8px}.gengage-chat-panel-skeleton-block--row{height:32px;border-radius:4px;margin-bottom:4px}.gengage-chat-panel .gengage-chat-product-card{width:100%;max-width:100%;min-width:0;display:flex;flex-direction:column;border-radius:12px;border:1px solid var(--_gengage-border-color);box-shadow:0 1px 4px #0000000f;overflow:hidden;padding:0}.gengage-chat-panel .gengage-chat-product-card:hover{transform:translateY(-2px);box-shadow:0 4px 12px #0000001a;border-color:#d1d5db}.gengage-chat-panel .gengage-chat-product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));overflow-x:visible;gap:12px;min-height:auto;padding:4px 0}.gengage-chat-panel .gengage-chat-product-card-img{width:100%;height:160px;border-radius:0;object-fit:contain;background:#fafafa;padding:12px;box-sizing:border-box}.gengage-chat-panel .gengage-chat-product-card-body{padding:10px 12px 12px;text-align:left;gap:4px}.gengage-chat-panel .gengage-chat-product-card-name{min-height:0;margin-bottom:2px;font-size:13px;-webkit-line-clamp:2;line-clamp:2}.gengage-chat-panel .gengage-chat-product-card-price{justify-content:flex-start;font-size:15px}.gengage-chat-panel .gengage-chat-product-card-cta{display:block;padding:10px 12px;text-align:center;border-top:1px solid var(--_gengage-surface-muted);border-radius:0;background:transparent;color:var(--gengage-primary-color, #3b82f6);font-weight:700;font-size:13px}.gengage-chat-product-details-panel{display:flex;flex-direction:column;gap:12px;width:100%;background:#fff;border:1px solid var(--_gengage-border-color);border-radius:16px;padding:14px;box-sizing:border-box}.gengage-chat-product-details-media{border:1px solid var(--_gengage-surface-muted);border-radius:12px;background:#fafafa;padding:12px;display:flex;flex-direction:column;align-items:center}.gengage-chat-product-details-img{width:100%;height:auto;max-height:300px;object-fit:contain;border-radius:8px}.gengage-chat-product-details-content{display:flex;flex-direction:column;gap:8px;min-width:0}.gengage-chat-product-details-title{margin:0;font-size:17px;font-weight:700;line-height:1.3;color:#0f172a}.gengage-chat-product-details-rating{display:inline-flex;align-items:center;gap:4px;width:fit-content;padding:3px 8px;border-radius:999px;background:#fff7ed;color:#9a3412;font-size:13px;font-weight:700}.gengage-chat-product-details-review-count{color:#7c2d12;font-weight:600}.gengage-chat-product-details-price{display:flex;align-items:baseline;gap:6px}.gengage-chat-product-details-original-price{font-size:14px;color:#64748b;text-decoration:line-through}.gengage-chat-product-details-current-price{font-size:22px;font-weight:800;line-height:1.1;color:#0f172a}.gengage-chat-product-details-stock{width:fit-content;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:700}.gengage-chat-product-details-stock.is-in-stock{background:#dcfce7;color:#166534}.gengage-chat-product-details-stock.is-out-of-stock{background:#fee2e2;color:#991b1b}.gengage-chat-product-details-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:4px}.gengage-chat-product-details-cta{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:0 20px;border-radius:999px;border:none;text-decoration:none;background:var(--gengage-primary-color, #3b82f6);color:var(--gengage-primary-foreground, #fff);font-size:14px;font-weight:700;cursor:pointer;transition:filter .14s ease,transform .12s ease}.gengage-chat-product-details-cta:hover{filter:brightness(1.05);transform:translateY(-1px)}.gengage-chat-product-details-cta:active{transform:translateY(1px)}.gengage-chat-product-details-atc{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 20px;border:none;border-radius:10px;background:var(--_gengage-success-color);color:#fff;font-size:14px;font-weight:700;font-family:inherit;cursor:pointer;transition:filter .12s ease,transform .12s ease}.gengage-chat-product-details-atc:hover{filter:brightness(1.08);transform:translateY(-1px)}.gengage-chat-product-details-atc:active{transform:translateY(1px)}.gengage-chat-product-detail-tabs{margin-top:4px;border-top:1px solid var(--_gengage-border-color);padding-top:12px}.gengage-chat-product-detail-tab-bar{display:flex;gap:0;border-bottom:2px solid var(--_gengage-border-color);margin-bottom:12px}.gengage-chat-product-detail-tab{flex:1;padding:8px 12px;border:none;background:transparent;color:var(--_gengage-text-secondary);font-size:13px;font-weight:600;font-family:inherit;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-2px;transition:color .15s,border-color .15s}.gengage-chat-product-detail-tab:hover{color:#334155}.gengage-chat-product-detail-tab--active{color:var(--gengage-primary-color, #3b82f6);border-bottom-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-product-detail-tab-panel{font-size:13px;line-height:1.6;color:#374151}.gengage-chat-product-specs-table{width:100%;border-collapse:collapse;font-size:13px}.gengage-chat-product-specs-table tr:nth-child(2n){background:var(--_gengage-surface-muted)}.gengage-chat-product-specs-key{padding:6px 10px;font-weight:600;color:#475569;white-space:nowrap;border-bottom:1px solid var(--_gengage-surface-muted);width:40%}.gengage-chat-product-specs-value{padding:6px 10px;color:var(--_gengage-text-primary);border-bottom:1px solid var(--_gengage-surface-muted)}.gengage-chat-product-card-atc{position:absolute;bottom:42px;right:6px;opacity:0;transition:opacity .15s ease;z-index:1}.gengage-chat-product-card:hover .gengage-chat-product-card-atc{opacity:1}@media(hover:none),(pointer:coarse){.gengage-chat-product-card-atc{opacity:1;position:relative;bottom:auto;right:auto;margin-top:4px}}.gengage-chat-drawer.gengage-chat-drawer--hidden{transform:translate(100%);opacity:0;pointer-events:none;box-shadow:none;visibility:hidden}.gengage-chat-root--mobile .gengage-chat-drawer.gengage-chat-drawer--hidden{transform:translateY(100%);opacity:0;pointer-events:none;box-shadow:none;visibility:hidden}@media(max-width:900px){.gengage-chat-drawer--with-panel .gengage-chat-panel--visible{width:clamp(280px,calc(100vw - var(--_gengage-chat-conversation-width)),560px);max-width:560px}}.gengage-chat-attachment-preview{display:flex;align-items:center;gap:8px;padding:6px 10px;background:var(--_gengage-surface-secondary);border:1px solid var(--_gengage-border-color);border-radius:8px;width:100%;box-sizing:border-box}.gengage-chat-attachment-preview--hidden{display:none}.gengage-chat-attachment-preview-thumb{width:40px;height:40px;border-radius:4px;object-fit:cover;flex-shrink:0}.gengage-chat-attachment-name{flex:1;font-size:12px;color:#4b5563;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gengage-chat-attachment-remove{background:none;border:none;cursor:pointer;font-size:18px;color:#6b7280;padding:0 4px;line-height:1;flex-shrink:0}.gengage-chat-attachment-remove:hover{color:#ef4444}.gengage-chat-attach-btn{background:none;border:none;cursor:pointer;width:32px;height:32px;padding:0;line-height:1;flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:50%;color:#6b7280;transition:color .15s,background .15s}.gengage-chat-attach-btn:hover{color:#4b5563;background:#0000000d}.gengage-chat-attach-btn svg{width:20px;height:20px}.gengage-chat-mic-btn{background:none;border:none;cursor:pointer;width:32px;height:32px;padding:0;line-height:1;flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:50%;color:#6b7280;transition:color .15s,background .15s}.gengage-chat-mic-btn:hover{color:#4b5563;background:#0000000d}.gengage-chat-mic-btn svg{width:20px;height:20px}.gengage-chat-mic-btn--active{color:#ef4444;animation:gengage-mic-pulse 1.2s ease-in-out infinite}.gengage-chat-mic-btn--active:hover{color:#dc2626}@keyframes gengage-mic-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.15);opacity:.8}}.gengage-chat-input-area--dragover{outline:2px dashed var(--gengage-primary-color, #3b82f6);outline-offset:-2px;background:#eff6ff}.gengage-chat-attachment-thumb{width:120px;max-width:100%;height:auto;border-radius:8px;margin-bottom:6px;display:block}@media(max-width:768px){.gengage-chat-root{--_gengage-qty-btn-size: 44px;--_gengage-qty-btn-size-compact: 44px}.gengage-chat-header-btn,.gengage-chat-close{width:44px;height:44px;border-radius:12px}.gengage-chat-attach-btn,.gengage-chat-mic-btn,.gengage-chat-send{width:44px;height:44px;min-width:44px}.gengage-chat-attach-btn svg,.gengage-chat-mic-btn svg{width:22px;height:22px}.gengage-chat-panel-divider{display:flex;width:100%;height:20px;align-items:center;justify-content:center;cursor:ns-resize;background:transparent;touch-action:pan-y;position:relative;overflow:visible}.gengage-chat-panel-divider--hidden{display:none}.gengage-chat-drawer--with-panel{left:0;right:0;width:100%;border-radius:0}.gengage-chat-drawer--with-panel .gengage-chat-body{flex-direction:column}.gengage-chat-drawer--with-panel .gengage-chat-panel--visible{width:100%;min-width:0;max-width:none;max-height:25dvh;border-right:none;border-bottom:1px solid var(--_gengage-border-color);padding:0 12px 12px;margin:0;border-radius:0;box-shadow:none}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider{width:100%;height:20px;background:transparent;border-bottom:1px solid rgba(148,163,184,.22)}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle{left:50%;top:50%;transform:translate(-50%,-50%);width:100%;height:44px;border:none;border-radius:0;background:transparent;box-shadow:none;color:transparent;font-size:0;line-height:0;padding:0}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle:before{content:"";display:block;width:52px;height:5px;margin:0 auto;border-radius:999px;background:#94a3b8;box-shadow:0 1px #64748b59;transition:background .15s ease}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle:hover,.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle:active{background:transparent;color:transparent}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle:hover:before,.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle:active:before{background:#64748b}.gengage-chat-panel--collapsed~.gengage-chat-panel-divider{width:100%;background:transparent}.gengage-chat-panel--collapsed~.gengage-chat-panel-divider .gengage-chat-panel-divider-toggle{left:50%;transform:translate(-50%,-50%)}.gengage-chat-drawer--with-panel .gengage-chat-conversation{width:100%;flex:1;border-left:none}.gengage-qty-stepper--compact .gengage-qty-value{min-width:24px;font-size:13px}.gengage-qty-stepper--compact .gengage-qty-submit{min-height:44px;padding:0 12px;font-size:13px}.gengage-chat-product-details-atc-stepper .gengage-qty-submit{min-height:44px;padding:0 16px}.gengage-chat-product-details-share{width:44px;height:44px}.gengage-chat-panel .gengage-chat-product-card{grid-template-columns:84px 1fr}.gengage-chat-panel .gengage-chat-product-card-cta{grid-column:1 / -1;width:100%}.gengage-chat-product-details-panel{padding:12px;gap:12px}.gengage-chat-product-details-media{min-height:140px}.gengage-chat-product-details-title{font-size:15px}.gengage-chat-product-details-current-price{font-size:20px}.gengage-chat-product-grid{scroll-snap-type:x mandatory}.gengage-chat-product-card{width:280px;min-width:280px;scroll-snap-align:center}.gengage-chat-product-card-img{height:180px}}@media(max-width:480px){.gengage-chat-drawer{position:fixed;inset:0;width:100%;max-height:100%;border-radius:0}.gengage-chat-bubble{max-width:100%}}.gengage-chat-kvkk-banner{display:flex;align-items:flex-start;gap:8px;padding:10px 14px;background:#fffbeb;border-bottom:1px solid #fde68a;font-size:12px;line-height:1.5;color:#92400e}.gengage-chat-kvkk-content{flex:1;min-width:0}.gengage-chat-kvkk-content a{color:#b45309;text-decoration:underline}.gengage-chat-kvkk-dismiss{flex-shrink:0;width:20px;height:20px;border:none;background:transparent;color:#92400e;font-size:16px;cursor:pointer;padding:0;line-height:1}.gengage-chat-comparison{padding:16px}.gengage-chat-comparison-heading{font-size:14px;font-weight:700;letter-spacing:.05em;color:#0f172a;margin:0 0 16px}.gengage-chat-comparison-recommended{border:1px solid var(--_gengage-border-color);border-radius:12px;padding:16px;background:#fff;box-shadow:0 1px 3px #0000000f;margin-bottom:12px}.gengage-chat-comparison-recommended-label{font-size:12px;font-weight:700;color:var(--_gengage-success-color);text-transform:uppercase;letter-spacing:.04em;margin-bottom:12px}.gengage-chat-comparison-recommended-body{display:flex;gap:12px;align-items:flex-start}.gengage-chat-comparison-recommended-body img{width:80px;height:80px;object-fit:contain;border-radius:8px;background:var(--_gengage-surface-muted)}.gengage-chat-comparison-recommended-info{flex:1;min-width:0}.gengage-chat-comparison-recommended-title{font-size:14px;font-weight:600;color:#0f172a;margin-bottom:4px}.gengage-chat-comparison-recommended-price{font-size:16px;font-weight:700;color:#0f172a}.gengage-chat-comparison-highlights{margin-top:12px;padding-top:12px;border-top:1px solid var(--_gengage-surface-muted)}.gengage-chat-comparison-highlights-label{font-size:12px;font-weight:600;color:var(--_gengage-text-secondary);margin-bottom:6px}.gengage-chat-comparison-highlights ul{margin:0;padding-left:18px;font-size:13px;color:#334155;line-height:1.6}.gengage-chat-comparison-special{background:#fffbeb;border:1px solid #fde68a;border-radius:12px;padding:12px 16px;margin-bottom:12px;font-size:13px;color:#92400e}.gengage-chat-comparison-special summary{cursor:pointer;font-weight:600}.gengage-chat-comparison-special ul{margin:8px 0 0;padding-left:18px;line-height:1.6}.gengage-chat-comparison-table{width:100%;border-collapse:collapse;font-size:13px;margin-top:12px}.gengage-chat-comparison-table th,.gengage-chat-comparison-table td{padding:10px 12px;text-align:center;border-bottom:1px solid var(--_gengage-surface-muted);vertical-align:top}.gengage-chat-comparison-table th{font-weight:600;font-size:12px;color:#334155}.gengage-chat-comparison-table th img{width:60px;height:60px;object-fit:contain;border-radius:6px;background:var(--_gengage-surface-muted);margin-bottom:6px}.gengage-chat-comparison-table-price{font-weight:700;color:#0f172a}.gengage-chat-comparison-label{text-align:left;font-weight:600;color:var(--_gengage-text-secondary);white-space:nowrap}.gengage-chat-comparison-selected{background:#f0fdf4}.gengage-chat-comparison-recommended-text{padding:8px 12px;font-size:12px;color:var(--gengage-text-secondary, #475569);font-style:italic;border-top:1px solid var(--gengage-border-color, #e2e8f0);margin-top:8px}.gengage-chat-comparison-product-actions{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}.gengage-chat-comparison-view-btn{flex:1;min-width:0;padding:8px 12px;border:1px solid var(--gengage-primary-color, #3b82f6);border-radius:6px;background:transparent;color:var(--gengage-primary-color, #3b82f6);font-size:12px;font-weight:500;font-family:inherit;cursor:pointer;transition:background .15s ease,color .15s ease;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.gengage-chat-comparison-view-btn:hover{background:var(--gengage-primary-color, #3b82f6);color:#fff}.gengage-chat-pills{position:relative;padding:8px 12px;border-top:1px solid var(--_gengage-surface-muted);background:var(--gengage-background-color, #fff)}.gengage-chat-pills-scroll{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;padding-right:28px}.gengage-chat-pills-scroll::-webkit-scrollbar{display:none}.gengage-chat-pill{flex:0 0 auto;padding:8px 16px;border:none;border-radius:999px;background:var(--gengage-primary-color, #3b82f6);color:var(--gengage-primary-foreground, #fff);font-size:13px;font-weight:600;font-family:inherit;white-space:nowrap;cursor:pointer;transition:filter .15s,transform .1s}.gengage-chat-pill:hover{filter:brightness(.92)}.gengage-chat-pill:active{transform:scale(.97)}.gengage-chat-pill--rich{display:flex;align-items:center;gap:8px;padding:6px 14px 6px 6px;border-radius:20px}.gengage-chat-pill-img{width:32px;height:32px;border-radius:50%;object-fit:cover;flex-shrink:0;background:#ffffff26}.gengage-chat-pill-text{font-size:13px;font-weight:600;line-height:1.2}.gengage-chat-pill-desc{display:none}.gengage-chat-pill--rich .gengage-chat-pill-desc{display:block;font-size:10px;font-weight:400;opacity:.8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:160px}.gengage-chat-pills-arrow{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:28px;height:28px;border-radius:50%;border:1px solid var(--_gengage-border-color);background:#fff;color:var(--_gengage-text-secondary);font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:-4px 0 8px #ffffffe6;z-index:1}.gengage-chat-pills-arrow:hover{background:var(--_gengage-surface-muted);color:#334155}@media(prefers-reduced-motion:reduce){.gengage-chat-uispec>*,.gengage-chat-action-btn,.gengage-chat-product-card,.gengage-chat-product-card-cta,.gengage-chat-send,.gengage-chat-launcher,.gengage-chat-pill,.gengage-chat-drawer,.gengage-chat-typing-dots span,.gengage-chat-typing-sparkle,.gengage-chat-thinking-step-marker--active,.gengage-chat-bubble,.gengage-chat-panel-skeleton-block,.gengage-chat-ai-toppick-card,.gengage-chat-mic-btn--active,.gengage-chat-ai-toppick-spinner:after,.gengage-chat-panel-shimmer,.gengage-chat-overlay,.gengage-chat-product-details-skeleton-price,.gengage-chat-still-working{animation:none!important;transition:none!important;transform:none!important}}.gengage-chat-bubble--user{position:relative}.gengage-chat-rollback-btn{position:absolute;left:-28px;top:50%;transform:translateY(-50%);width:24px;height:24px;border:none;border-radius:50%;background:var(--gengage-surface-color, #f1f5f9);color:var(--gengage-text-secondary, #64748b);cursor:pointer;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .15s ease;padding:0}.gengage-chat-bubble--user:hover .gengage-chat-rollback-btn{opacity:1}.gengage-chat-rollback-btn:hover{background:var(--gengage-primary-color, #3b82f6);color:#fff}.gengage-chat-bubble--hidden{display:none}.gengage-chat-ai-top-picks{display:flex;flex-direction:column;gap:12px;padding:8px 0}.gengage-chat-ai-top-picks-title{font-size:15px;font-weight:600;color:var(--gengage-text-primary, #1e293b);margin:0 0 4px}.gengage-chat-ai-top-picks-cards{display:flex;flex-direction:column;gap:10px}.gengage-chat-ai-toppick-discount-badge{position:absolute;top:8px;left:8px;background:var(--gengage-discount-bg, #ef4444);color:#fff;font-size:11px;font-weight:700;padding:2px 6px;border-radius:4px;z-index:1}.gengage-chat-ai-toppick-card--winner{position:relative;display:flex;flex-direction:column;border:2px solid var(--gengage-primary-color, #3b82f6);border-radius:12px;background:#fff;overflow:hidden;transition:box-shadow .2s ease}.gengage-chat-ai-toppick-card--winner:hover{box-shadow:0 4px 16px #3b82f626}.gengage-chat-ai-toppick-card--winner .gengage-chat-ai-toppick-img{width:100%;height:140px;object-fit:contain;background:var(--_gengage-surface-muted)}.gengage-chat-ai-toppick-card--compact{position:relative;display:flex;flex-direction:row;align-items:center;gap:12px;border:1px solid var(--gengage-border-color, #e2e8f0);border-radius:10px;background:#fff;padding:10px;transition:box-shadow .2s ease,transform .15s ease}.gengage-chat-ai-toppick-card--compact:hover{box-shadow:0 2px 8px #00000014;transform:translateY(-1px)}.gengage-chat-ai-toppick-card--compact .gengage-chat-ai-toppick-img{width:64px;height:64px;object-fit:contain;border-radius:8px;background:var(--_gengage-surface-muted);flex-shrink:0}.gengage-chat-ai-toppick-badge{position:absolute;top:8px;left:8px;background:var(--gengage-primary-color, #3b82f6);color:#fff;font-size:10px;font-weight:700;text-transform:uppercase;padding:2px 8px;border-radius:4px;z-index:1;letter-spacing:.5px}.gengage-chat-ai-toppick-body{display:flex;flex-direction:column;gap:4px;padding:10px;flex:1;min-width:0}.gengage-chat-ai-toppick-card--compact .gengage-chat-ai-toppick-body{padding:0}.gengage-chat-ai-toppick-name{font-size:13px;font-weight:600;color:var(--gengage-text-primary, #1e293b);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.gengage-chat-ai-toppick-role{font-size:11px;font-weight:600;color:var(--gengage-primary-color, #3b82f6);text-transform:uppercase;letter-spacing:.3px}.gengage-chat-ai-toppick-labels{display:flex;flex-wrap:wrap;gap:4px}.gengage-chat-ai-toppick-label{font-size:11px;padding:1px 6px;border-radius:4px;font-weight:500}.gengage-chat-ai-toppick-label[data-sentiment=positive]{background:#dcfce7;color:#166534}.gengage-chat-ai-toppick-label[data-sentiment=negative]{background:#fee2e2;color:#991b1b}.gengage-chat-ai-toppick-label[data-sentiment=neutral]{background:var(--_gengage-surface-muted);color:#475569}.gengage-chat-ai-toppick-score{font-size:12px;font-weight:700;color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-ai-toppick-reason{font-size:12px;color:var(--gengage-chat-text-secondary, #666);line-height:1.4;margin-top:4px}.gengage-chat-ai-toppick-review{font-size:12px;font-style:italic;color:var(--gengage-text-secondary, #64748b);margin:2px 0;padding-left:8px;border-left:2px solid var(--gengage-border-color, #e2e8f0)}.gengage-chat-ai-toppick-price{font-size:14px;font-weight:700;color:var(--gengage-text-primary, #1e293b)}.gengage-chat-ai-toppick-original-price{text-decoration:line-through;color:var(--gengage-text-secondary, #64748b);font-weight:400;font-size:12px}.gengage-chat-ai-toppick-cta{display:block;width:calc(100% - 20px);margin:6px 10px 10px;padding:8px 0;border:none;border-radius:8px;background:var(--gengage-primary-color, #3b82f6);color:#fff;font-size:13px;font-weight:600;cursor:pointer;text-align:center;transition:background .15s ease}.gengage-chat-ai-toppick-cta:hover{filter:brightness(.92)}.gengage-chat-ai-toppick-card--compact .gengage-chat-ai-toppick-cta{width:auto;margin:0;padding:6px 14px;flex-shrink:0;align-self:center}.gengage-chat-ai-toppick-spinner{position:absolute;inset:0;background:#ffffffb3;display:flex;align-items:center;justify-content:center;border-radius:12px;z-index:3}.gengage-chat-ai-toppick-spinner:after{content:"";width:24px;height:24px;border:3px solid var(--gengage-border, #e2e8f0);border-top-color:var(--gengage-accent-primary, #3b82f6);border-radius:50%;animation:gengage-spin .7s linear infinite}@keyframes gengage-spin{to{transform:rotate(360deg)}}@media(max-width:768px){.gengage-chat-ai-top-picks-cards{flex-direction:row;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;gap:10px;padding-bottom:4px}.gengage-chat-ai-toppick-card--winner,.gengage-chat-ai-toppick-card--compact{min-width:280px;max-width:280px;flex-shrink:0;scroll-snap-align:start}.gengage-chat-ai-toppick-card--compact{flex-direction:column;align-items:stretch}.gengage-chat-ai-toppick-card--compact .gengage-chat-ai-toppick-img{width:100%;height:100px;border-radius:8px 8px 0 0}.gengage-chat-ai-toppick-card--compact .gengage-chat-ai-toppick-cta{width:calc(100% - 20px);margin:6px 10px 10px;align-self:stretch}.gengage-chat-rollback-btn{left:-24px}}.gengage-chat-grounding-review{display:flex;align-items:center;gap:12px;padding:12px 16px;background:var(--gengage-surface-color, #f8fafc);border:1px solid var(--gengage-border-color, #e2e8f0);border-radius:10px;transition:background .15s ease,border-color .15s ease}.gengage-chat-grounding-review:hover{background:var(--gengage-hover-color, #f1f5f9);border-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-grounding-review-icon{font-size:20px;flex-shrink:0}.gengage-chat-grounding-review-body{flex:1;min-width:0}.gengage-chat-grounding-review-title{font-weight:600;font-size:13px;color:var(--gengage-text-color, #1e293b)}.gengage-chat-grounding-review-subtitle{font-size:12px;color:var(--gengage-text-muted, #64748b);margin-top:2px}.gengage-chat-grounding-review-cta{font-size:13px;font-weight:500;color:var(--gengage-primary-color, #3b82f6);white-space:nowrap;flex-shrink:0}.gengage-chat-grouping-cards{display:flex;flex-direction:column;gap:6px}.gengage-chat-grouping-card{display:flex;align-items:center;gap:10px;padding:8px 12px;background:var(--gengage-surface-color, #f8fafc);border:1px solid var(--gengage-border-color, #e2e8f0);border-radius:8px;transition:background .15s ease,border-color .15s ease}.gengage-chat-grouping-card:hover{background:var(--gengage-hover-color, #f1f5f9);border-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-grouping-card-arrow{display:none;font-size:14px;color:var(--gengage-primary-color, #3b82f6);flex-shrink:0}.gengage-chat-grouping-card-img{width:20px;height:20px;border-radius:4px;object-fit:cover;flex-shrink:0}.gengage-chat-grouping-card-body{flex:1;min-width:0;display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}.gengage-chat-grouping-card-name{font-weight:600;font-size:13px;color:var(--gengage-text-color, #1e293b)}.gengage-chat-grouping-card-desc{font-size:12px;color:var(--gengage-text-muted, #64748b)}.gengage-chat-grouping-card-labels{display:block;font-size:11px;color:var(--gengage-chat-text-secondary, #888);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gengage-chat-root--mobile .gengage-chat-grouping-card-img{display:none}.gengage-chat-root--mobile .gengage-chat-grouping-card-arrow{display:inline}.gengage-chat-suggested-search-cards{display:flex;flex-direction:column;gap:8px}.gengage-chat-suggested-search-card{display:flex;align-items:flex-start;gap:12px;padding:10px 14px;background:var(--gengage-surface-color, #f8fafc);border:1px solid var(--gengage-border-color, #e2e8f0);border-radius:10px;transition:background .15s ease,border-color .15s ease}.gengage-chat-suggested-search-card:hover{background:var(--gengage-hover-color, #f1f5f9);border-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-suggested-search-card-img{width:40px;height:40px;border-radius:6px;object-fit:cover;flex-shrink:0}.gengage-chat-suggested-search-card-body{flex:1;min-width:0}.gengage-chat-suggested-search-card-name{font-weight:600;font-size:13px;color:var(--gengage-text-color, #1e293b)}.gengage-chat-suggested-search-card-desc{font-size:12px;color:var(--gengage-text-secondary, #475569);margin-top:2px}.gengage-chat-suggested-search-card-diff{font-size:11px;color:var(--gengage-text-muted, #64748b);margin-top:2px;font-style:italic}.gengage-chat-product-details-gallery{position:relative}.gengage-chat-product-details-gallery .gengage-chat-product-details-img{touch-action:pan-y}.gengage-chat-product-gallery-thumbs{display:flex;gap:8px;padding:10px 0 4px;overflow-x:auto;scrollbar-width:thin;justify-content:center;width:100%}.gengage-chat-product-gallery-thumb{width:56px;height:56px;object-fit:cover;border-radius:8px;border:2px solid transparent;cursor:pointer;flex-shrink:0;transition:border-color .15s ease;background:#fff}.gengage-chat-product-gallery-thumb:hover{border-color:var(--gengage-border-color, #cbd5e1)}.gengage-chat-product-gallery-thumb--active{border-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-product-variants{margin-top:12px}.gengage-chat-product-variants-label{font-size:12px;font-weight:600;color:var(--gengage-text-muted, #64748b);margin-bottom:6px;text-transform:uppercase;letter-spacing:.5px}.gengage-chat-product-variants-list{display:flex;flex-wrap:wrap;gap:6px}.gengage-chat-product-variant-btn{padding:6px 12px;border:1px solid var(--gengage-border-color, #e2e8f0);border-radius:6px;background:var(--gengage-surface-color, #f8fafc);color:var(--gengage-text-color, #1e293b);font-size:12px;cursor:pointer;transition:background .15s ease,border-color .15s ease}.gengage-chat-product-variant-btn:hover{background:var(--gengage-hover-color, #f1f5f9);border-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-product-grid-wrapper{display:flex;flex-direction:column;gap:8px}.gengage-chat-product-sort-toolbar{display:flex;gap:4px;padding:4px;background:var(--gengage-surface-color, #f8fafc);border-radius:8px;border:1px solid var(--gengage-border-color, #e2e8f0)}.gengage-chat-product-sort-btn{flex:1;padding:6px 10px;border:none;border-radius:6px;background:transparent;color:var(--gengage-text-muted, #64748b);font-size:12px;font-weight:500;cursor:pointer;transition:background .15s ease,color .15s ease}.gengage-chat-product-sort-btn:hover{background:var(--gengage-hover-color, #f1f5f9);color:var(--gengage-text-color, #1e293b)}.gengage-chat-product-sort-btn--active,.gengage-chat-product-sort-btn--active:hover{background:var(--gengage-primary-color, #3b82f6);color:#fff}.gengage-chat-product-sort-separator{width:1px;background:var(--gengage-border-color, #e2e8f0);margin:2px}.gengage-chat-comparison-toggle-btn{flex:none;padding:6px 10px;border:none;border-radius:6px;background:transparent;color:var(--gengage-text-muted, #64748b);font-size:12px;font-weight:500;cursor:pointer;transition:background .15s ease,color .15s ease;white-space:nowrap}.gengage-chat-comparison-toggle-btn:hover{background:var(--gengage-hover-color, #f1f5f9);color:var(--gengage-text-color, #1e293b)}.gengage-chat-comparison-toggle-btn--active,.gengage-chat-comparison-toggle-btn--active:hover{background:var(--gengage-primary-color, #3b82f6);color:#fff}.gengage-chat-comparison-select-wrapper{position:relative}.gengage-chat-comparison-checkbox{position:absolute;top:8px;right:8px;z-index:4;width:20px;height:20px;cursor:pointer;accent-color:var(--gengage-primary-color, #3b82f6);background:#fff;border-radius:4px;box-shadow:0 1px 3px #00000026}.gengage-chat-comparison-floating-btn{display:block;width:100%;padding:10px 16px;border:none;border-radius:8px;background:var(--gengage-primary-color, #3b82f6);color:#fff;font-size:14px;font-weight:600;cursor:pointer;transition:background .15s ease;text-align:center;position:sticky;bottom:0;z-index:5;box-shadow:0 -2px 8px #0000001a}.gengage-chat-comparison-floating-btn:hover:not(:disabled){background:var(--gengage-primary-hover, #2563eb)}.gengage-chat-comparison-floating-btn--disabled{background:#94a3b8;cursor:default;opacity:.8}.gengage-chat-panel-topbar{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--_gengage-border-color);background:var(--_gengage-surface-muted);min-height:44px;flex-shrink:0;position:sticky;top:0;z-index:3}.gengage-chat-panel-topbar-back,.gengage-chat-panel-topbar-forward{width:28px;height:28px;min-width:28px;padding:0;border:1px solid #d1d5db;border-radius:6px;background:transparent;color:#374151;font-size:14px;font-family:inherit;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s ease,border-color .15s ease,opacity .15s ease}.gengage-chat-panel-topbar-back:hover:not(:disabled),.gengage-chat-panel-topbar-forward:hover:not(:disabled){background:var(--_gengage-surface-secondary);border-color:#9ca3af}.gengage-chat-panel-topbar-back:disabled,.gengage-chat-panel-topbar-forward:disabled{opacity:.3;cursor:default}.gengage-chat-panel-topbar-title{flex:1;font-size:14px;font-weight:600;color:var(--_gengage-text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}@keyframes gengage-typewriter-fade-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.gengage-chat-typewriter-block{display:block;animation:gengage-typewriter-fade-in .15s ease both}@media(prefers-reduced-motion:reduce){.gengage-chat-typewriter-block{animation:none}}.gengage-product-mention{color:var(--gengage-primary-color, #3b82f6);text-decoration:none;cursor:pointer;font-weight:500;border-bottom:1px dashed var(--gengage-primary-color, #3b82f6);transition:border-color .15s}.gengage-product-mention:hover{border-bottom-style:solid}@keyframes gengage-skeleton-pulse{0%,to{opacity:.4}50%{opacity:.8}}.gengage-chat-panel-skeleton-block{animation:gengage-skeleton-pulse 1.5s ease-in-out infinite}@media(prefers-reduced-motion:reduce){.gengage-chat-panel-skeleton-block{animation:none}}.gengage-chat-input-chips{display:flex;gap:6px;padding:4px 12px 2px;flex-wrap:wrap}.gengage-chat-input-chip{display:inline-flex;align-items:center;padding:4px 10px;border-radius:12px;border:1px solid var(--_gengage-border-color);background:#f9fafb;color:#374151;font-size:12px;font-weight:500;font-family:inherit;cursor:pointer;transition:background .12s,border-color .12s;white-space:nowrap}.gengage-chat-input-chip:hover{background:var(--_gengage-surface-secondary);border-color:#d1d5db}.gengage-chat-icon{width:14px;height:14px;flex-shrink:0}.gengage-chat-input-chip-icon,.gengage-chat-pill-icon{display:inline-flex;align-items:center;margin-right:4px}.gengage-chat-product-card-img-wrapper,.gengage-chat-product-details-img-wrap{position:relative;overflow:hidden}.gengage-chat-product-card-discount-badge{position:absolute;top:6px;left:6px;padding:2px 6px;border-radius:4px;background:var(--_gengage-discount-color);color:#fff;font-size:11px;font-weight:700;line-height:1.3;z-index:1}.gengage-chat-product-card-stock{font-size:11px;font-weight:600;margin-top:2px}.gengage-chat-product-card-stock.is-in-stock{color:var(--_gengage-success-color)}.gengage-chat-product-card-stock.is-out-of-stock{color:#dc2626}.gengage-chat-find-similar-pill{position:absolute;top:40px;right:8px;opacity:0;pointer-events:none;transition:opacity .2s ease;padding:4px 10px;font-size:11px;font-weight:500;font-family:inherit;border:none;border-radius:12px;background:var(--gengage-chat-pill-bg, rgba(0, 0, 0, .7));color:var(--gengage-chat-pill-text, #fff);cursor:pointer;white-space:nowrap;z-index:2}.gengage-chat-product-card-img-wrapper:hover .gengage-chat-find-similar-pill,.gengage-chat-product-details-img-wrap:hover .gengage-chat-find-similar-pill{opacity:1;pointer-events:auto}.gengage-chat-favorite-btn{position:absolute;top:8px;right:8px;background:#ffffffe6;border:none;border-radius:50%;width:28px;height:28px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--gengage-text-secondary, #64748b);z-index:3;transition:color .2s;padding:0}.gengage-chat-favorite-btn:hover,.gengage-chat-favorite-btn--active{color:var(--gengage-accent-primary, #ef4444)}.gengage-chat-product-card-promos,.gengage-chat-product-details-promos{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}.gengage-chat-product-card-promo-badge,.gengage-chat-product-details-promo-badge{display:inline-block;padding:2px 6px;font-size:10px;font-weight:500;border-radius:4px;background:var(--gengage-chat-promo-bg, #e8f5e9);color:var(--gengage-chat-promo-text, #2e7d32);white-space:nowrap}.gengage-chat-thumbnails-column{position:absolute;right:4px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;gap:4px;z-index:2;pointer-events:auto}.gengage-chat-thumbnail-btn{display:flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;border:2px solid var(--_gengage-border-color);border-radius:6px;background:#fff;cursor:pointer;overflow:hidden;transition:border-color .15s ease}.gengage-chat-thumbnail-btn:hover{border-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-thumbnail-img{width:100%;height:100%;object-fit:cover}.gengage-chat-choice-prompter{position:absolute;bottom:12px;right:12px;width:200px;padding:12px 14px;background:#fff;border:1px solid var(--_gengage-border-color);border-radius:10px;box-shadow:0 4px 12px #0000001a;z-index:10;animation:gengage-choice-prompter-in .2s ease}@keyframes gengage-choice-prompter-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.gengage-chat-choice-prompter-heading{font-size:13px;font-weight:600;color:var(--_gengage-text-primary);margin-bottom:4px}.gengage-chat-choice-prompter-suggestion{font-size:12px;color:#6b7280;margin-bottom:10px;line-height:1.4}.gengage-chat-choice-prompter-cta{display:block;width:100%;padding:6px 12px;border:none;border-radius:6px;background:var(--gengage-primary-color, #3b82f6);color:#fff;font-size:12px;font-weight:600;font-family:inherit;cursor:pointer;text-align:center;transition:opacity .15s ease}.gengage-chat-choice-prompter-cta:hover{opacity:.9}.gengage-chat-choice-prompter-dismiss{position:absolute;top:4px;right:6px;padding:2px 6px;border:none;background:none;color:#6b7280;font-size:16px;cursor:pointer;line-height:1}.gengage-chat-choice-prompter-dismiss:hover{color:#6b7280}@media(prefers-reduced-motion:reduce){.gengage-chat-choice-prompter{animation:none}}.gengage-chat-pros-cons{padding:12px 14px;background:var(--_gengage-surface-muted);border-radius:8px;margin:8px 0}.gengage-chat-pros-cons-heading{margin:0 0 10px;font-size:14px;font-weight:600;color:#0f172a}.gengage-chat-pros-cons-list{list-style:none;margin:0 0 8px;padding:0}.gengage-chat-pros-cons-list:last-child{margin-bottom:0}.gengage-chat-pros-cons-item{display:flex;align-items:flex-start;gap:8px;padding:4px 0;font-size:13px;line-height:1.5;color:#334155}.gengage-chat-pros-cons-icon{flex-shrink:0;width:18px;height:18px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;border-radius:50%}.gengage-chat-pros-cons-icon--pro{color:var(--_gengage-success-color);background:color-mix(in srgb,var(--_gengage-success-color) 15%,#fff)}.gengage-chat-pros-cons-icon--con{color:#dc2626;background:#fee2e2}.gengage-chat-categories{display:flex;flex-direction:column;gap:8px}.gengage-chat-categories-tabs{display:flex;gap:4px;overflow-x:auto;padding:4px 0;-webkit-overflow-scrolling:touch}.gengage-chat-categories-tab{padding:6px 14px;border:1px solid var(--gengage-border-color, #e5e7eb);border-radius:20px;background:var(--gengage-bg, #fff);color:var(--gengage-text, #374151);cursor:pointer;white-space:nowrap;font-size:13px;transition:background .15s,color .15s}.gengage-chat-categories-tab:hover{background:var(--gengage-bg-hover, #f3f4f6)}.gengage-chat-categories-tab--active{background:var(--gengage-primary, #2563eb);color:#fff;border-color:var(--gengage-primary, #2563eb)}.gengage-chat-categories-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px}.gengage-chat-categories-filter-tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:4px}.gengage-chat-categories-filter-tag{padding:4px 10px;border:1px solid var(--gengage-border-color, #e5e7eb);border-radius:14px;background:var(--gengage-bg, #fff);color:var(--gengage-text-secondary, #6b7280);font-size:12px;cursor:pointer;transition:background .15s}.gengage-chat-categories-filter-tag:hover{background:var(--gengage-bg-hover, #f3f4f6)}.gengage-chat-product-grid-view-more{display:block;width:100%;padding:10px;margin-top:8px;border:1px solid var(--gengage-border-color, #e5e7eb);border-radius:8px;background:var(--gengage-bg, #fff);color:var(--gengage-primary, #2563eb);font-size:14px;font-weight:500;cursor:pointer;text-align:center;transition:background .15s;grid-column:1 / -1}.gengage-chat-product-grid-view-more:hover{background:var(--gengage-bg-hover, #f3f4f6)}.gengage-chat-product-grid--mobile{display:flex;overflow-x:auto;gap:8px;padding:8px 0;-webkit-overflow-scrolling:touch}.gengage-chat-product-grid--mobile .gengage-chat-product-card{min-width:160px;max-width:180px;flex-shrink:0}.gengage-chat-comparison--mobile{overflow-x:auto;-webkit-overflow-scrolling:touch}.gengage-chat-comparison--mobile .gengage-chat-comparison-table{min-width:480px}.gengage-chat-comparison-key-differences{margin-top:12px;padding:12px;background:var(--gengage-bg-secondary, #f9fafb);border-radius:8px}.gengage-chat-comparison-key-differences h4{margin:0 0 8px;font-size:14px;font-weight:600;color:var(--gengage-text, #374151)}.gengage-chat-comparison-key-differences-content{font-size:13px;color:var(--gengage-text-secondary, #6b7280);line-height:1.5}.gengage-chat-comparison-key-differences-content ul{margin:0;padding-left:18px}.gengage-chat-comparison-key-differences-content li{margin-bottom:4px}.gengage-chat-product-details-similars-heading{margin:16px 0 8px;font-size:15px;font-weight:600;color:var(--gengage-text, #374151)}.gengage-chat-product-details-similars{margin-top:8px}.gengage-chat-handoff-notice{display:flex;flex-direction:column;align-items:center;gap:6px;padding:16px;margin:8px 0;background:#fef3c7;border:1px solid #fcd34d;border-radius:8px;text-align:center}.gengage-chat-handoff-notice-icon{font-size:24px}.gengage-chat-handoff-notice-heading{margin:0;font-size:14px;font-weight:600;color:#92400e}.gengage-chat-handoff-notice-summary{margin:0;font-size:13px;line-height:1.5;color:#78350f}.gengage-qty-stepper{display:inline-flex;align-items:center;gap:0;border:1px solid #d1d5db;border-radius:8px;overflow:hidden;background:#fff}.gengage-qty-btn{width:var(--_gengage-qty-btn-size);height:var(--_gengage-qty-btn-size);border:none;background:transparent;color:#374151;font-size:14px;font-weight:600;font-family:inherit;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background-color .12s}.gengage-qty-btn:hover:not(:disabled){background:var(--_gengage-surface-secondary)}.gengage-qty-btn:disabled{opacity:.35;cursor:default}.gengage-qty-value{min-width:24px;text-align:center;font-size:13px;font-weight:600;color:var(--_gengage-text-primary);-webkit-user-select:none;user-select:none}.gengage-qty-submit{border:none;border-left:1px solid #d1d5db;background:var(--_gengage-success-color);color:#fff;font-size:13px;font-weight:700;font-family:inherit;cursor:pointer;padding:6px 12px;transition:filter .12s ease,transform .12s ease}.gengage-qty-submit:hover{filter:brightness(1.08)}.gengage-qty-submit:active{transform:translateY(1px)}.gengage-qty-submit--success{background:var(--_gengage-success-color);transition:background .2s ease}.gengage-qty-stepper--compact{border-radius:14px;box-shadow:0 2px 6px #0000001f}.gengage-qty-stepper--compact .gengage-qty-btn{width:var(--_gengage-qty-btn-size-compact);height:var(--_gengage-qty-btn-size-compact);font-size:12px}.gengage-qty-stepper--compact .gengage-qty-value{min-width:18px;font-size:12px}.gengage-qty-stepper--compact .gengage-qty-submit{padding:4px 8px;font-size:13px;border-radius:0 14px 14px 0}.gengage-chat-product-details-atc-stepper{border-radius:10px}.gengage-chat-product-details-atc-stepper .gengage-qty-btn{width:32px;height:32px}.gengage-chat-product-details-atc-stepper .gengage-qty-value{min-width:28px;font-size:14px}.gengage-chat-product-details-atc-stepper .gengage-qty-submit{padding:8px 18px;font-size:14px;border-radius:0 10px 10px 0}.gengage-chat-product-details-share{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border:1px solid #d1d5db;border-radius:10px;background:transparent;color:#6b7280;cursor:pointer;transition:color .12s,border-color .12s,background-color .12s;position:relative;flex-shrink:0}.gengage-chat-product-details-share:hover{color:var(--gengage-primary-color, #3b82f6);border-color:var(--gengage-primary-color, #3b82f6);background:#f0f7ff}.gengage-chat-product-details-share:before{content:attr(aria-label);position:absolute;bottom:calc(100% + 6px);left:50%;transform:translate(-50%);padding:4px 8px;border-radius:4px;background:var(--_gengage-surface-dark);color:#fff;font-size:11px;font-weight:500;white-space:nowrap;pointer-events:none;opacity:0;transition:opacity .15s ease;z-index:2}.gengage-chat-product-details-share:hover:before{opacity:1}.gengage-chat-product-details-share--copied:after{content:"✓";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:var(--_gengage-success-color);color:#fff;border-radius:10px;font-size:16px;font-weight:700}.gengage-chat-launcher:focus-visible,.gengage-chat-close:focus-visible,.gengage-chat-header-btn:focus-visible,.gengage-chat-header-powered:focus-visible,.gengage-chat-send:focus-visible,.gengage-chat-action-btn:focus-visible,.gengage-chat-pill:focus-visible,.gengage-chat-input-chip:focus-visible,.gengage-chat-pills-arrow:focus-visible,.gengage-chat-error-retry:focus-visible,.gengage-chat-product-card-cta:focus-visible,.gengage-chat-product-details-cta:focus-visible,.gengage-chat-product-details-atc:focus-visible,.gengage-chat-product-detail-tab:focus-visible,.gengage-chat-panel-divider-toggle:focus-visible,.gengage-chat-panel-topbar-back:focus-visible,.gengage-chat-panel-topbar-forward:focus-visible,.gengage-chat-rollback-btn:focus-visible,.gengage-chat-ai-toppick-cta:focus-visible,.gengage-chat-comparison-view-btn:focus-visible,.gengage-chat-comparison-toggle-btn:focus-visible,.gengage-chat-comparison-floating-btn:focus-visible,.gengage-chat-comparison-checkbox:focus-visible,.gengage-chat-product-sort-btn:focus-visible,.gengage-chat-product-variant-btn:focus-visible,.gengage-chat-product-gallery-thumb:focus-visible,.gengage-chat-thumbnail-btn:focus-visible,.gengage-chat-find-similar-pill:focus-visible,.gengage-chat-favorite-btn:focus-visible,.gengage-chat-attach-btn:focus-visible,.gengage-chat-mic-btn:focus-visible,.gengage-chat-attachment-remove:focus-visible,.gengage-chat-kvkk-dismiss:focus-visible,.gengage-chat-choice-prompter-cta:focus-visible,.gengage-chat-choice-prompter-dismiss:focus-visible,.gengage-chat-categories-tab:focus-visible,.gengage-chat-categories-filter-tag:focus-visible,.gengage-chat-product-grid-view-more:focus-visible,.gengage-chat-product-details-share:focus-visible,.gengage-qty-btn:focus-visible,.gengage-qty-submit:focus-visible{outline:2px solid var(--gengage-primary-color, #3b82f6);outline-offset:2px}@media(max-width:768px){.gengage-chat-choice-prompter{position:sticky;left:12px;right:12px;width:auto;max-width:none;bottom:calc(var(--_gengage-chat-launcher-bottom) + var(--_gengage-chat-launcher-size) + 12px + env(safe-area-inset-bottom,0px));max-height:40vh;overflow-y:auto}.gengage-chat-product-sort-btn,.gengage-chat-comparison-toggle-btn{min-height:40px}.gengage-chat-input-chip{min-height:40px;padding:8px 12px}.gengage-chat-choice-prompter-dismiss{width:32px;height:32px}.gengage-chat-panel-divider-toggle{min-height:44px}.gengage-chat-product-details-atc-stepper .gengage-qty-btn{width:44px;height:44px}.gengage-chat-product-details-atc-stepper .gengage-qty-submit,.gengage-qty-stepper--compact .gengage-qty-submit{min-height:44px}.gengage-qty-stepper--compact .gengage-qty-submit{min-width:44px;padding:0 10px}.gengage-qty-stepper--compact .gengage-qty-btn{width:44px;height:44px;font-size:14px}.gengage-qty-stepper--compact .gengage-qty-value{min-width:24px;font-size:13px}.gengage-chat-product-card-cta,.gengage-chat-choice-prompter-cta,.gengage-chat-product-grid-view-more{min-height:44px;display:flex;align-items:center;justify-content:center}.gengage-chat-panel-topbar-back,.gengage-chat-panel-topbar-forward,.gengage-chat-favorite-btn,.gengage-chat-product-details-share{width:44px;height:44px}}', Va = B({
3170
- role: we(["user", "assistant"]),
3171
- content: w(),
3172
- timestamp: Q().optional()
3173
- }), Wa = B({
3174
- sku: w(),
3175
- name: w(),
3176
- imageUrl: w().url().optional(),
3177
- price: w().optional(),
3178
- originalPrice: w().optional(),
3179
- url: w().url(),
3150
+ const Qa = ':host{all:initial;font-family:var(--gengage-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);font-size:var(--gengage-font-size, 14px)}.gengage-chat-root button,.gengage-chat-root [role=button],.gengage-chat-root a{cursor:pointer}.gengage-chat-root{position:fixed;z-index:var(--gengage-z-index, 2147483647);--_gengage-chat-offset: var(--gengage-chat-offset, 20px);--_gengage-chat-launcher-bottom: var(--gengage-chat-launcher-bottom, 20px);--_gengage-chat-launcher-right: var(--gengage-chat-launcher-right, 20px);--_gengage-chat-launcher-size: var(--gengage-chat-launcher-size, 56px);--_gengage-chat-drawer-width: var(--gengage-chat-width, 400px);--_gengage-chat-radius: var(--gengage-chat-shell-radius, 12px);--_gengage-chat-header-height: var(--gengage-chat-header-height, 60px);--_gengage-chat-conversation-width: var(--gengage-chat-conversation-width, 396px);--_gengage-chat-panel-min-width: var(--gengage-chat-panel-min-width, 320px);--_gengage-chat-panel-max-width: var(--gengage-chat-panel-max-width, 860px);--_gengage-chat-input-height: var(--gengage-chat-input-height, 48px);--_gengage-chat-shadow: var(--gengage-chat-shadow, 0 12px 40px rgba(15, 23, 42, .18));--_gengage-border-color: var(--gengage-border-color, #e5e7eb);--_gengage-discount-color: var(--gengage-discount-color, #ef4444);--_gengage-success-color: var(--gengage-success-color, #16a34a);--_gengage-text-primary: var(--gengage-text-primary, #1f2937);--_gengage-text-secondary: var(--gengage-text-secondary, #64748b);--_gengage-surface-secondary: var(--gengage-surface-secondary, #f3f4f6);--_gengage-surface-muted: var(--gengage-surface-muted, #f8fafc);--_gengage-surface-dark: var(--gengage-surface-dark, #1e293b);--_gengage-rating-color: var(--gengage-rating-color, #d97706);--_gengage-qty-btn-size: var(--gengage-qty-btn-size, 28px);--_gengage-qty-btn-size-compact: var(--gengage-qty-btn-size-compact, 24px)}.gengage-chat-launcher-container{position:fixed;bottom:var(--_gengage-chat-launcher-bottom);right:var(--_gengage-chat-launcher-right);display:flex;flex-direction:column;align-items:flex-end;gap:10px;z-index:var(--gengage-z-index, 2147483647)}.gengage-chat-launcher-content-area,.gengage-chat-launcher-content-area-bottom{display:flex;flex-direction:column;align-items:flex-end;gap:8px}.gengage-chat-launcher-content-area:empty,.gengage-chat-launcher-content-area-bottom:empty{display:none}.gengage-chat-root--open .gengage-chat-launcher-content-area,.gengage-chat-root--open .gengage-chat-launcher-content-area-bottom{display:none}.gengage-chat-root--open .gengage-chat-launcher-container{pointer-events:none;opacity:0;transition:opacity .2s ease}.gengage-chat-launcher{width:var(--_gengage-chat-launcher-size);height:var(--_gengage-chat-launcher-size);border-radius:50%;border:none;background:var(--gengage-primary-color, #3b82f6);color:var(--gengage-primary-foreground, #fff);cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 8px 22px #0f172a47;transition:transform .18s cubic-bezier(.2,.8,.2,1),box-shadow .18s ease;position:relative;flex-shrink:0}.gengage-chat-launcher:hover{transform:scale(1.05);box-shadow:0 14px 28px #0f172a47}.gengage-chat-launcher svg{width:24px;height:24px}.gengage-chat-launcher--hidden-mobile{display:none!important}.gengage-chat-launcher-tooltip{position:absolute;right:calc(100% + 12px);top:50%;transform:translateY(-50%);padding:6px 12px;border-radius:8px;background:var(--_gengage-surface-dark);color:#fff;font-size:13px;font-weight:500;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .2s ease;box-shadow:0 2px 8px #00000026}.gengage-chat-launcher-tooltip:after{content:"";position:absolute;left:100%;top:50%;transform:translateY(-50%);border:5px solid transparent;border-left-color:var(--_gengage-surface-dark)}.gengage-chat-launcher:hover .gengage-chat-launcher-tooltip{opacity:1}.gengage-chat-root--open .gengage-chat-launcher-tooltip{display:none}.gengage-chat-drawer{position:fixed;top:0;bottom:0;right:0;width:var(--_gengage-chat-drawer-width);max-height:-webkit-fill-available;max-height:100dvh;border-radius:0;background:var(--gengage-background-color, #fff);box-shadow:var(--_gengage-chat-shadow);display:flex;flex-direction:column;overflow:hidden;z-index:var(--gengage-z-index, 2147483647);transform:translate(0);transition:transform .25s cubic-bezier(.4,0,.2,1),opacity .2s ease;opacity:1}.gengage-chat-root--mobile .gengage-chat-launcher-container{right:var(--gengage-chat-launcher-mobile-right, 16px);bottom:calc(var(--gengage-chat-launcher-mobile-bottom, 16px) + env(safe-area-inset-bottom,0px))}.gengage-chat-root--mobile .gengage-chat-drawer{left:0;right:0;bottom:0;width:100%;max-width:none;max-height:-webkit-fill-available;max-height:100dvh;border-radius:16px 16px 0 0;border-top:1px solid rgba(0,0,0,.06);box-shadow:0 -4px 16px #0000001a,0 12px 40px #0f172a2e;padding-bottom:env(safe-area-inset-bottom,0px)}.gengage-chat-root--mobile.gengage-chat-root--open:before{content:"";position:fixed;inset:0;background:#0000001f;z-index:-1;pointer-events:none}.gengage-chat-root--mobile.gengage-chat-root--mobile-half .gengage-chat-drawer{top:auto;height:min(72dvh,620px);max-height:min(72dvh,620px)}.gengage-chat-root--mobile.gengage-chat-root--mobile-full .gengage-chat-drawer{top:0;height:100dvh;max-height:100dvh;border-radius:0;border-top:none}.gengage-chat-root--mobile .gengage-chat-input-area{padding-bottom:calc(10px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--_gengage-border-color, #e5e7eb);transform:translateY(calc(-1 * var(--gengage-keyboard-offset, 0px)))}.gengage-chat-header{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;min-height:var(--_gengage-chat-header-height);padding:4px 12px;background:var(--gengage-chat-header-bg, #1d2939);color:var(--gengage-chat-header-foreground, #fff);box-shadow:0 4px 20px #00000014,0 0 2px #0000001f;border:none;position:relative;z-index:2}.gengage-chat-header-left{display:flex;align-items:center;gap:10px;min-width:0}.gengage-chat-header-avatar{width:40px;height:40px;border-radius:50%;object-fit:cover;flex-shrink:0;border:2px solid rgba(255,255,255,.15)}.gengage-chat-header-info{display:flex;flex-direction:column;gap:2px;min-width:0}.gengage-chat-header-title-row{display:flex;align-items:center;gap:6px}.gengage-chat-header-title{font-weight:700;font-size:15px;line-height:1.25;letter-spacing:.01em;color:inherit}.gengage-chat-header-badge{display:inline-flex;align-items:center;padding:1px 6px;border-radius:4px;background:var(--gengage-primary-color, #3b82f6);color:#fff;font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;line-height:1.5}.gengage-chat-header-powered{display:flex;align-items:center;gap:4px;font-size:11px;color:#ffffffbf;text-decoration:none;transition:color .15s}.gengage-chat-header-powered:hover{color:#fffc}.gengage-chat-header-powered svg{width:12px;height:12px;opacity:.6}.gengage-chat-header-right{display:flex;align-items:center;gap:4px;flex-shrink:0}.gengage-chat-header-btn{width:32px;height:32px;border-radius:8px;background:transparent;border:1px solid rgba(255,255,255,.12);color:#ffffffb3;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;line-height:1;transition:background-color .15s ease,color .15s ease,border-color .15s ease}.gengage-chat-header-btn:hover{background:#ffffff1a;color:#fff;border-color:#ffffff40}.gengage-chat-close{width:32px;height:32px;border-radius:8px;background:transparent;border:1px solid rgba(255,255,255,.12);color:#ffffffb3;font-size:18px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;line-height:1;transition:background-color .15s ease,color .15s ease,border-color .15s ease}.gengage-chat-close:hover{background:#ffffff1a;color:#fff;border-color:#ffffff40}.gengage-chat-body{display:flex;flex:1;overflow:hidden;min-height:0}.gengage-chat-panel{display:none;width:0;overflow:hidden;transition:width .22s cubic-bezier(.2,.72,.2,1)}.gengage-chat-panel--visible{display:flex;flex-direction:column;position:relative;box-sizing:border-box;width:440px;min-width:440px;background:var(--gengage-chat-panel-bg, #fff);border-right:1px solid var(--_gengage-border-color);overflow-y:auto;padding:16px;background:var(--_gengage-surface-muted)}.gengage-chat-panel-divider{display:flex;align-items:center;width:4px;cursor:pointer;background:var(--_gengage-border-color);position:relative;flex-shrink:0;transition:background .15s;z-index:2}.gengage-chat-panel-divider:hover{background:#cbd5e1}.gengage-chat-panel-divider--hidden{display:none}.gengage-chat-panel-divider-toggle{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:24px;height:48px;border:1px solid var(--_gengage-border-color);border-radius:6px;background:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:14px;color:var(--_gengage-text-secondary);box-shadow:0 1px 3px #00000014;transition:background .15s,color .15s;padding:0;line-height:1}.gengage-chat-panel-divider-toggle:hover{background:var(--_gengage-surface-muted);color:#334155}.gengage-chat-panel--collapsed{flex:0 0 0px!important;width:0!important;min-width:0!important;max-width:0!important;padding:0!important;border-right:none!important;overflow:hidden}.gengage-chat-panel--collapsed~.gengage-chat-panel-divider{width:0;background:transparent}.gengage-chat-panel--collapsed~.gengage-chat-panel-divider .gengage-chat-panel-divider-toggle{left:0;transform:translateY(-50%)}.gengage-chat-conversation{display:flex;flex-direction:column;flex:1;min-width:0;overflow:hidden;background:var(--gengage-background-color, #fff);position:relative;z-index:1}.gengage-chat-drawer--with-panel{width:auto;background:transparent;box-shadow:none}.gengage-chat-drawer--with-panel .gengage-chat-header{border-radius:0;flex-shrink:0}.gengage-chat-drawer--with-panel .gengage-chat-body{flex:1 1 0;min-height:0;gap:0;padding:0;align-items:stretch}.gengage-chat-drawer--with-panel .gengage-chat-panel--visible{flex:0 0 auto;width:clamp(var(--_gengage-chat-panel-min-width),50vw,var(--_gengage-chat-panel-max-width));min-width:var(--_gengage-chat-panel-min-width);max-width:var(--_gengage-chat-panel-max-width);border-right:none;background:#fff;padding:0 16px 16px;overflow-y:auto;margin:0;border-radius:0;box-shadow:0 8px 32px #0f172a1f,0 2px 8px #0f172a0f;max-height:100dvh}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider{width:0;background:transparent}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle{width:20px;height:48px;border-radius:10px;background:var(--gengage-primary-color, #3b82f6);color:#fff;border:2px solid #fff;box-shadow:0 2px 8px #0f172a2e;font-size:12px;z-index:10}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle:hover{background:var(--gengage-primary-hover, #2563eb);color:#fff}.gengage-chat-drawer--with-panel .gengage-chat-conversation{flex:0 0 var(--_gengage-chat-conversation-width);width:var(--_gengage-chat-conversation-width);border-left:none;background:var(--gengage-background-color, #fff);box-shadow:-4px 0 24px #0f172a1f,-1px 0 4px #0f172a0f}.gengage-chat-drawer--with-panel .gengage-chat-messages{padding-right:6px;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.12) transparent}.gengage-chat-drawer--with-panel .gengage-chat-messages::-webkit-scrollbar{width:0}.gengage-chat-drawer--with-panel:has(.gengage-chat-panel--collapsed){width:var(--_gengage-chat-conversation-width);background:var(--gengage-background-color, #fff);box-shadow:var(--_gengage-chat-shadow)}.gengage-chat-drawer--with-panel .gengage-chat-footer{display:none}.gengage-chat-messages{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:16px;min-height:0;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;touch-action:pan-y}.gengage-chat-messages::-webkit-scrollbar{width:6px}.gengage-chat-messages::-webkit-scrollbar-track{background:transparent}.gengage-chat-messages::-webkit-scrollbar-thumb{background:#0000001f;border-radius:3px}.gengage-chat-messages::-webkit-scrollbar-thumb:hover{background:#0003}.gengage-chat-bubble{max-width:85%;padding:12px 16px;border-radius:12px;line-height:1.5;font-size:14px;font-weight:500;word-wrap:break-word;overflow-wrap:break-word;animation:gengage-chat-msg-in .3s cubic-bezier(.2,.7,.2,1)}@keyframes gengage-chat-msg-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.gengage-chat-bubble--user{align-self:flex-end;background:var(--gengage-primary-color, #3b82f6);color:var(--gengage-primary-foreground, #fff);border-bottom-right-radius:4px}.gengage-chat-bubble--assistant{align-self:flex-start;background:var(--_gengage-surface-secondary);color:var(--_gengage-text-primary);border-bottom-left-radius:4px;min-width:120px}.gengage-chat-bubble--active{outline:2px solid var(--gengage-primary-color, #3b82f6);outline-offset:-2px}.gengage-chat-bubble--assistant:empty{display:none}.gengage-chat-bubble--assistant .gengage-chat-bubble-text a{color:var(--gengage-primary-color, #2563eb);text-decoration:underline}.gengage-chat-bubble--assistant .gengage-chat-bubble-text a:hover{text-decoration:none}.gengage-chat-bubble--assistant .gengage-chat-bubble-text p{margin:0 0 8px}.gengage-chat-bubble--assistant .gengage-chat-bubble-text p:last-child{margin-bottom:0}.gengage-chat-bubble--assistant .gengage-chat-bubble-text ul,.gengage-chat-bubble--assistant .gengage-chat-bubble-text ol{margin:6px 0;padding-left:20px}.gengage-chat-bubble--assistant .gengage-chat-bubble-text li{margin-bottom:6px;line-height:1.5}.gengage-chat-bubble--assistant .gengage-chat-bubble-text code{background:#0000000f;padding:1px 4px;border-radius:3px;font-size:.9em}.gengage-chat-bubble--assistant .gengage-chat-bubble-text pre{background:#0000000a;padding:8px;border-radius:6px;overflow-x:auto;margin:4px 0}.gengage-chat-bubble--assistant .gengage-chat-bubble-text table{border-collapse:collapse;margin:4px 0;font-size:.9em}.gengage-chat-bubble--assistant .gengage-chat-bubble-text th,.gengage-chat-bubble--assistant .gengage-chat-bubble-text td{border:1px solid var(--_gengage-border-color);padding:4px 8px}.gengage-chat-bubble--assistant .gengage-chat-bubble-text img{max-width:100%;height:auto;border-radius:4px;margin:4px 0}.gengage-chat-bubble--assistant .gengage-chat-bubble-text h1,.gengage-chat-bubble--assistant .gengage-chat-bubble-text h2,.gengage-chat-bubble--assistant .gengage-chat-bubble-text h3,.gengage-chat-bubble--assistant .gengage-chat-bubble-text h4,.gengage-chat-bubble--assistant .gengage-chat-bubble-text h5,.gengage-chat-bubble--assistant .gengage-chat-bubble-text h6{margin:8px 0 4px;line-height:1.3;color:#0f172a}.gengage-chat-bubble--assistant .gengage-chat-bubble-text blockquote{border-left:3px solid var(--_gengage-border-color);padding-left:12px;margin:4px 0;color:var(--_gengage-text-secondary)}.gengage-chat-bubble--first{border-left:3px solid var(--gengage-accent-primary, #3b82f6);padding-left:12px}.gengage-chat-bubble--first .gengage-chat-bubble-text{font-size:15px}.gengage-chat-typing{display:flex;align-items:center;gap:5px;padding:8px 4px;align-self:flex-start;max-width:85%}.gengage-chat-typing:has(.gengage-chat-typing-text),.gengage-chat-typing:has(.gengage-chat-thinking-steps){background:var(--_gengage-surface-secondary);padding:10px 14px;border-radius:12px 12px 12px 4px;gap:8px}.gengage-chat-typing-dots{display:flex;align-items:center;gap:5px}.gengage-chat-typing-dots span{width:6px;height:6px;border-radius:50%;background:#94a3b8;display:inline-block;animation:gengage-chat-typing-fade 1.4s ease-in-out infinite}.gengage-chat-typing-dots span:nth-child(2){animation-delay:.2s}.gengage-chat-typing-dots span:nth-child(3){animation-delay:.4s}@keyframes gengage-chat-typing-fade{0%,to{opacity:.25}50%{opacity:1}}.gengage-chat-typing-sparkle{animation:gengage-sparkle-pulse 1.2s infinite}@keyframes gengage-sparkle-pulse{0%,to{opacity:1}50%{opacity:.4}}.gengage-chat-typing-text{font-size:13px;color:var(--_gengage-text-secondary);font-style:italic;flex:1;min-width:0;word-wrap:break-word;overflow-wrap:break-word}.gengage-chat-stop-btn{display:flex;align-items:center;gap:6px;margin:4px 0 8px;padding:6px 14px;border:1px solid #d1d5db;border-radius:16px;background:#fff;color:var(--_gengage-text-secondary);font-size:13px;cursor:pointer;transition:background .15s ease,border-color .15s ease}.gengage-chat-stop-btn:hover{background:var(--_gengage-surface-secondary);border-color:#9ca3af}.gengage-chat-stop-btn:focus-visible{outline:2px solid var(--gengage-chat-primary, #f27a1a);outline-offset:2px}.gengage-chat-stop-icon{display:inline-block;width:10px;height:10px;background:currentColor;border-radius:2px;flex-shrink:0}.gengage-chat-offline-bar{display:none;align-items:center;gap:6px;padding:6px 12px;font-size:12px;line-height:1.4;color:#92400e;background:#fef3c7;border-bottom:1px solid #fde68a}.gengage-chat-offline-bar--visible{display:flex}.gengage-chat-offline-bar:before{content:"";display:inline-block;width:8px;height:8px;background:var(--_gengage-rating-color);border-radius:50%;flex-shrink:0}.gengage-chat-still-working{font-size:12px;color:var(--gengage-chat-text-secondary, #666);margin-top:6px;animation:gengage-fade-in .3s ease}@keyframes gengage-fade-in{0%{opacity:0}to{opacity:1}}.gengage-chat-thinking-steps{display:flex;flex-direction:column;gap:4px;padding:4px 0}.gengage-chat-thinking-step{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--gengage-chat-text-secondary, #666)}.gengage-chat-thinking-step-marker{font-size:12px;width:16px;text-align:center;flex-shrink:0}.gengage-chat-thinking-step-marker--done{color:var(--gengage-chat-success, #4caf50)}.gengage-chat-thinking-step-marker--active{color:var(--gengage-chat-primary, #1976d2);animation:gengage-thinking-pulse 1.5s ease-in-out infinite}@keyframes gengage-thinking-pulse{0%,to{opacity:1}50%{opacity:.4}}.gengage-chat-thinking-step-text{line-height:1.4}.gengage-chat-error{display:flex;align-items:center;justify-content:center;gap:10px;padding:10px 14px;border-radius:10px;background:#fef2f2;color:#991b1b;font-size:13px;text-align:center;border:1px solid #fecaca}.gengage-chat-error-retry{flex-shrink:0;padding:4px 12px;border:1px solid #fca5a5;border-radius:6px;background:#fff;color:#991b1b;font-size:12px;font-weight:500;cursor:pointer;transition:background .15s}.gengage-chat-error-retry:hover{background:#fee2e2}.gengage-chat-input-area{display:flex;flex-wrap:wrap;align-items:center;flex-shrink:0;gap:0;padding:8px 12px;border-top:1px solid var(--_gengage-border-color);background:var(--gengage-background-color, #fff)}.gengage-chat-input-pill{display:flex;align-items:center;gap:4px;flex:1;min-width:0;height:44px;background:var(--_gengage-surface-secondary);border:1px solid var(--_gengage-border-color);border-radius:30px;padding:2px 8px;overflow:hidden;transition:border-color .2s ease,box-shadow .2s ease}.gengage-chat-input-pill:focus-within{border-color:var(--gengage-primary-color, #3b82f6);box-shadow:0 0 0 2px #3b82f626}.gengage-chat-input{flex:1;min-width:0;min-height:40px;max-height:120px;padding:0 6px 0 14px;border:none;border-radius:0;font-size:14px;font-family:inherit;line-height:1.4;align-content:center;outline:none;background:transparent;color:var(--_gengage-text-primary);resize:none;overflow-y:hidden}@media(max-width:767px){.gengage-chat-input-pill{height:52px;padding:3px 8px}.gengage-chat-input{min-height:44px;max-height:44px;font-size:16px;white-space:nowrap;overflow:hidden}.gengage-chat-input::placeholder{font-size:15px}}.gengage-chat-input::placeholder{font-size:14px;color:#6b7280}.gengage-chat-send{width:36px;height:36px;min-width:36px;padding:0;border:none;border-radius:50%;background:var(--gengage-primary-color, #3b82f6);color:var(--gengage-primary-foreground, #fff);font-weight:700;font-size:0;font-family:inherit;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background-color .2s cubic-bezier(.4,0,.2,1),box-shadow .2s ease,transform .15s ease;box-shadow:0 2px 4px #0000001f}.gengage-chat-send:hover{filter:brightness(.92);transform:translateY(-1px);box-shadow:0 4px 8px #0000002e}.gengage-chat-send:active{transform:translateY(0);box-shadow:0 1px 2px #0000001f}.gengage-chat-send svg{width:18px;height:18px}.gengage-chat-send:disabled{background:#d1d5db;box-shadow:none;cursor:not-allowed}.gengage-chat-footer{padding:4px 10px;text-align:center;font-size:10px;color:#6b7280;border-top:1px solid var(--_gengage-surface-muted);background:var(--gengage-background-color, #fff)}.gengage-chat-uispec{width:100%}.gengage-chat-uispec:empty{display:none}.gengage-chat-uispec>*{animation:gengage-chat-widget-enter .16s cubic-bezier(.2,.7,.2,1) both}@keyframes gengage-chat-widget-enter{0%{opacity:0;transform:translateY(5px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}.gengage-chat-action-buttons{display:flex;flex-wrap:wrap;gap:8px;padding:6px 0 4px}.gengage-chat-action-btn{flex:0 0 auto;padding:8px 16px;border:none;border-radius:999px;background:var(--gengage-primary-color, #3b82f6);color:var(--gengage-primary-foreground, #fff);font-size:13px;font-weight:600;line-height:1.25;font-family:inherit;cursor:pointer;white-space:nowrap;transition:filter .15s ease,transform .1s ease}.gengage-chat-action-btn:hover{filter:brightness(.92)}.gengage-chat-action-btn:active{transform:scale(.97)}.gengage-chat-product-card{position:relative;display:flex;flex-direction:column;border:1px solid #eee;border-radius:16px;overflow:hidden;background:#fff;width:160px;min-width:160px;max-width:160px;box-shadow:0 2px 8px #0000000f;transition:transform .1s ease,box-shadow .2s ease}.gengage-chat-product-card:hover{transform:translateY(-2px);box-shadow:0 4px 16px #0000001f}.gengage-chat-product-card-img{width:100%;height:120px;object-fit:contain;display:block;background:#fff;padding:8px;box-sizing:border-box}.gengage-chat-product-card-body{display:flex;flex-direction:column;flex:1;gap:4px;padding:8px 10px 10px;text-align:center}.gengage-chat-product-card-name{font-size:13px;font-weight:600;color:var(--_gengage-text-primary);line-height:1.35;margin-bottom:0;min-height:2.7em;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.gengage-chat-product-card-brand{font-size:10px;color:#666}.gengage-chat-product-card-rating{font-size:11px;color:var(--_gengage-rating-color);line-height:1}.gengage-star-half{display:inline-block;position:relative}.gengage-star-half>span{position:absolute;left:0;top:0;overflow:hidden;width:.5em}.gengage-chat-product-card-review-count{color:#475569;font-size:10px}.gengage-chat-product-card-price{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:center;gap:2px 4px;font-size:16px;font-weight:800;color:#0f172a}.gengage-chat-product-card-original-price{text-decoration:line-through;color:#64748b;font-weight:400;font-size:12px}.gengage-chat-price-skeleton{display:inline-block;width:80px;height:16px;background:linear-gradient(90deg,#e2e8f0 25%,#f1f5f9,#e2e8f0 75%);background-size:200% 100%;animation:gengage-skeleton-price-pulse 1.5s ease-in-out infinite;border-radius:4px;vertical-align:middle}@keyframes gengage-skeleton-price-pulse{0%{background-position:200% 0}to{background-position:-200% 0}}.gengage-chat-product-card-cta{display:block;margin-top:auto;padding:8px 10px;text-align:center;background:transparent;color:var(--gengage-primary-color, #3b82f6);text-decoration:none;font-size:12px;font-weight:700;letter-spacing:.01em;border-top:1px solid var(--_gengage-surface-muted);cursor:pointer;transition:color .15s ease,background .15s ease}.gengage-chat-product-card-cta:hover{color:var(--gengage-primary-color, #0b24d6);background:var(--_gengage-surface-muted)}.gengage-chat-product-card-cta:active{background:var(--_gengage-surface-muted)}.gengage-chat-product-summary{display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid var(--_gengage-border-color);border-radius:12px;background:#fff;cursor:pointer;transition:background .15s,box-shadow .15s;margin:4px 0}.gengage-chat-product-summary:hover{background:#f9fafb;box-shadow:0 1px 4px #0000000f}.gengage-chat-product-summary__image{flex-shrink:0;width:64px;height:64px;border-radius:8px;overflow:hidden;border:1px solid var(--_gengage-surface-secondary);background:#f9fafb}.gengage-chat-product-summary__image img{width:100%;height:100%;object-fit:cover;display:block}.gengage-chat-product-summary__content{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.gengage-chat-product-summary__name{font-size:13px;font-weight:500;line-height:1.3;color:#111827;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.gengage-chat-product-summary__rating{font-size:11px;color:var(--_gengage-rating-color);line-height:1}.gengage-chat-product-summary__review-count{color:#475569;font-size:11px}.gengage-chat-product-summary__price{font-size:13px;font-weight:600;color:#111827;line-height:1;margin-top:2px}.gengage-chat-product-summary__price-original{text-decoration:line-through;color:#6b7280;font-weight:400;font-size:11px}.gengage-chat-product-summary__price-current{color:var(--gengage-primary-color, #111827)}.gengage-chat-product-summary__cta{flex-shrink:0;font-size:12px;font-weight:500;color:var(--gengage-primary-color, #2563eb);text-decoration:none;padding:4px 10px;border-radius:8px;transition:background .15s;white-space:nowrap}.gengage-chat-product-summary__cta:hover{background:#0000000a}.gengage-chat-product-summary__cta:focus-visible{outline:2px solid var(--gengage-primary-color, #2563eb);outline-offset:2px}.gengage-chat-product-grid{display:flex;gap:12px;overflow-x:auto;padding:8px 0;-webkit-overflow-scrolling:touch;scrollbar-width:none;scroll-snap-type:x proximity;min-height:180px}.gengage-chat-product-grid>*{scroll-snap-align:start;flex:0 0 auto}.gengage-chat-product-grid::-webkit-scrollbar{display:none}.gengage-chat-review-highlights{padding:2px 0 6px}.gengage-chat-review-item{border:1px solid var(--_gengage-border-color);border-radius:12px;padding:10px 12px;background:#fff}.gengage-chat-review-item[data-tone=positive]{border-color:#bbf7d0;background:#f0fdf4}.gengage-chat-review-item[data-tone=negative]{border-color:#fecaca;background:#fef2f2}.gengage-chat-review-tag{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:var(--_gengage-text-secondary);margin-bottom:4px}.gengage-chat-review-text{font-size:13px;line-height:1.45;color:var(--_gengage-text-primary);display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.gengage-chat-review-rating{margin-top:6px;font-size:12px;font-weight:700;color:#0f172a}.gengage-chat-review-empty{font-size:12px;color:var(--_gengage-text-secondary)}.gengage-chat-review-tabs{display:flex;gap:6px;margin-bottom:10px}.gengage-chat-review-tab{padding:6px 14px;border:1px solid var(--_gengage-border-color);border-radius:999px;background:#fff;color:var(--_gengage-text-secondary);font-size:12px;font-weight:600;font-family:inherit;cursor:pointer;transition:background .15s,border-color .15s}.gengage-chat-review-tab:hover{background:var(--_gengage-surface-muted)}.gengage-chat-review-tab--active{background:var(--_gengage-surface-muted);border-color:#94a3b8;color:#0f172a}.gengage-chat-review-pills{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}.gengage-chat-review-pill{display:flex;align-items:center;gap:6px;padding:6px 10px;border:1px solid var(--_gengage-border-color);border-radius:8px;background:#fff;font-size:12px;color:#334155;box-shadow:0 1px 2px #0000000a}.gengage-chat-review-pill[data-tone=positive]{border-color:#bbf7d0}.gengage-chat-review-pill[data-tone=negative]{border-color:#fecaca}.gengage-chat-review-pill-icon{font-size:11px;font-weight:700}.gengage-chat-review-pill[data-tone=positive] .gengage-chat-review-pill-icon{color:var(--_gengage-success-color)}.gengage-chat-review-pill[data-tone=negative] .gengage-chat-review-pill-icon{color:#dc2626}.gengage-chat-review-pill-count{font-size:10px;font-weight:700;background:var(--_gengage-surface-muted);color:var(--_gengage-text-secondary);border-radius:4px;padding:1px 5px}.gengage-chat-review-items{display:grid;gap:10px}.gengage-chat-divider{border:none;border-top:1px solid var(--_gengage-border-color);margin:8px 0}.gengage-chat-divider-wrapper{display:flex;align-items:center;gap:8px;margin:8px 0}.gengage-chat-divider-wrapper hr{flex:1;border:none;border-top:1px solid var(--_gengage-border-color);margin:0}.gengage-chat-divider-label{font-size:11px;color:#6b7280;white-space:nowrap}.gengage-chat--overlay .gengage-chat-drawer{position:fixed;inset:0;width:100%;max-width:480px;max-height:100%;margin:0 auto;border-radius:0;animation:gengage-chat-overlay-in .24s cubic-bezier(.2,.72,.2,1)}.gengage-chat--overlay:before{content:"";position:fixed;inset:0;background:#00000073;z-index:-1}@keyframes gengage-chat-overlay-in{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}.gengage-chat-panel-skeleton{display:flex;flex-direction:column;gap:14px;padding:6px 0}.gengage-chat-panel-skeleton-block{height:110px;border-radius:10px;background:linear-gradient(90deg,#e5e7eb 25%,#f3f4f6,#e5e7eb 75%);background-size:200% 100%;animation:gengage-panel-shimmer 1.4s infinite}@keyframes gengage-panel-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.gengage-chat-panel-skeleton-block--image{height:200px;border-radius:8px;margin-bottom:12px}.gengage-chat-panel-skeleton-block--text{height:16px;border-radius:4px;margin-bottom:8px}.gengage-chat-panel-skeleton-block--text:nth-child(3){width:80%}.gengage-chat-panel-skeleton-block--text:nth-child(4){width:60%}.gengage-chat-panel-skeleton-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.gengage-chat-panel-skeleton-block--card{height:120px;border-radius:8px}.gengage-chat-panel-skeleton-block--row{height:32px;border-radius:4px;margin-bottom:4px}.gengage-chat-panel .gengage-chat-product-card{width:100%;max-width:100%;min-width:0;display:flex;flex-direction:column;border-radius:12px;border:1px solid var(--_gengage-border-color);box-shadow:0 1px 4px #0000000f;overflow:hidden;padding:0}.gengage-chat-panel .gengage-chat-product-card:hover{transform:translateY(-2px);box-shadow:0 4px 12px #0000001a;border-color:#d1d5db}.gengage-chat-panel .gengage-chat-product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));overflow-x:visible;gap:12px;min-height:auto;padding:4px 0}.gengage-chat-panel .gengage-chat-product-card-img{width:100%;height:160px;border-radius:0;object-fit:contain;background:#fafafa;padding:12px;box-sizing:border-box}.gengage-chat-panel .gengage-chat-product-card-body{padding:10px 12px 12px;text-align:left;gap:4px}.gengage-chat-panel .gengage-chat-product-card-name{min-height:0;margin-bottom:2px;font-size:13px;-webkit-line-clamp:2;line-clamp:2}.gengage-chat-panel .gengage-chat-product-card-price{justify-content:flex-start;font-size:15px}.gengage-chat-panel .gengage-chat-product-card-cta{display:block;padding:10px 12px;text-align:center;border-top:1px solid var(--_gengage-surface-muted);border-radius:0;background:transparent;color:var(--gengage-primary-color, #3b82f6);font-weight:700;font-size:13px}.gengage-chat-product-details-panel{display:flex;flex-direction:column;gap:12px;width:100%;background:#fff;border:1px solid var(--_gengage-border-color);border-radius:16px;padding:14px;box-sizing:border-box}.gengage-chat-product-details-media{border:1px solid var(--_gengage-surface-muted);border-radius:12px;background:#fafafa;padding:12px;display:flex;flex-direction:column;align-items:center}.gengage-chat-product-details-img{width:100%;height:auto;max-height:300px;object-fit:contain;border-radius:8px}.gengage-chat-product-details-content{display:flex;flex-direction:column;gap:8px;min-width:0}.gengage-chat-product-details-title{margin:0;font-size:17px;font-weight:700;line-height:1.3;color:#0f172a}.gengage-chat-product-details-rating{display:inline-flex;align-items:center;gap:4px;width:fit-content;padding:3px 8px;border-radius:999px;background:#fff7ed;color:#9a3412;font-size:13px;font-weight:700}.gengage-chat-product-details-review-count{color:#7c2d12;font-weight:600}.gengage-chat-product-details-price{display:flex;align-items:baseline;gap:6px}.gengage-chat-product-details-original-price{font-size:14px;color:#64748b;text-decoration:line-through}.gengage-chat-product-details-current-price{font-size:22px;font-weight:800;line-height:1.1;color:#0f172a}.gengage-chat-product-details-stock{width:fit-content;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:700}.gengage-chat-product-details-stock.is-in-stock{background:#dcfce7;color:#166534}.gengage-chat-product-details-stock.is-out-of-stock{background:#fee2e2;color:#991b1b}.gengage-chat-product-details-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:4px}.gengage-chat-product-details-cta{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:0 20px;border-radius:999px;border:none;text-decoration:none;background:var(--gengage-primary-color, #3b82f6);color:var(--gengage-primary-foreground, #fff);font-size:14px;font-weight:700;cursor:pointer;transition:filter .14s ease,transform .12s ease}.gengage-chat-product-details-cta:hover{filter:brightness(1.05);transform:translateY(-1px)}.gengage-chat-product-details-cta:active{transform:translateY(1px)}.gengage-chat-product-details-atc{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 20px;border:none;border-radius:10px;background:var(--_gengage-success-color);color:#fff;font-size:14px;font-weight:700;font-family:inherit;cursor:pointer;transition:filter .12s ease,transform .12s ease}.gengage-chat-product-details-atc:hover{filter:brightness(1.08);transform:translateY(-1px)}.gengage-chat-product-details-atc:active{transform:translateY(1px)}.gengage-chat-product-detail-tabs{margin-top:4px;border-top:1px solid var(--_gengage-border-color);padding-top:12px}.gengage-chat-product-detail-tab-bar{display:flex;gap:0;border-bottom:2px solid var(--_gengage-border-color);margin-bottom:12px}.gengage-chat-product-detail-tab{flex:1;padding:8px 12px;border:none;background:transparent;color:var(--_gengage-text-secondary);font-size:13px;font-weight:600;font-family:inherit;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-2px;transition:color .15s,border-color .15s}.gengage-chat-product-detail-tab:hover{color:#334155}.gengage-chat-product-detail-tab--active{color:var(--gengage-primary-color, #3b82f6);border-bottom-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-product-detail-tab-panel{font-size:13px;line-height:1.6;color:#374151}.gengage-chat-product-specs-table{width:100%;border-collapse:collapse;font-size:13px}.gengage-chat-product-specs-table tr:nth-child(2n){background:var(--_gengage-surface-muted)}.gengage-chat-product-specs-key{padding:6px 10px;font-weight:600;color:#475569;white-space:nowrap;border-bottom:1px solid var(--_gengage-surface-muted);width:40%}.gengage-chat-product-specs-value{padding:6px 10px;color:var(--_gengage-text-primary);border-bottom:1px solid var(--_gengage-surface-muted)}.gengage-chat-product-card-atc{position:absolute;bottom:42px;right:6px;opacity:0;transition:opacity .15s ease;z-index:1}.gengage-chat-product-card:hover .gengage-chat-product-card-atc{opacity:1}@media(hover:none),(pointer:coarse){.gengage-chat-product-card-atc{opacity:1;position:relative;bottom:auto;right:auto;margin-top:4px}}.gengage-chat-drawer.gengage-chat-drawer--hidden{transform:translate(100%);opacity:0;pointer-events:none;box-shadow:none;visibility:hidden}.gengage-chat-root--mobile .gengage-chat-drawer.gengage-chat-drawer--hidden{transform:translateY(100%);opacity:0;pointer-events:none;box-shadow:none;visibility:hidden}@media(max-width:900px){.gengage-chat-drawer--with-panel .gengage-chat-panel--visible{width:clamp(280px,calc(100vw - var(--_gengage-chat-conversation-width)),560px);max-width:560px}}.gengage-chat-attachment-preview{display:flex;align-items:center;gap:8px;padding:6px 10px;background:var(--_gengage-surface-secondary);border:1px solid var(--_gengage-border-color);border-radius:8px;width:100%;box-sizing:border-box}.gengage-chat-attachment-preview--hidden{display:none}.gengage-chat-attachment-preview-thumb{width:40px;height:40px;border-radius:4px;object-fit:cover;flex-shrink:0}.gengage-chat-attachment-name{flex:1;font-size:12px;color:#4b5563;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gengage-chat-attachment-remove{background:none;border:none;cursor:pointer;font-size:18px;color:#6b7280;padding:0 4px;line-height:1;flex-shrink:0}.gengage-chat-attachment-remove:hover{color:#ef4444}.gengage-chat-attach-btn{background:none;border:none;cursor:pointer;width:32px;height:32px;padding:0;line-height:1;flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:50%;color:#6b7280;transition:color .15s,background .15s}.gengage-chat-attach-btn:hover{color:#4b5563;background:#0000000d}.gengage-chat-attach-btn svg{width:20px;height:20px}.gengage-chat-mic-btn{background:none;border:none;cursor:pointer;width:32px;height:32px;padding:0;line-height:1;flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:50%;color:#6b7280;transition:color .15s,background .15s}.gengage-chat-mic-btn:hover{color:#4b5563;background:#0000000d}.gengage-chat-mic-btn svg{width:20px;height:20px}.gengage-chat-mic-btn--active{color:#ef4444;animation:gengage-mic-pulse 1.2s ease-in-out infinite}.gengage-chat-mic-btn--active:hover{color:#dc2626}@keyframes gengage-mic-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.15);opacity:.8}}.gengage-chat-input-area--dragover{outline:2px dashed var(--gengage-primary-color, #3b82f6);outline-offset:-2px;background:#eff6ff}.gengage-chat-attachment-thumb{width:120px;max-width:100%;height:auto;border-radius:8px;margin-bottom:6px;display:block}@media(max-width:768px){.gengage-chat-root{--_gengage-qty-btn-size: 44px;--_gengage-qty-btn-size-compact: 44px}.gengage-chat-header-btn,.gengage-chat-close{width:44px;height:44px;border-radius:12px}.gengage-chat-attach-btn,.gengage-chat-mic-btn,.gengage-chat-send{width:44px;height:44px;min-width:44px}.gengage-chat-attach-btn svg,.gengage-chat-mic-btn svg{width:22px;height:22px}.gengage-chat-panel-divider{display:flex;width:100%;height:20px;align-items:center;justify-content:center;cursor:ns-resize;background:transparent;touch-action:pan-y;position:relative;overflow:visible}.gengage-chat-panel-divider--hidden{display:none}.gengage-chat-drawer--with-panel{left:0;right:0;width:100%;border-radius:0}.gengage-chat-drawer--with-panel .gengage-chat-body{flex-direction:column}.gengage-chat-drawer--with-panel .gengage-chat-panel--visible{width:100%;min-width:0;max-width:none;max-height:25dvh;border-right:none;border-bottom:1px solid var(--_gengage-border-color);padding:0 12px 12px;margin:0;border-radius:0;box-shadow:none}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider{width:100%;height:20px;background:transparent;border-bottom:1px solid rgba(148,163,184,.22)}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle{left:50%;top:50%;transform:translate(-50%,-50%);width:100%;height:44px;border:none;border-radius:0;background:transparent;box-shadow:none;color:transparent;font-size:0;line-height:0;padding:0}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle:before{content:"";display:block;width:52px;height:5px;margin:0 auto;border-radius:999px;background:#94a3b8;box-shadow:0 1px #64748b59;transition:background .15s ease}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle:hover,.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle:active{background:transparent;color:transparent}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle:hover:before,.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle:active:before{background:#64748b}.gengage-chat-panel--collapsed~.gengage-chat-panel-divider{width:100%;background:transparent}.gengage-chat-panel--collapsed~.gengage-chat-panel-divider .gengage-chat-panel-divider-toggle{left:50%;transform:translate(-50%,-50%)}.gengage-chat-drawer--with-panel .gengage-chat-conversation{width:100%;flex:1;border-left:none}.gengage-qty-stepper--compact .gengage-qty-value{min-width:24px;font-size:13px}.gengage-qty-stepper--compact .gengage-qty-submit{min-height:44px;padding:0 12px;font-size:13px}.gengage-chat-product-details-atc-stepper .gengage-qty-submit{min-height:44px;padding:0 16px}.gengage-chat-product-details-share{width:44px;height:44px}.gengage-chat-panel .gengage-chat-product-card{grid-template-columns:84px 1fr}.gengage-chat-panel .gengage-chat-product-card-cta{grid-column:1 / -1;width:100%}.gengage-chat-product-details-panel{padding:12px;gap:12px}.gengage-chat-product-details-media{min-height:140px}.gengage-chat-product-details-title{font-size:15px}.gengage-chat-product-details-current-price{font-size:20px}.gengage-chat-product-grid{scroll-snap-type:x mandatory}.gengage-chat-product-card{width:280px;min-width:280px;scroll-snap-align:center}.gengage-chat-product-card-img{height:180px}}@media(max-width:480px){.gengage-chat-drawer{position:fixed;inset:0;width:100%;max-height:100%;border-radius:0}.gengage-chat-bubble{max-width:100%}}.gengage-chat-kvkk-banner{display:flex;align-items:flex-start;gap:8px;padding:10px 14px;background:#fffbeb;border-bottom:1px solid #fde68a;font-size:12px;line-height:1.5;color:#92400e}.gengage-chat-kvkk-content{flex:1;min-width:0}.gengage-chat-kvkk-content a{color:#b45309;text-decoration:underline}.gengage-chat-kvkk-dismiss{flex-shrink:0;width:20px;height:20px;border:none;background:transparent;color:#92400e;font-size:16px;cursor:pointer;padding:0;line-height:1}.gengage-chat-comparison{padding:16px}.gengage-chat-comparison-heading{font-size:14px;font-weight:700;letter-spacing:.05em;color:#0f172a;margin:0 0 16px}.gengage-chat-comparison-recommended{border:1px solid var(--_gengage-border-color);border-radius:12px;padding:16px;background:#fff;box-shadow:0 1px 3px #0000000f;margin-bottom:12px}.gengage-chat-comparison-recommended-label{font-size:12px;font-weight:700;color:var(--_gengage-success-color);text-transform:uppercase;letter-spacing:.04em;margin-bottom:12px}.gengage-chat-comparison-recommended-body{display:flex;gap:12px;align-items:flex-start}.gengage-chat-comparison-recommended-body img{width:80px;height:80px;object-fit:contain;border-radius:8px;background:var(--_gengage-surface-muted)}.gengage-chat-comparison-recommended-info{flex:1;min-width:0}.gengage-chat-comparison-recommended-title{font-size:14px;font-weight:600;color:#0f172a;margin-bottom:4px}.gengage-chat-comparison-recommended-price{font-size:16px;font-weight:700;color:#0f172a}.gengage-chat-comparison-highlights{margin-top:12px;padding-top:12px;border-top:1px solid var(--_gengage-surface-muted)}.gengage-chat-comparison-highlights-label{font-size:12px;font-weight:600;color:var(--_gengage-text-secondary);margin-bottom:6px}.gengage-chat-comparison-highlights ul{margin:0;padding-left:18px;font-size:13px;color:#334155;line-height:1.6}.gengage-chat-comparison-special{background:#fffbeb;border:1px solid #fde68a;border-radius:12px;padding:12px 16px;margin-bottom:12px;font-size:13px;color:#92400e}.gengage-chat-comparison-special summary{cursor:pointer;font-weight:600}.gengage-chat-comparison-special ul{margin:8px 0 0;padding-left:18px;line-height:1.6}.gengage-chat-comparison-table{width:100%;border-collapse:collapse;font-size:13px;margin-top:12px}.gengage-chat-comparison-table th,.gengage-chat-comparison-table td{padding:10px 12px;text-align:center;border-bottom:1px solid var(--_gengage-surface-muted);vertical-align:top}.gengage-chat-comparison-table th{font-weight:600;font-size:12px;color:#334155}.gengage-chat-comparison-table th img{width:60px;height:60px;object-fit:contain;border-radius:6px;background:var(--_gengage-surface-muted);margin-bottom:6px}.gengage-chat-comparison-table-price{font-weight:700;color:#0f172a}.gengage-chat-comparison-label{text-align:left;font-weight:600;color:var(--_gengage-text-secondary);white-space:nowrap}.gengage-chat-comparison-selected{background:#f0fdf4}.gengage-chat-comparison-recommended-text{padding:8px 12px;font-size:12px;color:var(--gengage-text-secondary, #475569);font-style:italic;border-top:1px solid var(--gengage-border-color, #e2e8f0);margin-top:8px}.gengage-chat-comparison-product-actions{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}.gengage-chat-comparison-view-btn{flex:1;min-width:0;padding:8px 12px;border:1px solid var(--gengage-primary-color, #3b82f6);border-radius:6px;background:transparent;color:var(--gengage-primary-color, #3b82f6);font-size:12px;font-weight:500;font-family:inherit;cursor:pointer;transition:background .15s ease,color .15s ease;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.gengage-chat-comparison-view-btn:hover{background:var(--gengage-primary-color, #3b82f6);color:#fff}.gengage-chat-pills{position:relative;padding:8px 12px;border-top:1px solid var(--_gengage-surface-muted);background:var(--gengage-background-color, #fff)}.gengage-chat-pills-scroll{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;padding-right:28px}.gengage-chat-pills-scroll::-webkit-scrollbar{display:none}.gengage-chat-pill{flex:0 0 auto;padding:8px 16px;border:none;border-radius:999px;background:var(--gengage-primary-color, #3b82f6);color:var(--gengage-primary-foreground, #fff);font-size:13px;font-weight:600;font-family:inherit;white-space:nowrap;cursor:pointer;transition:filter .15s,transform .1s}.gengage-chat-pill:hover{filter:brightness(.92)}.gengage-chat-pill:active{transform:scale(.97)}.gengage-chat-pill--rich{display:flex;align-items:center;gap:8px;padding:6px 14px 6px 6px;border-radius:20px}.gengage-chat-pill-img{width:32px;height:32px;border-radius:50%;object-fit:cover;flex-shrink:0;background:#ffffff26}.gengage-chat-pill-text{font-size:13px;font-weight:600;line-height:1.2}.gengage-chat-pill-desc{display:none}.gengage-chat-pill--rich .gengage-chat-pill-desc{display:block;font-size:10px;font-weight:400;opacity:.8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:160px}.gengage-chat-pills-arrow{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:28px;height:28px;border-radius:50%;border:1px solid var(--_gengage-border-color);background:#fff;color:var(--_gengage-text-secondary);font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:-4px 0 8px #ffffffe6;z-index:1}.gengage-chat-pills-arrow:hover{background:var(--_gengage-surface-muted);color:#334155}@media(prefers-reduced-motion:reduce){.gengage-chat-uispec>*,.gengage-chat-action-btn,.gengage-chat-product-card,.gengage-chat-product-card-cta,.gengage-chat-send,.gengage-chat-launcher,.gengage-chat-pill,.gengage-chat-drawer,.gengage-chat-typing-dots span,.gengage-chat-typing-sparkle,.gengage-chat-thinking-step-marker--active,.gengage-chat-bubble,.gengage-chat-panel-skeleton-block,.gengage-chat-ai-toppick-card,.gengage-chat-mic-btn--active,.gengage-chat-ai-toppick-spinner:after,.gengage-chat-panel-shimmer,.gengage-chat-overlay,.gengage-chat-product-details-skeleton-price,.gengage-chat-still-working{animation:none!important;transition:none!important;transform:none!important}}.gengage-chat-bubble--user{position:relative}.gengage-chat-rollback-btn{position:absolute;left:-28px;top:50%;transform:translateY(-50%);width:24px;height:24px;border:none;border-radius:50%;background:var(--gengage-surface-color, #f1f5f9);color:var(--gengage-text-secondary, #64748b);cursor:pointer;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .15s ease;padding:0}.gengage-chat-bubble--user:hover .gengage-chat-rollback-btn{opacity:1}.gengage-chat-rollback-btn:hover{background:var(--gengage-primary-color, #3b82f6);color:#fff}.gengage-chat-bubble--hidden{display:none}.gengage-chat-ai-top-picks{display:flex;flex-direction:column;gap:12px;padding:8px 0}.gengage-chat-ai-top-picks-title{font-size:15px;font-weight:600;color:var(--gengage-text-primary, #1e293b);margin:0 0 4px}.gengage-chat-ai-top-picks-cards{display:flex;flex-direction:column;gap:10px}.gengage-chat-ai-toppick-discount-badge{position:absolute;top:8px;right:8px;background:var(--gengage-discount-bg, #ef4444);color:#fff;font-size:11px;font-weight:700;padding:2px 6px;border-radius:4px;z-index:1}.gengage-chat-ai-toppick-card--winner{position:relative;display:flex;flex-direction:column;border:2px solid var(--gengage-primary-color, #3b82f6);border-radius:12px;background:#fff;overflow:hidden;transition:box-shadow .2s ease}.gengage-chat-ai-toppick-card--winner:hover{box-shadow:0 4px 16px #3b82f626}.gengage-chat-ai-toppick-card--winner .gengage-chat-ai-toppick-img{width:100%;height:140px;object-fit:contain;background:var(--_gengage-surface-muted)}.gengage-chat-ai-toppick-card--compact{position:relative;display:flex;flex-direction:row;align-items:center;gap:12px;border:1px solid var(--gengage-border-color, #e2e8f0);border-radius:10px;background:#fff;padding:10px;transition:box-shadow .2s ease,transform .15s ease}.gengage-chat-ai-toppick-card--compact:hover{box-shadow:0 2px 8px #00000014;transform:translateY(-1px)}.gengage-chat-ai-toppick-card--compact .gengage-chat-ai-toppick-img{width:64px;height:64px;object-fit:contain;border-radius:8px;background:var(--_gengage-surface-muted);flex-shrink:0}.gengage-chat-ai-toppick-badge{position:absolute;top:8px;left:8px;background:var(--gengage-primary-color, #3b82f6);color:#fff;font-size:10px;font-weight:700;text-transform:uppercase;padding:2px 8px;border-radius:4px;z-index:1;letter-spacing:.5px}.gengage-chat-ai-toppick-body{display:flex;flex-direction:column;gap:4px;padding:10px;flex:1;min-width:0}.gengage-chat-ai-toppick-card--compact .gengage-chat-ai-toppick-body{padding:0}.gengage-chat-ai-toppick-name{font-size:13px;font-weight:600;color:var(--gengage-text-primary, #1e293b);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.gengage-chat-ai-toppick-role{font-size:11px;font-weight:600;color:var(--gengage-primary-color, #3b82f6);text-transform:uppercase;letter-spacing:.3px}.gengage-chat-ai-toppick-labels{display:flex;flex-wrap:wrap;gap:4px}.gengage-chat-ai-toppick-label{font-size:11px;padding:1px 6px;border-radius:4px;font-weight:500}.gengage-chat-ai-toppick-label[data-sentiment=positive]{background:#dcfce7;color:#166534}.gengage-chat-ai-toppick-label[data-sentiment=negative]{background:#fee2e2;color:#991b1b}.gengage-chat-ai-toppick-label[data-sentiment=neutral]{background:var(--_gengage-surface-muted);color:#475569}.gengage-chat-ai-toppick-score{font-size:12px;font-weight:700;color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-ai-toppick-reason{font-size:12px;color:var(--gengage-chat-text-secondary, #666);line-height:1.4;margin-top:4px}.gengage-chat-ai-toppick-review{font-size:12px;font-style:italic;color:var(--gengage-text-secondary, #64748b);margin:2px 0;padding-left:8px;border-left:2px solid var(--gengage-border-color, #e2e8f0)}.gengage-chat-ai-toppick-price{font-size:14px;font-weight:700;color:var(--gengage-text-primary, #1e293b)}.gengage-chat-ai-toppick-original-price{text-decoration:line-through;color:var(--gengage-text-secondary, #64748b);font-weight:400;font-size:12px}.gengage-chat-ai-toppick-cta{display:block;width:calc(100% - 20px);margin:6px 10px 10px;padding:8px 0;border:none;border-radius:8px;background:var(--gengage-primary-color, #3b82f6);color:#fff;font-size:13px;font-weight:600;cursor:pointer;text-align:center;transition:background .15s ease}.gengage-chat-ai-toppick-cta:hover{filter:brightness(.92)}.gengage-chat-ai-toppick-card--compact .gengage-chat-ai-toppick-cta{width:auto;margin:0;padding:6px 14px;flex-shrink:0;align-self:center}.gengage-chat-ai-toppick-spinner{position:absolute;inset:0;background:#ffffffb3;display:flex;align-items:center;justify-content:center;border-radius:12px;z-index:3}.gengage-chat-ai-toppick-spinner:after{content:"";width:24px;height:24px;border:3px solid var(--gengage-border, #e2e8f0);border-top-color:var(--gengage-accent-primary, #3b82f6);border-radius:50%;animation:gengage-spin .7s linear infinite}@keyframes gengage-spin{to{transform:rotate(360deg)}}@media(max-width:768px){.gengage-chat-ai-top-picks-cards{flex-direction:row;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;gap:10px;padding-bottom:4px}.gengage-chat-ai-toppick-card--winner,.gengage-chat-ai-toppick-card--compact{min-width:280px;max-width:280px;flex-shrink:0;scroll-snap-align:start}.gengage-chat-ai-toppick-card--compact{flex-direction:column;align-items:stretch}.gengage-chat-ai-toppick-card--compact .gengage-chat-ai-toppick-img{width:100%;height:100px;border-radius:8px 8px 0 0}.gengage-chat-ai-toppick-card--compact .gengage-chat-ai-toppick-cta{width:calc(100% - 20px);margin:6px 10px 10px;align-self:stretch}.gengage-chat-rollback-btn{left:-24px}}.gengage-chat-grounding-review{display:flex;align-items:center;gap:12px;padding:12px 16px;background:var(--gengage-surface-color, #f8fafc);border:1px solid var(--gengage-border-color, #e2e8f0);border-radius:10px;transition:background .15s ease,border-color .15s ease}.gengage-chat-grounding-review:hover{background:var(--gengage-hover-color, #f1f5f9);border-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-grounding-review-icon{font-size:20px;flex-shrink:0}.gengage-chat-grounding-review-body{flex:1;min-width:0}.gengage-chat-grounding-review-title{font-weight:600;font-size:13px;color:var(--gengage-text-color, #1e293b)}.gengage-chat-grounding-review-subtitle{font-size:12px;color:var(--gengage-text-muted, #64748b);margin-top:2px}.gengage-chat-grounding-review-cta{font-size:13px;font-weight:500;color:var(--gengage-primary-color, #3b82f6);white-space:nowrap;flex-shrink:0}.gengage-chat-grouping-cards{display:flex;flex-direction:column;gap:6px}.gengage-chat-grouping-card{display:flex;align-items:center;gap:10px;padding:8px 12px;background:var(--gengage-surface-color, #f8fafc);border:1px solid var(--gengage-border-color, #e2e8f0);border-radius:8px;transition:background .15s ease,border-color .15s ease}.gengage-chat-grouping-card:hover{background:var(--gengage-hover-color, #f1f5f9);border-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-grouping-card-arrow{display:none;font-size:14px;color:var(--gengage-primary-color, #3b82f6);flex-shrink:0}.gengage-chat-grouping-card-img{width:20px;height:20px;border-radius:4px;object-fit:cover;flex-shrink:0}.gengage-chat-grouping-card-body{flex:1;min-width:0;display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}.gengage-chat-grouping-card-name{font-weight:600;font-size:13px;color:var(--gengage-text-color, #1e293b)}.gengage-chat-grouping-card-desc{font-size:12px;color:var(--gengage-text-muted, #64748b)}.gengage-chat-grouping-card-labels{display:block;font-size:11px;color:var(--gengage-chat-text-secondary, #888);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gengage-chat-root--mobile .gengage-chat-grouping-card-img{display:none}.gengage-chat-root--mobile .gengage-chat-grouping-card-arrow{display:inline}.gengage-chat-suggested-search-cards{display:flex;flex-direction:column;gap:8px}.gengage-chat-suggested-search-card{display:flex;align-items:flex-start;gap:12px;padding:10px 14px;background:var(--gengage-surface-color, #f8fafc);border:1px solid var(--gengage-border-color, #e2e8f0);border-radius:10px;transition:background .15s ease,border-color .15s ease}.gengage-chat-suggested-search-card:hover{background:var(--gengage-hover-color, #f1f5f9);border-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-suggested-search-card-img{width:40px;height:40px;border-radius:6px;object-fit:cover;flex-shrink:0}.gengage-chat-suggested-search-card-body{flex:1;min-width:0}.gengage-chat-suggested-search-card-name{font-weight:600;font-size:13px;color:var(--gengage-text-color, #1e293b)}.gengage-chat-suggested-search-card-desc{font-size:12px;color:var(--gengage-text-secondary, #475569);margin-top:2px}.gengage-chat-suggested-search-card-diff{font-size:11px;color:var(--gengage-text-muted, #64748b);margin-top:2px;font-style:italic}.gengage-chat-product-details-gallery{position:relative}.gengage-chat-product-details-gallery .gengage-chat-product-details-img{touch-action:pan-y}.gengage-chat-product-gallery-thumbs{display:flex;gap:8px;padding:10px 0 4px;overflow-x:auto;scrollbar-width:thin;justify-content:center;width:100%}.gengage-chat-product-gallery-thumb{width:56px;height:56px;object-fit:cover;border-radius:8px;border:2px solid transparent;cursor:pointer;flex-shrink:0;transition:border-color .15s ease;background:#fff}.gengage-chat-product-gallery-thumb:hover{border-color:var(--gengage-border-color, #cbd5e1)}.gengage-chat-product-gallery-thumb--active{border-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-product-variants{margin-top:12px}.gengage-chat-product-variants-label{font-size:12px;font-weight:600;color:var(--gengage-text-muted, #64748b);margin-bottom:6px;text-transform:uppercase;letter-spacing:.5px}.gengage-chat-product-variants-list{display:flex;flex-wrap:wrap;gap:6px}.gengage-chat-product-variant-btn{padding:6px 12px;border:1px solid var(--gengage-border-color, #e2e8f0);border-radius:6px;background:var(--gengage-surface-color, #f8fafc);color:var(--gengage-text-color, #1e293b);font-size:12px;cursor:pointer;transition:background .15s ease,border-color .15s ease}.gengage-chat-product-variant-btn:hover{background:var(--gengage-hover-color, #f1f5f9);border-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-product-grid-wrapper{display:flex;flex-direction:column;gap:8px}.gengage-chat-product-sort-toolbar{display:flex;gap:4px;padding:4px;background:var(--gengage-surface-color, #f8fafc);border-radius:8px;border:1px solid var(--gengage-border-color, #e2e8f0)}.gengage-chat-product-sort-btn{flex:1;padding:6px 10px;border:none;border-radius:6px;background:transparent;color:var(--gengage-text-muted, #64748b);font-size:12px;font-weight:500;cursor:pointer;transition:background .15s ease,color .15s ease}.gengage-chat-product-sort-btn:hover{background:var(--gengage-hover-color, #f1f5f9);color:var(--gengage-text-color, #1e293b)}.gengage-chat-product-sort-btn--active,.gengage-chat-product-sort-btn--active:hover{background:var(--gengage-primary-color, #3b82f6);color:#fff}.gengage-chat-product-sort-separator{width:1px;background:var(--gengage-border-color, #e2e8f0);margin:2px}.gengage-chat-comparison-toggle-btn{flex:none;padding:6px 10px;border:none;border-radius:6px;background:transparent;color:var(--gengage-text-muted, #64748b);font-size:12px;font-weight:500;cursor:pointer;transition:background .15s ease,color .15s ease;white-space:nowrap}.gengage-chat-comparison-toggle-btn:hover{background:var(--gengage-hover-color, #f1f5f9);color:var(--gengage-text-color, #1e293b)}.gengage-chat-comparison-toggle-btn--active,.gengage-chat-comparison-toggle-btn--active:hover{background:var(--gengage-primary-color, #3b82f6);color:#fff}.gengage-chat-comparison-select-wrapper{position:relative}.gengage-chat-comparison-checkbox{position:absolute;top:8px;right:8px;z-index:4;width:20px;height:20px;cursor:pointer;accent-color:var(--gengage-primary-color, #3b82f6);background:#fff;border-radius:4px;box-shadow:0 1px 3px #00000026}.gengage-chat-comparison-floating-btn{display:block;width:100%;padding:10px 16px;border:none;border-radius:8px;background:var(--gengage-primary-color, #3b82f6);color:#fff;font-size:14px;font-weight:600;cursor:pointer;transition:background .15s ease;text-align:center;position:sticky;bottom:0;z-index:5;box-shadow:0 -2px 8px #0000001a}.gengage-chat-comparison-floating-btn:hover:not(:disabled){background:var(--gengage-primary-hover, #2563eb)}.gengage-chat-comparison-floating-btn--disabled{background:#94a3b8;cursor:default;opacity:.8}.gengage-chat-panel-topbar{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--_gengage-border-color);background:var(--_gengage-surface-muted);min-height:44px;flex-shrink:0;position:sticky;top:0;z-index:3}.gengage-chat-panel-topbar-back,.gengage-chat-panel-topbar-forward{width:28px;height:28px;min-width:28px;padding:0;border:1px solid #d1d5db;border-radius:6px;background:transparent;color:#374151;font-size:14px;font-family:inherit;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s ease,border-color .15s ease,opacity .15s ease}.gengage-chat-panel-topbar-back:hover:not(:disabled),.gengage-chat-panel-topbar-forward:hover:not(:disabled){background:var(--_gengage-surface-secondary);border-color:#9ca3af}.gengage-chat-panel-topbar-back:disabled,.gengage-chat-panel-topbar-forward:disabled{opacity:.3;cursor:default}.gengage-chat-panel-topbar-title{flex:1;font-size:14px;font-weight:600;color:var(--_gengage-text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}@keyframes gengage-typewriter-fade-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.gengage-chat-typewriter-block{display:block;animation:gengage-typewriter-fade-in .15s ease both}@media(prefers-reduced-motion:reduce){.gengage-chat-typewriter-block{animation:none}}.gengage-product-mention{color:var(--gengage-primary-color, #3b82f6);text-decoration:none;cursor:pointer;font-weight:500;border-bottom:1px dashed var(--gengage-primary-color, #3b82f6);transition:border-color .15s}.gengage-product-mention:hover{border-bottom-style:solid}@keyframes gengage-skeleton-pulse{0%,to{opacity:.4}50%{opacity:.8}}.gengage-chat-panel-skeleton-block{animation:gengage-skeleton-pulse 1.5s ease-in-out infinite}@media(prefers-reduced-motion:reduce){.gengage-chat-panel-skeleton-block{animation:none}}.gengage-chat-input-chips{display:flex;gap:6px;padding:4px 12px 2px;flex-wrap:wrap}.gengage-chat-input-chip{display:inline-flex;align-items:center;padding:4px 10px;border-radius:12px;border:1px solid var(--_gengage-border-color);background:#f9fafb;color:#374151;font-size:12px;font-weight:500;font-family:inherit;cursor:pointer;transition:background .12s,border-color .12s;white-space:nowrap}.gengage-chat-input-chip:hover{background:var(--_gengage-surface-secondary);border-color:#d1d5db}.gengage-chat-icon{width:14px;height:14px;flex-shrink:0}.gengage-chat-input-chip-icon,.gengage-chat-pill-icon{display:inline-flex;align-items:center;margin-right:4px}.gengage-chat-product-card-img-wrapper,.gengage-chat-product-details-img-wrap{position:relative;overflow:hidden}.gengage-chat-product-card-discount-badge{position:absolute;top:6px;left:6px;padding:3px 8px;border-radius:4px;background:var(--_gengage-discount-color);color:#fff;font-size:11px;font-weight:700;line-height:1.3;z-index:1}.gengage-chat-product-card-stock{font-size:11px;font-weight:600;margin-top:2px}.gengage-chat-product-card-stock.is-in-stock{color:var(--_gengage-success-color)}.gengage-chat-product-card-stock.is-out-of-stock{color:#dc2626}.gengage-chat-find-similar-pill{position:absolute;top:40px;right:8px;opacity:0;pointer-events:none;transition:opacity .2s ease;padding:4px 10px;font-size:11px;font-weight:500;font-family:inherit;border:none;border-radius:12px;background:var(--gengage-chat-pill-bg, rgba(0, 0, 0, .7));color:var(--gengage-chat-pill-text, #fff);cursor:pointer;white-space:nowrap;z-index:2}.gengage-chat-product-card-img-wrapper:hover .gengage-chat-find-similar-pill,.gengage-chat-product-details-img-wrap:hover .gengage-chat-find-similar-pill{opacity:1;pointer-events:auto}.gengage-chat-favorite-btn{position:absolute;top:8px;right:8px;background:#ffffffe6;border:none;border-radius:50%;width:28px;height:28px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--gengage-text-secondary, #64748b);z-index:3;transition:color .2s;padding:0}.gengage-chat-favorite-btn:hover,.gengage-chat-favorite-btn--active{color:var(--gengage-accent-primary, #ef4444)}.gengage-chat-product-card-promos,.gengage-chat-product-details-promos{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}.gengage-chat-product-card-promo-badge,.gengage-chat-product-details-promo-badge{display:inline-block;padding:2px 6px;font-size:10px;font-weight:500;border-radius:4px;background:var(--gengage-chat-promo-bg, #e8f5e9);color:var(--gengage-chat-promo-text, #2e7d32);white-space:nowrap}.gengage-chat-thumbnails-column{position:absolute;right:4px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;gap:4px;z-index:2;pointer-events:auto}.gengage-chat-thumbnail-btn{display:flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;border:2px solid var(--_gengage-border-color);border-radius:6px;background:#fff;cursor:pointer;overflow:hidden;transition:border-color .15s ease}.gengage-chat-thumbnail-btn:hover{border-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-thumbnail-img{width:100%;height:100%;object-fit:cover}.gengage-chat-choice-prompter{position:absolute;bottom:12px;right:12px;width:200px;padding:12px 14px;background:#fff;border:1px solid var(--_gengage-border-color);border-radius:10px;box-shadow:0 4px 12px #0000001a;z-index:10;animation:gengage-choice-prompter-in .2s ease}@keyframes gengage-choice-prompter-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.gengage-chat-choice-prompter-heading{font-size:13px;font-weight:600;color:var(--_gengage-text-primary);margin-bottom:4px}.gengage-chat-choice-prompter-suggestion{font-size:12px;color:#6b7280;margin-bottom:10px;line-height:1.4}.gengage-chat-choice-prompter-cta{display:block;width:100%;padding:6px 12px;border:none;border-radius:6px;background:var(--gengage-primary-color, #3b82f6);color:#fff;font-size:12px;font-weight:600;font-family:inherit;cursor:pointer;text-align:center;transition:opacity .15s ease}.gengage-chat-choice-prompter-cta:hover{opacity:.9}.gengage-chat-choice-prompter-dismiss{position:absolute;top:4px;right:6px;padding:2px 6px;border:none;background:none;color:#6b7280;font-size:16px;cursor:pointer;line-height:1}.gengage-chat-choice-prompter-dismiss:hover{color:#6b7280}@media(prefers-reduced-motion:reduce){.gengage-chat-choice-prompter{animation:none}}.gengage-chat-pros-cons{padding:12px 14px;background:var(--_gengage-surface-muted);border-radius:8px;margin:8px 0}.gengage-chat-pros-cons-heading{margin:0 0 10px;font-size:14px;font-weight:600;color:#0f172a}.gengage-chat-pros-cons-list{list-style:none;margin:0 0 8px;padding:0}.gengage-chat-pros-cons-list:last-child{margin-bottom:0}.gengage-chat-pros-cons-item{display:flex;align-items:flex-start;gap:8px;padding:4px 0;font-size:13px;line-height:1.5;color:#334155}.gengage-chat-pros-cons-icon{flex-shrink:0;width:18px;height:18px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;border-radius:50%}.gengage-chat-pros-cons-icon--pro{color:var(--_gengage-success-color);background:color-mix(in srgb,var(--_gengage-success-color) 15%,#fff)}.gengage-chat-pros-cons-icon--con{color:#dc2626;background:#fee2e2}.gengage-chat-categories{display:flex;flex-direction:column;gap:8px}.gengage-chat-categories-tabs{display:flex;gap:4px;overflow-x:auto;padding:4px 0;-webkit-overflow-scrolling:touch}.gengage-chat-categories-tab{padding:6px 14px;border:1px solid var(--gengage-border-color, #e5e7eb);border-radius:20px;background:var(--gengage-bg, #fff);color:var(--gengage-text, #374151);cursor:pointer;white-space:nowrap;font-size:13px;transition:background .15s,color .15s}.gengage-chat-categories-tab:hover{background:var(--gengage-bg-hover, #f3f4f6)}.gengage-chat-categories-tab--active{background:var(--gengage-primary, #2563eb);color:#fff;border-color:var(--gengage-primary, #2563eb)}.gengage-chat-categories-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px}.gengage-chat-categories-filter-tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:4px}.gengage-chat-categories-filter-tag{padding:4px 10px;border:1px solid var(--gengage-border-color, #e5e7eb);border-radius:14px;background:var(--gengage-bg, #fff);color:var(--gengage-text-secondary, #6b7280);font-size:12px;cursor:pointer;transition:background .15s}.gengage-chat-categories-filter-tag:hover{background:var(--gengage-bg-hover, #f3f4f6)}.gengage-chat-product-grid-view-more{display:block;width:100%;padding:10px;margin-top:8px;border:1px solid var(--gengage-border-color, #e5e7eb);border-radius:8px;background:var(--gengage-bg, #fff);color:var(--gengage-primary, #2563eb);font-size:14px;font-weight:500;cursor:pointer;text-align:center;transition:background .15s;grid-column:1 / -1}.gengage-chat-product-grid-view-more:hover{background:var(--gengage-bg-hover, #f3f4f6)}.gengage-chat-product-grid--mobile{display:flex;overflow-x:auto;gap:8px;padding:8px 0;-webkit-overflow-scrolling:touch}.gengage-chat-product-grid--mobile .gengage-chat-product-card{min-width:160px;max-width:180px;flex-shrink:0}.gengage-chat-comparison--mobile{overflow-x:auto;-webkit-overflow-scrolling:touch;position:relative}.gengage-chat-comparison--mobile{-webkit-mask-image:linear-gradient(to right,#000 85%,transparent);mask-image:linear-gradient(to right,#000 85%,transparent)}.gengage-chat-comparison--mobile .gengage-chat-comparison-table{min-width:480px}.gengage-chat-comparison-key-differences{margin-top:12px;padding:12px;background:var(--gengage-bg-secondary, #f9fafb);border-radius:8px}.gengage-chat-comparison-key-differences h4{margin:0 0 8px;font-size:14px;font-weight:600;color:var(--gengage-text, #374151)}.gengage-chat-comparison-key-differences-content{font-size:13px;color:var(--gengage-text-secondary, #6b7280);line-height:1.5}.gengage-chat-comparison-key-differences-content ul{margin:0;padding-left:18px}.gengage-chat-comparison-key-differences-content li{margin-bottom:4px}.gengage-chat-product-details-similars-heading{margin:16px 0 8px;font-size:15px;font-weight:600;color:var(--gengage-text, #374151)}.gengage-chat-product-details-similars{margin-top:8px}.gengage-chat-handoff-notice{display:flex;flex-direction:column;align-items:center;gap:6px;padding:16px;margin:8px 0;background:#fef3c7;border:1px solid #fcd34d;border-radius:8px;text-align:center}.gengage-chat-handoff-notice-icon{font-size:24px}.gengage-chat-handoff-notice-heading{margin:0;font-size:14px;font-weight:600;color:#92400e}.gengage-chat-handoff-notice-summary{margin:0;font-size:13px;line-height:1.5;color:#78350f}.gengage-qty-stepper{display:inline-flex;align-items:center;gap:0;border:1px solid #d1d5db;border-radius:8px;overflow:hidden;background:#fff}.gengage-qty-btn{width:var(--_gengage-qty-btn-size);height:var(--_gengage-qty-btn-size);border:none;background:transparent;color:#374151;font-size:14px;font-weight:600;font-family:inherit;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background-color .12s}.gengage-qty-btn:hover:not(:disabled){background:var(--_gengage-surface-secondary)}.gengage-qty-btn:disabled{opacity:.35;cursor:default}.gengage-qty-value{min-width:24px;text-align:center;font-size:13px;font-weight:600;color:var(--_gengage-text-primary);-webkit-user-select:none;user-select:none}.gengage-qty-submit{border:none;border-left:1px solid #d1d5db;background:var(--_gengage-success-color);color:#fff;font-size:13px;font-weight:700;font-family:inherit;cursor:pointer;padding:6px 12px;transition:filter .12s ease,transform .12s ease}.gengage-qty-submit:hover{filter:brightness(1.08)}.gengage-qty-submit:active{transform:translateY(1px)}.gengage-qty-submit--success{background:var(--_gengage-success-color);transition:background .2s ease}.gengage-qty-stepper--compact{border-radius:14px;box-shadow:0 2px 6px #0000001f}.gengage-qty-stepper--compact .gengage-qty-btn{width:var(--_gengage-qty-btn-size-compact);height:var(--_gengage-qty-btn-size-compact);font-size:12px}.gengage-qty-stepper--compact .gengage-qty-value{min-width:18px;font-size:12px}.gengage-qty-stepper--compact .gengage-qty-submit{padding:4px 8px;font-size:13px;border-radius:0 14px 14px 0}.gengage-chat-product-details-atc-stepper{border-radius:10px}.gengage-chat-product-details-atc-stepper .gengage-qty-btn{width:32px;height:32px}.gengage-chat-product-details-atc-stepper .gengage-qty-value{min-width:28px;font-size:14px}.gengage-chat-product-details-atc-stepper .gengage-qty-submit{padding:8px 18px;font-size:14px;border-radius:0 10px 10px 0}.gengage-chat-product-details-share{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border:1px solid #d1d5db;border-radius:10px;background:transparent;color:#6b7280;cursor:pointer;transition:color .12s,border-color .12s,background-color .12s;position:relative;flex-shrink:0}.gengage-chat-product-details-share:hover{color:var(--gengage-primary-color, #3b82f6);border-color:var(--gengage-primary-color, #3b82f6);background:#f0f7ff}.gengage-chat-product-details-share:before{content:attr(aria-label);position:absolute;bottom:calc(100% + 6px);left:50%;transform:translate(-50%);padding:4px 8px;border-radius:4px;background:var(--_gengage-surface-dark);color:#fff;font-size:11px;font-weight:500;white-space:nowrap;pointer-events:none;opacity:0;transition:opacity .15s ease;z-index:2}.gengage-chat-product-details-share:hover:before{opacity:1}.gengage-chat-product-details-share--copied:after{content:"✓";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:var(--_gengage-success-color);color:#fff;border-radius:10px;font-size:16px;font-weight:700}.gengage-chat-launcher:focus-visible,.gengage-chat-close:focus-visible,.gengage-chat-header-btn:focus-visible,.gengage-chat-header-powered:focus-visible,.gengage-chat-send:focus-visible,.gengage-chat-action-btn:focus-visible,.gengage-chat-pill:focus-visible,.gengage-chat-input-chip:focus-visible,.gengage-chat-pills-arrow:focus-visible,.gengage-chat-error-retry:focus-visible,.gengage-chat-product-card-cta:focus-visible,.gengage-chat-product-details-cta:focus-visible,.gengage-chat-product-details-atc:focus-visible,.gengage-chat-product-detail-tab:focus-visible,.gengage-chat-panel-divider-toggle:focus-visible,.gengage-chat-panel-topbar-back:focus-visible,.gengage-chat-panel-topbar-forward:focus-visible,.gengage-chat-rollback-btn:focus-visible,.gengage-chat-ai-toppick-cta:focus-visible,.gengage-chat-comparison-view-btn:focus-visible,.gengage-chat-comparison-toggle-btn:focus-visible,.gengage-chat-comparison-floating-btn:focus-visible,.gengage-chat-comparison-checkbox:focus-visible,.gengage-chat-product-sort-btn:focus-visible,.gengage-chat-product-variant-btn:focus-visible,.gengage-chat-product-gallery-thumb:focus-visible,.gengage-chat-thumbnail-btn:focus-visible,.gengage-chat-find-similar-pill:focus-visible,.gengage-chat-favorite-btn:focus-visible,.gengage-chat-attach-btn:focus-visible,.gengage-chat-mic-btn:focus-visible,.gengage-chat-attachment-remove:focus-visible,.gengage-chat-kvkk-dismiss:focus-visible,.gengage-chat-choice-prompter-cta:focus-visible,.gengage-chat-choice-prompter-dismiss:focus-visible,.gengage-chat-categories-tab:focus-visible,.gengage-chat-categories-filter-tag:focus-visible,.gengage-chat-product-grid-view-more:focus-visible,.gengage-chat-product-details-share:focus-visible,.gengage-qty-btn:focus-visible,.gengage-qty-submit:focus-visible{outline:2px solid var(--gengage-primary-color, #3b82f6);outline-offset:2px}@media(max-width:768px){.gengage-chat-choice-prompter{position:sticky;left:12px;right:12px;width:auto;max-width:none;bottom:calc(var(--_gengage-chat-launcher-bottom) + var(--_gengage-chat-launcher-size) + 12px + env(safe-area-inset-bottom,0px));max-height:40vh;overflow-y:auto}.gengage-chat-product-sort-btn,.gengage-chat-comparison-toggle-btn{min-height:40px}.gengage-chat-input-chip{min-height:40px;padding:8px 12px}.gengage-chat-choice-prompter-dismiss{width:32px;height:32px}.gengage-chat-panel-divider-toggle{min-height:44px}.gengage-chat-product-details-atc-stepper .gengage-qty-btn{width:44px;height:44px}.gengage-chat-product-details-atc-stepper .gengage-qty-submit,.gengage-qty-stepper--compact .gengage-qty-submit{min-height:44px}.gengage-qty-stepper--compact .gengage-qty-submit{min-width:44px;padding:0 10px}.gengage-qty-stepper--compact .gengage-qty-btn{width:44px;height:44px;font-size:14px}.gengage-qty-stepper--compact .gengage-qty-value{min-width:24px;font-size:13px}.gengage-chat-product-card-cta,.gengage-chat-choice-prompter-cta,.gengage-chat-product-grid-view-more{min-height:44px;display:flex;align-items:center;justify-content:center}.gengage-chat-panel-topbar-back,.gengage-chat-panel-topbar-forward,.gengage-chat-favorite-btn,.gengage-chat-product-details-share{width:44px;height:44px}}', Xa = B({
3151
+ role: Se(["user", "assistant"]),
3152
+ content: x(),
3153
+ timestamp: Z().optional()
3154
+ }), Ja = B({
3155
+ sku: x(),
3156
+ name: x(),
3157
+ imageUrl: x().url().optional(),
3158
+ price: x().optional(),
3159
+ originalPrice: x().optional(),
3160
+ url: x().url(),
3180
3161
  /** Override CTA label (default: "View product") */
3181
- ctaLabel: w().optional()
3182
- }), $a = B({
3183
- buttons: D(
3162
+ ctaLabel: x().optional()
3163
+ }), Za = B({
3164
+ buttons: F(
3184
3165
  B({
3185
- label: w(),
3166
+ label: x(),
3186
3167
  /** Opaque action payload forwarded to the backend when clicked. */
3187
3168
  action: B({
3188
- title: w(),
3189
- type: w(),
3190
- payload: Y().optional()
3169
+ title: x(),
3170
+ type: x(),
3171
+ payload: Q().optional()
3191
3172
  })
3192
3173
  })
3193
3174
  )
3194
- }), Ga = B({}), Ya = B({
3195
- label: w().optional()
3196
- }), ve = B({
3197
- sku: w(),
3198
- name: w(),
3199
- price: w(),
3200
- imageUrl: w().optional(),
3201
- rating: Q().optional(),
3202
- reviewCount: Q().optional()
3203
- }), Ka = B({
3204
- recommended: ve,
3205
- products: D(ve),
3206
- attributes: D(
3175
+ }), en = B({}), tn = B({
3176
+ label: x().optional()
3177
+ }), Ee = B({
3178
+ sku: x(),
3179
+ name: x(),
3180
+ price: x(),
3181
+ imageUrl: x().optional(),
3182
+ rating: Z().optional(),
3183
+ reviewCount: Z().optional()
3184
+ }), an = B({
3185
+ recommended: Ee,
3186
+ products: F(Ee),
3187
+ attributes: F(
3207
3188
  B({
3208
- label: w(),
3209
- values: D(w())
3189
+ label: x(),
3190
+ values: F(x())
3210
3191
  })
3211
3192
  ),
3212
- highlights: D(w()),
3213
- specialCases: D(w()).optional(),
3214
- recommendedText: w().optional(),
3215
- winnerHits: te(
3216
- w(),
3193
+ highlights: F(x()),
3194
+ specialCases: F(x()).optional(),
3195
+ recommendedText: x().optional(),
3196
+ winnerHits: re(
3197
+ x(),
3217
3198
  B({
3218
- positive: D(w()).optional(),
3219
- negative: D(w()).optional()
3199
+ positive: F(x()).optional(),
3200
+ negative: F(x()).optional()
3220
3201
  })
3221
3202
  ).optional(),
3222
- productActions: te(
3223
- w(),
3203
+ productActions: re(
3204
+ x(),
3224
3205
  B({
3225
- title: w(),
3226
- type: w(),
3227
- payload: Y().optional()
3206
+ title: x(),
3207
+ type: x(),
3208
+ payload: Q().optional()
3228
3209
  })
3229
3210
  ).optional()
3230
- }), Qa = B({
3231
- label: w(),
3232
- sentiment: we(["positive", "negative", "neutral"]).optional()
3233
- }), Xa = B({
3234
- product: te(w(), Y()),
3235
- role: w().optional(),
3236
- reason: w().optional(),
3237
- labels: D(Qa).optional(),
3238
- expertQualityScore: Q().optional(),
3239
- reviewHighlight: w().optional(),
3211
+ }), nn = B({
3212
+ label: x(),
3213
+ sentiment: Se(["positive", "negative", "neutral"]).optional()
3214
+ }), on = B({
3215
+ product: re(x(), Q()),
3216
+ role: x().optional(),
3217
+ reason: x().optional(),
3218
+ labels: F(nn).optional(),
3219
+ expertQualityScore: Z().optional(),
3220
+ reviewHighlight: x().optional(),
3240
3221
  action: B({
3241
- title: w(),
3242
- type: w(),
3243
- payload: Y().optional()
3222
+ title: x(),
3223
+ type: x(),
3224
+ payload: Q().optional()
3244
3225
  }).optional()
3245
- }), Ja = B({
3246
- suggestions: D(Xa)
3247
- }), Za = B({
3248
- title: w().optional(),
3249
- text: w().optional(),
3250
- reviewCount: w().optional(),
3251
- action: B({ title: w(), type: w(), payload: Y().optional() })
3252
- }), en = B({
3253
- entries: D(
3226
+ }), rn = B({
3227
+ suggestions: F(on)
3228
+ }), sn = B({
3229
+ title: x().optional(),
3230
+ text: x().optional(),
3231
+ reviewCount: x().optional(),
3232
+ action: B({ title: x(), type: x(), payload: Q().optional() })
3233
+ }), cn = B({
3234
+ entries: F(
3254
3235
  B({
3255
- name: w(),
3256
- image: w().optional(),
3257
- description: w().optional(),
3258
- action: B({ title: w(), type: w(), payload: Y().optional() })
3236
+ name: x(),
3237
+ image: x().optional(),
3238
+ description: x().optional(),
3239
+ action: B({ title: x(), type: x(), payload: Q().optional() })
3259
3240
  })
3260
3241
  )
3261
- }), tn = B({
3262
- entries: D(
3242
+ }), ln = B({
3243
+ entries: F(
3263
3244
  B({
3264
- shortName: w(),
3265
- detailedMessage: w().optional(),
3266
- whyDifferent: w().optional(),
3267
- image: w().optional(),
3268
- action: B({ title: w(), type: w(), payload: Y().optional() })
3245
+ shortName: x(),
3246
+ detailedMessage: x().optional(),
3247
+ whyDifferent: x().optional(),
3248
+ image: x().optional(),
3249
+ action: B({ title: x(), type: x(), payload: Q().optional() })
3269
3250
  })
3270
3251
  )
3271
- }), ze = B({
3272
- title: w(),
3273
- type: w(),
3274
- payload: Y().optional()
3275
- }), an = B({
3276
- name: w().optional(),
3277
- variant_name: w().optional(),
3278
- sku: w().optional(),
3279
- price: se([Q(), w()]).optional()
3280
- }), nn = B({
3252
+ }), qe = B({
3253
+ title: x(),
3254
+ type: x(),
3255
+ payload: Q().optional()
3256
+ }), gn = B({
3257
+ name: x().optional(),
3258
+ variant_name: x().optional(),
3259
+ sku: x().optional(),
3260
+ price: de([Z(), x()]).optional()
3261
+ }), dn = B({
3281
3262
  product: B({
3282
- sku: w().optional(),
3283
- name: w().optional(),
3284
- images: D(w()).optional(),
3285
- imageUrl: w().optional(),
3286
- rating: Q().optional(),
3287
- reviewCount: Q().optional(),
3288
- price: w().optional(),
3289
- originalPrice: w().optional(),
3290
- price_async: re().optional(),
3291
- inStock: re().optional(),
3292
- promotions: D(w()).optional(),
3293
- variants: D(an).optional(),
3294
- url: w().optional(),
3295
- cartCode: w().optional(),
3296
- description: w().optional(),
3297
- specifications: se([te(w(), w()), D(B({ key: w(), value: w() }))]).optional()
3263
+ sku: x().optional(),
3264
+ name: x().optional(),
3265
+ images: F(x()).optional(),
3266
+ imageUrl: x().optional(),
3267
+ rating: Z().optional(),
3268
+ reviewCount: Z().optional(),
3269
+ price: x().optional(),
3270
+ originalPrice: x().optional(),
3271
+ price_async: ge().optional(),
3272
+ inStock: ge().optional(),
3273
+ promotions: F(x()).optional(),
3274
+ variants: F(gn).optional(),
3275
+ url: x().optional(),
3276
+ cartCode: x().optional(),
3277
+ description: x().optional(),
3278
+ specifications: de([re(x(), x()), F(B({ key: x(), value: x() }))]).optional()
3298
3279
  }).optional(),
3299
- action: ze.optional()
3300
- }), on = B({
3301
- endOfList: re().optional()
3302
- }), rn = B({
3303
- review_class: w().optional(),
3304
- review_text: w().optional(),
3305
- review_rating: se([w(), Q()]).optional(),
3306
- review_tag: w().optional()
3307
- }), sn = B({
3308
- reviews: D(rn).optional()
3309
- }), cn = B({
3310
- productName: w().optional(),
3311
- pros: D(w()).optional(),
3312
- cons: D(w()).optional()
3313
- }), ln = B({
3314
- groups: D(
3280
+ action: qe.optional()
3281
+ }), pn = B({
3282
+ endOfList: ge().optional()
3283
+ }), hn = B({
3284
+ review_class: x().optional(),
3285
+ review_text: x().optional(),
3286
+ review_rating: de([x(), Z()]).optional(),
3287
+ review_tag: x().optional()
3288
+ }), un = B({
3289
+ reviews: F(hn).optional()
3290
+ }), mn = B({
3291
+ productName: x().optional(),
3292
+ pros: F(x()).optional(),
3293
+ cons: F(x()).optional()
3294
+ }), fn = B({
3295
+ groups: F(
3315
3296
  B({
3316
- groupName: w(),
3317
- products: D(te(w(), Y())).optional()
3297
+ groupName: x(),
3298
+ products: F(re(x(), Q())).optional()
3318
3299
  })
3319
3300
  ).optional(),
3320
- filterTags: D(
3301
+ filterTags: F(
3321
3302
  B({
3322
- title: w(),
3323
- action: ze.optional()
3303
+ title: x(),
3304
+ action: qe.optional()
3324
3305
  })
3325
3306
  ).optional()
3326
- }), gn = B({
3327
- summary: w().optional(),
3328
- products_discussed: D(w()).optional(),
3329
- user_sentiment: w().optional()
3330
- }), mn = {
3307
+ }), bn = B({
3308
+ summary: x().optional(),
3309
+ products_discussed: F(x()).optional(),
3310
+ user_sentiment: x().optional()
3311
+ }), _n = {
3331
3312
  components: {
3332
3313
  MessageBubble: {
3333
- schema: Va,
3314
+ schema: Xa,
3334
3315
  description: "A single chat message bubble for user or assistant turns."
3335
3316
  },
3336
3317
  ProductCard: {
3337
- schema: Wa,
3318
+ schema: Ja,
3338
3319
  description: "A product card rendered inline in the chat stream."
3339
3320
  },
3340
3321
  ActionButtons: {
3341
- schema: $a,
3322
+ schema: Za,
3342
3323
  description: "A horizontal row of quick-reply action buttons."
3343
3324
  },
3344
3325
  TypingIndicator: {
3345
- schema: Ga,
3326
+ schema: en,
3346
3327
  description: "An animated indicator shown while the assistant is typing."
3347
3328
  },
3348
3329
  Divider: {
3349
- schema: Ya,
3330
+ schema: tn,
3350
3331
  description: "A horizontal rule with an optional label."
3351
3332
  },
3352
3333
  ComparisonTable: {
3353
- schema: Ka,
3334
+ schema: an,
3354
3335
  description: "A product comparison table with recommended pick, attribute rows, and highlights."
3355
3336
  },
3356
3337
  AITopPicks: {
3357
- schema: Ja,
3338
+ schema: rn,
3358
3339
  description: "Rich AI-curated product suggestion cards with roles, sentiment labels, scores, and review quotes."
3359
3340
  },
3360
3341
  GroundingReviewCard: {
3361
- schema: Za,
3342
+ schema: sn,
3362
3343
  description: "A card showing review grounding data with review count and CTA."
3363
3344
  },
3364
3345
  AIGroupingCards: {
3365
- schema: en,
3346
+ schema: cn,
3366
3347
  description: "Category grouping cards with images and labels for product discovery."
3367
3348
  },
3368
3349
  AISuggestedSearchCards: {
3369
- schema: tn,
3350
+ schema: ln,
3370
3351
  description: "Suggested search cards with images, descriptions, and differentiation."
3371
3352
  },
3372
3353
  ProductDetailsPanel: {
3373
- schema: nn,
3354
+ schema: dn,
3374
3355
  description: "Full product detail view with images, specs, variants, and purchase actions."
3375
3356
  },
3376
3357
  ProductGrid: {
3377
- schema: on,
3358
+ schema: pn,
3378
3359
  description: 'A scrollable grid of ProductCard children with optional "more" pagination.'
3379
3360
  },
3380
3361
  ReviewHighlights: {
3381
- schema: sn,
3362
+ schema: un,
3382
3363
  description: "A list of highlighted customer reviews with sentiment and ratings."
3383
3364
  },
3384
3365
  ProsAndCons: {
3385
- schema: cn,
3366
+ schema: mn,
3386
3367
  description: "A pros and cons list for a product."
3387
3368
  },
3388
3369
  CategoriesContainer: {
3389
- schema: ln,
3370
+ schema: fn,
3390
3371
  description: "Tabbed product groups with optional filter tag buttons."
3391
3372
  },
3392
3373
  HandoffNotice: {
3393
- schema: gn,
3374
+ schema: bn,
3394
3375
  description: "A notice shown when the conversation is escalated to a human agent."
3395
3376
  }
3396
3377
  }
3397
3378
  };
3398
- function dn(o) {
3379
+ function xn(o) {
3399
3380
  return o.length > 120 ? !1 : /^[a-zA-Z0-9#(),.\s%/\-]+$/.test(o);
3400
3381
  }
3401
- function oe(o) {
3382
+ function le(o) {
3402
3383
  return typeof o == "object" && o !== null && typeof o.type == "string";
3403
3384
  }
3404
- class pn extends He {
3385
+ class vn extends $e {
3405
3386
  constructor() {
3406
- super(...arguments), this._shadow = null, this._rootEl = null, this._launcher = null, this._drawer = null, this._bridge = null, this._drawerVisible = !1, this._messages = [], this._currentMessageId = 0, this._abortControllers = /* @__PURE__ */ new Set(), this._currentThreadId = null, this._lastThreadId = null, this._chatCreatedAt = "", this._lastBackendContext = null, this._productSort = { type: "related" }, this._comparisonSelectMode = !1, this._comparisonSelectedSkus = [], this._thumbnailEntries = [], this._choicePrompterEl = null, this._openState = "full", this._mobileBreakpoint = 768, this._isMobileViewport = !1, this._pdpLaunched = !1, this._pdpPrimingInFlight = !1, this._queuedUserMessages = [], this._productContextUnavailableSku = null, this._i18n = le, this._extendedModeManager = null, this._activeTypewriter = null, this._activeTtsHandle = null, this._activeRequestThreadId = null, this._skuToProductItem = {}, this._conversationMode = null, this._initComplete = !1, this._pendingActions = [], this._bridgeContext = null, this._cartQuantity = null, this._threadsWithFirstBot = /* @__PURE__ */ new Set(), this._panel = null, this._session = null, this._eventCallbacks = /* @__PURE__ */ new Map(), this._lastSentAction = null;
3387
+ super(...arguments), this._shadow = null, this._rootEl = null, this._launcher = null, this._drawer = null, this._bridge = null, this._drawerVisible = !1, this._messages = [], this._currentMessageId = 0, this._abortControllers = /* @__PURE__ */ new Set(), this._currentThreadId = null, this._lastThreadId = null, this._chatCreatedAt = "", this._lastBackendContext = null, this._productSort = { type: "related" }, this._comparisonSelectMode = !1, this._comparisonSelectedSkus = [], this._thumbnailEntries = [], this._choicePrompterEl = null, this._openState = "full", this._mobileBreakpoint = 768, this._isMobileViewport = !1, this._pdpLaunched = !1, this._pdpPrimingInFlight = !1, this._queuedUserMessages = [], this._productContextUnavailableSku = null, this._i18n = he, this._extendedModeManager = null, this._activeTypewriter = null, this._activeTtsHandle = null, this._activeRequestThreadId = null, this._skuToProductItem = {}, this._conversationMode = null, this._initComplete = !1, this._pendingActions = [], this._bridgeContext = null, this._cartQuantity = null, this._threadsWithFirstBot = /* @__PURE__ */ new Set(), this._panel = null, this._session = null, this._eventCallbacks = /* @__PURE__ */ new Map(), this._lastSentAction = null;
3407
3388
  }
3408
3389
  async onInit(e) {
3409
3390
  this._i18n = this._resolveI18n(e), this._chatCreatedAt = (/* @__PURE__ */ new Date()).toISOString(), this._shadow = this.root.attachShadow({ mode: "open" });
3410
3391
  const t = document.createElement("style");
3411
- t.textContent = ja, this._shadow.appendChild(t);
3392
+ t.textContent = Qa, this._shadow.appendChild(t);
3412
3393
  const a = document.createElement("div");
3413
3394
  a.className = "gengage-chat-root", this._rootEl = a, this._shadow.appendChild(a);
3414
3395
  const n = e.variant ?? "floating";
3415
3396
  if (n === "floating") {
3416
- const d = {
3397
+ const r = {
3417
3398
  onClick: () => this.open(),
3418
3399
  ariaLabel: this._i18n.openButton
3419
3400
  };
3420
- e.launcherSvg !== void 0 && (d.svgMarkup = e.launcherSvg), e.hideMobileLauncher !== void 0 && (d.hideMobile = e.hideMobileLauncher), e.mobileBreakpoint !== void 0 && (d.mobileBreakpoint = e.mobileBreakpoint), e.launcherTooltip !== void 0 && (d.tooltip = e.launcherTooltip), this._launcher = Ft(d), a.appendChild(this._launcher.container);
3401
+ e.launcherSvg !== void 0 && (r.svgMarkup = e.launcherSvg), e.hideMobileLauncher !== void 0 && (r.hideMobile = e.hideMobileLauncher), e.mobileBreakpoint !== void 0 && (r.mobileBreakpoint = e.mobileBreakpoint), e.launcherTooltip !== void 0 && (r.tooltip = e.launcherTooltip), this._launcher = Vt(r), a.appendChild(this._launcher.container);
3421
3402
  }
3422
3403
  n === "overlay" && a.classList.add("gengage-chat--overlay");
3423
3404
  const i = document.createElement("div");
3424
- a.appendChild(i), this._drawer = new Rt(i, {
3405
+ a.appendChild(i), this._drawer = new Ot(i, {
3425
3406
  i18n: this._i18n,
3426
- onSend: (d, m) => this._sendMessage(d, m),
3407
+ onSend: (r, m) => this._sendMessage(r, m),
3427
3408
  onClose: () => this.close(),
3428
- onAttachment: (d) => this._handleAttachment(d),
3409
+ onAttachment: (r) => this._handleAttachment(r),
3429
3410
  onPanelToggle: () => {
3430
3411
  this._drawer?.persistPanelState(e.accountId);
3431
3412
  },
3432
- onRollback: (d) => this._handleRollback(d),
3413
+ onRollback: (r) => this._handleRollback(r),
3433
3414
  onPanelBack: () => this._panel?.navigateBack(),
3434
3415
  onPanelForward: () => this._panel?.navigateForward(),
3435
3416
  headerTitle: e.headerTitle,
@@ -3438,61 +3419,61 @@ class pn extends He {
3438
3419
  headerCartUrl: e.headerCartUrl,
3439
3420
  headerFavoritesToggle: e.headerFavoritesToggle,
3440
3421
  onFavoritesClick: () => {
3441
- Oe(), e.onFavoritesClick?.();
3422
+ Ge(), e.onFavoritesClick?.();
3442
3423
  },
3443
- onThumbnailClick: (d) => this._rollbackToThread(d),
3444
- onLinkClick: (d) => {
3445
- this._saveSessionAndOpenURL(d);
3424
+ onThumbnailClick: (r) => this._rollbackToThread(r),
3425
+ onLinkClick: (r) => {
3426
+ this._saveSessionAndOpenURL(r);
3446
3427
  },
3447
3428
  voiceEnabled: e.voiceEnabled,
3448
3429
  voiceLang: e.locale ? `${e.locale.split("-")[0] ?? "tr"}-${(e.locale.split("-")[1] ?? e.locale.split("-")[0] ?? "TR").toUpperCase()}` : void 0
3449
- }), this._extendedModeManager = new Ba({
3450
- onChange: (d) => this._panel?.notifyExtension(d),
3430
+ }), this._extendedModeManager = new qa({
3431
+ onChange: (r) => this._panel?.notifyExtension(r),
3451
3432
  productDetailsInPanel: e.isDemoWebsite ?? !1
3452
- }), this._panel = new za({
3433
+ }), this._panel = new Ha({
3453
3434
  drawer: () => this._drawer,
3454
3435
  shadow: () => this._shadow,
3455
3436
  currentThreadId: () => this._currentThreadId,
3456
3437
  bridge: () => this._bridge,
3457
3438
  extendedModeManager: () => this._extendedModeManager,
3458
3439
  i18n: () => this._i18n,
3459
- rollbackToThread: (d) => this._rollbackToThread(d)
3440
+ rollbackToThread: (r) => this._rollbackToThread(r)
3460
3441
  }), n !== "inline" && this._drawer.getElement().classList.add("gengage-chat-drawer--hidden"), this._drawer.restorePanelState(e.accountId);
3461
3442
  const s = e.panelMode ?? "auto";
3462
3443
  s === "collapsed" ? this._drawer.setPanelCollapsed(!0) : s === "expanded" && this._drawer.setForceExpanded();
3463
- const l = sessionStorage.getItem("gengage_restore_session_id"), r = sessionStorage.getItem("gengage_restore_sku"), c = !!(l && r);
3444
+ const l = sessionStorage.getItem("gengage_restore_session_id"), d = sessionStorage.getItem("gengage_restore_sku"), c = !!(l && d);
3464
3445
  c && (sessionStorage.removeItem("gengage_restore_session_id"), sessionStorage.removeItem("gengage_restore_sku"));
3465
3446
  try {
3466
- const d = new Pa();
3467
- await d.open(), this._session = new be(d), await this._restoreFromIndexedDB(c);
3447
+ const r = new Fa();
3448
+ await r.open(), this._session = new ke(r), await this._restoreFromIndexedDB(c);
3468
3449
  } catch {
3469
- this._session = new be(null);
3450
+ this._session = new ke(null);
3470
3451
  }
3471
3452
  this._registerPublicAPI(), e.mobileInitialState !== void 0 && (this._openState = e.mobileInitialState), this._mobileBreakpoint = e.mobileBreakpoint ?? 768, this._syncViewportState();
3472
3453
  const g = () => this._syncViewportState();
3473
3454
  if (window.addEventListener("resize", g, { passive: !0 }), this.addCleanup(() => window.removeEventListener("resize", g)), window.visualViewport) {
3474
- const d = () => {
3455
+ const r = () => {
3475
3456
  if (!this._drawerVisible || !this._isMobileViewport) return;
3476
3457
  const m = this._drawer?.getElement();
3477
3458
  if (!m) return;
3478
- const p = window.innerHeight - (window.visualViewport?.height ?? window.innerHeight);
3479
- m.style.setProperty("--gengage-keyboard-offset", `${Math.max(0, p)}px`);
3459
+ const h = window.innerHeight - (window.visualViewport?.height ?? window.innerHeight);
3460
+ m.style.setProperty("--gengage-keyboard-offset", `${Math.max(0, h)}px`);
3480
3461
  };
3481
- window.visualViewport.addEventListener("resize", d), this.addCleanup(() => window.visualViewport?.removeEventListener("resize", d));
3462
+ window.visualViewport.addEventListener("resize", r), this.addCleanup(() => window.visualViewport?.removeEventListener("resize", r));
3482
3463
  }
3483
- n === "inline" && (this._drawerVisible = !0, this.isVisible = !0, this._applyOpenStateClasses()), this._bridge = new ht({
3464
+ n === "inline" && (this._drawerVisible = !0, this.isVisible = !0, this._applyOpenStateClasses()), this._bridge = new vt({
3484
3465
  namespace: "chat",
3485
- onMessage: (d) => this._handleBridgeMessage(d)
3466
+ onMessage: (r) => this._handleBridgeMessage(r)
3486
3467
  }), this._lastSku = this.config.pageContext?.sku, this._initComplete = !0;
3487
- for (const d of this._pendingActions)
3488
- this._sendAction(d.action, d.options);
3489
- this._pendingActions = [], V("gengage:chat:ready", {}), je("chat"), e.onReady?.();
3468
+ for (const r of this._pendingActions)
3469
+ this._sendAction(r.action, r.options);
3470
+ this._pendingActions = [], W("gengage:chat:ready", {}), Ye("chat"), e.onReady?.();
3490
3471
  }
3491
3472
  onUpdate(e) {
3492
3473
  e.sku !== void 0 && e.sku !== this._lastSku && (this._lastSku = e.sku, this._resetForNewPage());
3493
3474
  }
3494
3475
  onShow() {
3495
- this._showDrawer(), this.emit("open"), V("gengage:chat:open", { state: this._openState }), Ve("chat"), this.config.onOpen?.(), !this._pdpLaunched && this.config.pageContext?.sku && (this._pdpLaunched = !0, this._pdpPrimingInFlight = !0, this._sendAction(
3476
+ this._showDrawer(), this.emit("open"), W("gengage:chat:open", { state: this._openState }), Ke("chat"), this.config.onOpen?.(), !this._pdpLaunched && this.config.pageContext?.sku && (this._pdpLaunched = !0, this._pdpPrimingInFlight = !0, this._sendAction(
3496
3477
  {
3497
3478
  title: "",
3498
3479
  type: "launchSingleProduct",
@@ -3502,7 +3483,7 @@ class pn extends He {
3502
3483
  ));
3503
3484
  }
3504
3485
  onHide() {
3505
- (this.config.variant ?? "floating") === "floating" && (this.root.style.display = ""), this._hideDrawer(), this.emit("close"), V("gengage:chat:close", {}), this.config.onClose?.();
3486
+ (this.config.variant ?? "floating") === "floating" && (this.root.style.display = ""), this._hideDrawer(), this.emit("close"), W("gengage:chat:close", {}), this.config.onClose?.();
3506
3487
  }
3507
3488
  onDestroy() {
3508
3489
  this._abortControllers.forEach((e) => e.abort()), this._abortControllers.clear(), this._activeTypewriter?.cancel(), this._activeTypewriter = null, this._activeTtsHandle?.stop(), this._activeTtsHandle = null, this._drawer?.destroy(), this._drawer = null, this._bridge?.destroy(), this._bridge = null, this._extendedModeManager = null, this._panel?.destroy(), this._panel = null, this._session?.close(), this._session = null, window.gengage && delete window.gengage.chat, this._shadow && (this._shadow.innerHTML = "", this._shadow = null), this._rootEl = null;
@@ -3561,7 +3542,7 @@ class pn extends He {
3561
3542
  this.close();
3562
3543
  break;
3563
3544
  case "startNewChatWithLauncherAction": {
3564
- const t = e.payload, a = t?.action, n = oe(a) ? a : oe(t) ? t : null;
3545
+ const t = e.payload, a = t?.action, n = le(a) ? a : le(t) ? t : null;
3565
3546
  n && this._sendAction(n, { silent: !0 }), this.open();
3566
3547
  break;
3567
3548
  }
@@ -3570,7 +3551,7 @@ class pn extends He {
3570
3551
  if (t && typeof t == "object") {
3571
3552
  this._bridgeContext = t;
3572
3553
  const a = t.sku;
3573
- if (a && this.update({ sku: a }), oe(t.action)) {
3554
+ if (a && this.update({ sku: a }), le(t.action)) {
3574
3555
  this._pdpLaunched = !0, this.open(), this._sendAction(t.action);
3575
3556
  break;
3576
3557
  }
@@ -3600,7 +3581,7 @@ class pn extends He {
3600
3581
  break;
3601
3582
  case "bgColorChange": {
3602
3583
  const a = e.payload?.color;
3603
- typeof a == "string" && dn(a) && this._shadow && this._shadow.host.style.setProperty("--gengage-chat-bg", a);
3584
+ typeof a == "string" && xn(a) && this._shadow && this._shadow.host.style.setProperty("--gengage-chat-bg", a);
3604
3585
  break;
3605
3586
  }
3606
3587
  }
@@ -3652,10 +3633,10 @@ class pn extends He {
3652
3633
  this._rootEl.classList.toggle("gengage-chat-root--open", this._drawerVisible), this._rootEl.classList.toggle("gengage-chat-root--mobile-half", e), this._rootEl.classList.toggle("gengage-chat-root--mobile-full", t);
3653
3634
  }
3654
3635
  _handleAttachment(e) {
3655
- const t = yt(e);
3636
+ const t = Tt(e);
3656
3637
  if (!t.ok) {
3657
3638
  const a = t.reason === "invalid_type" ? this._i18n.invalidFileType : this._i18n.fileTooLarge;
3658
- V("gengage:global:error", {
3639
+ W("gengage:global:error", {
3659
3640
  message: a,
3660
3641
  source: "chat"
3661
3642
  });
@@ -3668,7 +3649,7 @@ class pn extends He {
3668
3649
  this._queuedUserMessages.push(t !== void 0 ? { text: e, attachment: t } : { text: e });
3669
3650
  return;
3670
3651
  }
3671
- We(), this._messages.some((i) => i.role === "user") || $e();
3652
+ Qe(), this._messages.some((i) => i.role === "user") || Xe();
3672
3653
  const n = {
3673
3654
  title: e,
3674
3655
  type: "user_message",
@@ -3689,42 +3670,50 @@ class pn extends He {
3689
3670
  return;
3690
3671
  }
3691
3672
  if (this._choicePrompterEl?.remove(), this._choicePrompterEl = null, !t?.preservePanel && this._comparisonSelectMode && (this._comparisonSelectMode = !1, this._comparisonSelectedSkus = []), this._currentThreadId && this._lastThreadId && this._lastThreadId > this._currentThreadId) {
3692
- const h = this._currentThreadId, L = this._messages.filter((u) => u.threadId !== void 0 && u.threadId > h);
3693
- this._messages = this._messages.filter((u) => !u.threadId || u.threadId <= h);
3694
- for (const u of L)
3695
- this._shadow?.querySelector(`[data-message-id="${CSS.escape(u.id)}"]`)?.remove(), this._panel.snapshots.delete(u.id), this._panel.snapshotTypes.delete(u.id);
3696
- this._shadow?.querySelectorAll("[data-thread-id]")?.forEach((u) => {
3697
- u instanceof HTMLElement && u.dataset.threadId && u.dataset.threadId > h && u.remove();
3673
+ const p = this._currentThreadId, b = this._messages.filter((k) => k.threadId !== void 0 && k.threadId > p);
3674
+ this._messages = this._messages.filter((k) => !k.threadId || k.threadId <= p);
3675
+ for (const k of b)
3676
+ this._shadow?.querySelector(`[data-message-id="${CSS.escape(k.id)}"]`)?.remove(), this._panel.snapshots.delete(k.id), this._panel.snapshotTypes.delete(k.id);
3677
+ this._shadow?.querySelectorAll("[data-thread-id]")?.forEach((k) => {
3678
+ k instanceof HTMLElement && k.dataset.threadId && k.dataset.threadId > p && k.remove();
3698
3679
  });
3699
3680
  }
3700
3681
  this._drawer?.setPills([]), this._drawer?.clearInputAreaChips(), this._bridge?.send("isResponding", !0);
3701
- const a = pt();
3682
+ const a = xt();
3702
3683
  this._currentThreadId = a, this._lastThreadId = a, this._panel && e.type !== "launchSingleProduct" && (this._panel.lastActionType = e.type);
3703
3684
  const n = t?.preservePanel === !0, i = e.type === "launchSingleProduct" && t?.silent === !0 && t?.isPdpPrime === !0;
3704
3685
  if (n || (this._activeRequestThreadId = a), !t?.silent) {
3705
- const h = this._createMessage("user", typeof e.payload == "string" ? e.payload : e.title);
3706
- h.threadId = a, t?.attachment !== void 0 && (h.attachment = t.attachment), this._drawer?.addMessage(h), this._messages.push(h);
3686
+ const p = this._createMessage("user", typeof e.payload == "string" ? e.payload : e.title);
3687
+ p.threadId = a, t?.attachment !== void 0 && (p.attachment = t.attachment), this._drawer?.addMessage(p), this._messages.push(p);
3707
3688
  }
3708
3689
  if (!t?.silent && this._hasUnavailableProductContext() && (e.type === "user_message" || e.type === "inputText")) {
3709
- const h = this._i18n.productNotFoundMessage, L = this._createMessage("assistant", h);
3710
- L.threadId = a, L.status = "done", this._messages.push(L), this._ensureAssistantMessageRendered(L), this._drawer?.updateBotMessage(L.id, h), this._bridge?.send("isResponding", !1), this.emit("message", L), this._persistToIndexedDB().catch(() => {
3690
+ const p = this._i18n.productNotFoundMessage, b = this._createMessage("assistant", p);
3691
+ b.threadId = a, b.status = "done", this._messages.push(b), this._ensureAssistantMessageRendered(b), this._drawer?.updateBotMessage(b.id, p), this._bridge?.send("isResponding", !1), this.emit("message", b), this._persistToIndexedDB().catch(() => {
3711
3692
  });
3712
3693
  return;
3713
3694
  }
3714
- t?.preservePanel || (this._drawer?.hasPanelContent() ? this._drawer.showPanelLoading() : this._drawer?.clearPanel()), this._drawer?.showTypingIndicator();
3715
- let l = "";
3695
+ let l = null;
3696
+ const d = () => {
3697
+ if (l || t?.preservePanel) return;
3698
+ const p = this._drawer?.getPanelContentElement();
3699
+ p && (l = p.cloneNode(!0));
3700
+ }, c = () => {
3701
+ this._drawer?.isPanelLoading() && (l ? this._drawer.setPanelContent(l) : this._drawer.clearPanel(), l = null);
3702
+ };
3703
+ this._drawer?.showTypingIndicator();
3704
+ let g = "";
3716
3705
  const r = this._createMessage("assistant", "");
3717
- r.threadId = a, r.status = "streaming", t?.silent && (r.silent = !0), this._messages.push(r), t?.preservePanel || (this._abortControllers.forEach((h) => h.abort()), this._abortControllers.clear());
3718
- const c = {
3706
+ r.threadId = a, r.status = "streaming", t?.silent && (r.silent = !0), this._messages.push(r), t?.preservePanel || (this._abortControllers.forEach((p) => p.abort()), this._abortControllers.clear());
3707
+ const m = {
3719
3708
  middlewareUrl: this.config.middlewareUrl,
3720
3709
  ...this.config.accountId ? { accountId: this.config.accountId } : {}
3721
3710
  };
3722
- t?.attachment !== void 0 && (c.attachment = t.attachment);
3723
- const d = this._getVisibleMessages().filter((h) => h.content).slice(-50).map((h) => ({
3724
- role: h.role === "user" ? "user" : "model",
3725
- content: h.content ?? ""
3726
- })), m = {
3727
- outputLanguage: Oa(this.config.locale),
3711
+ t?.attachment !== void 0 && (m.attachment = t.attachment);
3712
+ const y = this._getVisibleMessages().filter((p) => p.content).slice(-50).map((p) => ({
3713
+ role: p.role === "user" ? "user" : "model",
3714
+ content: p.content ?? ""
3715
+ })), _ = {
3716
+ outputLanguage: Ka(this.config.locale),
3728
3717
  parentUrl: window.location.href,
3729
3718
  windowWidth: String(window.innerWidth),
3730
3719
  windowHeight: String(window.innerHeight),
@@ -3734,91 +3723,91 @@ class pn extends He {
3734
3723
  appId: this.config.accountId,
3735
3724
  threads: [],
3736
3725
  createdAt: this._chatCreatedAt,
3737
- kvkkApproved: xe(this.config.accountId),
3726
+ kvkkApproved: Ce(this.config.accountId),
3738
3727
  voiceEnabled: this.config.voiceEnabled ?? !1,
3739
3728
  threadId: a,
3740
3729
  isControlGroup: this.config.session?.abTestVariant === "control",
3741
3730
  isMobile: this._isMobileViewport
3742
3731
  };
3743
- this.config.session?.viewId !== void 0 && (m.viewId = this.config.session.viewId);
3744
- const p = _t(e, {
3732
+ this.config.session?.viewId !== void 0 && (_.viewId = this.config.session.viewId);
3733
+ const v = Lt(e, {
3745
3734
  pageContext: this.config.pageContext,
3746
3735
  backendContext: this._lastBackendContext,
3747
3736
  isMobile: this._isMobileViewport
3748
- }), y = {
3737
+ }), C = {
3749
3738
  account_id: this.config.accountId,
3750
3739
  session_id: this.config.session?.sessionId ?? "",
3751
3740
  correlation_id: this.config.session?.sessionId ?? "",
3752
- type: p.type,
3741
+ type: v.type,
3753
3742
  locale: this.config.locale ?? "tr",
3754
- meta: m,
3743
+ meta: _,
3755
3744
  context: {
3756
3745
  // Spread backend context (panel, message_id, etc.) but preserve FE's
3757
3746
  // authoritative chatHistory — the backend's stale `messages` must not
3758
3747
  // overwrite the up-to-date conversation history built by the widget.
3759
3748
  ...this._lastBackendContext ?? {},
3760
- messages: d,
3749
+ messages: y,
3761
3750
  // Backend reads session_id from context.
3762
3751
  session_id: this.config.session?.sessionId ?? ""
3763
3752
  }
3764
3753
  };
3765
- this.config.session?.userId !== void 0 && (y.user_id = this.config.session.userId), this.config.session?.viewId !== void 0 && (y.view_id = this.config.session.viewId), p.payload !== void 0 && (y.payload = p.payload), this.config.pageContext?.sku !== void 0 && (y.sku = this.config.pageContext.sku), this.config.pageContext?.pageType !== void 0 && (y.page_type = this.config.pageContext.pageType);
3766
- const _ = crypto.randomUUID(), x = Date.now();
3767
- let E = 0, I = !1, S = !1;
3754
+ this.config.session?.userId !== void 0 && (C.user_id = this.config.session.userId), this.config.session?.viewId !== void 0 && (C.view_id = this.config.session.viewId), v.payload !== void 0 && (C.payload = v.payload), this.config.pageContext?.sku !== void 0 && (C.sku = this.config.pageContext.sku), this.config.pageContext?.pageType !== void 0 && (C.page_type = this.config.pageContext.pageType);
3755
+ const E = crypto.randomUUID(), S = Date.now();
3756
+ let w = 0, L = !1, R = !1;
3768
3757
  this.track(
3769
- Ge(this.analyticsContext(), {
3758
+ Je(this.analyticsContext(), {
3770
3759
  endpoint: "process_action",
3771
- request_id: _,
3760
+ request_id: E,
3772
3761
  widget: "chat"
3773
3762
  })
3774
3763
  );
3775
- let v = null;
3776
- if (v = Et(
3777
- y,
3764
+ let q = null;
3765
+ if (q = Pt(
3766
+ C,
3778
3767
  {
3779
- onTextChunk: (h, L, A) => {
3780
- if (!n && a !== this._activeRequestThreadId || (l += h, this._drawer?.removeTypingIndicator(), A?.skuToProductItem && (this._skuToProductItem = { ...this._skuToProductItem, ...A.skuToProductItem }), A?.conversationMode && (this._conversationMode = A.conversationMode), this.track(
3781
- dt(this.analyticsContext(), {
3782
- request_id: _,
3783
- chunk_index: E++,
3768
+ onTextChunk: (p, b, f) => {
3769
+ if (!n && a !== this._activeRequestThreadId || (g += p, this._drawer?.removeTypingIndicator(), f?.skuToProductItem && (this._skuToProductItem = { ...this._skuToProductItem, ...f.skuToProductItem }), f?.conversationMode && (this._conversationMode = f.conversationMode), this.track(
3770
+ ft(this.analyticsContext(), {
3771
+ request_id: E,
3772
+ chunk_index: w++,
3784
3773
  widget: "chat"
3785
3774
  })
3786
3775
  ), !this._drawer)) return;
3787
- let u = l;
3788
- if (L && ge(u)) {
3789
- const k = this.config.accountId;
3790
- if (!xe(k)) {
3791
- const P = qa(u);
3792
- P && this._drawer?.showKvkkBanner(P, () => {
3776
+ let k = g;
3777
+ if (b && ue(k)) {
3778
+ const I = this.config.accountId;
3779
+ if (!Ce(I)) {
3780
+ const z = Ga(k);
3781
+ z && this._drawer?.showKvkkBanner(z, () => {
3793
3782
  this._drawer?.hideKvkkBanner();
3794
- }), Fa(k);
3783
+ }), Wa(I);
3795
3784
  }
3796
- u = Ua(u);
3785
+ k = $a(k);
3797
3786
  }
3798
- const b = this._shadow?.querySelector(
3787
+ const T = this._shadow?.querySelector(
3799
3788
  `[data-message-id="${r.id}"] .gengage-chat-bubble-text`
3800
3789
  );
3801
- if (b ? b.innerHTML = $(u) : (r.content = u, r.role === "assistant" && r.threadId && !this._threadsWithFirstBot.has(r.threadId) && (this._threadsWithFirstBot.add(r.threadId), this._drawer.markFirstBotMessage(r.id)), this._drawer.addMessage(r)), L) {
3802
- r.content = u, r.status = "done", pe();
3803
- const k = this._shadow?.querySelector(
3790
+ if (T ? T.innerHTML = G(k) : (r.content = k, r.role === "assistant" && r.threadId && !this._threadsWithFirstBot.has(r.threadId) && (this._threadsWithFirstBot.add(r.threadId), this._drawer.markFirstBotMessage(r.id)), this._drawer.addMessage(r)), b) {
3791
+ r.content = k, r.status = "done", xe();
3792
+ const I = this._shadow?.querySelector(
3804
3793
  `[data-message-id="${r.id}"] .gengage-chat-bubble-text`
3805
3794
  );
3806
- if (k) {
3795
+ if (I) {
3807
3796
  this._activeTypewriter?.cancel();
3808
- const P = A?.productMentions;
3809
- this._activeTypewriter = ka({
3810
- container: k,
3811
- html: $(u),
3797
+ const z = f?.productMentions;
3798
+ this._activeTypewriter = Ia({
3799
+ container: I,
3800
+ html: G(k),
3812
3801
  onTick: () => this._drawer?.scrollToBottomIfNeeded(),
3813
3802
  onComplete: () => {
3814
- this._activeTypewriter = null, P && P.length > 0 && k && Ca({
3815
- container: k,
3816
- mentions: P,
3817
- onProductClick: (z) => {
3803
+ this._activeTypewriter = null, z && z.length > 0 && I && Aa({
3804
+ container: I,
3805
+ mentions: z,
3806
+ onProductClick: (D) => {
3818
3807
  this._sendAction({
3819
- title: P.find((T) => T.sku === z)?.short_name ?? z,
3808
+ title: z.find((N) => N.sku === D)?.short_name ?? D,
3820
3809
  type: "launchSingleProduct",
3821
- payload: { sku: z }
3810
+ payload: { sku: D }
3822
3811
  });
3823
3812
  }
3824
3813
  });
@@ -3827,73 +3816,83 @@ class pn extends He {
3827
3816
  }
3828
3817
  }
3829
3818
  },
3830
- onUISpec: (h, L, A) => {
3831
- if (!n && a !== this._activeRequestThreadId || L !== "chat") return;
3832
- const u = h.elements[h.root], b = u?.type ?? "unknown";
3819
+ onUISpec: (p, b, f) => {
3820
+ if (!n && a !== this._activeRequestThreadId || b !== "chat") return;
3821
+ const k = p.elements[p.root], T = k?.type ?? "unknown";
3833
3822
  this.track(
3834
- ct(this.analyticsContext(), {
3835
- request_id: _,
3836
- chunk_index: E,
3837
- component_type: b,
3823
+ ht(this.analyticsContext(), {
3824
+ request_id: E,
3825
+ chunk_index: w,
3826
+ component_type: T,
3838
3827
  widget: "chat"
3839
3828
  })
3840
3829
  );
3841
- const k = this._buildRenderContext();
3842
- if (b === "ComparisonTable") {
3843
- const T = u?.props?.products;
3844
- lt(Array.isArray(T) ? T.length : 0);
3830
+ const I = this._buildRenderContext();
3831
+ if (T === "ComparisonTable") {
3832
+ const N = k?.props?.products;
3833
+ ut(Array.isArray(N) ? N.length : 0);
3845
3834
  }
3846
- if (b === "ProductGrid") {
3847
- const T = u?.children?.length ?? 0;
3848
- gt(void 0, T);
3835
+ if (T === "ProductGrid") {
3836
+ const N = k?.children?.length ?? 0;
3837
+ mt(void 0, N);
3849
3838
  }
3850
- const P = A === "panel" && this._panel ? this._panel.toPanelSpec(h) : h, z = !r.silent && (A !== "panel" || b === "ProductCard") && b !== "ActionButtons";
3851
- if (A === "panel" && this._panel) {
3852
- S = !0, u?.props?.similarsAppend === !0 && this._panel.currentType === "ProductDetailsPanel" && this._drawer?.hasPanelContent() && !this._drawer.isPanelLoading() ? this._appendSimilarsToPanel(P, k) : b === "ProductGrid" && this._drawer?.hasPanelContent() && !this._drawer.isPanelLoading() ? this._drawer.appendPanelContent(this._renderUISpec(P, k)) : (this._comparisonSelectMode = !1, this._comparisonSelectedSkus = [], this._drawer?.setPanelContent(this._renderUISpec(P, k)), this._panel.currentType = b), b === "ProductDetailsPanel" && e.type === "launchSingleProduct" && this._clearUnavailableProductContext(), r.threadId && !this._panel.threads.includes(r.threadId) && this._panel.threads.push(r.threadId);
3853
- const T = this._panel.currentType ?? b, N = u?.props?.panelTitle;
3854
- this._panel.updateTopBar(T, N), this._panel.updateExtendedMode(b);
3839
+ const z = f === "panel" && this._panel ? this._panel.toPanelSpec(p) : p, D = !r.silent && (f !== "panel" || T === "ProductCard") && T !== "ActionButtons";
3840
+ if (f === "panel" && this._panel) {
3841
+ const N = !R;
3842
+ R = !0;
3843
+ const A = Oa({
3844
+ componentType: T,
3845
+ similarsAppend: k?.props?.similarsAppend === !0,
3846
+ currentPanelType: this._panel.currentType,
3847
+ hasPanelContent: this._drawer?.hasPanelContent() ?? !1,
3848
+ isPanelLoading: this._drawer?.isPanelLoading() ?? !1,
3849
+ isFirstPanelContentInStream: N
3850
+ });
3851
+ A === "appendSimilars" ? this._appendSimilarsToPanel(z, I) : A === "append" ? this._drawer?.appendPanelContent(this._renderUISpec(z, I)) : (this._comparisonSelectMode = !1, this._comparisonSelectedSkus = [], this._drawer?.setPanelContent(this._renderUISpec(z, I)), this._panel.currentType = T), T === "ProductDetailsPanel" && e.type === "launchSingleProduct" && this._clearUnavailableProductContext(), r.threadId && !this._panel.threads.includes(r.threadId) && this._panel.threads.push(r.threadId);
3852
+ const M = this._panel.currentType ?? T, u = k?.props?.panelTitle;
3853
+ this._panel.updateTopBar(M, u), this._panel.updateExtendedMode(T);
3855
3854
  }
3856
- if (b === "ProductDetailsPanel" && !r.silent && A === "panel") {
3857
- const T = u?.props?.product;
3858
- if (T) {
3859
- const N = {
3855
+ if (T === "ProductDetailsPanel" && !r.silent && f === "panel") {
3856
+ const N = k?.props?.product;
3857
+ if (N) {
3858
+ const A = {
3860
3859
  root: "root",
3861
3860
  elements: {
3862
3861
  root: {
3863
3862
  type: "ProductSummaryCard",
3864
- props: { product: T }
3863
+ props: { product: N }
3865
3864
  }
3866
3865
  }
3867
- }, f = this._shadow?.querySelector(".gengage-chat-messages");
3868
- if (f) {
3869
- const C = this._renderUISpec(N, k);
3870
- r.threadId && (C.dataset.threadId = r.threadId), f.appendChild(C), C.scrollIntoView({ behavior: "auto", block: "end" });
3866
+ }, M = this._shadow?.querySelector(".gengage-chat-messages");
3867
+ if (M) {
3868
+ const u = this._renderUISpec(A, I);
3869
+ r.threadId && (u.dataset.threadId = r.threadId), M.appendChild(u), u.scrollIntoView({ behavior: "auto", block: "end" });
3871
3870
  }
3872
3871
  }
3873
3872
  }
3874
- if (z) {
3875
- const T = this._shadow?.querySelector(".gengage-chat-messages");
3876
- if (T) {
3877
- const N = this._renderUISpec(h, k);
3878
- r.threadId && (N.dataset.threadId = r.threadId), T.appendChild(N), N.scrollIntoView({ behavior: "auto", block: "end" });
3873
+ if (D) {
3874
+ const N = this._shadow?.querySelector(".gengage-chat-messages");
3875
+ if (N) {
3876
+ const A = this._renderUISpec(p, I);
3877
+ r.threadId && (A.dataset.threadId = r.threadId), N.appendChild(A), A.scrollIntoView({ behavior: "auto", block: "end" });
3879
3878
  }
3880
3879
  }
3881
- if ((b === "ProductGrid" || b === "ProductCard") && r.threadId) {
3882
- const T = u?.children ?? [], N = b === "ProductGrid" ? T.map((f) => h.elements[f]?.props?.product).filter(Boolean) : [u?.props?.product].filter(Boolean);
3883
- for (const f of N) {
3884
- const C = f.sku, M = f.imageUrl;
3885
- C && M && this._thumbnailEntries.push({ sku: C, imageUrl: M, threadId: r.threadId });
3880
+ if ((T === "ProductGrid" || T === "ProductCard") && r.threadId) {
3881
+ const N = k?.children ?? [], A = T === "ProductGrid" ? N.map((M) => p.elements[M]?.props?.product).filter(Boolean) : [k?.props?.product].filter(Boolean);
3882
+ for (const M of A) {
3883
+ const u = M.sku, P = M.imageUrl;
3884
+ u && P && this._thumbnailEntries.push({ sku: u, imageUrl: P, threadId: r.threadId });
3886
3885
  }
3887
3886
  this._drawer?.setThumbnails(this._thumbnailEntries);
3888
3887
  }
3889
- if (b === "ProductGrid" || b === "ProductDetailsPanel") {
3890
- const N = (b === "ProductGrid" ? (u?.children ?? []).map((f) => h.elements[f]?.props?.product).filter(Boolean) : [
3891
- u?.props?.product ?? u?.props
3892
- ].filter(Boolean)).map((f) => f.imageUrl).filter((f) => typeof f == "string").slice(0, 5);
3893
- N.length > 0 && this._bridge?.send("previewImages", { images: N });
3888
+ if (T === "ProductGrid" || T === "ProductDetailsPanel") {
3889
+ const A = (T === "ProductGrid" ? (k?.children ?? []).map((M) => p.elements[M]?.props?.product).filter(Boolean) : [
3890
+ k?.props?.product ?? k?.props
3891
+ ].filter(Boolean)).map((M) => M.imageUrl).filter((M) => typeof M == "string").slice(0, 5);
3892
+ A.length > 0 && this._bridge?.send("previewImages", { images: A });
3894
3893
  }
3895
- if (b === "ProductGrid" && A === "panel" && !this._comparisonSelectMode && !Ia()) {
3896
- this._choicePrompterEl?.remove(), this._shadow?.querySelectorAll(".gengage-chat-choice-prompter").forEach((C) => C.remove()), this._choicePrompterEl = La({
3894
+ if (T === "ProductGrid" && f === "panel" && !this._comparisonSelectMode && !za()) {
3895
+ this._choicePrompterEl?.remove(), this._shadow?.querySelectorAll(".gengage-chat-choice-prompter").forEach((u) => u.remove()), this._choicePrompterEl = Ba({
3897
3896
  heading: this._i18n.choicePrompterHeading,
3898
3897
  suggestion: this._i18n.choicePrompterSuggestion,
3899
3898
  ctaLabel: this._i18n.choicePrompterCta,
@@ -3905,144 +3904,144 @@ class pn extends He {
3905
3904
  this._choicePrompterEl = null;
3906
3905
  }
3907
3906
  });
3908
- const N = this._isMobileViewport || this._drawer?.isPanelCollapsed() ? ".gengage-chat-conversation" : ".gengage-chat-panel", f = this._shadow?.querySelector(N);
3909
- f ? f.appendChild(this._choicePrompterEl) : this._choicePrompterEl = null;
3907
+ const A = this._isMobileViewport || this._drawer?.isPanelCollapsed() ? ".gengage-chat-conversation" : ".gengage-chat-panel", M = this._shadow?.querySelector(A);
3908
+ M ? M.appendChild(this._choicePrompterEl) : this._choicePrompterEl = null;
3910
3909
  }
3911
- if (b === "ActionButtons") {
3912
- const T = u?.props?.buttons;
3913
- if (T && T.length > 0) {
3914
- const N = [], f = [];
3915
- for (const C of T)
3916
- if (Ta(C)) {
3917
- const M = {
3918
- label: C.label,
3919
- action: C.action
3910
+ if (T === "ActionButtons") {
3911
+ const N = k?.props?.buttons;
3912
+ if (N && N.length > 0) {
3913
+ const A = [], M = [];
3914
+ for (const u of N)
3915
+ if (Ma(u)) {
3916
+ const P = {
3917
+ label: u.label,
3918
+ action: u.action
3920
3919
  };
3921
- C.icon && (M.icon = C.icon), N.push(M);
3920
+ u.icon && (P.icon = u.icon), A.push(P);
3922
3921
  } else
3923
- f.push(C);
3924
- N.length > 0 && this._drawer?.setInputAreaChips(
3925
- N.map((C) => ({
3926
- label: C.label,
3927
- onAction: () => this._sendAction(C.action),
3928
- ...C.icon ? { icon: C.icon } : {}
3922
+ M.push(u);
3923
+ A.length > 0 && this._drawer?.setInputAreaChips(
3924
+ A.map((u) => ({
3925
+ label: u.label,
3926
+ onAction: () => this._sendAction(u.action),
3927
+ ...u.icon ? { icon: u.icon } : {}
3929
3928
  }))
3930
- ), f.length > 0 && this._drawer?.setPills(
3931
- f.map((C) => {
3932
- const M = {
3933
- label: C.label,
3934
- onAction: () => this._sendAction(C.action)
3929
+ ), M.length > 0 && this._drawer?.setPills(
3930
+ M.map((u) => {
3931
+ const P = {
3932
+ label: u.label,
3933
+ onAction: () => this._sendAction(u.action)
3935
3934
  };
3936
- return C.icon && (M.icon = C.icon), C.image && (M.image = C.image), C.description && (M.description = C.description), M;
3935
+ return u.icon && (P.icon = u.icon), u.image && (P.image = u.image), u.description && (P.description = u.description), P;
3937
3936
  })
3938
3937
  );
3939
3938
  }
3940
3939
  }
3941
- r.uiSpec = h;
3940
+ r.uiSpec = p;
3942
3941
  },
3943
- onAction: (h) => {
3944
- if (!(!n && a !== this._activeRequestThreadId) && h.type === "action") {
3945
- const L = {};
3946
- this.config.actionHandling?.unknownActionPolicy !== void 0 && (L.unknownActionPolicy = this.config.actionHandling.unknownActionPolicy), this.config.actionHandling?.allowScriptCall !== void 0 && (L.allowScriptCall = this.config.actionHandling.allowScriptCall), ft(
3947
- h,
3942
+ onAction: (p) => {
3943
+ if (!(!n && a !== this._activeRequestThreadId) && p.type === "action") {
3944
+ const b = {};
3945
+ this.config.actionHandling?.unknownActionPolicy !== void 0 && (b.unknownActionPolicy = this.config.actionHandling.unknownActionPolicy), this.config.actionHandling?.allowScriptCall !== void 0 && (b.allowScriptCall = this.config.actionHandling.allowScriptCall), _t(
3946
+ p,
3948
3947
  {
3949
3948
  openChat: () => this.open(),
3950
- navigate: (A) => {
3951
- H(A.url) && (this._bridge?.send("navigate", A), A.newTab ? window.open(A.url, "_blank", "noopener,noreferrer") : window.location.href = A.url);
3949
+ navigate: (f) => {
3950
+ O(f.url) && (this._bridge?.send("navigate", f), f.newTab ? window.open(f.url, "_blank", "noopener,noreferrer") : window.location.href = f.url);
3952
3951
  },
3953
- saveSession: (A) => this.saveSession(A.sessionId, A.sku),
3954
- addToCart: (A) => {
3955
- V("gengage:similar:add-to-cart", A);
3952
+ saveSession: (f) => this.saveSession(f.sessionId, f.sku),
3953
+ addToCart: (f) => {
3954
+ W("gengage:similar:add-to-cart", f);
3956
3955
  },
3957
- scriptCall: (A) => {
3958
- V("gengage:chat:script-call", A), this.config.onScriptCall?.(A);
3956
+ scriptCall: (f) => {
3957
+ W("gengage:chat:script-call", f), this.config.onScriptCall?.(f);
3959
3958
  }
3960
3959
  },
3961
- L
3960
+ b
3962
3961
  );
3963
3962
  }
3964
3963
  },
3965
- onMetadata: (h) => {
3966
- if (!(!n && a !== this._activeRequestThreadId) && h.type === "metadata" && h.meta) {
3967
- if ((h.meta.panel !== void 0 || h.meta.messages !== void 0 || h.meta.message_id !== void 0) && (this._lastBackendContext = h.meta), h.meta.panelLoading) {
3968
- I = !0, S = !1;
3969
- const A = typeof h.meta.panelPendingType == "string" ? h.meta.panelPendingType : void 0;
3970
- this._panel && (this._panel.currentType = null), this._drawer?.showPanelLoading(A), A && this._panel?.updateTopBarForLoading(A);
3964
+ onMetadata: (p) => {
3965
+ if (!(!n && a !== this._activeRequestThreadId) && p.type === "metadata" && p.meta) {
3966
+ if ((p.meta.panel !== void 0 || p.meta.messages !== void 0 || p.meta.message_id !== void 0) && (this._lastBackendContext = p.meta), p.meta.panelLoading) {
3967
+ L = !0, R = !1, d();
3968
+ const f = typeof p.meta.panelPendingType == "string" ? p.meta.panelPendingType : void 0;
3969
+ this._panel && (this._panel.currentType = null), this._drawer?.showPanelLoading(f), f && this._panel?.updateTopBarForLoading(f);
3971
3970
  }
3972
- if (h.meta.voice) {
3973
- const A = new CustomEvent("gengage:chat:voice", {
3974
- detail: { payload: h.meta.voice },
3971
+ if (p.meta.voice) {
3972
+ const f = new CustomEvent("gengage:chat:voice", {
3973
+ detail: { payload: p.meta.voice },
3975
3974
  bubbles: !1,
3976
3975
  cancelable: !0
3977
- }), u = window.dispatchEvent(A);
3978
- if (rt(), u) {
3979
- const b = h.meta.voice;
3980
- b.audio_base64 && (this._activeTtsHandle?.stop(), this._activeTtsHandle = qt(
3981
- b.audio_base64,
3982
- b.content_type ?? "audio/ogg"
3976
+ }), k = window.dispatchEvent(f);
3977
+ if (dt(), k) {
3978
+ const T = p.meta.voice;
3979
+ T.audio_base64 && (this._activeTtsHandle?.stop(), this._activeTtsHandle = $t(
3980
+ T.audio_base64,
3981
+ T.content_type ?? "audio/ogg"
3983
3982
  ));
3984
3983
  }
3985
3984
  }
3986
- (h.meta.redirectTarget || h.meta.redirect) && V("gengage:chat:redirect", {
3987
- target: h.meta.redirectTarget ?? null,
3988
- payload: h.meta.redirect ?? null
3989
- }), h.meta.analyzeAnimation && (I = !0, S = !1, this._panel && (this._panel.currentType = null), this._drawer?.showPanelLoading(), this._panel?.updateTopBarForLoading("productDetails")), h.meta.loading && typeof h.meta.loadingText == "string" && (this._drawer?.addThinkingStep(h.meta.loadingText), this._bridge?.send("loadingMessage", { text: h.meta.loadingText })), h.meta.visitorDataResponse && this._bridge?.send("engagingMessage", h.meta.visitorDataResponse), h.meta.formType && this._bridge?.send("glovOtokoc", {
3990
- type: h.meta.formType,
3991
- data: h.meta.formPayload
3992
- }), h.meta.launcherContent && this._bridge?.send("launcherContent", h.meta.launcherContent), V("gengage:chat:metadata", { payload: h.meta });
3993
- const L = h.meta;
3994
- typeof L.prompt_tokens == "number" && typeof L.completion_tokens == "number" && this.track(
3995
- st(this.analyticsContext(), {
3996
- model: h.model ?? "unknown",
3997
- prompt_tokens: L.prompt_tokens,
3998
- completion_tokens: L.completion_tokens,
3999
- total_tokens: L.total_tokens ?? L.prompt_tokens + L.completion_tokens
3985
+ (p.meta.redirectTarget || p.meta.redirect) && W("gengage:chat:redirect", {
3986
+ target: p.meta.redirectTarget ?? null,
3987
+ payload: p.meta.redirect ?? null
3988
+ }), p.meta.analyzeAnimation && (L = !0, R = !1, d(), this._panel && (this._panel.currentType = null), this._drawer?.showPanelLoading(), this._panel?.updateTopBarForLoading("productDetails")), p.meta.loading && typeof p.meta.loadingText == "string" && (this._drawer?.addThinkingStep(p.meta.loadingText), this._bridge?.send("loadingMessage", { text: p.meta.loadingText })), p.meta.visitorDataResponse && this._bridge?.send("engagingMessage", p.meta.visitorDataResponse), p.meta.formType && this._bridge?.send("glovOtokoc", {
3989
+ type: p.meta.formType,
3990
+ data: p.meta.formPayload
3991
+ }), p.meta.launcherContent && this._bridge?.send("launcherContent", p.meta.launcherContent), W("gengage:chat:metadata", { payload: p.meta });
3992
+ const b = p.meta;
3993
+ typeof b.prompt_tokens == "number" && typeof b.completion_tokens == "number" && this.track(
3994
+ pt(this.analyticsContext(), {
3995
+ model: p.model ?? "unknown",
3996
+ prompt_tokens: b.prompt_tokens,
3997
+ completion_tokens: b.completion_tokens,
3998
+ total_tokens: b.total_tokens ?? b.prompt_tokens + b.completion_tokens
4000
3999
  })
4001
4000
  );
4002
4001
  }
4003
4002
  },
4004
- onError: (h) => {
4005
- if (v && this._abortControllers.delete(v), !n && a !== this._activeRequestThreadId) return;
4003
+ onError: (p) => {
4004
+ if (q && this._abortControllers.delete(q), !n && a !== this._activeRequestThreadId) return;
4006
4005
  this._bridge?.send("isResponding", !1), this._bridge?.send("loadingMessage", { text: null }), this._drawer?.removeTypingIndicator();
4007
- const L = S;
4008
- if (I && !S && this._drawer?.isPanelLoading() && this._drawer.clearPanel(), I = !1, S = !1, !(r.silent || r.content != null && r.content.length > 0 || l.length > 0 || L))
4006
+ const b = R;
4007
+ if (L && !R && c(), L = !1, R = !1, !(r.silent || r.content != null && r.content.length > 0 || g.length > 0 || b))
4009
4008
  if (i || this._hasUnavailableProductContext()) {
4010
- const u = this._i18n.productNotFoundMessage;
4011
- r.content = u, r.status = "done", this._ensureAssistantMessageRendered(r), this._drawer?.updateBotMessage(r.id, u), this._markUnavailableProductContext();
4009
+ const k = this._i18n.productNotFoundMessage;
4010
+ r.content = k, r.status = "done", this._ensureAssistantMessageRendered(r), this._drawer?.updateBotMessage(r.id, k), this._markUnavailableProductContext();
4012
4011
  } else
4013
- this.emit("error", h), this._drawer?.showError(this._i18n.errorMessage, () => {
4012
+ this.emit("error", p), this._drawer?.showError(this._i18n.errorMessage, () => {
4014
4013
  this._lastSentAction && this._sendAction(this._lastSentAction.action, this._lastSentAction.options);
4015
4014
  });
4016
4015
  i && (this._pdpPrimingInFlight = !1, this._flushQueuedUserMessages()), r.status === "streaming" && (r.status = "error"), this.track(
4017
- ot(this.analyticsContext(), {
4018
- request_id: _,
4016
+ gt(this.analyticsContext(), {
4017
+ request_id: E,
4019
4018
  error_code: "STREAM_ERROR",
4020
- error_message: h.message,
4019
+ error_message: p.message,
4021
4020
  widget: "chat"
4022
4021
  })
4023
4022
  );
4024
4023
  },
4025
4024
  onDone: () => {
4026
- if (v && this._abortControllers.delete(v), !(!n && a !== this._activeRequestThreadId)) {
4027
- if (this._activeRequestThreadId = null, this._bridge?.send("isResponding", !1), this._bridge?.send("loadingMessage", { text: null }), this._drawer?.removeTypingIndicator(), I && !S && this._drawer?.isPanelLoading() && this._drawer.clearPanel(), I = !1, S = !1, i && !l && !S) {
4028
- const h = this._i18n.productNotFoundMessage;
4029
- r.content = h, this._ensureAssistantMessageRendered(r), this._drawer?.updateBotMessage(r.id, h), this._markUnavailableProductContext();
4025
+ if (q && this._abortControllers.delete(q), !(!n && a !== this._activeRequestThreadId)) {
4026
+ if (this._activeRequestThreadId = null, this._bridge?.send("isResponding", !1), this._bridge?.send("loadingMessage", { text: null }), this._drawer?.removeTypingIndicator(), L && !R && c(), L = !1, R = !1, i && !g && !R) {
4027
+ const p = this._i18n.productNotFoundMessage;
4028
+ r.content = p, this._ensureAssistantMessageRendered(r), this._drawer?.updateBotMessage(r.id, p), this._markUnavailableProductContext();
4030
4029
  }
4031
- i && (this._pdpPrimingInFlight = !1, this._flushQueuedUserMessages()), r.status === "streaming" && (r.status = "done", pe()), this.emit("message", r), this._panel?.snapshotForMessage(r.id), this._panel?.attachClickHandler(r.id), this.track(
4032
- at(this.analyticsContext(), {
4033
- request_id: _,
4034
- latency_ms: Date.now() - x,
4035
- chunk_count: E,
4030
+ i && (this._pdpPrimingInFlight = !1, this._flushQueuedUserMessages()), r.status === "streaming" && (r.status = "done", xe()), this.emit("message", r), this._panel?.snapshotForMessage(r.id), this._panel?.attachClickHandler(r.id), this.track(
4031
+ st(this.analyticsContext(), {
4032
+ request_id: E,
4033
+ latency_ms: Date.now() - S,
4034
+ chunk_count: w,
4036
4035
  widget: "chat"
4037
4036
  })
4038
4037
  ), this.track(
4039
- nt(this.analyticsContext(), {
4038
+ ct(this.analyticsContext(), {
4040
4039
  meter_key: "chat_request",
4041
4040
  quantity: 1,
4042
4041
  unit: "request"
4043
4042
  })
4044
4043
  ), this.track(
4045
- it(this.analyticsContext(), {
4044
+ lt(this.analyticsContext(), {
4046
4045
  message_count: this._messages.length,
4047
4046
  history_ref: this.config.session?.sessionId ?? "",
4048
4047
  redaction_level: "none"
@@ -4052,11 +4051,11 @@ class pn extends He {
4052
4051
  }
4053
4052
  }
4054
4053
  },
4055
- c
4056
- ), this._abortControllers.add(v), !t?.silent && !n) {
4057
- const h = v;
4054
+ m
4055
+ ), this._abortControllers.add(q), !t?.silent && !n) {
4056
+ const p = q;
4058
4057
  this._drawer?.showStopButton(() => {
4059
- h.abort(), this._abortControllers.delete(h), this._drawer?.removeTypingIndicator(), this._bridge?.send("isResponding", !1), this._bridge?.send("loadingMessage", { text: null }), r.status === "streaming" && (r.status = "done");
4058
+ p.abort(), this._abortControllers.delete(p), this._drawer?.removeTypingIndicator(), this._bridge?.send("isResponding", !1), this._bridge?.send("loadingMessage", { text: null }), r.status === "streaming" && (r.status = "done");
4060
4059
  });
4061
4060
  }
4062
4061
  }
@@ -4167,51 +4166,51 @@ class pn extends He {
4167
4166
  const s = this.config.pageContext?.sku;
4168
4167
  if (s && i.sku && i.sku !== s) return;
4169
4168
  if (this._pdpLaunched = !0, this._drawer?.lockScrollForRestore(), this._currentThreadId = i.currentThreadId, this._lastThreadId = i.lastThreadId, this._chatCreatedAt = i.createdAt, i.panelThreads && (this._panel.threads = i.panelThreads), i.thumbnailEntries && (this._thumbnailEntries = i.thumbnailEntries, this._drawer?.setThumbnails(this._thumbnailEntries)), i.panelSnapshotHtml)
4170
- for (const [r, c] of Object.entries(i.panelSnapshotHtml)) {
4169
+ for (const [d, c] of Object.entries(i.panelSnapshotHtml)) {
4171
4170
  const g = document.createElement("div");
4172
- g.innerHTML = $(c), this._panel.snapshots.set(r, g);
4171
+ g.innerHTML = G(c), this._panel.snapshots.set(d, g);
4173
4172
  }
4174
4173
  let l = 0;
4175
- for (const r of i.messages) {
4174
+ for (const d of i.messages) {
4176
4175
  const c = {
4177
- id: r.id,
4178
- role: r.role,
4179
- timestamp: r.timestamp,
4180
- status: r.status
4176
+ id: d.id,
4177
+ role: d.role,
4178
+ timestamp: d.timestamp,
4179
+ status: d.status
4181
4180
  };
4182
- if (r.threadId !== void 0 && (c.threadId = r.threadId), r.content !== void 0 && (c.content = r.content), r.silent && (c.silent = !0), this._messages.push(c), c.silent) continue;
4181
+ if (d.threadId !== void 0 && (c.threadId = d.threadId), d.content !== void 0 && (c.content = d.content), d.silent && (c.silent = !0), this._messages.push(c), c.silent) continue;
4183
4182
  c.role === "assistant" && c.threadId && !this._threadsWithFirstBot.has(c.threadId) && (this._threadsWithFirstBot.add(c.threadId), this._drawer?.markFirstBotMessage(c.id)), this._drawer?.addMessage(c);
4184
- const g = parseInt(r.id.replace("msg-", ""), 10);
4183
+ const g = parseInt(d.id.replace("msg-", ""), 10);
4185
4184
  if (!isNaN(g) && g > l && (l = g), c.role === "assistant" && c.threadId) {
4186
- const d = await this._loadPayload(c.threadId, c.id);
4187
- d && (c.uiSpec = d, this._restoreInlineUISpec(c), this._panel?.attachClickHandler(c.id), delete c.uiSpec);
4185
+ const r = await this._loadPayload(c.threadId, c.id);
4186
+ r && (c.uiSpec = r, this._restoreInlineUISpec(c), this._panel?.attachClickHandler(c.id), delete c.uiSpec);
4188
4187
  }
4189
4188
  }
4190
4189
  if (l > this._currentMessageId && (this._currentMessageId = l), this._currentThreadId) {
4191
- let r = await this._session.db?.loadContext(t, this._currentThreadId);
4192
- r || (r = await this._session.db?.loadLatestContext(t)), r && (this._lastBackendContext = r.context);
4190
+ let d = await this._session.db?.loadContext(t, this._currentThreadId);
4191
+ d || (d = await this._session.db?.loadLatestContext(t)), d && (this._lastBackendContext = d.context);
4193
4192
  }
4194
4193
  if (this._currentThreadId) {
4195
- const r = [...this._messages].reverse().find((c) => c.role === "assistant" && c.threadId === this._currentThreadId && !c.silent);
4196
- r && this._panel.snapshots.has(r.id) && this._panel?.restoreForMessage(r.id);
4194
+ const d = [...this._messages].reverse().find((c) => c.role === "assistant" && c.threadId === this._currentThreadId && !c.silent);
4195
+ d && this._panel.snapshots.has(d.id) && this._panel?.restoreForMessage(d.id);
4197
4196
  }
4198
4197
  if (this._currentThreadId) {
4199
- const r = this._currentThreadId;
4198
+ const d = this._currentThreadId;
4200
4199
  for (const c of this._messages)
4201
- c.threadId && c.threadId > r && this._shadow?.querySelector(`[data-message-id="${CSS.escape(c.id)}"]`)?.classList.add("gengage-chat-bubble--hidden");
4200
+ c.threadId && c.threadId > d && this._shadow?.querySelector(`[data-message-id="${CSS.escape(c.id)}"]`)?.classList.add("gengage-chat-bubble--hidden");
4202
4201
  this._shadow?.querySelectorAll("[data-thread-id]").forEach((c) => {
4203
- c instanceof HTMLElement && c.dataset.threadId && c.dataset.threadId > r && c.classList.add("gengage-chat-bubble--hidden");
4202
+ c instanceof HTMLElement && c.dataset.threadId && c.dataset.threadId > d && c.classList.add("gengage-chat-bubble--hidden");
4204
4203
  });
4205
4204
  }
4206
4205
  if (this._panel.threads.length > 0 && this._currentThreadId) {
4207
- const r = this._panel.threads[this._panel.threads.length - 1];
4208
- if (r) {
4209
- const c = [...this._messages].reverse().find((g) => g.role === "assistant" && g.threadId === r);
4206
+ const d = this._panel.threads[this._panel.threads.length - 1];
4207
+ if (d) {
4208
+ const c = [...this._messages].reverse().find((g) => g.role === "assistant" && g.threadId === d);
4210
4209
  if (c?.threadId) {
4211
4210
  const g = await this._loadPayload(c.threadId, c.id);
4212
4211
  if (g) {
4213
- const d = g.elements[g.root];
4214
- d && this._panel?.updateTopBar(d.type);
4212
+ const r = g.elements[g.root];
4213
+ r && this._panel?.updateTopBar(r.type);
4215
4214
  }
4216
4215
  }
4217
4216
  }
@@ -4226,7 +4225,7 @@ class pn extends He {
4226
4225
  * share the same state-mutation + refresh path.
4227
4226
  */
4228
4227
  _toggleComparisonSku(e) {
4229
- e === "" ? (this._comparisonSelectMode = !this._comparisonSelectMode, this._comparisonSelectMode || (this._comparisonSelectedSkus = [], Ye())) : this._comparisonSelectedSkus.indexOf(e) >= 0 ? this._comparisonSelectedSkus = this._comparisonSelectedSkus.filter((a) => a !== e) : (this._comparisonSelectedSkus = [...this._comparisonSelectedSkus, e], Ke(e)), this._refreshComparisonUI();
4228
+ e === "" ? (this._comparisonSelectMode = !this._comparisonSelectMode, this._comparisonSelectMode || (this._comparisonSelectedSkus = [], Ze())) : this._comparisonSelectedSkus.indexOf(e) >= 0 ? this._comparisonSelectedSkus = this._comparisonSelectedSkus.filter((a) => a !== e) : (this._comparisonSelectedSkus = [...this._comparisonSelectedSkus, e], et(e)), this._refreshComparisonUI();
4230
4229
  }
4231
4230
  /**
4232
4231
  * Refresh the panel DOM to reflect the current comparison state without
@@ -4245,36 +4244,36 @@ class pn extends He {
4245
4244
  const s = a.querySelectorAll(".gengage-chat-product-card[data-sku]");
4246
4245
  for (const l of s) {
4247
4246
  if (l.parentElement?.classList.contains("gengage-chat-comparison-select-wrapper")) {
4248
- const d = l.parentElement.querySelector(".gengage-chat-comparison-checkbox");
4249
- d && (d.checked = this._comparisonSelectedSkus.includes(l.dataset.sku));
4247
+ const r = l.parentElement.querySelector(".gengage-chat-comparison-checkbox");
4248
+ r && (r.checked = this._comparisonSelectedSkus.includes(l.dataset.sku));
4250
4249
  continue;
4251
4250
  }
4252
- const r = l.dataset.sku, c = document.createElement("div");
4251
+ const d = l.dataset.sku, c = document.createElement("div");
4253
4252
  c.className = "gengage-chat-comparison-select-wrapper";
4254
4253
  const g = document.createElement("input");
4255
- g.type = "checkbox", g.className = "gengage-chat-comparison-checkbox", g.checked = this._comparisonSelectedSkus.includes(r), g.addEventListener("change", () => {
4256
- this._toggleComparisonSku(r);
4257
- }), l.parentNode.insertBefore(c, l), c.appendChild(g), c.appendChild(l), c.style.cursor = "pointer", c.addEventListener("click", (d) => {
4258
- d.target !== g && (g.checked = !g.checked, this._toggleComparisonSku(r));
4254
+ g.type = "checkbox", g.className = "gengage-chat-comparison-checkbox", g.checked = this._comparisonSelectedSkus.includes(d), g.addEventListener("change", () => {
4255
+ this._toggleComparisonSku(d);
4256
+ }), l.parentNode.insertBefore(c, l), c.appendChild(g), c.appendChild(l), c.style.cursor = "pointer", c.addEventListener("click", (r) => {
4257
+ r.target !== g && (g.checked = !g.checked, this._toggleComparisonSku(d));
4259
4258
  });
4260
4259
  }
4261
4260
  } else {
4262
4261
  const s = a.querySelectorAll(".gengage-chat-comparison-select-wrapper");
4263
4262
  for (const l of s) {
4264
- const r = l.querySelector(".gengage-chat-product-card");
4265
- r && l.parentNode && (l.parentNode.insertBefore(r, l), l.remove());
4263
+ const d = l.querySelector(".gengage-chat-product-card");
4264
+ d && l.parentNode && (l.parentNode.insertBefore(d, l), l.remove());
4266
4265
  }
4267
4266
  }
4268
4267
  const i = t.querySelector(".gengage-chat-comparison-floating-btn");
4269
4268
  if (this._comparisonSelectMode) {
4270
- const s = this._comparisonSelectedSkus.length, l = s >= 2, r = this._i18n.compareSelected ?? "Compare", c = l ? `${r} (${s})` : this._i18n.compareMinHint ?? "Select at least 2 products";
4269
+ const s = this._comparisonSelectedSkus.length, l = s >= 2, d = this._i18n.compareSelected ?? "Compare", c = l ? `${d} (${s})` : this._i18n.compareMinHint ?? "Select at least 2 products";
4271
4270
  if (i)
4272
4271
  i.textContent = c, i.disabled = !l, i.classList.toggle("gengage-chat-comparison-floating-btn--disabled", !l);
4273
4272
  else {
4274
4273
  const g = document.createElement("button");
4275
4274
  g.className = "gengage-chat-comparison-floating-btn", g.type = "button", g.textContent = c, g.disabled = !l, l || g.classList.add("gengage-chat-comparison-floating-btn--disabled"), g.addEventListener("click", () => {
4276
- this._comparisonSelectedSkus.length < 2 || (de(this._comparisonSelectedSkus), this._sendAction({
4277
- title: r,
4275
+ this._comparisonSelectedSkus.length < 2 || (be(this._comparisonSelectedSkus), this._sendAction({
4276
+ title: d,
4278
4277
  type: "getComparisonTable",
4279
4278
  payload: { sku_list: [...this._comparisonSelectedSkus] }
4280
4279
  }));
@@ -4290,16 +4289,16 @@ class pn extends He {
4290
4289
  _buildRenderContext() {
4291
4290
  const e = {
4292
4291
  onAction: (t) => {
4293
- if (et(t.title, t.type), t.type === "findSimilar") {
4292
+ if (ot(t.title, t.type), t.type === "findSimilar") {
4294
4293
  const n = typeof t.payload == "object" && t.payload !== null && "sku" in t.payload ? String(t.payload.sku) : "";
4295
- tt(n);
4294
+ rt(n);
4296
4295
  }
4297
- t.type === "getComparisonTable" && de(this._comparisonSelectedSkus);
4296
+ t.type === "getComparisonTable" && be(this._comparisonSelectedSkus);
4298
4297
  const a = t.type === "addToCart" || t.type === "like";
4299
4298
  this._sendAction(t, a ? { preservePanel: !0 } : void 0);
4300
4299
  },
4301
4300
  onProductClick: (t) => {
4302
- Ze(t.sku), this.config.isDemoWebsite !== !0 && this._isSameOriginUrl(t.url) ? (V("gengage:similar:product-click", {
4301
+ it(t.sku), this.config.isDemoWebsite !== !0 && this._isSameOriginUrl(t.url) ? (W("gengage:similar:product-click", {
4303
4302
  sku: t.sku,
4304
4303
  url: t.url,
4305
4304
  sessionId: this.config.session?.sessionId ?? null
@@ -4310,12 +4309,12 @@ class pn extends He {
4310
4309
  });
4311
4310
  },
4312
4311
  onAddToCart: (t) => {
4313
- Je(t.sku, t.quantity);
4312
+ nt(t.sku, t.quantity);
4314
4313
  const a = {
4315
4314
  ...t,
4316
4315
  sessionId: this.config.session?.sessionId ?? null
4317
4316
  };
4318
- V("gengage:chat:add-to-cart", a), this._bridge?.send("addToCart", t), this._runEventCallbacks("gengage-cart-add", a), this._sendAction(
4317
+ W("gengage:chat:add-to-cart", a), this._bridge?.send("addToCart", t), this._runEventCallbacks("gengage-cart-add", a), this._sendAction(
4319
4318
  {
4320
4319
  title: this._i18n.addToCartButton ?? "Add to Cart",
4321
4320
  type: "addToCart",
@@ -4349,7 +4348,7 @@ class pn extends He {
4349
4348
  },
4350
4349
  favoritedSkus: this._session?.favoritedSkus ?? /* @__PURE__ */ new Set(),
4351
4350
  onFavoriteToggle: (t, a) => {
4352
- Xe(t), this._toggleFavorite(t, a);
4351
+ at(t), this._toggleFavorite(t, a);
4353
4352
  const n = a.name ?? t;
4354
4353
  this._sendAction(
4355
4354
  {
@@ -4409,11 +4408,11 @@ class pn extends He {
4409
4408
  const i = this._buildRenderContext(), s = this._shadow?.querySelector(".gengage-chat-messages");
4410
4409
  if (!s) return;
4411
4410
  if (n === "ProductDetailsPanel") {
4412
- const r = a.props?.product;
4413
- if (!r) return;
4411
+ const d = a.props?.product;
4412
+ if (!d) return;
4414
4413
  const c = {
4415
4414
  root: "root",
4416
- elements: { root: { type: "ProductSummaryCard", props: { product: r } } }
4415
+ elements: { root: { type: "ProductSummaryCard", props: { product: d } } }
4417
4416
  }, g = this._renderUISpec(c, i);
4418
4417
  e.threadId && (g.dataset.threadId = e.threadId), s.appendChild(g);
4419
4418
  return;
@@ -4431,14 +4430,14 @@ class pn extends He {
4431
4430
  };
4432
4431
  }
4433
4432
  _resolveI18n(e) {
4434
- return { ...Lt(e.locale), ...e.i18n };
4433
+ return { ...Bt(e.locale), ...e.i18n };
4435
4434
  }
4436
4435
  _resolveUISpecRegistry() {
4437
- const e = ca();
4438
- return Qe(e, this.config.renderer?.registry);
4436
+ const e = ua();
4437
+ return tt(e, this.config.renderer?.registry);
4439
4438
  }
4440
4439
  _renderUISpec(e, t) {
4441
- const a = this._resolveUISpecRegistry(), n = this.config.renderer?.unknownRenderer ?? Ne, i = (r, c) => la(r, c, a, n), s = this.config.renderer?.renderUISpec;
4440
+ const a = this._resolveUISpecRegistry(), n = this.config.renderer?.unknownRenderer ?? Re, i = (d, c) => ma(d, c, a, n), s = this.config.renderer?.renderUISpec;
4442
4441
  return s ? s(e, t, {
4443
4442
  registry: a,
4444
4443
  unknownRenderer: n,
@@ -4446,18 +4445,18 @@ class pn extends He {
4446
4445
  }) : i(e, t);
4447
4446
  }
4448
4447
  }
4449
- function fn() {
4450
- return new pn();
4448
+ function kn() {
4449
+ return new vn();
4451
4450
  }
4452
4451
  export {
4453
- pn as G,
4454
- At as V,
4455
- ca as a,
4456
- la as b,
4457
- fn as c,
4458
- Ne as d,
4459
- mn as e,
4460
- It as i,
4461
- ft as r
4452
+ vn as G,
4453
+ Rt as V,
4454
+ ua as a,
4455
+ ma as b,
4456
+ kn as c,
4457
+ Re as d,
4458
+ _n as e,
4459
+ zt as i,
4460
+ _t as r
4462
4461
  };
4463
- //# sourceMappingURL=index-CEt87kCd.js.map
4462
+ //# sourceMappingURL=index-TY0qKDI-.js.map