@gymmymac/bob-widget 3.0.1 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -12,10 +12,10 @@ var Tr = (t, e, r, n) => ({
12
12
  }
13
13
  });
14
14
  import * as ze from "react";
15
- import Lt, { useRef as K, useCallback as q, useEffect as oe, createContext as xn, useMemo as Dt, useContext as cs, useState as J } from "react";
15
+ import Lt, { useRef as K, useCallback as q, useEffect as ae, createContext as xn, useMemo as Dt, useContext as cs, useState as J } from "react";
16
16
  import { createClient as bn } from "@supabase/supabase-js";
17
- const vr = "3.0.1", Xi = () => vr;
18
- var qr = { exports: {} }, or = {};
17
+ const er = "3.0.3", Xi = () => er;
18
+ var qr = { exports: {} }, lr = {};
19
19
  /**
20
20
  * @license React
21
21
  * react-jsx-runtime.production.min.js
@@ -27,19 +27,19 @@ var qr = { exports: {} }, or = {};
27
27
  */
28
28
  var ys;
29
29
  function yn() {
30
- if (ys) return or;
30
+ if (ys) return lr;
31
31
  ys = 1;
32
32
  var t = Lt, e = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
33
33
  function d(c, b, w) {
34
- var h, f = {}, j = null, x = null;
34
+ var h, p = {}, j = null, x = null;
35
35
  w !== void 0 && (j = "" + w), b.key !== void 0 && (j = "" + b.key), b.ref !== void 0 && (x = b.ref);
36
- for (h in b) n.call(b, h) && !l.hasOwnProperty(h) && (f[h] = b[h]);
37
- if (c && c.defaultProps) for (h in b = c.defaultProps, b) f[h] === void 0 && (f[h] = b[h]);
38
- return { $$typeof: e, type: c, key: j, ref: x, props: f, _owner: i.current };
36
+ for (h in b) n.call(b, h) && !l.hasOwnProperty(h) && (p[h] = b[h]);
37
+ if (c && c.defaultProps) for (h in b = c.defaultProps, b) p[h] === void 0 && (p[h] = b[h]);
38
+ return { $$typeof: e, type: c, key: j, ref: x, props: p, _owner: i.current };
39
39
  }
40
- return or.Fragment = r, or.jsx = d, or.jsxs = d, or;
40
+ return lr.Fragment = r, lr.jsx = d, lr.jsxs = d, lr;
41
41
  }
42
- var lr = {};
42
+ var cr = {};
43
43
  /**
44
44
  * @license React
45
45
  * react-jsx-runtime.development.js
@@ -52,27 +52,27 @@ var lr = {};
52
52
  var vs;
53
53
  function vn() {
54
54
  return vs || (vs = 1, process.env.NODE_ENV !== "production" && function() {
55
- var t = Lt, e = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), c = Symbol.for("react.context"), b = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), k = Symbol.iterator, p = "@@iterator";
55
+ var t = Lt, e = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), c = Symbol.for("react.context"), b = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), k = Symbol.iterator, f = "@@iterator";
56
56
  function _(a) {
57
57
  if (a === null || typeof a != "object")
58
58
  return null;
59
- var T = k && a[k] || a[p];
59
+ var T = k && a[k] || a[f];
60
60
  return typeof T == "function" ? T : null;
61
61
  }
62
62
  var g = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
63
63
  function y(a) {
64
64
  {
65
- for (var T = arguments.length, O = new Array(T > 1 ? T - 1 : 0), X = 1; X < T; X++)
66
- O[X - 1] = arguments[X];
67
- u("error", a, O);
65
+ for (var T = arguments.length, P = new Array(T > 1 ? T - 1 : 0), X = 1; X < T; X++)
66
+ P[X - 1] = arguments[X];
67
+ u("error", a, P);
68
68
  }
69
69
  }
70
- function u(a, T, O) {
70
+ function u(a, T, P) {
71
71
  {
72
72
  var X = g.ReactDebugCurrentFrame, te = X.getStackAddendum();
73
- te !== "" && (T += "%s", O = O.concat([te]));
74
- var ue = O.map(function(P) {
75
- return String(P);
73
+ te !== "" && (T += "%s", P = P.concat([te]));
74
+ var ue = P.map(function(O) {
75
+ return String(O);
76
76
  });
77
77
  ue.unshift("Warning: " + T), Function.prototype.apply.call(console[a], console, ue);
78
78
  }
@@ -80,18 +80,18 @@ function vn() {
80
80
  var S = !1, C = !1, M = !1, U = !1, I = !1, W;
81
81
  W = Symbol.for("react.module.reference");
82
82
  function m(a) {
83
- return !!(typeof a == "string" || typeof a == "function" || a === n || a === l || I || a === i || a === w || a === h || U || a === x || S || C || M || typeof a == "object" && a !== null && (a.$$typeof === j || a.$$typeof === f || a.$$typeof === d || a.$$typeof === c || a.$$typeof === b || // This needs to include all possible module reference object
83
+ return !!(typeof a == "string" || typeof a == "function" || a === n || a === l || I || a === i || a === w || a === h || U || a === x || S || C || M || typeof a == "object" && a !== null && (a.$$typeof === j || a.$$typeof === p || a.$$typeof === d || a.$$typeof === c || a.$$typeof === b || // This needs to include all possible module reference object
84
84
  // types supported by any Flight configuration anywhere since
85
85
  // we don't know which Flight build this will end up being used
86
86
  // with.
87
87
  a.$$typeof === W || a.getModuleId !== void 0));
88
88
  }
89
- function E(a, T, O) {
89
+ function E(a, T, P) {
90
90
  var X = a.displayName;
91
91
  if (X)
92
92
  return X;
93
93
  var te = T.displayName || T.name || "";
94
- return te !== "" ? O + "(" + te + ")" : O;
94
+ return te !== "" ? P + "(" + te + ")" : P;
95
95
  }
96
96
  function N(a) {
97
97
  return a.displayName || "Context";
@@ -123,17 +123,17 @@ function vn() {
123
123
  var T = a;
124
124
  return N(T) + ".Consumer";
125
125
  case d:
126
- var O = a;
127
- return N(O._context) + ".Provider";
126
+ var P = a;
127
+ return N(P._context) + ".Provider";
128
128
  case b:
129
129
  return E(a, a.render, "ForwardRef");
130
- case f:
130
+ case p:
131
131
  var X = a.displayName || null;
132
132
  return X !== null ? X : R(a.type) || "Memo";
133
133
  case j: {
134
- var te = a, ue = te._payload, P = te._init;
134
+ var te = a, ue = te._payload, O = te._init;
135
135
  try {
136
- return R(P(ue));
136
+ return R(O(ue));
137
137
  } catch {
138
138
  return null;
139
139
  }
@@ -168,7 +168,7 @@ function vn() {
168
168
  H++;
169
169
  }
170
170
  }
171
- function Oe() {
171
+ function Pe() {
172
172
  {
173
173
  if (H--, H === 0) {
174
174
  var a = {
@@ -204,7 +204,7 @@ function vn() {
204
204
  }
205
205
  }
206
206
  var he = g.ReactCurrentDispatcher, we;
207
- function Te(a, T, O) {
207
+ function Te(a, T, P) {
208
208
  {
209
209
  if (we === void 0)
210
210
  try {
@@ -219,16 +219,16 @@ function vn() {
219
219
  }
220
220
  var ke = !1, ee;
221
221
  {
222
- var Pe = typeof WeakMap == "function" ? WeakMap : Map;
223
- ee = new Pe();
222
+ var Oe = typeof WeakMap == "function" ? WeakMap : Map;
223
+ ee = new Oe();
224
224
  }
225
225
  function Me(a, T) {
226
226
  if (!a || ke)
227
227
  return "";
228
228
  {
229
- var O = ee.get(a);
230
- if (O !== void 0)
231
- return O;
229
+ var P = ee.get(a);
230
+ if (P !== void 0)
231
+ return P;
232
232
  }
233
233
  var X;
234
234
  ke = !0;
@@ -238,27 +238,27 @@ function vn() {
238
238
  ue = he.current, he.current = null, ce();
239
239
  try {
240
240
  if (T) {
241
- var P = function() {
241
+ var O = function() {
242
242
  throw Error();
243
243
  };
244
- if (Object.defineProperty(P.prototype, "props", {
244
+ if (Object.defineProperty(O.prototype, "props", {
245
245
  set: function() {
246
246
  throw Error();
247
247
  }
248
248
  }), typeof Reflect == "object" && Reflect.construct) {
249
249
  try {
250
- Reflect.construct(P, []);
250
+ Reflect.construct(O, []);
251
251
  } catch (Ne) {
252
252
  X = Ne;
253
253
  }
254
- Reflect.construct(a, [], P);
254
+ Reflect.construct(a, [], O);
255
255
  } else {
256
256
  try {
257
- P.call();
257
+ O.call();
258
258
  } catch (Ne) {
259
259
  X = Ne;
260
260
  }
261
- a.call(P.prototype);
261
+ a.call(O.prototype);
262
262
  }
263
263
  } else {
264
264
  try {
@@ -272,35 +272,35 @@ function vn() {
272
272
  if (Ne && X && typeof Ne.stack == "string") {
273
273
  for (var re = Ne.stack.split(`
274
274
  `), pe = X.stack.split(`
275
- `), le = re.length - 1, ae = pe.length - 1; le >= 1 && ae >= 0 && re[le] !== pe[ae]; )
276
- ae--;
277
- for (; le >= 1 && ae >= 0; le--, ae--)
278
- if (re[le] !== pe[ae]) {
279
- if (le !== 1 || ae !== 1)
275
+ `), le = re.length - 1, oe = pe.length - 1; le >= 1 && oe >= 0 && re[le] !== pe[oe]; )
276
+ oe--;
277
+ for (; le >= 1 && oe >= 0; le--, oe--)
278
+ if (re[le] !== pe[oe]) {
279
+ if (le !== 1 || oe !== 1)
280
280
  do
281
- if (le--, ae--, ae < 0 || re[le] !== pe[ae]) {
281
+ if (le--, oe--, oe < 0 || re[le] !== pe[oe]) {
282
282
  var ye = `
283
283
  ` + re[le].replace(" at new ", " at ");
284
284
  return a.displayName && ye.includes("<anonymous>") && (ye = ye.replace("<anonymous>", a.displayName)), typeof a == "function" && ee.set(a, ye), ye;
285
285
  }
286
- while (le >= 1 && ae >= 0);
286
+ while (le >= 1 && oe >= 0);
287
287
  break;
288
288
  }
289
289
  }
290
290
  } finally {
291
- ke = !1, he.current = ue, Oe(), Error.prepareStackTrace = te;
291
+ ke = !1, he.current = ue, Pe(), Error.prepareStackTrace = te;
292
292
  }
293
293
  var Ue = a ? a.displayName || a.name : "", Ze = Ue ? Te(Ue) : "";
294
294
  return typeof a == "function" && ee.set(a, Ze), Ze;
295
295
  }
296
- function se(a, T, O) {
296
+ function se(a, T, P) {
297
297
  return Me(a, !1);
298
298
  }
299
299
  function Ce(a) {
300
300
  var T = a.prototype;
301
301
  return !!(T && T.isReactComponent);
302
302
  }
303
- function me(a, T, O) {
303
+ function me(a, T, P) {
304
304
  if (a == null)
305
305
  return "";
306
306
  if (typeof a == "function")
@@ -317,12 +317,12 @@ function vn() {
317
317
  switch (a.$$typeof) {
318
318
  case b:
319
319
  return se(a.render);
320
- case f:
321
- return me(a.type, T, O);
320
+ case p:
321
+ return me(a.type, T, P);
322
322
  case j: {
323
323
  var X = a, te = X._payload, ue = X._init;
324
324
  try {
325
- return me(ue(te), T, O);
325
+ return me(ue(te), T, P);
326
326
  } catch {
327
327
  }
328
328
  }
@@ -330,29 +330,29 @@ function vn() {
330
330
  return "";
331
331
  }
332
332
  var Qe = Object.prototype.hasOwnProperty, st = {}, Mr = g.ReactDebugCurrentFrame;
333
- function er(a) {
333
+ function tr(a) {
334
334
  if (a) {
335
- var T = a._owner, O = me(a.type, a._source, T ? T.type : null);
336
- Mr.setExtraStackFrame(O);
335
+ var T = a._owner, P = me(a.type, a._source, T ? T.type : null);
336
+ Mr.setExtraStackFrame(P);
337
337
  } else
338
338
  Mr.setExtraStackFrame(null);
339
339
  }
340
- function ms(a, T, O, X, te) {
340
+ function ms(a, T, P, X, te) {
341
341
  {
342
342
  var ue = Function.call.bind(Qe);
343
- for (var P in a)
344
- if (ue(a, P)) {
343
+ for (var O in a)
344
+ if (ue(a, O)) {
345
345
  var re = void 0;
346
346
  try {
347
- if (typeof a[P] != "function") {
348
- var pe = Error((X || "React class") + ": " + O + " type `" + P + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[P] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
347
+ if (typeof a[O] != "function") {
348
+ var pe = Error((X || "React class") + ": " + P + " type `" + O + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[O] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
349
349
  throw pe.name = "Invariant Violation", pe;
350
350
  }
351
- re = a[P](T, P, X, O, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
351
+ re = a[O](T, O, X, P, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
352
352
  } catch (le) {
353
353
  re = le;
354
354
  }
355
- re && !(re instanceof Error) && (er(te), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", X || "React class", O, P, typeof re), er(null)), re instanceof Error && !(re.message in st) && (st[re.message] = !0, er(te), y("Failed %s type: %s", O, re.message), er(null));
355
+ re && !(re instanceof Error) && (tr(te), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", X || "React class", P, O, typeof re), tr(null)), re instanceof Error && !(re.message in st) && (st[re.message] = !0, tr(te), y("Failed %s type: %s", P, re.message), tr(null));
356
356
  }
357
357
  }
358
358
  }
@@ -362,23 +362,23 @@ function vn() {
362
362
  }
363
363
  function _r(a) {
364
364
  {
365
- var T = typeof Symbol == "function" && Symbol.toStringTag, O = T && a[Symbol.toStringTag] || a.constructor.name || "Object";
366
- return O;
365
+ var T = typeof Symbol == "function" && Symbol.toStringTag, P = T && a[Symbol.toStringTag] || a.constructor.name || "Object";
366
+ return P;
367
367
  }
368
368
  }
369
369
  function Er(a) {
370
370
  try {
371
- return tr(a), !1;
371
+ return rr(a), !1;
372
372
  } catch {
373
373
  return !0;
374
374
  }
375
375
  }
376
- function tr(a) {
376
+ function rr(a) {
377
377
  return "" + a;
378
378
  }
379
- function rr(a) {
379
+ function sr(a) {
380
380
  if (Er(a))
381
- return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", _r(a)), tr(a);
381
+ return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", _r(a)), rr(a);
382
382
  }
383
383
  var G = g.ReactCurrentOwner, fe = {
384
384
  key: !0,
@@ -394,7 +394,7 @@ function vn() {
394
394
  }
395
395
  return a.ref !== void 0;
396
396
  }
397
- function sr(a) {
397
+ function nr(a) {
398
398
  if (Qe.call(a, "key")) {
399
399
  var T = Object.getOwnPropertyDescriptor(a, "key").get;
400
400
  if (T && T.isReactWarning)
@@ -407,35 +407,35 @@ function vn() {
407
407
  }
408
408
  function vt(a, T) {
409
409
  {
410
- var O = function() {
410
+ var P = function() {
411
411
  xe || (xe = !0, y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", T));
412
412
  };
413
- O.isReactWarning = !0, Object.defineProperty(a, "key", {
414
- get: O,
413
+ P.isReactWarning = !0, Object.defineProperty(a, "key", {
414
+ get: P,
415
415
  configurable: !0
416
416
  });
417
417
  }
418
418
  }
419
419
  function zt(a, T) {
420
420
  {
421
- var O = function() {
421
+ var P = function() {
422
422
  Se || (Se = !0, y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", T));
423
423
  };
424
- O.isReactWarning = !0, Object.defineProperty(a, "ref", {
425
- get: O,
424
+ P.isReactWarning = !0, Object.defineProperty(a, "ref", {
425
+ get: P,
426
426
  configurable: !0
427
427
  });
428
428
  }
429
429
  }
430
- var wt = function(a, T, O, X, te, ue, P) {
430
+ var wt = function(a, T, P, X, te, ue, O) {
431
431
  var re = {
432
432
  // This tag allows us to uniquely identify this as a React Element
433
433
  $$typeof: e,
434
434
  // Built-in properties that belong on the element
435
435
  type: a,
436
436
  key: T,
437
- ref: O,
438
- props: P,
437
+ ref: P,
438
+ props: O,
439
439
  // Record the component responsible for creating this element.
440
440
  _owner: ue
441
441
  };
@@ -456,29 +456,29 @@ function vn() {
456
456
  value: te
457
457
  }), Object.freeze && (Object.freeze(re.props), Object.freeze(re)), re;
458
458
  };
459
- function jt(a, T, O, X, te) {
459
+ function jt(a, T, P, X, te) {
460
460
  {
461
- var ue, P = {}, re = null, pe = null;
462
- O !== void 0 && (rr(O), re = "" + O), sr(T) && (rr(T.key), re = "" + T.key), nt(T) && (pe = T.ref, yt(T, te));
461
+ var ue, O = {}, re = null, pe = null;
462
+ P !== void 0 && (sr(P), re = "" + P), nr(T) && (sr(T.key), re = "" + T.key), nt(T) && (pe = T.ref, yt(T, te));
463
463
  for (ue in T)
464
- Qe.call(T, ue) && !fe.hasOwnProperty(ue) && (P[ue] = T[ue]);
464
+ Qe.call(T, ue) && !fe.hasOwnProperty(ue) && (O[ue] = T[ue]);
465
465
  if (a && a.defaultProps) {
466
466
  var le = a.defaultProps;
467
467
  for (ue in le)
468
- P[ue] === void 0 && (P[ue] = le[ue]);
468
+ O[ue] === void 0 && (O[ue] = le[ue]);
469
469
  }
470
470
  if (re || pe) {
471
- var ae = typeof a == "function" ? a.displayName || a.name || "Unknown" : a;
472
- re && vt(P, ae), pe && zt(P, ae);
471
+ var oe = typeof a == "function" ? a.displayName || a.name || "Unknown" : a;
472
+ re && vt(O, oe), pe && zt(O, oe);
473
473
  }
474
- return wt(a, re, pe, te, X, G.current, P);
474
+ return wt(a, re, pe, te, X, G.current, O);
475
475
  }
476
476
  }
477
477
  var Ie = g.ReactCurrentOwner, kt = g.ReactDebugCurrentFrame;
478
478
  function $e(a) {
479
479
  if (a) {
480
- var T = a._owner, O = me(a.type, a._source, T ? T.type : null);
481
- kt.setExtraStackFrame(O);
480
+ var T = a._owner, P = me(a.type, a._source, T ? T.type : null);
481
+ kt.setExtraStackFrame(P);
482
482
  } else
483
483
  kt.setExtraStackFrame(null);
484
484
  }
@@ -507,10 +507,10 @@ Check the render method of \`` + a + "`.";
507
507
  {
508
508
  var T = St();
509
509
  if (!T) {
510
- var O = typeof a == "string" ? a : a.displayName || a.name;
511
- O && (T = `
510
+ var P = typeof a == "string" ? a : a.displayName || a.name;
511
+ P && (T = `
512
512
 
513
- Check the top-level render call using <` + O + ">.");
513
+ Check the top-level render call using <` + P + ">.");
514
514
  }
515
515
  return T;
516
516
  }
@@ -520,12 +520,12 @@ Check the top-level render call using <` + O + ">.");
520
520
  if (!a._store || a._store.validated || a.key != null)
521
521
  return;
522
522
  a._store.validated = !0;
523
- var O = _t(T);
524
- if (Be[O])
523
+ var P = _t(T);
524
+ if (Be[P])
525
525
  return;
526
- Be[O] = !0;
526
+ Be[P] = !0;
527
527
  var X = "";
528
- a && a._owner && a._owner !== Ie.current && (X = " It was passed a child from " + R(a._owner.type) + "."), $e(a), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', O, X), $e(null);
528
+ a && a._owner && a._owner !== Ie.current && (X = " It was passed a child from " + R(a._owner.type) + "."), $e(a), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', P, X), $e(null);
529
529
  }
530
530
  }
531
531
  function Le(a, T) {
@@ -533,8 +533,8 @@ Check the top-level render call using <` + O + ">.");
533
533
  if (typeof a != "object")
534
534
  return;
535
535
  if (Sr(a))
536
- for (var O = 0; O < a.length; O++) {
537
- var X = a[O];
536
+ for (var P = 0; P < a.length; P++) {
537
+ var X = a[P];
538
538
  it(X) && be(X, T);
539
539
  }
540
540
  else if (it(a))
@@ -542,8 +542,8 @@ Check the top-level render call using <` + O + ">.");
542
542
  else if (a) {
543
543
  var te = _(a);
544
544
  if (typeof te == "function" && te !== a.entries)
545
- for (var ue = te.call(a), P; !(P = ue.next()).done; )
546
- it(P.value) && be(P.value, T);
545
+ for (var ue = te.call(a), O; !(O = ue.next()).done; )
546
+ it(O.value) && be(O.value, T);
547
547
  }
548
548
  }
549
549
  }
@@ -552,18 +552,18 @@ Check the top-level render call using <` + O + ">.");
552
552
  var T = a.type;
553
553
  if (T == null || typeof T == "string")
554
554
  return;
555
- var O;
555
+ var P;
556
556
  if (typeof T == "function")
557
- O = T.propTypes;
557
+ P = T.propTypes;
558
558
  else if (typeof T == "object" && (T.$$typeof === b || // Note: Memo only checks outer props here.
559
559
  // Inner props are checked in the reconciler.
560
- T.$$typeof === f))
561
- O = T.propTypes;
560
+ T.$$typeof === p))
561
+ P = T.propTypes;
562
562
  else
563
563
  return;
564
- if (O) {
564
+ if (P) {
565
565
  var X = R(T);
566
- ms(O, a.props, "prop", X, a);
566
+ ms(P, a.props, "prop", X, a);
567
567
  } else if (T.PropTypes !== void 0 && !Ae) {
568
568
  Ae = !0;
569
569
  var te = R(T);
@@ -574,8 +574,8 @@ Check the top-level render call using <` + O + ">.");
574
574
  }
575
575
  function Lr(a) {
576
576
  {
577
- for (var T = Object.keys(a.props), O = 0; O < T.length; O++) {
578
- var X = T[O];
577
+ for (var T = Object.keys(a.props), P = 0; P < T.length; P++) {
578
+ var X = T[P];
579
579
  if (X !== "children" && X !== "key") {
580
580
  $e(a), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", X), $e(null);
581
581
  break;
@@ -585,10 +585,10 @@ Check the top-level render call using <` + O + ">.");
585
585
  }
586
586
  }
587
587
  var Ke = {};
588
- function nr(a, T, O, X, te, ue) {
588
+ function ir(a, T, P, X, te, ue) {
589
589
  {
590
- var P = m(a);
591
- if (!P) {
590
+ var O = m(a);
591
+ if (!O) {
592
592
  var re = "";
593
593
  (a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (re += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
594
594
  var pe = at();
@@ -596,10 +596,10 @@ Check the top-level render call using <` + O + ">.");
596
596
  var le;
597
597
  a === null ? le = "null" : Sr(a) ? le = "array" : a !== void 0 && a.$$typeof === e ? (le = "<" + (R(a.type) || "Unknown") + " />", re = " Did you accidentally export a JSX literal instead of a component?") : le = typeof a, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", le, re);
598
598
  }
599
- var ae = jt(a, T, O, te, ue);
600
- if (ae == null)
601
- return ae;
602
- if (P) {
599
+ var oe = jt(a, T, P, te, ue);
600
+ if (oe == null)
601
+ return oe;
602
+ if (O) {
603
603
  var ye = T.children;
604
604
  if (ye !== void 0)
605
605
  if (X)
@@ -626,18 +626,18 @@ React keys must be passed directly to JSX without using spread:
626
626
  <%s key={someKey} {...props} />`, Wr, Ze, gn, Ze), Ke[Ze + Wr] = !0;
627
627
  }
628
628
  }
629
- return a === n ? Lr(ae) : Ar(ae), ae;
629
+ return a === n ? Lr(oe) : Ar(oe), oe;
630
630
  }
631
631
  }
632
- function ot(a, T, O) {
633
- return nr(a, T, O, !0);
632
+ function ot(a, T, P) {
633
+ return ir(a, T, P, !0);
634
634
  }
635
- function ir(a, T, O) {
636
- return nr(a, T, O, !1);
635
+ function ar(a, T, P) {
636
+ return ir(a, T, P, !1);
637
637
  }
638
- var ar = ir, Dr = ot;
639
- lr.Fragment = n, lr.jsx = ar, lr.jsxs = Dr;
640
- }()), lr;
638
+ var or = ar, Dr = ot;
639
+ cr.Fragment = n, cr.jsx = or, cr.jsxs = Dr;
640
+ }()), cr;
641
641
  }
642
642
  process.env.NODE_ENV === "production" ? qr.exports = yn() : qr.exports = vn();
643
643
  var s = qr.exports, wr = class {
@@ -735,7 +735,7 @@ function ws(t, e) {
735
735
  if (n) {
736
736
  if (e.queryHash !== us(d, e.options))
737
737
  return !1;
738
- } else if (!pr(e.queryKey, d))
738
+ } else if (!gr(e.queryKey, d))
739
739
  return !1;
740
740
  }
741
741
  if (r !== "all") {
@@ -751,24 +751,24 @@ function js(t, e) {
751
751
  if (!e.options.mutationKey)
752
752
  return !1;
753
753
  if (r) {
754
- if (fr(e.options.mutationKey) !== fr(l))
754
+ if (pr(e.options.mutationKey) !== pr(l))
755
755
  return !1;
756
- } else if (!pr(e.options.mutationKey, l))
756
+ } else if (!gr(e.options.mutationKey, l))
757
757
  return !1;
758
758
  }
759
759
  return !(n && e.state.status !== n || i && !i(e));
760
760
  }
761
761
  function us(t, e) {
762
- return ((e == null ? void 0 : e.queryKeyHashFn) || fr)(t);
762
+ return ((e == null ? void 0 : e.queryKeyHashFn) || pr)(t);
763
763
  }
764
- function fr(t) {
764
+ function pr(t) {
765
765
  return JSON.stringify(
766
766
  t,
767
767
  (e, r) => Gr(r) ? Object.keys(r).sort().reduce((n, i) => (n[i] = r[i], n), {}) : r
768
768
  );
769
769
  }
770
- function pr(t, e) {
771
- return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? Object.keys(e).every((r) => pr(t[r], e[r])) : !1;
770
+ function gr(t, e) {
771
+ return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? Object.keys(e).every((r) => gr(t[r], e[r])) : !1;
772
772
  }
773
773
  var _n = Object.prototype.hasOwnProperty;
774
774
  function Kr(t, e, r = 0) {
@@ -780,17 +780,17 @@ function Kr(t, e, r = 0) {
780
780
  const l = (n ? t : Object.keys(t)).length, d = n ? e : Object.keys(e), c = d.length, b = n ? new Array(c) : {};
781
781
  let w = 0;
782
782
  for (let h = 0; h < c; h++) {
783
- const f = n ? h : d[h], j = t[f], x = e[f];
783
+ const p = n ? h : d[h], j = t[p], x = e[p];
784
784
  if (j === x) {
785
- b[f] = j, (n ? h < l : _n.call(t, f)) && w++;
785
+ b[p] = j, (n ? h < l : _n.call(t, p)) && w++;
786
786
  continue;
787
787
  }
788
788
  if (j === null || x === null || typeof j != "object" || typeof x != "object") {
789
- b[f] = x;
789
+ b[p] = x;
790
790
  continue;
791
791
  }
792
792
  const k = Kr(j, x, r + 1);
793
- b[f] = k, k === j && w++;
793
+ b[p] = k, k === j && w++;
794
794
  }
795
795
  return l === c && w === l ? t : b;
796
796
  }
@@ -1021,7 +1021,7 @@ var je = In(), Ut, dt, Ht, $s, Bn = ($s = class extends wr {
1021
1021
  return o(this, Ut);
1022
1022
  }
1023
1023
  }, Ut = new WeakMap(), dt = new WeakMap(), Ht = new WeakMap(), $s), Ir = new Bn();
1024
- function On(t) {
1024
+ function Pn(t) {
1025
1025
  return Math.min(1e3 * 2 ** t, 3e4);
1026
1026
  }
1027
1027
  function Zs(t) {
@@ -1034,43 +1034,43 @@ var Jr = class extends Error {
1034
1034
  };
1035
1035
  function en(t) {
1036
1036
  let e = !1, r = 0, n;
1037
- const i = Xr(), l = () => i.status !== "pending", d = (p) => {
1037
+ const i = Xr(), l = () => i.status !== "pending", d = (f) => {
1038
1038
  var _;
1039
1039
  if (!l()) {
1040
- const g = new Jr(p);
1040
+ const g = new Jr(f);
1041
1041
  j(g), (_ = t.onCancel) == null || _.call(t, g);
1042
1042
  }
1043
1043
  }, c = () => {
1044
1044
  e = !0;
1045
1045
  }, b = () => {
1046
1046
  e = !1;
1047
- }, w = () => ds.isFocused() && (t.networkMode === "always" || Ir.isOnline()) && t.canRun(), h = () => Zs(t.networkMode) && t.canRun(), f = (p) => {
1048
- l() || (n == null || n(), i.resolve(p));
1049
- }, j = (p) => {
1050
- l() || (n == null || n(), i.reject(p));
1051
- }, x = () => new Promise((p) => {
1047
+ }, w = () => ds.isFocused() && (t.networkMode === "always" || Ir.isOnline()) && t.canRun(), h = () => Zs(t.networkMode) && t.canRun(), p = (f) => {
1048
+ l() || (n == null || n(), i.resolve(f));
1049
+ }, j = (f) => {
1050
+ l() || (n == null || n(), i.reject(f));
1051
+ }, x = () => new Promise((f) => {
1052
1052
  var _;
1053
1053
  n = (g) => {
1054
- (l() || w()) && p(g);
1054
+ (l() || w()) && f(g);
1055
1055
  }, (_ = t.onPause) == null || _.call(t);
1056
1056
  }).then(() => {
1057
- var p;
1058
- n = void 0, l() || (p = t.onContinue) == null || p.call(t);
1057
+ var f;
1058
+ n = void 0, l() || (f = t.onContinue) == null || f.call(t);
1059
1059
  }), k = () => {
1060
1060
  if (l())
1061
1061
  return;
1062
- let p;
1062
+ let f;
1063
1063
  const _ = r === 0 ? t.initialPromise : void 0;
1064
1064
  try {
1065
- p = _ ?? t.fn();
1065
+ f = _ ?? t.fn();
1066
1066
  } catch (g) {
1067
- p = Promise.reject(g);
1067
+ f = Promise.reject(g);
1068
1068
  }
1069
- Promise.resolve(p).then(f).catch((g) => {
1069
+ Promise.resolve(f).then(p).catch((g) => {
1070
1070
  var M;
1071
1071
  if (l())
1072
1072
  return;
1073
- const y = t.retry ?? (Wt ? 0 : 3), u = t.retryDelay ?? On, S = typeof u == "function" ? u(r, g) : u, C = y === !0 || typeof y == "number" && r < y || typeof y == "function" && y(r, g);
1073
+ const y = t.retry ?? (Wt ? 0 : 3), u = t.retryDelay ?? Pn, S = typeof u == "function" ? u(r, g) : u, C = y === !0 || typeof y == "number" && r < y || typeof y == "function" && y(r, g);
1074
1074
  if (e || !C) {
1075
1075
  j(g);
1076
1076
  return;
@@ -1112,7 +1112,7 @@ var Ft, Us, tn = (Us = class {
1112
1112
  clearGcTimeout() {
1113
1113
  o(this, Ft) && (Et.clearTimeout(o(this, Ft)), A(this, Ft, void 0));
1114
1114
  }
1115
- }, Ft = new WeakMap(), Us), Ct, qt, De, It, ve, gr, Bt, He, et, Hs, Pn = (Hs = class extends tn {
1115
+ }, Ft = new WeakMap(), Us), Ct, qt, De, It, ve, mr, Bt, He, et, Hs, On = (Hs = class extends tn {
1116
1116
  constructor(e) {
1117
1117
  super();
1118
1118
  Y(this, He);
@@ -1121,9 +1121,9 @@ var Ft, Us, tn = (Us = class {
1121
1121
  Y(this, De);
1122
1122
  Y(this, It);
1123
1123
  Y(this, ve);
1124
- Y(this, gr);
1124
+ Y(this, mr);
1125
1125
  Y(this, Bt);
1126
- A(this, Bt, !1), A(this, gr, e.defaultOptions), this.setOptions(e.options), this.observers = [], A(this, It, e.client), A(this, De, o(this, It).getQueryCache()), this.queryKey = e.queryKey, this.queryHash = e.queryHash, A(this, Ct, Es(this.options)), this.state = e.state ?? o(this, Ct), this.scheduleGc();
1126
+ A(this, Bt, !1), A(this, mr, e.defaultOptions), this.setOptions(e.options), this.observers = [], A(this, It, e.client), A(this, De, o(this, It).getQueryCache()), this.queryKey = e.queryKey, this.queryHash = e.queryHash, A(this, Ct, Es(this.options)), this.state = e.state ?? o(this, Ct), this.scheduleGc();
1127
1127
  }
1128
1128
  get meta() {
1129
1129
  return this.options.meta;
@@ -1133,7 +1133,7 @@ var Ft, Us, tn = (Us = class {
1133
1133
  return (e = o(this, ve)) == null ? void 0 : e.promise;
1134
1134
  }
1135
1135
  setOptions(e) {
1136
- if (this.options = { ...o(this, gr), ...e }, this.updateGcTime(this.options.gcTime), this.state && this.state.data === void 0) {
1136
+ if (this.options = { ...o(this, mr), ...e }, this.updateGcTime(this.options.gcTime), this.state && this.state.data === void 0) {
1137
1137
  const r = Es(this.options);
1138
1138
  r.data !== void 0 && (this.setState(
1139
1139
  _s(r.data, r.dataUpdatedAt)
@@ -1210,7 +1210,7 @@ var Ft, Us, tn = (Us = class {
1210
1210
  this.state.isInvalidated || ne(this, He, et).call(this, { type: "invalidate" });
1211
1211
  }
1212
1212
  async fetch(e, r) {
1213
- var b, w, h, f, j, x, k, p, _, g, y, u;
1213
+ var b, w, h, p, j, x, k, f, _, g, y, u;
1214
1214
  if (this.state.fetchStatus !== "idle" && // If the promise in the retryer is already rejected, we have to definitely
1215
1215
  // re-start the fetch; there is a chance that the query is still in a
1216
1216
  // pending state when that happens
@@ -1257,7 +1257,7 @@ var Ft, Us, tn = (Us = class {
1257
1257
  };
1258
1258
  return i(S), S;
1259
1259
  })();
1260
- (w = this.options.behavior) == null || w.onFetch(c, this), A(this, qt, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((h = c.fetchOptions) == null ? void 0 : h.meta)) && ne(this, He, et).call(this, { type: "fetch", meta: (f = c.fetchOptions) == null ? void 0 : f.meta }), A(this, ve, en({
1260
+ (w = this.options.behavior) == null || w.onFetch(c, this), A(this, qt, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((h = c.fetchOptions) == null ? void 0 : h.meta)) && ne(this, He, et).call(this, { type: "fetch", meta: (p = c.fetchOptions) == null ? void 0 : p.meta }), A(this, ve, en({
1261
1261
  initialPromise: r == null ? void 0 : r.initialPromise,
1262
1262
  fn: c.fetchFn,
1263
1263
  onCancel: (S) => {
@@ -1286,7 +1286,7 @@ var Ft, Us, tn = (Us = class {
1286
1286
  throw process.env.NODE_ENV !== "production" && console.error(
1287
1287
  `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
1288
1288
  ), new Error(`${this.queryHash} data is undefined`);
1289
- return this.setData(S), (x = (j = o(this, De).config).onSuccess) == null || x.call(j, S, this), (p = (k = o(this, De).config).onSettled) == null || p.call(
1289
+ return this.setData(S), (x = (j = o(this, De).config).onSuccess) == null || x.call(j, S, this), (f = (k = o(this, De).config).onSettled) == null || f.call(
1290
1290
  k,
1291
1291
  S,
1292
1292
  this.state.error,
@@ -1319,7 +1319,7 @@ var Ft, Us, tn = (Us = class {
1319
1319
  this.scheduleGc();
1320
1320
  }
1321
1321
  }
1322
- }, Ct = new WeakMap(), qt = new WeakMap(), De = new WeakMap(), It = new WeakMap(), ve = new WeakMap(), gr = new WeakMap(), Bt = new WeakMap(), He = new WeakSet(), et = function(e) {
1322
+ }, Ct = new WeakMap(), qt = new WeakMap(), De = new WeakMap(), It = new WeakMap(), ve = new WeakMap(), mr = new WeakMap(), Bt = new WeakMap(), He = new WeakSet(), et = function(e) {
1323
1323
  const r = (n) => {
1324
1324
  switch (e.type) {
1325
1325
  case "failed":
@@ -1426,24 +1426,24 @@ function Es(t) {
1426
1426
  fetchStatus: "idle"
1427
1427
  };
1428
1428
  }
1429
- var Re, ie, mr, _e, Ot, Qt, tt, ht, xr, Kt, Vt, Pt, Mt, ft, Gt, de, dr, Zr, es, ts, rs, ss, ns, is, sn, qs, Mn = (qs = class extends wr {
1429
+ var Re, ie, xr, _e, Pt, Qt, tt, ht, br, Kt, Vt, Ot, Mt, ft, Gt, de, hr, Zr, es, ts, rs, ss, ns, is, sn, qs, Mn = (qs = class extends wr {
1430
1430
  constructor(e, r) {
1431
1431
  super();
1432
1432
  Y(this, de);
1433
1433
  Y(this, Re);
1434
1434
  Y(this, ie);
1435
- Y(this, mr);
1435
+ Y(this, xr);
1436
1436
  Y(this, _e);
1437
- Y(this, Ot);
1437
+ Y(this, Pt);
1438
1438
  Y(this, Qt);
1439
1439
  Y(this, tt);
1440
1440
  Y(this, ht);
1441
- Y(this, xr);
1441
+ Y(this, br);
1442
1442
  Y(this, Kt);
1443
1443
  // This property keeps track of the last query with defined data.
1444
1444
  // It will be used to pass the previous data and query to the placeholder function between renders.
1445
1445
  Y(this, Vt);
1446
- Y(this, Pt);
1446
+ Y(this, Ot);
1447
1447
  Y(this, Mt);
1448
1448
  Y(this, ft);
1449
1449
  Y(this, Gt, /* @__PURE__ */ new Set());
