tanya-chatbot 0.7.1 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,19 +1,19 @@
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";
1
+ import { useEffect as ke, 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 ve } 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";
6
6
  import * as Pn from "@radix-ui/react-popover";
7
7
  import "clsx";
8
8
  import "tailwind-merge";
9
- import ge from "axios";
9
+ import we from "axios";
10
10
  import "crypto-js";
11
11
  import { Icon as Lo } from "@iconify/react";
12
12
  import { toast as Me } from "react-toastify";
13
13
  import { createPortal as zo } from "react-dom";
14
14
  const Mo = '*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media(min-width:640px){.container{max-width:640px}}@media(min-width:768px){.container{max-width:768px}}@media(min-width:1024px){.container{max-width:1024px}}@media(min-width:1280px){.container{max-width:1280px}}@media(min-width:1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.top-full{top:100%}.z-40{z-index:40}.z-50{z-index:50}.m-1{margin:.25rem}.m-3{margin:.75rem}.m-\\[15px\\]{margin:15px}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.mb-1{margin-bottom:.25rem}.mb-16{margin-bottom:4rem}.mb-2{margin-bottom:.5rem}.mb-20{margin-bottom:5rem}.mb-24{margin-bottom:6rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.mr-2{margin-right:.5rem}.mr-6{margin-right:1.5rem}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-12{height:3rem}.h-20{height:5rem}.h-28{height:7rem}.h-3{height:.75rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-\\[120px\\]{height:120px}.h-\\[150px\\]{height:150px}.h-\\[200px\\]{height:200px}.h-\\[60px\\]{height:60px}.h-\\[90vh\\]{height:90vh}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.w-28{width:7rem}.w-3{width:.75rem}.w-3\\/4{width:75%}.w-5\\/6{width:83.333333%}.w-6{width:1.5rem}.w-72{width:18rem}.w-8{width:2rem}.w-\\[100vw\\]{width:100vw}.w-\\[120px\\]{width:120px}.w-\\[150px\\]{width:150px}.w-\\[60px\\]{width:60px}.w-\\[64\\.7vw\\]{width:64.7vw}.w-\\[96\\%\\]{width:96%}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[75\\%\\]{max-width:75%}.max-w-\\[90\\%\\]{max-width:90%}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-y-2{row-gap:.5rem}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-\\[10px\\]{border-radius:10px}.rounded-\\[20px\\]{border-radius:20px}.rounded-\\[5px\\]{border-radius:5px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:.75rem}.rounded-l-\\[20px\\]{border-top-left-radius:20px;border-bottom-left-radius:20px}.rounded-l-xl{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.rounded-r-xl{border-top-right-radius:.75rem;border-bottom-right-radius:.75rem}.rounded-bl-2xl{border-bottom-left-radius:1rem}.rounded-bl-xl{border-bottom-left-radius:.75rem}.rounded-br-xl{border-bottom-right-radius:.75rem}.rounded-tr-\\[20px\\]{border-top-right-radius:20px}.rounded-tr-\\[5px\\]{border-top-right-radius:5px}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-t{border-top-width:1px}.border-t-2{border-top-width:2px}.border-none{border-style:none}.border-\\[\\#C9C2DE\\]{--tw-border-opacity: 1;border-color:rgb(201 194 222 / var(--tw-border-opacity, 1))}.border-\\[\\#E5E5E5\\]{--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.bg-\\[\\#553D94\\]{--tw-bg-opacity: 1;background-color:rgb(85 61 148 / var(--tw-bg-opacity, 1))}.bg-\\[\\#6851C6\\]{--tw-bg-opacity: 1;background-color:rgb(104 81 198 / var(--tw-bg-opacity, 1))}.bg-\\[\\#804C9E0D\\]{background-color:#804c9e0d}.bg-\\[\\#A21CAF\\]{--tw-bg-opacity: 1;background-color:rgb(162 28 175 / var(--tw-bg-opacity, 1))}.bg-\\[\\#AB192D\\]{--tw-bg-opacity: 1;background-color:rgb(171 25 45 / var(--tw-bg-opacity, 1))}.bg-\\[\\#E2DBFF\\]{--tw-bg-opacity: 1;background-color:rgb(226 219 255 / var(--tw-bg-opacity, 1))}.bg-\\[\\#E3DEEF\\]{--tw-bg-opacity: 1;background-color:rgb(227 222 239 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F3F3F3\\]{--tw-bg-opacity: 1;background-color:rgb(243 243 243 / var(--tw-bg-opacity, 1))}.bg-\\[\\#FFFFFF\\],.bg-\\[\\#ffffff\\]{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-black\\/30{background-color:#0000004d}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.bg-indigo-300{--tw-bg-opacity: 1;background-color:rgb(165 180 252 / var(--tw-bg-opacity, 1))}.bg-popover{background-color:hsl(var(--popover))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\\/70{background-color:#ffffffb3}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\\.5{padding:.125rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\\[1px\\]{padding:1px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pl-2{padding-left:.5rem}.pr-5{padding-right:1.25rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.font-nunitoSans{font-family:Nunito Sans}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[14px\\]{font-size:14px}.text-\\[15px\\]{font-size:15px}.text-\\[16px\\]{font-size:16px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm,.text-sm\\/5{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.text-\\[\\#000000\\]{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-\\[\\#14121F\\]{--tw-text-opacity: 1;color:rgb(20 18 31 / var(--tw-text-opacity, 1))}.text-\\[\\#18181B\\]{--tw-text-opacity: 1;color:rgb(24 24 27 / var(--tw-text-opacity, 1))}.text-\\[\\#232323\\]{--tw-text-opacity: 1;color:rgb(35 35 35 / var(--tw-text-opacity, 1))}.text-\\[\\#323135\\]{--tw-text-opacity: 1;color:rgb(50 49 53 / var(--tw-text-opacity, 1))}.text-\\[\\#494949\\]{--tw-text-opacity: 1;color:rgb(73 73 73 / var(--tw-text-opacity, 1))}.text-\\[\\#555555\\]{--tw-text-opacity: 1;color:rgb(85 85 85 / var(--tw-text-opacity, 1))}.text-\\[\\#5B5B5B\\]{--tw-text-opacity: 1;color:rgb(91 91 91 / var(--tw-text-opacity, 1))}.text-\\[\\#68656E\\]{--tw-text-opacity: 1;color:rgb(104 101 110 / var(--tw-text-opacity, 1))}.text-\\[\\#959595\\]{--tw-text-opacity: 1;color:rgb(149 149 149 / var(--tw-text-opacity, 1))}.text-\\[\\#EC5050\\]{--tw-text-opacity: 1;color:rgb(236 80 80 / var(--tw-text-opacity, 1))}.text-\\[\\#FBFBFC\\]{--tw-text-opacity: 1;color:rgb(251 251 252 / var(--tw-text-opacity, 1))}.text-\\[\\#FFFFFF\\]{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-green-900{--tw-text-opacity: 1;color:rgb(20 83 45 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-95{opacity:.95}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0px_2px_2px_0px_\\#9292BC40\\]{--tw-shadow: 0px 2px 2px 0px #9292BC40;--tw-shadow-colored: 0px 2px 2px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0px_4px_10px_0px_\\#5F499840\\]{--tw-shadow: 0px 4px 10px 0px #5F499840;--tw-shadow-colored: 0px 4px 10px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.drop-shadow-xl{--tw-drop-shadow: drop-shadow(0 20px 13px rgb(0 0 0 / .03)) drop-shadow(0 8px 5px rgb(0 0 0 / .08));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-150{animation-duration:.15s}.duration-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.running{animation-play-state:running}html,body,#root{margin:0;padding:0}:root{line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;padding:0}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media(prefers-color-scheme:light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.placeholder\\:text-red-400::-moz-placeholder{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.placeholder\\:text-red-400::placeholder{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.hover\\:-translate-y-0\\.5:hover{--tw-translate-y: -.125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:scale-125:hover{--tw-scale-x: 1.25;--tw-scale-y: 1.25;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\\:text-\\[\\#6952C7\\]:hover{--tw-text-opacity: 1;color:rgb(105 82 199 / var(--tw-text-opacity, 1))}.hover\\:opacity-90:hover{opacity:.9}.hover\\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:shadow-sm:hover{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\\:border-transparent:focus{border-color:transparent}.focus\\:ring-0:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-gray-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity, 1))}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-gray-100:disabled{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.group:hover .group-hover\\:opacity-100{opacity:1}.data-\\[state\\=open\\]\\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\\[state\\=open\\]\\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}@media(min-width:640px){.sm\\:col-span-10{grid-column:span 10 / span 10}.sm\\:col-span-2{grid-column:span 2 / span 2}.sm\\:mx-0{margin-left:0;margin-right:0}.sm\\:w-\\[80vw\\]{width:80vw}.sm\\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.sm\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:flex-row{flex-direction:row}.sm\\:items-center{align-items:center}.sm\\:justify-start{justify-content:flex-start}}@media(min-width:768px){.md\\:h-\\[100vh\\]{height:100vh}.md\\:w-1\\/2{width:50%}.md\\:w-\\[770px\\]{width:770px}.md\\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\\:flex-row{flex-direction:row}}@media(min-width:1024px){.lg\\:h-\\[100vh\\]{height:100vh}.lg\\:w-1\\/2{width:50%}.lg\\:w-2\\/3{width:66.666667%}.lg\\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:flex-row{flex-direction:row}.lg\\:rounded-l-xl{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.lg\\:rounded-bl-xl{border-bottom-left-radius:.75rem}}';
