tanya-chatbot 0.7.2 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { useEffect as be, useState as C, useRef as Re, forwardRef as _n, createElement as cr, useMemo as Rr } from "react";
2
- import { jsx as a, jsxs as c, Fragment as xe } from "react/jsx-runtime";
2
+ import { jsx as a, jsxs as d, Fragment as xe } from "react/jsx-runtime";
3
3
  import { createHttpLink as Eo, ApolloClient as Oo, InMemoryCache as Ao, ApolloProvider as jo } from "@apollo/client";
4
4
  import { Provider as $o, useDispatch as In, useSelector as Yt } from "react-redux";
5
5
  import { createSlice as Fn, configureStore as Do } from "@reduxjs/toolkit";
@@ -102,7 +102,7 @@ const lt = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1
102
102
  const e = "https://tanya-sfcc-server.vercel.app/";
103
103
  try {
104
104
  const t = await ge.post(
105
- `${e}api/auth/token-bm-grant?baseUrl=${Ge()}&siteId=${Ve()}`
105
+ `${e}api/auth/token-bm-grant?baseUrl=${Qe()}&siteId=${Ve()}`
106
106
  );
107
107
  return t.status === 200 && t.data.access_token ? t.data.access_token : (console.error("Failed to fetch token:", t.data), null);
108
108
  } catch (t) {
@@ -112,7 +112,7 @@ const lt = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1
112
112
  const t = "https://tanya-sfcc-server.vercel.app/";
113
113
  try {
114
114
  const r = JSON.parse(sessionStorage.getItem("customerData") || "{}").dwsid, n = await ge.post(
115
- `${t}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${Ge()}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
115
+ `${t}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${Qe()}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
116
116
  {},
117
117
  {
118
118
  headers: {
@@ -156,7 +156,7 @@ const ur = async (e, t) => {
156
156
  } catch (r) {
157
157
  return console.error("Error obtaining JWT token:", r), e = null, t = null, null;
158
158
  }
159
- }, Ge = () => sessionStorage.getItem("Host"), Ve = () => sessionStorage.getItem("SiteId"), ct = () => sessionStorage.getItem("pubCfg"), dt = () => sessionStorage.getItem("envRef"), ut = () => sessionStorage.getItem("orgRef"), Ko = async (e) => {
159
+ }, Qe = () => sessionStorage.getItem("Host"), Ve = () => sessionStorage.getItem("SiteId"), ct = () => sessionStorage.getItem("pubCfg"), dt = () => sessionStorage.getItem("envRef"), ut = () => sessionStorage.getItem("orgRef"), Ko = async (e) => {
160
160
  console.log("fetching results");
161
161
  const { serverUrl: t, basePath: r } = lt();
162
162
  let n = "";
@@ -165,7 +165,7 @@ const ur = async (e, t) => {
165
165
  console.log("the token from getSearchResults", o), n = o.access_token;
166
166
  }
167
167
  try {
168
- const o = Ge();
168
+ const o = Qe();
169
169
  return (await ge.get(
170
170
  `${t}${r}/search-sfcc?baseUrl=${o}&query=${e}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
171
171
  {
@@ -180,7 +180,7 @@ const ur = async (e, t) => {
180
180
  }
181
181
  }, jn = async (e) => {
182
182
  if (!e) throw new Error("Product ID is required");
183
- const { serverUrl: t, basePath: r } = lt(), n = Ge();
183
+ const { serverUrl: t, basePath: r } = lt(), n = Qe();
184
184
  console.log("calling access");
185
185
  const { access_token: o } = await vt();
186
186
  return (await ge.get(
@@ -198,7 +198,7 @@ const ur = async (e, t) => {
198
198
  t
199
199
  ), { serverUrl: n, basePath: o } = lt(), i = (await vt()).access_token;
200
200
  return (await ge.get(
201
- `${n}${o}/get-interest?baseUrl=${Ge()}&customerId=${e}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
201
+ `${n}${o}/get-interest?baseUrl=${Qe()}&customerId=${e}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
202
202
  {
203
203
  headers: {
204
204
  "Content-Type": "application/json",
@@ -206,7 +206,7 @@ const ur = async (e, t) => {
206
206
  }
207
207
  }
208
208
  )).data;
209
- }, Hr = (e) => String(typeof e == "string" ? e : e["en-US"] || e), Vr = (e) => e != null && e.image ? [e.image] : "variants" in e ? e.variants[0].images : e.masterVariant.images.map((t) => t.url), Qo = (e, t) => e.toLocaleString("en-US", {
209
+ }, Hr = (e) => String(typeof e == "string" ? e : e["en-US"] || e), Vr = (e) => e != null && e.image ? [e.image] : "variants" in e ? e.variants[0].images : e.masterVariant.images.map((t) => t.url), Go = (e, t) => e.toLocaleString("en-US", {
210
210
  style: "currency",
211
211
  currency: t || "USD"
212
212
  }), Yr = (e) => {
@@ -218,7 +218,7 @@ const ur = async (e, t) => {
218
218
  centAmount: (r = e.masterVariant) == null ? void 0 : r.prices[0].value.centAmount,
219
219
  currencyCode: (n = e.masterVariant) == null ? void 0 : n.prices[0].value.currencyCode
220
220
  };
221
- }, Go = (e) => e.charAt(0).toUpperCase() + e.slice(1), Jr = (e, t) => e.length < t ? e : e.slice(0, t) + "...", rr = (e) => e.split("\\n").map((t, r) => {
221
+ }, Qo = (e) => e.charAt(0).toUpperCase() + e.slice(1), Jr = (e, t) => e.length < t ? e : e.slice(0, t) + "...", rr = (e) => e.split("\\n").map((t, r) => {
222
222
  const n = t.match(/^(\d+)\.\s(.+)/);
223
223
  return n ? `<p key=${r} class="mb-2"><strong>${n[1]}.</strong> ${n[2]}</p>` : t.trim() ? `<p key=${r} class="mb-2">${t}</p>` : "<br/>";
224
224
  }).join("");
@@ -240,11 +240,11 @@ const Zo = ({
240
240
  o(
241
241
  (l) => l - r < 0 ? e.length - (e.length % r || r) : l - r
242
242
  );
243
- }, d = async (l) => {
244
- const g = await jn(l);
245
- t(dr(g));
243
+ }, c = async (l) => {
244
+ const h = await jn(l);
245
+ t(dr(h));
246
246
  };
247
- return /* @__PURE__ */ a("div", { className: "mt-2 overflow-x-hidden", children: /* @__PURE__ */ c("div", { className: "flex items-center justify-center gap-4 relative", children: [
247
+ return /* @__PURE__ */ a("div", { className: "mt-2 overflow-x-hidden", children: /* @__PURE__ */ d("div", { className: "flex items-center justify-center gap-4 relative", children: [
248
248
  (e == null ? void 0 : e.length) > r && /* @__PURE__ */ a(
249
249
  "button",
250
250
  {
@@ -259,32 +259,32 @@ const Zo = ({
259
259
  }
260
260
  ),
261
261
  /* @__PURE__ */ a("div", { className: "flex gap-5 justify-center flex-1 overflow-hidden", children: e.slice(n, n + r).map((l) => {
262
- var g, p, y, x;
263
- return /* @__PURE__ */ c(
262
+ var h, g, y, x;
263
+ return /* @__PURE__ */ d(
264
264
  "div",
265
265
  {
266
266
  className: "flex-shrink-0 flex flex-col w-[150px] h-[200px] p-2 items-center justify-between cursor-pointer bg-[#FFFFFF] rounded-[10px] shadow-[0px_2px_2px_0px_#9292BC40]",
267
267
  onClick: () => {
268
- d(l.product_id ?? l.productId);
268
+ c(l.product_id ?? l.productId);
269
269
  },
270
270
  children: [
271
271
  /* @__PURE__ */ a("div", { className: "w-full p-2 flex items-center justify-center bg-white", children: /* @__PURE__ */ a(
272
272
  "img",
273
273
  {
274
- src: ((g = Vr(l)[0]) == null ? void 0 : g.link) || Vr(l)[0] || // fallback if it's a string
274
+ src: ((h = Vr(l)[0]) == null ? void 0 : h.link) || Vr(l)[0] || // fallback if it's a string
275
275
  "https://via.placeholder.com/120",
276
276
  alt: l != null && l.productName ? l.productName : "Product",
277
277
  className: "w-28 h-28 rounded-[10px] transition-transform duration-300 hover:scale-125 object-cover"
278
278
  }
279
279
  ) }),
280
- /* @__PURE__ */ c(
280
+ /* @__PURE__ */ d(
281
281
  "div",
282
282
  {
283
283
  className: "text-white w-full p-2 text-[12px] text-center h-[60px]",
284
284
  children: [
285
- /* @__PURE__ */ c("div", { className: "relative inline-block group", children: [
285
+ /* @__PURE__ */ d("div", { className: "relative inline-block group", children: [
286
286
  /* @__PURE__ */ a("div", { className: "w-full line-clamp-1 overflow-hidden text-ellipsis text-[#000000] font-medium font-nunitoSans", children: l != null && l.productName ? l.productName : l != null && l.product_name ? l.product_name : Jr(
287
- Hr((p = l == null ? void 0 : l.name) == null ? void 0 : p["en-US"]),
287
+ Hr((g = l == null ? void 0 : l.name) == null ? void 0 : g["en-US"]),
288
288
  60
289
289
  ) || "Product" }),
290
290
  /* @__PURE__ */ a(
@@ -305,12 +305,12 @@ const Zo = ({
305
305
  }
306
306
  )
307
307
  ] }),
308
- /* @__PURE__ */ c("div", { className: " flex text-center items-center gap-2 text-[14px] text-[#14121F] font-bold font-nunitoSans text-base mb-1", children: [
309
- /* @__PURE__ */ a("p", { children: Qo(
308
+ /* @__PURE__ */ d("div", { className: " flex text-center items-center gap-2 text-[14px] text-[#14121F] font-bold font-nunitoSans text-base mb-1", children: [
309
+ /* @__PURE__ */ a("p", { children: Go(
310
310
  l != null && l.price ? Number(l == null ? void 0 : l.price) : Yr(l).centAmount || 0,
311
311
  (x = Yr(l)) == null ? void 0 : x.currencyCode
312
312
  ) }),
313
- /* @__PURE__ */ c("p", { className: "text-[#14121F] font-normal line-through text-sm font-nunitoSans truncate", children: [
313
+ /* @__PURE__ */ d("p", { className: "text-[#14121F] font-normal line-through text-sm font-nunitoSans truncate", children: [
314
314
  "$",
315
315
  Number(l == null ? void 0 : l.price).toFixed(2) ?? 5
316
316
  ] })
@@ -337,7 +337,7 @@ const Zo = ({
337
337
  }
338
338
  )
339
339
  ] }) });
340
- }, ea = ({ chat: e, storeDetails: t }) => /* @__PURE__ */ a("div", { className: "bg-[#FFFFFF] px-7 py-4 rounded-r-xl rounded-bl-2xl w-full", children: e.map((r, n) => /* @__PURE__ */ c(
340
+ }, ea = ({ chat: e, storeDetails: t }) => /* @__PURE__ */ a("div", { className: "bg-[#FFFFFF] px-7 py-4 rounded-r-xl rounded-bl-2xl w-full", children: e.map((r, n) => /* @__PURE__ */ d(
341
341
  "div",
342
342
  {
343
343
  className: "mb-4 p-3 rounded-xl",
@@ -350,7 +350,7 @@ const Zo = ({
350
350
  "div",
351
351
  {
352
352
  className: "font-nunitoSans font-bold text-sm text-[#494949] p-2 w-fit rounded-[20px]",
353
- children: Go(r.keyword) || "No keyword"
353
+ children: Qo(r.keyword) || "No keyword"
354
354
  }
355
355
  ),
356
356
  /* @__PURE__ */ a(
@@ -367,8 +367,8 @@ const Zo = ({
367
367
  var s, i;
368
368
  const { serverUrl: r, basePath: n } = lt(), o = `${r}`;
369
369
  try {
370
- const d = await ge.post(
371
- `${o}${n}/basket/create?baseUrl=${Ge()}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
370
+ const c = await ge.post(
371
+ `${o}${n}/basket/create?baseUrl=${Qe()}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
372
372
  t,
373
373
  {
374
374
  headers: {
@@ -380,18 +380,18 @@ const Zo = ({
380
380
  return window.postMessage(
381
381
  {
382
382
  type: "WIDGET_CREATED_BASKET",
383
- basketId: ((s = d.data) == null ? void 0 : s.basket_id) || ((i = d.data) == null ? void 0 : i.basketId)
383
+ basketId: ((s = c.data) == null ? void 0 : s.basket_id) || ((i = c.data) == null ? void 0 : i.basketId)
384
384
  },
385
385
  "*"
386
- ), d.data;
387
- } catch (d) {
388
- return ge.isAxiosError(d) ? console.error("Error creating basket:", d.response || d.message) : console.error("Unexpected error:", d), null;
386
+ ), c.data;
387
+ } catch (c) {
388
+ return ge.isAxiosError(c) ? console.error("Error creating basket:", c.response || c.message) : console.error("Unexpected error:", c), null;
389
389
  }
390
390
  }, fr = async (e, t, r) => {
391
391
  const { serverUrl: n, basePath: o } = lt(), s = `${n}`;
392
392
  try {
393
393
  const i = await ge.post(
394
- `${s}${o}/basket/add-product/${e}?baseUrl=${Ge()}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
394
+ `${s}${o}/basket/add-product/${e}?baseUrl=${Qe()}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
395
395
  t,
396
396
  {
397
397
  headers: {
@@ -415,7 +415,7 @@ const Zo = ({
415
415
  const { serverUrl: r, basePath: n } = lt(), o = `${r}`;
416
416
  try {
417
417
  const i = await ge.get(
418
- `${o}${n}/basket/${e}?baseUrl=${Ge()}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
418
+ `${o}${n}/basket/${e}?baseUrl=${Qe()}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
419
419
  {
420
420
  headers: {
421
421
  "Content-Type": "application/json",
@@ -446,13 +446,13 @@ const it = (e) => {
446
446
  console.error("Error storing token:", t);
447
447
  }
448
448
  }, Wr = 300, ra = ({ addToCartPwa: e }) => {
449
- var l, g, p, y, x, S;
449
+ var l, h, g, y, x, S;
450
450
  const t = In(), r = Yt((_) => _.product.product), n = Yt((_) => _.store.store), [o, s] = C(!!r);
451
451
  if (be(() => {
452
452
  s(!!r);
453
453
  }, [r]), !r) return null;
454
454
  const i = async () => {
455
- var _, F, N, P, R, w, V, je, E, H, we, ae, G, Pe, $e, he;
455
+ var _, F, N, P, R, w, V, je, E, H, we, ae, Q, Pe, $e, pe;
456
456
  try {
457
457
  if (!((F = (_ = r == null ? void 0 : r.variants) == null ? void 0 : _[0]) != null && F.product_id) && !(r.type.item || r.type.bundle) && !((P = (N = r == null ? void 0 : r.variants) == null ? void 0 : N[0]) != null && P.productId)) {
458
458
  Me.error("Variants not available", {
@@ -468,7 +468,7 @@ const it = (e) => {
468
468
  }
469
469
  ], O = JSON.parse(
470
470
  sessionStorage.getItem("customerData") || "{}"
471
- ), U = (O == null ? void 0 : O.basketId) || localStorage.getItem(Kt), Xe = !1, Ye = localStorage.getItem(Et), ve = Date.now();
471
+ ), q = (O == null ? void 0 : O.basketId) || localStorage.getItem(Kt), Xe = !1, Ye = localStorage.getItem(Et), ve = Date.now();
472
472
  if (!Xe || !Ye || ve >= parseInt(Ye)) {
473
473
  let _e = "";
474
474
  if (_e = "Bearer " + (await vt()).access_token, !_e) {
@@ -476,14 +476,14 @@ const it = (e) => {
476
476
  return;
477
477
  }
478
478
  const ft = ve + 300 * 1e3;
479
- if (Wt(_e), localStorage.setItem(Et, ft.toString()), U) {
479
+ if (Wt(_e), localStorage.setItem(Et, ft.toString()), q) {
480
480
  const Te = await Dn({
481
- basketId: U,
481
+ basketId: q,
482
482
  customer_token: _e
483
483
  });
484
484
  if (Te.status === 200 && Te) {
485
485
  const Ie = await fr(
486
- U,
486
+ q,
487
487
  L,
488
488
  _e
489
489
  );
@@ -494,7 +494,7 @@ const it = (e) => {
494
494
  closeOnClick: !0,
495
495
  pauseOnHover: !0,
496
496
  draggable: !0
497
- }), Jt(U));
497
+ }), Jt(q));
498
498
  return;
499
499
  }
500
500
  }
@@ -531,18 +531,18 @@ const it = (e) => {
531
531
  console.error("Error adding to cart:", L), Me.error("Failed to add product to cart", {
532
532
  position: "bottom-right",
533
533
  autoClose: 3e3
534
- }), ((G = L == null ? void 0 : L.response) == null ? void 0 : G.status) === 404 || // Basket not found
535
- ((Pe = L == null ? void 0 : L.response) == null ? void 0 : Pe.status) === 401 ? ((($e = L == null ? void 0 : L.response) == null ? void 0 : $e.status) === 404 && it(null), ((he = L == null ? void 0 : L.response) == null ? void 0 : he.status) === 401 && (it(null), Wt(null))) : (console.error("Failed to add product to basket:", L.message), Me.error("Failed to add product to cart", {
534
+ }), ((Q = L == null ? void 0 : L.response) == null ? void 0 : Q.status) === 404 || // Basket not found
535
+ ((Pe = L == null ? void 0 : L.response) == null ? void 0 : Pe.status) === 401 ? ((($e = L == null ? void 0 : L.response) == null ? void 0 : $e.status) === 404 && it(null), ((pe = L == null ? void 0 : L.response) == null ? void 0 : pe.status) === 401 && (it(null), Wt(null))) : (console.error("Failed to add product to basket:", L.message), Me.error("Failed to add product to cart", {
536
536
  position: "bottom-right",
537
537
  autoClose: 3e3
538
538
  }));
539
539
  }
540
- }, d = () => {
540
+ }, c = () => {
541
541
  if (!r) return;
542
542
  const _ = window.location.origin + "/product/" + r.id;
543
543
  console.log("path", _), window.location.href = _;
544
544
  };
545
- return console.log(r, "the prod"), /* @__PURE__ */ c(xe, { children: [
545
+ return console.log(r, "the prod"), /* @__PURE__ */ d(xe, { children: [
546
546
  /* @__PURE__ */ a(
547
547
  "div",
548
548
  {
@@ -552,7 +552,7 @@ const it = (e) => {
552
552
  }
553
553
  }
554
554
  ),
555
- /* @__PURE__ */ c(
555
+ /* @__PURE__ */ d(
556
556
  "div",
557
557
  {
558
558
  className: `
@@ -563,7 +563,7 @@ const it = (e) => {
563
563
  style: { willChange: "transform, opacity" },
564
564
  onClick: (_) => _.stopPropagation(),
565
565
  children: [
566
- /* @__PURE__ */ c("div", { className: "mt-3 flex flex-row justify-between w-full ", children: [
566
+ /* @__PURE__ */ d("div", { className: "mt-3 flex flex-row justify-between w-full ", children: [
567
567
  /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "text-[#000000] font-bold font-nunitoSans", children: r.name }) }),
568
568
  /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
569
569
  "div",
@@ -579,11 +579,11 @@ const it = (e) => {
579
579
  }
580
580
  ) })
581
581
  ] }),
582
- /* @__PURE__ */ c("div", { className: "flex flex-row gap-2 items-center flex-wrap", children: [
582
+ /* @__PURE__ */ d("div", { className: "flex flex-row gap-2 items-center flex-wrap", children: [
583
583
  /* @__PURE__ */ a("div", { className: "flex flex-row items-center justify-center w-[120px] h-[120px] my-5", children: /* @__PURE__ */ a(
584
584
  "img",
585
585
  {
586
- src: (y = (p = (g = (l = r.imageGroups) == null ? void 0 : l[0]) == null ? void 0 : g.images) == null ? void 0 : p[0]) == null ? void 0 : y.link,
586
+ src: (y = (g = (h = (l = r.imageGroups) == null ? void 0 : l[0]) == null ? void 0 : h.images) == null ? void 0 : g[0]) == null ? void 0 : y.link,
587
587
  alt: r.name,
588
588
  className: "rounded-[10px]"
589
589
  }
@@ -600,15 +600,15 @@ const it = (e) => {
600
600
  ))
601
601
  ) })
602
602
  ] }),
603
- /* @__PURE__ */ c("div", { className: "flex flex-row items-center justify-between w-full", children: [
604
- /* @__PURE__ */ c("div", { className: "flex flex-row items-center gap-2", children: [
605
- /* @__PURE__ */ c("p", { className: "text-[#14121F] font-bold font-nunitoSans", children: [
603
+ /* @__PURE__ */ d("div", { className: "flex flex-row items-center justify-between w-full", children: [
604
+ /* @__PURE__ */ d("div", { className: "flex flex-row items-center gap-2", children: [
605
+ /* @__PURE__ */ d("p", { className: "text-[#14121F] font-bold font-nunitoSans", children: [
606
606
  " ",
607
607
  "$",
608
608
  r.price.toFixed(2)
609
609
  ] }),
610
610
  " ",
611
- /* @__PURE__ */ c("p", { className: "text-[#14121F] font-normal line-through text-sm font-nunitoSans", children: [
611
+ /* @__PURE__ */ d("p", { className: "text-[#14121F] font-normal line-through text-sm font-nunitoSans", children: [
612
612
  " ",
613
613
  "$",
614
614
  (r.price + 5).toFixed(2)
@@ -617,7 +617,7 @@ const it = (e) => {
617
617
  /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "text-[#EC5050] font-bold font-nunitoSans", children: r.discount }) })
618
618
  ] }),
619
619
  /* @__PURE__ */ a("div", { className: "mt-2 w-full border-t-2 border-gray-200" }),
620
- /* @__PURE__ */ c("div", { className: "w-full text-left", children: [
620
+ /* @__PURE__ */ d("div", { className: "w-full text-left", children: [
621
621
  /* @__PURE__ */ a("div", { className: "text-[#323135] font-bold font-nunitoSans mt-3 text-[14px]", children: "Product Details" }),
622
622
  /* @__PURE__ */ a(
623
623
  "div",
@@ -629,16 +629,16 @@ const it = (e) => {
629
629
  }
630
630
  )
631
631
  ] }),
632
- /* @__PURE__ */ c("div", { className: "mt-4 flex flex-col gap-2 w-full p-2", children: [
633
- /* @__PURE__ */ a("div", { className: "flex flex-row items-center gap-2", children: /* @__PURE__ */ c("div", { className: "flex items-center gap-2 text-left font-nunitoSans", children: [
634
- /* @__PURE__ */ c("div", { className: "text-[#323135] font-bold", children: [
632
+ /* @__PURE__ */ d("div", { className: "mt-4 flex flex-col gap-2 w-full p-2", children: [
633
+ /* @__PURE__ */ a("div", { className: "flex flex-row items-center gap-2", children: /* @__PURE__ */ d("div", { className: "flex items-center gap-2 text-left font-nunitoSans", children: [
634
+ /* @__PURE__ */ d("div", { className: "text-[#323135] font-bold", children: [
635
635
  ((x = r == null ? void 0 : r.rating) == null ? void 0 : x.rate) || 0,
636
636
  " /",
637
637
  " ",
638
638
  /* @__PURE__ */ a("span", { className: "text-[#68656E]", children: "5" })
639
639
  ] }),
640
640
  /* @__PURE__ */ a("div", { className: "text-[#323135] font-semibold text-sm", children: "Overall Rating" }),
641
- /* @__PURE__ */ c("div", { className: "text-[#68656E] font-semibold text-sm", children: [
641
+ /* @__PURE__ */ d("div", { className: "text-[#68656E] font-semibold text-sm", children: [
642
642
  ((S = r == null ? void 0 : r.rating) == null ? void 0 : S.count) || 0,
643
643
  " ratings"
644
644
  ] })
@@ -659,7 +659,7 @@ const it = (e) => {
659
659
  );
660
660
  }) })
661
661
  ] }),
662
- /* @__PURE__ */ c(
662
+ /* @__PURE__ */ d(
663
663
  "div",
664
664
  {
665
665
  className: "flex flex-col items-center justify-between font-nunitoSans font-semibold w-5/6 text-black gap-2",
@@ -679,7 +679,7 @@ const it = (e) => {
679
679
  {
680
680
  className: "rounded-[5px] shadow-sm text-[#FBFBFC] bg-[#6851C6] p-2 w-full text-center cursor-pointer mb-16",
681
681
  style: { backgroundColor: n.tanyaThemeColor },
682
- onClick: d,
682
+ onClick: c,
683
683
  children: "View more"
684
684
  }
685
685
  )
@@ -709,14 +709,14 @@ const it = (e) => {
709
709
  "Niece/Nephew": "his/her niece/nephew",
710
710
  "My Friends": "his/her friends",
711
711
  Others: "others"
712
- }, s = Re(null), i = Re(null), d = Re(null), l = Re(null), [g, p] = C(null);
712
+ }, s = Re(null), i = Re(null), c = Re(null), l = Re(null), [h, g] = C(null);
713
713
  Re(null);
714
- const [y, x] = C(!1), [S, _] = C(!1), [F, N] = C(!1), [P, R] = C(!1), [w, V] = C(!1), [je, E] = C(!1), [H, we] = C(""), [ae, G] = C(""), Pe = (m) => ({
714
+ const [y, x] = C(!1), [S, _] = C(!1), [F, N] = C(!1), [P, R] = C(!1), [w, V] = C(!1), [je, E] = C(!1), [H, we] = C(""), [ae, Q] = C(""), Pe = (m) => ({
715
715
  id: m.id,
716
716
  title: m.name,
717
717
  image: m.image ?? "",
718
718
  price: m.price ?? 0
719
- }), [$e, he] = C([]), L = Re(null), O = Yt((m) => m.store.store), U = Yt((m) => m.product.product);
719
+ }), [$e, pe] = C([]), L = Re(null), O = Yt((m) => m.store.store), q = Yt((m) => m.product.product);
720
720
  be(() => {
721
721
  const m = localStorage.getItem(
722
722
  `access_token_${e.siteId}`
@@ -725,7 +725,7 @@ const it = (e) => {
725
725
  );
726
726
  if (m && j === m) {
727
727
  const $ = localStorage.getItem("chatHistory");
728
- $ && he(JSON.parse($));
728
+ $ && pe(JSON.parse($));
729
729
  } else
730
730
  localStorage.setItem("chatHistory", JSON.stringify([])), localStorage.setItem(
731
731
  `chat-token-${e.siteId}`,
@@ -747,7 +747,7 @@ const it = (e) => {
747
747
  y ? Xe() : Ye();
748
748
  }, [y]);
749
749
  const ve = (m) => {
750
- G(o[m]);
750
+ Q(o[m]);
751
751
  };
752
752
  be(() => {
753
753
  F && L.current && L.current.scrollTo({
@@ -757,7 +757,7 @@ const it = (e) => {
757
757
  }, [$e, F]);
758
758
  const _e = null, ft = null, Ze = async () => {
759
759
  const m = await vt();
760
- m != null && p(m);
760
+ m != null && g(m);
761
761
  };
762
762
  be(() => {
763
763
  if (e != null && e.siteId) {
@@ -778,9 +778,9 @@ const it = (e) => {
778
778
  const $ = await M();
779
779
  if (console.log($, "interests of customer", Lt), !!$)
780
780
  try {
781
- he(
781
+ pe(
782
782
  (Z) => Z.map(
783
- (K, Ne) => Ne === Z.length - 1 ? { ...K, secondaryLoading: !0 } : K
783
+ (W, Ne) => Ne === Z.length - 1 ? { ...W, secondaryLoading: !0 } : W
784
784
  )
785
785
  );
786
786
  const Y = await ur(_e, ft);
@@ -810,9 +810,9 @@ const it = (e) => {
810
810
  const ne = X.body.getReader(), ke = new TextDecoder();
811
811
  let Se = "";
812
812
  for (; ; ) {
813
- const { done: Z, value: K } = await ne.read();
813
+ const { done: Z, value: W } = await ne.read();
814
814
  if (Z) break;
815
- Se += ke.decode(K, { stream: !0 });
815
+ Se += ke.decode(W, { stream: !0 });
816
816
  const Ne = Se.split(`
817
817
  `);
818
818
  Se = Ne.pop() || "";
@@ -821,9 +821,9 @@ const it = (e) => {
821
821
  const k = ee.slice(5).trim();
822
822
  try {
823
823
  const J = JSON.parse(k);
824
- J.index === 0 && he(
825
- (W) => W.map(
826
- (de, Ce) => Ce === W.length - 1 ? {
824
+ J.index === 0 && pe(
825
+ (G) => G.map(
826
+ (de, Ce) => Ce === G.length - 1 ? {
827
827
  ...de,
828
828
  secondaryResponse: J.data,
829
829
  secondaryLoading: !1
@@ -831,9 +831,9 @@ const it = (e) => {
831
831
  )
832
832
  );
833
833
  } catch (J) {
834
- he(
835
- (W) => W.map(
836
- (de, Ce) => Ce === W.length - 1 ? { ...de, secondaryLoading: !1 } : de
834
+ pe(
835
+ (G) => G.map(
836
+ (de, Ce) => Ce === G.length - 1 ? { ...de, secondaryLoading: !1 } : de
837
837
  )
838
838
  ), console.error("Secondary flow JSON parse error:", J);
839
839
  }
@@ -845,7 +845,7 @@ const it = (e) => {
845
845
  }, Te = async (m) => {
846
846
  const j = m || H.trim();
847
847
  if (j) {
848
- V(!0), we(""), s.current = null, i.current = null, d.current = null, l.current = null, he(($) => [
848
+ V(!0), we(""), s.current = null, i.current = null, c.current = null, l.current = null, pe(($) => [
849
849
  ...$,
850
850
  {
851
851
  query: j,
@@ -885,8 +885,8 @@ const it = (e) => {
885
885
  let Se = "", Z = "";
886
886
  for (; ; ) {
887
887
  E(!0);
888
- const { done: K, value: Ne } = await ne.read();
889
- if (K) break;
888
+ const { done: W, value: Ne } = await ne.read();
889
+ if (W) break;
890
890
  Se += ke.decode(Ne, { stream: !0 });
891
891
  const ee = Se.split(`
892
892
  `);
@@ -895,17 +895,17 @@ const it = (e) => {
895
895
  if (k.startsWith("data:")) {
896
896
  const J = k.slice(5).trim();
897
897
  try {
898
- const W = JSON.parse(J);
899
- W.index == 1 && (Z = W.data), he(
898
+ const G = JSON.parse(J);
899
+ G.index == 1 && (Z = G.data), pe(
900
900
  (de) => de.map(
901
901
  (Ce, et) => et === de.length - 1 ? {
902
902
  ...Ce,
903
- [W.index == 0 ? "response" : W.index == 1 ? "keywords" : W.index == 2 ? "potentialQuestions" : "end"]: W.data
903
+ [G.index == 0 ? "response" : G.index == 1 ? "keywords" : G.index == 2 ? "potentialQuestions" : "end"]: G.data
904
904
  } : Ce
905
905
  )
906
906
  );
907
- } catch (W) {
908
- console.error("Error parsing JSON:", W);
907
+ } catch (G) {
908
+ console.error("Error parsing JSON:", G);
909
909
  }
910
910
  }
911
911
  }
@@ -935,11 +935,11 @@ const it = (e) => {
935
935
  loading: !1
936
936
  })).filter((D) => D.items.length > 0), B = (Y = ($ = ce[0]) == null ? void 0 : $.items) == null ? void 0 : Y[0];
937
937
  if (B) {
938
- i.current = B.product_id, s.current = B.product_name, d.current = (z = B.image) == null ? void 0 : z.link;
938
+ i.current = B.product_id, s.current = B.product_name, c.current = (z = B.image) == null ? void 0 : z.link;
939
939
  const D = typeof B.price == "number" ? B.price : null;
940
940
  l.current = D;
941
941
  }
942
- if (he(
942
+ if (pe(
943
943
  (D) => D.map(
944
944
  (X, ne) => ne === D.length - 1 ? {
945
945
  ...X,
@@ -947,7 +947,7 @@ const it = (e) => {
947
947
  productSnapshot: B ? {
948
948
  id: i.current,
949
949
  name: s.current,
950
- image: d.current,
950
+ image: c.current,
951
951
  price: l.current,
952
952
  points: 0,
953
953
  quantity: 1
@@ -966,7 +966,7 @@ const it = (e) => {
966
966
  E(!1);
967
967
  }
968
968
  }, er = async (m, j) => {
969
- var $, Y, z, A, ce, B, D, X, ne, ke, Se, Z, K, Ne, ee;
969
+ var $, Y, z, A, ce, B, D, X, ne, ke, Se, Z, W, Ne, ee;
970
970
  R(!0);
971
971
  try {
972
972
  const k = await jn(m.id);
@@ -984,15 +984,15 @@ const it = (e) => {
984
984
  }
985
985
  ];
986
986
  console.log(J, "product data", "app version", Lt);
987
- const W = JSON.parse(
987
+ const G = JSON.parse(
988
988
  sessionStorage.getItem("customerData") || "{}"
989
- ), de = (W == null ? void 0 : W.basketId) || localStorage.getItem(Kt), Ce = !1, et = localStorage.getItem(Et), mt = Date.now();
989
+ ), de = (G == null ? void 0 : G.basketId) || localStorage.getItem(Kt), Ce = !1, et = localStorage.getItem(Et), mt = Date.now();
990
990
  if (!Ce || !et || mt >= parseInt(et)) {
991
991
  const At = await On();
992
992
  let { customer_token: Be } = await An(
993
993
  At
994
994
  );
995
- if (Be = "Bearer " + g.access_token, !Be) {
995
+ if (Be = "Bearer " + h.access_token, !Be) {
996
996
  console.error("Failed to get customer_token");
997
997
  return;
998
998
  }
@@ -1019,14 +1019,14 @@ const it = (e) => {
1019
1019
  return;
1020
1020
  }
1021
1021
  }
1022
- const ht = {
1022
+ const pt = {
1023
1023
  productItems: [
1024
1024
  {
1025
1025
  productId: ((X = k.variants) == null ? void 0 : X[0].product_id) || ((ne = k.variants) == null ? void 0 : ne[0].productId) || (k == null ? void 0 : k.id),
1026
1026
  quantity: 1
1027
1027
  }
1028
1028
  ]
1029
- }, I = await $n(Be, ht);
1029
+ }, I = await $n(Be, pt);
1030
1030
  if (console.log(
1031
1031
  I,
1032
1032
  I == null ? void 0 : I.basket_id,
@@ -1060,7 +1060,7 @@ const it = (e) => {
1060
1060
  position: "bottom-right",
1061
1061
  autoClose: 3e3
1062
1062
  }), ((Z = k == null ? void 0 : k.response) == null ? void 0 : Z.status) === 404 || // Basket not found
1063
- ((K = k == null ? void 0 : k.response) == null ? void 0 : K.status) === 401 ? (((Ne = k == null ? void 0 : k.response) == null ? void 0 : Ne.status) === 404 && it(null), ((ee = k == null ? void 0 : k.response) == null ? void 0 : ee.status) === 401 && (it(null), Wt(null))) : (console.error("Failed to add product to basket:", k.message), Me.error("Failed to add product to cart", {
1063
+ ((W = k == null ? void 0 : k.response) == null ? void 0 : W.status) === 401 ? (((Ne = k == null ? void 0 : k.response) == null ? void 0 : Ne.status) === 404 && it(null), ((ee = k == null ? void 0 : k.response) == null ? void 0 : ee.status) === 401 && (it(null), Wt(null))) : (console.error("Failed to add product to basket:", k.message), Me.error("Failed to add product to cart", {
1064
1064
  position: "bottom-right",
1065
1065
  autoClose: 3e3
1066
1066
  }));
@@ -1069,7 +1069,7 @@ const it = (e) => {
1069
1069
  };
1070
1070
  return be(() => {
1071
1071
  F ? setTimeout(() => _(!0), 10) : _(!1);
1072
- }, [F]), /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ c(Yo, { open: y, onOpenChange: x, children: [
1072
+ }, [F]), /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ d(Yo, { open: y, onOpenChange: x, children: [
1073
1073
  /* @__PURE__ */ a(
1074
1074
  Jo,
1075
1075
  {
@@ -1078,7 +1078,7 @@ const it = (e) => {
1078
1078
  // background: storeDetails.tanyaThemeColor,
1079
1079
  },
1080
1080
  className: "flex items-center rounded-lg cursor-pointer hover:opacity-90 transition-opacity p-0",
1081
- children: /* @__PURE__ */ a("div", { className: "flex flex-col", children: /* @__PURE__ */ c(
1081
+ children: /* @__PURE__ */ a("div", { className: "flex flex-col", children: /* @__PURE__ */ d(
1082
1082
  "svg",
1083
1083
  {
1084
1084
  width: "40",
@@ -1087,7 +1087,7 @@ const it = (e) => {
1087
1087
  fill: "none",
1088
1088
  xmlns: "http://www.w3.org/2000/svg",
1089
1089
  children: [
1090
- /* @__PURE__ */ c("g", { clipPath: "url(#clip0_958_585)", children: [
1090
+ /* @__PURE__ */ d("g", { clipPath: "url(#clip0_958_585)", children: [
1091
1091
  /* @__PURE__ */ a(
1092
1092
  "path",
1093
1093
  {
@@ -1110,8 +1110,8 @@ const it = (e) => {
1110
1110
  }
1111
1111
  )
1112
1112
  ] }),
1113
- /* @__PURE__ */ c("defs", { children: [
1114
- /* @__PURE__ */ c(
1113
+ /* @__PURE__ */ d("defs", { children: [
1114
+ /* @__PURE__ */ d(
1115
1115
  "linearGradient",
1116
1116
  {
1117
1117
  id: "paint0_linear_958_585",
@@ -1133,7 +1133,7 @@ const it = (e) => {
1133
1133
  ) })
1134
1134
  }
1135
1135
  ),
1136
- F && /* @__PURE__ */ c(xe, { children: [
1136
+ F && /* @__PURE__ */ d(xe, { children: [
1137
1137
  /* @__PURE__ */ a(
1138
1138
  "div",
1139
1139
  {
@@ -1141,7 +1141,7 @@ const it = (e) => {
1141
1141
  onClick: () => x(!1)
1142
1142
  }
1143
1143
  ),
1144
- /* @__PURE__ */ c(
1144
+ /* @__PURE__ */ d(
1145
1145
  "div",
1146
1146
  {
1147
1147
  className: `
@@ -1155,7 +1155,7 @@ const it = (e) => {
1155
1155
  background: "linear-gradient(170.1deg, #FFFFFF 60.03%, #E3DEEF 99.59%)"
1156
1156
  },
1157
1157
  children: [
1158
- /* @__PURE__ */ c(
1158
+ /* @__PURE__ */ d(
1159
1159
  "div",
1160
1160
  {
1161
1161
  className: "flex justify-between p-3 bg-[#FFFFFF] border border-b-1 border-[#E5E5E5] ",
@@ -1168,8 +1168,8 @@ const it = (e) => {
1168
1168
  alignItems: "center",
1169
1169
  gap: "0.5rem"
1170
1170
  },
1171
- children: /* @__PURE__ */ c("div", { className: "flex flex-col gap-1", children: [
1172
- /* @__PURE__ */ c(
1171
+ children: /* @__PURE__ */ d("div", { className: "flex flex-col gap-1", children: [
1172
+ /* @__PURE__ */ d(
1173
1173
  "div",
1174
1174
  {
1175
1175
  className: "flex gap-2 w-28 h-12 text-center items-center p-2 border rounded-l-[20px] rounded-tr-[20px]",
@@ -1177,7 +1177,7 @@ const it = (e) => {
1177
1177
  background: "linear-gradient(265.62deg, #6851C6 5.24%, #8668FF 98.49%)"
1178
1178
  },
1179
1179
  children: [
1180
- /* @__PURE__ */ c(
1180
+ /* @__PURE__ */ d(
1181
1181
  "svg",
1182
1182
  {
1183
1183
  width: "20",
@@ -1201,7 +1201,7 @@ const it = (e) => {
1201
1201
  ]
1202
1202
  }
1203
1203
  ),
1204
- /* @__PURE__ */ c(
1204
+ /* @__PURE__ */ d(
1205
1205
  "p",
1206
1206
  {
1207
1207
  className: "text-[#5B5B5B] font-nunitoSans font-semibold",
@@ -1225,7 +1225,7 @@ const it = (e) => {
1225
1225
  gap: "1.25rem",
1226
1226
  margin: "0.75rem"
1227
1227
  },
1228
- children: /* @__PURE__ */ a("button", { onClick: () => x(!1), children: /* @__PURE__ */ c(
1228
+ children: /* @__PURE__ */ a("button", { onClick: () => x(!1), children: /* @__PURE__ */ d(
1229
1229
  "svg",
1230
1230
  {
1231
1231
  width: "24",
@@ -1234,7 +1234,7 @@ const it = (e) => {
1234
1234
  fill: "none",
1235
1235
  xmlns: "http://www.w3.org/2000/svg",
1236
1236
  children: [
1237
- /* @__PURE__ */ c("g", { clipPath: "url(#clip0_501_6036)", children: [
1237
+ /* @__PURE__ */ d("g", { clipPath: "url(#clip0_501_6036)", children: [
1238
1238
  /* @__PURE__ */ a(
1239
1239
  "path",
1240
1240
  {
@@ -1273,19 +1273,19 @@ const it = (e) => {
1273
1273
  ]
1274
1274
  }
1275
1275
  ),
1276
- /* @__PURE__ */ c("div", { className: "flex h-full md:flex-row lg:flex-row", children: [
1277
- /* @__PURE__ */ c(
1276
+ /* @__PURE__ */ d("div", { className: "flex h-full md:flex-row lg:flex-row", children: [
1277
+ /* @__PURE__ */ d(
1278
1278
  "div",
1279
1279
  {
1280
- className: `flex flex-col h-full ${U ? "lg:w-2/3 w-full" : "w-full"}`,
1280
+ className: `flex flex-col h-full ${q ? "lg:w-2/3 w-full" : "w-full"}`,
1281
1281
  children: [
1282
- /* @__PURE__ */ c(
1282
+ /* @__PURE__ */ d(
1283
1283
  "div",
1284
1284
  {
1285
1285
  ref: L,
1286
1286
  className: "overflow-y-auto pr-5 pb-2 space-y-4 hide-scrollbar flex-grow mb-24",
1287
1287
  children: [
1288
- (O == null ? void 0 : O.whomRequired) && /* @__PURE__ */ c(
1288
+ (O == null ? void 0 : O.whomRequired) && /* @__PURE__ */ d(
1289
1289
  "div",
1290
1290
  {
1291
1291
  className: "mx-3 p-3 rounded-2xl bg-[#FFFFFF]",
@@ -1309,7 +1309,7 @@ const it = (e) => {
1309
1309
  ),
1310
1310
  $e.map((m, j) => {
1311
1311
  var $, Y;
1312
- return /* @__PURE__ */ c("div", { children: [
1312
+ return /* @__PURE__ */ d("div", { children: [
1313
1313
  /* @__PURE__ */ a(
1314
1314
  "div",
1315
1315
  {
@@ -1342,7 +1342,7 @@ const it = (e) => {
1342
1342
  storeDetails: O
1343
1343
  }
1344
1344
  ),
1345
- (m == null ? void 0 : m.potentialQuestions.length) > 0 && /* @__PURE__ */ c("div", { className: "my-2 px-4 text-sm text-gray-700", children: [
1345
+ (m == null ? void 0 : m.potentialQuestions.length) > 0 && /* @__PURE__ */ d("div", { className: "my-2 px-4 text-sm text-gray-700", children: [
1346
1346
  /* @__PURE__ */ a(
1347
1347
  "p",
1348
1348
  {
@@ -1364,7 +1364,7 @@ const it = (e) => {
1364
1364
  A
1365
1365
  ))
1366
1366
  ] }),
1367
- (m == null ? void 0 : m.secondaryLoading) && /* @__PURE__ */ a("div", { className: "mt-3 mb-4 px-4", children: /* @__PURE__ */ c(
1367
+ (m == null ? void 0 : m.secondaryLoading) && /* @__PURE__ */ a("div", { className: "mt-3 mb-4 px-4", children: /* @__PURE__ */ d(
1368
1368
  "div",
1369
1369
  {
1370
1370
  className: "tanya-surprise-wrapper bg-indigo-300 text-sm px-7 py-4 rounded-r-xl rounded-bl-2xl w-full relative overflow-hidden",
@@ -1372,7 +1372,7 @@ const it = (e) => {
1372
1372
  margin: "0.75rem"
1373
1373
  },
1374
1374
  children: [
1375
- /* @__PURE__ */ c("div", { className: "flex gap-1", children: [
1375
+ /* @__PURE__ */ d("div", { className: "flex gap-1", children: [
1376
1376
  /* @__PURE__ */ a("div", { className: "tanya-sparkle tanya-sparkle-1", children: "✨" }),
1377
1377
  /* @__PURE__ */ a("div", { className: "tanya-sparkle tanya-sparkle-2", children: "✨" }),
1378
1378
  /* @__PURE__ */ a("div", { className: "tanya-sparkle tanya-sparkle-3", children: "✨" })
@@ -1397,7 +1397,7 @@ const it = (e) => {
1397
1397
  ]
1398
1398
  }
1399
1399
  ) }),
1400
- (m == null ? void 0 : m.secondaryResponse) && /* @__PURE__ */ a(xe, { children: /* @__PURE__ */ c("div", { className: "mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]", children: [
1400
+ (m == null ? void 0 : m.secondaryResponse) && /* @__PURE__ */ a(xe, { children: /* @__PURE__ */ d("div", { className: "mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]", children: [
1401
1401
  /* @__PURE__ */ a(
1402
1402
  "div",
1403
1403
  {
@@ -1413,7 +1413,7 @@ const it = (e) => {
1413
1413
  }
1414
1414
  ),
1415
1415
  m.productSnapshot && // chat.productSnapshot.points > 0 &&
1416
- /* @__PURE__ */ a("div", { className: "mt-4 w-full", children: /* @__PURE__ */ c(
1416
+ /* @__PURE__ */ a("div", { className: "mt-4 w-full", children: /* @__PURE__ */ d(
1417
1417
  "div",
1418
1418
  {
1419
1419
  className: "flex gap-4 items-stretch rounded-2xl p-4",
@@ -1440,8 +1440,8 @@ const it = (e) => {
1440
1440
  ) : /* @__PURE__ */ a("div", { className: "w-full h-full flex items-center justify-center text-xs text-gray-500", children: "No Image" })
1441
1441
  }
1442
1442
  ),
1443
- /* @__PURE__ */ c("div", { className: "flex flex-col flex-1 justify-between", children: [
1444
- /* @__PURE__ */ c("div", { children: [
1443
+ /* @__PURE__ */ d("div", { className: "flex flex-col flex-1 justify-between", children: [
1444
+ /* @__PURE__ */ d("div", { children: [
1445
1445
  /* @__PURE__ */ a("p", { className: "font-semibold text-[15px] leading-snug", children: m.productSnapshot.name }),
1446
1446
  /* @__PURE__ */ a("p", { className: "mt-1 text-[14px] font-medium", children: m.productSnapshot.price != null ? new Intl.NumberFormat(void 0, {
1447
1447
  style: "currency",
@@ -1449,23 +1449,23 @@ const it = (e) => {
1449
1449
  }).format(
1450
1450
  m.productSnapshot.price
1451
1451
  ) : "" }),
1452
- m.productSnapshot.points > 0 && /* @__PURE__ */ c("p", { className: "mt-1 text-xs opacity-80", children: [
1452
+ m.productSnapshot.points > 0 && /* @__PURE__ */ d("p", { className: "mt-1 text-xs opacity-80", children: [
1453
1453
  "You will earn",
1454
1454
  " ",
1455
- /* @__PURE__ */ c("strong", { children: [
1455
+ /* @__PURE__ */ d("strong", { children: [
1456
1456
  m.productSnapshot.points,
1457
1457
  " ",
1458
1458
  "points"
1459
1459
  ] })
1460
1460
  ] })
1461
1461
  ] }),
1462
- /* @__PURE__ */ c("div", { className: "mt-3 flex items-center gap-3", children: [
1463
- /* @__PURE__ */ c("div", { className: "flex items-center border rounded-full overflow-hidden", children: [
1462
+ /* @__PURE__ */ d("div", { className: "mt-3 flex items-center gap-3", children: [
1463
+ /* @__PURE__ */ d("div", { className: "flex items-center border rounded-full overflow-hidden", children: [
1464
1464
  /* @__PURE__ */ a(
1465
1465
  "button",
1466
1466
  {
1467
1467
  className: "px-3 py-1 text-sm",
1468
- onClick: () => he(
1468
+ onClick: () => pe(
1469
1469
  (z) => z.map(
1470
1470
  (A, ce) => ce === j && A.productSnapshot ? {
1471
1471
  ...A,
@@ -1491,7 +1491,7 @@ const it = (e) => {
1491
1491
  "button",
1492
1492
  {
1493
1493
  className: "px-3 py-1 text-sm",
1494
- onClick: () => he(
1494
+ onClick: () => pe(
1495
1495
  (z) => z.map(
1496
1496
  (A, ce) => ce === j && A.productSnapshot ? {
1497
1497
  ...A,
@@ -1550,7 +1550,7 @@ const it = (e) => {
1550
1550
  style: {
1551
1551
  background: "linear-gradient(180deg, #B09FFF 0%, #8D79F6 100%)"
1552
1552
  },
1553
- children: /* @__PURE__ */ c("div", { className: "flex items-center bg-[#FFFFFF] flex-1 rounded-xl px-2 py-1", children: [
1553
+ children: /* @__PURE__ */ d("div", { className: "flex items-center bg-[#FFFFFF] flex-1 rounded-xl px-2 py-1", children: [
1554
1554
  /* @__PURE__ */ a(
1555
1555
  "input",
1556
1556
  {
@@ -1629,14 +1629,14 @@ function oa(e, t) {
1629
1629
  }
1630
1630
  e.prototype = t === null ? Object.create(t) : (r.prototype = t.prototype, new r());
1631
1631
  }
1632
- var Qe = function() {
1633
- return Qe = Object.assign || function(t) {
1632
+ var Ge = function() {
1633
+ return Ge = Object.assign || function(t) {
1634
1634
  for (var r, n = 1, o = arguments.length; n < o; n++) {
1635
1635
  r = arguments[n];
1636
1636
  for (var s in r) Object.prototype.hasOwnProperty.call(r, s) && (t[s] = r[s]);
1637
1637
  }
1638
1638
  return t;
1639
- }, Qe.apply(this, arguments);
1639
+ }, Ge.apply(this, arguments);
1640
1640
  };
1641
1641
  function aa(e, t) {
1642
1642
  var r = {};
@@ -1646,9 +1646,9 @@ function aa(e, t) {
1646
1646
  t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
1647
1647
  return r;
1648
1648
  }
1649
- var nr = "Invariant Violation", Qr = Object.setPrototypeOf, sa = Qr === void 0 ? function(e, t) {
1649
+ var nr = "Invariant Violation", Gr = Object.setPrototypeOf, sa = Gr === void 0 ? function(e, t) {
1650
1650
  return e.__proto__ = t, e;
1651
- } : Qr, Ln = (
1651
+ } : Gr, Ln = (
1652
1652
  /** @class */
1653
1653
  (function(e) {
1654
1654
  oa(t, e);
@@ -1683,7 +1683,7 @@ function wt(e) {
1683
1683
  } catch {
1684
1684
  }
1685
1685
  }
1686
- const hr = wt(function() {
1686
+ const pr = wt(function() {
1687
1687
  return globalThis;
1688
1688
  }) || wt(function() {
1689
1689
  return window;
@@ -1700,10 +1700,10 @@ const hr = wt(function() {
1700
1700
  wt(function() {
1701
1701
  return wt.constructor("return this")();
1702
1702
  });
1703
- var Gr = /* @__PURE__ */ new Map();
1703
+ var Qr = /* @__PURE__ */ new Map();
1704
1704
  function la(e) {
1705
- var t = Gr.get(e) || 1;
1706
- return Gr.set(e, t + 1), "".concat(e, ":").concat(t, ":").concat(Math.random().toString(36).slice(2));
1705
+ var t = Qr.get(e) || 1;
1706
+ return Qr.set(e, t + 1), "".concat(e, ":").concat(t, ":").concat(Math.random().toString(36).slice(2));
1707
1707
  }
1708
1708
  function ca(e, t) {
1709
1709
  var r = la("stringifyForDisplay");
@@ -1749,7 +1749,7 @@ function Un(e) {
1749
1749
  }
1750
1750
  function kr(e, t) {
1751
1751
  if (t === void 0 && (t = []), !!e)
1752
- return hr[Xr] && hr[Xr](e, t.map(Un));
1752
+ return pr[Xr] && pr[Xr](e, t.map(Un));
1753
1753
  }
1754
1754
  function Sr(e, t) {
1755
1755
  if (t === void 0 && (t = []), !!e)
@@ -1867,10 +1867,10 @@ Array[ar] || (function(e) {
1867
1867
  }
1868
1868
  })(fa()), { bind: ai, noContext: si } = Nr;
1869
1869
  new Nr();
1870
- function ha(e, t) {
1870
+ function pa(e, t) {
1871
1871
  var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
1872
1872
  if (r) return (r = r.call(e)).next.bind(r);
1873
- if (Array.isArray(e) || (r = pa(e)) || t) {
1873
+ if (Array.isArray(e) || (r = ha(e)) || t) {
1874
1874
  r && (e = r);
1875
1875
  var n = 0;
1876
1876
  return function() {
@@ -1880,7 +1880,7 @@ function ha(e, t) {
1880
1880
  throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1881
1881
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1882
1882
  }
1883
- function pa(e, t) {
1883
+ function ha(e, t) {
1884
1884
  if (e) {
1885
1885
  if (typeof e == "string") return rn(e, t);
1886
1886
  var r = Object.prototype.toString.call(e).slice(8, -1);
@@ -1911,8 +1911,8 @@ var _r = function() {
1911
1911
  return Ir(e) ? Symbol[e] : "@@" + e;
1912
1912
  };
1913
1913
  _r() && !Ir("observable") && (Symbol.observable = Symbol("observable"));
1914
- var ga = Fr("iterator"), pr = Fr("observable"), qn = Fr("species");
1915
- function Qt(e, t) {
1914
+ var ga = Fr("iterator"), hr = Fr("observable"), qn = Fr("species");
1915
+ function Gt(e, t) {
1916
1916
  var r = e[t];
1917
1917
  if (r != null) {
1918
1918
  if (typeof r != "function") throw new TypeError(r + " is not a function");
@@ -1947,7 +1947,7 @@ function Rn(e) {
1947
1947
  if (typeof t == "function")
1948
1948
  t();
1949
1949
  else {
1950
- var r = Qt(t, "unsubscribe");
1950
+ var r = Gt(t, "unsubscribe");
1951
1951
  r && r.call(t);
1952
1952
  }
1953
1953
  } catch (n) {
@@ -1969,7 +1969,7 @@ function Hn(e, t, r) {
1969
1969
  e._state = "running";
1970
1970
  var n = e._observer;
1971
1971
  try {
1972
- var o = Qt(n, t);
1972
+ var o = Gt(n, t);
1973
1973
  switch (t) {
1974
1974
  case "next":
1975
1975
  o && o.call(n, r);
@@ -2065,15 +2065,15 @@ var xa = /* @__PURE__ */ (function() {
2065
2065
  i(new TypeError(n + " is not a function"));
2066
2066
  return;
2067
2067
  }
2068
- function d() {
2068
+ function c() {
2069
2069
  l.unsubscribe(), s();
2070
2070
  }
2071
2071
  var l = o.subscribe({
2072
- next: function(g) {
2072
+ next: function(h) {
2073
2073
  try {
2074
- n(g, d);
2075
- } catch (p) {
2076
- i(p), l.unsubscribe();
2074
+ n(h, c);
2075
+ } catch (g) {
2076
+ i(g), l.unsubscribe();
2077
2077
  }
2078
2078
  },
2079
2079
  error: i,
@@ -2086,16 +2086,16 @@ var xa = /* @__PURE__ */ (function() {
2086
2086
  var s = _t(this);
2087
2087
  return new s(function(i) {
2088
2088
  return o.subscribe({
2089
- next: function(d) {
2089
+ next: function(c) {
2090
2090
  try {
2091
- d = n(d);
2091
+ c = n(c);
2092
2092
  } catch (l) {
2093
2093
  return i.error(l);
2094
2094
  }
2095
- i.next(d);
2095
+ i.next(c);
2096
2096
  },
2097
- error: function(d) {
2098
- i.error(d);
2097
+ error: function(c) {
2098
+ i.error(c);
2099
2099
  },
2100
2100
  complete: function() {
2101
2101
  i.complete();
@@ -2108,16 +2108,16 @@ var xa = /* @__PURE__ */ (function() {
2108
2108
  var s = _t(this);
2109
2109
  return new s(function(i) {
2110
2110
  return o.subscribe({
2111
- next: function(d) {
2111
+ next: function(c) {
2112
2112
  try {
2113
- if (!n(d)) return;
2113
+ if (!n(c)) return;
2114
2114
  } catch (l) {
2115
2115
  return i.error(l);
2116
2116
  }
2117
- i.next(d);
2117
+ i.next(c);
2118
2118
  },
2119
- error: function(d) {
2120
- i.error(d);
2119
+ error: function(c) {
2120
+ i.error(c);
2121
2121
  },
2122
2122
  complete: function() {
2123
2123
  i.complete();
@@ -2127,37 +2127,37 @@ var xa = /* @__PURE__ */ (function() {
2127
2127
  }, t.reduce = function(n) {
2128
2128
  var o = this;
2129
2129
  if (typeof n != "function") throw new TypeError(n + " is not a function");
2130
- var s = _t(this), i = arguments.length > 1, d = !1, l = arguments[1], g = l;
2131
- return new s(function(p) {
2130
+ var s = _t(this), i = arguments.length > 1, c = !1, l = arguments[1], h = l;
2131
+ return new s(function(g) {
2132
2132
  return o.subscribe({
2133
2133
  next: function(y) {
2134
- var x = !d;
2135
- if (d = !0, !x || i)
2134
+ var x = !c;
2135
+ if (c = !0, !x || i)
2136
2136
  try {
2137
- g = n(g, y);
2137
+ h = n(h, y);
2138
2138
  } catch (S) {
2139
- return p.error(S);
2139
+ return g.error(S);
2140
2140
  }
2141
2141
  else
2142
- g = y;
2142
+ h = y;
2143
2143
  },
2144
2144
  error: function(y) {
2145
- p.error(y);
2145
+ g.error(y);
2146
2146
  },
2147
2147
  complete: function() {
2148
- if (!d && !i) return p.error(new TypeError("Cannot reduce an empty sequence"));
2149
- p.next(g), p.complete();
2148
+ if (!c && !i) return g.error(new TypeError("Cannot reduce an empty sequence"));
2149
+ g.next(h), g.complete();
2150
2150
  }
2151
2151
  });
2152
2152
  });
2153
2153
  }, t.concat = function() {
2154
2154
  for (var n = this, o = arguments.length, s = new Array(o), i = 0; i < o; i++)
2155
2155
  s[i] = arguments[i];
2156
- var d = _t(this);
2157
- return new d(function(l) {
2158
- var g, p = 0;
2156
+ var c = _t(this);
2157
+ return new c(function(l) {
2158
+ var h, g = 0;
2159
2159
  function y(x) {
2160
- g = x.subscribe({
2160
+ h = x.subscribe({
2161
2161
  next: function(S) {
2162
2162
  l.next(S);
2163
2163
  },
@@ -2165,12 +2165,12 @@ var xa = /* @__PURE__ */ (function() {
2165
2165
  l.error(S);
2166
2166
  },
2167
2167
  complete: function() {
2168
- p === s.length ? (g = void 0, l.complete()) : y(d.from(s[p++]));
2168
+ g === s.length ? (h = void 0, l.complete()) : y(c.from(s[g++]));
2169
2169
  }
2170
2170
  });
2171
2171
  }
2172
2172
  return y(n), function() {
2173
- g && (g.unsubscribe(), g = void 0);
2173
+ h && (h.unsubscribe(), h = void 0);
2174
2174
  };
2175
2175
  });
2176
2176
  }, t.flatMap = function(n) {
@@ -2178,15 +2178,15 @@ var xa = /* @__PURE__ */ (function() {
2178
2178
  if (typeof n != "function") throw new TypeError(n + " is not a function");
2179
2179
  var s = _t(this);
2180
2180
  return new s(function(i) {
2181
- var d = [], l = o.subscribe({
2182
- next: function(p) {
2181
+ var c = [], l = o.subscribe({
2182
+ next: function(g) {
2183
2183
  if (n)
2184
2184
  try {
2185
- p = n(p);
2185
+ g = n(g);
2186
2186
  } catch (x) {
2187
2187
  return i.error(x);
2188
2188
  }
2189
- var y = s.from(p).subscribe({
2189
+ var y = s.from(g).subscribe({
2190
2190
  next: function(x) {
2191
2191
  i.next(x);
2192
2192
  },
@@ -2194,60 +2194,60 @@ var xa = /* @__PURE__ */ (function() {
2194
2194
  i.error(x);
2195
2195
  },
2196
2196
  complete: function() {
2197
- var x = d.indexOf(y);
2198
- x >= 0 && d.splice(x, 1), g();
2197
+ var x = c.indexOf(y);
2198
+ x >= 0 && c.splice(x, 1), h();
2199
2199
  }
2200
2200
  });
2201
- d.push(y);
2201
+ c.push(y);
2202
2202
  },
2203
- error: function(p) {
2204
- i.error(p);
2203
+ error: function(g) {
2204
+ i.error(g);
2205
2205
  },
2206
2206
  complete: function() {
2207
- g();
2207
+ h();
2208
2208
  }
2209
2209
  });
2210
- function g() {
2211
- l.closed && d.length === 0 && i.complete();
2210
+ function h() {
2211
+ l.closed && c.length === 0 && i.complete();
2212
2212
  }
2213
2213
  return function() {
2214
- d.forEach(function(p) {
2215
- return p.unsubscribe();
2214
+ c.forEach(function(g) {
2215
+ return g.unsubscribe();
2216
2216
  }), l.unsubscribe();
2217
2217
  };
2218
2218
  });
2219
- }, t[pr] = function() {
2219
+ }, t[hr] = function() {
2220
2220
  return this;
2221
2221
  }, e.from = function(n) {
2222
2222
  var o = typeof this == "function" ? this : e;
2223
2223
  if (n == null) throw new TypeError(n + " is not an object");
2224
- var s = Qt(n, pr);
2224
+ var s = Gt(n, hr);
2225
2225
  if (s) {
2226
2226
  var i = s.call(n);
2227
2227
  if (Object(i) !== i) throw new TypeError(i + " is not an object");
2228
- return wa(i) && i.constructor === o ? i : new o(function(d) {
2229
- return i.subscribe(d);
2228
+ return wa(i) && i.constructor === o ? i : new o(function(c) {
2229
+ return i.subscribe(c);
2230
2230
  });
2231
2231
  }
2232
- if (Ir("iterator") && (s = Qt(n, ga), s))
2233
- return new o(function(d) {
2232
+ if (Ir("iterator") && (s = Gt(n, ga), s))
2233
+ return new o(function(c) {
2234
2234
  Ut(function() {
2235
- if (!d.closed) {
2236
- for (var l = ha(s.call(n)), g; !(g = l()).done; ) {
2237
- var p = g.value;
2238
- if (d.next(p), d.closed) return;
2235
+ if (!c.closed) {
2236
+ for (var l = pa(s.call(n)), h; !(h = l()).done; ) {
2237
+ var g = h.value;
2238
+ if (c.next(g), c.closed) return;
2239
2239
  }
2240
- d.complete();
2240
+ c.complete();
2241
2241
  }
2242
2242
  });
2243
2243
  });
2244
2244
  if (Array.isArray(n))
2245
- return new o(function(d) {
2245
+ return new o(function(c) {
2246
2246
  Ut(function() {
2247
- if (!d.closed) {
2247
+ if (!c.closed) {
2248
2248
  for (var l = 0; l < n.length; ++l)
2249
- if (d.next(n[l]), d.closed) return;
2250
- d.complete();
2249
+ if (c.next(n[l]), c.closed) return;
2250
+ c.complete();
2251
2251
  }
2252
2252
  });
2253
2253
  });
@@ -2256,12 +2256,12 @@ var xa = /* @__PURE__ */ (function() {
2256
2256
  for (var n = arguments.length, o = new Array(n), s = 0; s < n; s++)
2257
2257
  o[s] = arguments[s];
2258
2258
  var i = typeof this == "function" ? this : e;
2259
- return new i(function(d) {
2259
+ return new i(function(c) {
2260
2260
  Ut(function() {
2261
- if (!d.closed) {
2261
+ if (!c.closed) {
2262
2262
  for (var l = 0; l < o.length; ++l)
2263
- if (d.next(o[l]), d.closed) return;
2264
- d.complete();
2263
+ if (c.next(o[l]), c.closed) return;
2264
+ c.complete();
2265
2265
  }
2266
2266
  });
2267
2267
  });
@@ -2274,7 +2274,7 @@ var xa = /* @__PURE__ */ (function() {
2274
2274
  })();
2275
2275
  _r() && Object.defineProperty(me, Symbol("extensions"), {
2276
2276
  value: {
2277
- symbol: pr,
2277
+ symbol: hr,
2278
2278
  hostReportError: xt
2279
2279
  },
2280
2280
  configurable: !0
@@ -2317,10 +2317,10 @@ function ka(e) {
2317
2317
  return e;
2318
2318
  }
2319
2319
  function Sa(e, t) {
2320
- var r = Qe({}, e), n = function(s) {
2321
- typeof s == "function" ? r = Qe(Qe({}, r), s(r)) : r = Qe(Qe({}, r), s);
2320
+ var r = Ge({}, e), n = function(s) {
2321
+ typeof s == "function" ? r = Ge(Ge({}, r), s(r)) : r = Ge(Ge({}, r), s);
2322
2322
  }, o = function() {
2323
- return Qe({}, r);
2323
+ return Ge({}, r);
2324
2324
  };
2325
2325
  return Object.defineProperty(t, "setContext", {
2326
2326
  enumerable: !1,
@@ -2339,7 +2339,7 @@ function Na(e) {
2339
2339
  };
2340
2340
  return t.operationName || (t.operationName = typeof t.query != "string" ? da(t.query) || void 0 : ""), t;
2341
2341
  }
2342
- var Ca = Symbol.for("apollo.deprecations"), _a = hr, Ia = new Nr();
2342
+ var Ca = Symbol.for("apollo.deprecations"), _a = pr, Ia = new Nr();
2343
2343
  function Fa(e) {
2344
2344
  return _a[Ca] || (Ia.getValue() || []).includes(e);
2345
2345
  }
@@ -2371,10 +2371,10 @@ var Vn = (
2371
2371
  });
2372
2372
  }, e.split = function(t, r, n) {
2373
2373
  var o = It(r), s = It(n || new e(sn)), i;
2374
- return Bt(o) && Bt(s) ? i = new e(function(d) {
2375
- return t(d) ? o.request(d) || me.of() : s.request(d) || me.of();
2376
- }) : i = new e(function(d, l) {
2377
- return t(d) ? o.request(d, l) || me.of() : s.request(d, l) || me.of();
2374
+ return Bt(o) && Bt(s) ? i = new e(function(c) {
2375
+ return t(c) ? o.request(c) || me.of() : s.request(c) || me.of();
2376
+ }) : i = new e(function(c, l) {
2377
+ return t(c) ? o.request(c, l) || me.of() : s.request(c, l) || me.of();
2378
2378
  }), Object.assign(i, { left: o, right: s });
2379
2379
  }, e.execute = function(t, r) {
2380
2380
  return t.request(Sa(r.context, Na(ka(r)))) || me.of();
@@ -2384,12 +2384,12 @@ var Vn = (
2384
2384
  return globalThis.__DEV__ !== !1 && or.warn(47, n), n;
2385
2385
  var o = It(r), s;
2386
2386
  return Bt(o) ? s = new e(function(i) {
2387
- return n.request(i, function(d) {
2388
- return o.request(d) || me.of();
2387
+ return n.request(i, function(c) {
2388
+ return o.request(c) || me.of();
2389
2389
  }) || me.of();
2390
- }) : s = new e(function(i, d) {
2390
+ }) : s = new e(function(i, c) {
2391
2391
  return n.request(i, function(l) {
2392
- return o.request(l, d) || me.of();
2392
+ return o.request(l, c) || me.of();
2393
2393
  }) || me.of();
2394
2394
  }), Object.assign(s, { left: n, right: o });
2395
2395
  }, e.prototype.split = function(t, r, n) {
@@ -2414,8 +2414,8 @@ function Ta(e) {
2414
2414
  var n = aa(t, []);
2415
2415
  return new me(function(o) {
2416
2416
  var s, i = !1;
2417
- return Promise.resolve(n).then(function(d) {
2418
- return e(d, t.getContext());
2417
+ return Promise.resolve(n).then(function(c) {
2418
+ return e(c, t.getContext());
2419
2419
  }).then(t.setContext).then(function() {
2420
2420
  i || (s = r(t).subscribe({
2421
2421
  next: o.next.bind(o),
@@ -2474,8 +2474,8 @@ function Da(e, t) {
2474
2474
  if (r[i]) return o[i] = [];
2475
2475
  if (!(i in o)) {
2476
2476
  o[i] = null;
2477
- const d = n[i] && n[i].parent, l = d && s(d);
2478
- l && (o[i] = [d].concat(l));
2477
+ const c = n[i] && n[i].parent, l = c && s(c);
2478
+ l && (o[i] = [c].concat(l));
2479
2479
  }
2480
2480
  return o[i];
2481
2481
  }
@@ -2486,13 +2486,13 @@ const Yn = Object.freeze({
2486
2486
  top: 0,
2487
2487
  width: 16,
2488
2488
  height: 16
2489
- }), Gt = Object.freeze({
2489
+ }), Qt = Object.freeze({
2490
2490
  rotate: 0,
2491
2491
  vFlip: !1,
2492
2492
  hFlip: !1
2493
2493
  }), Pr = Object.freeze({
2494
2494
  ...Yn,
2495
- ...Gt
2495
+ ...Qt
2496
2496
  }), wr = Object.freeze({
2497
2497
  ...Pr,
2498
2498
  body: "",
@@ -2506,14 +2506,14 @@ function La(e, t) {
2506
2506
  }
2507
2507
  function ln(e, t) {
2508
2508
  const r = La(e, t);
2509
- for (const n in wr) n in Gt ? n in e && !(n in r) && (r[n] = Gt[n]) : n in t ? r[n] = t[n] : n in e && (r[n] = e[n]);
2509
+ for (const n in wr) n in Qt ? n in e && !(n in r) && (r[n] = Qt[n]) : n in t ? r[n] = t[n] : n in e && (r[n] = e[n]);
2510
2510
  return r;
2511
2511
  }
2512
2512
  function za(e, t, r) {
2513
2513
  const n = e.icons, o = e.aliases || /* @__PURE__ */ Object.create(null);
2514
2514
  let s = {};
2515
- function i(d) {
2516
- s = ln(n[d] || o[d], s);
2515
+ function i(c) {
2516
+ s = ln(n[c] || o[c], s);
2517
2517
  }
2518
2518
  return i(t), r.forEach(i), ln(e, s);
2519
2519
  }
@@ -2582,7 +2582,7 @@ function Ua(e, t, r) {
2582
2582
  }
2583
2583
  return !1;
2584
2584
  }
2585
- const Qn = /^[a-z0-9]+(-[a-z0-9]+)*$/, Xt = (e, t, r, n = "") => {
2585
+ const Gn = /^[a-z0-9]+(-[a-z0-9]+)*$/, Xt = (e, t, r, n = "") => {
2586
2586
  const o = e.split(":");
2587
2587
  if (e.slice(0, 1) === "@") {
2588
2588
  if (o.length < 2 || o.length > 3) return null;
@@ -2590,34 +2590,34 @@ const Qn = /^[a-z0-9]+(-[a-z0-9]+)*$/, Xt = (e, t, r, n = "") => {
2590
2590
  }
2591
2591
  if (o.length > 3 || !o.length) return null;
2592
2592
  if (o.length > 1) {
2593
- const d = o.pop(), l = o.pop(), g = {
2593
+ const c = o.pop(), l = o.pop(), h = {
2594
2594
  provider: o.length > 0 ? o[0] : n,
2595
2595
  prefix: l,
2596
- name: d
2596
+ name: c
2597
2597
  };
2598
- return t && !qt(g) ? null : g;
2598
+ return t && !qt(h) ? null : h;
2599
2599
  }
2600
2600
  const s = o[0], i = s.split("-");
2601
2601
  if (i.length > 1) {
2602
- const d = {
2602
+ const c = {
2603
2603
  provider: n,
2604
2604
  prefix: i.shift(),
2605
2605
  name: i.join("-")
2606
2606
  };
2607
- return t && !qt(d) ? null : d;
2607
+ return t && !qt(c) ? null : c;
2608
2608
  }
2609
2609
  if (r && n === "") {
2610
- const d = {
2610
+ const c = {
2611
2611
  provider: n,
2612
2612
  prefix: "",
2613
2613
  name: s
2614
2614
  };
2615
- return t && !qt(d, r) ? null : d;
2615
+ return t && !qt(c, r) ? null : c;
2616
2616
  }
2617
2617
  return null;
2618
2618
  }, qt = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
2619
2619
  let Ot = !1;
2620
- function Gn(e) {
2620
+ function Qn(e) {
2621
2621
  return typeof e == "boolean" && (Ot = e), Ot;
2622
2622
  }
2623
2623
  function dn(e) {
@@ -2654,7 +2654,7 @@ const Xn = Object.freeze({
2654
2654
  height: null
2655
2655
  }), Zn = Object.freeze({
2656
2656
  ...Xn,
2657
- ...Gt
2657
+ ...Qt
2658
2658
  }), Ha = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Va = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
2659
2659
  function un(e, t, r) {
2660
2660
  if (t === 1) return e;
@@ -2666,8 +2666,8 @@ function un(e, t, r) {
2666
2666
  let s = n.shift(), i = Va.test(s);
2667
2667
  for (; ; ) {
2668
2668
  if (i) {
2669
- const d = parseFloat(s);
2670
- isNaN(d) ? o.push(s) : o.push(Math.ceil(d * t * r) / r);
2669
+ const c = parseFloat(s);
2670
+ isNaN(c) ? o.push(s) : o.push(Math.ceil(c * t * r) / r);
2671
2671
  } else o.push(s);
2672
2672
  if (s = n.shift(), s === void 0) return o.join("");
2673
2673
  i = !i;
@@ -2696,7 +2696,7 @@ function Ka(e, t, r) {
2696
2696
  return Ja(n.defs, t + n.content + r);
2697
2697
  }
2698
2698
  const Wa = (e) => e === "unset" || e === "undefined" || e === "none";
2699
- function Qa(e, t) {
2699
+ function Ga(e, t) {
2700
2700
  const r = {
2701
2701
  ...Pr,
2702
2702
  ...e
@@ -2728,18 +2728,18 @@ function Qa(e, t) {
2728
2728
  }
2729
2729
  w % 2 === 1 && (o.left !== o.top && (V = o.left, o.left = o.top, o.top = V), o.width !== o.height && (V = o.width, o.width = o.height, o.height = V)), N.length && (s = Ka(s, '<g transform="' + N.join(" ") + '">', "</g>"));
2730
2730
  });
2731
- const i = n.width, d = n.height, l = o.width, g = o.height;
2732
- let p, y;
2733
- i === null ? (y = d === null ? "1em" : d === "auto" ? g : d, p = un(y, l / g)) : (p = i === "auto" ? l : i, y = d === null ? un(p, g / l) : d === "auto" ? g : d);
2731
+ const i = n.width, c = n.height, l = o.width, h = o.height;
2732
+ let g, y;
2733
+ i === null ? (y = c === null ? "1em" : c === "auto" ? h : c, g = un(y, l / h)) : (g = i === "auto" ? l : i, y = c === null ? un(g, h / l) : c === "auto" ? h : c);
2734
2734
  const x = {}, S = (F, N) => {
2735
2735
  Wa(N) || (x[F] = N.toString());
2736
2736
  };
2737
- S("width", p), S("height", y);
2737
+ S("width", g), S("height", y);
2738
2738
  const _ = [
2739
2739
  o.left,
2740
2740
  o.top,
2741
2741
  l,
2742
- g
2742
+ h
2743
2743
  ];
2744
2744
  return x.viewBox = _.join(" "), {
2745
2745
  attributes: x,
@@ -2747,17 +2747,17 @@ function Qa(e, t) {
2747
2747
  body: s
2748
2748
  };
2749
2749
  }
2750
- const Ga = /\sid="(\S+)"/g, Xa = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
2750
+ const Qa = /\sid="(\S+)"/g, Xa = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
2751
2751
  let Za = 0;
2752
2752
  function es(e, t = Xa) {
2753
2753
  const r = [];
2754
2754
  let n;
2755
- for (; n = Ga.exec(e); ) r.push(n[1]);
2755
+ for (; n = Qa.exec(e); ) r.push(n[1]);
2756
2756
  if (!r.length) return e;
2757
2757
  const o = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
2758
2758
  return r.forEach((s) => {
2759
- const i = typeof t == "function" ? t(s) : t + (Za++).toString(), d = s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2760
- e = e.replace(new RegExp('([#;"])(' + d + ')([")]|\\.[a-z])', "g"), "$1" + i + o + "$3");
2759
+ const i = typeof t == "function" ? t(s) : t + (Za++).toString(), c = s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2760
+ e = e.replace(new RegExp('([#;"])(' + c + ')([")]|\\.[a-z])', "g"), "$1" + i + o + "$3");
2761
2761
  }), e = e.replace(new RegExp(o, "g"), ""), e;
2762
2762
  }
2763
2763
  const yr = /* @__PURE__ */ Object.create(null);
@@ -2825,14 +2825,14 @@ const ss = (e, t, r) => {
2825
2825
  provider: e,
2826
2826
  prefix: t,
2827
2827
  icons: []
2828
- }, d = 0;
2829
- return r.forEach((l, g) => {
2830
- d += l.length + 1, d >= o && g > 0 && (n.push(i), i = {
2828
+ }, c = 0;
2829
+ return r.forEach((l, h) => {
2830
+ c += l.length + 1, c >= o && h > 0 && (n.push(i), i = {
2831
2831
  type: s,
2832
2832
  provider: e,
2833
2833
  prefix: t,
2834
2834
  icons: []
2835
- }, d = l.length), i.icons.push(l);
2835
+ }, c = l.length), i.icons.push(l);
2836
2836
  }), n.push(i), n;
2837
2837
  };
2838
2838
  function is(e) {
@@ -2850,7 +2850,7 @@ const ls = (e, t, r) => {
2850
2850
  let n = is(t.provider);
2851
2851
  switch (t.type) {
2852
2852
  case "icons": {
2853
- const s = t.prefix, d = t.icons.join(","), l = new URLSearchParams({ icons: d });
2853
+ const s = t.prefix, c = t.icons.join(","), l = new URLSearchParams({ icons: c });
2854
2854
  n += s + ".json?" + l.toString();
2855
2855
  break;
2856
2856
  }
@@ -2904,24 +2904,24 @@ function ds(e) {
2904
2904
  let r = !1;
2905
2905
  const n = e.provider, o = e.prefix;
2906
2906
  t.forEach((s) => {
2907
- const i = s.icons, d = i.pending.length;
2907
+ const i = s.icons, c = i.pending.length;
2908
2908
  i.pending = i.pending.filter((l) => {
2909
2909
  if (l.prefix !== o) return !0;
2910
- const g = l.name;
2911
- if (e.icons[g]) i.loaded.push({
2910
+ const h = l.name;
2911
+ if (e.icons[h]) i.loaded.push({
2912
2912
  provider: n,
2913
2913
  prefix: o,
2914
- name: g
2914
+ name: h
2915
2915
  });
2916
- else if (e.missing.has(g)) i.missing.push({
2916
+ else if (e.missing.has(h)) i.missing.push({
2917
2917
  provider: n,
2918
2918
  prefix: o,
2919
- name: g
2919
+ name: h
2920
2920
  });
2921
2921
  else
2922
2922
  return r = !0, !0;
2923
2923
  return !1;
2924
- }), i.pending.length !== d && (r || eo([e], s.id), s.callback(i.loaded.slice(0), i.missing.slice(0), i.pending.slice(0), s.abort));
2924
+ }), i.pending.length !== c && (r || eo([e], s.id), s.callback(i.loaded.slice(0), i.missing.slice(0), i.pending.slice(0), s.abort));
2925
2925
  });
2926
2926
  }));
2927
2927
  }
@@ -2954,25 +2954,25 @@ function ms(e) {
2954
2954
  return e.forEach((o) => {
2955
2955
  if (n.name === o.name && n.prefix === o.prefix && n.provider === o.provider) return;
2956
2956
  n = o;
2957
- const s = o.provider, i = o.prefix, d = o.name, l = r[s] || (r[s] = /* @__PURE__ */ Object.create(null)), g = l[i] || (l[i] = bt(s, i));
2958
- let p;
2959
- d in g.icons ? p = t.loaded : i === "" || g.missing.has(d) ? p = t.missing : p = t.pending;
2957
+ const s = o.provider, i = o.prefix, c = o.name, l = r[s] || (r[s] = /* @__PURE__ */ Object.create(null)), h = l[i] || (l[i] = bt(s, i));
2958
+ let g;
2959
+ c in h.icons ? g = t.loaded : i === "" || h.missing.has(c) ? g = t.missing : g = t.pending;
2960
2960
  const y = {
2961
2961
  provider: s,
2962
2962
  prefix: i,
2963
- name: d
2963
+ name: c
2964
2964
  };
2965
- p.push(y);
2965
+ g.push(y);
2966
2966
  }), t;
2967
2967
  }
2968
- function hs(e, t = !0, r = !1) {
2968
+ function ps(e, t = !0, r = !1) {
2969
2969
  const n = [];
2970
2970
  return e.forEach((o) => {
2971
2971
  const s = typeof o == "string" ? Xt(o, t, r) : o;
2972
2972
  s && n.push(s);
2973
2973
  }), n;
2974
2974
  }
2975
- const ps = {
2975
+ const hs = {
2976
2976
  resources: [],
2977
2977
  index: 0,
2978
2978
  timeout: 2e3,
@@ -2991,8 +2991,8 @@ function gs(e, t, r, n) {
2991
2991
  }
2992
2992
  i = i.concat(E);
2993
2993
  } else i = e.resources.slice(s).concat(e.resources.slice(0, s));
2994
- const d = Date.now();
2995
- let l = "pending", g = 0, p, y = null, x = [], S = [];
2994
+ const c = Date.now();
2995
+ let l = "pending", h = 0, g, y = null, x = [], S = [];
2996
2996
  typeof n == "function" && S.push(n);
2997
2997
  function _() {
2998
2998
  y && (clearTimeout(y), y = null);
@@ -3007,10 +3007,10 @@ function gs(e, t, r, n) {
3007
3007
  }
3008
3008
  function P() {
3009
3009
  return {
3010
- startTime: d,
3010
+ startTime: c,
3011
3011
  payload: t,
3012
3012
  status: l,
3013
- queriesSent: g,
3013
+ queriesSent: h,
3014
3014
  queriesPending: x.length,
3015
3015
  subscribe: N,
3016
3016
  abort: F
@@ -3018,7 +3018,7 @@ function gs(e, t, r, n) {
3018
3018
  }
3019
3019
  function R() {
3020
3020
  l = "failed", S.forEach((E) => {
3021
- E(void 0, p);
3021
+ E(void 0, g);
3022
3022
  });
3023
3023
  }
3024
3024
  function w() {
@@ -3028,7 +3028,7 @@ function gs(e, t, r, n) {
3028
3028
  }
3029
3029
  function V(E, H, we) {
3030
3030
  const ae = H !== "success";
3031
- switch (x = x.filter((G) => G !== E), l) {
3031
+ switch (x = x.filter((Q) => Q !== E), l) {
3032
3032
  case "pending":
3033
3033
  break;
3034
3034
  case "failed":
@@ -3038,19 +3038,19 @@ function gs(e, t, r, n) {
3038
3038
  return;
3039
3039
  }
3040
3040
  if (H === "abort") {
3041
- p = we, R();
3041
+ g = we, R();
3042
3042
  return;
3043
3043
  }
3044
3044
  if (ae) {
3045
- p = we, x.length || (i.length ? je() : R());
3045
+ g = we, x.length || (i.length ? je() : R());
3046
3046
  return;
3047
3047
  }
3048
3048
  if (_(), w(), !e.random) {
3049
- const G = e.resources.indexOf(E.resource);
3050
- G !== -1 && G !== e.index && (e.index = G);
3049
+ const Q = e.resources.indexOf(E.resource);
3050
+ Q !== -1 && Q !== e.index && (e.index = Q);
3051
3051
  }
3052
- l = "completed", S.forEach((G) => {
3053
- G(we);
3052
+ l = "completed", S.forEach((Q) => {
3053
+ Q(we);
3054
3054
  });
3055
3055
  }
3056
3056
  function je() {
@@ -3074,33 +3074,33 @@ function gs(e, t, r, n) {
3074
3074
  V(H, we, ae);
3075
3075
  }
3076
3076
  };
3077
- x.push(H), g++, y = setTimeout(je, e.rotate), r(E, t, H.callback);
3077
+ x.push(H), h++, y = setTimeout(je, e.rotate), r(E, t, H.callback);
3078
3078
  }
3079
3079
  return setTimeout(je), P;
3080
3080
  }
3081
3081
  function to(e) {
3082
3082
  const t = {
3083
- ...ps,
3083
+ ...hs,
3084
3084
  ...e
3085
3085
  };
3086
3086
  let r = [];
3087
3087
  function n() {
3088
- r = r.filter((d) => d().status === "pending");
3088
+ r = r.filter((c) => c().status === "pending");
3089
3089
  }
3090
- function o(d, l, g) {
3091
- const p = gs(t, d, l, (y, x) => {
3092
- n(), g && g(y, x);
3090
+ function o(c, l, h) {
3091
+ const g = gs(t, c, l, (y, x) => {
3092
+ n(), h && h(y, x);
3093
3093
  });
3094
- return r.push(p), p;
3094
+ return r.push(g), g;
3095
3095
  }
3096
- function s(d) {
3097
- return r.find((l) => d(l)) || null;
3096
+ function s(c) {
3097
+ return r.find((l) => c(l)) || null;
3098
3098
  }
3099
3099
  return {
3100
3100
  query: o,
3101
3101
  find: s,
3102
- setIndex: (d) => {
3103
- t.index = d;
3102
+ setIndex: (c) => {
3103
+ t.index = c;
3104
3104
  },
3105
3105
  getIndex: () => t.index,
3106
3106
  cleanup: n
@@ -3134,13 +3134,13 @@ function ys(e, t, r) {
3134
3134
  const s = Tr(e);
3135
3135
  if (s) {
3136
3136
  n = to(s);
3137
- const i = e.resources ? e.resources[0] : "", d = xr(i);
3138
- d && (o = d.send);
3137
+ const i = e.resources ? e.resources[0] : "", c = xr(i);
3138
+ c && (o = c.send);
3139
3139
  }
3140
3140
  }
3141
3141
  return !n || !o ? (r(void 0, 424), mn) : n.query(t, o, r)().abort;
3142
3142
  }
3143
- function hn() {
3143
+ function pn() {
3144
3144
  }
3145
3145
  function xs(e) {
3146
3146
  e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
@@ -3150,7 +3150,7 @@ function xs(e) {
3150
3150
  function bs(e) {
3151
3151
  const t = [], r = [];
3152
3152
  return e.forEach((n) => {
3153
- (n.match(Qn) ? t : r).push(n);
3153
+ (n.match(Gn) ? t : r).push(n);
3154
3154
  }), {
3155
3155
  valid: t,
3156
3156
  invalid: r
@@ -3173,7 +3173,7 @@ function Pt(e, t, r) {
3173
3173
  }
3174
3174
  n(), xs(e);
3175
3175
  }
3176
- function pn(e, t) {
3176
+ function hn(e, t) {
3177
3177
  e instanceof Promise ? e.then((r) => {
3178
3178
  t(r);
3179
3179
  }).catch(() => {
@@ -3187,63 +3187,63 @@ function vs(e, t) {
3187
3187
  if (delete e.iconsToLoad, !o || !o.length) return;
3188
3188
  const s = e.loadIcon;
3189
3189
  if (e.loadIcons && (o.length > 1 || !s)) {
3190
- pn(e.loadIcons(o, n, r), (p) => {
3191
- Pt(e, o, p);
3190
+ hn(e.loadIcons(o, n, r), (g) => {
3191
+ Pt(e, o, g);
3192
3192
  });
3193
3193
  return;
3194
3194
  }
3195
3195
  if (s) {
3196
- o.forEach((p) => {
3197
- const y = s(p, n, r);
3198
- pn(y, (x) => {
3196
+ o.forEach((g) => {
3197
+ const y = s(g, n, r);
3198
+ hn(y, (x) => {
3199
3199
  const S = x ? {
3200
3200
  prefix: n,
3201
- icons: { [p]: x }
3201
+ icons: { [g]: x }
3202
3202
  } : null;
3203
- Pt(e, [p], S);
3203
+ Pt(e, [g], S);
3204
3204
  });
3205
3205
  });
3206
3206
  return;
3207
3207
  }
3208
- const { valid: i, invalid: d } = bs(o);
3209
- if (d.length && Pt(e, d, null), !i.length) return;
3210
- const l = n.match(Qn) ? xr(r) : null;
3208
+ const { valid: i, invalid: c } = bs(o);
3209
+ if (c.length && Pt(e, c, null), !i.length) return;
3210
+ const l = n.match(Gn) ? xr(r) : null;
3211
3211
  if (!l) {
3212
3212
  Pt(e, i, null);
3213
3213
  return;
3214
3214
  }
3215
- l.prepare(r, n, i).forEach((p) => {
3216
- ys(r, p, (y) => {
3217
- Pt(e, p.icons, y);
3215
+ l.prepare(r, n, i).forEach((g) => {
3216
+ ys(r, g, (y) => {
3217
+ Pt(e, g.icons, y);
3218
3218
  });
3219
3219
  });
3220
3220
  }));
3221
3221
  }
3222
3222
  const ks = (e, t) => {
3223
- const r = hs(e, !0, Gn()), n = ms(r);
3223
+ const r = ps(e, !0, Qn()), n = ms(r);
3224
3224
  if (!n.pending.length) {
3225
3225
  let l = !0;
3226
3226
  return t && setTimeout(() => {
3227
- l && t(n.loaded, n.missing, n.pending, hn);
3227
+ l && t(n.loaded, n.missing, n.pending, pn);
3228
3228
  }), () => {
3229
3229
  l = !1;
3230
3230
  };
3231
3231
  }
3232
3232
  const o = /* @__PURE__ */ Object.create(null), s = [];
3233
- let i, d;
3233
+ let i, c;
3234
3234
  return n.pending.forEach((l) => {
3235
- const { provider: g, prefix: p } = l;
3236
- if (p === d && g === i) return;
3237
- i = g, d = p, s.push(bt(g, p));
3238
- const y = o[g] || (o[g] = /* @__PURE__ */ Object.create(null));
3239
- y[p] || (y[p] = []);
3235
+ const { provider: h, prefix: g } = l;
3236
+ if (g === c && h === i) return;
3237
+ i = h, c = g, s.push(bt(h, g));
3238
+ const y = o[h] || (o[h] = /* @__PURE__ */ Object.create(null));
3239
+ y[g] || (y[g] = []);
3240
3240
  }), n.pending.forEach((l) => {
3241
- const { provider: g, prefix: p, name: y } = l, x = bt(g, p), S = x.pendingIcons || (x.pendingIcons = /* @__PURE__ */ new Set());
3242
- S.has(y) || (S.add(y), o[g][p].push(y));
3241
+ const { provider: h, prefix: g, name: y } = l, x = bt(h, g), S = x.pendingIcons || (x.pendingIcons = /* @__PURE__ */ new Set());
3242
+ S.has(y) || (S.add(y), o[h][g].push(y));
3243
3243
  }), s.forEach((l) => {
3244
- const g = o[l.provider][l.prefix];
3245
- g.length && vs(l, g);
3246
- }), t ? fs(t, n, s) : hn;
3244
+ const h = o[l.provider][l.prefix];
3245
+ h.length && vs(l, h);
3246
+ }), t ? fs(t, n, s) : pn;
3247
3247
  };
3248
3248
  function Ss(e, t) {
3249
3249
  const r = { ...e };
@@ -3352,7 +3352,7 @@ function yn(e) {
3352
3352
  return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
3353
3353
  }
3354
3354
  const Ds = (e, t, r) => {
3355
- const n = t.inline ? $s : ro, o = Ss(n, t), s = t.mode || "svg", i = {}, d = t.style || {}, l = {
3355
+ const n = t.inline ? $s : ro, o = Ss(n, t), s = t.mode || "svg", i = {}, c = t.style || {}, l = {
3356
3356
  ...s === "svg" ? As : {}
3357
3357
  };
3358
3358
  if (r) {
@@ -3416,33 +3416,33 @@ const Ds = (e, t, r) => {
3416
3416
  n[N] === void 0 && (l[N] = P);
3417
3417
  }
3418
3418
  }
3419
- const g = Qa(e, o), p = g.attributes;
3419
+ const h = Ga(e, o), g = h.attributes;
3420
3420
  if (o.inline && (i.verticalAlign = "-0.125em"), s === "svg") {
3421
3421
  l.style = {
3422
3422
  ...i,
3423
- ...d
3424
- }, Object.assign(l, p);
3423
+ ...c
3424
+ }, Object.assign(l, g);
3425
3425
  let N = 0, P = t.id;
3426
3426
  return typeof P == "string" && (P = P.replace(/-/g, "_")), l.dangerouslySetInnerHTML = {
3427
- __html: Os(es(g.body, P ? () => P + "ID" + N++ : "iconifyReact"))
3427
+ __html: Os(es(h.body, P ? () => P + "ID" + N++ : "iconifyReact"))
3428
3428
  }, cr("svg", l);
3429
3429
  }
3430
3430
  const { body: y, width: x, height: S } = e, _ = s === "mask" || (s === "bg" ? !1 : y.indexOf("currentColor") !== -1), F = Is(y, {
3431
- ...p,
3431
+ ...g,
3432
3432
  width: x + "",
3433
3433
  height: S + ""
3434
3434
  });
3435
3435
  return l.style = {
3436
3436
  ...i,
3437
3437
  "--svg": Ts(F),
3438
- width: yn(p.width),
3439
- height: yn(p.height),
3438
+ width: yn(g.width),
3439
+ height: yn(g.height),
3440
3440
  ...js,
3441
3441
  ..._ ? br : no,
3442
- ...d
3442
+ ...c
3443
3443
  }, cr("span", l);
3444
3444
  };
3445
- Gn(!0);
3445
+ Qn(!0);
3446
3446
  ts("", cs);
3447
3447
  if (typeof document < "u" && typeof window < "u") {
3448
3448
  const e = window;
@@ -3496,39 +3496,39 @@ function oo(e) {
3496
3496
  name: ""
3497
3497
  };
3498
3498
  }
3499
- const [i, d] = C(s(!!e.ssr));
3499
+ const [i, c] = C(s(!!e.ssr));
3500
3500
  function l() {
3501
3501
  const S = n.callback;
3502
3502
  S && (S(), o({}));
3503
3503
  }
3504
- function g(S) {
3504
+ function h(S) {
3505
3505
  if (JSON.stringify(i) !== JSON.stringify(S))
3506
- return l(), d(S), !0;
3506
+ return l(), c(S), !0;
3507
3507
  }
3508
- function p() {
3508
+ function g() {
3509
3509
  var S;
3510
3510
  const _ = e.icon;
3511
3511
  if (typeof _ == "object") {
3512
- g({
3512
+ h({
3513
3513
  name: "",
3514
3514
  data: _
3515
3515
  });
3516
3516
  return;
3517
3517
  }
3518
3518
  const F = dn(_);
3519
- if (g({
3519
+ if (h({
3520
3520
  name: _,
3521
3521
  data: F
3522
3522
  }))
3523
3523
  if (F === void 0) {
3524
- const N = ks([_], p);
3524
+ const N = ks([_], g);
3525
3525
  o({
3526
3526
  callback: N
3527
3527
  });
3528
3528
  } else F && ((S = e.onLoad) === null || S === void 0 || S.call(e, _));
3529
3529
  }
3530
3530
  be(() => (r(!0), l), []), be(() => {
3531
- t && p();
3531
+ t && g();
3532
3532
  }, [e.icon, t]);
3533
3533
  const { name: y, data: x } = i;
3534
3534
  return x ? Ds({
@@ -3555,23 +3555,23 @@ const He = "USD", xn = (e) => {
3555
3555
  const r = (e == null ? void 0 : e.prices) ?? [];
3556
3556
  if (!r.length) return null;
3557
3557
  const n = (i) => {
3558
- var g, p;
3559
- const d = i.find((y) => {
3558
+ var h, g;
3559
+ const c = i.find((y) => {
3560
3560
  var x;
3561
3561
  return !!((x = y.discounted) != null && x.value);
3562
3562
  });
3563
- if (d)
3563
+ if (c)
3564
3564
  return {
3565
- cent: d.discounted.value.centAmount,
3566
- cur: d.discounted.value.currencyCode,
3567
- regularCent: (g = d.value) == null ? void 0 : g.centAmount
3565
+ cent: c.discounted.value.centAmount,
3566
+ cur: c.discounted.value.currencyCode,
3567
+ regularCent: (h = c.value) == null ? void 0 : h.centAmount
3568
3568
  };
3569
- const l = (p = i[0]) == null ? void 0 : p.value;
3569
+ const l = (g = i[0]) == null ? void 0 : g.value;
3570
3570
  return l ? { cent: l.centAmount, cur: l.currencyCode } : null;
3571
3571
  }, o = r.filter(
3572
3572
  (i) => {
3573
- var d, l;
3574
- return ((l = ((d = i.discounted) == null ? void 0 : d.value) || i.value) == null ? void 0 : l.currencyCode) === t;
3573
+ var c, l;
3574
+ return ((l = ((c = i.discounted) == null ? void 0 : c.value) || i.value) == null ? void 0 : l.currencyCode) === t;
3575
3575
  }
3576
3576
  ), s = n(o);
3577
3577
  return s || n(r) || null;
@@ -3634,10 +3634,10 @@ const He = "USD", xn = (e) => {
3634
3634
  var t, r;
3635
3635
  return ((r = (t = e == null ? void 0 : e.images) == null ? void 0 : t[0]) == null ? void 0 : r.url) ?? "";
3636
3636
  }, vn = (e, t) => {
3637
- var r, n, o, s;
3638
- return Us(t) || (e == null ? void 0 : e.image) || ((n = (r = e == null ? void 0 : e.images) == null ? void 0 : r[0]) == null ? void 0 : n.src) || ((s = (o = e == null ? void 0 : e.media) == null ? void 0 : o[0]) == null ? void 0 : s.url) || "";
3637
+ var r, n, o, s, i, c, l, h;
3638
+ return Us(t) || ((s = (o = (n = (r = e.imageGroups) == null ? void 0 : r[0]) == null ? void 0 : n.images) == null ? void 0 : o[0]) == null ? void 0 : s.link) || ((h = (l = (c = (i = e.image_groups) == null ? void 0 : i[0]) == null ? void 0 : c.images) == null ? void 0 : l[0]) == null ? void 0 : h.link) || "";
3639
3639
  }, kn = (e) => (e == null ? void 0 : e.name) || (e == null ? void 0 : e.title) || (e == null ? void 0 : e.productName) || "any", Vt = (e) => {
3640
- var s, i, d, l, g, p;
3640
+ var s, i, c, l, h, g;
3641
3641
  const t = e ? vr(e, He) : null;
3642
3642
  if (t != null && t.cent && (t != null && t.cur))
3643
3643
  return {
@@ -3645,7 +3645,7 @@ const He = "USD", xn = (e) => {
3645
3645
  currency: t.cur,
3646
3646
  regularAmount: t.regularCent ? t.regularCent / 100 : void 0
3647
3647
  };
3648
- const r = (d = (i = (s = e == null ? void 0 : e.prices) == null ? void 0 : s[0]) == null ? void 0 : i.value) == null ? void 0 : d.centAmount, n = ((p = (g = (l = e == null ? void 0 : e.prices) == null ? void 0 : l[0]) == null ? void 0 : g.value) == null ? void 0 : p.currencyCode) ?? He;
3648
+ const r = (c = (i = (s = e == null ? void 0 : e.prices) == null ? void 0 : s[0]) == null ? void 0 : i.value) == null ? void 0 : c.centAmount, n = ((g = (h = (l = e == null ? void 0 : e.prices) == null ? void 0 : l[0]) == null ? void 0 : h.value) == null ? void 0 : g.currencyCode) ?? He;
3649
3649
  return { amount: Number.isFinite(r) ? +(Number(r) / 100) : 0, currency: n };
3650
3650
  }, Sn = (e, t) => {
3651
3651
  const { amount: r } = Vt(t);
@@ -3670,20 +3670,20 @@ const He = "USD", xn = (e) => {
3670
3670
  addressLoading: s
3671
3671
  }) => {
3672
3672
  console.log(r, "the product for ai shopping");
3673
- const i = null, d = null, l = Ht(r), g = Math.min(
3673
+ const i = null, c = null, l = Ht(r), h = Math.min(
3674
3674
  Math.max(0, n || 0),
3675
3675
  Math.max(0, l.length - 1)
3676
- ), p = l.length, [y, x] = C(g), [S, _] = C(null), [F, N] = C(null), P = Re(null), R = Re(null), w = Bs(r, y), [V, je] = C(""), [E, H] = C(!1), [we, ae] = C(!1), [G, Pe] = C(!1), [$e, he] = C(""), [L, O] = C(!1), [U, Xe] = C(null), [Ye, ve] = C([]), [_e, ft] = C([]), [Ze, M] = C([]), [le, Te] = C(!1), [Ie, Zt] = C(), [er, m] = C(!0), [j, $] = C(!1), [Y, z] = C(!1), [A, ce] = C("standard"), [B, D] = C(!1), [X, ne] = C(!1), [ke, Se] = C("card"), [Z, K] = C(!1), [Ne, ee] = C(!1), [k, J] = C(!1), [W, de] = C(null), [Ce, et] = C(null), [mt, At] = C(""), [Be, jt] = C(!1), ht = Re(null);
3676
+ ), g = l.length, [y, x] = C(h), [S, _] = C(null), [F, N] = C(null), P = Re(null), R = Re(null), w = Bs(r, y), [V, je] = C(""), [E, H] = C(!1), [we, ae] = C(!1), [Q, Pe] = C(!1), [$e, pe] = C(""), [L, O] = C(!1), [q, Xe] = C(null), [Ye, ve] = C([]), [_e, ft] = C([]), [Ze, M] = C([]), [le, Te] = C(!1), [Ie, Zt] = C(), [er, m] = C(!0), [j, $] = C(!1), [Y, z] = C(!1), [A, ce] = C("standard"), [B, D] = C(!1), [X, ne] = C(!1), [ke, Se] = C("card"), [Z, W] = C(!1), [Ne, ee] = C(!1), [k, J] = C(!1), [G, de] = C(null), [Ce, et] = C(null), [mt, At] = C(""), [Be, jt] = C(!1), pt = Re(null);
3677
3677
  be(() => {
3678
- const u = Ht(r), h = Math.min(
3678
+ const u = Ht(r), p = Math.min(
3679
3679
  Math.max(0, n || 0),
3680
3680
  Math.max(0, u.length - 1)
3681
3681
  );
3682
- x(h);
3682
+ x(p);
3683
3683
  const f = ao(r), v = qe(f), T = We(f);
3684
3684
  P.current = v || null, R.current = T || null, _(v || null), N(T || null);
3685
3685
  }, [n, r]), be(() => {
3686
- ht.current && (ht.current.scrollTop = ht.current.scrollHeight);
3686
+ pt.current && (pt.current.scrollTop = pt.current.scrollHeight);
3687
3687
  }, [
3688
3688
  Ye,
3689
3689
  le,
@@ -3705,13 +3705,13 @@ const He = "USD", xn = (e) => {
3705
3705
  }, io = () => {
3706
3706
  et(null), At(""), jt(!0);
3707
3707
  }, Ar = (u) => {
3708
- const f = ((u == null ? void 0 : u.intentMandateId) || (u == null ? void 0 : u.intent_mandate_id) || (u == null ? void 0 : u.id) || null) ?? W;
3709
- return e ? /* @__PURE__ */ c("div", { className: "mt-3 flex items-start gap-3 rounded-lg border border-green-200 bg-green-50 p-4 text-green-800", children: [
3708
+ const f = ((u == null ? void 0 : u.intentMandateId) || (u == null ? void 0 : u.intent_mandate_id) || (u == null ? void 0 : u.id) || null) ?? G;
3709
+ return e ? /* @__PURE__ */ d("div", { className: "mt-3 flex items-start gap-3 rounded-lg border border-green-200 bg-green-50 p-4 text-green-800", children: [
3710
3710
  /* @__PURE__ */ a("div", { className: "success-tick-animation", children: /* @__PURE__ */ a(re, { icon: "mdi:check-circle", width: "28", color: "#16a34a" }) }),
3711
- /* @__PURE__ */ c("div", { className: "text-sm w-full", children: [
3711
+ /* @__PURE__ */ d("div", { className: "text-sm w-full", children: [
3712
3712
  /* @__PURE__ */ a("div", { className: "font-semibold", children: "Success!" }),
3713
3713
  /* @__PURE__ */ a("div", { children: "Your smart order has been saved. I’ll watch the price and auto-purchase when the conditions are met." }),
3714
- f && /* @__PURE__ */ c("div", { className: "mt-2 text-xs font-medium", children: [
3714
+ f && /* @__PURE__ */ d("div", { className: "mt-2 text-xs font-medium", children: [
3715
3715
  "Your Smart Order ID: ",
3716
3716
  /* @__PURE__ */ a(
3717
3717
  "span",
@@ -3721,7 +3721,7 @@ const He = "USD", xn = (e) => {
3721
3721
  }
3722
3722
  )
3723
3723
  ] }),
3724
- !Be && /* @__PURE__ */ c("div", { className: "mt-4 rounded-lg bg-white/70 p-3 text-gray-900", children: [
3724
+ !Be && /* @__PURE__ */ d("div", { className: "mt-4 rounded-lg bg-white/70 p-3 text-gray-900", children: [
3725
3725
  /* @__PURE__ */ a("h4", { className: "font-semibold mb-1", children: "Please post your feedback here" }),
3726
3726
  /* @__PURE__ */ a("p", { className: "text-sm text-gray-700 mb-3", children: "Rate us on how much our response was helpful" }),
3727
3727
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1 mb-3", children: [1, 2, 3, 4, 5].map((v) => /* @__PURE__ */ a(
@@ -3752,7 +3752,7 @@ const He = "USD", xn = (e) => {
3752
3752
  placeholder: "Your feedback helps us improve..."
3753
3753
  }
3754
3754
  ),
3755
- /* @__PURE__ */ c("div", { className: "mt-3 flex justify-end gap-2", children: [
3755
+ /* @__PURE__ */ d("div", { className: "mt-3 flex justify-end gap-2", children: [
3756
3756
  /* @__PURE__ */ a(
3757
3757
  "button",
3758
3758
  {
@@ -3784,71 +3784,71 @@ const He = "USD", xn = (e) => {
3784
3784
  } catch (u) {
3785
3785
  console.error("Error fetching addresses:", u);
3786
3786
  }
3787
- }, St = (u, h) => {
3787
+ }, St = (u, p) => {
3788
3788
  ve((f) => [
3789
3789
  ...f,
3790
3790
  {
3791
3791
  query: "",
3792
3792
  response: "__SNAPSHOT__",
3793
3793
  snapshotStage: u,
3794
- snapshotPayload: h
3794
+ snapshotPayload: p
3795
3795
  }
3796
3796
  ]);
3797
- }, jr = (u, h) => {
3797
+ }, jr = (u, p) => {
3798
3798
  ve(
3799
3799
  (f) => f.map(
3800
3800
  (v) => v.response === "__CARD__" ? {
3801
3801
  ...v,
3802
3802
  response: "__SNAPSHOT__",
3803
3803
  snapshotStage: u ?? v.snapshotStage,
3804
- snapshotPayload: h ?? v.snapshotPayload
3804
+ snapshotPayload: p ?? v.snapshotPayload
3805
3805
  } : v
3806
3806
  )
3807
3807
  );
3808
3808
  }, co = () => {
3809
3809
  ve(
3810
3810
  (u) => u.filter(
3811
- (h) => !(h.query === "" && h.response !== "__SNAPSHOT__" && h.response !== "__TEXT__")
3811
+ (p) => !(p.query === "" && p.response !== "__SNAPSHOT__" && p.response !== "__TEXT__")
3812
3812
  )
3813
3813
  );
3814
3814
  }, $t = () => {
3815
- ee(!1), Te(!1), z(!1), ne(!1), $(!1), D(!1), K(!1), J(!1), O(!1), Xe(null), co(), H(!1), ae(!1);
3815
+ ee(!1), Te(!1), z(!1), ne(!1), $(!1), D(!1), W(!1), J(!1), O(!1), Xe(null), co(), H(!1), ae(!1);
3816
3816
  }, uo = () => {
3817
- Te(!1), $(!1), z(!1), ce("standard"), D(!1), ne(!1), Se("card"), K(!1), ee(!1), J(!1), m(!0), Xe(null), localStorage.removeItem("agentic_order"), localStorage.removeItem("agentic_order_address"), localStorage.removeItem("agentic_order_delivery"), localStorage.removeItem("agentic_order_payment"), localStorage.removeItem("agentic_order_final");
3818
- }, Fe = Rr(() => Ht(r).map((h, f) => ({
3817
+ Te(!1), $(!1), z(!1), ce("standard"), D(!1), ne(!1), Se("card"), W(!1), ee(!1), J(!1), m(!0), Xe(null), localStorage.removeItem("agentic_order"), localStorage.removeItem("agentic_order_address"), localStorage.removeItem("agentic_order_delivery"), localStorage.removeItem("agentic_order_payment"), localStorage.removeItem("agentic_order_final");
3818
+ }, Fe = Rr(() => Ht(r).map((p, f) => ({
3819
3819
  index: f,
3820
- variant: h,
3821
- images: ((h == null ? void 0 : h.images) || []).map((v) => (v == null ? void 0 : v.url) || "").filter(Boolean)
3820
+ variant: p,
3821
+ images: ((p == null ? void 0 : p.images) || []).map((v) => (v == null ? void 0 : v.url) || "").filter(Boolean)
3822
3822
  })), [r]), Nt = Rr(() => {
3823
3823
  if (!Fe.length) return !1;
3824
- const u = S || void 0, h = F || void 0, f = (v, T) => {
3825
- var q;
3824
+ const u = S || void 0, p = F || void 0, f = (v, T) => {
3825
+ var U;
3826
3826
  const b = ot(
3827
3827
  Fe,
3828
3828
  v || void 0,
3829
3829
  T || void 0
3830
3830
  );
3831
- return !!(b && ((q = b.variant) != null && q.sku));
3831
+ return !!(b && ((U = b.variant) != null && U.sku));
3832
3832
  };
3833
- return u && h ? f(u, h) : u && !h ? f(u, null) : !u && h ? f(void 0, h) : !!(w && w.sku);
3834
- }, [Fe, S, F, w]), fo = G || L || !Nt, Ct = (u) => {
3835
- const h = Number((u == null ? void 0 : u.quantity) ?? 1);
3836
- return Number.isFinite(h) && h > 0 ? h : 1;
3833
+ return u && p ? f(u, p) : u && !p ? f(u, null) : !u && p ? f(void 0, p) : !!(w && w.sku);
3834
+ }, [Fe, S, F, w]), fo = Q || L || !Nt, Ct = (u) => {
3835
+ const p = Number((u == null ? void 0 : u.quantity) ?? 1);
3836
+ return Number.isFinite(p) && p > 0 ? p : 1;
3837
3837
  }, $r = (u) => {
3838
- const h = Ct(u), f = Number((u == null ? void 0 : u.max_price_minor) ?? 0);
3839
- return Number.isFinite(f) && f > 0 ? +(f / 100) : +(Sn(r, w) * h);
3838
+ const p = Ct(u), f = Number((u == null ? void 0 : u.max_price_minor) ?? 0);
3839
+ return Number.isFinite(f) && f > 0 ? +(f / 100) : +(Sn(r, w) * p);
3840
3840
  }, Dr = (u) => {
3841
- var Q;
3842
- const h = U, f = Vt(w), v = u || (h == null ? void 0 : h.currency) || f.currency || He, T = $r(h), b = +(T * 0.08).toFixed(2), q = ((Q = at[A]) == null ? void 0 : Q.fee) || 0;
3843
- return { product_total: T, tax: b, shipping_fee: q, currency: v };
3844
- }, tr = async (u, h, f) => {
3841
+ var K;
3842
+ const p = q, f = Vt(w), v = u || (p == null ? void 0 : p.currency) || f.currency || He, T = $r(p), b = +(T * 0.08).toFixed(2), U = ((K = at[A]) == null ? void 0 : K.fee) || 0;
3843
+ return { product_total: T, tax: b, shipping_fee: U, currency: v };
3844
+ }, tr = async (u, p, f) => {
3845
3845
  jr(), uo(), Pe(!0), O(!0), H(!1), ae(!1);
3846
3846
  const v = _e.slice(-Cn);
3847
3847
  try {
3848
- const T = await ur(i, d);
3848
+ const T = await ur(i, c);
3849
3849
  if (!T) throw new Error("Failed to fetch token");
3850
- const b = localStorage.getItem("customerNumber"), q = localStorage.getItem("isLoggedIn"), ue = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
3851
- registered: String(q || !1),
3850
+ const b = localStorage.getItem("customerNumber"), U = localStorage.getItem("isLoggedIn"), ue = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
3851
+ registered: String(U || !1),
3852
3852
  userId: String(b || (/* @__PURE__ */ new Date()).getTime())
3853
3853
  }).toString()}`, te = await fetch(`${ue}`, {
3854
3854
  method: "POST",
@@ -3860,10 +3860,10 @@ const He = "USD", xn = (e) => {
3860
3860
  flowId: "MTMI0P4LC6",
3861
3861
  flowAliasId: "BCUA138F2Q",
3862
3862
  input: {
3863
- instruction: `Use SKU ${h}. Currency is USD. ${u}`,
3863
+ instruction: `Use SKU ${p}. Currency is USD. ${u}`,
3864
3864
  metadata: {
3865
3865
  productId: (r == null ? void 0 : r.id) ?? null,
3866
- skuId: h ?? null,
3866
+ skuId: p ?? null,
3867
3867
  variantIndex: f
3868
3868
  },
3869
3869
  context: v
@@ -3874,13 +3874,13 @@ const He = "USD", xn = (e) => {
3874
3874
  const ye = te.body.getReader(), oe = new TextDecoder();
3875
3875
  let Ee = "", Oe = "", Le = "";
3876
3876
  for (; ; ) {
3877
- const { done: pe, value: Je } = await ye.read();
3878
- if (pe) break;
3877
+ const { done: he, value: Je } = await ye.read();
3878
+ if (he) break;
3879
3879
  Ee += oe.decode(Je, { stream: !0 });
3880
- const pt = Ee.split(`
3880
+ const ht = Ee.split(`
3881
3881
  `);
3882
- Ee = pt.pop() || "";
3883
- for (const gt of pt) {
3882
+ Ee = ht.pop() || "";
3883
+ for (const gt of ht) {
3884
3884
  if (!gt.startsWith("data:")) continue;
3885
3885
  const rt = gt.slice(5).trim();
3886
3886
  try {
@@ -3893,23 +3893,23 @@ const He = "USD", xn = (e) => {
3893
3893
  }
3894
3894
  let se = null;
3895
3895
  if (Oe) {
3896
- const pe = String(Oe).replace(/\\n/g, "").trim();
3897
- if (pe.startsWith("{") && pe.endsWith("}"))
3896
+ const he = String(Oe).replace(/\\n/g, "").trim();
3897
+ if (he.startsWith("{") && he.endsWith("}"))
3898
3898
  try {
3899
- se = JSON.parse(pe), se.product_id = h, se.sku_id = h, localStorage.setItem("agentic_order", JSON.stringify(se));
3899
+ se = JSON.parse(he), se.product_id = p, se.sku_id = p, localStorage.setItem("agentic_order", JSON.stringify(se));
3900
3900
  } catch (Je) {
3901
3901
  console.log(Je);
3902
3902
  }
3903
3903
  }
3904
- Xe(se), se && ve((pe) => [
3905
- ...pe,
3904
+ Xe(se), se && ve((he) => [
3905
+ ...he,
3906
3906
  {
3907
3907
  query: "",
3908
3908
  response: "__CARD__",
3909
3909
  snapshotPayload: { extractedDetails: se }
3910
3910
  }
3911
- ]), ft((pe) => [
3912
- ...pe,
3911
+ ]), ft((he) => [
3912
+ ...he,
3913
3913
  {
3914
3914
  userQuery: u,
3915
3915
  mainResponse: Oe || "",
@@ -3922,14 +3922,14 @@ const He = "USD", xn = (e) => {
3922
3922
  Pe(!1);
3923
3923
  }
3924
3924
  }, Lr = async (u) => {
3925
- if (L || G || !Nt) return;
3926
- const h = $e.trim();
3927
- if (!h) return;
3928
- ve((b) => [...b, { query: h, response: "" }]), he(""), je(h);
3925
+ if (L || Q || !Nt) return;
3926
+ const p = $e.trim();
3927
+ if (!p) return;
3928
+ ve((b) => [...b, { query: p, response: "" }]), pe(""), je(p);
3929
3929
  const f = w == null ? void 0 : w.sku, v = Nn(r), T = f || v || "";
3930
- if (p <= 1) {
3930
+ if (g <= 1) {
3931
3931
  if (T) {
3932
- tr(h, T, y);
3932
+ tr(p, T, y);
3933
3933
  return;
3934
3934
  }
3935
3935
  ae(!0), O(!0);
@@ -3939,31 +3939,31 @@ const He = "USD", xn = (e) => {
3939
3939
  }, mo = () => {
3940
3940
  const u = w == null ? void 0 : w.sku;
3941
3941
  u && tr(V, u, y);
3942
- }, ho = () => {
3943
- H(!1), ae(!0), O(!0);
3944
3942
  }, po = () => {
3943
+ H(!1), ae(!0), O(!0);
3944
+ }, ho = () => {
3945
3945
  if (!w || !w.sku) return;
3946
3946
  const u = w.sku;
3947
3947
  tr(V, u, y);
3948
3948
  }, go = async () => {
3949
- Te(!0), z(!1), ne(!1), ee(!1), $(!1), D(!1), K(!1), J(!1), await lo(), jr("initial", {
3950
- extractedDetails: U ?? void 0
3949
+ Te(!0), z(!1), ne(!1), ee(!1), $(!1), D(!1), W(!1), J(!1), await lo(), jr("initial", {
3950
+ extractedDetails: q ?? void 0
3951
3951
  });
3952
3952
  }, wo = () => {
3953
3953
  if (!Ie) return;
3954
3954
  const u = Ze.find(
3955
- (h) => String(h.addressId ?? h.id) === Ie
3955
+ (p) => String(p.addressId ?? p.id) === Ie
3956
3956
  ) || null;
3957
- u && (localStorage.setItem("agentic_order_address", JSON.stringify(u)), $(!0), z(!0), D(!1), ne(!1), K(!1), ee(!1), J(!1), St("address", u));
3957
+ u && (localStorage.setItem("agentic_order_address", JSON.stringify(u)), $(!0), z(!0), D(!1), ne(!1), W(!1), ee(!1), J(!1), St("address", u));
3958
3958
  }, yo = () => {
3959
- $(!1), z(!1), D(!1), ne(!1), K(!1), ee(!1), J(!1), localStorage.removeItem("agentic_order_address");
3959
+ $(!1), z(!1), D(!1), ne(!1), W(!1), ee(!1), J(!1), localStorage.removeItem("agentic_order_address");
3960
3960
  }, xo = () => {
3961
- A && (localStorage.setItem("agentic_order_delivery", A), D(!0), ne(!0), K(!1), ee(!1), J(!1), St("delivery", {
3961
+ A && (localStorage.setItem("agentic_order_delivery", A), D(!0), ne(!0), W(!1), ee(!1), J(!1), St("delivery", {
3962
3962
  method: A,
3963
3963
  ...at[A]
3964
3964
  }));
3965
3965
  }, zr = () => {
3966
- z(!1), D(!1), ne(!1), K(!1), ee(!1), J(!1), O(!1), $t(), ve((u) => [
3966
+ z(!1), D(!1), ne(!1), W(!1), ee(!1), J(!1), O(!1), $t(), ve((u) => [
3967
3967
  ...u,
3968
3968
  {
3969
3969
  query: "",
@@ -3974,11 +3974,11 @@ const He = "USD", xn = (e) => {
3974
3974
  }
3975
3975
  ]);
3976
3976
  }, bo = () => {
3977
- D(!1), ne(!1), K(!1), ee(!1), J(!1), localStorage.removeItem("agentic_order_delivery");
3977
+ D(!1), ne(!1), W(!1), ee(!1), J(!1), localStorage.removeItem("agentic_order_delivery");
3978
3978
  }, vo = () => {
3979
- ke && (localStorage.setItem("agentic_order_payment", ke), K(!0), ee(!0), J(!1), St("payment", { method: ke }));
3979
+ ke && (localStorage.setItem("agentic_order_payment", ke), W(!0), ee(!0), J(!1), St("payment", { method: ke }));
3980
3980
  }, ko = () => {
3981
- ne(!1), K(!1), ee(!1), J(!1), O(!1), $t(), ve((u) => [
3981
+ ne(!1), W(!1), ee(!1), J(!1), O(!1), $t(), ve((u) => [
3982
3982
  ...u,
3983
3983
  {
3984
3984
  query: "",
@@ -3989,15 +3989,15 @@ const He = "USD", xn = (e) => {
3989
3989
  }
3990
3990
  ]);
3991
3991
  }, So = () => {
3992
- K(!1), ee(!1), J(!1), localStorage.removeItem("agentic_order_payment");
3992
+ W(!1), ee(!1), J(!1), localStorage.removeItem("agentic_order_payment");
3993
3993
  }, No = async () => {
3994
3994
  try {
3995
3995
  Pe(!0);
3996
- const u = U || {}, h = JSON.parse(
3996
+ const u = q || {}, p = JSON.parse(
3997
3997
  localStorage.getItem("agentic_order_address") || "null"
3998
3998
  ), f = localStorage.getItem(
3999
3999
  "agentic_order_delivery"
4000
- ), v = localStorage.getItem("agentic_order_payment") || "card", { product_total: T, tax: b, shipping_fee: q, currency: Q } = Dr(), ue = u.shopper_id || localStorage.getItem("customerId") || void 0, te = (h == null ? void 0 : h.addressId) || (h == null ? void 0 : h.id) || void 0, ye = f ? Ms[f] : "GROUND", oe = "card-visa", Ee = w == null ? void 0 : w.sku, Oe = (r == null ? void 0 : r.id) || "", Le = Ct(u), se = typeof u.max_price_minor == "number" ? u.max_price_minor : Math.round(T * 100), pt = {
4000
+ ), v = localStorage.getItem("agentic_order_payment") || "card", { product_total: T, tax: b, shipping_fee: U, currency: K } = Dr(), ue = u.shopper_id || localStorage.getItem("customerId") || void 0, te = (p == null ? void 0 : p.addressId) || (p == null ? void 0 : p.id) || void 0, ye = f ? Ms[f] : "GROUND", oe = "card-visa", Ee = w == null ? void 0 : w.sku, Oe = (r == null ? void 0 : r.id) || "", Le = Ct(u), se = typeof u.max_price_minor == "number" ? u.max_price_minor : Math.round(T * 100), ht = {
4001
4001
  shopper_id: ue,
4002
4002
  shipping_address_id: te,
4003
4003
  shipping_method_id: ye,
@@ -4008,7 +4008,7 @@ const He = "USD", xn = (e) => {
4008
4008
  product_id: Oe,
4009
4009
  quantity: Le,
4010
4010
  max_price_minor: se,
4011
- currency: Q,
4011
+ currency: K,
4012
4012
  instruction_text: V
4013
4013
  };
4014
4014
  if (!ue || !te) {
@@ -4032,7 +4032,7 @@ const He = "USD", xn = (e) => {
4032
4032
  "Content-Type": "application/json",
4033
4033
  Authorization: `Bearer ${rt}`
4034
4034
  },
4035
- body: JSON.stringify(pt)
4035
+ body: JSON.stringify(ht)
4036
4036
  });
4037
4037
  if (!ze.ok) {
4038
4038
  const To = await ze.text().catch(() => "");
@@ -4047,10 +4047,10 @@ const He = "USD", xn = (e) => {
4047
4047
  nt && de(nt);
4048
4048
  const Dt = {
4049
4049
  ...u,
4050
- address: h,
4050
+ address: p,
4051
4051
  delivery: f,
4052
4052
  payment: v,
4053
- summary: { product_total: T, tax: b, shipping_fee: q, currency: Q },
4053
+ summary: { product_total: T, tax: b, shipping_fee: U, currency: K },
4054
4054
  intent_mandate_id: nt
4055
4055
  };
4056
4056
  localStorage.setItem("agentic_order_final", JSON.stringify(Dt)), J(!0), m(!1), St("final", Dt), St("success", { intentMandateId: nt }), $t();
@@ -4073,13 +4073,13 @@ const He = "USD", xn = (e) => {
4073
4073
  }
4074
4074
  ]);
4075
4075
  }, Co = () => {
4076
- const u = vn(r, w), h = kn(r), f = (w == null ? void 0 : w.sku) || "", v = qe(w) || "", T = We(w) || "", { amount: b } = Vt(w), q = !!(w != null && w.sku), Q = w && q ? xn(w) : !1;
4077
- return /* @__PURE__ */ a("div", { className: "mx-4 mt-2 rounded-xl border border-gray-200 bg-white p-4", children: /* @__PURE__ */ c("div", { className: "flex flex-col sm:flex-row items-center sm:items-center gap-4", children: [
4076
+ const u = vn(r, w), p = kn(r), f = (w == null ? void 0 : w.id) || "", v = qe(w) || "", T = We(w) || "", { amount: b } = Vt(w), U = !!(w != null && w.id), K = w && U ? xn(w) : !1;
4077
+ return console.log(u, p, f, v, T, b, U, K, "base product"), /* @__PURE__ */ a("div", { className: "mx-4 mt-2 rounded-xl border border-gray-200 bg-white p-4", children: /* @__PURE__ */ d("div", { className: "flex flex-col sm:flex-row items-center sm:items-center gap-4", children: [
4078
4078
  /* @__PURE__ */ a("div", { className: "flex-shrink-0 flex justify-center sm:justify-start", children: /* @__PURE__ */ a("div", { className: "w-[150px] h-[150px] rounded-lg bg-gray-50 border border-gray-200 flex items-center justify-center overflow-hidden", children: u ? /* @__PURE__ */ a(
4079
4079
  "img",
4080
4080
  {
4081
4081
  src: u,
4082
- alt: h,
4082
+ alt: p,
4083
4083
  className: "object-contain w-full h-full"
4084
4084
  }
4085
4085
  ) : /* @__PURE__ */ a(
@@ -4090,38 +4090,38 @@ const He = "USD", xn = (e) => {
4090
4090
  className: "opacity-60"
4091
4091
  }
4092
4092
  ) }) }),
4093
- /* @__PURE__ */ c("div", { className: "flex-grow flex flex-col justify-center text-center", children: [
4094
- /* @__PURE__ */ a("div", { className: "text-2xl font-bold text-gray-900 mb-1", children: h }),
4093
+ /* @__PURE__ */ d("div", { className: "flex-grow flex flex-col justify-center text-center", children: [
4094
+ /* @__PURE__ */ a("div", { className: "text-2xl font-bold text-gray-900 mb-1", children: p }),
4095
4095
  /* @__PURE__ */ a("div", { className: "text-sm text-gray-700 mb-1", children: [
4096
4096
  f && `SKU: ${f}`,
4097
4097
  v && `Color: ${v}`,
4098
4098
  T && `Size: ${T}`
4099
4099
  ].filter(Boolean).join(" • ") || "—" }),
4100
- /* @__PURE__ */ a("div", { className: "mt-1 text-xl font-semibold text-gray-900", children: q ? Ae(Number(b) || 0, He) : "Currently unavailable" }),
4101
- q && !Q && /* @__PURE__ */ a("div", { className: "mt-1 text-xs font-medium text-red-600", children: "Currently out of stock" })
4100
+ /* @__PURE__ */ a("div", { className: "mt-1 text-xl font-semibold text-gray-900", children: U ? Ae(Number(b) || 0, He) : "Currently unavailable" }),
4101
+ U && !K && /* @__PURE__ */ a("div", { className: "mt-1 text-xs font-medium text-red-600", children: "Currently out of stock" })
4102
4102
  ] })
4103
4103
  ] }) });
4104
4104
  }, Br = ({
4105
4105
  showSubmit: u = !0
4106
4106
  }) => {
4107
- const h = {}, f = Fe.map((b) => qe(b.variant)).filter((b) => !!b && !h[b] && (h[b] = !0)), v = {}, T = Fe.map((b) => We(b.variant)).filter((b) => !!b && !v[b] && (v[b] = !0));
4108
- return /* @__PURE__ */ c("div", { className: "mx-4 mt-4 mb-2 rounded-xl border border-gray-200 bg-white p-4 animate-fade-in", children: [
4107
+ const p = {}, f = Fe.map((b) => qe(b.variant)).filter((b) => !!b && !p[b] && (p[b] = !0)), v = {}, T = Fe.map((b) => We(b.variant)).filter((b) => !!b && !v[b] && (v[b] = !0));
4108
+ return /* @__PURE__ */ d("div", { className: "mx-4 mt-4 mb-2 rounded-xl border border-gray-200 bg-white p-4 animate-fade-in", children: [
4109
4109
  /* @__PURE__ */ a("h3", { className: "font-semibold text-gray-800", children: "Choose a variant" }),
4110
- f.length > 0 && /* @__PURE__ */ c("div", { className: "mt-4", children: [
4111
- /* @__PURE__ */ c("div", { className: "flex items-baseline gap-2", children: [
4110
+ f.length > 0 && /* @__PURE__ */ d("div", { className: "mt-4", children: [
4111
+ /* @__PURE__ */ d("div", { className: "flex items-baseline gap-2", children: [
4112
4112
  /* @__PURE__ */ a("div", { className: "text-sm font-bold", children: "Color :" }),
4113
4113
  S && /* @__PURE__ */ a("div", { className: "text-sm text-gray-600", children: S })
4114
4114
  ] }),
4115
4115
  /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-4 mt-2", children: f.map((b) => {
4116
4116
  var Le;
4117
- const q = S === b, Q = F || R.current || null, ue = Q ? ot(Fe, b, Q) : ot(Fe, b, null), te = !!ue, ye = te && xn(ue.variant), oe = te && ye ? vr(ue.variant, He) || vr(ue.variant) : null, Ee = Fe.find(
4117
+ const U = S === b, K = F || R.current || null, ue = K ? ot(Fe, b, K) : ot(Fe, b, null), te = !!ue, ye = te && xn(ue.variant), oe = te && ye ? vr(ue.variant, He) || vr(ue.variant) : null, Ee = Fe.find(
4118
4118
  (se) => qe(se.variant) === b
4119
4119
  ), Oe = (Le = Ee == null ? void 0 : Ee.images) == null ? void 0 : Le[0];
4120
- return /* @__PURE__ */ c(
4120
+ return /* @__PURE__ */ d(
4121
4121
  "div",
4122
4122
  {
4123
4123
  className: `flex flex-col items-center w-28 border rounded-md p-2
4124
- ${q ? "border-2 border-tanya-light" : "border-gray-300"}
4124
+ ${U ? "border-2 border-tanya-light" : "border-gray-300"}
4125
4125
  ${!te || !ye ? "opacity-60" : ""}`,
4126
4126
  children: [
4127
4127
  /* @__PURE__ */ a(
@@ -4129,8 +4129,8 @@ const He = "USD", xn = (e) => {
4129
4129
  {
4130
4130
  onClick: () => {
4131
4131
  _(b);
4132
- const se = F || R.current || null, pe = se && ot(Fe, b, se) || ot(Fe, b, null);
4133
- pe && x(pe.index);
4132
+ const se = F || R.current || null, he = se && ot(Fe, b, se) || ot(Fe, b, null);
4133
+ he && x(he.index);
4134
4134
  },
4135
4135
  className: "w-full h-20 flex items-center justify-center overflow-hidden",
4136
4136
  title: b,
@@ -4147,7 +4147,7 @@ const He = "USD", xn = (e) => {
4147
4147
  /* @__PURE__ */ a("div", { className: "w-full border-t my-2" }),
4148
4148
  te && !ye && /* @__PURE__ */ a("div", { className: "text-[11px] text-red-600 text-center", children: "Out of stock" }),
4149
4149
  !te && /* @__PURE__ */ a("div", { className: "text-[11px] text-red-600 text-center", children: "any not offered" }),
4150
- te && ye && oe && /* @__PURE__ */ c("div", { className: "text-xs text-gray-800 font-medium text-center", children: [
4150
+ te && ye && oe && /* @__PURE__ */ d("div", { className: "text-xs text-gray-800 font-medium text-center", children: [
4151
4151
  Ae(oe.cent / 100, oe.cur),
4152
4152
  oe.regularCent && oe.regularCent > oe.cent && /* @__PURE__ */ a("span", { className: "ml-1 line-through text-gray-500", children: Ae(
4153
4153
  oe.regularCent / 100,
@@ -4160,8 +4160,8 @@ const He = "USD", xn = (e) => {
4160
4160
  );
4161
4161
  }) })
4162
4162
  ] }),
4163
- T.length > 0 && /* @__PURE__ */ c("div", { className: "mt-4", children: [
4164
- /* @__PURE__ */ c("div", { className: "flex items-baseline gap-2", children: [
4163
+ T.length > 0 && /* @__PURE__ */ d("div", { className: "mt-4", children: [
4164
+ /* @__PURE__ */ d("div", { className: "flex items-baseline gap-2", children: [
4165
4165
  /* @__PURE__ */ a("div", { className: "text-sm font-bold", children: "Size :" }),
4166
4166
  F && /* @__PURE__ */ a("div", { className: "text-sm text-gray-600", children: F })
4167
4167
  ] }),
@@ -4170,8 +4170,8 @@ const He = "USD", xn = (e) => {
4170
4170
  {
4171
4171
  onClick: () => {
4172
4172
  N(b);
4173
- const Q = S && ot(Fe, S, b) || ot(Fe, void 0, b);
4174
- Q && x(Q.index);
4173
+ const K = S && ot(Fe, S, b) || ot(Fe, void 0, b);
4174
+ K && x(K.index);
4175
4175
  },
4176
4176
  className: `px-4 py-2 rounded-md border text-sm ${F === b ? "border-2 border-tanya-light font-semibold" : "border-gray-300"}`,
4177
4177
  title: b,
@@ -4183,7 +4183,7 @@ const He = "USD", xn = (e) => {
4183
4183
  u && /* @__PURE__ */ a("div", { className: "mt-4 flex justify-end", children: /* @__PURE__ */ a(
4184
4184
  "button",
4185
4185
  {
4186
- onClick: po,
4186
+ onClick: ho,
4187
4187
  className: "px-6 py-2.5 rounded-full font-semibold text-white shadow-md",
4188
4188
  style: { background: I },
4189
4189
  disabled: !Nt,
@@ -4191,12 +4191,12 @@ const He = "USD", xn = (e) => {
4191
4191
  }
4192
4192
  ) })
4193
4193
  ] });
4194
- }, Ur = (u, h = !0) => {
4194
+ }, Ur = (u, p = !0) => {
4195
4195
  !(u != null && u.extractedDetails) && u && (u = { extractedDetails: u });
4196
- const f = (u == null ? void 0 : u.extractedDetails) || U;
4196
+ const f = (u == null ? void 0 : u.extractedDetails) || q;
4197
4197
  if (!f) return null;
4198
- const v = Ct(f), { currency: T } = Vt(w), b = Sn(r, w), q = Number((f == null ? void 0 : f.max_price_minor) ?? 0), ue = Number.isFinite(q) && q > 0 ? +(q / 100) : +(b * v), te = (f == null ? void 0 : f.currency) || T || He, ye = w != null && w.sku ? w.sku : f.product_id;
4199
- return /* @__PURE__ */ c(
4198
+ const v = Ct(f), { currency: T } = Vt(w), b = Sn(r, w), U = Number((f == null ? void 0 : f.max_price_minor) ?? 0), ue = Number.isFinite(U) && U > 0 ? +(U / 100) : +(b * v), te = (f == null ? void 0 : f.currency) || T || He, ye = w != null && w.sku ? w.sku : f.product_id;
4199
+ return /* @__PURE__ */ d(
4200
4200
  "div",
4201
4201
  {
4202
4202
  className: "px-6 pb-6 flex flex-col items-center space-y-4",
@@ -4210,8 +4210,8 @@ const He = "USD", xn = (e) => {
4210
4210
  children: "Here’s what I found from your instruction:"
4211
4211
  }
4212
4212
  ),
4213
- /* @__PURE__ */ c("div", { className: "w-full max-w-md bg-white rounded-xl shadow-inner p-4", children: [
4214
- /* @__PURE__ */ c("div", { className: "grid grid-cols-2 gap-y-2 text-sm", children: [
4213
+ /* @__PURE__ */ d("div", { className: "w-full max-w-md bg-white rounded-xl shadow-inner p-4", children: [
4214
+ /* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-y-2 text-sm", children: [
4215
4215
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "SKU:" }),
4216
4216
  /* @__PURE__ */ a("p", { className: "text-gray-800", children: ye }),
4217
4217
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Quantity:" }),
@@ -4221,23 +4221,23 @@ const He = "USD", xn = (e) => {
4221
4221
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Maximum Total Price:" }),
4222
4222
  /* @__PURE__ */ a("p", { className: "text-gray-800", children: Ae(ue, te) })
4223
4223
  ] }),
4224
- /* @__PURE__ */ c("div", { className: "mt-3 flex flex-wrap gap-2 text-xs", children: [
4225
- qe(w) && /* @__PURE__ */ c("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4224
+ /* @__PURE__ */ d("div", { className: "mt-3 flex flex-wrap gap-2 text-xs", children: [
4225
+ qe(w) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4226
4226
  "Color: ",
4227
4227
  qe(w)
4228
4228
  ] }),
4229
- We(w) && /* @__PURE__ */ c("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4229
+ We(w) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4230
4230
  "Size: ",
4231
4231
  We(w)
4232
4232
  ] }),
4233
- (w == null ? void 0 : w.sku) && /* @__PURE__ */ c("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4233
+ (w == null ? void 0 : w.sku) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4234
4234
  "SKU: ",
4235
4235
  w.sku
4236
4236
  ] })
4237
4237
  ] })
4238
4238
  ] }),
4239
- !h && /* @__PURE__ */ c(xe, { children: [
4240
- /* @__PURE__ */ c(
4239
+ !p && /* @__PURE__ */ d(xe, { children: [
4240
+ /* @__PURE__ */ d(
4241
4241
  "p",
4242
4242
  {
4243
4243
  className: "text-sm font-medium text-gray-700 text-center max-w-[90%] leading-relaxed",
@@ -4249,8 +4249,8 @@ const He = "USD", xn = (e) => {
4249
4249
  ]
4250
4250
  }
4251
4251
  ),
4252
- /* @__PURE__ */ c("div", { className: "flex flex-wrap justify-center gap-4", children: [
4253
- /* @__PURE__ */ c(
4252
+ /* @__PURE__ */ d("div", { className: "flex flex-wrap justify-center gap-4", children: [
4253
+ /* @__PURE__ */ d(
4254
4254
  "button",
4255
4255
  {
4256
4256
  onClick: go,
@@ -4271,7 +4271,7 @@ const He = "USD", xn = (e) => {
4271
4271
  ]
4272
4272
  }
4273
4273
  ),
4274
- /* @__PURE__ */ c(
4274
+ /* @__PURE__ */ d(
4275
4275
  "button",
4276
4276
  {
4277
4277
  onClick: Mr,
@@ -4297,21 +4297,21 @@ const He = "USD", xn = (e) => {
4297
4297
  ]
4298
4298
  }
4299
4299
  );
4300
- }, qr = (u, h = !0) => {
4300
+ }, qr = (u, p = !0) => {
4301
4301
  var gt, rt, Ue, ze, fe, nt;
4302
- const f = u || {}, v = ((gt = f == null ? void 0 : f.summary) == null ? void 0 : gt.currency) || (U == null ? void 0 : U.currency) || He, T = vn(r, w), b = kn(r), q = w != null && w.sku ? w.sku : (r == null ? void 0 : r.id) ?? (U == null ? void 0 : U.product_id), Q = (w == null ? void 0 : w.sku) ?? Nn(r), ue = qe(w) || qs(r), te = We(w) || Rs(r), ye = Ct(f), oe = ((rt = f == null ? void 0 : f.summary) == null ? void 0 : rt.product_total) != null ? +f.summary.product_total : $r(f), Ee = ye > 0 ? +(oe / ye).toFixed(2) : 0, Oe = oe, Le = ((Ue = f == null ? void 0 : f.summary) == null ? void 0 : Ue.tax) ?? +(oe * 0.08).toFixed(2), se = ((ze = f == null ? void 0 : f.summary) == null ? void 0 : ze.shipping_fee) ?? (((fe = at[A]) == null ? void 0 : fe.fee) || 0), pe = f != null && f.address ? [
4302
+ const f = u || {}, v = ((gt = f == null ? void 0 : f.summary) == null ? void 0 : gt.currency) || (q == null ? void 0 : q.currency) || He, T = vn(r, w), b = kn(r), U = w != null && w.sku ? w.sku : (r == null ? void 0 : r.id) ?? (q == null ? void 0 : q.product_id), K = (w == null ? void 0 : w.sku) ?? Nn(r), ue = qe(w) || qs(r), te = We(w) || Rs(r), ye = Ct(f), oe = ((rt = f == null ? void 0 : f.summary) == null ? void 0 : rt.product_total) != null ? +f.summary.product_total : $r(f), Ee = ye > 0 ? +(oe / ye).toFixed(2) : 0, Oe = oe, Le = ((Ue = f == null ? void 0 : f.summary) == null ? void 0 : Ue.tax) ?? +(oe * 0.08).toFixed(2), se = ((ze = f == null ? void 0 : f.summary) == null ? void 0 : ze.shipping_fee) ?? (((fe = at[A]) == null ? void 0 : fe.fee) || 0), he = f != null && f.address ? [
4303
4303
  f.address.addressLine1,
4304
4304
  f.address.addressLine2,
4305
4305
  f.address.street,
4306
4306
  [f.address.city, f.address.state, f.address.postalCode].filter(Boolean).join(", "),
4307
4307
  f.address.country
4308
- ].filter(Boolean).map((Dt) => Ke(String(Dt))).join(", ") : "—", Je = (f == null ? void 0 : f.payment) || "card", pt = Je === "card" ? /* @__PURE__ */ c(xe, { children: [
4308
+ ].filter(Boolean).map((Dt) => Ke(String(Dt))).join(", ") : "—", Je = (f == null ? void 0 : f.payment) || "card", ht = Je === "card" ? /* @__PURE__ */ d(xe, { children: [
4309
4309
  "Credit Card — Mastercard",
4310
4310
  /* @__PURE__ */ a("br", {}),
4311
4311
  "•••• 7820 Exp: 12/26"
4312
4312
  ] }) : /* @__PURE__ */ a(xe, { children: Ke(Je) });
4313
- return /* @__PURE__ */ c("div", { className: "mx-auto mt-3 mb-3 rounded-2xl bg-white", children: [
4314
- /* @__PURE__ */ a("div", { className: "px-6 pt-5 pb-3", children: /* @__PURE__ */ c("h3", { className: "font-semibold text-lg mb-2 text-gray-800 flex items-center gap-2", children: [
4313
+ return /* @__PURE__ */ d("div", { className: "mx-auto mt-3 mb-3 rounded-2xl bg-white", children: [
4314
+ /* @__PURE__ */ a("div", { className: "px-6 pt-5 pb-3", children: /* @__PURE__ */ d("h3", { className: "font-semibold text-lg mb-2 text-gray-800 flex items-center gap-2", children: [
4315
4315
  /* @__PURE__ */ a(
4316
4316
  re,
4317
4317
  {
@@ -4322,7 +4322,7 @@ const He = "USD", xn = (e) => {
4322
4322
  ),
4323
4323
  "All set! Here’s what your smart order looks like 🧾"
4324
4324
  ] }) }),
4325
- /* @__PURE__ */ a("div", { className: "px-6 pb-4", children: /* @__PURE__ */ c("div", { className: "grid grid-cols-1 sm:grid-cols-12 gap-4 rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4325
+ /* @__PURE__ */ a("div", { className: "px-6 pb-4", children: /* @__PURE__ */ d("div", { className: "grid grid-cols-1 sm:grid-cols-12 gap-4 rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4326
4326
  /* @__PURE__ */ a("div", { className: "sm:col-span-2 flex", children: /* @__PURE__ */ a("div", { className: "w-30 h-26 sm:w-30 sm:h-26 overflow-hidden rounded-lg bg-white border border-gray-200 flex items-center justify-center mx-auto sm:mx-0", children: T ? /* @__PURE__ */ a(
4327
4327
  "img",
4328
4328
  {
@@ -4338,80 +4338,80 @@ const He = "USD", xn = (e) => {
4338
4338
  className: "opacity-50"
4339
4339
  }
4340
4340
  ) }) }),
4341
- /* @__PURE__ */ c("div", { className: "sm:col-span-10", children: [
4342
- /* @__PURE__ */ c("div", { className: "mb-3", children: [
4341
+ /* @__PURE__ */ d("div", { className: "sm:col-span-10", children: [
4342
+ /* @__PURE__ */ d("div", { className: "mb-3", children: [
4343
4343
  /* @__PURE__ */ a("div", { className: "text-lg text-center font-bold text-gray-900", children: b }),
4344
- /* @__PURE__ */ c("div", { className: "text-xs text-center font-bold text-gray-600", children: [
4344
+ /* @__PURE__ */ d("div", { className: "text-xs text-center font-bold text-gray-600", children: [
4345
4345
  /* @__PURE__ */ a("span", { className: "font-medium", children: "SKU:" }),
4346
4346
  " ",
4347
- q ?? "—"
4347
+ U ?? "—"
4348
4348
  ] }),
4349
- (Q || ue || te) && /* @__PURE__ */ c("div", { className: "text-xs text-gray-600 mt-0.5 text-center", children: [
4350
- Q && /* @__PURE__ */ c(xe, { children: [
4349
+ (K || ue || te) && /* @__PURE__ */ d("div", { className: "text-xs text-gray-600 mt-0.5 text-center", children: [
4350
+ K && /* @__PURE__ */ d(xe, { children: [
4351
4351
  /* @__PURE__ */ a("span", { className: "font-medium", children: "SKU:" }),
4352
4352
  " ",
4353
- Q,
4353
+ K,
4354
4354
  "  "
4355
4355
  ] }),
4356
- ue && /* @__PURE__ */ c(xe, { children: [
4356
+ ue && /* @__PURE__ */ d(xe, { children: [
4357
4357
  /* @__PURE__ */ a("span", { className: "font-medium", children: "Color:" }),
4358
4358
  " ",
4359
4359
  ue,
4360
4360
  "  "
4361
4361
  ] }),
4362
- te && /* @__PURE__ */ c(xe, { children: [
4362
+ te && /* @__PURE__ */ d(xe, { children: [
4363
4363
  /* @__PURE__ */ a("span", { className: "font-medium", children: "Size:" }),
4364
4364
  " ",
4365
4365
  te
4366
4366
  ] })
4367
4367
  ] })
4368
4368
  ] }),
4369
- /* @__PURE__ */ c("div", { className: "grid grid-cols-1 md-grid-cols-3 md:grid-cols-3 gap-3", children: [
4370
- /* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
4369
+ /* @__PURE__ */ d("div", { className: "grid grid-cols-1 md-grid-cols-3 md:grid-cols-3 gap-3", children: [
4370
+ /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
4371
4371
  /* @__PURE__ */ a("div", { className: "text-[11px] uppercase tracking-wide text-gray-500", children: "Unit Price" }),
4372
4372
  /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: Ae(Ee, v) })
4373
4373
  ] }),
4374
- /* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
4374
+ /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
4375
4375
  /* @__PURE__ */ a("div", { className: "text-[11px] uppercase tracking-wide text-gray-500", children: "Quantity" }),
4376
4376
  /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: ye })
4377
4377
  ] }),
4378
- /* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
4378
+ /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
4379
4379
  /* @__PURE__ */ a("div", { className: "text-[11px] uppercase tracking-wide text-gray-500", children: "Subtotal" }),
4380
4380
  /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: Ae(Oe, v) })
4381
4381
  ] })
4382
4382
  ] })
4383
4383
  ] })
4384
4384
  ] }) }),
4385
- /* @__PURE__ */ c("div", { className: "px-6 pb-2", children: [
4386
- /* @__PURE__ */ c("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3 mb-3", children: [
4387
- /* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4385
+ /* @__PURE__ */ d("div", { className: "px-6 pb-2", children: [
4386
+ /* @__PURE__ */ d("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3 mb-3", children: [
4387
+ /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4388
4388
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🏠 Address" }),
4389
- /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: pe })
4389
+ /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: he })
4390
4390
  ] }),
4391
- /* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4391
+ /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4392
4392
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "💳 Payment" }),
4393
- /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: pt })
4393
+ /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: ht })
4394
4394
  ] }),
4395
- /* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4395
+ /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4396
4396
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🚚 Delivery" }),
4397
4397
  /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: f != null && f.delivery && ((nt = at[f.delivery]) == null ? void 0 : nt.label) || "—" })
4398
4398
  ] })
4399
4399
  ] }),
4400
- /* @__PURE__ */ c("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3", children: [
4401
- /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center rounded-xl border border-gray-200 bg-gray-50 p-4 text-center", children: [
4400
+ /* @__PURE__ */ d("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3", children: [
4401
+ /* @__PURE__ */ d("div", { className: "flex flex-col items-center justify-center rounded-xl border border-gray-200 bg-gray-50 p-4 text-center", children: [
4402
4402
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "💰 any(s)" }),
4403
4403
  /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: Ae(oe, v) })
4404
4404
  ] }),
4405
- /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center rounded-xl border border-gray-200 bg-gray-50 p-4 text-center", children: [
4405
+ /* @__PURE__ */ d("div", { className: "flex flex-col items-center justify-center rounded-xl border border-gray-200 bg-gray-50 p-4 text-center", children: [
4406
4406
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🏛️ Taxes" }),
4407
4407
  /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: Ae(Le, v) })
4408
4408
  ] }),
4409
- /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center rounded-xl border border-gray-200 bg-gray-50 p-4 text-center", children: [
4409
+ /* @__PURE__ */ d("div", { className: "flex flex-col items-center justify-center rounded-xl border border-gray-200 bg-gray-50 p-4 text-center", children: [
4410
4410
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🚚 Shipping" }),
4411
4411
  /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: Ae(se, v) })
4412
4412
  ] })
4413
4413
  ] }),
4414
- /* @__PURE__ */ c(
4414
+ /* @__PURE__ */ d(
4415
4415
  "div",
4416
4416
  {
4417
4417
  className: "mt-4 rounded-xl p-4 text-center text-white shadow-sm",
@@ -4423,10 +4423,10 @@ const He = "USD", xn = (e) => {
4423
4423
  }
4424
4424
  )
4425
4425
  ] }),
4426
- !h && /* @__PURE__ */ c("div", { className: "px-6 pb-5", children: [
4426
+ !p && /* @__PURE__ */ d("div", { className: "px-6 pb-5", children: [
4427
4427
  !k && /* @__PURE__ */ a("p", { className: "mt-3 text-center text-sm text-gray-700", children: "Everything looks good! Do you want me to watch this product and buy it automatically when it meets your condition?" }),
4428
- k && Ar({ intentMandateId: W }),
4429
- er && !k && /* @__PURE__ */ c("div", { className: "mt-4 flex flex-wrap items-center justify-center gap-3", children: [
4428
+ k && Ar({ intentMandateId: G }),
4429
+ er && !k && /* @__PURE__ */ d("div", { className: "mt-4 flex flex-wrap items-center justify-center gap-3", children: [
4430
4430
  /* @__PURE__ */ a(
4431
4431
  "button",
4432
4432
  {
@@ -4450,7 +4450,7 @@ const He = "USD", xn = (e) => {
4450
4450
  ] });
4451
4451
  }, _o = (u) => {
4452
4452
  if (!u) return null;
4453
- const h = [
4453
+ const p = [
4454
4454
  u.addressLine1,
4455
4455
  u.addressLine2,
4456
4456
  u.street,
@@ -4462,29 +4462,29 @@ const He = "USD", xn = (e) => {
4462
4462
  {
4463
4463
  className: "px-6 py-4",
4464
4464
  style: { backgroundColor: "var(--tanya-light)" },
4465
- children: /* @__PURE__ */ c("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4466
- /* @__PURE__ */ c("div", { className: "flex items-center gap-2 mb-2", children: [
4465
+ children: /* @__PURE__ */ d("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4466
+ /* @__PURE__ */ d("div", { className: "flex items-center gap-2 mb-2", children: [
4467
4467
  /* @__PURE__ */ a(re, { icon: "mdi:home-map-marker", width: "20", color: I }),
4468
4468
  /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Delivery Address" })
4469
4469
  ] }),
4470
- /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: h })
4470
+ /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: p })
4471
4471
  ] })
4472
4472
  }
4473
4473
  );
4474
4474
  }, Io = (u) => {
4475
- const h = u == null ? void 0 : u.method, f = h ? at[h] : void 0;
4475
+ const p = u == null ? void 0 : u.method, f = p ? at[p] : void 0;
4476
4476
  return /* @__PURE__ */ a(
4477
4477
  "div",
4478
4478
  {
4479
4479
  className: "px-6 py-4",
4480
4480
  style: { backgroundColor: "var(--tanya-light)" },
4481
- children: /* @__PURE__ */ c("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4482
- /* @__PURE__ */ c("div", { className: "flex items-center gap-2 mb-1", children: [
4481
+ children: /* @__PURE__ */ d("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4482
+ /* @__PURE__ */ d("div", { className: "flex items-center gap-2 mb-1", children: [
4483
4483
  /* @__PURE__ */ a(re, { icon: "mdi:truck-delivery", width: "20", color: I }),
4484
4484
  /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Delivery Method" })
4485
4485
  ] }),
4486
- /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: f ? /* @__PURE__ */ c(xe, { children: [
4487
- /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
4486
+ /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: f ? /* @__PURE__ */ d(xe, { children: [
4487
+ /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
4488
4488
  /* @__PURE__ */ a(re, { icon: f.icon, width: "18" }),
4489
4489
  /* @__PURE__ */ a("span", { className: "font-medium", children: f.label })
4490
4490
  ] }),
@@ -4494,14 +4494,14 @@ const He = "USD", xn = (e) => {
4494
4494
  }
4495
4495
  );
4496
4496
  }, Fo = (u) => {
4497
- const h = (u == null ? void 0 : u.method) || "card";
4497
+ const p = (u == null ? void 0 : u.method) || "card";
4498
4498
  return /* @__PURE__ */ a(
4499
4499
  "div",
4500
4500
  {
4501
4501
  className: "px-6 py-4",
4502
4502
  style: { backgroundColor: "var(--tanya-light)" },
4503
- children: /* @__PURE__ */ c("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4504
- /* @__PURE__ */ c("div", { className: "flex items-center gap-2 mb-1", children: [
4503
+ children: /* @__PURE__ */ d("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4504
+ /* @__PURE__ */ d("div", { className: "flex items-center gap-2 mb-1", children: [
4505
4505
  /* @__PURE__ */ a(
4506
4506
  re,
4507
4507
  {
@@ -4512,21 +4512,21 @@ const He = "USD", xn = (e) => {
4512
4512
  ),
4513
4513
  /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Payment Method" })
4514
4514
  ] }),
4515
- /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: h === "card" ? /* @__PURE__ */ c(xe, { children: [
4515
+ /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: p === "card" ? /* @__PURE__ */ d(xe, { children: [
4516
4516
  "Credit Card — Mastercard",
4517
4517
  /* @__PURE__ */ a("br", {}),
4518
4518
  "•••• 7820   Exp: 12/26"
4519
- ] }) : Ke(h) })
4519
+ ] }) : Ke(p) })
4520
4520
  ] })
4521
4521
  }
4522
4522
  );
4523
- }, Po = (u, h) => {
4523
+ }, Po = (u, p) => {
4524
4524
  const f = u.snapshotStage;
4525
4525
  if (!f || f === "address" && le || f === "delivery" && Y || f === "payment" && X || f === "final" && Ne)
4526
4526
  return null;
4527
4527
  switch (f) {
4528
4528
  case "initial":
4529
- return Ur(u.snapshotPayload, !h);
4529
+ return Ur(u.snapshotPayload, !p);
4530
4530
  case "address":
4531
4531
  return _o(u.snapshotPayload);
4532
4532
  case "delivery":
@@ -4534,7 +4534,7 @@ const He = "USD", xn = (e) => {
4534
4534
  case "payment":
4535
4535
  return Fo(u.snapshotPayload);
4536
4536
  case "final":
4537
- return qr(u.snapshotPayload, !h);
4537
+ return qr(u.snapshotPayload, !p);
4538
4538
  case "success":
4539
4539
  return Ar(u.snapshotPayload);
4540
4540
  default:
@@ -4542,7 +4542,7 @@ const He = "USD", xn = (e) => {
4542
4542
  }
4543
4543
  };
4544
4544
  return zo(
4545
- /* @__PURE__ */ c(
4545
+ /* @__PURE__ */ d(
4546
4546
  "div",
4547
4547
  {
4548
4548
  className: "fixed inset-0",
@@ -4558,8 +4558,8 @@ const He = "USD", xn = (e) => {
4558
4558
  onClick: t
4559
4559
  }
4560
4560
  ),
4561
- /* @__PURE__ */ a("div", { className: "absolute right-0 ", children: /* @__PURE__ */ c("div", { className: "w-[64.7vw] h-screen bg-white rounded-xl overflow-hidden flex flex-col shadow-xl", children: [
4562
- /* @__PURE__ */ c(
4561
+ /* @__PURE__ */ a("div", { className: "absolute right-0 ", children: /* @__PURE__ */ d("div", { className: "w-[64.7vw] h-screen bg-white rounded-xl overflow-hidden flex flex-col shadow-xl", children: [
4562
+ /* @__PURE__ */ d(
4563
4563
  "div",
4564
4564
  {
4565
4565
  style: {
@@ -4571,7 +4571,7 @@ const He = "USD", xn = (e) => {
4571
4571
  background: kt
4572
4572
  },
4573
4573
  children: [
4574
- /* @__PURE__ */ c(
4574
+ /* @__PURE__ */ d(
4575
4575
  "div",
4576
4576
  {
4577
4577
  style: {
@@ -4611,20 +4611,20 @@ const He = "USD", xn = (e) => {
4611
4611
  ]
4612
4612
  }
4613
4613
  ),
4614
- /* @__PURE__ */ c(
4614
+ /* @__PURE__ */ d(
4615
4615
  "div",
4616
4616
  {
4617
- ref: ht,
4617
+ ref: pt,
4618
4618
  className: "overflow-y-auto pr-5 pb-4 space-y-4 hide-scrollbar flex-grow",
4619
4619
  children: [
4620
- /* @__PURE__ */ c(
4620
+ /* @__PURE__ */ d(
4621
4621
  "div",
4622
4622
  {
4623
4623
  className: "text-sm text-[16px] rounded-r-xl p-3 m-3 rounded-bl-xl w-3/4 text-tanya-contrast",
4624
- style: { backgroundColor: "#804c9e" },
4624
+ style: { backgroundColor: "#e5dbeb" },
4625
4625
  children: [
4626
4626
  "Welcome to your smart shopping companion!",
4627
- /* @__PURE__ */ c("p", { children: [
4627
+ /* @__PURE__ */ d("p", { children: [
4628
4628
  "Simply share your instruction — like “If this product goes below $",
4629
4629
  parseInt(r.price) - 5,
4630
4630
  " grab it for me.”"
@@ -4634,11 +4634,11 @@ const He = "USD", xn = (e) => {
4634
4634
  }
4635
4635
  ),
4636
4636
  /* @__PURE__ */ a(Co, {}),
4637
- p > 1 && /* @__PURE__ */ a(Br, { showSubmit: !1 }),
4638
- Ye.map((u, h) => {
4637
+ g > 1 && /* @__PURE__ */ a(Br, { showSubmit: !1 }),
4638
+ Ye.map((u, p) => {
4639
4639
  var T;
4640
- const f = h === Ye.length - 1, v = !!u.snapshotStage;
4641
- return /* @__PURE__ */ c("div", { children: [
4640
+ const f = p === Ye.length - 1, v = !!u.snapshotStage;
4641
+ return /* @__PURE__ */ d("div", { children: [
4642
4642
  u.query && /* @__PURE__ */ a("div", { className: "flex justify-end", children: /* @__PURE__ */ a(
4643
4643
  "p",
4644
4644
  {
@@ -4661,8 +4661,8 @@ const He = "USD", xn = (e) => {
4661
4661
  children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ a("p", { children: u.snapshotPayload.text }) })
4662
4662
  }
4663
4663
  ) }),
4664
- f && E && p > 1 && /* @__PURE__ */ c("div", { className: "mx-4 mt-2 rounded-xl border border-gray-200 bg-white p-4 animate-fade-in", children: [
4665
- /* @__PURE__ */ c("div", { className: "text-sm text-gray-800", children: [
4664
+ f && E && g > 1 && /* @__PURE__ */ d("div", { className: "mx-4 mt-2 rounded-xl border border-gray-200 bg-white p-4 animate-fade-in", children: [
4665
+ /* @__PURE__ */ d("div", { className: "text-sm text-gray-800", children: [
4666
4666
  "Proceed with color:",
4667
4667
  " ",
4668
4668
  /* @__PURE__ */ a("span", { className: "font-semibold", children: qe(w) || "—" }),
@@ -4671,7 +4671,7 @@ const He = "USD", xn = (e) => {
4671
4671
  /* @__PURE__ */ a("span", { className: "font-semibold", children: We(w) || "—" }),
4672
4672
  "?"
4673
4673
  ] }),
4674
- /* @__PURE__ */ c("div", { className: "mt-3 flex gap-3", children: [
4674
+ /* @__PURE__ */ d("div", { className: "mt-3 flex gap-3", children: [
4675
4675
  /* @__PURE__ */ a(
4676
4676
  "button",
4677
4677
  {
@@ -4684,7 +4684,7 @@ const He = "USD", xn = (e) => {
4684
4684
  /* @__PURE__ */ a(
4685
4685
  "button",
4686
4686
  {
4687
- onClick: ho,
4687
+ onClick: po,
4688
4688
  className: "px-5 py-2 rounded-full font-semibold border",
4689
4689
  style: {
4690
4690
  borderColor: I,
@@ -4696,7 +4696,7 @@ const He = "USD", xn = (e) => {
4696
4696
  ] })
4697
4697
  ] }),
4698
4698
  f && we && /* @__PURE__ */ a(Br, { showSubmit: !0 }),
4699
- f && G && /* @__PURE__ */ a("div", { className: "mt-4", children: /* @__PURE__ */ a(
4699
+ f && Q && /* @__PURE__ */ a("div", { className: "mt-4", children: /* @__PURE__ */ a(
4700
4700
  "div",
4701
4701
  {
4702
4702
  className: "text-sm text-tanya-contrast px-7 py-4 rounded-r-xl rounded-bl-2xl w-full",
@@ -4707,7 +4707,7 @@ const He = "USD", xn = (e) => {
4707
4707
  children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2 tanya-pulse-text", children: /* @__PURE__ */ a("p", { children: "Reading your instruction and setting things up…" }) })
4708
4708
  }
4709
4709
  ) }),
4710
- (v || u.response === "__CARD__") && (!G || !f) && /* @__PURE__ */ a(
4710
+ (v || u.response === "__CARD__") && (!Q || !f) && /* @__PURE__ */ a(
4711
4711
  "div",
4712
4712
  {
4713
4713
  className: "mt-6 mb-4 mx-4 animate-fade-in",
@@ -4723,11 +4723,11 @@ const He = "USD", xn = (e) => {
4723
4723
  )
4724
4724
  }
4725
4725
  )
4726
- ] }, h);
4726
+ ] }, p);
4727
4727
  }),
4728
- le && /* @__PURE__ */ c("div", { className: "mt-6 mb-6 mx-6 rounded-xl p-6 shadow-md border border-gray-200 bg-white animate-fade-in", children: [
4729
- /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
4730
- /* @__PURE__ */ c("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
4728
+ le && /* @__PURE__ */ d("div", { className: "mt-6 mb-6 mx-6 rounded-xl p-6 shadow-md border border-gray-200 bg-white animate-fade-in", children: [
4729
+ /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
4730
+ /* @__PURE__ */ d("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
4731
4731
  /* @__PURE__ */ a(
4732
4732
  re,
4733
4733
  {
@@ -4738,7 +4738,7 @@ const He = "USD", xn = (e) => {
4738
4738
  ),
4739
4739
  "Select a Delivery Address"
4740
4740
  ] }),
4741
- j && /* @__PURE__ */ c(xe, { children: [
4741
+ j && /* @__PURE__ */ d(xe, { children: [
4742
4742
  /* @__PURE__ */ a("span", { className: "ml-2 text-xs px-2 py-1 rounded-full bg-green-100 text-green-700 font-semibold", children: "Selected" }),
4743
4743
  !k && /* @__PURE__ */ a(
4744
4744
  "button",
@@ -4756,7 +4756,7 @@ const He = "USD", xn = (e) => {
4756
4756
  ] })
4757
4757
  ] }),
4758
4758
  /* @__PURE__ */ a("p", { className: "text-sm text-gray-600 mb-4", children: "Choose where you’d like us to deliver this item." }),
4759
- s ? /* @__PURE__ */ c("div", { className: "flex items-center py-6", children: [
4759
+ s ? /* @__PURE__ */ d("div", { className: "flex items-center py-6", children: [
4760
4760
  /* @__PURE__ */ a(
4761
4761
  "div",
4762
4762
  {
@@ -4765,17 +4765,17 @@ const He = "USD", xn = (e) => {
4765
4765
  }
4766
4766
  ),
4767
4767
  /* @__PURE__ */ a("p", { className: "ml-3 text-gray-600", children: "Fetching your addresses..." })
4768
- ] }) : Ze.length > 0 ? /* @__PURE__ */ c(
4768
+ ] }) : Ze.length > 0 ? /* @__PURE__ */ d(
4769
4769
  "div",
4770
4770
  {
4771
4771
  className: `space-y-3 ${j ? "opacity-70" : ""}`,
4772
4772
  children: [
4773
4773
  Ze.map((u) => {
4774
- const h = [u.addressLine1, u.addressLine2].filter(Boolean).map((Q) => Ke(Q || "")).join(" "), f = Ke(u.city || ""), v = `${Ke(u.state || "")}${u.state && u.postalCode ? ", " : ""}${u.postalCode || ""}`, T = Ke(u.country || ""), b = String(u.addressId ?? u.id), q = Ie === b;
4775
- return /* @__PURE__ */ c(
4774
+ const p = [u.addressLine1, u.addressLine2].filter(Boolean).map((K) => Ke(K || "")).join(" "), f = Ke(u.city || ""), v = `${Ke(u.state || "")}${u.state && u.postalCode ? ", " : ""}${u.postalCode || ""}`, T = Ke(u.country || ""), b = String(u.addressId ?? u.id), U = Ie === b;
4775
+ return /* @__PURE__ */ d(
4776
4776
  "label",
4777
4777
  {
4778
- className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${q ? "border-tanya-light" : "border-gray-300"} ${j ? "pointer-events-none" : ""}`,
4778
+ className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${U ? "border-tanya-light" : "border-gray-300"} ${j ? "pointer-events-none" : ""}`,
4779
4779
  title: j ? "Address already submitted" : "",
4780
4780
  children: [
4781
4781
  /* @__PURE__ */ a(
@@ -4784,15 +4784,15 @@ const He = "USD", xn = (e) => {
4784
4784
  type: "radio",
4785
4785
  name: "address",
4786
4786
  className: "mt-1 accent-tanya-light",
4787
- checked: q,
4787
+ checked: U,
4788
4788
  disabled: j,
4789
4789
  onChange: () => Zt(b),
4790
4790
  value: b
4791
4791
  }
4792
4792
  ),
4793
- /* @__PURE__ */ c("div", { className: "flex-1", children: [
4794
- /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: h || "Address" }),
4795
- /* @__PURE__ */ c("div", { className: "text-sm text-gray-700", children: [
4793
+ /* @__PURE__ */ d("div", { className: "flex-1", children: [
4794
+ /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: p || "Address" }),
4795
+ /* @__PURE__ */ d("div", { className: "text-sm text-gray-700", children: [
4796
4796
  f,
4797
4797
  /* @__PURE__ */ a("br", {}),
4798
4798
  v,
@@ -4805,7 +4805,7 @@ const He = "USD", xn = (e) => {
4805
4805
  b
4806
4806
  );
4807
4807
  }),
4808
- /* @__PURE__ */ c("div", { className: "flex justify-between pt-2", children: [
4808
+ /* @__PURE__ */ d("div", { className: "flex justify-between pt-2", children: [
4809
4809
  /* @__PURE__ */ a(
4810
4810
  "button",
4811
4811
  {
@@ -4833,9 +4833,9 @@ const He = "USD", xn = (e) => {
4833
4833
  }
4834
4834
  ) : /* @__PURE__ */ a("div", { className: "text-center py-8 text-gray-600", children: "No addresses found. Please add a new one in your profile." })
4835
4835
  ] }),
4836
- Y && /* @__PURE__ */ c("div", { className: "mt-2 mb-6 mx-6 rounded-xl p-6 shadow-md border border-gray-200 bg-white animate-fade-in", children: [
4837
- /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
4838
- /* @__PURE__ */ c("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
4836
+ Y && /* @__PURE__ */ d("div", { className: "mt-2 mb-6 mx-6 rounded-xl p-6 shadow-md border border-gray-200 bg-white animate-fade-in", children: [
4837
+ /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
4838
+ /* @__PURE__ */ d("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
4839
4839
  /* @__PURE__ */ a(
4840
4840
  re,
4841
4841
  {
@@ -4846,7 +4846,7 @@ const He = "USD", xn = (e) => {
4846
4846
  ),
4847
4847
  "Great! Now choose how fast you want it delivered 🚚"
4848
4848
  ] }),
4849
- B && /* @__PURE__ */ c(xe, { children: [
4849
+ B && /* @__PURE__ */ d(xe, { children: [
4850
4850
  /* @__PURE__ */ a("span", { className: "ml-2 text-xs px-2 py-1 rounded-full bg-green-100 text-green-700 font-semibold", children: "Selected" }),
4851
4851
  !k && /* @__PURE__ */ a(
4852
4852
  "button",
@@ -4870,8 +4870,8 @@ const He = "USD", xn = (e) => {
4870
4870
  className: `space-y-3 ${B ? "opacity-70" : ""}`,
4871
4871
  children: Object.keys(at).map(
4872
4872
  (u) => {
4873
- const h = at[u], f = A === u;
4874
- return /* @__PURE__ */ c(
4873
+ const p = at[u], f = A === u;
4874
+ return /* @__PURE__ */ d(
4875
4875
  "label",
4876
4876
  {
4877
4877
  className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${f ? "border-tanya-light" : "border-gray-300"} ${B ? "pointer-events-none" : ""}`,
@@ -4888,17 +4888,17 @@ const He = "USD", xn = (e) => {
4888
4888
  onChange: () => ce(u)
4889
4889
  }
4890
4890
  ),
4891
- /* @__PURE__ */ c("div", { className: "flex-1", children: [
4892
- /* @__PURE__ */ c("div", { className: "font-semibold text-gray-800 flex items-center gap-2", children: [
4893
- /* @__PURE__ */ a(re, { icon: h.icon, width: "18" }),
4891
+ /* @__PURE__ */ d("div", { className: "flex-1", children: [
4892
+ /* @__PURE__ */ d("div", { className: "font-semibold text-gray-800 flex items-center gap-2", children: [
4893
+ /* @__PURE__ */ a(re, { icon: p.icon, width: "18" }),
4894
4894
  " ",
4895
- h.label
4895
+ p.label
4896
4896
  ] }),
4897
- /* @__PURE__ */ a("div", { className: "text-sm text-gray-700", children: h.subtitle })
4897
+ /* @__PURE__ */ a("div", { className: "text-sm text-gray-700", children: p.subtitle })
4898
4898
  ] }),
4899
- /* @__PURE__ */ a("div", { className: "text-sm font-semibold text-gray-800", children: h.fee === 0 ? "Free" : Ae(
4900
- h.fee,
4901
- (U == null ? void 0 : U.currency) || He
4899
+ /* @__PURE__ */ a("div", { className: "text-sm font-semibold text-gray-800", children: p.fee === 0 ? "Free" : Ae(
4900
+ p.fee,
4901
+ (q == null ? void 0 : q.currency) || He
4902
4902
  ) })
4903
4903
  ]
4904
4904
  },
@@ -4908,7 +4908,7 @@ const He = "USD", xn = (e) => {
4908
4908
  )
4909
4909
  }
4910
4910
  ),
4911
- /* @__PURE__ */ c("div", { className: "flex justify-between pt-4", children: [
4911
+ /* @__PURE__ */ d("div", { className: "flex justify-between pt-4", children: [
4912
4912
  /* @__PURE__ */ a(
4913
4913
  "button",
4914
4914
  {
@@ -4933,9 +4933,9 @@ const He = "USD", xn = (e) => {
4933
4933
  )
4934
4934
  ] })
4935
4935
  ] }),
4936
- X && /* @__PURE__ */ c("div", { className: "mt-2 mb-6 mx-6 rounded-xl p-6 shadow-md border border-gray-200 bg-white animate-fade-in", children: [
4937
- /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
4938
- /* @__PURE__ */ c("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
4936
+ X && /* @__PURE__ */ d("div", { className: "mt-2 mb-6 mx-6 rounded-xl p-6 shadow-md border border-gray-200 bg-white animate-fade-in", children: [
4937
+ /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
4938
+ /* @__PURE__ */ d("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
4939
4939
  /* @__PURE__ */ a(
4940
4940
  re,
4941
4941
  {
@@ -4946,7 +4946,7 @@ const He = "USD", xn = (e) => {
4946
4946
  ),
4947
4947
  "Almost done! 💳"
4948
4948
  ] }),
4949
- Z && /* @__PURE__ */ c(xe, { children: [
4949
+ Z && /* @__PURE__ */ d(xe, { children: [
4950
4950
  /* @__PURE__ */ a("span", { className: "ml-2 text-xs px-2 py-1 rounded-full bg-green-100 text-green-700 font-semibold", children: "Selected" }),
4951
4951
  !k && /* @__PURE__ */ a(
4952
4952
  "button",
@@ -4968,7 +4968,7 @@ const He = "USD", xn = (e) => {
4968
4968
  "div",
4969
4969
  {
4970
4970
  className: `space-y-3 ${Z ? "opacity-70" : ""}`,
4971
- children: /* @__PURE__ */ c(
4971
+ children: /* @__PURE__ */ d(
4972
4972
  "label",
4973
4973
  {
4974
4974
  className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${ke === "card" ? "border-tanya-light" : "border-gray-300"} ${Z ? "pointer-events-none" : ""}`,
@@ -4985,13 +4985,13 @@ const He = "USD", xn = (e) => {
4985
4985
  onChange: () => Se("card")
4986
4986
  }
4987
4987
  ),
4988
- /* @__PURE__ */ c("div", { className: "flex-1", children: [
4989
- /* @__PURE__ */ c("div", { className: "font-semibold text-gray-800 flex items-center gap-2", children: [
4988
+ /* @__PURE__ */ d("div", { className: "flex-1", children: [
4989
+ /* @__PURE__ */ d("div", { className: "font-semibold text-gray-800 flex items-center gap-2", children: [
4990
4990
  /* @__PURE__ */ a(re, { icon: "mdi:credit-card-chip-outline", width: "18" }),
4991
4991
  " ",
4992
4992
  "Credit Card"
4993
4993
  ] }),
4994
- ke === "card" && /* @__PURE__ */ c("div", { className: "text-sm text-gray-700 mt-1", children: [
4994
+ ke === "card" && /* @__PURE__ */ d("div", { className: "text-sm text-gray-700 mt-1", children: [
4995
4995
  "Mastercard    •••• 7820",
4996
4996
  /* @__PURE__ */ a("br", {}),
4997
4997
  "Expiry: 12/26"
@@ -5002,7 +5002,7 @@ const He = "USD", xn = (e) => {
5002
5002
  )
5003
5003
  }
5004
5004
  ),
5005
- /* @__PURE__ */ c("div", { className: "flex justify-between pt-4", children: [
5005
+ /* @__PURE__ */ d("div", { className: "flex justify-between pt-4", children: [
5006
5006
  /* @__PURE__ */ a(
5007
5007
  "button",
5008
5008
  {
@@ -5029,20 +5029,20 @@ const He = "USD", xn = (e) => {
5029
5029
  ] }),
5030
5030
  Ne && qr(
5031
5031
  {
5032
- ...U,
5032
+ ...q,
5033
5033
  address: JSON.parse(
5034
5034
  localStorage.getItem("agentic_order_address") || "null"
5035
5035
  ),
5036
5036
  delivery: localStorage.getItem("agentic_order_delivery"),
5037
5037
  payment: localStorage.getItem("agentic_order_payment"),
5038
- summary: Dr(U == null ? void 0 : U.currency)
5038
+ summary: Dr(q == null ? void 0 : q.currency)
5039
5039
  },
5040
5040
  !1
5041
5041
  )
5042
5042
  ]
5043
5043
  }
5044
5044
  ),
5045
- /* @__PURE__ */ c("div", { className: "sticky bottom-0 w-[96%] drop-shadow-xl flex items-center rounded-full bg-white border border-gray-300 m-[15px]", children: [
5045
+ /* @__PURE__ */ d("div", { className: "sticky bottom-0 w-[96%] drop-shadow-xl flex items-center rounded-full bg-white border border-gray-300 m-[15px]", children: [
5046
5046
  /* @__PURE__ */ a(
5047
5047
  "input",
5048
5048
  {
@@ -5052,20 +5052,20 @@ const He = "USD", xn = (e) => {
5052
5052
  ${Nt ? "" : "placeholder:text-red-400 text-red-500"}`,
5053
5053
  value: $e,
5054
5054
  onKeyDown: (u) => {
5055
- u.key === "Enter" && !G && !L && Lr();
5055
+ u.key === "Enter" && !Q && !L && Lr();
5056
5056
  },
5057
- onChange: (u) => he(u.target.value)
5057
+ onChange: (u) => pe(u.target.value)
5058
5058
  }
5059
5059
  ),
5060
5060
  /* @__PURE__ */ a(
5061
5061
  "button",
5062
5062
  {
5063
5063
  type: "submit",
5064
- disabled: G || L,
5064
+ disabled: Q || L,
5065
5065
  className: "mr-6 font-medium",
5066
5066
  style: { color: "var(--tanya-light)" },
5067
5067
  onClick: () => Lr(),
5068
- children: G ? /* @__PURE__ */ a(
5068
+ children: Q ? /* @__PURE__ */ a(
5069
5069
  "div",
5070
5070
  {
5071
5071
  className: "m-3 animate-spin rounded-full h-6 w-6 border-b-2",