@@ -1453,7 +1453,7 @@ var Re, ie, mr, _e, Ot, Qt, tt, ht, xr, Kt, Vt, Pt, Mt, ft, Gt, de, dr, Zr, es,
1453
1453
  this.refetch = this.refetch.bind(this);
1454
1454
  }
1455
1455
  onSubscribe() {
1456
- this.listeners.size === 1 && (o(this, ie).addObserver(this), Ts(o(this, ie), this.options) ? ne(this, de, dr).call(this) : this.updateResult(), ne(this, de, rs).call(this));
1456
+ this.listeners.size === 1 && (o(this, ie).addObserver(this), Ts(o(this, ie), this.options) ? ne(this, de, hr).call(this) : this.updateResult(), ne(this, de, rs).call(this));
1457
1457
  }
1458
1458
  onUnsubscribe() {
1459
1459
  this.hasListeners() || this.destroy();
@@ -1492,13 +1492,13 @@ var Re, ie, mr, _e, Ot, Qt, tt, ht, xr, Kt, Vt, Pt, Mt, ft, Gt, de, dr, Zr, es,
1492
1492
  n,
1493
1493
  this.options,
1494
1494
  r
1495
- ) && ne(this, de, dr).call(this), this.updateResult(), i && (o(this, ie) !== n || We(this.options.enabled, o(this, ie)) !== We(r.enabled, o(this, ie)) || xt(this.options.staleTime, o(this, ie)) !== xt(r.staleTime, o(this, ie))) && ne(this, de, Zr).call(this);
1495
+ ) && ne(this, de, hr).call(this), this.updateResult(), i && (o(this, ie) !== n || We(this.options.enabled, o(this, ie)) !== We(r.enabled, o(this, ie)) || xt(this.options.staleTime, o(this, ie)) !== xt(r.staleTime, o(this, ie))) && ne(this, de, Zr).call(this);
1496
1496
  const l = ne(this, de, es).call(this);
1497
1497
  i && (o(this, ie) !== n || We(this.options.enabled, o(this, ie)) !== We(r.enabled, o(this, ie)) || l !== o(this, ft)) && ne(this, de, ts).call(this, l);
1498
1498
  }
1499
1499
  getOptimisticResult(e) {
1500
1500
  const r = o(this, Re).getQueryCache().build(o(this, Re), e), n = this.createResult(r, e);
1501
- return Ln(this, n) && (A(this, _e, n), A(this, Qt, this.options), A(this, Ot, o(this, ie).state)), n;
1501
+ return Ln(this, n) && (A(this, _e, n), A(this, Qt, this.options), A(this, Pt, o(this, ie).state)), n;
1502
1502
  }
1503
1503
  getCurrentResult() {
1504
1504
  return o(this, _e);
@@ -1528,24 +1528,24 @@ var Re, ie, mr, _e, Ot, Qt, tt, ht, xr, Kt, Vt, Pt, Mt, ft, Gt, de, dr, Zr, es,
1528
1528
  return n.fetch().then(() => this.createResult(n, r));
1529
1529
  }