15
15
  function ri() {
16
- return be(() => {
16
+ return ke(() => {
17
17
  if (typeof document < "u") {
18
18
  const e = document.createElement("style");
19
19
  return e.textContent = Mo, document.head.appendChild(e), () => {
@@ -101,18 +101,18 @@ function Jo({
101
101
  const lt = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1.amazonaws.com/dev/api/bedrock/invoke/stream", xAPIKey: "BJBtjpPkqGatuoa3qJqdR8aHXSsHkgvGaootbubi", serverUrl: "https://tanya-sfcc-server.vercel.app/", basePath: "sc-api" }), On = async () => {
102
102
  const e = "https://tanya-sfcc-server.vercel.app/";
103
103
  try {
104
- const t = await ge.post(
105
- `${e}api/auth/token-bm-grant?baseUrl=${Ge()}&siteId=${Ve()}`
104
+ const t = await we.post(
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) {
109
- return ge.isAxiosError(t) ? console.error("Error fetching token:", t.response || t.message) : console.error("Unexpected error:", t), null;
109
+ return we.isAxiosError(t) ? console.error("Error fetching token:", t.response || t.message) : console.error("Unexpected error:", t), null;
110
110
  }
111
111
  }, An = async (e) => {
112
112
  const t = "https://tanya-sfcc-server.vercel.app/";
113
113
  try {
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()}`,
114
+ const r = JSON.parse(sessionStorage.getItem("customerData") || "{}").dwsid, n = await we.post(
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: {
@@ -123,7 +123,7 @@ const lt = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1
123
123
  );
124
124
  return n.status === 200 && n.data ? n.data : null;
125
125
  } catch (r) {
126
- return ge.isAxiosError(r) ? console.error("Error creating basket:", r.response || r.message) : console.error("Unexpected error:", r), null;
126
+ return we.isAxiosError(r) ? console.error("Error creating basket:", r.response || r.message) : console.error("Unexpected error:", r), null;
127
127
  }
128
128
  };
129
129
  async function vt() {
@@ -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,8 +165,8 @@ 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();
169
- return (await ge.get(
168
+ const o = Qe();
169
+ return (await we.get(
170
170
  `${t}${r}/search-sfcc?baseUrl=${o}&query=${e}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
171
171
  {
172
172
  headers: {
@@ -180,10 +180,10 @@ 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
- return (await ge.get(
186
+ return (await we.get(
187
187
  `${t}${r}/product-sfcc/${e}?baseUrl=${n}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
188
188
  {
189
189
  headers: {
@@ -197,8 +197,8 @@ const ur = async (e, t) => {
197
197
  const t = await On(), { customer_token: r } = await An(
198
198
  t
199
199
  ), { serverUrl: n, basePath: o } = lt(), i = (await vt()).access_token;
200
- return (await ge.get(
201
- `${n}${o}/get-interest?baseUrl=${Ge()}&customerId=${e}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
200
+ return (await we.get(
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,13 +218,13 @@ 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("");
225
225
  function Xo() {
226
226
  const e = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [t, r] = C(e);
227
- return be(() => {
227
+ return ke(() => {
228
228
  const n = () => r(e());
229
229
  return window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
230
230
  }, []), t;
@@ -259,7 +259,7 @@ 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, w, x;
262
+ var g, p, y, x;
263
263
  return /* @__PURE__ */ c(
264
264
  "div",
265
265
  {
@@ -299,14 +299,14 @@ const Zo = ({
299
299
  zIndex: 50
300
300
  },
301
301
  children: l != null && l.productName ? l.productName : l != null && l.product_name ? l.product_name : Jr(
302
- Hr((w = l == null ? void 0 : l.name) == null ? void 0 : w["en-US"]),
302
+ Hr((y = l == null ? void 0 : l.name) == null ? void 0 : y["en-US"]),
303
303
  60
304
304
  ) || "Product"
305
305
  }
306
306
  )
307
307
  ] }),
308
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(
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
  ) }),
@@ -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 d = await we.post(
371
+ `${o}${n}/basket/create?baseUrl=${Qe()}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
372
372
  t,
373
373
  {
374
374
  headers: {
@@ -385,13 +385,13 @@ const Zo = ({
385
385
  "*"
386
386
  ), d.data;
387
387
  } catch (d) {
388
- return ge.isAxiosError(d) ? console.error("Error creating basket:", d.response || d.message) : console.error("Unexpected error:", d), null;
388
+ return we.isAxiosError(d) ? console.error("Error creating basket:", d.response || d.message) : console.error("Unexpected error:", d), null;
389
389
  }
390
390
  }, fr = async (e, t, r) => {
391
391
  const { serverUrl: n, basePath: o } = lt(), s = `${n}`;
392
392
  try {
393
- const i = await ge.post(
394
- `${s}${o}/basket/add-product/${e}?baseUrl=${Ge()}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
393
+ const i = await we.post(
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: {
@@ -402,7 +402,7 @@ const Zo = ({
402
402
  );
403
403
  return i.status === 200 && i.data ? i.data : null;
404
404
  } catch (i) {
405
- return ge.isAxiosError(i) ? console.error(
405
+ return we.isAxiosError(i) ? console.error(
406
406
  "Error adding products to basket:",
407
407
  i.response || i.message
408
408
  ) : console.error("Unexpected error:", i), null;
@@ -414,8 +414,8 @@ const Zo = ({
414
414
  var s;
415
415
  const { serverUrl: r, basePath: n } = lt(), o = `${r}`;
416
416
  try {
417
- const i = await ge.get(
418
- `${o}${n}/basket/${e}?baseUrl=${Ge()}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
417
+ const i = await we.get(
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",
@@ -425,7 +425,7 @@ const Zo = ({
425
425
  );
426
426
  return { status: i.status, data: i.data };
427
427
  } catch (i) {
428
- return ge.isAxiosError(i) ? { status: (s = i.response) == null ? void 0 : s.status, data: null } : { status: null, data: null };
428
+ return we.isAxiosError(i) ? { status: (s = i.response) == null ? void 0 : s.status, data: null } : { status: null, data: null };
429
429
  }
430
430
  }, Kt = "sfcc_basket_id", Kr = "sfcc_customer_token", Et = "sfcc_token_expiry", ta = 300 * 1e3, Lt = "1.0.0";
431
431
  const it = (e) => {
@@ -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, w, x, S;
449
+ var l, g, p, y, x, S;
450
450
  const t = In(), r = Yt((_) => _.product.product), n = Yt((_) => _.store.store), [o, s] = C(!!r);
451
- if (be(() => {
451
+ if (ke(() => {
452
452
  s(!!r);
453
453
  }, [r]), !r) return null;
454
454
  const i = async () => {
455
- var _, F, N, P, R, y, V, je, E, H, ye, ae, G, Pe, $e, he;
455
+ var _, F, N, P, R, w, Y, $e, E, H, ye, ie, Z, Oe, De, 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", {
@@ -463,31 +463,31 @@ const it = (e) => {
463
463
  }
464
464
  const L = [
465
465
  {
466
- product_id: ((R = r.variants) == null ? void 0 : R[0].product_id) || ((y = r.variants) == null ? void 0 : y[0].productId) || (r == null ? void 0 : r.id),
466
+ product_id: ((R = r.variants) == null ? void 0 : R[0].product_id) || ((w = r.variants) == null ? void 0 : w[0].productId) || (r == null ? void 0 : r.id),
467
467
  quantity: 1
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();
472
- if (!Xe || !Ye || ve >= parseInt(Ye)) {
473
- let _e = "";
474
- if (_e = "Bearer " + (await vt()).access_token, !_e) {
471
+ ), U = (O == null ? void 0 : O.basketId) || localStorage.getItem(Kt), Xe = !1, Ye = localStorage.getItem(Et), Se = Date.now();
472
+ if (!Xe || !Ye || Se >= parseInt(Ye)) {
473
+ let Pe = "";
474
+ if (Pe = "Bearer " + (await vt()).access_token, !Pe) {
475
475
  console.error("Failed to get customer_token");
476
476
  return;
477
477
  }
478
- const ft = ve + 300 * 1e3;
479
- if (Wt(_e), localStorage.setItem(Et, ft.toString()), U) {
480
- const Te = await Dn({
478
+ const ft = Se + 300 * 1e3;
479
+ if (Wt(Pe), localStorage.setItem(Et, ft.toString()), U) {
480
+ const Ae = await Dn({
481
481
  basketId: U,
482
- customer_token: _e
482
+ customer_token: Pe
483
483
  });
484
- if (Te.status === 200 && Te) {
485
- const Ie = await fr(
484
+ if (Ae.status === 200 && Ae) {
485
+ const Te = await fr(
486
486
  U,
487
487
  L,
488
- _e
488
+ Pe
489
489
  );
490
- (((V = Ie == null ? void 0 : Ie.product_items) == null ? void 0 : V.length) > 0 || ((je = Ie == null ? void 0 : Ie.productItems) == null ? void 0 : je.length) > 0) && (Me.success("Added to cart", {
490
+ (((Y = Te == null ? void 0 : Te.product_items) == null ? void 0 : Y.length) > 0 || (($e = Te == null ? void 0 : Te.productItems) == null ? void 0 : $e.length) > 0) && (Me.success("Added to cart", {
491
491
  position: "bottom-right",
492
492
  autoClose: 3e3,
493
493
  hideProgressBar: !1,
@@ -505,7 +505,7 @@ const it = (e) => {
505
505
  quantity: 1
506
506
  }
507
507
  ]
508
- }, M = await $n(_e, Ze);
508
+ }, M = await $n(Pe, Ze);
509
509
  if (!(M != null && M.basket_id) && !(M != null && M.basketId)) {
510
510
  console.error("Failed to create basket");
511
511
  return;
@@ -513,12 +513,12 @@ const it = (e) => {
513
513
  it(
514
514
  (M == null ? void 0 : M.basket_id) || (M == null ? void 0 : M.basketId)
515
515
  ), console.log("adding product to basket");
516
- const le = await fr(
516
+ const de = await fr(
517
517
  (M == null ? void 0 : M.basket_id) || (M == null ? void 0 : M.basketId),
518
518
  L,
519
- _e
519
+ Pe
520
520
  );
521
- console.log("object added to basket"), (((ye = le == null ? void 0 : le.product_items) == null ? void 0 : ye.length) > 0 || ((ae = le == null ? void 0 : le.productItems) == null ? void 0 : ae.length) > 0) && Me.success("Added to cart", {
521
+ console.log("object added to basket"), (((ye = de == null ? void 0 : de.product_items) == null ? void 0 : ye.length) > 0 || ((ie = de == null ? void 0 : de.productItems) == null ? void 0 : ie.length) > 0) && Me.success("Added to cart", {
522
522
  position: "bottom-right",
523
523
  autoClose: 3e3,
524
524
  hideProgressBar: !1,
@@ -531,8 +531,8 @@ 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
+ }), ((Z = L == null ? void 0 : L.response) == null ? void 0 : Z.status) === 404 || // Basket not found
535
+ ((Oe = L == null ? void 0 : L.response) == null ? void 0 : Oe.status) === 401 ? (((De = L == null ? void 0 : L.response) == null ? void 0 : De.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
  }));
@@ -542,7 +542,7 @@ const it = (e) => {
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__ */ c(ve, { children: [
546
546
  /* @__PURE__ */ a(
547
547
  "div",
548
548
  {
@@ -583,7 +583,7 @@ const it = (e) => {
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: (w = (p = (g = (l = r.imageGroups) == null ? void 0 : l[0]) == null ? void 0 : g.images) == null ? void 0 : p[0]) == null ? void 0 : w.link,
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,
587
587
  alt: r.name,
588
588
  className: "rounded-[10px]"
589
589
  }
@@ -711,13 +711,13 @@ const it = (e) => {
711
711
  Others: "others"
712
712
  }, s = Re(null), i = Re(null), d = Re(null), l = Re(null), [g, p] = C(null);
713
713
  Re(null);
714
- const [w, x] = C(!1), [S, _] = C(!1), [F, N] = C(!1), [P, R] = C(!1), [y, V] = C(!1), [je, E] = C(!1), [H, ye] = C(""), [ae, G] = C(""), Pe = (m) => ({
714
+ const [y, x] = C(!1), [S, _] = C(!1), [F, N] = C(!1), [P, R] = C(!1), [w, Y] = C(!1), [$e, E] = C(!1), [H, ye] = C(""), [ie, Z] = C(""), Oe = (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);
720
- be(() => {
719
+ }), [De, pe] = C([]), L = Re(null), O = Yt((m) => m.store.store), U = Yt((m) => m.product.product);
720
+ ke(() => {
721
721
  const m = localStorage.getItem(
722
722
  `access_token_${e.siteId}`
723
723
  ), j = localStorage.getItem(
@@ -725,47 +725,47 @@ 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}`,
732
732
  m || ""
733
733
  );
734
- }, []), be(() => {
735
- localStorage.setItem("chatHistory", JSON.stringify($e));
734
+ }, []), ke(() => {
735
+ localStorage.setItem("chatHistory", JSON.stringify(De));
736
736
  const m = localStorage.getItem(
737
737
  `access_token_${e.siteId}`
738
738
  );
739
739
  m && localStorage.setItem(`chat-token-${e.siteId}`, m);
740
- }, [$e]);
740
+ }, [De]);
741
741
  const Xe = () => {
742
742
  N(!0), setTimeout(() => _(!0), 10);
743
743
  }, Ye = () => {
744
744
  _(!1), setTimeout(() => N(!1), 300);
745
745
  };
746
- be(() => {
747
- w ? Xe() : Ye();
748
- }, [w]);
749
- const ve = (m) => {
750
- G(o[m]);
746
+ ke(() => {
747
+ y ? Xe() : Ye();
748
+ }, [y]);
749
+ const Se = (m) => {
750
+ Z(o[m]);
751
751
  };
752
- be(() => {
752
+ ke(() => {
753
753
  F && L.current && L.current.scrollTo({
754
754
  top: L.current.scrollHeight,
755
755
  behavior: "smooth"
756
756
  });
757
- }, [$e, F]);
758
- const _e = null, ft = null, Ze = async () => {
757
+ }, [De, F]);
758
+ const Pe = null, ft = null, Ze = async () => {
759
759
  const m = await vt();
760
760
  m != null && p(m);
761
761
  };
762
- be(() => {
762
+ ke(() => {
763
763
  if (e != null && e.siteId) {
764
- const { clientID: m, host: j, organizationID: $, shortCode: Y, siteId: z } = e;
765
- sessionStorage.setItem("Host", j), sessionStorage.setItem("SiteId", z), sessionStorage.setItem("pubCfg", btoa(m)), sessionStorage.setItem("envRef", Y), sessionStorage.setItem("orgRef", $);
764
+ const { clientID: m, host: j, organizationID: $, shortCode: J, siteId: z } = e;
765
+ sessionStorage.setItem("Host", j), sessionStorage.setItem("SiteId", z), sessionStorage.setItem("pubCfg", btoa(m)), sessionStorage.setItem("envRef", J), sessionStorage.setItem("orgRef", $);
766
766
  }
767
767
  Ze(), console.log("scapi environment v1");
768
- }, []), be(() => {
768
+ }, []), ke(() => {
769
769
  t && (console.log("setting the basket id", t), it(t));
770
770
  }, [t]);
771
771
  const M = async () => {
@@ -773,18 +773,18 @@ const it = (e) => {
773
773
  sessionStorage.getItem("customerData") || "{}"
774
774
  ).customerId;
775
775
  return (await Wo(m || "")).c_interests;
776
- }, le = async (m, j) => {
776
+ }, de = async (m, j) => {
777
777
  console.log("in secondary flow", Lt);
778
778
  const $ = await M();
779
779
  if (console.log($, "interests of customer", Lt), !!$)
780
780
  try {
781
- he(
782
- (Z) => Z.map(
783
- (K, Ne) => Ne === Z.length - 1 ? { ...K, secondaryLoading: !0 } : K
781
+ pe(
782
+ (te) => te.map(
783
+ (W, _e) => _e === te.length - 1 ? { ...W, secondaryLoading: !0 } : W
784
784
  )
785
785
  );
786
- const Y = await ur(_e, ft);
787
- if (!Y) throw new Error("Failed to fetch token");
786
+ const J = await ur(Pe, ft);
787
+ if (!J) throw new Error("Failed to fetch token");
788
788
  const z = localStorage.getItem("customerNumber"), A = localStorage.getItem("isLoggedIn"), B = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
789
789
  registered: String(A || !1),
790
790
  userId: String(z || (/* @__PURE__ */ new Date()).getTime())
@@ -797,55 +797,55 @@ const it = (e) => {
797
797
  productPoints: String(j || 0),
798
798
  interests: $
799
799
  }
800
- }), X = await fetch(B, {
800
+ }), ee = await fetch(B, {
801
801
  signal: AbortSignal.timeout(3e4),
802
802
  method: "POST",
803
803
  headers: {
804
804
  "Content-Type": "application/json",
805
- Authorization: `Bearer ${Y}`
805
+ Authorization: `Bearer ${J}`
806
806
  },
807
807
  body: D
808
808
  });
809
- if (!X.body) throw new Error("Readable stream not supported");
810
- const ne = X.body.getReader(), ke = new TextDecoder();
811
- let Se = "";
809
+ if (!ee.body) throw new Error("Readable stream not supported");
810
+ const se = ee.body.getReader(), Ne = new TextDecoder();
811
+ let Ce = "";
812
812
  for (; ; ) {
813
- const { done: Z, value: K } = await ne.read();
814
- if (Z) break;
815
- Se += ke.decode(K, { stream: !0 });
816
- const Ne = Se.split(`
813
+ const { done: te, value: W } = await se.read();
814
+ if (te) break;
815
+ Ce += Ne.decode(W, { stream: !0 });
816
+ const _e = Ce.split(`
817
817
  `);
818
- Se = Ne.pop() || "";
819
- for (const ee of Ne)
820
- if (ee.startsWith("data:")) {
821
- const k = ee.slice(5).trim();
818
+ Ce = _e.pop() || "";
819
+ for (const re of _e)
820
+ if (re.startsWith("data:")) {
821
+ const k = re.slice(5).trim();
822
822
  try {
823
- const J = JSON.parse(k);
824
- J.index === 0 && he(
825
- (W) => W.map(
826
- (de, Ce) => Ce === W.length - 1 ? {
827
- ...de,
828
- secondaryResponse: J.data,
823
+ const K = JSON.parse(k);
824
+ K.index === 0 && pe(
825
+ (G) => G.map(
826
+ (fe, Ie) => Ie === G.length - 1 ? {
827
+ ...fe,
828
+ secondaryResponse: K.data,
829
829
  secondaryLoading: !1
830
- } : de
830
+ } : fe
831
831
  )
832
832
  );
833
- } catch (J) {
834
- he(
835
- (W) => W.map(
836
- (de, Ce) => Ce === W.length - 1 ? { ...de, secondaryLoading: !1 } : de
833
+ } catch (K) {
834
+ pe(
835
+ (G) => G.map(
836
+ (fe, Ie) => Ie === G.length - 1 ? { ...fe, secondaryLoading: !1 } : fe
837
837
  )
838
- ), console.error("Secondary flow JSON parse error:", J);
838
+ ), console.error("Secondary flow JSON parse error:", K);
839
839
  }
840
840
  }
841
841
  }
842
- } catch (Y) {
843
- console.error("Secondary flow error:", Y);
842
+ } catch (J) {
843
+ console.error("Secondary flow error:", J);
844
844
  }
845
- }, Te = async (m) => {
845
+ }, Ae = async (m) => {
846
846
  const j = m || H.trim();
847
847
  if (j) {
848
- V(!0), ye(""), s.current = null, i.current = null, d.current = null, l.current = null, he(($) => [
848
+ Y(!0), ye(""), s.current = null, i.current = null, d.current = null, l.current = null, pe(($) => [
849
849
  ...$,
850
850
  {
851
851
  query: j,
@@ -856,12 +856,12 @@ const it = (e) => {
856
856
  }
857
857
  ]);
858
858
  try {
859
- const $ = ae, Y = localStorage.getItem("customerNumber"), z = localStorage.getItem("isLoggedIn"), A = await ur(_e, ft);
859
+ const $ = ie, J = localStorage.getItem("customerNumber"), z = localStorage.getItem("isLoggedIn"), A = await ur(Pe, ft);
860
860
  if (!A)
861
861
  throw new Error("Failed to obtain access token");
862
862
  const B = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
863
863
  registered: String(z || !1),
864
- userId: String(Y || (/* @__PURE__ */ new Date()).getTime())
864
+ userId: String(J || (/* @__PURE__ */ new Date()).getTime())
865
865
  }).toString()}`, D = JSON.stringify({
866
866
  flowId: "MMHQKYI1NE",
867
867
  flowAliasId: "SZF9ZK1ATE",
@@ -869,7 +869,7 @@ const it = (e) => {
869
869
  userPrompt: j,
870
870
  whom: $
871
871
  }
872
- }), X = await fetch(B, {
872
+ }), ee = await fetch(B, {
873
873
  signal: AbortSignal.timeout(3e4),
874
874
  method: "POST",
875
875
  headers: {
@@ -878,72 +878,72 @@ const it = (e) => {
878
878
  },
879
879
  body: D
880
880
  });
881
- if (!X.ok)
882
- throw new Error(`HTTP error! status: ${X.status}`);
883
- if (!X.body) throw new Error("Readable stream not supported");
884
- const ne = X.body.getReader(), ke = new TextDecoder();
885
- let Se = "", Z = "";
881
+ if (!ee.ok)
882
+ throw new Error(`HTTP error! status: ${ee.status}`);
883
+ if (!ee.body) throw new Error("Readable stream not supported");
884
+ const se = ee.body.getReader(), Ne = new TextDecoder();
885
+ let Ce = "", te = "";
886
886
  for (; ; ) {
887
887
  E(!0);
888
- const { done: K, value: Ne } = await ne.read();
889
- if (K) break;
890
- Se += ke.decode(Ne, { stream: !0 });
891
- const ee = Se.split(`
888
+ const { done: W, value: _e } = await se.read();
889
+ if (W) break;
890
+ Ce += Ne.decode(_e, { stream: !0 });
891
+ const re = Ce.split(`
892
892
  `);
893
- Se = ee.pop() || "";
894
- for (const k of ee)
893
+ Ce = re.pop() || "";
894
+ for (const k of re)
895
895
  if (k.startsWith("data:")) {
896
- const J = k.slice(5).trim();
896
+ const K = k.slice(5).trim();
897
897
  try {
898
- const W = JSON.parse(J);
899
- W.index == 1 && (Z = W.data), he(
900
- (de) => de.map(
901
- (Ce, et) => et === de.length - 1 ? {
902
- ...Ce,
903
- [W.index == 0 ? "response" : W.index == 1 ? "keywords" : W.index == 2 ? "potentialQuestions" : "end"]: W.data
904
- } : Ce
898
+ const G = JSON.parse(K);
899
+ G.index == 1 && (te = G.data), pe(
900
+ (fe) => fe.map(
901
+ (Ie, et) => et === fe.length - 1 ? {
902
+ ...Ie,
903
+ [G.index == 0 ? "response" : G.index == 1 ? "keywords" : G.index == 2 ? "potentialQuestions" : "end"]: G.data
904
+ } : Ie
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
  }
912
- Zt(Ie(Z));
912
+ Zt(Te(te));
913
913
  } catch ($) {
914
914
  console.error("Error sending message to Tanya:", $);
915
915
  } finally {
916
- V(!1);
916
+ Y(!1);
917
917
  }
918
918
  }
919
- }, Ie = (m) => {
919
+ }, Te = (m) => {
920
920
  const j = m.match(
921
921
  /top five relevant product or category names are: (.*)/i
922
- ), z = (j ? j[1] : m).split(", ").map((ce) => ce.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
922
+ ), z = (j ? j[1] : m).split(", ").map((ue) => ue.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
923
923
  return [...new Set(z)].filter(Boolean).join(",");
924
924
  }, Zt = async (m) => {
925
- var $, Y, z;
925
+ var $, J, z;
926
926
  const j = typeof m == "string" ? m.split(",") : m;
927
927
  E(!0);
928
928
  try {
929
929
  const A = await Promise.all(
930
930
  j.map((D) => Ko(D).catch(() => []))
931
931
  // prevent Promise.all crash
932
- ), ce = j.map((D, X) => ({
932
+ ), ue = j.map((D, ee) => ({
933
933
  keyword: D,
934
- items: A[X] ?? [],
934
+ items: A[ee] ?? [],
935
935
  loading: !1
936
- })).filter((D) => D.items.length > 0), B = (Y = ($ = ce[0]) == null ? void 0 : $.items) == null ? void 0 : Y[0];
936
+ })).filter((D) => D.items.length > 0), B = (J = ($ = ue[0]) == null ? void 0 : $.items) == null ? void 0 : J[0];
937
937
  if (B) {
938
938
  i.current = B.product_id, s.current = B.product_name, d.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
- (X, ne) => ne === D.length - 1 ? {
945
- ...X,
946
- products: ce,
944
+ (ee, se) => se === D.length - 1 ? {
945
+ ...ee,
946
+ products: ue,
947
947
  productSnapshot: B ? {
948
948
  id: i.current,
949
949
  name: s.current,
@@ -951,14 +951,14 @@ const it = (e) => {
951
951
  price: l.current,
952
952
  points: 0,
953
953
  quantity: 1
954
- } : X.productSnapshot
955
- } : X
954
+ } : ee.productSnapshot
955
+ } : ee
956
956
  )
957
957
  ), B) {
958
958
  const D = JSON.parse(
959
959
  sessionStorage.getItem("customerData") || "{}"
960
960
  );
961
- D != null && D.isGuest || (console.log("running secondary flow", Lt), le(s.current, 0));
961
+ D != null && D.isGuest || (console.log("running secondary flow", Lt), de(s.current, 0));
962
962
  }
963
963
  } catch (A) {
964
964
  console.error("error in keyword search", A);
@@ -966,28 +966,28 @@ 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 $, J, z, A, ue, B, D, ee, se, Ne, Ce, te, W, _e, re;
970
970
  R(!0);
971
971
  try {
972
972
  const k = await jn(m.id);
973
- if (!((Y = ($ = k == null ? void 0 : k.variants) == null ? void 0 : $[0]) != null && Y.product_id || (A = (z = k == null ? void 0 : k.variants) == null ? void 0 : z[0]) != null && A.productId) && !(k.type.item || k.type.bundle)) {
973
+ if (!((J = ($ = k == null ? void 0 : k.variants) == null ? void 0 : $[0]) != null && J.product_id || (A = (z = k == null ? void 0 : k.variants) == null ? void 0 : z[0]) != null && A.productId) && !(k.type.item || k.type.bundle)) {
974
974
  R(!1), Me.error("Variants not found", {
975
975
  position: "bottom-right",
976
976
  autoClose: 1e3
977
977
  }), console.error("No product variant found");
978
978
  return;
979
979
  }
980
- const J = [
980
+ const K = [
981
981
  {
982
- product_id: ((ce = k.variants) == null ? void 0 : ce[0].product_id) || ((B = k.variants) == null ? void 0 : B[0].productId) || (k == null ? void 0 : k.id),
982
+ product_id: ((ue = k.variants) == null ? void 0 : ue[0].product_id) || ((B = k.variants) == null ? void 0 : B[0].productId) || (k == null ? void 0 : k.id),
983
983
  quantity: j
984
984
  }
985
985
  ];
986
- console.log(J, "product data", "app version", Lt);
987
- const W = JSON.parse(
986
+ console.log(K, "product data", "app version", Lt);
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();
990
- if (!Ce || !et || mt >= parseInt(et)) {
989
+ ), fe = (G == null ? void 0 : G.basketId) || localStorage.getItem(Kt), Ie = !1, et = localStorage.getItem(Et), mt = Date.now();
990
+ if (!Ie || !et || mt >= parseInt(et)) {
991
991
  const At = await On();
992
992
  let { customer_token: Be } = await An(
993
993
  At
@@ -997,15 +997,15 @@ const it = (e) => {
997
997
  return;
998
998
  }
999
999
  const jt = mt + 300 * 1e3;
1000
- if (Wt(Be), localStorage.setItem(Et, jt.toString()), console.log(de, "basketIdFromCustomer"), de) {
1000
+ if (Wt(Be), localStorage.setItem(Et, jt.toString()), console.log(fe, "basketIdFromCustomer"), fe) {
1001
1001
  const tt = await Dn({
1002
- basketId: de,
1002
+ basketId: fe,
1003
1003
  customer_token: Be
1004
1004
  });
1005
1005
  if (tt.status === 200 && tt) {
1006
1006
  const kt = await fr(
1007
- de,
1008
- J,
1007
+ fe,
1008
+ K,
1009
1009
  Be
1010
1010
  );
1011
1011
  ((D = kt == null ? void 0 : kt.product_items) == null ? void 0 : D.length) > 0 && (Me.success("Added to cart", {
@@ -1015,14 +1015,14 @@ const it = (e) => {
1015
1015
  closeOnClick: !0,
1016
1016
  pauseOnHover: !0,
1017
1017
  draggable: !0
1018
- }), Jt(de), R(!1));
1018
+ }), Jt(fe), R(!1));
1019
1019
  return;
1020
1020
  }
1021
1021
  }
1022
1022
  const ht = {
1023
1023
  productItems: [
1024
1024
  {
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),
1025
+ productId: ((ee = k.variants) == null ? void 0 : ee[0].product_id) || ((se = k.variants) == null ? void 0 : se[0].productId) || (k == null ? void 0 : k.id),
1026
1026
  quantity: 1
1027
1027
  }
1028
1028
  ]
@@ -1039,14 +1039,14 @@ const it = (e) => {
1039
1039
  it(
1040
1040
  (I == null ? void 0 : I.basket_id) || (I == null ? void 0 : I.basketId)
1041
1041
  );
1042
- const De = await r(
1042
+ const Le = await r(
1043
1043
  {
1044
1044
  productId: i,
1045
1045
  quantity: j
1046
1046
  },
1047
1047
  (I == null ? void 0 : I.basket_id) || (I == null ? void 0 : I.basketId)
1048
1048
  );
1049
- (((ke = De == null ? void 0 : De.product_items) == null ? void 0 : ke.length) > 0 || ((Se = De == null ? void 0 : De.productItems) == null ? void 0 : Se.length) > 0) && Me.success("Added to cart", {
1049
+ (((Ne = Le == null ? void 0 : Le.product_items) == null ? void 0 : Ne.length) > 0 || ((Ce = Le == null ? void 0 : Le.productItems) == null ? void 0 : Ce.length) > 0) && Me.success("Added to cart", {
1050
1050
  position: "bottom-right",
1051
1051
  autoClose: 3e3,
1052
1052
  hideProgressBar: !1,
@@ -1059,17 +1059,17 @@ const it = (e) => {
1059
1059
  R(!1), console.error("Error adding to cart:", k), Me.error("Failed to add product to cart", {
1060
1060
  position: "bottom-right",
1061
1061
  autoClose: 3e3
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", {
1062
+ }), ((te = k == null ? void 0 : k.response) == null ? void 0 : te.status) === 404 || // Basket not found
1063
+ ((W = k == null ? void 0 : k.response) == null ? void 0 : W.status) === 401 ? (((_e = k == null ? void 0 : k.response) == null ? void 0 : _e.status) === 404 && it(null), ((re = k == null ? void 0 : k.response) == null ? void 0 : re.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
  }));
1067
1067
  }
1068
1068
  R(!1);
1069
1069
  };
1070
- return be(() => {
1070
+ return ke(() => {
1071
1071
  F ? setTimeout(() => _(!0), 10) : _(!1);
1072
- }, [F]), /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ c(Yo, { open: w, onOpenChange: x, children: [
1072
+ }, [F]), /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ c(Yo, { open: y, onOpenChange: x, children: [
1073
1073
  /* @__PURE__ */ a(
1074
1074
  Jo,
1075
1075
  {
@@ -1133,7 +1133,7 @@ const it = (e) => {
1133
1133
  ) })
1134
1134
  }
1135
1135
  ),
1136
- F && /* @__PURE__ */ c(xe, { children: [
1136
+ F && /* @__PURE__ */ c(ve, { children: [
1137
1137
  /* @__PURE__ */ a(
1138
1138
  "div",
1139
1139
  {
@@ -1294,11 +1294,11 @@ const it = (e) => {
1294
1294
  /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-2", children: n.map((m) => /* @__PURE__ */ a(
1295
1295
  "button",
1296
1296
  {
1297
- onClick: () => ve(m),
1297
+ onClick: () => Se(m),
1298
1298
  className: "px-2 py-2 font-semibold text-xs text-[#18181B] bg-[#F3F3F3] rounded-2xl",
1299
1299
  style: {
1300
- backgroundColor: ae === o[m] ? "#FFFFFF" : "#F3F3F3",
1301
- borderColor: ae === o[m] ? "#BBB3DD" : ""
1300
+ backgroundColor: ie === o[m] ? "#FFFFFF" : "#F3F3F3",
1301
+ borderColor: ie === o[m] ? "#BBB3DD" : ""
1302
1302
  },
1303
1303
  children: m
1304
1304
  },
@@ -1307,8 +1307,8 @@ const it = (e) => {
1307
1307
  ]
1308
1308
  }
1309
1309
  ),
1310
- $e.map((m, j) => {
1311
- var $, Y;
1310
+ De.map((m, j) => {
1311
+ var $, J;
1312
1312
  return /* @__PURE__ */ c("div", { children: [
1313
1313
  /* @__PURE__ */ a(
1314
1314
  "div",
@@ -1334,8 +1334,8 @@ const it = (e) => {
1334
1334
  }
1335
1335
  }
1336
1336
  ) }),
1337
- je && !m.response.includes("Thinking") && (($ = m.products) == null ? void 0 : $.length) == 0 && /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "text-sm animate-pulse font-nunitoSans font-bold text-[#000000] bg-[#E2DBFF] border border-[#C9C2DE] rounded-l-xl p-2 m-3 mb-4 rounded-br-xl max-w-[75%]", children: "Finding best products for you" }) }),
1338
- (m == null ? void 0 : m.products) && ((Y = m == null ? void 0 : m.products) == null ? void 0 : Y.length) > 0 && /* @__PURE__ */ a(
1337
+ $e && !m.response.includes("Thinking") && (($ = m.products) == null ? void 0 : $.length) == 0 && /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "text-sm animate-pulse font-nunitoSans font-bold text-[#000000] bg-[#E2DBFF] border border-[#C9C2DE] rounded-l-xl p-2 m-3 mb-4 rounded-br-xl max-w-[75%]", children: "Finding best products for you" }) }),
1338
+ (m == null ? void 0 : m.products) && ((J = m == null ? void 0 : m.products) == null ? void 0 : J.length) > 0 && /* @__PURE__ */ a(
1339
1339
  ea,
1340
1340
  {
1341
1341
  chat: m.products,
@@ -1355,7 +1355,7 @@ const it = (e) => {
1355
1355
  "button",
1356
1356
  {
1357
1357
  className: `cursor-pointer font-nunitoSans font-semibold text-[#232323] border bg-[#804C9E0D] border-${O.themeDarkColor} m-1 rounded-xl px-2 py-1`,
1358
- onClick: () => Te(z),
1358
+ onClick: () => Ae(z),
1359
1359
  style: {
1360
1360
  backgroundColor: O.tanyaThemeColorLight
1361
1361
  },
@@ -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(ve, { children: /* @__PURE__ */ c("div", { className: "mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]", children: [
1401
1401
  /* @__PURE__ */ a(
1402
1402
  "div",
1403
1403
  {
@@ -1465,9 +1465,9 @@ const it = (e) => {
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
- (A, ce) => ce === j && A.productSnapshot ? {
1470
+ (A, ue) => ue === j && A.productSnapshot ? {
1471
1471
  ...A,
1472
1472
  productSnapshot: {
1473
1473
  ...A.productSnapshot,
@@ -1491,9 +1491,9 @@ 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
- (A, ce) => ce === j && A.productSnapshot ? {
1496
+ (A, ue) => ue === j && A.productSnapshot ? {
1497
1497
  ...A,
1498
1498
  productSnapshot: {
1499
1499
  ...A.productSnapshot,
@@ -1515,7 +1515,7 @@ const it = (e) => {
1515
1515
  {
1516
1516
  onClick: () => {
1517
1517
  er(
1518
- Pe(
1518
+ Oe(
1519
1519
  m.productSnapshot
1520
1520
  ),
1521
1521
  m.productSnapshot.quantity
@@ -1560,7 +1560,7 @@ const it = (e) => {
1560
1560
  autoFocus: !0,
1561
1561
  onChange: (m) => ye(m.target.value),
1562
1562
  onKeyDown: (m) => {
1563
- m.key === "Enter" && !y && Te();
1563
+ m.key === "Enter" && !w && Ae();
1564
1564
  }
1565
1565
  }
1566
1566
  ),
@@ -1568,10 +1568,10 @@ const it = (e) => {
1568
1568
  "button",
1569
1569
  {
1570
1570
  type: "submit",
1571
- disabled: y,
1571
+ disabled: w,
1572
1572
  className: "p-3",
1573
- onClick: () => Te(),
1574
- children: y ? /* @__PURE__ */ a(
1573
+ onClick: () => Ae(),
1574
+ children: w ? /* @__PURE__ */ a(
1575
1575
  "div",
1576
1576
  {
1577
1577
  className: "p-3 animate-spin rounded-full h-3 w-3 border-b-2",
@@ -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);
@@ -1677,19 +1677,19 @@ function zt(e) {
1677
1677
  e.debug = zt("debug"), e.log = zt("log"), e.warn = zt("warn"), e.error = zt("error");
1678
1678
  })(st || (st = {}));
1679
1679
  var Mn = "3.14.0";
1680
- function yt(e) {
1680
+ function wt(e) {
1681
1681
  try {
1682
1682
  return e();
1683
1683
  } catch {
1684
1684
  }
1685
1685
  }
1686
- const hr = yt(function() {
1686
+ const hr = wt(function() {
1687
1687
  return globalThis;
1688
- }) || yt(function() {
1688
+ }) || wt(function() {
1689
1689
  return window;
1690
- }) || yt(function() {
1690
+ }) || wt(function() {
1691
1691
  return self;
1692
- }) || yt(function() {
1692
+ }) || wt(function() {
1693
1693
  return global;
1694
1694
  }) || // We don't expect the Function constructor ever to be invoked at runtime, as
1695
1695
  // long as at least one of globalThis, window, self, or global is defined, so
@@ -1697,13 +1697,13 @@ const hr = yt(function() {
1697
1697
  // detect syntactic usage of the Function constructor. If you think you can
1698
1698
  // improve your static analysis to detect this obfuscation, think again. This
1699
1699
  // is an arms race you cannot win, at least not in JavaScript.
1700
- yt(function() {
1701
- return yt.constructor("return this")();
1700
+ wt(function() {
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");
@@ -1766,7 +1766,7 @@ function da(e) {
1766
1766
  return t.name.value;
1767
1767
  })[0] || null;
1768
1768
  }
1769
- let ie = null;
1769
+ let ce = null;
1770
1770
  const Zr = {};
1771
1771
  let ua = 1;
1772
1772
  const fa = () => class {
@@ -1779,52 +1779,52 @@ const fa = () => class {
1779
1779
  ].join(":");
1780
1780
  }
1781
1781
  hasValue() {
1782
- for (let t = ie; t; t = t.parent)
1782
+ for (let t = ce; t; t = t.parent)
1783
1783
  if (this.id in t.slots) {
1784
1784
  const r = t.slots[this.id];
1785
1785
  if (r === Zr)
1786
1786
  break;
1787
- return t !== ie && (ie.slots[this.id] = r), !0;
1787
+ return t !== ce && (ce.slots[this.id] = r), !0;
1788
1788
  }
1789
- return ie && (ie.slots[this.id] = Zr), !1;
1789
+ return ce && (ce.slots[this.id] = Zr), !1;
1790
1790
  }
1791
1791
  getValue() {
1792
1792
  if (this.hasValue())
1793
- return ie.slots[this.id];
1793
+ return ce.slots[this.id];
1794
1794
  }
1795
1795
  withValue(t, r, n, o) {
1796
1796
  const s = {
1797
1797
  __proto__: null,
1798
1798
  [this.id]: t
1799
- }, i = ie;
1800
- ie = { parent: i, slots: s };
1799
+ }, i = ce;
1800
+ ce = { parent: i, slots: s };
1801
1801
  try {
1802
1802
  return r.apply(o, n);
1803
1803
  } finally {
1804
- ie = i;
1804
+ ce = i;
1805
1805
  }
1806
1806
  }
1807
1807
  // Capture the current context and wrap a callback function so that it
1808
1808
  // reestablishes the captured context when called.
1809
1809
  static bind(t) {
1810
- const r = ie;
1810
+ const r = ce;
1811
1811
  return function() {
1812
- const n = ie;
1812
+ const n = ce;
1813
1813
  try {
1814
- return ie = r, t.apply(this, arguments);
1814
+ return ce = r, t.apply(this, arguments);
1815
1815
  } finally {
1816
- ie = n;
1816
+ ce = n;
1817
1817
  }
1818
1818
  };
1819
1819
  }
1820
1820
  // Immediately run a callback function without any captured context.
1821
1821
  static noContext(t, r, n) {
1822
- if (ie) {
1823
- const o = ie;
1822
+ if (ce) {
1823
+ const o = ce;
1824
1824
  try {
1825
- return ie = null, t.apply(n, r);
1825
+ return ce = null, t.apply(n, r);
1826
1826
  } finally {
1827
- ie = o;
1827
+ ce = o;
1828
1828
  }
1829
1829
  } else
1830
1830
  return t.apply(n, r);
@@ -1912,7 +1912,7 @@ var _r = function() {
1912
1912
  };
1913
1913
  _r() && !Ir("observable") && (Symbol.observable = Symbol("observable"));
1914
1914
  var ga = Fr("iterator"), pr = Fr("observable"), qn = Fr("species");
1915
- function Qt(e, t) {
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");
@@ -1921,10 +1921,10 @@ function Qt(e, t) {
1921
1921
  }
1922
1922
  function _t(e) {
1923
1923
  var t = e.constructor;
1924
- return t !== void 0 && (t = t[qn], t === null && (t = void 0)), t !== void 0 ? t : me;
1924
+ return t !== void 0 && (t = t[qn], t === null && (t = void 0)), t !== void 0 ? t : he;
1925
1925
  }
1926
- function ya(e) {
1927
- return e instanceof me;
1926
+ function wa(e) {
1927
+ return e instanceof he;
1928
1928
  }
1929
1929
  function xt(e) {
1930
1930
  xt.log ? xt.log(e) : setTimeout(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) {
@@ -1957,7 +1957,7 @@ function Rn(e) {
1957
1957
  function gr(e) {
1958
1958
  e._observer = void 0, e._queue = void 0, e._state = "closed";
1959
1959
  }
1960
- function wa(e) {
1960
+ function ya(e) {
1961
1961
  var t = e._queue;
1962
1962
  if (t) {
1963
1963
  e._queue = void 0, e._state = "ready";
@@ -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);
@@ -2001,7 +2001,7 @@ function sr(e, t, r) {
2001
2001
  type: t,
2002
2002
  value: r
2003
2003
  }], Ut(function() {
2004
- return wa(e);
2004
+ return ya(e);
2005
2005
  });
2006
2006
  return;
2007
2007
  }
@@ -2045,7 +2045,7 @@ var xa = /* @__PURE__ */ (function() {
2045
2045
  return this._subscription._state === "closed";
2046
2046
  }
2047
2047
  }]), e;
2048
- })(), me = /* @__PURE__ */ (function() {
2048
+ })(), he = /* @__PURE__ */ (function() {
2049
2049
  function e(r) {
2050
2050
  if (!(this instanceof e)) throw new TypeError("Observable cannot be called as a function");
2051
2051
  if (typeof r != "function") throw new TypeError("Observable initializer must be a function");
@@ -2130,19 +2130,19 @@ var xa = /* @__PURE__ */ (function() {
2130
2130
  var s = _t(this), i = arguments.length > 1, d = !1, l = arguments[1], g = l;
2131
2131
  return new s(function(p) {
2132
2132
  return o.subscribe({
2133
- next: function(w) {
2133
+ next: function(y) {
2134
2134
  var x = !d;
2135
2135
  if (d = !0, !x || i)
2136
2136
  try {
2137
- g = n(g, w);
2137
+ g = n(g, y);
2138
2138
  } catch (S) {
2139
2139
  return p.error(S);
2140
2140
  }
2141
2141
  else
2142
- g = w;
2142
+ g = y;
2143
2143
  },
2144
- error: function(w) {
2145
- p.error(w);
2144
+ error: function(y) {
2145
+ p.error(y);
2146
2146
  },
2147
2147
  complete: function() {
2148
2148
  if (!d && !i) return p.error(new TypeError("Cannot reduce an empty sequence"));
@@ -2156,7 +2156,7 @@ var xa = /* @__PURE__ */ (function() {
2156
2156
  var d = _t(this);
2157
2157
  return new d(function(l) {
2158
2158
  var g, p = 0;
2159
- function w(x) {
2159
+ function y(x) {
2160
2160
  g = x.subscribe({
2161
2161
  next: function(S) {
2162
2162
  l.next(S);
@@ -2165,11 +2165,11 @@ var xa = /* @__PURE__ */ (function() {
2165
2165
  l.error(S);
2166
2166
  },
2167
2167
  complete: function() {
2168
- p === s.length ? (g = void 0, l.complete()) : w(d.from(s[p++]));
2168
+ p === s.length ? (g = void 0, l.complete()) : y(d.from(s[p++]));
2169
2169
  }
2170
2170
  });
2171
2171
  }
2172
- return w(n), function() {
2172
+ return y(n), function() {
2173
2173
  g && (g.unsubscribe(), g = void 0);
2174
2174
  };
2175
2175
  });
@@ -2186,7 +2186,7 @@ var xa = /* @__PURE__ */ (function() {
2186
2186
  } catch (x) {
2187
2187
  return i.error(x);
2188
2188
  }
2189
- var w = s.from(p).subscribe({
2189
+ var y = s.from(p).subscribe({
2190
2190
  next: function(x) {
2191
2191
  i.next(x);
2192
2192
  },
@@ -2194,11 +2194,11 @@ var xa = /* @__PURE__ */ (function() {
2194
2194
  i.error(x);
2195
2195
  },
2196
2196
  complete: function() {
2197
- var x = d.indexOf(w);
2197
+ var x = d.indexOf(y);
2198
2198
  x >= 0 && d.splice(x, 1), g();
2199
2199
  }
2200
2200
  });
2201
- d.push(w);
2201
+ d.push(y);
2202
2202
  },
2203
2203
  error: function(p) {
2204
2204
  i.error(p);
@@ -2221,15 +2221,15 @@ var xa = /* @__PURE__ */ (function() {
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, pr);
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 ya(i) && i.constructor === o ? i : new o(function(d) {
2228
+ return wa(i) && i.constructor === o ? i : new o(function(d) {
2229
2229
  return i.subscribe(d);
2230
2230
  });
2231
2231
  }
2232
- if (Ir("iterator") && (s = Qt(n, ga), s))
2232
+ if (Ir("iterator") && (s = Gt(n, ga), s))
2233
2233
  return new o(function(d) {
2234
2234
  Ut(function() {
2235
2235
  if (!d.closed) {
@@ -2272,7 +2272,7 @@ var xa = /* @__PURE__ */ (function() {
2272
2272
  }
2273
2273
  }]), e;
2274
2274
  })();
2275
- _r() && Object.defineProperty(me, Symbol("extensions"), {
2275
+ _r() && Object.defineProperty(he, Symbol("extensions"), {
2276
2276
  value: {
2277
2277
  symbol: pr,
2278
2278
  hostReportError: xt
@@ -2295,10 +2295,10 @@ function va(e) {
2295
2295
  t = "@@observable";
2296
2296
  return t;
2297
2297
  }
2298
- var wt;
2299
- typeof self < "u" ? wt = self : typeof window < "u" ? wt = window : typeof global < "u" ? wt = global : typeof module < "u" ? wt = module : wt = Function("return this")();
2300
- va(wt);
2301
- var on = me.prototype, an = "@@observable";
2298
+ var yt;
2299
+ typeof self < "u" ? yt = self : typeof window < "u" ? yt = window : typeof global < "u" ? yt = global : typeof module < "u" ? yt = module : yt = Function("return this")();
2300
+ va(yt);
2301
+ var on = he.prototype, an = "@@observable";
2302
2302
  on[an] || (on[an] = function() {
2303
2303
  return this;
2304
2304
  });
@@ -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,
@@ -2347,7 +2347,7 @@ function Pa(e, t) {
2347
2347
  Fa(e) || t();
2348
2348
  }
2349
2349
  function sn(e, t) {
2350
- return t ? t(e) : me.of();
2350
+ return t ? t(e) : he.of();
2351
2351
  }
2352
2352
  function It(e) {
2353
2353
  return typeof e == "function" ? new Vn(e) : e;
@@ -2363,7 +2363,7 @@ var Vn = (
2363
2363
  }
2364
2364
  return e.empty = function() {
2365
2365
  return new e(function() {
2366
- return me.of();
2366
+ return he.of();
2367
2367
  });
2368
2368
  }, e.from = function(t) {
2369
2369
  return t.length === 0 ? e.empty() : t.map(It).reduce(function(r, n) {
@@ -2372,12 +2372,12 @@ var Vn = (
2372
2372
  }, e.split = function(t, r, n) {
2373
2373
  var o = It(r), s = It(n || new e(sn)), i;
2374
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();
2375
+ return t(d) ? o.request(d) || he.of() : s.request(d) || he.of();
2376
2376
  }) : i = new e(function(d, l) {
2377
- return t(d) ? o.request(d, l) || me.of() : s.request(d, l) || me.of();
2377
+ return t(d) ? o.request(d, l) || he.of() : s.request(d, l) || he.of();
2378
2378
  }), Object.assign(i, { left: o, right: s });
2379
2379
  }, e.execute = function(t, r) {
2380
- return t.request(Sa(r.context, Na(ka(r)))) || me.of();
2380
+ return t.request(Sa(r.context, Na(ka(r)))) || he.of();
2381
2381
  }, e.concat = function(t, r) {
2382
2382
  var n = It(t);
2383
2383
  if (Bt(n))
@@ -2385,12 +2385,12 @@ var Vn = (
2385
2385
  var o = It(r), s;
2386
2386
  return Bt(o) ? s = new e(function(i) {
2387
2387
  return n.request(i, function(d) {
2388
- return o.request(d) || me.of();
2389
- }) || me.of();
2388
+ return o.request(d) || he.of();
2389
+ }) || he.of();
2390
2390
  }) : s = new e(function(i, d) {
2391
2391
  return n.request(i, function(l) {
2392
- return o.request(l, d) || me.of();
2393
- }) || me.of();
2392
+ return o.request(l, d) || he.of();
2393
+ }) || he.of();
2394
2394
  }), Object.assign(s, { left: n, right: o });
2395
2395
  }, e.prototype.split = function(t, r, n) {
2396
2396
  return this.concat(e.split(t, r, n || new e(sn)));
@@ -2412,7 +2412,7 @@ var Vn = (
2412
2412
  function Ta(e) {
2413
2413
  return new Vn(function(t, r) {
2414
2414
  var n = aa(t, []);
2415
- return new me(function(o) {
2415
+ return new he(function(o) {
2416
2416
  var s, i = !1;
2417
2417
  return Promise.resolve(n).then(function(d) {
2418
2418
  return e(d, t.getContext());
@@ -2431,7 +2431,7 @@ function Ta(e) {
2431
2431
  const Ea = async () => {
2432
2432
  const e = "https://auth.australia-southeast1.gcp.commercetools.com/oauth/token", n = "Basic " + btoa(encodeURIComponent("tfegsSBVOYnR7e_yE-AjxVVN") + ":" + encodeURIComponent("pyKWgHuTxuMwDygh9JH1ehLEaLvAhBo4"));
2433
2433
  try {
2434
- const o = await ge.post(
2434
+ const o = await we.post(
2435
2435
  e,
2436
2436
  new URLSearchParams({ grant_type: "client_credentials" }),
2437
2437
  // Only grant_type in body
@@ -2444,7 +2444,7 @@ const Ea = async () => {
2444
2444
  );
2445
2445
  return o.status === 200 && o.data.access_token ? o.data.access_token : (console.error("Failed to fetch token:", o.data), null);
2446
2446
  } catch (o) {
2447
- return ge.isAxiosError(o) ? console.error("Error fetching token:", o.response || o.message) : console.error("Unexpected error:", o), null;
2447
+ return we.isAxiosError(o) ? console.error("Error fetching token:", o.response || o.message) : console.error("Unexpected error:", o), null;
2448
2448
  }
2449
2449
  }, Oa = "https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql", Aa = Eo({
2450
2450
  uri: `${Oa}`
@@ -2486,14 +2486,14 @@ 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
2496
- }), yr = Object.freeze({
2495
+ ...Qt
2496
+ }), wr = Object.freeze({
2497
2497
  ...Pr,
2498
2498
  body: "",
2499
2499
  hidden: !1
@@ -2506,7 +2506,7 @@ function La(e, t) {
2506
2506
  }
2507
2507
  function ln(e, t) {
2508
2508
  const r = La(e, t);
2509
- for (const n in yr) 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) {
@@ -2547,12 +2547,12 @@ function Kn(e) {
2547
2547
  const r = t.icons;
2548
2548
  for (const o in r) {
2549
2549
  const s = r[o];
2550
- if (!o || typeof s.body != "string" || !ir(s, yr)) return null;
2550
+ if (!o || typeof s.body != "string" || !ir(s, wr)) return null;
2551
2551
  }
2552
2552
  const n = t.aliases || /* @__PURE__ */ Object.create(null);
2553
2553
  for (const o in n) {
2554
2554
  const s = n[o], i = s.parent;
2555
- if (!o || typeof i != "string" || !r[i] && !n[i] || !ir(s, yr)) return null;
2555
+ if (!o || typeof i != "string" || !r[i] && !n[i] || !ir(s, wr)) return null;
2556
2556
  }
2557
2557
  return t;
2558
2558
  }
@@ -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;
@@ -2617,7 +2617,7 @@ const Qn = /^[a-z0-9]+(-[a-z0-9]+)*$/, Xt = (e, t, r, n = "") => {
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;
@@ -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
@@ -2712,29 +2712,29 @@ function Qa(e, t) {
2712
2712
  let s = r.body;
2713
2713
  [r, n].forEach((F) => {
2714
2714
  const N = [], P = F.hFlip, R = F.vFlip;
2715
- let y = F.rotate;
2716
- P ? R ? y += 2 : (N.push("translate(" + (o.width + o.left).toString() + " " + (0 - o.top).toString() + ")"), N.push("scale(-1 1)"), o.top = o.left = 0) : R && (N.push("translate(" + (0 - o.left).toString() + " " + (o.height + o.top).toString() + ")"), N.push("scale(1 -1)"), o.top = o.left = 0);
2717
- let V;
2718
- switch (y < 0 && (y -= Math.floor(y / 4) * 4), y = y % 4, y) {
2715
+ let w = F.rotate;
2716
+ P ? R ? w += 2 : (N.push("translate(" + (o.width + o.left).toString() + " " + (0 - o.top).toString() + ")"), N.push("scale(-1 1)"), o.top = o.left = 0) : R && (N.push("translate(" + (0 - o.left).toString() + " " + (o.height + o.top).toString() + ")"), N.push("scale(1 -1)"), o.top = o.left = 0);
2717
+ let Y;
2718
+ switch (w < 0 && (w -= Math.floor(w / 4) * 4), w = w % 4, w) {
2719
2719
  case 1:
2720
- V = o.height / 2 + o.top, N.unshift("rotate(90 " + V.toString() + " " + V.toString() + ")");
2720
+ Y = o.height / 2 + o.top, N.unshift("rotate(90 " + Y.toString() + " " + Y.toString() + ")");
2721
2721
  break;
2722
2722
  case 2:
2723
2723
  N.unshift("rotate(180 " + (o.width / 2 + o.left).toString() + " " + (o.height / 2 + o.top).toString() + ")");
2724
2724
  break;
2725
2725
  case 3:
2726
- V = o.width / 2 + o.left, N.unshift("rotate(-90 " + V.toString() + " " + V.toString() + ")");
2726
+ Y = o.width / 2 + o.left, N.unshift("rotate(-90 " + Y.toString() + " " + Y.toString() + ")");
2727
2727
  break;
2728
2728
  }
2729
- y % 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>"));
2729
+ w % 2 === 1 && (o.left !== o.top && (Y = o.left, o.left = o.top, o.top = Y), o.width !== o.height && (Y = o.width, o.width = o.height, o.height = Y)), N.length && (s = Ka(s, '<g transform="' + N.join(" ") + '">', "</g>"));
2730
2730
  });
2731
2731
  const i = n.width, d = n.height, l = o.width, g = o.height;
2732
- let p, w;
2733
- i === null ? (w = d === null ? "1em" : d === "auto" ? g : d, p = un(w, l / g)) : (p = i === "auto" ? l : i, w = d === null ? un(p, g / l) : d === "auto" ? g : d);
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);
2734
2734
  const x = {}, S = (F, N) => {
2735
2735
  Wa(N) || (x[F] = N.toString());
2736
2736
  };
2737
- S("width", p), S("height", w);
2737
+ S("width", p), S("height", y);
2738
2738
  const _ = [
2739
2739
  o.left,
2740
2740
  o.top,
@@ -2747,12 +2747,12 @@ 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) => {
@@ -2760,12 +2760,12 @@ function es(e, t = Xa) {
2760
2760
  e = e.replace(new RegExp('([#;"])(' + d + ')([")]|\\.[a-z])', "g"), "$1" + i + o + "$3");
2761
2761
  }), e = e.replace(new RegExp(o, "g"), ""), e;
2762
2762
  }
2763
- const wr = /* @__PURE__ */ Object.create(null);
2763
+ const yr = /* @__PURE__ */ Object.create(null);
2764
2764
  function ts(e, t) {
2765
- wr[e] = t;
2765
+ yr[e] = t;
2766
2766
  }
2767
2767
  function xr(e) {
2768
- return wr[e] || wr[""];
2768
+ return yr[e] || yr[""];
2769
2769
  }
2770
2770
  function Tr(e) {
2771
2771
  let t;
@@ -2957,12 +2957,12 @@ function ms(e) {
2957
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
2958
  let p;
2959
2959
  d in g.icons ? p = t.loaded : i === "" || g.missing.has(d) ? p = t.missing : p = t.pending;
2960
- const w = {
2960
+ const y = {
2961
2961
  provider: s,
2962
2962
  prefix: i,
2963
2963
  name: d
2964
2964
  };
2965
- p.push(w);
2965
+ p.push(y);
2966
2966
  }), t;
2967
2967
  }
2968
2968
  function hs(e, t = !0, r = !1) {
@@ -2992,10 +2992,10 @@ function gs(e, t, r, n) {
2992
2992
  i = i.concat(E);
2993
2993
  } else i = e.resources.slice(s).concat(e.resources.slice(0, s));
2994
2994
  const d = Date.now();
2995
- let l = "pending", g = 0, p, w = null, x = [], S = [];
2995
+ let l = "pending", g = 0, p, y = null, x = [], S = [];
2996
2996
  typeof n == "function" && S.push(n);
2997
2997
  function _() {
2998
- w && (clearTimeout(w), w = null);
2998
+ y && (clearTimeout(y), y = null);
2999
2999
  }
3000
3000
  function F() {
3001
3001
  l === "pending" && (l = "aborted"), _(), x.forEach((E) => {
@@ -3021,18 +3021,18 @@ function gs(e, t, r, n) {
3021
3021
  E(void 0, p);
3022
3022
  });
3023
3023
  }
3024
- function y() {
3024
+ function w() {
3025
3025
  x.forEach((E) => {
3026
3026
  E.status === "pending" && (E.status = "aborted");
3027
3027
  }), x = [];
3028
3028
  }
3029
- function V(E, H, ye) {
3030
- const ae = H !== "success";
3031
- switch (x = x.filter((G) => G !== E), l) {
3029
+ function Y(E, H, ye) {
3030
+ const ie = H !== "success";
3031
+ switch (x = x.filter((Z) => Z !== E), l) {
3032
3032
  case "pending":
3033
3033
  break;
3034
3034
  case "failed":
3035
- if (ae || !e.dataAfterTimeout) return;
3035
+ if (ie || !e.dataAfterTimeout) return;
3036
3036
  break;
3037
3037
  default:
3038
3038
  return;
@@ -3041,26 +3041,26 @@ function gs(e, t, r, n) {
3041
3041
  p = ye, R();
3042
3042
  return;
3043
3043
  }
3044
- if (ae) {
3045
- p = ye, x.length || (i.length ? je() : R());
3044
+ if (ie) {
3045
+ p = ye, x.length || (i.length ? $e() : R());
3046
3046
  return;
3047
3047
  }
3048
- if (_(), y(), !e.random) {
3049
- const G = e.resources.indexOf(E.resource);
3050
- G !== -1 && G !== e.index && (e.index = G);
3048
+ if (_(), w(), !e.random) {
3049
+ const Z = e.resources.indexOf(E.resource);
3050
+ Z !== -1 && Z !== e.index && (e.index = Z);
3051
3051
  }
3052
- l = "completed", S.forEach((G) => {
3053
- G(ye);
3052
+ l = "completed", S.forEach((Z) => {
3053
+ Z(ye);
3054
3054
  });
3055
3055
  }
3056
- function je() {
3056
+ function $e() {
3057
3057
  if (l !== "pending") return;
3058
3058
  _();
3059
3059
  const E = i.shift();
3060
3060
  if (E === void 0) {
3061
3061
  if (x.length) {
3062
- w = setTimeout(() => {
3063
- _(), l === "pending" && (y(), R());
3062
+ y = setTimeout(() => {
3063
+ _(), l === "pending" && (w(), R());
3064
3064
  }, e.timeout);
3065
3065
  return;
3066
3066
  }
@@ -3070,13 +3070,13 @@ function gs(e, t, r, n) {
3070
3070
  const H = {
3071
3071
  status: "pending",
3072
3072
  resource: E,
3073
- callback: (ye, ae) => {
3074
- V(H, ye, ae);
3073
+ callback: (ye, ie) => {
3074
+ Y(H, ye, ie);
3075
3075
  }
3076
3076
  };
3077
- x.push(H), g++, w = setTimeout(je, e.rotate), r(E, t, H.callback);
3077
+ x.push(H), g++, y = setTimeout($e, e.rotate), r(E, t, H.callback);
3078
3078
  }
3079
- return setTimeout(je), P;
3079
+ return setTimeout($e), P;
3080
3080
  }
3081
3081
  function to(e) {
3082
3082
  const t = {
@@ -3088,8 +3088,8 @@ function to(e) {
3088
3088
  r = r.filter((d) => d().status === "pending");
3089
3089
  }
3090
3090
  function o(d, l, g) {
3091
- const p = gs(t, d, l, (w, x) => {
3092
- n(), g && g(w, x);
3091
+ const p = gs(t, d, l, (y, x) => {
3092
+ n(), g && g(y, x);
3093
3093
  });
3094
3094
  return r.push(p), p;
3095
3095
  }
@@ -3109,7 +3109,7 @@ function to(e) {
3109
3109
  function mn() {
3110
3110
  }
3111
3111
  const lr = /* @__PURE__ */ Object.create(null);
3112
- function ys(e) {
3112
+ function ws(e) {
3113
3113
  if (!lr[e]) {
3114
3114
  const t = Or(e);
3115
3115
  if (!t) return;
@@ -3121,14 +3121,14 @@ function ys(e) {
3121
3121
  }
3122
3122
  return lr[e];
3123
3123
  }
3124
- function ws(e, t, r) {
3124
+ function ys(e, t, r) {
3125
3125
  let n, o;
3126
3126
  if (typeof e == "string") {
3127
3127
  const s = xr(e);
3128
3128
  if (!s)
3129
3129
  return r(void 0, 424), mn;
3130
3130
  o = s.send;
3131
- const i = ys(e);
3131
+ const i = ws(e);
3132
3132
  i && (n = i.redundancy);
3133
3133
  } else {
3134
3134
  const s = Tr(e);
@@ -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
@@ -3194,8 +3194,8 @@ function vs(e, t) {
3194
3194
  }
3195
3195
  if (s) {
3196
3196
  o.forEach((p) => {
3197
- const w = s(p, n, r);
3198
- pn(w, (x) => {
3197
+ const y = s(p, n, r);
3198
+ pn(y, (x) => {
3199
3199
  const S = x ? {
3200
3200
  prefix: n,
3201
3201
  icons: { [p]: x }
@@ -3207,20 +3207,20 @@ function vs(e, t) {
3207
3207
  }
3208
3208
  const { valid: i, invalid: d } = bs(o);
3209
3209
  if (d.length && Pt(e, d, null), !i.length) return;
3210
- const l = n.match(Qn) ? xr(r) : null;
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
3215
  l.prepare(r, n, i).forEach((p) => {
3216
- ws(r, p, (w) => {
3217
- Pt(e, p.icons, w);
3216
+ ys(r, p, (y) => {
3217
+ Pt(e, p.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 = hs(e, !0, Qn()), n = ms(r);
3224
3224
  if (!n.pending.length) {
3225
3225
  let l = !0;
3226
3226
  return t && setTimeout(() => {
@@ -3235,11 +3235,11 @@ const ks = (e, t) => {
3235
3235
  const { provider: g, prefix: p } = l;
3236
3236
  if (p === d && g === i) return;
3237
3237
  i = g, d = p, s.push(bt(g, p));
3238
- const w = o[g] || (o[g] = /* @__PURE__ */ Object.create(null));
3239
- w[p] || (w[p] = []);
3238
+ const y = o[g] || (o[g] = /* @__PURE__ */ Object.create(null));
3239
+ y[p] || (y[p] = []);
3240
3240
  }), n.pending.forEach((l) => {
3241
- const { provider: g, prefix: p, name: w } = l, x = bt(g, p), S = x.pendingIcons || (x.pendingIcons = /* @__PURE__ */ new Set());
3242
- S.has(w) || (S.add(w), o[g][p].push(w));
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));
3243
3243
  }), s.forEach((l) => {
3244
3244
  const g = o[l.provider][l.prefix];
3245
3245
  g.length && vs(l, g);
@@ -3334,13 +3334,13 @@ const ro = {
3334
3334
  Image: "var(--svg)",
3335
3335
  Repeat: "no-repeat",
3336
3336
  Size: "100% 100%"
3337
- }, yn = {
3337
+ }, wn = {
3338
3338
  WebkitMask: br,
3339
3339
  mask: br,
3340
3340
  background: no
3341
3341
  };
3342
- for (const e in yn) {
3343
- const t = yn[e];
3342
+ for (const e in wn) {
3343
+ const t = wn[e];
3344
3344
  for (const r in gn)
3345
3345
  t[e + r] = gn[r];
3346
3346
  }
@@ -3348,7 +3348,7 @@ const $s = {
3348
3348
  ...ro,
3349
3349
  inline: !0
3350
3350
  };
3351
- function wn(e) {
3351
+ function yn(e) {
3352
3352
  return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
3353
3353
  }
3354
3354
  const Ds = (e, t, r) => {
@@ -3362,8 +3362,8 @@ const Ds = (e, t, r) => {
3362
3362
  "provider",
3363
3363
  "prefix"
3364
3364
  ];
3365
- for (const y of R)
3366
- N[y] && P.push("iconify--" + N[y]);
3365
+ for (const w of R)
3366
+ N[w] && P.push("iconify--" + N[w]);
3367
3367
  l.className = P.join(" ");
3368
3368
  }
3369
3369
  }
@@ -3416,7 +3416,7 @@ 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 g = Ga(e, o), p = g.attributes;
3420
3420
  if (o.inline && (i.verticalAlign = "-0.125em"), s === "svg") {
3421
3421
  l.style = {
3422
3422
  ...i,
@@ -3427,7 +3427,7 @@ const Ds = (e, t, r) => {
3427
3427
  __html: Os(es(g.body, P ? () => P + "ID" + N++ : "iconifyReact"))
3428
3428
  }, cr("svg", l);
3429
3429
  }
3430
- const { body: w, width: x, height: S } = e, _ = s === "mask" || (s === "bg" ? !1 : w.indexOf("currentColor") !== -1), F = Is(w, {
3430
+ const { body: y, width: x, height: S } = e, _ = s === "mask" || (s === "bg" ? !1 : y.indexOf("currentColor") !== -1), F = Is(y, {
3431
3431
  ...p,
3432
3432
  width: x + "",
3433
3433
  height: S + ""
@@ -3435,14 +3435,14 @@ const Ds = (e, t, r) => {
3435
3435
  return l.style = {
3436
3436
  ...i,
3437
3437
  "--svg": Ts(F),
3438
- width: wn(p.width),
3439
- height: wn(p.height),
3438
+ width: yn(p.width),
3439
+ height: yn(p.height),
3440
3440
  ...js,
3441
3441
  ..._ ? br : no,
3442
3442
  ...d
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;
@@ -3527,16 +3527,16 @@ function oo(e) {
3527
3527
  });
3528
3528
  } else F && ((S = e.onLoad) === null || S === void 0 || S.call(e, _));
3529
3529
  }
3530
- be(() => (r(!0), l), []), be(() => {
3530
+ ke(() => (r(!0), l), []), ke(() => {
3531
3531
  t && p();
3532
3532
  }, [e.icon, t]);
3533
- const { name: w, data: x } = i;
3533
+ const { name: y, data: x } = i;
3534
3534
  return x ? Ds({
3535
3535
  ...Pr,
3536
3536
  ...x
3537
- }, e, w) : e.children ? e.children : e.fallback ? e.fallback : cr("span", {});
3537
+ }, e, y) : e.children ? e.children : e.fallback ? e.fallback : cr("span", {});
3538
3538
  }
3539
- const re = _n((e, t) => oo({
3539
+ const ae = _n((e, t) => oo({
3540
3540
  ...e,
3541
3541
  _ref: t
3542
3542
  }));
@@ -3556,9 +3556,9 @@ const He = "USD", xn = (e) => {
3556
3556
  if (!r.length) return null;
3557
3557
  const n = (i) => {
3558
3558
  var g, p;
3559
- const d = i.find((w) => {
3559
+ const d = i.find((y) => {
3560
3560
  var x;
3561
- return !!((x = w.discounted) != null && x.value);
3561
+ return !!((x = y.discounted) != null && x.value);
3562
3562
  });
3563
3563
  if (d)
3564
3564
  return {
@@ -3618,7 +3618,7 @@ const He = "USD", xn = (e) => {
3618
3618
  standard: "GROUND",
3619
3619
  express: "2-DAY SHIPPING",
3620
3620
  sameday: "OVERNIGHT"
3621
- }, Ae = (e, t) => {
3621
+ }, je = (e, t) => {
3622
3622
  try {
3623
3623
  return e.toLocaleString("en-US", {
3624
3624
  style: "currency",
@@ -3669,11 +3669,12 @@ const He = "USD", xn = (e) => {
3669
3669
  addressListProp: o,
3670
3670
  addressLoading: s
3671
3671
  }) => {
3672
- const l = Ht(r), g = Math.min(
3672
+ console.log(r, "the product for ai shopping");
3673
+ const i = null, d = null, l = Ht(r), g = Math.min(
3673
3674
  Math.max(0, n || 0),
3674
3675
  Math.max(0, l.length - 1)
3675
- ), p = l.length, [w, x] = C(g), [S, _] = C(null), [F, N] = C(null), P = Re(null), R = Re(null), y = Bs(r, w), [V, je] = C(""), [E, H] = C(!1), [ye, 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
- be(() => {
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), [Y, $e] = C(""), [E, H] = C(!1), [ye, ie] = C(!1), [Z, Oe] = C(!1), [De, pe] = C(""), [L, O] = C(!1), [U, Xe] = C(null), [Ye, Se] = C([]), [Pe, ft] = C([]), [Ze, M] = C([]), [de, Ae] = C(!1), [Te, Zt] = C(), [er, m] = C(!0), [j, $] = C(!1), [J, z] = C(!1), [A, ue] = C("standard"), [B, D] = C(!1), [ee, se] = C(!1), [Ne, Ce] = C("card"), [te, W] = C(!1), [_e, re] = C(!1), [k, K] = C(!1), [G, fe] = C(null), [Ie, et] = C(null), [mt, At] = C(""), [Be, jt] = C(!1), ht = Re(null);
3677
+ ke(() => {
3677
3678
  const u = Ht(r), h = Math.min(
3678
3679
  Math.max(0, n || 0),
3679
3680
  Math.max(0, u.length - 1)
@@ -3681,32 +3682,32 @@ const He = "USD", xn = (e) => {
3681
3682
  x(h);
3682
3683
  const f = ao(r), v = qe(f), T = We(f);
3683
3684
  P.current = v || null, R.current = T || null, _(v || null), N(T || null);
3684
- }, [n, r]), be(() => {
3685
+ }, [n, r]), ke(() => {
3685
3686
  ht.current && (ht.current.scrollTop = ht.current.scrollHeight);
3686
3687
  }, [
3687
3688
  Ye,
3688
- le,
3689
+ de,
3689
3690
  j,
3690
- Y,
3691
+ J,
3691
3692
  B,
3692
- X,
3693
- Z,
3694
- Ne,
3693
+ ee,
3694
+ te,
3695
+ _e,
3695
3696
  k,
3696
3697
  E,
3697
3698
  ye
3698
3699
  ]);
3699
- const I = "var(--tanya)", De = "var(--tanya-contrast)", tt = I, kt = "var(--tanya)", so = () => {
3700
+ const I = "var(--tanya)", Le = "var(--tanya-contrast)", tt = I, kt = "#804c9e", so = () => {
3700
3701
  console.log("AgenticShopping feedback:", {
3701
- rating: Ce,
3702
+ rating: Ie,
3702
3703
  comment: mt
3703
3704
  }), jt(!0);
3704
3705
  }, io = () => {
3705
3706
  et(null), At(""), jt(!0);
3706
3707
  }, Ar = (u) => {
3707
- const f = ((u == null ? void 0 : u.intentMandateId) || (u == null ? void 0 : u.intent_mandate_id) || (u == null ? void 0 : u.id) || null) ?? W;
3708
- return console.log(e, "it is open"), 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: [
3709
- /* @__PURE__ */ a("div", { className: "success-tick-animation", children: /* @__PURE__ */ a(re, { icon: "mdi:check-circle", width: "28", color: "#16a34a" }) }),
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__ */ 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: [
3710
+ /* @__PURE__ */ a("div", { className: "success-tick-animation", children: /* @__PURE__ */ a(ae, { icon: "mdi:check-circle", width: "28", color: "#16a34a" }) }),
3710
3711
  /* @__PURE__ */ c("div", { className: "text-sm w-full", children: [
3711
3712
  /* @__PURE__ */ a("div", { className: "font-semibold", children: "Success!" }),
3712
3713
  /* @__PURE__ */ a("div", { children: "Your smart order has been saved. I’ll watch the price and auto-purchase when the conditions are met." }),
@@ -3730,9 +3731,9 @@ const He = "USD", xn = (e) => {
3730
3731
  onClick: () => et(v),
3731
3732
  className: "p-0.5",
3732
3733
  children: /* @__PURE__ */ a(
3733
- re,
3734
+ ae,
3734
3735
  {
3735
- icon: Ce && Ce >= v ? "mdi:star" : "mdi:star-outline",
3736
+ icon: Ie && Ie >= v ? "mdi:star" : "mdi:star-outline",
3736
3737
  width: "20",
3737
3738
  className: "text-yellow-500"
3738
3739
  }
@@ -3768,7 +3769,7 @@ const He = "USD", xn = (e) => {
3768
3769
  onClick: so,
3769
3770
  className: "px-4 py-2 rounded-full text-sm font-semibold text-white shadow",
3770
3771
  style: { background: I },
3771
- disabled: !Ce && !mt.trim(),
3772
+ disabled: !Ie && !mt.trim(),
3772
3773
  children: "Submit"
3773
3774
  }
3774
3775
  )
@@ -3784,7 +3785,7 @@ const He = "USD", xn = (e) => {
3784
3785
  console.error("Error fetching addresses:", u);
3785
3786
  }
3786
3787
  }, St = (u, h) => {
3787
- ve((f) => [
3788
+ Se((f) => [
3788
3789
  ...f,
3789
3790
  {
3790
3791
  query: "",
@@ -3794,7 +3795,7 @@ const He = "USD", xn = (e) => {
3794
3795
  }
3795
3796
  ]);
3796
3797
  }, jr = (u, h) => {
3797
- ve(
3798
+ Se(
3798
3799
  (f) => f.map(
3799
3800
  (v) => v.response === "__CARD__" ? {
3800
3801
  ...v,
@@ -3805,51 +3806,51 @@ const He = "USD", xn = (e) => {
3805
3806
  )
3806
3807
  );
3807
3808
  }, co = () => {
3808
- ve(
3809
+ Se(
3809
3810
  (u) => u.filter(
3810
3811
  (h) => !(h.query === "" && h.response !== "__SNAPSHOT__" && h.response !== "__TEXT__")
3811
3812
  )
3812
3813
  );
3813
3814
  }, $t = () => {
3814
- 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
+ re(!1), Ae(!1), z(!1), se(!1), $(!1), D(!1), W(!1), K(!1), O(!1), Xe(null), co(), H(!1), ie(!1);
3815
3816
  }, uo = () => {
3816
- 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");
3817
- }, Fe = Rr(() => Ht(r).map((h, f) => ({
3817
+ Ae(!1), $(!1), z(!1), ue("standard"), D(!1), se(!1), Ce("card"), W(!1), re(!1), K(!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
+ }, Ee = Rr(() => Ht(r).map((h, f) => ({
3818
3819
  index: f,
3819
3820
  variant: h,
3820
3821
  images: ((h == null ? void 0 : h.images) || []).map((v) => (v == null ? void 0 : v.url) || "").filter(Boolean)
3821
3822
  })), [r]), Nt = Rr(() => {
3822
- if (!Fe.length) return !1;
3823
+ if (!Ee.length) return !1;
3823
3824
  const u = S || void 0, h = F || void 0, f = (v, T) => {
3824
3825
  var q;
3825
3826
  const b = ot(
3826
- Fe,
3827
+ Ee,
3827
3828
  v || void 0,
3828
3829
  T || void 0
3829
3830
  );
3830
3831
  return !!(b && ((q = b.variant) != null && q.sku));
3831
3832
  };
3832
- return u && h ? f(u, h) : u && !h ? f(u, null) : !u && h ? f(void 0, h) : !!(y && y.sku);
3833
- }, [Fe, S, F, y]), fo = G || L || !Nt, Ct = (u) => {
3833
+ return u && h ? f(u, h) : u && !h ? f(u, null) : !u && h ? f(void 0, h) : !!(w && w.sku);
3834
+ }, [Ee, S, F, w]), fo = Z || L || !Nt, Ct = (u) => {
3834
3835
  const h = Number((u == null ? void 0 : u.quantity) ?? 1);
3835
3836
  return Number.isFinite(h) && h > 0 ? h : 1;
3836
3837
  }, $r = (u) => {
3837
3838
  const h = Ct(u), f = Number((u == null ? void 0 : u.max_price_minor) ?? 0);
3838
- return Number.isFinite(f) && f > 0 ? +(f / 100) : +(Sn(r, y) * h);
3839
+ return Number.isFinite(f) && f > 0 ? +(f / 100) : +(Sn(r, w) * h);
3839
3840
  }, Dr = (u) => {
3840
3841
  var Q;
3841
- const h = U, f = Vt(y), 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;
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;
3842
3843
  return { product_total: T, tax: b, shipping_fee: q, currency: v };
3843
3844
  }, tr = async (u, h, f) => {
3844
- jr(), uo(), Pe(!0), O(!0), H(!1), ae(!1);
3845
- const v = _e.slice(-Cn);
3845
+ jr(), uo(), Oe(!0), O(!0), H(!1), ie(!1);
3846
+ const v = Pe.slice(-Cn);
3846
3847
  try {
3847
- const T = await ur(null, null);
3848
+ const T = await ur(i, d);
3848
3849
  if (!T) throw new Error("Failed to fetch token");
3849
- const b = localStorage.getItem("customerNumber"), q = localStorage.getItem("isLoggedIn"), ue = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
3850
+ const b = localStorage.getItem("customerNumber"), q = localStorage.getItem("isLoggedIn"), oe = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
3850
3851
  registered: String(q || !1),
3851
3852
  userId: String(b || (/* @__PURE__ */ new Date()).getTime())
3852
- }).toString()}`, te = await fetch(`${ue}`, {
3853
+ }).toString()}`, V = await fetch(`${oe}`, {
3853
3854
  method: "POST",
3854
3855
  headers: {
3855
3856
  "Content-Type": "application/json",
@@ -3869,100 +3870,100 @@ const He = "USD", xn = (e) => {
3869
3870
  }
3870
3871
  })
3871
3872
  });
3872
- if (!te.body) throw new Error("Readable stream not supported");
3873
- const we = te.body.getReader(), oe = new TextDecoder();
3874
- let Ee = "", Oe = "", Le = "";
3873
+ if (!V.body) throw new Error("Readable stream not supported");
3874
+ const le = V.body.getReader(), X = new TextDecoder();
3875
+ let xe = "", be = "", Fe = "";
3875
3876
  for (; ; ) {
3876
- const { done: pe, value: Je } = await we.read();
3877
- if (pe) break;
3878
- Ee += oe.decode(Je, { stream: !0 });
3879
- const pt = Ee.split(`
3877
+ const { done: ge, value: Je } = await le.read();
3878
+ if (ge) break;
3879
+ xe += X.decode(Je, { stream: !0 });
3880
+ const pt = xe.split(`
3880
3881
  `);
3881
- Ee = pt.pop() || "";
3882
+ xe = pt.pop() || "";
3882
3883
  for (const gt of pt) {
3883
3884
  if (!gt.startsWith("data:")) continue;
3884
3885
  const rt = gt.slice(5).trim();
3885
3886
  try {
3886
- const Ue = JSON.parse(rt), ze = Ue.index, fe = Ue.data;
3887
- ze === 0 ? Oe = String(fe ?? "") : ze === 1 && (Le = String(fe ?? ""));
3887
+ const Ue = JSON.parse(rt), ze = Ue.index, me = Ue.data;
3888
+ ze === 0 ? be = String(me ?? "") : ze === 1 && (Fe = String(me ?? ""));
3888
3889
  } catch (Ue) {
3889
3890
  console.error("Error parsing JSON chunk:", Ue);
3890
3891
  }
3891
3892
  }
3892
3893
  }
3893
- let se = null;
3894
- if (Oe) {
3895
- const pe = String(Oe).replace(/\\n/g, "").trim();
3896
- if (pe.startsWith("{") && pe.endsWith("}"))
3894
+ let ne = null;
3895
+ if (be) {
3896
+ const ge = String(be).replace(/\\n/g, "").trim();
3897
+ if (ge.startsWith("{") && ge.endsWith("}"))
3897
3898
  try {
3898
- se = JSON.parse(pe), se.product_id = h, se.sku_id = h, localStorage.setItem("agentic_order", JSON.stringify(se));
3899
+ ne = JSON.parse(ge), ne.product_id = h, ne.sku_id = h, localStorage.setItem("agentic_order", JSON.stringify(ne));
3899
3900
  } catch (Je) {
3900
3901
  console.log(Je);
3901
3902
  }
3902
3903
  }
3903
- Xe(se), se && ve((pe) => [
3904
- ...pe,
3904
+ Xe(ne), ne && Se((ge) => [
3905
+ ...ge,
3905
3906
  {
3906
3907
  query: "",
3907
3908
  response: "__CARD__",
3908
- snapshotPayload: { extractedDetails: se }
3909
+ snapshotPayload: { extractedDetails: ne }
3909
3910
  }
3910
- ]), ft((pe) => [
3911
- ...pe,
3911
+ ]), ft((ge) => [
3912
+ ...ge,
3912
3913
  {
3913
3914
  userQuery: u,
3914
- mainResponse: Oe || "",
3915
- keywords: Le || ""
3915
+ mainResponse: be || "",
3916
+ keywords: Fe || ""
3916
3917
  }
3917
3918
  ].slice(-Cn));
3918
3919
  } catch (T) {
3919
3920
  console.error("Error sending message to Tanya:", T), O(!1);
3920
3921
  } finally {
3921
- Pe(!1);
3922
+ Oe(!1);
3922
3923
  }
3923
3924
  }, Lr = async (u) => {
3924
- if (L || G || !Nt) return;
3925
- const h = $e.trim();
3925
+ if (L || Z || !Nt) return;
3926
+ const h = De.trim();
3926
3927
  if (!h) return;
3927
- ve((b) => [...b, { query: h, response: "" }]), he(""), je(h);
3928
- const f = y == null ? void 0 : y.sku, v = Nn(r), T = f || v || "";
3928
+ Se((b) => [...b, { query: h, response: "" }]), pe(""), $e(h);
3929
+ const f = w == null ? void 0 : w.sku, v = Nn(r), T = f || v || "";
3929
3930
  if (p <= 1) {
3930
3931
  if (T) {
3931
- tr(h, T, w);
3932
+ tr(h, T, y);
3932
3933
  return;
3933
3934
  }
3934
- ae(!0), O(!0);
3935
+ ie(!0), O(!0);
3935
3936
  return;
3936
3937
  }
3937
- T ? (H(!0), O(!0)) : (ae(!0), O(!0));
3938
+ T ? (H(!0), O(!0)) : (ie(!0), O(!0));
3938
3939
  }, mo = () => {
3939
- const u = y == null ? void 0 : y.sku;
3940
- u && tr(V, u, w);
3940
+ const u = w == null ? void 0 : w.sku;
3941
+ u && tr(Y, u, y);
3941
3942
  }, ho = () => {
3942
- H(!1), ae(!0), O(!0);
3943
+ H(!1), ie(!0), O(!0);
3943
3944
  }, po = () => {
3944
- if (!y || !y.sku) return;
3945
- const u = y.sku;
3946
- tr(V, u, w);
3945
+ if (!w || !w.sku) return;
3946
+ const u = w.sku;
3947
+ tr(Y, u, y);
3947
3948
  }, go = async () => {
3948
- Te(!0), z(!1), ne(!1), ee(!1), $(!1), D(!1), K(!1), J(!1), await lo(), jr("initial", {
3949
+ Ae(!0), z(!1), se(!1), re(!1), $(!1), D(!1), W(!1), K(!1), await lo(), jr("initial", {
3949
3950
  extractedDetails: U ?? void 0
3950
3951
  });
3951
- }, yo = () => {
3952
- if (!Ie) return;
3952
+ }, wo = () => {
3953
+ if (!Te) return;
3953
3954
  const u = Ze.find(
3954
- (h) => String(h.addressId ?? h.id) === Ie
3955
+ (h) => String(h.addressId ?? h.id) === Te
3955
3956
  ) || null;
3956
- 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
- }, wo = () => {
3958
- $(!1), z(!1), D(!1), ne(!1), K(!1), ee(!1), J(!1), localStorage.removeItem("agentic_order_address");
3957
+ u && (localStorage.setItem("agentic_order_address", JSON.stringify(u)), $(!0), z(!0), D(!1), se(!1), W(!1), re(!1), K(!1), St("address", u));
3958
+ }, yo = () => {
3959
+ $(!1), z(!1), D(!1), se(!1), W(!1), re(!1), K(!1), localStorage.removeItem("agentic_order_address");
3959
3960
  }, xo = () => {
3960
- 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), se(!0), W(!1), re(!1), K(!1), St("delivery", {
3961
3962
  method: A,
3962
3963
  ...at[A]
3963
3964
  }));
3964
3965
  }, zr = () => {
3965
- z(!1), D(!1), ne(!1), K(!1), ee(!1), J(!1), O(!1), $t(), ve((u) => [
3966
+ z(!1), D(!1), se(!1), W(!1), re(!1), K(!1), O(!1), $t(), Se((u) => [
3966
3967
  ...u,
3967
3968
  {
3968
3969
  query: "",
@@ -3973,11 +3974,11 @@ const He = "USD", xn = (e) => {
3973
3974
  }
3974
3975
  ]);
3975
3976
  }, bo = () => {
3976
- D(!1), ne(!1), K(!1), ee(!1), J(!1), localStorage.removeItem("agentic_order_delivery");
3977
+ D(!1), se(!1), W(!1), re(!1), K(!1), localStorage.removeItem("agentic_order_delivery");
3977
3978
  }, vo = () => {
3978
- ke && (localStorage.setItem("agentic_order_payment", ke), K(!0), ee(!0), J(!1), St("payment", { method: ke }));
3979
+ Ne && (localStorage.setItem("agentic_order_payment", Ne), W(!0), re(!0), K(!1), St("payment", { method: Ne }));
3979
3980
  }, ko = () => {
3980
- ne(!1), K(!1), ee(!1), J(!1), O(!1), $t(), ve((u) => [
3981
+ se(!1), W(!1), re(!1), K(!1), O(!1), $t(), Se((u) => [
3981
3982
  ...u,
3982
3983
  {
3983
3984
  query: "",
@@ -3988,38 +3989,38 @@ const He = "USD", xn = (e) => {
3988
3989
  }
3989
3990
  ]);
3990
3991
  }, So = () => {
3991
- K(!1), ee(!1), J(!1), localStorage.removeItem("agentic_order_payment");
3992
+ W(!1), re(!1), K(!1), localStorage.removeItem("agentic_order_payment");
3992
3993
  }, No = async () => {
3993
3994
  try {
3994
- Pe(!0);
3995
+ Oe(!0);
3995
3996
  const u = U || {}, h = JSON.parse(
3996
3997
  localStorage.getItem("agentic_order_address") || "null"
3997
3998
  ), f = localStorage.getItem(
3998
3999
  "agentic_order_delivery"
3999
- ), 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, we = f ? Ms[f] : "GROUND", oe = "card-visa", Ee = y == null ? void 0 : y.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
- shopper_id: ue,
4001
- shipping_address_id: te,
4002
- shipping_method_id: we,
4003
- payment_method_id: oe,
4004
- sku: Ee,
4000
+ ), v = localStorage.getItem("agentic_order_payment") || "card", { product_total: T, tax: b, shipping_fee: q, currency: Q } = Dr(), oe = u.shopper_id || localStorage.getItem("customerId") || void 0, V = (h == null ? void 0 : h.addressId) || (h == null ? void 0 : h.id) || void 0, le = f ? Ms[f] : "GROUND", X = "card-visa", xe = w == null ? void 0 : w.sku, be = (r == null ? void 0 : r.id) || "", Fe = Ct(u), ne = typeof u.max_price_minor == "number" ? u.max_price_minor : Math.round(T * 100), pt = {
4001
+ shopper_id: oe,
4002
+ shipping_address_id: V,
4003
+ shipping_method_id: le,
4004
+ payment_method_id: X,
4005
+ sku: xe,
4005
4006
  platform: "SFCC",
4006
4007
  storeCode: "Sites-SiteGenesis-Site",
4007
- product_id: Oe,
4008
- quantity: Le,
4009
- max_price_minor: se,
4008
+ product_id: be,
4009
+ quantity: Fe,
4010
+ max_price_minor: ne,
4010
4011
  currency: Q,
4011
- instruction_text: V
4012
+ instruction_text: Y
4012
4013
  };
4013
- if (!ue || !te) {
4014
+ if (!oe || !V) {
4014
4015
  console.error(
4015
4016
  "Missing shopper_id or shipping_address_id for intent-mandate",
4016
4017
  {
4017
- shopperId: ue,
4018
- shippingAddressId: te
4018
+ shopperId: oe,
4019
+ shippingAddressId: V
4019
4020
  }
4020
4021
  ), alert(
4021
4022
  "Missing customer or address information. Please re-select address and try again."
4022
- ), Pe(!1);
4023
+ ), Oe(!1);
4023
4024
  return;
4024
4025
  }
4025
4026
  const rt = (await vt()).access_token;
@@ -4037,13 +4038,13 @@ const He = "USD", xn = (e) => {
4037
4038
  const To = await ze.text().catch(() => "");
4038
4039
  console.error("intent-mandate failed", ze.status, To), alert(
4039
4040
  "Something went wrong while saving your smart order. Please try again."
4040
- ), Pe(!1);
4041
+ ), Oe(!1);
4041
4042
  return;
4042
4043
  }
4043
- const fe = await ze.json().catch(() => null);
4044
- console.log("intent-mandate success:", fe);
4045
- const nt = (fe == null ? void 0 : fe.intent_mandate_id) || (fe == null ? void 0 : fe.intent_mandateId) || (fe == null ? void 0 : fe.key) || null;
4046
- nt && de(nt);
4044
+ const me = await ze.json().catch(() => null);
4045
+ console.log("intent-mandate success:", me);
4046
+ const nt = (me == null ? void 0 : me.intent_mandate_id) || (me == null ? void 0 : me.intent_mandateId) || (me == null ? void 0 : me.key) || null;
4047
+ nt && fe(nt);
4047
4048
  const Dt = {
4048
4049
  ...u,
4049
4050
  address: h,
@@ -4052,16 +4053,16 @@ const He = "USD", xn = (e) => {
4052
4053
  summary: { product_total: T, tax: b, shipping_fee: q, currency: Q },
4053
4054
  intent_mandate_id: nt
4054
4055
  };
4055
- localStorage.setItem("agentic_order_final", JSON.stringify(Dt)), J(!0), m(!1), St("final", Dt), St("success", { intentMandateId: nt }), $t();
4056
+ localStorage.setItem("agentic_order_final", JSON.stringify(Dt)), K(!0), m(!1), St("final", Dt), St("success", { intentMandateId: nt }), $t();
4056
4057
  } catch (u) {
4057
4058
  console.error("Error in handleConfirmWatch / intent-mandate:", u), alert(
4058
4059
  "Unable to complete your smart order right now. Please try again in a moment."
4059
4060
  );
4060
4061
  } finally {
4061
- Pe(!1);
4062
+ Oe(!1);
4062
4063
  }
4063
4064
  }, Mr = () => {
4064
- $t(), ve((u) => [
4065
+ $t(), Se((u) => [
4065
4066
  ...u,
4066
4067
  {
4067
4068
  query: "",
@@ -4072,17 +4073,18 @@ const He = "USD", xn = (e) => {
4072
4073
  }
4073
4074
  ]);
4074
4075
  }, Co = () => {
4075
- const u = vn(r, y), h = kn(r), f = (y == null ? void 0 : y.sku) || "", v = qe(y) || "", T = We(y) || "", { amount: b } = Vt(y), q = !!(y != null && y.sku), Q = y && q ? xn(y) : !1;
4076
+ var oe, V, le, X, xe, be, Fe, ne;
4077
+ 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;
4076
4078
  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: [
4077
4079
  /* @__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(
4078
4080
  "img",
4079
4081
  {
4080
- src: u,
4082
+ src: ((X = (le = (V = (oe = r.imageGroups) == null ? void 0 : oe[0]) == null ? void 0 : V.images) == null ? void 0 : le[0]) == null ? void 0 : X.link) || ((ne = (Fe = (be = (xe = r.image_groups) == null ? void 0 : xe[0]) == null ? void 0 : be.images) == null ? void 0 : Fe[0]) == null ? void 0 : ne.link),
4081
4083
  alt: h,
4082
4084
  className: "object-contain w-full h-full"
4083
4085
  }
4084
4086
  ) : /* @__PURE__ */ a(
4085
- re,
4087
+ ae,
4086
4088
  {
4087
4089
  icon: "mdi:image-outline",
4088
4090
  width: "28",
@@ -4096,14 +4098,14 @@ const He = "USD", xn = (e) => {
4096
4098
  v && `Color: ${v}`,
4097
4099
  T && `Size: ${T}`
4098
4100
  ].filter(Boolean).join(" • ") || "—" }),
4099
- /* @__PURE__ */ a("div", { className: "mt-1 text-xl font-semibold text-gray-900", children: q ? Ae(Number(b) || 0, He) : "Currently unavailable" }),
4101
+ /* @__PURE__ */ a("div", { className: "mt-1 text-xl font-semibold text-gray-900", children: q ? je(Number(b) || 0, He) : "Currently unavailable" }),
4100
4102
  q && !Q && /* @__PURE__ */ a("div", { className: "mt-1 text-xs font-medium text-red-600", children: "Currently out of stock" })
4101
4103
  ] })
4102
4104
  ] }) });
4103
4105
  }, Br = ({
4104
4106
  showSubmit: u = !0
4105
4107
  }) => {
4106
- 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
+ const h = {}, f = Ee.map((b) => qe(b.variant)).filter((b) => !!b && !h[b] && (h[b] = !0)), v = {}, T = Ee.map((b) => We(b.variant)).filter((b) => !!b && !v[b] && (v[b] = !0));
4107
4109
  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: [
4108
4110
  /* @__PURE__ */ a("h3", { className: "font-semibold text-gray-800", children: "Choose a variant" }),
4109
4111
  f.length > 0 && /* @__PURE__ */ c("div", { className: "mt-4", children: [
@@ -4112,31 +4114,31 @@ const He = "USD", xn = (e) => {
4112
4114
  S && /* @__PURE__ */ a("div", { className: "text-sm text-gray-600", children: S })
4113
4115
  ] }),
4114
4116
  /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-4 mt-2", children: f.map((b) => {
4115
- var Le;
4116
- const q = S === b, Q = F || R.current || null, ue = Q ? ot(Fe, b, Q) : ot(Fe, b, null), te = !!ue, we = te && xn(ue.variant), oe = te && we ? vr(ue.variant, He) || vr(ue.variant) : null, Ee = Fe.find(
4117
- (se) => qe(se.variant) === b
4118
- ), Oe = (Le = Ee == null ? void 0 : Ee.images) == null ? void 0 : Le[0];
4117
+ var Fe;
4118
+ const q = S === b, Q = F || R.current || null, oe = Q ? ot(Ee, b, Q) : ot(Ee, b, null), V = !!oe, le = V && xn(oe.variant), X = V && le ? vr(oe.variant, He) || vr(oe.variant) : null, xe = Ee.find(
4119
+ (ne) => qe(ne.variant) === b
4120
+ ), be = (Fe = xe == null ? void 0 : xe.images) == null ? void 0 : Fe[0];
4119
4121
  return /* @__PURE__ */ c(
4120
4122
  "div",
4121
4123
  {
4122
4124
  className: `flex flex-col items-center w-28 border rounded-md p-2
4123
4125
  ${q ? "border-2 border-tanya-light" : "border-gray-300"}
4124
- ${!te || !we ? "opacity-60" : ""}`,
4126
+ ${!V || !le ? "opacity-60" : ""}`,
4125
4127
  children: [
4126
4128
  /* @__PURE__ */ a(
4127
4129
  "button",
4128
4130
  {
4129
4131
  onClick: () => {
4130
4132
  _(b);
4131
- const se = F || R.current || null, pe = se && ot(Fe, b, se) || ot(Fe, b, null);
4132
- pe && x(pe.index);
4133
+ const ne = F || R.current || null, ge = ne && ot(Ee, b, ne) || ot(Ee, b, null);
4134
+ ge && x(ge.index);
4133
4135
  },
4134
4136
  className: "w-full h-20 flex items-center justify-center overflow-hidden",
4135
4137
  title: b,
4136
- children: Oe ? /* @__PURE__ */ a(
4138
+ children: be ? /* @__PURE__ */ a(
4137
4139
  "img",
4138
4140
  {
4139
- src: Oe,
4141
+ src: be,
4140
4142
  alt: b,
4141
4143
  className: "w/full h-full object-contain"
4142
4144
  }
@@ -4144,13 +4146,13 @@ const He = "USD", xn = (e) => {
4144
4146
  }
4145
4147
  ),
4146
4148
  /* @__PURE__ */ a("div", { className: "w-full border-t my-2" }),
4147
- te && !we && /* @__PURE__ */ a("div", { className: "text-[11px] text-red-600 text-center", children: "Out of stock" }),
4148
- !te && /* @__PURE__ */ a("div", { className: "text-[11px] text-red-600 text-center", children: "any not offered" }),
4149
- te && we && oe && /* @__PURE__ */ c("div", { className: "text-xs text-gray-800 font-medium text-center", children: [
4150
- Ae(oe.cent / 100, oe.cur),
4151
- oe.regularCent && oe.regularCent > oe.cent && /* @__PURE__ */ a("span", { className: "ml-1 line-through text-gray-500", children: Ae(
4152
- oe.regularCent / 100,
4153
- oe.cur
4149
+ V && !le && /* @__PURE__ */ a("div", { className: "text-[11px] text-red-600 text-center", children: "Out of stock" }),
4150
+ !V && /* @__PURE__ */ a("div", { className: "text-[11px] text-red-600 text-center", children: "any not offered" }),
4151
+ V && le && X && /* @__PURE__ */ c("div", { className: "text-xs text-gray-800 font-medium text-center", children: [
4152
+ je(X.cent / 100, X.cur),
4153
+ X.regularCent && X.regularCent > X.cent && /* @__PURE__ */ a("span", { className: "ml-1 line-through text-gray-500", children: je(
4154
+ X.regularCent / 100,
4155
+ X.cur
4154
4156
  ) })
4155
4157
  ] })
4156
4158
  ]
@@ -4169,7 +4171,7 @@ const He = "USD", xn = (e) => {
4169
4171
  {
4170
4172
  onClick: () => {
4171
4173
  N(b);
4172
- const Q = S && ot(Fe, S, b) || ot(Fe, void 0, b);
4174
+ const Q = S && ot(Ee, S, b) || ot(Ee, void 0, b);
4173
4175
  Q && x(Q.index);
4174
4176
  },
4175
4177
  className: `px-4 py-2 rounded-md border text-sm ${F === b ? "border-2 border-tanya-light font-semibold" : "border-gray-300"}`,
@@ -4194,53 +4196,53 @@ const He = "USD", xn = (e) => {
4194
4196
  !(u != null && u.extractedDetails) && u && (u = { extractedDetails: u });
4195
4197
  const f = (u == null ? void 0 : u.extractedDetails) || U;
4196
4198
  if (!f) return null;
4197
- const v = Ct(f), { currency: T } = Vt(y), b = Sn(r, y), 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, we = y != null && y.sku ? y.sku : f.product_id;
4199
+ const v = Ct(f), { currency: T } = Vt(w), b = Sn(r, w), q = Number((f == null ? void 0 : f.max_price_minor) ?? 0), oe = Number.isFinite(q) && q > 0 ? +(q / 100) : +(b * v), V = (f == null ? void 0 : f.currency) || T || He, le = w != null && w.sku ? w.sku : f.product_id;
4198
4200
  return /* @__PURE__ */ c(
4199
4201
  "div",
4200
4202
  {
4201
4203
  className: "px-6 pb-6 flex flex-col items-center space-y-4",
4202
- style: { backgroundColor: "var(--tanya-light)" },
4204
+ style: { backgroundColor: "#14377D" },
4203
4205
  children: [
4204
4206
  /* @__PURE__ */ a(
4205
4207
  "p",
4206
4208
  {
4207
4209
  className: "text-base font-semibold text-center mt-2",
4208
- style: { color: De },
4210
+ style: { color: Le },
4209
4211
  children: "Here’s what I found from your instruction:"
4210
4212
  }
4211
4213
  ),
4212
4214
  /* @__PURE__ */ c("div", { className: "w-full max-w-md bg-white rounded-xl shadow-inner p-4", children: [
4213
4215
  /* @__PURE__ */ c("div", { className: "grid grid-cols-2 gap-y-2 text-sm", children: [
4214
4216
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "SKU:" }),
4215
- /* @__PURE__ */ a("p", { className: "text-gray-800", children: we }),
4217
+ /* @__PURE__ */ a("p", { className: "text-gray-800", children: le }),
4216
4218
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Quantity:" }),
4217
4219
  /* @__PURE__ */ a("p", { className: "text-gray-800", children: Ct(f) }),
4218
4220
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Currency:" }),
4219
- /* @__PURE__ */ a("p", { className: "text-gray-800", children: te }),
4221
+ /* @__PURE__ */ a("p", { className: "text-gray-800", children: V }),
4220
4222
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Maximum Total Price:" }),
4221
- /* @__PURE__ */ a("p", { className: "text-gray-800", children: Ae(ue, te) })
4223
+ /* @__PURE__ */ a("p", { className: "text-gray-800", children: je(oe, V) })
4222
4224
  ] }),
4223
4225
  /* @__PURE__ */ c("div", { className: "mt-3 flex flex-wrap gap-2 text-xs", children: [
4224
- qe(y) && /* @__PURE__ */ c("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4226
+ qe(w) && /* @__PURE__ */ c("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4225
4227
  "Color: ",
4226
- qe(y)
4228
+ qe(w)
4227
4229
  ] }),
4228
- We(y) && /* @__PURE__ */ c("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4230
+ We(w) && /* @__PURE__ */ c("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4229
4231
  "Size: ",
4230
- We(y)
4232
+ We(w)
4231
4233
  ] }),
4232
- (y == null ? void 0 : y.sku) && /* @__PURE__ */ c("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4234
+ (w == null ? void 0 : w.sku) && /* @__PURE__ */ c("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4233
4235
  "SKU: ",
4234
- y.sku
4236
+ w.sku
4235
4237
  ] })
4236
4238
  ] })
4237
4239
  ] }),
4238
- !h && /* @__PURE__ */ c(xe, { children: [
4240
+ !h && /* @__PURE__ */ c(ve, { children: [
4239
4241
  /* @__PURE__ */ c(
4240
4242
  "p",
4241
4243
  {
4242
4244
  className: "text-sm font-medium text-gray-700 text-center max-w-[90%] leading-relaxed",
4243
- style: { color: De },
4245
+ style: { color: Le },
4244
4246
  children: [
4245
4247
  "Would you like me to ",
4246
4248
  /* @__PURE__ */ a("strong", { children: "lock this in" }),
@@ -4253,12 +4255,12 @@ const He = "USD", xn = (e) => {
4253
4255
  "button",
4254
4256
  {
4255
4257
  onClick: go,
4256
- disabled: le,
4257
- className: `relative inline-flex items-center justify-center px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${le ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
4258
+ disabled: de,
4259
+ className: `relative inline-flex items-center justify-center px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${de ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
4258
4260
  style: { background: `${I}` },
4259
4261
  children: [
4260
4262
  /* @__PURE__ */ a(
4261
- re,
4263
+ ae,
4262
4264
  {
4263
4265
  icon: "fluent:checkmark-circle-24-filled",
4264
4266
  className: "mr-2",
@@ -4274,12 +4276,12 @@ const He = "USD", xn = (e) => {
4274
4276
  "button",
4275
4277
  {
4276
4278
  onClick: Mr,
4277
- disabled: le,
4278
- className: `relative inline-flex items-center justify-center px-6 py-2.5 rounded-full font-semibold border transition-all duration-300 ${le ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
4279
- style: { borderColor: I, color: De },
4279
+ disabled: de,
4280
+ className: `relative inline-flex items-center justify-center px-6 py-2.5 rounded-full font-semibold border transition-all duration-300 ${de ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
4281
+ style: { borderColor: I, color: Le },
4280
4282
  children: [
4281
4283
  /* @__PURE__ */ a(
4282
- re,
4284
+ ae,
4283
4285
  {
4284
4286
  icon: "fluent:dismiss-circle-24-filled",
4285
4287
  className: "mr-2",
@@ -4297,22 +4299,22 @@ const He = "USD", xn = (e) => {
4297
4299
  }
4298
4300
  );
4299
4301
  }, qr = (u, h = !0) => {
4300
- var gt, rt, Ue, ze, fe, nt;
4301
- 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, y), b = kn(r), q = y != null && y.sku ? y.sku : (r == null ? void 0 : r.id) ?? (U == null ? void 0 : U.product_id), Q = (y == null ? void 0 : y.sku) ?? Nn(r), ue = qe(y) || qs(r), te = We(y) || Rs(r), we = Ct(f), oe = ((rt = f == null ? void 0 : f.summary) == null ? void 0 : rt.product_total) != null ? +f.summary.product_total : $r(f), Ee = we > 0 ? +(oe / we).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
+ var gt, rt, Ue, ze, me, nt;
4303
+ 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), oe = qe(w) || qs(r), V = We(w) || Rs(r), le = Ct(f), X = ((rt = f == null ? void 0 : f.summary) == null ? void 0 : rt.product_total) != null ? +f.summary.product_total : $r(f), xe = le > 0 ? +(X / le).toFixed(2) : 0, be = X, Fe = ((Ue = f == null ? void 0 : f.summary) == null ? void 0 : Ue.tax) ?? +(X * 0.08).toFixed(2), ne = ((ze = f == null ? void 0 : f.summary) == null ? void 0 : ze.shipping_fee) ?? (((me = at[A]) == null ? void 0 : me.fee) || 0), ge = f != null && f.address ? [
4302
4304
  f.address.addressLine1,
4303
4305
  f.address.addressLine2,
4304
4306
  f.address.street,
4305
4307
  [f.address.city, f.address.state, f.address.postalCode].filter(Boolean).join(", "),
4306
4308
  f.address.country
4307
- ].filter(Boolean).map((Dt) => Ke(String(Dt))).join(", ") : "—", Je = (f == null ? void 0 : f.payment) || "card", pt = Je === "card" ? /* @__PURE__ */ c(xe, { children: [
4309
+ ].filter(Boolean).map((Dt) => Ke(String(Dt))).join(", ") : "—", Je = (f == null ? void 0 : f.payment) || "card", pt = Je === "card" ? /* @__PURE__ */ c(ve, { children: [
4308
4310
  "Credit Card — Mastercard",
4309
4311
  /* @__PURE__ */ a("br", {}),
4310
4312
  "•••• 7820 Exp: 12/26"
4311
- ] }) : /* @__PURE__ */ a(xe, { children: Ke(Je) });
4313
+ ] }) : /* @__PURE__ */ a(ve, { children: Ke(Je) });
4312
4314
  return /* @__PURE__ */ c("div", { className: "mx-auto mt-3 mb-3 rounded-2xl bg-white", children: [
4313
4315
  /* @__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: [
4314
4316
  /* @__PURE__ */ a(
4315
- re,
4317
+ ae,
4316
4318
  {
4317
4319
  icon: "mdi:receipt-text-check-outline",
4318
4320
  width: "24",
@@ -4330,7 +4332,7 @@ const He = "USD", xn = (e) => {
4330
4332
  className: "w-full h-full object-contain"
4331
4333
  }
4332
4334
  ) : /* @__PURE__ */ a(
4333
- re,
4335
+ ae,
4334
4336
  {
4335
4337
  icon: "mdi:image-outline",
4336
4338
  width: "24",
@@ -4345,38 +4347,38 @@ const He = "USD", xn = (e) => {
4345
4347
  " ",
4346
4348
  q ?? "—"
4347
4349
  ] }),
4348
- (Q || ue || te) && /* @__PURE__ */ c("div", { className: "text-xs text-gray-600 mt-0.5 text-center", children: [
4349
- Q && /* @__PURE__ */ c(xe, { children: [
4350
+ (Q || oe || V) && /* @__PURE__ */ c("div", { className: "text-xs text-gray-600 mt-0.5 text-center", children: [
4351
+ Q && /* @__PURE__ */ c(ve, { children: [
4350
4352
  /* @__PURE__ */ a("span", { className: "font-medium", children: "SKU:" }),
4351
4353
  " ",
4352
4354
  Q,
4353
4355
  "  "
4354
4356
  ] }),
4355
- ue && /* @__PURE__ */ c(xe, { children: [
4357
+ oe && /* @__PURE__ */ c(ve, { children: [
4356
4358
  /* @__PURE__ */ a("span", { className: "font-medium", children: "Color:" }),
4357
4359
  " ",
4358
- ue,
4360
+ oe,
4359
4361
  "  "
4360
4362
  ] }),
4361
- te && /* @__PURE__ */ c(xe, { children: [
4363
+ V && /* @__PURE__ */ c(ve, { children: [
4362
4364
  /* @__PURE__ */ a("span", { className: "font-medium", children: "Size:" }),
4363
4365
  " ",
4364
- te
4366
+ V
4365
4367
  ] })
4366
4368
  ] })
4367
4369
  ] }),
4368
4370
  /* @__PURE__ */ c("div", { className: "grid grid-cols-1 md-grid-cols-3 md:grid-cols-3 gap-3", children: [
4369
4371
  /* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
4370
4372
  /* @__PURE__ */ a("div", { className: "text-[11px] uppercase tracking-wide text-gray-500", children: "Unit Price" }),
4371
- /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: Ae(Ee, v) })
4373
+ /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: je(xe, v) })
4372
4374
  ] }),
4373
4375
  /* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
4374
4376
  /* @__PURE__ */ a("div", { className: "text-[11px] uppercase tracking-wide text-gray-500", children: "Quantity" }),
4375
- /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: we })
4377
+ /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: le })
4376
4378
  ] }),
4377
4379
  /* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
4378
4380
  /* @__PURE__ */ a("div", { className: "text-[11px] uppercase tracking-wide text-gray-500", children: "Subtotal" }),
4379
- /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: Ae(Oe, v) })
4381
+ /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: je(be, v) })
4380
4382
  ] })
4381
4383
  ] })
4382
4384
  ] })
@@ -4385,7 +4387,7 @@ const He = "USD", xn = (e) => {
4385
4387
  /* @__PURE__ */ c("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3 mb-3", children: [
4386
4388
  /* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4387
4389
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🏠 Address" }),
4388
- /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: pe })
4390
+ /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: ge })
4389
4391
  ] }),
4390
4392
  /* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4391
4393
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "💳 Payment" }),
@@ -4399,15 +4401,15 @@ const He = "USD", xn = (e) => {
4399
4401
  /* @__PURE__ */ c("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3", children: [
4400
4402
  /* @__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: [
4401
4403
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "💰 any(s)" }),
4402
- /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: Ae(oe, v) })
4404
+ /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: je(X, v) })
4403
4405
  ] }),
4404
4406
  /* @__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
4407
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🏛️ Taxes" }),
4406
- /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: Ae(Le, v) })
4408
+ /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: je(Fe, v) })
4407
4409
  ] }),
4408
4410
  /* @__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
4411
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🚚 Shipping" }),
4410
- /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: Ae(se, v) })
4412
+ /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: je(ne, v) })
4411
4413
  ] })
4412
4414
  ] }),
4413
4415
  /* @__PURE__ */ c(
@@ -4417,14 +4419,14 @@ const He = "USD", xn = (e) => {
4417
4419
  style: { background: tt },
4418
4420
  children: [
4419
4421
  /* @__PURE__ */ a("div", { className: "text-sm/5 opacity-95", children: "🔹 Total Payable" }),
4420
- /* @__PURE__ */ a("div", { className: "mt-1 text-3xl font-extrabold tracking-tight", children: Ae(oe + Le + se, v) })
4422
+ /* @__PURE__ */ a("div", { className: "mt-1 text-3xl font-extrabold tracking-tight", children: je(X + Fe + ne, v) })
4421
4423
  ]
4422
4424
  }
4423
4425
  )
4424
4426
  ] }),
4425
4427
  !h && /* @__PURE__ */ c("div", { className: "px-6 pb-5", children: [
4426
4428
  !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?" }),
4427
- k && Ar({ intentMandateId: W }),
4429
+ k && Ar({ intentMandateId: G }),
4428
4430
  er && !k && /* @__PURE__ */ c("div", { className: "mt-4 flex flex-wrap items-center justify-center gap-3", children: [
4429
4431
  /* @__PURE__ */ a(
4430
4432
  "button",
@@ -4463,7 +4465,7 @@ const He = "USD", xn = (e) => {
4463
4465
  style: { backgroundColor: "var(--tanya-light)" },
4464
4466
  children: /* @__PURE__ */ c("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4465
4467
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2 mb-2", children: [
4466
- /* @__PURE__ */ a(re, { icon: "mdi:home-map-marker", width: "20", color: I }),
4468
+ /* @__PURE__ */ a(ae, { icon: "mdi:home-map-marker", width: "20", color: I }),
4467
4469
  /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Delivery Address" })
4468
4470
  ] }),
4469
4471
  /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: h })
@@ -4479,12 +4481,12 @@ const He = "USD", xn = (e) => {
4479
4481
  style: { backgroundColor: "var(--tanya-light)" },
4480
4482
  children: /* @__PURE__ */ c("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4481
4483
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2 mb-1", children: [
4482
- /* @__PURE__ */ a(re, { icon: "mdi:truck-delivery", width: "20", color: I }),
4484
+ /* @__PURE__ */ a(ae, { icon: "mdi:truck-delivery", width: "20", color: I }),
4483
4485
  /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Delivery Method" })
4484
4486
  ] }),
4485
- /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: f ? /* @__PURE__ */ c(xe, { children: [
4487
+ /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: f ? /* @__PURE__ */ c(ve, { children: [
4486
4488
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
4487
- /* @__PURE__ */ a(re, { icon: f.icon, width: "18" }),
4489
+ /* @__PURE__ */ a(ae, { icon: f.icon, width: "18" }),
4488
4490
  /* @__PURE__ */ a("span", { className: "font-medium", children: f.label })
4489
4491
  ] }),
4490
4492
  /* @__PURE__ */ a("div", { className: "text-gray-600", children: f.subtitle })
@@ -4502,7 +4504,7 @@ const He = "USD", xn = (e) => {
4502
4504
  children: /* @__PURE__ */ c("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4503
4505
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2 mb-1", children: [
4504
4506
  /* @__PURE__ */ a(
4505
- re,
4507
+ ae,
4506
4508
  {
4507
4509
  icon: "mdi:credit-card-outline",
4508
4510
  width: "20",
@@ -4511,7 +4513,7 @@ const He = "USD", xn = (e) => {
4511
4513
  ),
4512
4514
  /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Payment Method" })
4513
4515
  ] }),
4514
- /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: h === "card" ? /* @__PURE__ */ c(xe, { children: [
4516
+ /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: h === "card" ? /* @__PURE__ */ c(ve, { children: [
4515
4517
  "Credit Card — Mastercard",
4516
4518
  /* @__PURE__ */ a("br", {}),
4517
4519
  "•••• 7820   Exp: 12/26"
@@ -4521,7 +4523,7 @@ const He = "USD", xn = (e) => {
4521
4523
  );
4522
4524
  }, Po = (u, h) => {
4523
4525
  const f = u.snapshotStage;
4524
- if (!f || f === "address" && le || f === "delivery" && Y || f === "payment" && X || f === "final" && Ne)
4526
+ if (!f || f === "address" && de || f === "delivery" && J || f === "payment" && ee || f === "final" && _e)
4525
4527
  return null;
4526
4528
  switch (f) {
4527
4529
  case "initial":
@@ -4580,7 +4582,7 @@ const He = "USD", xn = (e) => {
4580
4582
  gap: "0.5rem"
4581
4583
  },
4582
4584
  children: [
4583
- /* @__PURE__ */ a(re, { icon: "ph:sparkle-duotone", width: "25", height: "25" }),
4585
+ /* @__PURE__ */ a(ae, { icon: "ph:sparkle-duotone", width: "25", height: "25" }),
4584
4586
  /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "font-bold", children: "Agentic Shopping with TANYA" }) })
4585
4587
  ]
4586
4588
  }
@@ -4595,7 +4597,7 @@ const He = "USD", xn = (e) => {
4595
4597
  margin: "0.75rem"
4596
4598
  },
4597
4599
  children: /* @__PURE__ */ a(
4598
- re,
4600
+ ae,
4599
4601
  {
4600
4602
  icon: "fluent:dismiss-24-filled",
4601
4603
  color: "#ffffff",
@@ -4620,10 +4622,14 @@ const He = "USD", xn = (e) => {
4620
4622
  "div",
4621
4623
  {
4622
4624
  className: "text-sm text-[16px] rounded-r-xl p-3 m-3 rounded-bl-xl w-3/4 text-tanya-contrast",
4623
- style: { backgroundColor: "var(--tanya-light)" },
4625
+ style: { backgroundColor: "#e5dbeb" },
4624
4626
  children: [
4625
4627
  "Welcome to your smart shopping companion!",
4626
- /* @__PURE__ */ a("p", { children: "Simply share your instruction — like “If this product goes below $100, grab it for me.”" }),
4628
+ /* @__PURE__ */ c("p", { children: [
4629
+ "Simply share your instruction — like “If this product goes below $",
4630
+ parseInt(r.price) - 5,
4631
+ " grab it for me.”"
4632
+ ] }),
4627
4633
  /* @__PURE__ */ a("p", { children: "I’ll monitor it, calculate total prices, and place the order when your conditions are met." })
4628
4634
  ]
4629
4635
  }
@@ -4660,10 +4666,10 @@ const He = "USD", xn = (e) => {
4660
4666
  /* @__PURE__ */ c("div", { className: "text-sm text-gray-800", children: [
4661
4667
  "Proceed with color:",
4662
4668
  " ",
4663
- /* @__PURE__ */ a("span", { className: "font-semibold", children: qe(y) || "—" }),
4669
+ /* @__PURE__ */ a("span", { className: "font-semibold", children: qe(w) || "—" }),
4664
4670
  ", size:",
4665
4671
  " ",
4666
- /* @__PURE__ */ a("span", { className: "font-semibold", children: We(y) || "—" }),
4672
+ /* @__PURE__ */ a("span", { className: "font-semibold", children: We(w) || "—" }),
4667
4673
  "?"
4668
4674
  ] }),
4669
4675
  /* @__PURE__ */ c("div", { className: "mt-3 flex gap-3", children: [
@@ -4691,7 +4697,7 @@ const He = "USD", xn = (e) => {
4691
4697
  ] })
4692
4698
  ] }),
4693
4699
  f && ye && /* @__PURE__ */ a(Br, { showSubmit: !0 }),
4694
- f && G && /* @__PURE__ */ a("div", { className: "mt-4", children: /* @__PURE__ */ a(
4700
+ f && Z && /* @__PURE__ */ a("div", { className: "mt-4", children: /* @__PURE__ */ a(
4695
4701
  "div",
4696
4702
  {
4697
4703
  className: "text-sm text-tanya-contrast px-7 py-4 rounded-r-xl rounded-bl-2xl w-full",
@@ -4702,7 +4708,7 @@ const He = "USD", xn = (e) => {
4702
4708
  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…" }) })
4703
4709
  }
4704
4710
  ) }),
4705
- (v || u.response === "__CARD__") && (!G || !f) && /* @__PURE__ */ a(
4711
+ (v || u.response === "__CARD__") && (!Z || !f) && /* @__PURE__ */ a(
4706
4712
  "div",
4707
4713
  {
4708
4714
  className: "mt-6 mb-4 mx-4 animate-fade-in",
@@ -4720,11 +4726,11 @@ const He = "USD", xn = (e) => {
4720
4726
  )
4721
4727
  ] }, h);
4722
4728
  }),
4723
- 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
+ de && /* @__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: [
4724
4730
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
4725
4731
  /* @__PURE__ */ c("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
4726
4732
  /* @__PURE__ */ a(
4727
- re,
4733
+ ae,
4728
4734
  {
4729
4735
  icon: "mdi:home-map-marker",
4730
4736
  width: "24",
@@ -4733,12 +4739,12 @@ const He = "USD", xn = (e) => {
4733
4739
  ),
4734
4740
  "Select a Delivery Address"
4735
4741
  ] }),
4736
- j && /* @__PURE__ */ c(xe, { children: [
4742
+ j && /* @__PURE__ */ c(ve, { children: [
4737
4743
  /* @__PURE__ */ a("span", { className: "ml-2 text-xs px-2 py-1 rounded-full bg-green-100 text-green-700 font-semibold", children: "Selected" }),
4738
4744
  !k && /* @__PURE__ */ a(
4739
4745
  "button",
4740
4746
  {
4741
- onClick: wo,
4747
+ onClick: yo,
4742
4748
  className: "ml-2 text-xs px-2 py-1 rounded-full border hover:bg-gray-50",
4743
4749
  style: {
4744
4750
  borderColor: "var(--tanya-light)",
@@ -4766,7 +4772,7 @@ const He = "USD", xn = (e) => {
4766
4772
  className: `space-y-3 ${j ? "opacity-70" : ""}`,
4767
4773
  children: [
4768
4774
  Ze.map((u) => {
4769
- 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
+ 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 = Te === b;
4770
4776
  return /* @__PURE__ */ c(
4771
4777
  "label",
4772
4778
  {
@@ -4816,7 +4822,7 @@ const He = "USD", xn = (e) => {
4816
4822
  /* @__PURE__ */ a(
4817
4823
  "button",
4818
4824
  {
4819
- onClick: yo,
4825
+ onClick: wo,
4820
4826
  disabled: j,
4821
4827
  className: `px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${j ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
4822
4828
  style: { background: I },
@@ -4828,11 +4834,11 @@ const He = "USD", xn = (e) => {
4828
4834
  }
4829
4835
  ) : /* @__PURE__ */ a("div", { className: "text-center py-8 text-gray-600", children: "No addresses found. Please add a new one in your profile." })
4830
4836
  ] }),
4831
- 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
+ J && /* @__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: [
4832
4838
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
4833
4839
  /* @__PURE__ */ c("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
4834
4840
  /* @__PURE__ */ a(
4835
- re,
4841
+ ae,
4836
4842
  {
4837
4843
  icon: "mdi:truck-delivery",
4838
4844
  width: "24",
@@ -4841,7 +4847,7 @@ const He = "USD", xn = (e) => {
4841
4847
  ),
4842
4848
  "Great! Now choose how fast you want it delivered 🚚"
4843
4849
  ] }),
4844
- B && /* @__PURE__ */ c(xe, { children: [
4850
+ B && /* @__PURE__ */ c(ve, { children: [
4845
4851
  /* @__PURE__ */ a("span", { className: "ml-2 text-xs px-2 py-1 rounded-full bg-green-100 text-green-700 font-semibold", children: "Selected" }),
4846
4852
  !k && /* @__PURE__ */ a(
4847
4853
  "button",
@@ -4880,18 +4886,18 @@ const He = "USD", xn = (e) => {
4880
4886
  className: "mt-1 accent-tanya-light",
4881
4887
  checked: f,
4882
4888
  disabled: B,
4883
- onChange: () => ce(u)
4889
+ onChange: () => ue(u)
4884
4890
  }
4885
4891
  ),
4886
4892
  /* @__PURE__ */ c("div", { className: "flex-1", children: [
4887
4893
  /* @__PURE__ */ c("div", { className: "font-semibold text-gray-800 flex items-center gap-2", children: [
4888
- /* @__PURE__ */ a(re, { icon: h.icon, width: "18" }),
4894
+ /* @__PURE__ */ a(ae, { icon: h.icon, width: "18" }),
4889
4895
  " ",
4890
4896
  h.label
4891
4897
  ] }),
4892
4898
  /* @__PURE__ */ a("div", { className: "text-sm text-gray-700", children: h.subtitle })
4893
4899
  ] }),
4894
- /* @__PURE__ */ a("div", { className: "text-sm font-semibold text-gray-800", children: h.fee === 0 ? "Free" : Ae(
4900
+ /* @__PURE__ */ a("div", { className: "text-sm font-semibold text-gray-800", children: h.fee === 0 ? "Free" : je(
4895
4901
  h.fee,
4896
4902
  (U == null ? void 0 : U.currency) || He
4897
4903
  ) })
@@ -4928,11 +4934,11 @@ const He = "USD", xn = (e) => {
4928
4934
  )
4929
4935
  ] })
4930
4936
  ] }),
4931
- 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
+ ee && /* @__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: [
4932
4938
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
4933
4939
  /* @__PURE__ */ c("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
4934
4940
  /* @__PURE__ */ a(
4935
- re,
4941
+ ae,
4936
4942
  {
4937
4943
  icon: "mdi:credit-card-outline",
4938
4944
  width: "24",
@@ -4941,7 +4947,7 @@ const He = "USD", xn = (e) => {
4941
4947
  ),
4942
4948
  "Almost done! 💳"
4943
4949
  ] }),
4944
- Z && /* @__PURE__ */ c(xe, { children: [
4950
+ te && /* @__PURE__ */ c(ve, { children: [
4945
4951
  /* @__PURE__ */ a("span", { className: "ml-2 text-xs px-2 py-1 rounded-full bg-green-100 text-green-700 font-semibold", children: "Selected" }),
4946
4952
  !k && /* @__PURE__ */ a(
4947
4953
  "button",
@@ -4962,12 +4968,12 @@ const He = "USD", xn = (e) => {
4962
4968
  /* @__PURE__ */ a(
4963
4969
  "div",
4964
4970
  {
4965
- className: `space-y-3 ${Z ? "opacity-70" : ""}`,
4971
+ className: `space-y-3 ${te ? "opacity-70" : ""}`,
4966
4972
  children: /* @__PURE__ */ c(
4967
4973
  "label",
4968
4974
  {
4969
- 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" : ""}`,
4970
- title: Z ? "Payment already submitted" : "",
4975
+ className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${Ne === "card" ? "border-tanya-light" : "border-gray-300"} ${te ? "pointer-events-none" : ""}`,
4976
+ title: te ? "Payment already submitted" : "",
4971
4977
  children: [
4972
4978
  /* @__PURE__ */ a(
4973
4979
  "input",
@@ -4975,18 +4981,18 @@ const He = "USD", xn = (e) => {
4975
4981
  type: "radio",
4976
4982
  name: "payment",
4977
4983
  className: "mt-1 accent-tanya-light",
4978
- checked: ke === "card",
4979
- disabled: Z,
4980
- onChange: () => Se("card")
4984
+ checked: Ne === "card",
4985
+ disabled: te,
4986
+ onChange: () => Ce("card")
4981
4987
  }
4982
4988
  ),
4983
4989
  /* @__PURE__ */ c("div", { className: "flex-1", children: [
4984
4990
  /* @__PURE__ */ c("div", { className: "font-semibold text-gray-800 flex items-center gap-2", children: [
4985
- /* @__PURE__ */ a(re, { icon: "mdi:credit-card-chip-outline", width: "18" }),
4991
+ /* @__PURE__ */ a(ae, { icon: "mdi:credit-card-chip-outline", width: "18" }),
4986
4992
  " ",
4987
4993
  "Credit Card"
4988
4994
  ] }),
4989
- ke === "card" && /* @__PURE__ */ c("div", { className: "text-sm text-gray-700 mt-1", children: [
4995
+ Ne === "card" && /* @__PURE__ */ c("div", { className: "text-sm text-gray-700 mt-1", children: [
4990
4996
  "Mastercard    •••• 7820",
4991
4997
  /* @__PURE__ */ a("br", {}),
4992
4998
  "Expiry: 12/26"
@@ -5014,15 +5020,15 @@ const He = "USD", xn = (e) => {
5014
5020
  "button",
5015
5021
  {
5016
5022
  onClick: vo,
5017
- disabled: Z,
5018
- className: `px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${Z ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
5023
+ disabled: te,
5024
+ className: `px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${te ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
5019
5025
  style: { background: "var(--tanya)" },
5020
- children: Z ? "Payment Submitted" : "Submit Payment Method"
5026
+ children: te ? "Payment Submitted" : "Submit Payment Method"
5021
5027
  }
5022
5028
  )
5023
5029
  ] })
5024
5030
  ] }),
5025
- Ne && qr(
5031
+ _e && qr(
5026
5032
  {
5027
5033
  ...U,
5028
5034
  address: JSON.parse(
@@ -5041,33 +5047,33 @@ const He = "USD", xn = (e) => {
5041
5047
  /* @__PURE__ */ a(
5042
5048
  "input",
5043
5049
  {
5044
- placeholder: L ? "Complete the current step…" : Nt ? "What would you like me to do? (e.g., If this product goes below $100, grab it for me.)" : "Oops! This combination isn’t available for this product. Try a different option.",
5050
+ placeholder: L ? "Complete the current step…" : Nt ? `What would you like me to do? (e.g., If this product goes below $${parseInt(r.price) - 5}, grab it for me.)` : "Oops! This combination isn’t available for this product. Try a different option.",
5045
5051
  disabled: fo,
5046
5052
  className: `w-full rounded-full p-4 outline-none border-none focus:ring-0 focus:border-transparent disabled:bg-gray-100 disabled:cursor-not-allowed
5047
5053
  ${Nt ? "" : "placeholder:text-red-400 text-red-500"}`,
5048
- value: $e,
5054
+ value: De,
5049
5055
  onKeyDown: (u) => {
5050
- u.key === "Enter" && !G && !L && Lr();
5056
+ u.key === "Enter" && !Z && !L && Lr();
5051
5057
  },
5052
- onChange: (u) => he(u.target.value)
5058
+ onChange: (u) => pe(u.target.value)
5053
5059
  }
5054
5060
  ),
5055
5061
  /* @__PURE__ */ a(
5056
5062
  "button",
5057
5063
  {
5058
5064
  type: "submit",
5059
- disabled: G || L,
5065
+ disabled: Z || L,
5060
5066
  className: "mr-6 font-medium",
5061
5067
  style: { color: "var(--tanya-light)" },
5062
5068
  onClick: () => Lr(),
5063
- children: G ? /* @__PURE__ */ a(
5069
+ children: Z ? /* @__PURE__ */ a(
5064
5070
  "div",
5065
5071
  {
5066
5072
  className: "m-3 animate-spin rounded-full h-6 w-6 border-b-2",
5067
5073
  style: { borderBottom: "2px solid" }
5068
5074
  }
5069
5075
  ) : /* @__PURE__ */ a(
5070
- re,
5076
+ ae,
5071
5077
  {
5072
5078
  icon: "fluent:send-48-filled",
5073
5079
  color: "var(--tanya-light)",