1530
1530
  fetch(e) {
1531
- return ne(this, de, dr).call(this, {
1531
+ return ne(this, de, hr).call(this, {
1532
1532
  ...e,
1533
1533
  cancelRefetch: e.cancelRefetch ?? !0
1534
1534
  }).then(() => (this.updateResult(), o(this, _e)));
1535
1535
  }
1536
1536
  createResult(e, r) {
1537
1537
  var W;
1538
- const n = o(this, ie), i = this.options, l = o(this, _e), d = o(this, Ot), c = o(this, Qt), w = e !== n ? e.state : o(this, mr), { state: h } = e;
1539
- let f = { ...h }, j = !1, x;
1538
+ const n = o(this, ie), i = this.options, l = o(this, _e), d = o(this, Pt), c = o(this, Qt), w = e !== n ? e.state : o(this, xr), { state: h } = e;
1539
+ let p = { ...h }, j = !1, x;
1540
1540
  if (r._optimisticResults) {
1541
1541
  const m = this.hasListeners(), E = !m && Ts(e, r), N = m && Ns(e, n, r, i);
1542
- (E || N) && (f = {
1543
- ...f,
1542
+ (E || N) && (p = {
1543
+ ...p,
1544
1544
  ...rn(h.data, e.options)
1545
- }), r._optimisticResults === "isRestoring" && (f.fetchStatus = "idle");
1545
+ }), r._optimisticResults === "isRestoring" && (p.fetchStatus = "idle");
1546
1546
  }
1547
- let { error: k, errorUpdatedAt: p, status: _ } = f;
1548
- x = f.data;
1547
+ let { error: k, errorUpdatedAt: f, status: _ } = p;
1548
+ x = p.data;
1549
1549
  let g = !1;
1550
1550
  if (r.placeholderData !== void 0 && x === void 0 && _ === "pending") {
1551
1551
  let m;
@@ -1559,36 +1559,36 @@ var Re, ie, mr, _e, Ot, Qt, tt, ht, xr, Kt, Vt, Pt, Mt, ft, Gt, de, dr, Zr, es,
1559
1559
  ), j = !0);
1560
1560
  }
1561
1561
  if (r.select && x !== void 0 && !g)
1562
- if (l && x === (d == null ? void 0 : d.data) && r.select === o(this, xr))
1562
+ if (l && x === (d == null ? void 0 : d.data) && r.select === o(this, br))
1563
1563
  x = o(this, Kt);
1564
1564
  else
1565
1565
  try {
1566
- A(this, xr, r.select), x = r.select(x), x = Yr(l == null ? void 0 : l.data, x, r), A(this, Kt, x), A(this, ht, null);
1566
+ A(this, br, r.select), x = r.select(x), x = Yr(l == null ? void 0 : l.data, x, r), A(this, Kt, x), A(this, ht, null);
1567
1567
  } catch (m) {
1568
1568
  A(this, ht, m);
1569
1569
  }
1570
- o(this, ht) && (k = o(this, ht), x = o(this, Kt), p = Date.now(), _ = "error");
1571
- const y = f.fetchStatus === "fetching", u = _ === "pending", S = _ === "error", C = u && y, M = x !== void 0, I = {
1570
+ o(this, ht) && (k = o(this, ht), x = o(this, Kt), f = Date.now(), _ = "error");
1571
+ const y = p.fetchStatus === "fetching", u = _ === "pending", S = _ === "error", C = u && y, M = x !== void 0, I = {
1572
1572
  status: _,
1573
- fetchStatus: f.fetchStatus,
1573
+ fetchStatus: p.fetchStatus,
1574
1574
  isPending: u,
1575
1575
  isSuccess: _ === "success",
1576
1576
  isError: S,
1577
1577
  isInitialLoading: C,
1578
1578
  isLoading: C,
1579
1579
  data: x,
1580
- dataUpdatedAt: f.dataUpdatedAt,
1580
+ dataUpdatedAt: p.dataUpdatedAt,
1581
1581
  error: k,
1582
- errorUpdatedAt: p,
1583
- failureCount: f.fetchFailureCount,
1584
- failureReason: f.fetchFailureReason,
1585
- errorUpdateCount: f.errorUpdateCount,
1586
- isFetched: f.dataUpdateCount > 0 || f.errorUpdateCount > 0,
1587
- isFetchedAfterMount: f.dataUpdateCount > w.dataUpdateCount || f.errorUpdateCount > w.errorUpdateCount,
1582
+ errorUpdatedAt: f,
1583
+ failureCount: p.fetchFailureCount,
1584
+ failureReason: p.fetchFailureReason,
1585
+ errorUpdateCount: p.errorUpdateCount,
1586
+ isFetched: p.dataUpdateCount > 0 || p.errorUpdateCount > 0,
1587
+ isFetchedAfterMount: p.dataUpdateCount > w.dataUpdateCount || p.errorUpdateCount > w.errorUpdateCount,
1588
1588
  isFetching: y,
1589
1589
  isRefetching: y && !u,
1590
1590
  isLoadingError: S && !M,
1591
- isPaused: f.fetchStatus === "paused",
1591
+ isPaused: p.fetchStatus === "paused",
1592
1592
  isPlaceholderData: j,
1593
1593
  isRefetchError: S && M,
1594
1594
  isStale: hs(e, r),
@@ -1619,7 +1619,7 @@ var Re, ie, mr, _e, Ot, Qt, tt, ht, xr, Kt, Vt, Pt, Mt, ft, Gt, de, dr, Zr, es,
1619
1619
  }
1620
1620
  updateResult() {
1621
1621
  const e = o(this, _e), r = this.createResult(o(this, ie), this.options);
1622
- if (A(this, Ot, o(this, ie).state), A(this, Qt, this.options), o(this, Ot).data !== void 0 && A(this, Vt, o(this, ie)), Vr(r, e))
1622
+ if (A(this, Pt, o(this, ie).state), A(this, Qt, this.options), o(this, Pt).data !== void 0 && A(this, Vt, o(this, ie)), Vr(r, e))
1623
1623
  return;
1624
1624
  A(this, _e, r);
1625
1625
  const n = () => {
@@ -1641,7 +1641,7 @@ var Re, ie, mr, _e, Ot, Qt, tt, ht, xr, Kt, Vt, Pt, Mt, ft, Gt, de, dr, Zr, es,
1641
1641
  onQueryUpdate() {
1642
1642
  this.updateResult(), this.hasListeners() && ne(this, de, rs).call(this);
1643
1643
  }
1644
- }, Re = new WeakMap(), ie = new WeakMap(), mr = new WeakMap(), _e = new WeakMap(), Ot = new WeakMap(), Qt = new WeakMap(), tt = new WeakMap(), ht = new WeakMap(), xr = new WeakMap(), Kt = new WeakMap(), Vt = new WeakMap(), Pt = new WeakMap(), Mt = new WeakMap(), ft = new WeakMap(), Gt = new WeakMap(), de = new WeakSet(), dr = function(e) {
1644
+ }, Re = new WeakMap(), ie = new WeakMap(), xr = new WeakMap(), _e = new WeakMap(), Pt = new WeakMap(), Qt = new WeakMap(), tt = new WeakMap(), ht = new WeakMap(), br = new WeakMap(), Kt = new WeakMap(), Vt = new WeakMap(), Ot = new WeakMap(), Mt = new WeakMap(), ft = new WeakMap(), Gt = new WeakMap(), de = new WeakSet(), hr = function(e) {
1645
1645
  ne(this, de, is).call(this);
1646
1646
  let r = o(this, ie).fetch(
1647
1647
  this.options,
@@ -1657,19 +1657,19 @@ var Re, ie, mr, _e, Ot, Qt, tt, ht, xr, Kt, Vt, Pt, Mt, ft, Gt, de, dr, Zr, es,
1657
1657
  if (Wt || o(this, _e).isStale || !Qr(e))
1658
1658
  return;
1659
1659
  const n = Ys(o(this, _e).dataUpdatedAt, e) + 1;
1660
- A(this, Pt, Et.setTimeout(() => {
1660
+ A(this, Ot, Et.setTimeout(() => {
1661
1661
  o(this, _e).isStale || this.updateResult();
1662
1662
  }, n));
1663
1663
  }, es = function() {
1664
1664
  return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(o(this, ie)) : this.options.refetchInterval) ?? !1;
1665
1665
  }, ts = function(e) {
1666
1666
  ne(this, de, ns).call(this), A(this, ft, e), !(Wt || We(this.options.enabled, o(this, ie)) === !1 || !Qr(o(this, ft)) || o(this, ft) === 0) && A(this, Mt, Et.setInterval(() => {
1667
- (this.options.refetchIntervalInBackground || ds.isFocused()) && ne(this, de, dr).call(this);
1667
+ (this.options.refetchIntervalInBackground || ds.isFocused()) && ne(this, de, hr).call(this);
1668
1668
  }, o(this, ft)));
1669
1669
  }, rs = function() {
1670
1670
  ne(this, de, Zr).call(this), ne(this, de, ts).call(this, ne(this, de, es).call(this));
1671
1671
  }, ss = function() {
1672
- o(this, Pt) && (Et.clearTimeout(o(this, Pt)), A(this, Pt, void 0));
1672
+ o(this, Ot) && (Et.clearTimeout(o(this, Ot)), A(this, Ot, void 0));
1673
1673
  }, ns = function() {
1674
1674
  o(this, Mt) && (Et.clearInterval(o(this, Mt)), A(this, Mt, void 0));
1675
1675
  }, is = function() {
@@ -1677,7 +1677,7 @@ var Re, ie, mr, _e, Ot, Qt, tt, ht, xr, Kt, Vt, Pt, Mt, ft, Gt, de, dr, Zr, es,
1677
1677
  if (e === o(this, ie))
1678
1678
  return;
1679
1679
  const r = o(this, ie);
1680
- A(this, ie, e), A(this, mr, e.state), this.hasListeners() && (r == null || r.removeObserver(this), e.addObserver(this));
1680
+ A(this, ie, e), A(this, xr, e.state), this.hasListeners() && (r == null || r.removeObserver(this), e.addObserver(this));
1681
1681
  }, sn = function(e) {
1682
1682
  je.batch(() => {
1683
1683
  e.listeners && this.listeners.forEach((r) => {
@@ -1713,19 +1713,19 @@ function Ln(t, e) {
1713
1713
  function Rs(t) {
1714
1714
  return {
1715
1715
  onFetch: (e, r) => {
1716
- var h, f, j, x, k;
1717
- const n = e.options, i = (j = (f = (h = e.fetchOptions) == null ? void 0 : h.meta) == null ? void 0 : f.fetchMore) == null ? void 0 : j.direction, l = ((x = e.state.data) == null ? void 0 : x.pages) || [], d = ((k = e.state.data) == null ? void 0 : k.pageParams) || [];
1716
+ var h, p, j, x, k;
1717
+ const n = e.options, i = (j = (p = (h = e.fetchOptions) == null ? void 0 : h.meta) == null ? void 0 : p.fetchMore) == null ? void 0 : j.direction, l = ((x = e.state.data) == null ? void 0 : x.pages) || [], d = ((k = e.state.data) == null ? void 0 : k.pageParams) || [];
1718
1718
  let c = { pages: [], pageParams: [] }, b = 0;
1719
1719
  const w = async () => {
1720
- let p = !1;
1720
+ let f = !1;
1721
1721
  const _ = (u) => {
1722
1722
  Rn(
1723
1723
  u,
1724
1724
  () => e.signal,
1725
- () => p = !0
1725
+ () => f = !0
1726
1726
  );
1727
1727
  }, g = Xs(e.options, e.fetchOptions), y = async (u, S, C) => {
1728
- if (p)
1728
+ if (f)
1729
1729
  return Promise.reject();
1730
1730
  if (S == null && u.pages.length)
1731
1731
  return Promise.resolve(u);
@@ -1762,9 +1762,9 @@ function Rs(t) {
1762
1762
  return c;
1763
1763
  };
1764
1764
  e.options.persister ? e.fetchFn = () => {
1765
- var p, _;
1766
- return (_ = (p = e.options).persister) == null ? void 0 : _.call(
1767
- p,
1765
+ var f, _;
1766
+ return (_ = (f = e.options).persister) == null ? void 0 : _.call(
1767
+ f,
1768
1768
  w,
1769
1769
  {
1770
1770
  client: e.client,
@@ -1791,15 +1791,15 @@ function Dn(t, { pages: e, pageParams: r }) {
1791
1791
  var n;
1792
1792
  return e.length > 0 ? (n = t.getPreviousPageParam) == null ? void 0 : n.call(t, e[0], e, r[0], r) : void 0;
1793
1793
  }
1794
- var br, Ye, Ee, At, Xe, ct, Qs, Wn = (Qs = class extends tn {
1794
+ var yr, Ye, Ee, At, Xe, ct, Qs, Wn = (Qs = class extends tn {
1795
1795
  constructor(e) {
1796
1796
  super();
1797
1797
  Y(this, Xe);
1798
- Y(this, br);
1798
+ Y(this, yr);
1799
1799
  Y(this, Ye);
1800
1800
  Y(this, Ee);
1801
1801
  Y(this, At);
1802
- A(this, br, e.client), this.mutationId = e.mutationId, A(this, Ee, e.mutationCache), A(this, Ye, []), this.state = e.state || zn(), this.setOptions(e.options), this.scheduleGc();
1802
+ A(this, yr, e.client), this.mutationId = e.mutationId, A(this, Ee, e.mutationCache), A(this, Ye, []), this.state = e.state || zn(), this.setOptions(e.options), this.scheduleGc();
1803
1803
  }
1804
1804
  setOptions(e) {
1805
1805
  this.options = e, this.updateGcTime(this.options.gcTime);
@@ -1830,11 +1830,11 @@ var br, Ye, Ee, At, Xe, ct, Qs, Wn = (Qs = class extends tn {
1830
1830
  this.execute(this.state.variables);
1831
1831
  }
1832
1832
  async execute(e) {
1833
- var d, c, b, w, h, f, j, x, k, p, _, g, y, u, S, C, M, U, I, W;
1833
+ var d, c, b, w, h, p, j, x, k, f, _, g, y, u, S, C, M, U, I, W;
1834
1834
  const r = () => {
1835
1835
  ne(this, Xe, ct).call(this, { type: "continue" });
1836
1836
  }, n = {
1837
- client: o(this, br),
1837
+ client: o(this, yr),
1838
1838
  meta: this.options.meta,
1839
1839
  mutationKey: this.options.mutationKey
1840
1840
  };
@@ -1876,7 +1876,7 @@ var br, Ye, Ee, At, Xe, ct, Qs, Wn = (Qs = class extends tn {
1876
1876
  });
1877
1877
  }
1878
1878
  const m = await o(this, At).start();
1879
- return await ((f = (h = o(this, Ee).config).onSuccess) == null ? void 0 : f.call(
1879
+ return await ((p = (h = o(this, Ee).config).onSuccess) == null ? void 0 : p.call(
1880
1880
  h,
1881
1881
  m,
1882
1882
  e,
@@ -1889,7 +1889,7 @@ var br, Ye, Ee, At, Xe, ct, Qs, Wn = (Qs = class extends tn {
1889
1889
  e,
1890
1890
  this.state.context,
1891
1891
  n
1892
- )), await ((p = (k = o(this, Ee).config).onSettled) == null ? void 0 : p.call(
1892
+ )), await ((f = (k = o(this, Ee).config).onSettled) == null ? void 0 : f.call(
1893
1893
  k,
1894
1894
  m,
1895
1895
  null,
@@ -1959,7 +1959,7 @@ var br, Ye, Ee, At, Xe, ct, Qs, Wn = (Qs = class extends tn {
1959
1959
  o(this, Ee).runNext(this);
1960
1960
  }
1961
1961
  }
1962
- }, br = new WeakMap(), Ye = new WeakMap(), Ee = new WeakMap(), At = new WeakMap(), Xe = new WeakSet(), ct = function(e) {
1962
+ }, yr = new WeakMap(), Ye = new WeakMap(), Ee = new WeakMap(), At = new WeakMap(), Xe = new WeakSet(), ct = function(e) {
1963
1963
  const r = (n) => {
1964
1964
  switch (e.type) {
1965
1965
  case "failed":
@@ -2036,19 +2036,19 @@ function zn() {
2036
2036
  submittedAt: 0
2037
2037
  };
2038
2038
  }
2039
- var rt, qe, yr, Ks, $n = (Ks = class extends wr {
2039
+ var rt, qe, vr, Ks, $n = (Ks = class extends wr {
2040
2040
  constructor(e = {}) {
2041
2041
  super();
2042
2042
  Y(this, rt);
2043
2043
  Y(this, qe);
2044
- Y(this, yr);
2045
- this.config = e, A(this, rt, /* @__PURE__ */ new Set()), A(this, qe, /* @__PURE__ */ new Map()), A(this, yr, 0);
2044
+ Y(this, vr);
2045
+ this.config = e, A(this, rt, /* @__PURE__ */ new Set()), A(this, qe, /* @__PURE__ */ new Map()), A(this, vr, 0);
2046
2046
  }
2047
2047
  build(e, r, n) {
2048
2048
  const i = new Wn({
2049
2049
  client: e,
2050
2050
  mutationCache: this,
2051
- mutationId: ++Tr(this, yr)._,
2051
+ mutationId: ++Tr(this, vr)._,
2052
2052
  options: e.defaultMutationOptions(r),
2053
2053
  state: n
2054
2054
  });
@@ -2130,7 +2130,7 @@ var rt, qe, yr, Ks, $n = (Ks = class extends wr {
2130
2130
  )
2131
2131
  );
2132
2132
  }
2133
- }, rt = new WeakMap(), qe = new WeakMap(), yr = new WeakMap(), Ks);
2133
+ }, rt = new WeakMap(), qe = new WeakMap(), vr = new WeakMap(), Ks);
2134
2134
  function Nr(t) {
2135
2135
  var e;
2136
2136
  return (e = t.options.scope) == null ? void 0 : e.id;
@@ -2144,7 +2144,7 @@ var Je, Vs, Un = (Vs = class extends wr {
2144
2144
  build(e, r, n) {
2145
2145
  const i = r.queryKey, l = r.queryHash ?? us(i, r);
2146
2146
  let d = this.get(l);
2147
- return d || (d = new Pn({
2147
+ return d || (d = new On({
2148
2148
  client: e,
2149
2149
  queryKey: i,
2150
2150
  queryHash: l,
@@ -2365,7 +2365,7 @@ var Je, Vs, Un = (Vs = class extends wr {
2365
2365
  A(this, gt, t);
2366
2366
  }
2367
2367
  setQueryDefaults(t, e) {
2368
- o(this, Yt).set(fr(t), {
2368
+ o(this, Yt).set(pr(t), {
2369
2369
  queryKey: t,
2370
2370
  defaultOptions: e
2371
2371
  });
@@ -2373,11 +2373,11 @@ var Je, Vs, Un = (Vs = class extends wr {
2373
2373
  getQueryDefaults(t) {
2374
2374
  const e = [...o(this, Yt).values()], r = {};
2375
2375
  return e.forEach((n) => {
2376
- pr(t, n.queryKey) && Object.assign(r, n.defaultOptions);
2376
+ gr(t, n.queryKey) && Object.assign(r, n.defaultOptions);
2377
2377
  }), r;
2378
2378
  }
2379
2379
  setMutationDefaults(t, e) {
2380
- o(this, Xt).set(fr(t), {
2380
+ o(this, Xt).set(pr(t), {
2381
2381
  mutationKey: t,
2382
2382
  defaultOptions: e
2383
2383
  });
@@ -2385,7 +2385,7 @@ var Je, Vs, Un = (Vs = class extends wr {
2385
2385
  getMutationDefaults(t) {
2386
2386
  const e = [...o(this, Xt).values()], r = {};
2387
2387
  return e.forEach((n) => {
2388
- pr(t, n.mutationKey) && Object.assign(r, n.defaultOptions);
2388
+ gr(t, n.mutationKey) && Object.assign(r, n.defaultOptions);
2389
2389
  }), r;
2390
2390
  }
2391
2391
  defaultQueryOptions(t) {
@@ -2464,7 +2464,7 @@ var Vn = ze.createContext(Kn()), Gn = () => ze.useContext(Vn), Yn = (t, e, r) =>
2464
2464
  r.clearReset();
2465
2465
  });
2466
2466
  function ri(t, e, r) {
2467
- var j, x, k, p;
2467
+ var j, x, k, f;
2468
2468
  if (process.env.NODE_ENV !== "production" && (typeof t != "object" || Array.isArray(t)))
2469
2469
  throw new Error(
2470
2470
  'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
@@ -2483,14 +2483,14 @@ function ri(t, e, r) {
2483
2483
  l,
2484
2484
  d
2485
2485
  )
2486
- ), h = w.getOptimisticResult(d), f = !n && t.subscribed !== !1;
2486
+ ), h = w.getOptimisticResult(d), p = !n && t.subscribed !== !1;
2487
2487
  if (ze.useSyncExternalStore(
2488
2488
  ze.useCallback(
2489
2489
  (_) => {
2490
- const g = f ? w.subscribe(je.batchCalls(_)) : Fe;
2490
+ const g = p ? w.subscribe(je.batchCalls(_)) : Fe;
2491
2491
  return w.updateResult(), g;
2492
2492
  },
2493
- [w, f]
2493
+ [w, p]
2494
2494
  ),
2495
2495
  () => w.getCurrentResult(),
2496
2496
  () => w.getCurrentResult()
@@ -2506,7 +2506,7 @@ function ri(t, e, r) {
2506
2506
  suspense: d.suspense
2507
2507
  }))
2508
2508
  throw h.error;
2509
- if ((p = (k = l.getDefaultOptions().queries) == null ? void 0 : k._experimental_afterQuery) == null || p.call(
2509
+ if ((f = (k = l.getDefaultOptions().queries) == null ? void 0 : k._experimental_afterQuery) == null || f.call(
2510
2510
  k,
2511
2511
  d,
2512
2512
  h
@@ -2570,7 +2570,7 @@ function ni({
2570
2570
  ), b = q(() => {
2571
2571
  var u, S, C;
2572
2572
  l.current || (l.current = !0, c("bob_session_start", {
2573
- widget_version: vr,
2573
+ widget_version: er,
2574
2574
  has_vehicle: !!((u = e == null ? void 0 : e.vehicle) != null && u.selectedVehicle),
2575
2575
  has_user: !!((S = e == null ? void 0 : e.user) != null && S.id) || !!((C = e == null ? void 0 : e.user) != null && C.email)
2576
2576
  }));
@@ -2592,7 +2592,7 @@ function ni({
2592
2592
  });
2593
2593
  },
2594
2594
  [c]
2595
- ), f = q(
2595
+ ), p = q(
2596
2596
  (u, S) => {
2597
2597
  c("bob_parts_viewed", {
2598
2598
  part_count: u,
@@ -2631,7 +2631,7 @@ function ni({
2631
2631
  });
2632
2632
  },
2633
2633
  [c]
2634
- ), p = q(
2634
+ ), f = q(
2635
2635
  (u, S) => {
2636
2636
  c("bob_checkout_started", {
2637
2637
  cart_value: u,
@@ -2664,7 +2664,7 @@ function ni({
2664
2664
  },
2665
2665
  [c]
2666
2666
  );
2667
- return oe(() => {
2667
+ return ae(() => {
2668
2668
  b();
2669
2669
  }, [b]), {
2670
2670
  trackEvent: c,
@@ -2672,17 +2672,17 @@ function ni({
2672
2672
  trackSessionStart: b,
2673
2673
  trackMessageSent: w,
2674
2674
  trackVehicleIdentified: h,
2675
- trackPartsViewed: f,
2675
+ trackPartsViewed: p,
2676
2676
  trackProductClicked: j,
2677
2677
  trackProductViewed: x,
2678
2678
  trackAddToCart: k,
2679
- trackCheckoutStarted: p,
2679
+ trackCheckoutStarted: f,
2680
2680
  trackSpeechPlayed: _,
2681
2681
  trackSpeechFailed: g,
2682
2682
  trackError: y
2683
2683
  };
2684
2684
  }
2685
- const Or = xn(null);
2685
+ const Pr = xn(null);
2686
2686
  function ii({
2687
2687
  children: t,
2688
2688
  bobConfig: e,
@@ -2705,16 +2705,16 @@ function ii({
2705
2705
  }
2706
2706
  }),
2707
2707
  []
2708
- ), f = l || h, j = !!l;
2709
- oe(() => {
2710
- console.log(`[BobWidget] v${vr} initialized`), console.log(`[BobWidget] QueryClient: ${j ? "external (shared)" : "internal"}`), console.log(`[BobWidget] Analytics: ${c ? "enabled" : "disabled"}`), d != null && d.measurementId && console.log(`[BobWidget] GA4: ${d.measurementId}`);
2708
+ ), p = l || h, j = !!l;
2709
+ ae(() => {
2710
+ console.log(`[BobWidget] v${er} initialized`), console.log(`[BobWidget] QueryClient: ${j ? "external (shared)" : "internal"}`), console.log(`[BobWidget] Analytics: ${c ? "enabled" : "disabled"}`), d != null && d.measurementId && console.log(`[BobWidget] GA4: ${d.measurementId}`);
2711
2711
  }, [j, c, d == null ? void 0 : d.measurementId]);
2712
- const x = Dt(() => bn(e.supabaseUrl, e.supabaseKey), [e.supabaseUrl, e.supabaseKey]), [k, p] = Lt.useState(n);
2712
+ const x = Dt(() => bn(e.supabaseUrl, e.supabaseKey), [e.supabaseUrl, e.supabaseKey]), [k, f] = Lt.useState(n);
2713
2713
  Lt.useEffect(() => {
2714
- p(n);
2714
+ f(n);
2715
2715
  }, [n]);
2716
2716
  const _ = Lt.useCallback((y) => {
2717
- p((u) => ({
2717
+ f((u) => ({
2718
2718
  ...u,
2719
2719
  ...y
2720
2720
  }));
@@ -2733,10 +2733,10 @@ function ii({
2733
2733
  }),
2734
2734
  [x, e, r, k, i, _, d, c, b, w]
2735
2735
  );
2736
- return /* @__PURE__ */ s.jsx(qn, { client: f, children: /* @__PURE__ */ s.jsx(Or.Provider, { value: g, children: t }) });
2736
+ return /* @__PURE__ */ s.jsx(qn, { client: p, children: /* @__PURE__ */ s.jsx(Pr.Provider, { value: g, children: t }) });
2737
2737
  }
2738
2738
  function bt() {
2739
- const t = cs(Or);
2739
+ const t = cs(Pr);
2740
2740
  if (!t)
2741
2741
  throw new Error("useBobContext must be used within a BobProvider");
2742
2742
  return t;
@@ -2746,7 +2746,7 @@ function Ji() {
2746
2746
  return t;
2747
2747
  }
2748
2748
  function kr() {
2749
- const t = cs(Or);
2749
+ const t = cs(Pr);
2750
2750
  return (t == null ? void 0 : t.bobSupabase) || null;
2751
2751
  }
2752
2752
  function Zi() {
@@ -2766,7 +2766,7 @@ function ra() {
2766
2766
  return { ga4Config: t, enabled: e };
2767
2767
  }
2768
2768
  function ln() {
2769
- const t = cs(Or);
2769
+ const t = cs(Pr);
2770
2770
  return t ? { bottomOffset: t.bottomOffset, zIndexBase: t.zIndexBase } : { bottomOffset: 0, zIndexBase: 50 };
2771
2771
  }
2772
2772
  const ai = 15e3, oi = {
@@ -2777,31 +2777,31 @@ const ai = 15e3, oi = {
2777
2777
  no_parts_found: /nothing came up|no results|sorry.*search/i,
2778
2778
  checkout_ready: /ready to checkout|checkout.*ready|choice.*checkout/i,
2779
2779
  rego_searching: /let('?s| us) see what car|sweet.*searching|searching for/i
2780
- }, cr = /* @__PURE__ */ new Map(), li = (t) => t.replace(/\bya\b/gi, "you"), ci = ({
2780
+ }, ur = /* @__PURE__ */ new Map(), li = (t) => t.replace(/\bya\b/gi, "you"), ci = ({
2781
2781
  onStart: t,
2782
2782
  onEnd: e,
2783
2783
  onFailed: r
2784
2784
  } = {}) => {
2785
- const { bobConfig: n, supabase: i } = bt(), [l, d] = J(!1), c = K(null), b = K(null), w = K(!1), h = K([]), f = K(!1), j = K(!1), x = K(null), k = K(null), p = K(t), _ = K(e), g = K(r);
2786
- oe(() => {
2787
- p.current = t, _.current = e, g.current = r;
2785
+ const { bobConfig: n, supabase: i } = bt(), [l, d] = J(!1), c = K(null), b = K(null), w = K(!1), h = K([]), p = K(!1), j = K(!1), x = K(null), k = K(null), f = K(t), _ = K(e), g = K(r);
2786
+ ae(() => {
2787
+ f.current = t, _.current = e, g.current = r;
2788
2788
  }, [t, e, r]);
2789
2789
  const y = q(() => {
2790
2790
  b.current && (clearTimeout(b.current), b.current = null);
2791
2791
  }, []), u = q(() => {
2792
2792
  var N;
2793
- w.current || (w.current = !0, console.log("[BobWidget TTS] Fallback: triggering onStart without audio"), (N = p.current) == null || N.call(p));
2793
+ w.current || (w.current = !0, console.log("[BobWidget TTS] Fallback: triggering onStart without audio"), (N = f.current) == null || N.call(f));
2794
2794
  }, []), S = q(async (N) => {
2795
- if (cr.has(N)) {
2796
- const R = cr.get(N);
2795
+ if (ur.has(N)) {
2796
+ const R = ur.get(N);
2797
2797
  return console.log(`[BobWidget TTS] Cache hit for clip: ${N}`, R ? "found" : "null"), R || null;
2798
2798
  }
2799
2799
  try {
2800
2800
  console.log(`[BobWidget TTS] Fetching clip from DB: ${N}`);
2801
2801
  const { data: R, error: v } = await i.from("bob_audio_clips").select("audio_url").eq("clip_key", N).eq("is_active", !0).single();
2802
- return v || !R ? (console.log(`[BobWidget TTS] No clip found for: ${N}`), cr.set(N, null), null) : (console.log(`[BobWidget TTS] Clip found: ${N} -> ${R.audio_url}`), cr.set(N, R), R);
2802
+ return v || !R ? (console.log(`[BobWidget TTS] No clip found for: ${N}`), ur.set(N, null), null) : (console.log(`[BobWidget TTS] Clip found: ${N} -> ${R.audio_url}`), ur.set(N, R), R);
2803
2803
  } catch (R) {
2804
- return console.warn(`[BobWidget TTS] Clip lookup failed for ${N}:`, R), cr.set(N, null), null;
2804
+ return console.warn(`[BobWidget TTS] Clip lookup failed for ${N}:`, R), ur.set(N, null), null;
2805
2805
  }
2806
2806
  }, [i]), C = q(async (N) => {
2807
2807
  for (const [R, v] of Object.entries(oi))
@@ -2814,18 +2814,18 @@ const ai = 15e3, oi = {
2814
2814
  return null;
2815
2815
  }, [S]), M = q(async () => {
2816
2816
  var H, z, Z;
2817
- if (f.current || h.current.length === 0)
2817
+ if (p.current || h.current.length === 0)
2818
2818
  return;
2819
- f.current = !0;
2819
+ p.current = !0;
2820
2820
  const N = h.current.shift();
2821
2821
  if (!N) {
2822
- f.current = !1;
2822
+ p.current = !1;
2823
2823
  return;
2824
2824
  }
2825
2825
  const { text: R, isGreeting: v } = N;
2826
2826
  v && (j.current = !0), w.current = !1, y(), c.current && (c.current.pause(), c.current = null), b.current = setTimeout(() => {
2827
2827
  var Q, B;
2828
- console.warn("[BobWidget TTS] Timeout - triggering fallback callbacks"), u(), d(!1), j.current = !1, (Q = _.current) == null || Q.call(_), (B = g.current) == null || B.call(g), c.current = null, f.current = !1, M();
2828
+ console.warn("[BobWidget TTS] Timeout - triggering fallback callbacks"), u(), d(!1), j.current = !1, (Q = _.current) == null || Q.call(_), (B = g.current) == null || B.call(g), c.current = null, p.current = !1, M();
2829
2829
  }, ai);
2830
2830
  try {
2831
2831
  let Q = null;
@@ -2854,21 +2854,21 @@ const ai = 15e3, oi = {
2854
2854
  const B = new Audio(Q);
2855
2855
  c.current = B, B.onplay = () => {
2856
2856
  var L;
2857
- y(), x.current = null, w.current || (w.current = !0, d(!0), console.log("[BobWidget TTS] Audio playing, triggering onStart (animation: TALKING)"), (L = p.current) == null || L.call(p));
2857
+ y(), x.current = null, w.current || (w.current = !0, d(!0), console.log("[BobWidget TTS] Audio playing, triggering onStart (animation: TALKING)"), (L = f.current) == null || L.call(f));
2858
2858
  }, B.onended = () => {
2859
2859
  var L;
2860
- y(), d(!1), j.current = !1, console.log("[BobWidget TTS] Audio ended, triggering onEnd (animation: COMPLETE/IDLE)"), (L = _.current) == null || L.call(_), c.current = null, f.current = !1, M();
2860
+ y(), d(!1), j.current = !1, console.log("[BobWidget TTS] Audio ended, triggering onEnd (animation: COMPLETE/IDLE)"), (L = _.current) == null || L.call(_), c.current = null, p.current = !1, M();
2861
2861
  }, B.onerror = (L) => {
2862
2862
  var $, F;
2863
- y(), console.warn("[BobWidget TTS] Audio playback error:", L), u(), d(!1), j.current = !1, ($ = _.current) == null || $.call(_), (F = g.current) == null || F.call(g), c.current = null, f.current = !1, M();
2863
+ y(), console.warn("[BobWidget TTS] Audio playback error:", L), u(), d(!1), j.current = !1, ($ = _.current) == null || $.call(_), (F = g.current) == null || F.call(g), c.current = null, p.current = !1, M();
2864
2864
  };
2865
2865
  try {
2866
2866
  await B.play();
2867
2867
  } catch (L) {
2868
- console.warn("[BobWidget TTS] Audio play() failed (autoplay policy):", L), y(), v && (x.current = R, console.log("[BobWidget TTS] Greeting stored for retry on user interaction")), u(), d(!1), j.current = !1, (H = _.current) == null || H.call(_), f.current = !1, M();
2868
+ console.warn("[BobWidget TTS] Audio play() failed (autoplay policy):", L), y(), v && (x.current = R, console.log("[BobWidget TTS] Greeting stored for retry on user interaction")), u(), d(!1), j.current = !1, (H = _.current) == null || H.call(_), p.current = !1, M();
2869
2869
  }
2870
2870
  } catch (Q) {
2871
- y(), console.error("[BobWidget TTS] Speech synthesis error:", Q), u(), d(!1), j.current = !1, (z = _.current) == null || z.call(_), (Z = g.current) == null || Z.call(g), f.current = !1, M();
2871
+ y(), console.error("[BobWidget TTS] Speech synthesis error:", Q), u(), d(!1), j.current = !1, (z = _.current) == null || z.call(_), (Z = g.current) == null || Z.call(g), p.current = !1, M();
2872
2872
  }
2873
2873
  }, [n.supabaseUrl, n.supabaseKey, y, u, C]), U = q((N, R = !1) => {
2874
2874
  if (N.trim()) {
@@ -2886,13 +2886,13 @@ const ai = 15e3, oi = {
2886
2886
  R ? h.current.unshift({ text: N, isGreeting: R }) : h.current.push({ text: N, isGreeting: R }), M();
2887
2887
  }
2888
2888
  }, [M]), I = q(() => {
2889
- if (x.current && !c.current && !f.current) {
2889
+ if (x.current && !c.current && !p.current) {
2890
2890
  console.log("[BobWidget TTS] Retrying pending greeting on user interaction");
2891
2891
  const N = x.current;
2892
2892
  x.current = null, U(N, !0);
2893
2893
  }
2894
2894
  }, [U]), W = q(() => {
2895
- y(), h.current = [], c.current && (c.current.pause(), c.current = null), d(!1), j.current = !1, f.current = !1;
2895
+ y(), h.current = [], c.current && (c.current.pause(), c.current = null), d(!1), j.current = !1, p.current = !1;
2896
2896
  }, [y]), m = q(() => {
2897
2897
  var N;
2898
2898
  (N = c.current) == null || N.pause();
@@ -2900,7 +2900,7 @@ const ai = 15e3, oi = {
2900
2900
  var N;
2901
2901
  (N = c.current) == null || N.play();
2902
2902
  }, []);
2903
- return oe(() => () => {
2903
+ return ae(() => () => {
2904
2904
  y(), h.current = [], c.current && (c.current.pause(), c.current = null);
2905
2905
  }, [y]), {
2906
2906
  speak: U,
@@ -2914,7 +2914,7 @@ const ai = 15e3, oi = {
2914
2914
  }, Is = "bob_last_visit", ui = 30;
2915
2915
  function di(t = ui) {
2916
2916
  const [e, r] = J(!1), [n, i] = J(null);
2917
- return oe(() => {
2917
+ return ae(() => {
2918
2918
  try {
2919
2919
  const l = localStorage.getItem(Is), d = Date.now();
2920
2920
  if (l) {
@@ -3067,23 +3067,23 @@ const os = (t) => {
3067
3067
  onStreamComplete: b,
3068
3068
  onShowingProduct: w,
3069
3069
  onResearchStart: h,
3070
- onReadyToSpeak: f,
3070
+ onReadyToSpeak: p,
3071
3071
  onHighlightPart: j,
3072
3072
  onHighlightProduct: x,
3073
3073
  onNoPartsFound: k,
3074
- onAutoFetchComplete: p
3074
+ onAutoFetchComplete: f
3075
3075
  }) => {
3076
- var _r, Er, tr, rr;
3076
+ var _r, Er, rr, sr;
3077
3077
  const { bobConfig: _, hostApiConfig: g, hostContext: y, callbacks: u, ga4Config: S, analyticsEnabled: C } = bt(), M = ni({
3078
3078
  ga4Config: S,
3079
3079
  hostContext: y,
3080
3080
  callbacks: u,
3081
3081
  enabled: C
3082
- }), { isReturningUser: U } = di(), [I, W] = J([]), [m, E] = J(""), [N, R] = J(!1), [v, H] = J(!1), [z, Z] = J(null), Q = K(null), B = K(!1), L = K(!1), $ = K(""), F = K(!1), D = K(null), ce = K(null), Oe = K([]), he = K(!1), we = K(null), Te = () => {
3082
+ }), { isReturningUser: U } = di(), [I, W] = J([]), [m, E] = J(""), [N, R] = J(!1), [v, H] = J(!1), [z, Z] = J(null), Q = K(null), B = K(!1), L = K(!1), $ = K(""), F = K(!1), D = K(null), ce = K(null), Pe = K([]), he = K(!1), we = K(null), Te = () => {
3083
3083
  D.current && (clearTimeout(D.current), D.current = null);
3084
- }, { speak: ke, stop: ee, isSpeaking: Pe, retryPendingGreeting: Me } = ci({
3084
+ }, { speak: ke, stop: ee, isSpeaking: Oe, retryPendingGreeting: Me } = ci({
3085
3085
  onStart: () => {
3086
- Te(), F.current = !0, console.log("[BobWidget STATE] Speech STARTED - transitioning to TALK state"), M.trackSpeechPlayed($.current.length), f == null || f(), e || (console.log("[BobWidget STATE] Setting state to:", r), se(r));
3086
+ Te(), F.current = !0, console.log("[BobWidget STATE] Speech STARTED - transitioning to TALK state"), M.trackSpeechPlayed($.current.length), p == null || p(), e || (console.log("[BobWidget STATE] Setting state to:", r), se(r));
3087
3087
  },
3088
3088
  onEnd: () => {
3089
3089
  Te(), console.log("[BobWidget STATE] Speech ENDED - transitioning out of TALK state");
@@ -3098,10 +3098,10 @@ const os = (t) => {
3098
3098
  console.warn("[BobWidget] Speech synthesis failed - fallback triggered"), M.trackSpeechFailed($.current.length);
3099
3099
  }
3100
3100
  });
3101
- oe(() => {
3101
+ ae(() => {
3102
3102
  var G;
3103
3103
  (G = Q.current) == null || G.scrollIntoView({ behavior: "smooth" });
3104
- }, [I]), oe(() => {
3104
+ }, [I]), ae(() => {
3105
3105
  var fe, xe;
3106
3106
  const G = (fe = y.vehicle) == null ? void 0 : fe.selectedVehicle;
3107
3107
  G && !z && (console.log("[BobWidget] Setting vehicle from host context:", G), Z(G), (xe = u.onVehicleIdentified) == null || xe.call(u, G), M.trackVehicleIdentified({
@@ -3110,7 +3110,7 @@ const os = (t) => {
3110
3110
  year: G.year,
3111
3111
  rego: G.rego
3112
3112
  }));
3113
- }, [(_r = y.vehicle) == null ? void 0 : _r.selectedVehicle]), oe(() => {
3113
+ }, [(_r = y.vehicle) == null ? void 0 : _r.selectedVehicle]), ae(() => {
3114
3114
  var G;
3115
3115
  if (I.length === 0 && !L.current) {
3116
3116
  L.current = !0;
@@ -3120,14 +3120,14 @@ const os = (t) => {
3120
3120
  console.log("[BobWidget] Speaking initial greeting (priority)"), ke(xe, !0);
3121
3121
  }, 500);
3122
3122
  }
3123
- }, [(Er = y.vehicle) == null ? void 0 : Er.selectedVehicle, I.length, v, ke]), oe(() => {
3123
+ }, [(Er = y.vehicle) == null ? void 0 : Er.selectedVehicle, I.length, v, ke]), ae(() => {
3124
3124
  const G = () => {
3125
3125
  console.log("[BobWidget] User interaction detected - retrying pending greeting"), Me(), document.removeEventListener("click", G), document.removeEventListener("touchstart", G);
3126
3126
  };
3127
3127
  return document.addEventListener("click", G, { once: !0 }), document.addEventListener("touchstart", G, { once: !0 }), () => {
3128
3128
  document.removeEventListener("click", G), document.removeEventListener("touchstart", G);
3129
3129
  };
3130
- }, [Me]), oe(() => {
3130
+ }, [Me]), ae(() => {
3131
3131
  var yt, vt;
3132
3132
  const G = (yt = y.vehicle) == null ? void 0 : yt.selectedVehicle;
3133
3133
  if (!G || B.current) return;
@@ -3184,12 +3184,12 @@ const os = (t) => {
3184
3184
  }
3185
3185
  }
3186
3186
  }
3187
- p == null || p();
3187
+ f == null || f();
3188
3188
  } catch (Ie) {
3189
3189
  console.error("[BobWidget] Auto-fetch error:", Ie);
3190
3190
  }
3191
3191
  })();
3192
- }, [(tr = y.vehicle) == null ? void 0 : tr.selectedVehicle, (rr = y.user) == null ? void 0 : rr.email]);
3192
+ }, [(rr = y.vehicle) == null ? void 0 : rr.selectedVehicle, (sr = y.user) == null ? void 0 : sr.email]);
3193
3193
  const se = (G) => {
3194
3194
  try {
3195
3195
  t(G);
@@ -3197,12 +3197,12 @@ const os = (t) => {
3197
3197
  console.warn(`[BobWidget] State "${G}" not available`);
3198
3198
  }
3199
3199
  }, Ce = () => {
3200
- if (Oe.current.length === 0) {
3200
+ if (Pe.current.length === 0) {
3201
3201
  he.current = !1, e || se(n);
3202
3202
  return;
3203
3203
  }
3204
3204
  he.current = !0;
3205
- const G = Oe.current.shift(), fe = new Audio(G);
3205
+ const G = Pe.current.shift(), fe = new Audio(G);
3206
3206
  we.current = fe, fe.onplay = () => {
3207
3207
  console.log("[BobWidget] Searching audio STARTED:", G), e || se(r);
3208
3208
  }, fe.onended = () => {
@@ -3213,7 +3213,7 @@ const os = (t) => {
3213
3213
  console.warn("[BobWidget] Searching audio autoplay blocked:", G), we.current = null, Ce();
3214
3214
  });
3215
3215
  }, me = async (G) => {
3216
- var Se, nt, sr, yt, vt, zt, wt, jt, Ie, kt, $e, Ae, it, St, at, Be, _t;
3216
+ var Se, nt, nr, yt, vt, zt, wt, jt, Ie, kt, $e, Ae, it, St, at, Be, _t;
3217
3217
  const fe = `${_.supabaseUrl}/functions/v1/bob-chat`, xe = (Se = y.user) == null ? void 0 : Se.email;
3218
3218
  try {
3219
3219
  const be = {
@@ -3236,18 +3236,18 @@ const os = (t) => {
3236
3236
  return;
3237
3237
  }
3238
3238
  if (Le.status === 402) {
3239
- (sr = u.onError) == null || sr.call(u, new Error("Payment required"));
3239
+ (nr = u.onError) == null || nr.call(u, new Error("Payment required"));
3240
3240
  return;
3241
3241
  }
3242
3242
  throw new Error("Failed to start stream");
3243
3243
  }
3244
3244
  if (!Le.body) throw new Error("No response body");
3245
3245
  const Ar = Le.body.getReader(), Lr = new TextDecoder();
3246
- let Ke = "", nr = !1, ot = "";
3247
- for (; !nr; ) {
3248
- const { done: T, value: O } = await Ar.read();
3246
+ let Ke = "", ir = !1, ot = "";
3247
+ for (; !ir; ) {
3248
+ const { done: T, value: P } = await Ar.read();
3249
3249
  if (T) break;
3250
- Ke += Lr.decode(O, { stream: !0 });
3250
+ Ke += Lr.decode(P, { stream: !0 });
3251
3251
  let X;
3252
3252
  for (; (X = Ke.indexOf(`
3253
3253
  `)) !== -1; ) {
@@ -3255,71 +3255,71 @@ const os = (t) => {
3255
3255
  if (Ke = Ke.slice(X + 1), te.endsWith("\r") && (te = te.slice(0, -1)), te.startsWith(":") || te.trim() === "" || !te.startsWith("data: ")) continue;
3256
3256
  const ue = te.slice(6).trim();
3257
3257
  if (ue === "[DONE]") {
3258
- nr = !0;
3258
+ ir = !0;
3259
3259
  break;
3260
3260
  }
3261
3261
  try {
3262
- const P = JSON.parse(ue);
3263
- if (P.type === "vehicle_identified" && P.vehicle) {
3264
- Z(P.vehicle), (yt = u.onVehicleIdentified) == null || yt.call(u, P.vehicle), M.trackVehicleIdentified({
3265
- make: P.vehicle.make,
3266
- model: P.vehicle.model,
3267
- year: P.vehicle.year,
3268
- rego: P.vehicle.rego
3262
+ const O = JSON.parse(ue);
3263
+ if (O.type === "vehicle_identified" && O.vehicle) {
3264
+ Z(O.vehicle), (yt = u.onVehicleIdentified) == null || yt.call(u, O.vehicle), M.trackVehicleIdentified({
3265
+ make: O.vehicle.make,
3266
+ model: O.vehicle.model,
3267
+ year: O.vehicle.year,
3268
+ rego: O.vehicle.rego
3269
3269
  });
3270
3270
  continue;
3271
3271
  }
3272
- if (P.type === "service_packages_found" && P.packages) {
3273
- (vt = u.onServicePackagesFound) == null || vt.call(u, P.packages);
3272
+ if (O.type === "service_packages_found" && O.packages) {
3273
+ (vt = u.onServicePackagesFound) == null || vt.call(u, O.packages);
3274
3274
  continue;
3275
3275
  }
3276
- if (P.type === "parts_found" && P.parts) {
3277
- (zt = u.onPartsFound) == null || zt.call(u, P.parts), M.trackPartsViewed(
3278
- Array.isArray(P.parts) ? P.parts.length : 0,
3276
+ if (O.type === "parts_found" && O.parts) {
3277
+ (zt = u.onPartsFound) == null || zt.call(u, O.parts), M.trackPartsViewed(
3278
+ Array.isArray(O.parts) ? O.parts.length : 0,
3279
3279
  (wt = z == null ? void 0 : z.vehicle_id) == null ? void 0 : wt.toString()
3280
3280
  );
3281
3281
  continue;
3282
3282
  }
3283
- if (P.type === "bob_suggestions" && P.products) {
3284
- console.log("[useBobChat] Received bob_suggestions:", P.products.length, "products", P.title), W((pe) => {
3283
+ if (O.type === "bob_suggestions" && O.products) {
3284
+ console.log("[useBobChat] Received bob_suggestions:", O.products.length, "products", O.title), W((pe) => {
3285
3285
  var ye;
3286
- const le = [...pe], ae = le[le.length - 1];
3287
- return console.log("[useBobChat] Attaching to message:", ae == null ? void 0 : ae.role, (ye = ae == null ? void 0 : ae.content) == null ? void 0 : ye.slice(0, 40)), (ae == null ? void 0 : ae.role) === "assistant" ? le.map(
3286
+ const le = [...pe], oe = le[le.length - 1];
3287
+ return console.log("[useBobChat] Attaching to message:", oe == null ? void 0 : oe.role, (ye = oe == null ? void 0 : oe.content) == null ? void 0 : ye.slice(0, 40)), (oe == null ? void 0 : oe.role) === "assistant" ? le.map(
3288
3288
  (Ue, Ze) => Ze === le.length - 1 ? {
3289
3289
  ...Ue,
3290
- suggestedProducts: P.products,
3291
- suggestionsTitle: P.title
3290
+ suggestedProducts: O.products,
3291
+ suggestionsTitle: O.title
3292
3292
  } : Ue
3293
3293
  ) : le;
3294
- }), (jt = u.onPartsFound) == null || jt.call(u, P.products), M.trackPartsViewed(
3295
- Array.isArray(P.products) ? P.products.length : 0,
3294
+ }), (jt = u.onPartsFound) == null || jt.call(u, O.products), M.trackPartsViewed(
3295
+ Array.isArray(O.products) ? O.products.length : 0,
3296
3296
  (Ie = z == null ? void 0 : z.vehicle_id) == null ? void 0 : Ie.toString()
3297
3297
  );
3298
3298
  continue;
3299
3299
  }
3300
- if (P.type === "no_parts_found") {
3300
+ if (O.type === "no_parts_found") {
3301
3301
  (kt = u.onPartsFound) == null || kt.call(u, []), ($e = u.onServicePackagesFound) == null || $e.call(u, []), k == null || k();
3302
3302
  continue;
3303
3303
  }
3304
- if (P.type === "audio_hint" && P.audio_url) {
3305
- console.log("[useBobChat] Audio hint received:", P.clip_key, P.audio_url), ce.current = P.audio_url;
3304
+ if (O.type === "audio_hint" && O.audio_url) {
3305
+ console.log("[useBobChat] Audio hint received:", O.clip_key, O.audio_url), ce.current = O.audio_url;
3306
3306
  continue;
3307
3307
  }
3308
- if (P.type === "bob_searching" && P.audio_url) {
3309
- console.log("[useBobChat] Bob searching:", P.search_type, P.clip_key), Oe.current.push(P.audio_url), !he.current && !v && Ce();
3308
+ if (O.type === "bob_searching" && O.audio_url) {
3309
+ console.log("[useBobChat] Bob searching:", O.search_type, O.clip_key), Pe.current.push(O.audio_url), !he.current && !v && Ce();
3310
3310
  continue;
3311
3311
  }
3312
- if (P.type === "cart_updated" && P.items) {
3313
- (Ae = u.onCartUpdated) == null || Ae.call(u, P.items);
3312
+ if (O.type === "cart_updated" && O.items) {
3313
+ (Ae = u.onCartUpdated) == null || Ae.call(u, O.items);
3314
3314
  continue;
3315
3315
  }
3316
- const re = (at = (St = (it = P.choices) == null ? void 0 : it[0]) == null ? void 0 : St.delta) == null ? void 0 : at.content;
3316
+ const re = (at = (St = (it = O.choices) == null ? void 0 : it[0]) == null ? void 0 : St.delta) == null ? void 0 : at.content;
3317
3317
  if (re) {
3318
3318
  ot += re;
3319
3319
  let pe = ot.replace(/\[VEHICLE_CONFIRMED:\{[\s\S]*?\}\]/g, "");
3320
3320
  pe = os(pe), W((le) => {
3321
- const ae = le[le.length - 1];
3322
- return (ae == null ? void 0 : ae.role) === "assistant" ? le.map(
3321
+ const oe = le[le.length - 1];
3322
+ return (oe == null ? void 0 : oe.role) === "assistant" ? le.map(
3323
3323
  (ye, Ue) => Ue === le.length - 1 ? { ...ye, content: pe } : ye
3324
3324
  ) : [...le, { role: "assistant", content: pe }];
3325
3325
  }), (Be = u.onBobMessage) == null || Be.call(u, pe);
@@ -3331,48 +3331,48 @@ const os = (t) => {
3331
3331
  }
3332
3332
  }
3333
3333
  }
3334
- let ir = ot.replace(/\[VEHICLE_CONFIRMED:\{[\s\S]*?\}\]/g, "");
3335
- ir = os(ir), $.current = ir;
3336
- const ar = Bs.some(
3334
+ let ar = ot.replace(/\[VEHICLE_CONFIRMED:\{[\s\S]*?\}\]/g, "");
3335
+ ar = os(ar), $.current = ar;
3336
+ const or = Bs.some(
3337
3337
  (T) => ot.toLowerCase().includes(T.toLowerCase())
3338
3338
  ), Dr = ot.toLowerCase();
3339
3339
  for (const T of fi)
3340
3340
  if (Dr.includes(T.toLowerCase())) {
3341
- const O = T.replace(/s\s*$/i, "").toUpperCase();
3342
- j == null || j(O);
3341
+ const P = T.replace(/s\s*$/i, "").toUpperCase();
3342
+ j == null || j(P);
3343
3343
  break;
3344
3344
  }
3345
3345
  const a = ot.match(/(?:go with|recommend|suggest|grab|try)\s+(?:the\s+)?(\w+)\s+(?:at|for)\s+\$(\d+(?:\.\d{2})?)/i);
3346
3346
  if (a) {
3347
- const [, T, O] = a;
3348
- x == null || x({ brand: T, price: parseFloat(O) });
3347
+ const [, T, P] = a;
3348
+ x == null || x({ brand: T, price: parseFloat(P) });
3349
3349
  }
3350
3350
  if (!v && $.current.trim()) {
3351
3351
  if (F.current = !1, Te(), ce.current) {
3352
3352
  console.log("[BobWidget] Playing canned audio:", ce.current);
3353
3353
  const T = new Audio(ce.current);
3354
3354
  T.onplay = () => {
3355
- console.log("[BobWidget] Canned audio STARTED"), F.current = !0, f == null || f(), e || se(r);
3355
+ console.log("[BobWidget] Canned audio STARTED"), F.current = !0, p == null || p(), e || se(r);
3356
3356
  }, T.onended = () => {
3357
- console.log("[BobWidget] Canned audio ENDED"), Te(), e || (ar && w ? w() : b ? b() : (se(i), setTimeout(() => se(d), 3e3)));
3357
+ console.log("[BobWidget] Canned audio ENDED"), Te(), e || (or && w ? w() : b ? b() : (se(i), setTimeout(() => se(d), 3e3)));
3358
3358
  }, T.onerror = () => {
3359
3359
  console.error("[BobWidget] Canned audio failed, falling back to TTS");
3360
- const O = $r($.current);
3361
- ke(O);
3360
+ const P = $r($.current);
3361
+ ke(P);
3362
3362
  }, T.play().catch(() => {
3363
3363
  console.error("[BobWidget] Canned audio autoplay blocked, falling back to TTS");
3364
- const O = $r($.current);
3365
- ke(O);
3364
+ const P = $r($.current);
3365
+ ke(P);
3366
3366
  }), ce.current = null;
3367
3367
  } else {
3368
3368
  const T = $r($.current);
3369
3369
  ke(T);
3370
3370
  }
3371
3371
  D.current = setTimeout(() => {
3372
- F.current || (console.warn("[BobWidget] Speech fallback after 2s"), f == null || f(), e || (ar && w ? w() : b ? b() : (se(i), setTimeout(() => se(d), 3e3))));
3372
+ F.current || (console.warn("[BobWidget] Speech fallback after 2s"), p == null || p(), e || (or && w ? w() : b ? b() : (se(i), setTimeout(() => se(d), 3e3))));
3373
3373
  }, 2e3);
3374
3374
  } else
3375
- f == null || f(), e || (ar && w ? w() : b ? b() : (se(i), setTimeout(() => se(d), 3e3)));
3375
+ p == null || p(), e || (or && w ? w() : b ? b() : (se(i), setTimeout(() => se(d), 3e3)));
3376
3376
  } catch (be) {
3377
3377
  console.error("[BobWidget] Chat error:", be);
3378
3378
  const Le = be instanceof Error ? be : new Error("Unknown error");
@@ -3388,7 +3388,7 @@ const os = (t) => {
3388
3388
  W((Se) => [...Se, G]), E(""), M.trackMessageSent(m.length, !!z);
3389
3389
  const fe = m.toLowerCase();
3390
3390
  if (hi.some((Se) => fe.includes(Se))) {
3391
- const Se = `G'day mate! I'm running Bob v${vr} - she's running sweet as! Anything else I can help ya with?`;
3391
+ const Se = `G'day mate! I'm running Bob v${er} - she's running sweet as! Anything else I can help ya with?`;
3392
3392
  W((nt) => [...nt, { role: "assistant", content: Se }]), v || ke(Se);
3393
3393
  return;
3394
3394
  }
@@ -3419,7 +3419,7 @@ const os = (t) => {
3419
3419
  toggleMute: () => {
3420
3420
  H((G) => !G), v || ee();
3421
3421
  },
3422
- isSpeaking: Pe,
3422
+ isSpeaking: Oe,
3423
3423
  identifiedVehicle: z,
3424
3424
  clearVehicle: () => {
3425
3425
  Z(null);
@@ -3433,7 +3433,7 @@ const os = (t) => {
3433
3433
  activeLookId: null
3434
3434
  }, mi = (t) => {
3435
3435
  const e = an(), r = kr();
3436
- return oe(() => {
3436
+ return ae(() => {
3437
3437
  if (!r) return;
3438
3438
  const n = r.channel("animation-states-changes").on("postgres_changes", {
3439
3439
  event: "*",
@@ -3472,9 +3472,9 @@ const os = (t) => {
3472
3472
  if (b) throw b;
3473
3473
  const { data: w, error: h } = await r.from("bob_animations").select("*").eq("is_active", !0).eq("look_id", d).order("animation_state").order("sequence_order");
3474
3474
  if (h) throw h;
3475
- const f = new Set((c || []).map((g) => g.state_key)), j = (w || []).filter((g) => f.has(g.animation_state)), { data: x, error: k } = await r.storage.from("bob-images").list();
3475
+ const p = new Set((c || []).map((g) => g.state_key)), j = (w || []).filter((g) => p.has(g.animation_state)), { data: x, error: k } = await r.storage.from("bob-images").list();
3476
3476
  if (k) throw k;
3477
- const p = (x || []).map((g) => {
3477
+ const f = (x || []).map((g) => {
3478
3478
  const { data: y } = r.storage.from("bob-images").getPublicUrl(g.name);
3479
3479
  return y.publicUrl;
3480
3480
  });
@@ -3484,7 +3484,7 @@ const os = (t) => {
3484
3484
  }), {
3485
3485
  states: c || [],
3486
3486
  configs: j,
3487
- uploadedImages: p,
3487
+ uploadedImages: f,
3488
3488
  looks: n || [],
3489
3489
  activeLookId: d
3490
3490
  };
@@ -3493,7 +3493,7 @@ const os = (t) => {
3493
3493
  gcTime: 5 * 60 * 1e3
3494
3494
  });
3495
3495
  }, xi = (t = {}) => {
3496
- const { isSpeaking: e = !1 } = t, [r, n] = J(""), [i, l] = J(0), [d, c] = J(400), [b, w] = J(!1), h = K(null), f = K(0), j = K(e), x = K(0), k = K(0), p = K(!1), _ = K(0), { data: g, isLoading: y } = mi(), u = K({}), { imageUrlsMap: S, alternateImages: C, offsetsMap: M, scalesMap: U, availableStates: I } = Dt(() => {
3496
+ const { isSpeaking: e = !1 } = t, [r, n] = J(""), [i, l] = J(0), [d, c] = J(400), [b, w] = J(!1), h = K(null), p = K(0), j = K(e), x = K(0), k = K(0), f = K(!1), _ = K(0), { data: g, isLoading: y } = mi(), u = K({}), { imageUrlsMap: S, alternateImages: C, offsetsMap: M, scalesMap: U, availableStates: I } = Dt(() => {
3497
3497
  if (!g)
3498
3498
  return {
3499
3499
  imageUrlsMap: {},
@@ -3522,9 +3522,9 @@ const os = (t) => {
3522
3522
  availableStates: Z
3523
3523
  };
3524
3524
  }, [g]);
3525
- oe(() => {
3525
+ ae(() => {
3526
3526
  u.current = S;
3527
- }, [S]), oe(() => {
3527
+ }, [S]), ae(() => {
3528
3528
  const R = j.current;
3529
3529
  if (j.current = e, R && !e) {
3530
3530
  const v = r.toLowerCase();
@@ -3532,23 +3532,23 @@ const os = (t) => {
3532
3532
  }
3533
3533
  }, [e, r]);
3534
3534
  const W = q((R) => {
3535
- n((v) => v === R ? v : (x.current = 0, k.current = 0, p.current = !1, l(0), R));
3535
+ n((v) => v === R ? v : (x.current = 0, k.current = 0, f.current = !1, l(0), R));
3536
3536
  }, []);
3537
- oe(() => {
3537
+ ae(() => {
3538
3538
  I.length > 0 && !r && n(I[0]);
3539
- }, [I, r]), oe(() => {
3539
+ }, [I, r]), ae(() => {
3540
3540
  const R = C[r];
3541
- if (h.current !== null && (cancelAnimationFrame(h.current), h.current = null), x.current = 0, k.current = 0, p.current = !1, f.current = 0, l(0), !R || R.length <= 1)
3541
+ if (h.current !== null && (cancelAnimationFrame(h.current), h.current = null), x.current = 0, k.current = 0, f.current = !1, p.current = 0, l(0), !R || R.length <= 1)
3542
3542
  return;
3543
3543
  const v = u.current[r], H = (v == null ? void 0 : v.animation_speed) || d || 400, z = (v == null ? void 0 : v.loop_count) || 0, Z = (v == null ? void 0 : v.pause_duration) || 0, Q = r.toLowerCase().includes("talk"), B = (L) => {
3544
- if (f.current === 0 && (f.current = L), p.current) {
3545
- L - _.current >= Z && (p.current = !1, k.current = 0, f.current = L), h.current = requestAnimationFrame(B);
3544
+ if (p.current === 0 && (p.current = L), f.current) {
3545
+ L - _.current >= Z && (f.current = !1, k.current = 0, p.current = L), h.current = requestAnimationFrame(B);
3546
3546
  return;
3547
3547
  }
3548
- if (L - f.current >= H) {
3549
- f.current = L;
3548
+ if (L - p.current >= H) {
3549
+ p.current = L;
3550
3550
  const F = (x.current + 1) % R.length;
3551
- F === 0 ? (k.current++, Q && j.current ? (x.current = F, l(F)) : z > 0 && k.current >= z ? Z > 0 && (p.current = !0, _.current = L) : (x.current = F, l(F))) : (x.current = F, l(F));
3551
+ F === 0 ? (k.current++, Q && j.current ? (x.current = F, l(F)) : z > 0 && k.current >= z ? Z > 0 && (f.current = !0, _.current = L) : (x.current = F, l(F))) : (x.current = F, l(F));
3552
3552
  }
3553
3553
  h.current = requestAnimationFrame(B);
3554
3554
  };
@@ -3932,11 +3932,11 @@ const Rr = ({
3932
3932
  onAddToCart: r,
3933
3933
  isRecommended: n = !1
3934
3934
  }) => {
3935
- const [i, l] = Lt.useState(!1), [d, c] = Lt.useState(!1), b = t.image_url || t.image || (t.sku ? Br.productImage(t.sku) : null), w = t.brand ? Br.brandLogo(t.brand) : null, h = t.brand || "Quality Part", f = t.name || "Product", j = t.price ?? 0, x = t.partNumber || t.part_number, k = ji({
3935
+ const [i, l] = Lt.useState(!1), [d, c] = Lt.useState(!1), b = t.image_url || t.image || (t.sku ? Br.productImage(t.sku) : null), w = t.brand ? Br.brandLogo(t.brand) : null, h = t.brand || "Quality Part", p = t.name || "Product", j = t.price ?? 0, x = t.partNumber || t.part_number, k = ji({
3936
3936
  name: t.name,
3937
3937
  partslotDescription: t.partslotDescription,
3938
3938
  per_car_qty: t.quantity
3939
- }), { displayPrice: p, unitPriceLabel: _ } = ki(j, k);
3939
+ }), { displayPrice: f, unitPriceLabel: _ } = ki(j, k);
3940
3940
  return /* @__PURE__ */ s.jsxs(
3941
3941
  "div",
3942
3942
  {
@@ -4011,7 +4011,7 @@ const Rr = ({
4011
4011
  "img",
4012
4012
  {
4013
4013
  src: b,
4014
- alt: f,
4014
+ alt: p,
4015
4015
  style: {
4016
4016
  width: "100%",
4017
4017
  height: "100%",
@@ -4077,7 +4077,7 @@ const Rr = ({
4077
4077
  lineHeight: "1.4",
4078
4078
  marginBottom: "8px"
4079
4079
  },
4080
- children: f
4080
+ children: p
4081
4081
  }
4082
4082
  ),
4083
4083
  /* @__PURE__ */ s.jsxs(
@@ -4130,7 +4130,7 @@ const Rr = ({
4130
4130
  fontWeight: Ve.priceMain.fontWeight,
4131
4131
  color: V.foreground
4132
4132
  },
4133
- children: Tt(p)
4133
+ children: Tt(f)
4134
4134
  }
4135
4135
  ),
4136
4136
  _ && /* @__PURE__ */ s.jsx(
@@ -4208,7 +4208,7 @@ const Rr = ({
4208
4208
  chatEndRef: b,
4209
4209
  isMuted: w = !1,
4210
4210
  onToggleMute: h,
4211
- isSpeaking: f = !1,
4211
+ isSpeaking: p = !1,
4212
4212
  className: j = "",
4213
4213
  onAddToCart: x,
4214
4214
  onProductClick: k
@@ -4228,7 +4228,7 @@ const Rr = ({
4228
4228
  "input",
4229
4229
  {
4230
4230
  value: e,
4231
- onChange: (p) => r(p.target.value),
4231
+ onChange: (f) => r(f.target.value),
4232
4232
  onKeyPress: l,
4233
4233
  onFocus: d,
4234
4234
  onBlur: c,
@@ -4295,33 +4295,33 @@ const Rr = ({
4295
4295
  height: "400px",
4296
4296
  background: "rgba(0,0,0,0.1)"
4297
4297
  }, children: [
4298
- [...t].reverse().map((p, _) => {
4298
+ [...t].reverse().map((f, _) => {
4299
4299
  var g;
4300
4300
  return /* @__PURE__ */ s.jsx(
4301
4301
  "div",
4302
4302
  {
4303
- style: { display: "flex", flexDirection: "column", alignItems: p.role === "user" ? "flex-end" : "flex-start" },
4303
+ style: { display: "flex", flexDirection: "column", alignItems: f.role === "user" ? "flex-end" : "flex-start" },
4304
4304
  children: /* @__PURE__ */ s.jsxs(
4305
4305
  "div",
4306
4306
  {
4307
4307
  style: {
4308
- maxWidth: (g = p.suggestedProducts) != null && g.length ? "100%" : "80%",
4308
+ maxWidth: (g = f.suggestedProducts) != null && g.length ? "100%" : "80%",
4309
4309
  borderRadius: "16px",
4310
4310
  padding: "12px 16px",
4311
4311
  fontSize: "14px",
4312
- backgroundColor: p.role === "user" ? "linear-gradient(135deg, rgba(0, 102, 204, 0.9), rgba(0, 73, 153, 1))" : "rgba(255,255,255,0.1)",
4313
- background: p.role === "user" ? "linear-gradient(135deg, rgba(0, 102, 204, 0.9), rgba(0, 73, 153, 1))" : "rgba(255,255,255,0.08)",
4312
+ backgroundColor: f.role === "user" ? "linear-gradient(135deg, rgba(0, 102, 204, 0.9), rgba(0, 73, 153, 1))" : "rgba(255,255,255,0.1)",
4313
+ background: f.role === "user" ? "linear-gradient(135deg, rgba(0, 102, 204, 0.9), rgba(0, 73, 153, 1))" : "rgba(255,255,255,0.08)",
4314
4314
  color: "white",
4315
4315
  border: "1px solid rgba(255,255,255,0.15)",
4316
4316
  boxShadow: "0 2px 8px rgba(0,0,0,0.2)"
4317
4317
  },
4318
4318
  children: [
4319
- p.content,
4320
- p.role === "assistant" && p.suggestedProducts && p.suggestedProducts.length > 0 && /* @__PURE__ */ s.jsx(
4319
+ f.content,
4320
+ f.role === "assistant" && f.suggestedProducts && f.suggestedProducts.length > 0 && /* @__PURE__ */ s.jsx(
4321
4321
  un,
4322
4322
  {
4323
- products: p.suggestedProducts,
4324
- title: p.suggestionsTitle,
4323
+ products: f.suggestedProducts,
4324
+ title: f.suggestionsTitle,
4325
4325
  onAddToCart: x,
4326
4326
  onProductClick: k
4327
4327
  }
@@ -4336,9 +4336,9 @@ const Rr = ({
4336
4336
  /* @__PURE__ */ s.jsx("div", { ref: b })
4337
4337
  ] })
4338
4338
  ] }) }), Ei = 768, Ti = 1024;
4339
- function Pr() {
4339
+ function Or() {
4340
4340
  const [t, e] = J("mobile");
4341
- return oe(() => {
4341
+ return ae(() => {
4342
4342
  const r = () => {
4343
4343
  const n = window.innerWidth;
4344
4344
  n >= Ti ? e("desktop") : n >= Ei ? e("tablet") : e("mobile");
@@ -4347,7 +4347,7 @@ function Pr() {
4347
4347
  }, []), t;
4348
4348
  }
4349
4349
  function fs() {
4350
- const t = Pr();
4350
+ const t = Or();
4351
4351
  return Ni(t);
4352
4352
  }
4353
4353
  function Ni(t) {
@@ -4402,7 +4402,7 @@ const ps = ({
4402
4402
  verticalOffset: d = 0,
4403
4403
  hasArrived: c = !0
4404
4404
  }) => {
4405
- const b = fs(), h = 95 * i / 100, f = 550 * i / 100, j = () => {
4405
+ const b = fs(), h = 95 * i / 100, p = 550 * i / 100, j = () => {
4406
4406
  switch (l) {
4407
4407
  case "center":
4408
4408
  return "50%";
@@ -4413,7 +4413,7 @@ const ps = ({
4413
4413
  default:
4414
4414
  return "50%";
4415
4415
  }
4416
- }, x = () => l === "center" ? "translateX(-50%)" : "translateX(0)", k = n - 2 + d, p = () => l === "hidden" ? "all 0.35s cubic-bezier(0.4, 0, 0.2, 1)" : "all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1)";
4416
+ }, x = () => l === "center" ? "translateX(-50%)" : "translateX(0)", k = n - 2 + d, f = () => l === "hidden" ? "all 0.35s cubic-bezier(0.4, 0, 0.2, 1)" : "all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1)";
4417
4417
  return /* @__PURE__ */ s.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: { overflow: "visible" }, children: [
4418
4418
  /* @__PURE__ */ s.jsx(
4419
4419
  "div",
@@ -4425,8 +4425,8 @@ const ps = ({
4425
4425
  maxHeight: `${100 - n - 2}%`,
4426
4426
  transform: x(),
4427
4427
  width: `${h}%`,
4428
- maxWidth: `${f}px`,
4429
- transition: p() + ", opacity 0.6s ease-out",
4428
+ maxWidth: `${p}px`,
4429
+ transition: f() + ", opacity 0.6s ease-out",
4430
4430
  willChange: "transform, left, opacity",
4431
4431
  opacity: c ? 1 : 0
4432
4432
  },
@@ -4470,7 +4470,7 @@ const ps = ({
4470
4470
  border: "1px solid rgba(255, 255, 255, 0.4)",
4471
4471
  borderRadius: "32px",
4472
4472
  boxShadow: "0 12px 48px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255,255,255,0.15), inset 0 1px 0 rgba(255,255,255,0.2)"
4473
- }, Os = {
4473
+ }, Ps = {
4474
4474
  background: "linear-gradient(135deg, rgba(255, 149, 0, 0.95) 0%, rgba(230, 134, 0, 1) 100%)",
4475
4475
  backdropFilter: "blur(12px) saturate(180%)",
4476
4476
  WebkitBackdropFilter: "blur(12px) saturate(180%)",
@@ -4491,7 +4491,7 @@ const ps = ({
4491
4491
  border: "1px solid rgba(255, 255, 255, 0.2)",
4492
4492
  borderRadius: "28px",
4493
4493
  boxShadow: "0 10px 40px rgba(0, 0, 0, 0.3)"
4494
- }, hr = {
4494
+ }, fr = {
4495
4495
  primary: {
4496
4496
  color: "rgba(255, 255, 255, 1)",
4497
4497
  textShadow: "0 1px 3px rgba(0,0,0,0.5)"
@@ -4585,7 +4585,7 @@ const ps = ({
4585
4585
  style: {
4586
4586
  fontSize: "16px",
4587
4587
  letterSpacing: "-0.01em",
4588
- ...hr.primary
4588
+ ...fr.primary
4589
4589
  },
4590
4590
  children: t.name
4591
4591
  }
@@ -4624,7 +4624,7 @@ const ps = ({
4624
4624
  onClick: c,
4625
4625
  className: "flex-shrink-0 flex items-center justify-center glass-button",
4626
4626
  style: {
4627
- ...Os,
4627
+ ...Ps,
4628
4628
  width: "56px",
4629
4629
  height: "56px",
4630
4630
  transition: "transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease-out"
@@ -4633,7 +4633,7 @@ const ps = ({
4633
4633
  w.currentTarget.style.transform = "scale(1.08) translateY(-2px)", w.currentTarget.style.boxShadow = "0 14px 48px rgba(255, 149, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.4)";
4634
4634
  },
4635
4635
  onMouseLeave: (w) => {
4636
- w.currentTarget.style.transform = "scale(1) translateY(0)", w.currentTarget.style.boxShadow = Os.boxShadow;
4636
+ w.currentTarget.style.transform = "scale(1) translateY(0)", w.currentTarget.style.boxShadow = Ps.boxShadow;
4637
4637
  },
4638
4638
  children: /* @__PURE__ */ s.jsx("svg", { className: "w-6 h-6 text-white", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ s.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2.5, d: "M12 4v16m8-8H4" }) })
4639
4639
  }
@@ -4657,7 +4657,7 @@ const ps = ({
4657
4657
  ]
4658
4658
  }
4659
4659
  );
4660
- }, Ps = (t, e) => {
4660
+ }, Os = (t, e) => {
4661
4661
  if (!t || !e) return !1;
4662
4662
  const r = t.toLowerCase();
4663
4663
  return e.toLowerCase().replace(/s\b/g, "").split(/\s+/).filter(Boolean).every((i) => r.includes(i));
@@ -4665,7 +4665,7 @@ const ps = ({
4665
4665
  var i;
4666
4666
  const r = ((i = t.brand) == null ? void 0 : i.toLowerCase()) === e.brand.toLowerCase(), n = Math.abs(t.price - e.price) < 1;
4667
4667
  return r && n;
4668
- }, Oi = ({ product: t, isSpotlighted: e, spotlightedRef: r, onProductClick: n, viewportSize: i }) => i === "desktop" ? /* @__PURE__ */ s.jsxs(
4668
+ }, Pi = ({ product: t, isSpotlighted: e, spotlightedRef: r, onProductClick: n, viewportSize: i }) => i === "desktop" ? /* @__PURE__ */ s.jsxs(
4669
4669
  "div",
4670
4670
  {
4671
4671
  ref: e ? r : void 0,
@@ -4761,12 +4761,12 @@ const ps = ({
4761
4761
  hasVehicle: w = !1,
4762
4762
  onAddToCart: h
4763
4763
  }) => {
4764
- const f = Pr();
4764
+ const p = Or();
4765
4765
  fs();
4766
- const j = K(null), x = K({}), k = K(null), p = 30, _ = 20, [g, y] = J(p), u = K(null), [S, C] = J(null), [M, U] = J({});
4767
- oe(() => {
4768
- y(p);
4769
- }, [t.length]), oe(() => {
4766
+ const j = K(null), x = K({}), k = K(null), f = 30, _ = 20, [g, y] = J(f), u = K(null), [S, C] = J(null), [M, U] = J({});
4767
+ ae(() => {
4768
+ y(f);
4769
+ }, [t.length]), ae(() => {
4770
4770
  if (!u.current) return;
4771
4771
  const L = new IntersectionObserver(
4772
4772
  ($) => {
@@ -4783,13 +4783,13 @@ const ps = ({
4783
4783
  L[D] || (L[D] = []), L[D].push(F);
4784
4784
  }), Object.keys(L).sort((F, D) => F.localeCompare(D)).map((F) => ({ name: F, products: L[F] }));
4785
4785
  }, [I]);
4786
- oe(() => {
4786
+ ae(() => {
4787
4787
  var L;
4788
4788
  if (r) {
4789
- const $ = W.find((F) => Ps(F.name, r));
4789
+ const $ = W.find((F) => Os(F.name, r));
4790
4790
  $ && x.current[$.name] && ((L = x.current[$.name]) == null || L.scrollIntoView({ behavior: "smooth", block: "start" }));
4791
4791
  }
4792
- }, [r, W]), oe(() => {
4792
+ }, [r, W]), ae(() => {
4793
4793
  n && k.current && k.current.scrollIntoView({ behavior: "smooth", block: "center" });
4794
4794
  }, [n]);
4795
4795
  const [m, E] = J(0), N = (L) => {
@@ -4798,7 +4798,7 @@ const ps = ({
4798
4798
  const D = $.scrollTop / F;
4799
4799
  E(Math.max(0, Math.min(1, D)));
4800
4800
  }
4801
- }, R = t.length > 0 || e.length > 0, v = d && !R, H = R && !v, z = c || R, Z = f === "mobile" ? 92 : f === "tablet" ? 65 : 48, Q = f === "desktop" ? "580px" : f === "tablet" ? "500px" : "100%", B = f === "mobile" ? `calc(${w ? "56px" : "8px"} + env(safe-area-inset-top, 4px))` : "6px";
4801
+ }, R = t.length > 0 || e.length > 0, v = d && !R, H = R && !v, z = c || R, Z = p === "mobile" ? 92 : p === "tablet" ? 65 : 48, Q = p === "desktop" ? "580px" : p === "tablet" ? "500px" : "100%", B = p === "mobile" ? `calc(${w ? "56px" : "8px"} + env(safe-area-inset-top, 4px))` : "6px";
4802
4802
  return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
4803
4803
  R && c && /* @__PURE__ */ s.jsx(
4804
4804
  "div",
@@ -4828,7 +4828,7 @@ const ps = ({
4828
4828
  right: "0",
4829
4829
  left: "auto",
4830
4830
  top: B,
4831
- bottom: f === "mobile" ? "calc(180px + env(safe-area-inset-bottom, 0px))" : "52px",
4831
+ bottom: p === "mobile" ? "calc(180px + env(safe-area-inset-bottom, 0px))" : "52px",
4832
4832
  paddingTop: "4px",
4833
4833
  paddingRight: "6px",
4834
4834
  paddingLeft: "12px",
@@ -4853,7 +4853,7 @@ const ps = ({
4853
4853
  children: /* @__PURE__ */ s.jsxs("div", { className: "flex items-center justify-between", children: [
4854
4854
  /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-2", children: [
4855
4855
  d && R ? /* @__PURE__ */ s.jsx("div", { className: "w-6 h-6 rounded-full flex items-center justify-center", style: { background: "rgba(255,255,255,0.2)" }, children: /* @__PURE__ */ s.jsx("div", { className: "w-3.5 h-3.5 border-2 border-white border-t-transparent rounded-full animate-spin" }) }) : /* @__PURE__ */ s.jsx("div", { className: "w-6 h-6 rounded-full flex items-center justify-center", style: { background: "rgba(255,255,255,0.2)" }, children: /* @__PURE__ */ s.jsx("svg", { className: "w-3.5 h-3.5 text-white", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ s.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2.5, d: "M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4" }) }) }),
4856
- /* @__PURE__ */ s.jsx("span", { style: { ...hr.primary, fontWeight: 700, fontSize: "14px", letterSpacing: "0.025em" }, children: d && R ? "Updating..." : "Bob's Shelf" })
4856
+ /* @__PURE__ */ s.jsx("span", { style: { ...fr.primary, fontWeight: 700, fontSize: "14px", letterSpacing: "0.025em" }, children: d && R ? "Updating..." : "Bob's Shelf" })
4857
4857
  ] }),
4858
4858
  /* @__PURE__ */ s.jsxs("span", { style: { color: "rgba(255,255,255,0.8)", fontSize: "12px", fontWeight: 500 }, children: [
4859
4859
  t.length + e.length,
@@ -4873,7 +4873,7 @@ const ps = ({
4873
4873
  children: /* @__PURE__ */ s.jsxs("div", { className: "flex flex-col items-center gap-3 text-center", children: [
4874
4874
  /* @__PURE__ */ s.jsx("div", { className: "w-10 h-10 rounded-full flex items-center justify-center", style: { background: "rgba(0, 102, 204, 0.2)" }, children: /* @__PURE__ */ s.jsx("div", { className: "w-6 h-6 border-2 border-t-transparent rounded-full animate-spin", style: { borderColor: "rgba(255,255,255,0.8)", borderTopColor: "transparent" } }) }),
4875
4875
  /* @__PURE__ */ s.jsxs("div", { children: [
4876
- /* @__PURE__ */ s.jsx("p", { style: { ...hr.primary, fontWeight: 600, fontSize: "14px" }, children: "Searching shelves..." }),
4876
+ /* @__PURE__ */ s.jsx("p", { style: { ...fr.primary, fontWeight: 600, fontSize: "14px" }, children: "Searching shelves..." }),
4877
4877
  /* @__PURE__ */ s.jsx("p", { style: { color: "rgba(255,255,255,0.6)", fontSize: "12px", marginTop: "2px" }, children: "Finding the best parts for you" })
4878
4878
  ] })
4879
4879
  ] })
@@ -4890,7 +4890,7 @@ const ps = ({
4890
4890
  children: /* @__PURE__ */ s.jsxs("div", { className: "flex flex-col items-center gap-3 text-center", children: [
4891
4891
  /* @__PURE__ */ s.jsx("div", { className: "w-10 h-10 rounded-full flex items-center justify-center", style: { background: "rgba(255, 149, 0, 0.3)" }, children: /* @__PURE__ */ s.jsx("svg", { className: "w-5 h-5", style: { color: "#FF9500" }, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ s.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }) }),
4892
4892
  /* @__PURE__ */ s.jsxs("div", { children: [
4893
- /* @__PURE__ */ s.jsx("p", { style: { ...hr.primary, fontWeight: 600, fontSize: "14px" }, children: "No products to display" }),
4893
+ /* @__PURE__ */ s.jsx("p", { style: { ...fr.primary, fontWeight: 600, fontSize: "14px" }, children: "No products to display" }),
4894
4894
  /* @__PURE__ */ s.jsxs("p", { style: { color: "rgba(255,255,255,0.6)", fontSize: "12px", marginTop: "2px" }, children: [
4895
4895
  "Products: ",
4896
4896
  t.length,
@@ -4953,7 +4953,7 @@ const ps = ({
4953
4953
  $.length > 0 && /* @__PURE__ */ s.jsxs("div", { className: "p-3", children: [
4954
4954
  /* @__PURE__ */ s.jsx("p", { className: "text-xs font-semibold uppercase tracking-wide mb-2 px-1", style: { color: V.mutedForeground }, children: "Choose Your Value Level" }),
4955
4955
  /* @__PURE__ */ s.jsx("div", { className: "grid gap-2", style: { gridTemplateColumns: `repeat(${Math.min($.length, 4)}, 1fr)` }, children: $.map((ee) => {
4956
- const Pe = ls[ee.tierName], Me = ee.tierName === D;
4956
+ const Oe = ls[ee.tierName], Me = ee.tierName === D;
4957
4957
  return /* @__PURE__ */ s.jsxs(
4958
4958
  "div",
4959
4959
  {
@@ -4973,8 +4973,8 @@ const ps = ({
4973
4973
  children: "Recommended"
4974
4974
  }
4975
4975
  ),
4976
- /* @__PURE__ */ s.jsxs("p", { className: "text-sm font-bold mt-1", style: { color: (Pe == null ? void 0 : Pe.textColor) || V.foreground }, children: [
4977
- Pe == null ? void 0 : Pe.emoji,
4976
+ /* @__PURE__ */ s.jsxs("p", { className: "text-sm font-bold mt-1", style: { color: (Oe == null ? void 0 : Oe.textColor) || V.foreground }, children: [
4977
+ Oe == null ? void 0 : Oe.emoji,
4978
4978
  " ",
4979
4979
  ee.displayName
4980
4980
  ] }),
@@ -5126,7 +5126,7 @@ const ps = ({
5126
5126
  })
5127
5127
  ] }),
5128
5128
  H && W.map(({ name: L, products: $ }) => {
5129
- const F = r && Ps(L, r);
5129
+ const F = r && Os(L, r);
5130
5130
  return /* @__PURE__ */ s.jsxs(
5131
5131
  "section",
5132
5132
  {
@@ -5187,15 +5187,15 @@ const ps = ({
5187
5187
  }
5188
5188
  ),
5189
5189
  /* @__PURE__ */ s.jsx("div", { className: "p-3 flex flex-col gap-3", children: $.map((D, ce) => {
5190
- const Oe = !!(n && Bi(D, n));
5190
+ const Pe = !!(n && Bi(D, n));
5191
5191
  return /* @__PURE__ */ s.jsx(
5192
- Oi,
5192
+ Pi,
5193
5193
  {
5194
5194
  product: D,
5195
- isSpotlighted: Oe,
5195
+ isSpotlighted: Pe,
5196
5196
  spotlightedRef: k,
5197
5197
  onProductClick: i,
5198
- viewportSize: f
5198
+ viewportSize: p
5199
5199
  },
5200
5200
  `${D.id}-${ce}`
5201
5201
  );
@@ -5233,39 +5233,39 @@ const ps = ({
5233
5233
  language: r = "en-NZ",
5234
5234
  mode: n = "toggle"
5235
5235
  } = {}) => {
5236
- const [i, l] = J(!1), [d, c] = J(""), [b, w] = J(""), [h, f] = J(null), [j, x] = J(!1), k = K(null), p = K(""), _ = K(t), g = K(e), y = K(null), u = 15e3;
5237
- oe(() => {
5236
+ const [i, l] = J(!1), [d, c] = J(""), [b, w] = J(""), [h, p] = J(null), [j, x] = J(!1), k = K(null), f = K(""), _ = K(t), g = K(e), y = K(null), u = 15e3;
5237
+ ae(() => {
5238
5238
  _.current = t, g.current = e;
5239
- }, [t, e]), oe(() => {
5239
+ }, [t, e]), ae(() => {
5240
5240
  const U = window.SpeechRecognition || window.webkitSpeechRecognition;
5241
5241
  if (U) {
5242
5242
  x(!0);
5243
5243
  const I = new U();
5244
5244
  I.continuous = n === "ptt", I.interimResults = !0, I.lang = r, I.maxAlternatives = 1, I.onstart = () => {
5245
- l(!0), f(null);
5245
+ l(!0), p(null);
5246
5246
  }, I.onresult = (W) => {
5247
5247
  let m = "", E = "";
5248
5248
  for (let N = W.resultIndex; N < W.results.length; N++) {
5249
5249
  const R = W.results[N][0].transcript;
5250
5250
  W.results[N].isFinal ? E += R : m += R;
5251
5251
  }
5252
- E && (p.current = E, c(E), _.current && _.current(E)), w(m);
5252
+ E && (f.current = E, c(E), _.current && _.current(E)), w(m);
5253
5253
  }, I.onerror = (W) => {
5254
5254
  switch (l(!1), W.error) {
5255
5255
  case "no-speech":
5256
- f("No speech detected. Please try again.");
5256
+ p("No speech detected. Please try again.");
5257
5257
  break;
5258
5258
  case "audio-capture":
5259
- f("No microphone found. Please check your device.");
5259
+ p("No microphone found. Please check your device.");
5260
5260
  break;
5261
5261
  case "not-allowed":
5262
- f("Microphone permission denied. Please allow access.");
5262
+ p("Microphone permission denied. Please allow access.");
5263
5263
  break;
5264
5264
  default:
5265
- f("Speech recognition error. Please try again.");
5265
+ p("Speech recognition error. Please try again.");
5266
5266
  }
5267
5267
  }, I.onend = () => {
5268
- y.current && (clearTimeout(y.current), y.current = null), l(!1), w(""), p.current && g.current && g.current(p.current), p.current = "";
5268
+ y.current && (clearTimeout(y.current), y.current = null), l(!1), w(""), f.current && g.current && g.current(f.current), f.current = "";
5269
5269
  }, k.current = I;
5270
5270
  }
5271
5271
  return () => {
@@ -5273,7 +5273,7 @@ const ps = ({
5273
5273
  };
5274
5274
  }, [r, n]);
5275
5275
  const S = () => {
5276
- k.current && !i && (c(""), w(""), f(null), y.current = setTimeout(() => {
5276
+ k.current && !i && (c(""), w(""), p(null), y.current = setTimeout(() => {
5277
5277
  console.warn("[SpeechRecognition] Safety timeout - forcing stop after 15s"), k.current && k.current.abort(), l(!1), w("");
5278
5278
  }, u), k.current.start());
5279
5279
  }, C = () => {
@@ -5291,7 +5291,7 @@ const ps = ({
5291
5291
  i ? C() : S();
5292
5292
  }
5293
5293
  };
5294
- }, Pi = ({
5294
+ }, Oi = ({
5295
5295
  messages: t,
5296
5296
  input: e,
5297
5297
  setInput: r,
@@ -5303,12 +5303,12 @@ const ps = ({
5303
5303
  chatEndRef: b,
5304
5304
  isMuted: w = !1,
5305
5305
  onToggleMute: h,
5306
- isSpeaking: f = !1,
5306
+ isSpeaking: p = !1,
5307
5307
  onAddToCart: j,
5308
5308
  onProductClick: x
5309
5309
  }) => {
5310
5310
  var Q;
5311
- const [k, p] = J(!1), _ = K(null), g = K(!1), { bottomOffset: y, zIndexBase: u } = ln(), {
5311
+ const [k, f] = J(!1), _ = K(null), g = K(!1), { bottomOffset: y, zIndexBase: u } = ln(), {
5312
5312
  isListening: S,
5313
5313
  interimTranscript: C,
5314
5314
  error: M,
@@ -5320,7 +5320,7 @@ const ps = ({
5320
5320
  language: "en-NZ",
5321
5321
  mode: "ptt"
5322
5322
  });
5323
- oe(() => {
5323
+ ae(() => {
5324
5324
  C && r(C);
5325
5325
  }, [C, r]);
5326
5326
  const m = q(() => {
@@ -5372,7 +5372,7 @@ const ps = ({
5372
5372
  /* @__PURE__ */ s.jsx(
5373
5373
  "button",
5374
5374
  {
5375
- onClick: () => p(!k),
5375
+ onClick: () => f(!k),
5376
5376
  style: {
5377
5377
  position: "absolute",
5378
5378
  top: "-20px",
@@ -5397,7 +5397,7 @@ const ps = ({
5397
5397
  !k && /* @__PURE__ */ s.jsx(
5398
5398
  "div",
5399
5399
  {
5400
- onClick: () => p(!0),
5400
+ onClick: () => f(!0),
5401
5401
  style: { padding: "8px 12px 2px 12px", cursor: "pointer" },
5402
5402
  children: /* @__PURE__ */ s.jsxs("p", { style: {
5403
5403
  fontSize: "12px",
@@ -5479,7 +5479,7 @@ const ps = ({
5479
5479
  fontSize: "22px",
5480
5480
  fontWeight: 800,
5481
5481
  letterSpacing: "0.15em",
5482
- ...hr.primary,
5482
+ ...fr.primary,
5483
5483
  textTransform: "uppercase",
5484
5484
  fontFamily: "system-ui, -apple-system, sans-serif"
5485
5485
  }, children: S ? "LISTENING" : "TALK" })
@@ -5505,7 +5505,7 @@ const ps = ({
5505
5505
  borderRadius: "12px",
5506
5506
  background: "rgba(255, 255, 255, 0.1)",
5507
5507
  backdropFilter: "blur(8px)",
5508
- color: f ? "#0066CC" : "rgba(255,255,255,0.7)",
5508
+ color: p ? "#0066CC" : "rgba(255,255,255,0.7)",
5509
5509
  cursor: "pointer",
5510
5510
  border: "1px solid rgba(255, 255, 255, 0.2)",
5511
5511
  minHeight: "unset",
@@ -5563,11 +5563,11 @@ const ps = ({
5563
5563
  isLoading: b,
5564
5564
  onSend: w,
5565
5565
  onKeyPress: h,
5566
- onInputFocus: f,
5566
+ onInputFocus: p,
5567
5567
  onInputBlur: j,
5568
5568
  chatEndRef: x,
5569
5569
  isMuted: k,
5570
- onToggleMute: p,
5570
+ onToggleMute: f,
5571
5571
  isSpeaking: _,
5572
5572
  products: g,
5573
5573
  servicePackages: y,
@@ -5586,7 +5586,7 @@ const ps = ({
5586
5586
  backdropUrl: (r == null ? void 0 : r.substring(0, 50)) || "NONE",
5587
5587
  counterOverlayUrl: (n == null ? void 0 : n.substring(0, 50)) || "NONE"
5588
5588
  });
5589
- const N = typeof window < "u" && window.self !== window.top, R = Pr(), [v, H] = J("center"), [z, Z] = J("hidden"), Q = g.length > 0 || y.length > 0, $ = (() => {
5589
+ const N = typeof window < "u" && window.self !== window.top, R = Or(), [v, H] = J("center"), [z, Z] = J("hidden"), Q = g.length > 0 || y.length > 0, $ = (() => {
5590
5590
  switch (R) {
5591
5591
  case "desktop":
5592
5592
  return 70;
@@ -5598,7 +5598,7 @@ const ps = ({
5598
5598
  return 140;
5599
5599
  }
5600
5600
  })() * E / 100;
5601
- oe(() => {
5601
+ ae(() => {
5602
5602
  if (U && z !== "loading" && z !== "visible")
5603
5603
  Z("loading"), v === "center" && H("left");
5604
5604
  else if (Q && z !== "visible")
@@ -5726,7 +5726,7 @@ const ps = ({
5726
5726
  }
5727
5727
  ),
5728
5728
  /* @__PURE__ */ s.jsx(
5729
- Pi,
5729
+ Oi,
5730
5730
  {
5731
5731
  messages: l,
5732
5732
  input: d,
@@ -5734,11 +5734,11 @@ const ps = ({
5734
5734
  isLoading: b,
5735
5735
  onSend: w,
5736
5736
  onKeyPress: h,
5737
- onInputFocus: f,
5737
+ onInputFocus: p,
5738
5738
  onInputBlur: j,
5739
5739
  chatEndRef: x,
5740
5740
  isMuted: k,
5741
- onToggleMute: p,
5741
+ onToggleMute: f,
5742
5742
  isSpeaking: _,
5743
5743
  onAddToCart: C,
5744
5744
  onProductClick: C
@@ -5759,9 +5759,9 @@ const ps = ({
5759
5759
  chatEndRef: b,
5760
5760
  isMuted: w = !1,
5761
5761
  onToggleMute: h,
5762
- isSpeaking: f = !1
5762
+ isSpeaking: p = !1
5763
5763
  }) => {
5764
- const [j, x] = J(!1), k = K(null), p = K(!1), { bottomOffset: _, zIndexBase: g } = ln(), {
5764
+ const [j, x] = J(!1), k = K(null), f = K(!1), { bottomOffset: _, zIndexBase: g } = ln(), {
5765
5765
  isListening: y,
5766
5766
  interimTranscript: u,
5767
5767
  error: S,
@@ -5773,13 +5773,13 @@ const ps = ({
5773
5773
  language: "en-NZ",
5774
5774
  mode: "ptt"
5775
5775
  });
5776
- oe(() => {
5776
+ ae(() => {
5777
5777
  u && r(u);
5778
5778
  }, [u, r]);
5779
5779
  const I = q(() => {
5780
- n || p.current || (p.current = !0, navigator.vibrate && navigator.vibrate(30), M());
5780
+ n || f.current || (f.current = !0, navigator.vibrate && navigator.vibrate(30), M());
5781
5781
  }, [n, M]), W = q(() => {
5782
- p.current && (p.current = !1, navigator.vibrate && navigator.vibrate([20, 50, 20]), U(), setTimeout(() => {
5782
+ f.current && (f.current = !1, navigator.vibrate && navigator.vibrate([20, 50, 20]), U(), setTimeout(() => {
5783
5783
  i();
5784
5784
  }, 150));
5785
5785
  }, [U, i]), m = [...t].reverse().find((v) => v.role === "assistant"), E = m != null && m.content ? m.content.length > 50 ? m.content.slice(0, 50) + "..." : m.content : "Ask Bob about car parts...", N = {
@@ -5902,7 +5902,7 @@ const ps = ({
5902
5902
  borderRadius: "10px",
5903
5903
  background: "rgba(255, 255, 255, 0.1)",
5904
5904
  backdropFilter: "blur(8px)",
5905
- color: f ? "#0066CC" : "rgba(255,255,255,0.7)",
5905
+ color: p ? "#0066CC" : "rgba(255,255,255,0.7)",
5906
5906
  cursor: "pointer",
5907
5907
  border: "1px solid rgba(255, 255, 255, 0.2)",
5908
5908
  minHeight: "unset",
@@ -6148,7 +6148,7 @@ const ps = ({
6148
6148
  var j;
6149
6149
  const [i, l] = J(!1), d = Dt(() => !t.preparedTiers || t.preparedTiers.length === 0 ? [] : t.preparedTiers.filter((x) => !x.isHidden), [t.preparedTiers]), c = d.length > 0, b = (x) => {
6150
6150
  r == null || r(x.products);
6151
- }, w = (x) => x === 2 ? "grid-cols-2" : x === 3 ? "grid-cols-3" : "grid-cols-2", h = cn(t.title), f = ((j = d[0]) == null ? void 0 : j.productCount) || 0;
6151
+ }, w = (x) => x === 2 ? "grid-cols-2" : x === 3 ? "grid-cols-3" : "grid-cols-2", h = cn(t.title), p = ((j = d[0]) == null ? void 0 : j.productCount) || 0;
6152
6152
  return /* @__PURE__ */ s.jsxs("div", { className: "absolute inset-0 z-35 flex flex-col bg-[#FAFAFA] overflow-hidden", children: [
6153
6153
  /* @__PURE__ */ s.jsx("div", { className: "flex items-center gap-3 px-4 py-3 border-b border-[#E2E8F0] bg-white shadow-sm", children: /* @__PURE__ */ s.jsxs(
6154
6154
  "button",
@@ -6231,29 +6231,29 @@ const ps = ({
6231
6231
  /* @__PURE__ */ s.jsx("span", { className: "text-[10px] text-[#64748B] hidden md:block", children: x.description || (k == null ? void 0 : k.description) })
6232
6232
  ] })
6233
6233
  ] }),
6234
- /* @__PURE__ */ s.jsx("div", { className: "flex items-center gap-1.5 mb-3 min-h-[42px] flex-wrap", children: x.brands.slice(0, 3).map((p) => /* @__PURE__ */ s.jsx(
6234
+ /* @__PURE__ */ s.jsx("div", { className: "flex items-center gap-1.5 mb-3 min-h-[42px] flex-wrap", children: x.brands.slice(0, 3).map((f) => /* @__PURE__ */ s.jsx(
6235
6235
  "div",
6236
6236
  {
6237
6237
  className: "h-10 px-2 bg-white rounded-xl flex items-center justify-center shadow-md border border-[#F1F5F9]",
6238
6238
  children: /* @__PURE__ */ s.jsx(
6239
6239
  "img",
6240
6240
  {
6241
- src: p.imageUrl,
6242
- alt: p.fullName,
6241
+ src: f.imageUrl,
6242
+ alt: f.fullName,
6243
6243
  className: "h-6 w-auto object-contain",
6244
6244
  onError: (_) => {
6245
- const g = _.target, y = `${Br.storageBase}/brand_images/${p.fullName.replace(/\s+/g, "")}.jpg`;
6245
+ const g = _.target, y = `${Br.storageBase}/brand_images/${f.fullName.replace(/\s+/g, "")}.jpg`;
6246
6246
  if (g.src !== y)
6247
6247
  g.src = y;
6248
6248
  else {
6249
6249
  const u = g.parentElement;
6250
- u && (u.innerHTML = `<span class="text-[10px] font-medium text-slate-700 px-1 truncate max-w-[60px]">${p.name}</span>`);
6250
+ u && (u.innerHTML = `<span class="text-[10px] font-medium text-slate-700 px-1 truncate max-w-[60px]">${f.name}</span>`);
6251
6251
  }
6252
6252
  }
6253
6253
  }
6254
6254
  )
6255
6255
  },
6256
- p.name
6256
+ f.name
6257
6257
  )) }),
6258
6258
  /* @__PURE__ */ s.jsxs("p", { className: "text-xs text-[#64748B] hidden md:block mb-2", children: [
6259
6259
  x.productCount,
@@ -6308,9 +6308,9 @@ const ps = ({
6308
6308
  " View Product Details"
6309
6309
  ] }),
6310
6310
  /* @__PURE__ */ s.jsxs("span", { className: "text-xs text-[#64748B]", children: [
6311
- f,
6311
+ p,
6312
6312
  " product",
6313
- f !== 1 ? "s" : ""
6313
+ p !== 1 ? "s" : ""
6314
6314
  ] })
6315
6315
  ]
6316
6316
  }
@@ -6335,20 +6335,20 @@ const ps = ({
6335
6335
  " parts)"
6336
6336
  ] })
6337
6337
  ] }),
6338
- /* @__PURE__ */ s.jsx("div", { className: "space-y-2", children: x.products.map((p, _) => {
6338
+ /* @__PURE__ */ s.jsx("div", { className: "space-y-2", children: x.products.map((f, _) => {
6339
6339
  var u;
6340
- const g = (u = t.carfixValueProducts) == null ? void 0 : u.includes(p.sku), y = p.unitPrice ?? p.price;
6340
+ const g = (u = t.carfixValueProducts) == null ? void 0 : u.includes(f.sku), y = f.unitPrice ?? f.price;
6341
6341
  return /* @__PURE__ */ s.jsxs(
6342
6342
  "div",
6343
6343
  {
6344
6344
  className: "flex items-center gap-3 p-2.5 rounded-xl transition-all hover:bg-slate-50 cursor-pointer border border-[#E2E8F0]",
6345
- onClick: () => n == null ? void 0 : n(p.sku),
6345
+ onClick: () => n == null ? void 0 : n(f.sku),
6346
6346
  children: [
6347
6347
  /* @__PURE__ */ s.jsx("div", { className: "w-14 h-14 flex-shrink-0 rounded-lg bg-white overflow-hidden border border-[#E2E8F0]", children: /* @__PURE__ */ s.jsx(
6348
6348
  "img",
6349
6349
  {
6350
- src: p.productImageUrl || Br.productImage(p.sku),
6351
- alt: p.name,
6350
+ src: f.productImageUrl || Br.productImage(f.sku),
6351
+ alt: f.name,
6352
6352
  className: "w-full h-full object-contain p-1.5",
6353
6353
  onError: (S) => {
6354
6354
  S.target.src = "/placeholder.svg";
@@ -6357,7 +6357,7 @@ const ps = ({
6357
6357
  ) }),
6358
6358
  /* @__PURE__ */ s.jsxs("div", { className: "flex-1 min-w-0", children: [
6359
6359
  /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-1.5 flex-wrap", children: [
6360
- /* @__PURE__ */ s.jsx("span", { className: "text-xs font-semibold text-[#0F172A]", children: p.brandFullName || p.brand }),
6360
+ /* @__PURE__ */ s.jsx("span", { className: "text-xs font-semibold text-[#0F172A]", children: f.brandFullName || f.brand }),
6361
6361
  g && /* @__PURE__ */ s.jsx(
6362
6362
  "span",
6363
6363
  {
@@ -6369,7 +6369,7 @@ const ps = ({
6369
6369
  children: "CFX VALUE"
6370
6370
  }
6371
6371
  ),
6372
- p.isMultiQty && p.perCarQty > 1 && /* @__PURE__ */ s.jsxs(
6372
+ f.isMultiQty && f.perCarQty > 1 && /* @__PURE__ */ s.jsxs(
6373
6373
  "span",
6374
6374
  {
6375
6375
  className: "px-1.5 py-0.5 text-[8px] font-bold rounded-full",
@@ -6379,11 +6379,11 @@ const ps = ({
6379
6379
  },
6380
6380
  children: [
6381
6381
  "×",
6382
- p.perCarQty
6382
+ f.perCarQty
6383
6383
  ]
6384
6384
  }
6385
6385
  ),
6386
- p.isRotor && /* @__PURE__ */ s.jsx(
6386
+ f.isRotor && /* @__PURE__ */ s.jsx(
6387
6387
  "span",
6388
6388
  {
6389
6389
  className: "px-1.5 py-0.5 text-[8px] font-bold rounded-full",
@@ -6395,24 +6395,24 @@ const ps = ({
6395
6395
  }
6396
6396
  )
6397
6397
  ] }),
6398
- /* @__PURE__ */ s.jsx("p", { className: "text-xs text-[#64748B] line-clamp-1", children: p.name })
6398
+ /* @__PURE__ */ s.jsx("p", { className: "text-xs text-[#64748B] line-clamp-1", children: f.name })
6399
6399
  ] }),
6400
6400
  /* @__PURE__ */ s.jsxs("div", { className: "text-right flex-shrink-0", children: [
6401
- /* @__PURE__ */ s.jsx("p", { className: "text-sm font-bold text-[#0F172A]", children: Tt(p.displayPrice) }),
6402
- p.isMultiQty && p.perCarQty > 1 && /* @__PURE__ */ s.jsxs("p", { className: "text-[10px] text-[#64748B]", children: [
6403
- p.perCarQty,
6401
+ /* @__PURE__ */ s.jsx("p", { className: "text-sm font-bold text-[#0F172A]", children: Tt(f.displayPrice) }),
6402
+ f.isMultiQty && f.perCarQty > 1 && /* @__PURE__ */ s.jsxs("p", { className: "text-[10px] text-[#64748B]", children: [
6403
+ f.perCarQty,
6404
6404
  "× ",
6405
6405
  Tt(y),
6406
6406
  " each"
6407
6407
  ] }),
6408
- p.isRotor && !p.isMultiQty && /* @__PURE__ */ s.jsxs("p", { className: "text-[10px] text-[#64748B]", children: [
6408
+ f.isRotor && !f.isMultiQty && /* @__PURE__ */ s.jsxs("p", { className: "text-[10px] text-[#64748B]", children: [
6409
6409
  Tt(y),
6410
6410
  " each"
6411
6411
  ] })
6412
6412
  ] })
6413
6413
  ]
6414
6414
  },
6415
- `${p.sku}-${_}`
6415
+ `${f.sku}-${_}`
6416
6416
  );
6417
6417
  }) })
6418
6418
  ] }, x.tierName);
@@ -6444,11 +6444,11 @@ const ps = ({
6444
6444
  isLoading: b,
6445
6445
  onSend: w,
6446
6446
  onKeyPress: h,
6447
- onInputFocus: f,
6447
+ onInputFocus: p,
6448
6448
  onInputBlur: j,
6449
6449
  chatEndRef: x,
6450
6450
  isMuted: k,
6451
- onToggleMute: p,
6451
+ onToggleMute: f,
6452
6452
  isSpeaking: _,
6453
6453
  products: g,
6454
6454
  servicePackages: y,
@@ -6465,7 +6465,7 @@ const ps = ({
6465
6465
  bobScale: R = 100
6466
6466
  }) => {
6467
6467
  const [v, H] = J("center"), [z, Z] = J("hidden"), [Q, B] = J("products"), [L, $] = J(null), [F, D] = J(null), ce = g.length > 0 || y.length > 0, we = (Q === "productDetail" ? 70 : v === "center" && !ce ? 140 : 98) * R / 100;
6468
- oe(() => {
6468
+ ae(() => {
6469
6469
  if (U && z !== "loading" && z !== "visible")
6470
6470
  Z("loading"), v === "center" && H("left");
6471
6471
  else if (ce && z !== "visible")
@@ -6489,7 +6489,7 @@ const ps = ({
6489
6489
  $(null), D(null), B("products");
6490
6490
  }, ee = (se) => {
6491
6491
  console.log("[ContainedMobileBobLayout] Package selected:", se.title), D(se), B("packageDetail"), M == null || M(se);
6492
- }, Pe = z !== "hidden" && Q === "products", Me = z !== "hidden";
6492
+ }, Oe = z !== "hidden" && Q === "products", Me = z !== "hidden";
6493
6493
  return /* @__PURE__ */ s.jsxs(
6494
6494
  "div",
6495
6495
  {
@@ -6580,7 +6580,7 @@ const ps = ({
6580
6580
  onProductClick: Te,
6581
6581
  onPackageSelect: ee,
6582
6582
  isResearching: U,
6583
- visible: Pe,
6583
+ visible: Oe,
6584
6584
  counterHeightPercent: i,
6585
6585
  hasVehicle: !!m
6586
6586
  }
@@ -6614,11 +6614,11 @@ const ps = ({
6614
6614
  isLoading: b,
6615
6615
  onSend: w,
6616
6616
  onKeyPress: h,
6617
- onInputFocus: f,
6617
+ onInputFocus: p,
6618
6618
  onInputBlur: j,
6619
6619
  chatEndRef: x,
6620
6620
  isMuted: k,
6621
- onToggleMute: p,
6621
+ onToggleMute: f,
6622
6622
  isSpeaking: _
6623
6623
  }
6624
6624
  )
@@ -6637,14 +6637,14 @@ const ps = ({
6637
6637
  verticalOffset: b = 0,
6638
6638
  scale: w = 100
6639
6639
  }) => {
6640
- const { callbacks: h } = bt(), [f, j] = J(!1), {
6640
+ const { callbacks: h } = bt(), [p, j] = J(!1), {
6641
6641
  animationState: x,
6642
6642
  setAnimationState: k,
6643
- getCurrentImage: p,
6643
+ getCurrentImage: f,
6644
6644
  getCurrentOffset: _,
6645
6645
  getCurrentScale: g,
6646
6646
  availableStates: y
6647
- } = xi({ isSpeaking: f }), { activeBackdrop: u } = bi(), [S, C] = J([]), [M, U] = J([]), [I, W] = J(null), [m, E] = J(null), [N, R] = J(!1), v = pi({
6647
+ } = xi({ isSpeaking: p }), { activeBackdrop: u } = bi(), [S, C] = J([]), [M, U] = J([]), [I, W] = J(null), [m, E] = J(null), [N, R] = J(!1), v = pi({
6648
6648
  setAnimationState: k,
6649
6649
  manualMode: !1,
6650
6650
  onReadyToSpeak: () => {
@@ -6666,16 +6666,16 @@ const ps = ({
6666
6666
  R(!1);
6667
6667
  }
6668
6668
  });
6669
- oe(() => {
6669
+ ae(() => {
6670
6670
  j(v.isSpeaking);
6671
- }, [v.isSpeaking]), oe(() => {
6671
+ }, [v.isSpeaking]), ae(() => {
6672
6672
  const F = h.onPartsFound, D = h.onServicePackagesFound;
6673
6673
  return h.onPartsFound = (ce) => {
6674
6674
  if (R(!1), !ce || ce.length === 0) {
6675
6675
  console.log("[Bob] Clearing products (empty array received)"), C([]), F == null || F(ce);
6676
6676
  return;
6677
6677
  }
6678
- const Oe = ce.map((he, we) => ({
6678
+ const Pe = ce.map((he, we) => ({
6679
6679
  id: he.SKU || he.sku || `part-${we}`,
6680
6680
  name: he["Part Product Type"] || he.partslot_description || he.name || "Unknown Part",
6681
6681
  brand: he.Brand || he.brand,
@@ -6685,7 +6685,7 @@ const ps = ({
6685
6685
  partslotDescription: he["Part Product Type"] || he.partslot_description,
6686
6686
  image_url: he.image_url
6687
6687
  }));
6688
- console.log("[Bob] Products mapped and setting state:", Oe.length, "products"), C(Oe), F == null || F(ce);
6688
+ console.log("[Bob] Products mapped and setting state:", Pe.length, "products"), C(Pe), F == null || F(ce);
6689
6689
  }, h.onServicePackagesFound = (ce) => {
6690
6690
  if (!ce || ce.length === 0) {
6691
6691
  console.log("[Bob] Clearing service packages (empty array received)"), U([]), D == null || D(ce);
@@ -6696,7 +6696,7 @@ const ps = ({
6696
6696
  h.onPartsFound = F, h.onServicePackagesFound = D;
6697
6697
  };
6698
6698
  }, [h]);
6699
- const H = i || (u == null ? void 0 : u.image_url), z = l || (u == null ? void 0 : u.counter_overlay_url) || void 0, Z = d || (u == null ? void 0 : u.counter_height_percent) || 12, Q = p() || c || "", B = _(), L = g();
6699
+ const H = i || (u == null ? void 0 : u.image_url), z = l || (u == null ? void 0 : u.counter_overlay_url) || void 0, Z = d || (u == null ? void 0 : u.counter_height_percent) || 12, Q = f() || c || "", B = _(), L = g();
6700
6700
  if (t === "mobile" || t === "fullscreen")
6701
6701
  return /* @__PURE__ */ s.jsx(
6702
6702
  Mi,
@@ -6838,14 +6838,24 @@ const ps = ({
6838
6838
  backdropUrl: b,
6839
6839
  counterOverlayUrl: w,
6840
6840
  counterHeightPercent: h,
6841
- defaultBobImage: f,
6841
+ defaultBobImage: p,
6842
6842
  verticalOffset: j,
6843
6843
  scale: x,
6844
6844
  ga4Config: k,
6845
- analyticsEnabled: p = !0,
6845
+ analyticsEnabled: f = !0,
6846
6846
  bottomOffset: _ = 0,
6847
6847
  zIndexBase: g = 50
6848
- }) => /* @__PURE__ */ s.jsx("div", { className: "bob-widget-root", style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ s.jsx(
6848
+ }) => (ae(() => {
6849
+ console.log("[BobWidget] Initialized", {
6850
+ version: er,
6851
+ variant: i,
6852
+ bottomOffset: _,
6853
+ zIndexBase: g,
6854
+ bobConfigUrl: t.supabaseUrl,
6855
+ hostApiBaseUrl: e.baseUrl,
6856
+ analyticsEnabled: f
6857
+ });
6858
+ }, [i, _, g, t.supabaseUrl, e.baseUrl, f]), /* @__PURE__ */ s.jsx("div", { className: "bob-widget-root", style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ s.jsx(
6849
6859
  ii,
6850
6860
  {
6851
6861
  bobConfig: t,
@@ -6853,7 +6863,7 @@ const ps = ({
6853
6863
  hostContext: r,
6854
6864
  callbacks: n,
6855
6865
  ga4Config: k,
6856
- analyticsEnabled: p,
6866
+ analyticsEnabled: f,
6857
6867
  bottomOffset: _,
6858
6868
  zIndexBase: g,
6859
6869
  children: /* @__PURE__ */ s.jsx(
@@ -6866,13 +6876,13 @@ const ps = ({
6866
6876
  backdropUrl: b,
6867
6877
  counterOverlayUrl: w,
6868
6878
  counterHeightPercent: h,
6869
- defaultBobImage: f,
6879
+ defaultBobImage: p,
6870
6880
  verticalOffset: j,
6871
6881
  scale: x
6872
6882
  }
6873
6883
  )
6874
6884
  }
6875
- ) }), na = ({
6885
+ ) })), na = ({
6876
6886
  children: t,
6877
6887
  isSpeaking: e = !1,
6878
6888
  hasProducts: r = !1,
@@ -6880,15 +6890,15 @@ const ps = ({
6880
6890
  onPositionChange: i,
6881
6891
  currentPosition: l = "center"
6882
6892
  }) => {
6883
- const [d, c] = J(!1), [b, w] = J(0), h = K(null), f = K(0), j = K(0), x = K(!1), k = 0.25;
6884
- oe(() => {
6893
+ const [d, c] = J(!1), [b, w] = J(0), h = K(null), p = K(0), j = K(0), x = K(!1), k = 0.25;
6894
+ ae(() => {
6885
6895
  e && l === "hidden" && (i == null || i("partial-left"), n == null || n(!0));
6886
6896
  }, [e, l, i, n]);
6887
- const p = q((S) => {
6888
- f.current = S.touches[0].clientX, j.current = S.touches[0].clientY, x.current = !1, c(!0);
6897
+ const f = q((S) => {
6898
+ p.current = S.touches[0].clientX, j.current = S.touches[0].clientY, x.current = !1, c(!0);
6889
6899
  }, []), _ = q((S) => {
6890
6900
  if (!d) return;
6891
- const C = S.touches[0].clientX, M = S.touches[0].clientY, U = C - f.current, I = M - j.current;
6901
+ const C = S.touches[0].clientX, M = S.touches[0].clientY, U = C - p.current, I = M - j.current;
6892
6902
  !x.current && Math.abs(U) > 10 && (x.current = Math.abs(U) > Math.abs(I)), x.current && (S.preventDefault(), w(U));
6893
6903
  }, [d]), g = q(() => {
6894
6904
  var I;
@@ -6913,7 +6923,7 @@ const ps = ({
6913
6923
  transition: d ? "none" : "transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)",
6914
6924
  willChange: "transform"
6915
6925
  },
6916
- onTouchStart: p,
6926
+ onTouchStart: f,
6917
6927
  onTouchMove: _,
6918
6928
  onTouchEnd: g,
6919
6929
  children: [
@@ -7006,21 +7016,21 @@ const ps = ({
7006
7016
  backgroundHex: "#111827",
7007
7017
  sparkDealHex: "#FF9500"
7008
7018
  };
7009
- function ur(t) {
7019
+ function dr(t) {
7010
7020
  const e = t.match(/(\d+\.?\d*)\s+(\d+\.?\d*)%?\s+(\d+\.?\d*)%?/);
7011
7021
  if (!e) return "#000000";
7012
7022
  const r = parseFloat(e[1]), n = parseFloat(e[2]) / 100, i = parseFloat(e[3]) / 100, l = (1 - Math.abs(2 * i - 1)) * n, d = l * (1 - Math.abs(r / 60 % 2 - 1)), c = i - l / 2;
7013
7023
  let b = 0, w = 0, h = 0;
7014
7024
  r < 60 ? (b = l, w = d) : r < 120 ? (b = d, w = l) : r < 180 ? (w = l, h = d) : r < 240 ? (w = d, h = l) : r < 300 ? (b = d, h = l) : (b = l, h = d);
7015
- const f = (j) => Math.round((j + c) * 255).toString(16).padStart(2, "0");
7016
- return `#${f(b)}${f(w)}${f(h)}`;
7025
+ const p = (j) => Math.round((j + c) * 255).toString(16).padStart(2, "0");
7026
+ return `#${p(b)}${p(w)}${p(h)}`;
7017
7027
  }
7018
7028
  function $i() {
7019
7029
  const t = kr();
7020
7030
  return jr({
7021
7031
  queryKey: ["bob-theme-settings"],
7022
7032
  queryFn: async () => {
7023
- var h, f, j, x, k, p, _, g, y, u, S;
7033
+ var h, p, j, x, k, f, _, g, y, u, S;
7024
7034
  if (!t)
7025
7035
  return console.log("[useThemeSettings] No supabase client, using defaults"), lt;
7026
7036
  const { data: e, error: r } = await t.from("bob_theme_settings").select("setting_key, color_value, hex_preview").in("setting_key", [
@@ -7035,7 +7045,7 @@ function $i() {
7035
7045
  return console.error("[useThemeSettings] Error fetching:", r), lt;
7036
7046
  if (!e || e.length === 0)
7037
7047
  return lt;
7038
- const n = new Map(e.map((C) => [C.setting_key, C])), i = ((h = n.get("matrix_primary")) == null ? void 0 : h.color_value) || lt.primary, l = ((f = n.get("matrix_secondary")) == null ? void 0 : f.color_value) || lt.secondary, d = ((j = n.get("matrix_success")) == null ? void 0 : j.color_value) || lt.success, c = ((x = n.get("matrix_background")) == null ? void 0 : x.color_value) || lt.background, b = ((k = n.get("matrix_spark_deal_color")) == null ? void 0 : k.color_value) || lt.sparkDealColor, w = ((p = n.get("matrix_background_mode")) == null ? void 0 : p.color_value) || "dark";
7048
+ const n = new Map(e.map((C) => [C.setting_key, C])), i = ((h = n.get("matrix_primary")) == null ? void 0 : h.color_value) || lt.primary, l = ((p = n.get("matrix_secondary")) == null ? void 0 : p.color_value) || lt.secondary, d = ((j = n.get("matrix_success")) == null ? void 0 : j.color_value) || lt.success, c = ((x = n.get("matrix_background")) == null ? void 0 : x.color_value) || lt.background, b = ((k = n.get("matrix_spark_deal_color")) == null ? void 0 : k.color_value) || lt.sparkDealColor, w = ((f = n.get("matrix_background_mode")) == null ? void 0 : f.color_value) || "dark";
7039
7049
  return {
7040
7050
  primary: i,
7041
7051
  secondary: l,
@@ -7043,11 +7053,11 @@ function $i() {
7043
7053
  background: c,
7044
7054
  backgroundMode: w,
7045
7055
  sparkDealColor: b,
7046
- primaryHex: ((_ = n.get("matrix_primary")) == null ? void 0 : _.hex_preview) || ur(i),
7047
- secondaryHex: ((g = n.get("matrix_secondary")) == null ? void 0 : g.hex_preview) || ur(l),
7048
- successHex: ((y = n.get("matrix_success")) == null ? void 0 : y.hex_preview) || ur(d),
7049
- backgroundHex: ((u = n.get("matrix_background")) == null ? void 0 : u.hex_preview) || ur(c),
7050
- sparkDealHex: ((S = n.get("matrix_spark_deal_color")) == null ? void 0 : S.hex_preview) || ur(b)
7056
+ primaryHex: ((_ = n.get("matrix_primary")) == null ? void 0 : _.hex_preview) || dr(i),
7057
+ secondaryHex: ((g = n.get("matrix_secondary")) == null ? void 0 : g.hex_preview) || dr(l),
7058
+ successHex: ((y = n.get("matrix_success")) == null ? void 0 : y.hex_preview) || dr(d),
7059
+ backgroundHex: ((u = n.get("matrix_background")) == null ? void 0 : u.hex_preview) || dr(c),
7060
+ sparkDealHex: ((S = n.get("matrix_spark_deal_color")) == null ? void 0 : S.hex_preview) || dr(b)
7051
7061
  };
7052
7062
  },
7053
7063
  staleTime: 60 * 1e3,
@@ -7133,11 +7143,11 @@ const Qi = ({
7133
7143
  scrollSpeed: i,
7134
7144
  theme: l
7135
7145
  }) => {
7136
- const [d, c] = J(!1), [b, w] = J(100), h = t[e], f = l.sparkDealHex || "#FF9500", j = l.backgroundMode !== "light";
7137
- oe(() => {
7146
+ const [d, c] = J(!1), [b, w] = J(100), h = t[e], p = l.sparkDealHex || "#FF9500", j = l.backgroundMode !== "light";
7147
+ ae(() => {
7138
7148
  if (!h) return;
7139
7149
  c(!0), w(100);
7140
- const p = setTimeout(() => {
7150
+ const f = setTimeout(() => {
7141
7151
  w(0);
7142
7152
  }, 50), _ = setTimeout(() => {
7143
7153
  w(-100);
@@ -7146,7 +7156,7 @@ const Qi = ({
7146
7156
  r(y), c(!1);
7147
7157
  }, i);
7148
7158
  return () => {
7149
- clearTimeout(p), clearTimeout(_), clearTimeout(g);
7159
+ clearTimeout(f), clearTimeout(_), clearTimeout(g);
7150
7160
  };
7151
7161
  }, [e, h, i, t.length, r]);
7152
7162
  const x = q(() => {
@@ -7175,20 +7185,20 @@ const Qi = ({
7175
7185
  className: "group flex items-center gap-4 px-6 py-3 rounded-xl shadow-2xl transition-all hover:scale-105 active:scale-95",
7176
7186
  style: {
7177
7187
  background: j ? "linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(17, 24, 39, 0.9) 100%)" : "linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.98) 100%)",
7178
- border: `2px solid ${f}`,
7179
- boxShadow: `0 8px 32px -4px ${f}40, 0 4px 16px -2px rgba(0,0,0,0.2)`
7188
+ border: `2px solid ${p}`,
7189
+ boxShadow: `0 8px 32px -4px ${p}40, 0 4px 16px -2px rgba(0,0,0,0.2)`
7180
7190
  },
7181
7191
  children: [
7182
7192
  /* @__PURE__ */ s.jsx(
7183
7193
  "div",
7184
7194
  {
7185
7195
  className: "w-10 h-10 rounded-full flex items-center justify-center shrink-0",
7186
- style: { background: `${f}20` },
7196
+ style: { background: `${p}20` },
7187
7197
  children: /* @__PURE__ */ s.jsx(
7188
7198
  "svg",
7189
7199
  {
7190
7200
  className: "w-5 h-5",
7191
- fill: f,
7201
+ fill: p,
7192
7202
  viewBox: "0 0 24 24",
7193
7203
  children: /* @__PURE__ */ s.jsx("path", { d: "M11.645 20.91l-.007-.003-.022-.012a15.247 15.247 0 01-.383-.218 25.18 25.18 0 01-4.244-3.17C4.688 15.36 2.25 12.174 2.25 8.25 2.25 5.322 4.714 3 7.688 3A5.5 5.5 0 0112 5.052 5.5 5.5 0 0116.313 3c2.973 0 5.437 2.322 5.437 5.25 0 3.925-2.438 7.111-4.739 9.256a25.175 25.175 0 01-4.244 3.17 15.247 15.247 0 01-.383.219l-.022.012-.007.004-.003.001a.752.752 0 01-.704 0l-.003-.001z" })
7194
7204
  }
@@ -7201,7 +7211,7 @@ const Qi = ({
7201
7211
  "span",
7202
7212
  {
7203
7213
  className: "text-xs font-bold uppercase tracking-wider",
7204
- style: { color: f },
7214
+ style: { color: p },
7205
7215
  children: "⚡ Spark Deal"
7206
7216
  }
7207
7217
  ),
@@ -7210,7 +7220,7 @@ const Qi = ({
7210
7220
  {
7211
7221
  className: "text-xs font-bold px-2 py-0.5 rounded-full",
7212
7222
  style: {
7213
- background: f,
7223
+ background: p,
7214
7224
  color: j ? "#000" : "#fff"
7215
7225
  },
7216
7226
  children: [
@@ -7249,7 +7259,7 @@ const Qi = ({
7249
7259
  "span",
7250
7260
  {
7251
7261
  className: "text-xl font-bold",
7252
- style: { color: f },
7262
+ style: { color: p },
7253
7263
  children: [
7254
7264
  "$",
7255
7265
  h.price.toFixed(2)
@@ -7262,7 +7272,7 @@ const Qi = ({
7262
7272
  {
7263
7273
  className: "w-5 h-5 opacity-60 group-hover:opacity-100 group-hover:translate-x-1 transition-all",
7264
7274
  fill: "none",
7265
- stroke: f,
7275
+ stroke: p,
7266
7276
  strokeWidth: 2,
7267
7277
  viewBox: "0 0 24 24",
7268
7278
  children: /* @__PURE__ */ s.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 4.5l7.5 7.5-7.5 7.5" })
@@ -7273,12 +7283,12 @@ const Qi = ({
7273
7283
  )
7274
7284
  }
7275
7285
  ),
7276
- t.length > 1 && /* @__PURE__ */ s.jsx("div", { className: "absolute bottom-1 left-0 right-0 flex justify-center gap-1.5", children: t.map((p, _) => /* @__PURE__ */ s.jsx(
7286
+ t.length > 1 && /* @__PURE__ */ s.jsx("div", { className: "absolute bottom-1 left-0 right-0 flex justify-center gap-1.5", children: t.map((f, _) => /* @__PURE__ */ s.jsx(
7277
7287
  "div",
7278
7288
  {
7279
7289
  className: "w-1.5 h-1.5 rounded-full transition-all",
7280
7290
  style: {
7281
- background: _ === e ? f : `${f}40`,
7291
+ background: _ === e ? p : `${p}40`,
7282
7292
  transform: _ === e ? "scale(1.3)" : "scale(1)"
7283
7293
  }
7284
7294
  },
@@ -7378,7 +7388,7 @@ const Qi = ({
7378
7388
  onSparkDealClick: n,
7379
7389
  subliminalBrands: i = []
7380
7390
  }) => {
7381
- const l = K(null), d = K(), c = K([]), b = K(0), [w, h] = J(0), [f, j] = J(!1), [x, k] = J(0), { data: p } = $i(), { data: _ } = Ui(), { data: g } = Hi(t !== "hidden" && (_ == null ? void 0 : _.enabled)), y = p || {
7391
+ const l = K(null), d = K(), c = K([]), b = K(0), [w, h] = J(0), [p, j] = J(!1), [x, k] = J(0), { data: f } = $i(), { data: _ } = Ui(), { data: g } = Hi(t !== "hidden" && (_ == null ? void 0 : _.enabled)), y = f || {
7382
7392
  primaryHex: "#0066CC",
7383
7393
  // CARFIX Blue
7384
7394
  secondaryHex: "#004999",
@@ -7421,7 +7431,7 @@ const Qi = ({
7421
7431
  }
7422
7432
  c.current = R;
7423
7433
  }, [M]);
7424
- oe(() => {
7434
+ ae(() => {
7425
7435
  if (t === "hidden") {
7426
7436
  d.current && cancelAnimationFrame(d.current);
7427
7437
  return;
@@ -7455,7 +7465,7 @@ const Qi = ({
7455
7465
  return v(), window.addEventListener("resize", R), () => {
7456
7466
  d.current && cancelAnimationFrame(d.current), window.removeEventListener("resize", R);
7457
7467
  };
7458
- }, [t, y, M, U, I, r]), oe(() => {
7468
+ }, [t, y, M, U, I, r]), ae(() => {
7459
7469
  if (t === "hidden" || !g || g.length === 0 || !u.bannerEnabled) {
7460
7470
  j(!1);
7461
7471
  return;
@@ -7486,7 +7496,7 @@ const Qi = ({
7486
7496
  style: { opacity: 0.85 }
7487
7497
  }
7488
7498
  ),
7489
- f && g && g.length > 0 && /* @__PURE__ */ s.jsx(
7499
+ p && g && g.length > 0 && /* @__PURE__ */ s.jsx(
7490
7500
  Qi,
7491
7501
  {
7492
7502
  deals: g.slice(0, u.maxPerSession),
@@ -7512,16 +7522,16 @@ const Qi = ({
7512
7522
  highlightedProduct: b,
7513
7523
  onProductClick: w,
7514
7524
  onPackageSelect: h,
7515
- isResearching: f,
7525
+ isResearching: p,
7516
7526
  vehicle: j,
7517
7527
  onChangeVehicle: x,
7518
7528
  bobOffset: k = 0,
7519
- bobScale: p = 100,
7529
+ bobScale: f = 100,
7520
7530
  bobHasArrived: _ = !0,
7521
7531
  externalBobPosition: g,
7522
7532
  onBobPositionChange: y
7523
7533
  }) => {
7524
- const u = typeof window < "u" && window.self !== window.top, S = Pr(), C = fs(), [M, U] = J("center"), [I, W] = J("hidden"), m = g ?? M, E = q((Q) => {
7534
+ const u = typeof window < "u" && window.self !== window.top, S = Or(), C = fs(), [M, U] = J("center"), [I, W] = J("hidden"), m = g ?? M, E = q((Q) => {
7525
7535
  U(Q), y == null || y(Q);
7526
7536
  }, [y]), N = l.length > 0 || d.length > 0, H = (() => {
7527
7537
  switch (S) {
@@ -7534,9 +7544,9 @@ const Qi = ({
7534
7544
  default:
7535
7545
  return 140;
7536
7546
  }
7537
- })() * p / 100;
7538
- oe(() => {
7539
- if (f && I !== "loading" && I !== "visible")
7547
+ })() * f / 100;
7548
+ ae(() => {
7549
+ if (p && I !== "loading" && I !== "visible")
7540
7550
  W("loading"), m === "center" && E("partial-left");
7541
7551
  else if (N && I !== "visible")
7542
7552
  if (m === "center") {
@@ -7547,8 +7557,8 @@ const Qi = ({
7547
7557
  return () => clearTimeout(Q);
7548
7558
  } else
7549
7559
  W("visible");
7550
- else !N && !f && I !== "hidden" && (W("hidden"), E("center"));
7551
- }, [N, f, I, m, E]);
7560
+ else !N && !p && I !== "hidden" && (W("hidden"), E("center"));
7561
+ }, [N, p, I, m, E]);
7552
7562
  const z = I !== "hidden", Z = z && N;
7553
7563
  return /* @__PURE__ */ s.jsxs(
7554
7564
  "div",
@@ -7656,7 +7666,7 @@ const Qi = ({
7656
7666
  highlightedProduct: b,
7657
7667
  onProductClick: w,
7658
7668
  onPackageSelect: h,
7659
- isResearching: f,
7669
+ isResearching: p,
7660
7670
  visible: z,
7661
7671
  counterHeightPercent: i,
7662
7672
  hasVehicle: !!j
@@ -7677,7 +7687,7 @@ const Qi = ({
7677
7687
  (m) => m.chat_trigger === "processing_input" || m.state_key === "research" || m.state_key === "researching" || m.title.toLowerCase().includes("research") || m.title.toLowerCase().includes("thinking")
7678
7688
  ), [t]), h = q(() => t.find(
7679
7689
  (m) => m.chat_trigger === "streaming_response" || m.state_key === "talk" || m.state_key === "talking" || m.title.toLowerCase().includes("talk")
7680
- ), [t]), f = q(() => t.find(
7690
+ ), [t]), p = q(() => t.find(
7681
7691
  (m) => m.chat_trigger === "awaiting_input" || m.state_key === "talk_pause" || m.state_key === "listening" || m.title.toLowerCase().includes("listen") || m.title.toLowerCase().includes("pause")
7682
7692
  ), [t]), j = q(() => {
7683
7693
  const m = t.find(
@@ -7696,44 +7706,44 @@ const Qi = ({
7696
7706
  pauseDuration: (E == null ? void 0 : E.pause_duration) || 0,
7697
7707
  loopCount: (E == null ? void 0 : E.loop_count) || 0
7698
7708
  };
7699
- }, [t]), p = q(() => {
7709
+ }, [t]), f = q(() => {
7700
7710
  c.current && (clearTimeout(c.current), c.current = null);
7701
7711
  }, []), _ = q(() => {
7702
- p(), !r && (c.current = setTimeout(() => {
7712
+ f(), !r && (c.current = setTimeout(() => {
7703
7713
  const m = x();
7704
7714
  m && (i("idle"), e(m.state_key));
7705
7715
  }, Ki));
7706
- }, [r, x, e, p]), g = q((m) => {
7716
+ }, [r, x, e, f]), g = q((m) => {
7707
7717
  if (r) return;
7708
7718
  const E = b(m);
7709
7719
  E && e(E.state_key);
7710
7720
  }, [r, b, e]), y = q(() => {
7711
7721
  if (r) return;
7712
- const m = f();
7722
+ const m = p();
7713
7723
  m && (i("awaiting_input"), e(m.state_key), _());
7714
- }, [r, f, e, _]), u = q(() => {
7724
+ }, [r, p, e, _]), u = q(() => {
7715
7725
  l || r || (d(!0), i("page_load"), g("page_load"), setTimeout(() => {
7716
7726
  y();
7717
7727
  }, 3e3));
7718
7728
  }, [l, r, g, y]), S = q(() => {
7719
7729
  if (r) return;
7720
- p(), i("processing_input");
7730
+ f(), i("processing_input");
7721
7731
  const m = w();
7722
7732
  console.log("[StateTransitions] User input - switching to RESEARCH:", m == null ? void 0 : m.state_key), m ? e(m.state_key) : g("processing_input");
7723
- }, [r, p, w, e, g]), C = q(() => {
7733
+ }, [r, f, w, e, g]), C = q(() => {
7724
7734
  if (r) return;
7725
- p(), i("streaming_response");
7735
+ f(), i("streaming_response");
7726
7736
  const m = h();
7727
7737
  console.log("[StateTransitions] Speech started - switching to TALK:", m == null ? void 0 : m.state_key), m && e(m.state_key);
7728
- }, [r, p, h, e]), M = q(() => {
7738
+ }, [r, f, h, e]), M = q(() => {
7729
7739
  if (r) return;
7730
7740
  const m = j();
7731
7741
  console.log("[StateTransitions] Speech ended - switching to COMPLETE:", m == null ? void 0 : m.state_key), m && e(m.state_key), setTimeout(() => {
7732
7742
  r || y();
7733
7743
  }, 2e3);
7734
7744
  }, [r, j, e, y]), U = q(() => {
7735
- p(), i("streaming_response"), console.log("[StateTransitions] Stream started (API response)");
7736
- }, [p]), I = q(() => {
7745
+ f(), i("streaming_response"), console.log("[StateTransitions] Stream started (API response)");
7746
+ }, [f]), I = q(() => {
7737
7747
  i("response_complete"), console.log("[StateTransitions] Stream complete (API finished)");
7738
7748
  const m = j();
7739
7749
  m && e(m.state_key), setTimeout(() => {
@@ -7749,7 +7759,7 @@ const Qi = ({
7749
7759
  y();
7750
7760
  }, 3e3);
7751
7761
  }, [r, t, e, y]);
7752
- return oe(() => () => p(), [p]), {
7762
+ return ae(() => () => f(), [f]), {
7753
7763
  chatStage: n,
7754
7764
  initialize: u,
7755
7765
  onUserInput: S,
@@ -7761,10 +7771,10 @@ const Qi = ({
7761
7771
  getStateSettings: k
7762
7772
  };
7763
7773
  };
7764
- console.log(`[BobWidget] Package loaded - v${vr}`);
7774
+ console.log(`[BobWidget] Package loaded - v${er}`);
7765
7775
  export {
7766
7776
  wi as BADGE_CONFIG,
7767
- vr as BOB_VERSION,
7777
+ er as BOB_VERSION,
7768
7778
  zi as Bob,
7769
7779
  yi as BobCharacter,
7770
7780
  ii as BobProvider,
@@ -7779,7 +7789,7 @@ export {
7779
7789
  ps as MobileBobCharacter,
7780
7790
  Mi as MobileBobLayout,
7781
7791
  aa as MobileBobLayoutCore,
7782
- Pi as MobileChatDrawer,
7792
+ Oi as MobileChatDrawer,
7783
7793
  gs as MobileProductColumn,
7784
7794
  Rr as ProductBadge,
7785
7795
  Ii as ProductTile,