tanya-chatbot 0.10.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +1,18 @@
1
- import { useEffect as xe, useState as b, useRef as Ve, forwardRef as $n, createElement as hr, useMemo as en } from "react";
1
+ import { useEffect as xe, useState as b, useRef as Ve, forwardRef as $n, createElement as mr, useMemo as Zr } from "react";
2
2
  import { jsx as a, jsxs as d, Fragment as ke } from "react/jsx-runtime";
3
3
  import { createHttpLink as Uo, ApolloClient as qo, InMemoryCache as Ro, ApolloProvider as Ho } from "@apollo/client";
4
- import { Provider as Vo, useDispatch as Ln, useSelector as er } from "react-redux";
4
+ import { Provider as Vo, useDispatch as Ln, useSelector as Xt } from "react-redux";
5
5
  import { createSlice as zn, configureStore as Yo } from "@reduxjs/toolkit";
6
6
  import * as Dn from "@radix-ui/react-popover";
7
7
  import "clsx";
8
8
  import "tailwind-merge";
9
- import de from "axios";
9
+ import ue from "axios";
10
10
  import "crypto-js";
11
11
  import { Icon as Jo } from "@iconify/react";
12
12
  import { toast as Be } from "react-toastify";
13
13
  import { createPortal as Ko } from "react-dom";
14
14
  const Wo = '*,: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-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-\\[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-12{width:3rem}.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-\\[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-2{border-top-width:2px}.border-none{border-style:none}.border-\\[\\#804c9e\\]{--tw-border-opacity: 1;border-color:rgb(128 76 158 / var(--tw-border-opacity, 1))}.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-black{--tw-border-opacity: 1;border-color:rgb(0 0 0 / 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\\:border-gray-500:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}.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
- function hi() {
15
+ function pi() {
16
16
  return xe(() => {
17
17
  if (typeof document < "u") {
18
18
  const e = document.createElement("style");
@@ -74,12 +74,12 @@ const Qo = {
74
74
  e.product = t.payload;
75
75
  }
76
76
  }
77
- }), { setProduct: gr } = Bn.actions, Zo = Bn.reducer, ea = Yo({
77
+ }), { setProduct: hr } = Bn.actions, Zo = Bn.reducer, ea = Yo({
78
78
  reducer: {
79
79
  store: Go,
80
80
  product: Zo
81
81
  }
82
- }), ta = ({ children: e }) => /* @__PURE__ */ a(Vo, { store: ea, children: e }), tr = (e) => {
82
+ }), ta = ({ children: e }) => /* @__PURE__ */ a(Vo, { store: ea, children: e }), Zt = (e) => {
83
83
  const t = new CustomEvent("reactCartUpdated", {
84
84
  detail: {
85
85
  cartUpdated: !0,
@@ -101,17 +101,17 @@ function na({
101
101
  const Xe = () => ({ 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" }), Un = async () => {
102
102
  const e = "https://tanya-sfcc-server.vercel.app/";
103
103
  try {
104
- const t = await de.post(
104
+ const t = await ue.post(
105
105
  `${e}api/auth/token-bm-grant?baseUrl=${Ye()}&siteId=${Ue()}`
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 de.isAxiosError(t) ? console.error("Error fetching token:", t.response || t.message) : console.error("Unexpected error:", t), null;
109
+ return ue.isAxiosError(t) ? console.error("Error fetching token:", t.response || t.message) : console.error("Unexpected error:", t), null;
110
110
  }
111
111
  }, qn = 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 de.post(
114
+ const r = JSON.parse(sessionStorage.getItem("customerData") || "{}").dwsid, n = await ue.post(
115
115
  `${t}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${Ye()}&siteId=${Ue()}&pubCfg=${Ze()}&envRef=${et()}&orgRef=${tt()}`,
116
116
  {},
117
117
  {
@@ -123,7 +123,7 @@ const Xe = () => ({ 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 de.isAxiosError(r) ? console.error("Error creating basket:", r.response || r.message) : console.error("Unexpected error:", r), null;
126
+ return ue.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 Ge() {
@@ -131,7 +131,7 @@ async function Ge() {
131
131
  const e = Ue(), t = "access_token_" + e, r = "expires_in_" + e, n = localStorage.getItem(r), o = localStorage.getItem(t);
132
132
  return console.log(o), (s = JSON.parse(sessionStorage.getItem("customerData") || "{}")) != null && s.isGuest, console.log("access token found in local storage"), { access_token: o, expires_in: n };
133
133
  }
134
- const wr = async (e, t) => {
134
+ const pr = async (e, t) => {
135
135
  if (e && t && Date.now() < t)
136
136
  return e;
137
137
  try {
@@ -166,7 +166,7 @@ const wr = async (e, t) => {
166
166
  }
167
167
  try {
168
168
  const o = Ye();
169
- return (await de.get(
169
+ return (await ue.get(
170
170
  `${t}${r}/search-sfcc?baseUrl=${o}&query=${e}&siteId=${Ue()}&pubCfg=${Ze()}&envRef=${et()}&orgRef=${tt()}`,
171
171
  {
172
172
  headers: {
@@ -183,7 +183,7 @@ const wr = async (e, t) => {
183
183
  const { serverUrl: t, basePath: r } = Xe(), n = Ye();
184
184
  console.log("calling access");
185
185
  const { access_token: o } = await Ge();
186
- return (await de.get(
186
+ return (await ue.get(
187
187
  `${t}${r}/product-sfcc/${e}?baseUrl=${n}&siteId=${Ue()}&pubCfg=${Ze()}&envRef=${et()}&orgRef=${tt()}`,
188
188
  {
189
189
  headers: {
@@ -197,7 +197,7 @@ const wr = async (e, t) => {
197
197
  const t = await Un(), { customer_token: r } = await qn(
198
198
  t
199
199
  ), { serverUrl: n, basePath: o } = Xe(), i = (await Ge()).access_token;
200
- return (await de.get(
200
+ return (await ue.get(
201
201
  `${n}${o}/get-interest?baseUrl=${Ye()}&customerId=${e}&siteId=${Ue()}&pubCfg=${Ze()}&envRef=${et()}&orgRef=${tt()}`,
202
202
  {
203
203
  headers: {
@@ -206,10 +206,10 @@ const wr = async (e, t) => {
206
206
  }
207
207
  }
208
208
  )).data;
209
- }, tn = (e) => String(typeof e == "string" ? e : e["en-US"] || e), rn = (e) => e != null && e.image ? [e.image] : "variants" in e ? e.variants[0].images : e.masterVariant.images.map((t) => t.url), sa = (e, t) => e.toLocaleString("en-US", {
209
+ }, en = (e) => String(typeof e == "string" ? e : e["en-US"] || e), tn = (e) => e != null && e.image ? [e.image] : "variants" in e ? e.variants[0].images : e.masterVariant.images.map((t) => t.url), sa = (e, t) => e.toLocaleString("en-US", {
210
210
  style: "currency",
211
211
  currency: t || "USD"
212
- }), nn = (e) => {
212
+ }), rn = (e) => {
213
213
  var t, r, n;
214
214
  return "variants" in e ? {
215
215
  centAmount: (t = e.variants[0]) == null ? void 0 : t.prices.EUR.max,
@@ -218,7 +218,7 @@ const wr = 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
- }, ia = (e) => e.charAt(0).toUpperCase() + e.slice(1), on = (e, t) => e.length < t ? e : e.slice(0, t) + "...", lr = (e) => e.split("\\n").map((t, r) => {
221
+ }, ia = (e) => e.charAt(0).toUpperCase() + e.slice(1), nn = (e, t) => e.length < t ? e : e.slice(0, t) + "...", sr = (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("");
@@ -241,8 +241,8 @@ const ca = ({
241
241
  (l) => l - r < 0 ? e.length - (e.length % r || r) : l - r
242
242
  );
243
243
  }, c = async (l) => {
244
- const h = await Rn(l);
245
- t(gr(h));
244
+ const p = await Rn(l);
245
+ t(hr(p));
246
246
  };
247
247
  return /* @__PURE__ */ a("div", { className: "mt-2 overflow-x-hidden", children: /* @__PURE__ */ d("div", { className: "flex items-center justify-center gap-4 relative", children: [
248
248
  (e == null ? void 0 : e.length) > r && /* @__PURE__ */ a(
@@ -259,7 +259,7 @@ const ca = ({
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 h, g, y, x;
262
+ var p, g, y, x;
263
263
  return /* @__PURE__ */ d(
264
264
  "div",
265
265
  {
@@ -271,7 +271,7 @@ const ca = ({
271
271
  /* @__PURE__ */ a("div", { className: "w-full p-2 flex items-center justify-center bg-white", children: /* @__PURE__ */ a(
272
272
  "img",
273
273
  {
274
- src: ((h = rn(l)[0]) == null ? void 0 : h.link) || rn(l)[0] || // fallback if it's a string
274
+ src: ((p = tn(l)[0]) == null ? void 0 : p.link) || tn(l)[0] || // fallback if it's a string
275
275
  "https://via.placeholder.com/120",
276
276
  alt: l != null && l.productName ? l.productName : "Product",
277
277
  className: "w-28 h-28 rounded-[10px] transition-transform duration-300 hover:scale-125 object-cover"
@@ -283,8 +283,8 @@ const ca = ({
283
283
  className: "text-white w-full p-2 text-[12px] text-center h-[60px]",
284
284
  children: [
285
285
  /* @__PURE__ */ d("div", { className: "relative inline-block group", children: [
286
- /* @__PURE__ */ a("div", { className: "w-full line-clamp-1 overflow-hidden text-ellipsis text-[#000000] font-medium font-nunitoSans", children: l != null && l.productName ? l.productName : l != null && l.product_name ? l.product_name : on(
287
- tn((g = l == null ? void 0 : l.name) == null ? void 0 : g["en-US"]),
286
+ /* @__PURE__ */ a("div", { className: "w-full line-clamp-1 overflow-hidden text-ellipsis text-[#000000] font-medium font-nunitoSans", children: l != null && l.productName ? l.productName : l != null && l.product_name ? l.product_name : nn(
287
+ en((g = l == null ? void 0 : l.name) == null ? void 0 : g["en-US"]),
288
288
  60
289
289
  ) || "Product" }),
290
290
  /* @__PURE__ */ a(
@@ -298,8 +298,8 @@ const ca = ({
298
298
  marginBottom: "5px",
299
299
  zIndex: 50
300
300
  },
301
- children: l != null && l.productName ? l.productName : l != null && l.product_name ? l.product_name : on(
302
- tn((y = l == null ? void 0 : l.name) == null ? void 0 : y["en-US"]),
301
+ children: l != null && l.productName ? l.productName : l != null && l.product_name ? l.product_name : nn(
302
+ en((y = l == null ? void 0 : l.name) == null ? void 0 : y["en-US"]),
303
303
  60
304
304
  ) || "Product"
305
305
  }
@@ -307,8 +307,8 @@ const ca = ({
307
307
  ] }),
308
308
  /* @__PURE__ */ d("div", { className: " flex text-center items-center gap-2 text-[14px] text-[#14121F] font-bold font-nunitoSans text-base mb-1", children: [
309
309
  /* @__PURE__ */ a("p", { children: sa(
310
- l != null && l.price ? Number(l == null ? void 0 : l.price) : nn(l).centAmount || 0,
311
- (x = nn(l)) == null ? void 0 : x.currencyCode
310
+ l != null && l.price ? Number(l == null ? void 0 : l.price) : rn(l).centAmount || 0,
311
+ (x = rn(l)) == null ? void 0 : x.currencyCode
312
312
  ) }),
313
313
  /* @__PURE__ */ d("p", { className: "text-[#14121F] font-normal line-through text-sm font-nunitoSans truncate", children: [
314
314
  "$",
@@ -363,11 +363,11 @@ const ca = ({
363
363
  ]
364
364
  },
365
365
  n
366
- )) }), Ir = async (e, t) => {
366
+ )) }), Cr = async (e, t) => {
367
367
  var s, i;
368
368
  const { serverUrl: r, basePath: n } = Xe(), o = `${r}`;
369
369
  try {
370
- const c = await de.post(
370
+ const c = await ue.post(
371
371
  `${o}${n}/basket/create?baseUrl=${Ye()}&siteId=${Ue()}&pubCfg=${Ze()}&envRef=${et()}&orgRef=${tt()}`,
372
372
  t,
373
373
  {
@@ -385,12 +385,12 @@ const ca = ({
385
385
  "*"
386
386
  ), c.data;
387
387
  } catch (c) {
388
- return de.isAxiosError(c) ? console.error("Error creating basket:", c.response || c.message) : console.error("Unexpected error:", c), null;
388
+ return ue.isAxiosError(c) ? console.error("Error creating basket:", c.response || c.message) : console.error("Unexpected error:", c), null;
389
389
  }
390
- }, yr = async (e, t, r) => {
390
+ }, gr = async (e, t, r) => {
391
391
  const { serverUrl: n, basePath: o } = Xe(), s = `${n}`;
392
392
  try {
393
- const i = await de.post(
393
+ const i = await ue.post(
394
394
  `${s}${o}/basket/add-product/${e}?baseUrl=${Ye()}&siteId=${Ue()}&pubCfg=${Ze()}&envRef=${et()}&orgRef=${tt()}`,
395
395
  t,
396
396
  {
@@ -402,7 +402,7 @@ const ca = ({
402
402
  );
403
403
  return i.status === 200 && i.data ? i.data : null;
404
404
  } catch (i) {
405
- return de.isAxiosError(i) ? console.error(
405
+ return ue.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,7 +414,7 @@ const ca = ({
414
414
  var s;
415
415
  const { serverUrl: r, basePath: n } = Xe(), o = `${r}`;
416
416
  try {
417
- const i = await de.get(
417
+ const i = await ue.get(
418
418
  `${o}${n}/basket/${e}?baseUrl=${Ye()}&siteId=${Ue()}&pubCfg=${Ze()}&envRef=${et()}&orgRef=${tt()}`,
419
419
  {
420
420
  headers: {
@@ -425,13 +425,13 @@ const ca = ({
425
425
  );
426
426
  return { status: i.status, data: i.data };
427
427
  } catch (i) {
428
- return de.isAxiosError(i) ? { status: (s = i.response) == null ? void 0 : s.status, data: null } : { status: null, data: null };
428
+ return ue.isAxiosError(i) ? { status: (s = i.response) == null ? void 0 : s.status, data: null } : { status: null, data: null };
429
429
  }
430
430
  }, ua = async (e) => {
431
431
  var i;
432
432
  const { serverUrl: t, basePath: r } = Xe(), n = `${t}`, o = await Ge(), s = "Bearer " + (o == null ? void 0 : o.access_token);
433
433
  try {
434
- const c = await de.get(
434
+ const c = await ue.get(
435
435
  `${n}${r}/basket/shipping-methods/${e}?baseUrl=${Ye()}&siteId=${Ue()}&pubCfg=${Ze()}&envRef=${et()}&orgRef=${tt()}`,
436
436
  {
437
437
  headers: {
@@ -442,39 +442,39 @@ const ca = ({
442
442
  );
443
443
  return ((i = c == null ? void 0 : c.data) == null ? void 0 : i.applicableShippingMethods) || [];
444
444
  } catch (c) {
445
- return de.isAxiosError(c) ? console.error(
445
+ return ue.isAxiosError(c) ? console.error(
446
446
  "Error fetching shipping methods:",
447
447
  c.response || c.message
448
448
  ) : console.error("Unexpected error:", c), [];
449
449
  }
450
- }, Lt = "sfcc_basket_id", an = "sfcc_customer_token", zt = "sfcc_token_expiry", fa = 300 * 1e3, Vt = "1.0.0";
451
- const lt = (e) => {
450
+ }, $t = "sfcc_basket_id", on = "sfcc_customer_token", Lt = "sfcc_token_expiry", fa = 300 * 1e3, Rt = "1.0.0";
451
+ const it = (e) => {
452
452
  try {
453
- e ? localStorage.setItem(Lt, e) : localStorage.removeItem(Lt);
453
+ e ? localStorage.setItem($t, e) : localStorage.removeItem($t);
454
454
  } catch (t) {
455
455
  console.error("Error saving basket ID to storage:", t);
456
456
  }
457
- }, rr = (e) => {
457
+ }, er = (e) => {
458
458
  try {
459
459
  if (e) {
460
- localStorage.setItem(an, e);
460
+ localStorage.setItem(on, e);
461
461
  const t = Date.now() + fa;
462
- localStorage.setItem(zt, t.toString());
462
+ localStorage.setItem(Lt, t.toString());
463
463
  } else
464
- localStorage.removeItem(an);
464
+ localStorage.removeItem(on);
465
465
  } catch (t) {
466
466
  console.error("Error storing token:", t);
467
467
  }
468
- }, sn = 300, ma = ({ addToCartPwa: e }) => {
469
- var l, h, g, y, x, I;
470
- const t = Ln(), r = er((S) => S.product.product), n = er((S) => S.store.store), [o, s] = b(!!r);
468
+ }, an = 300, ma = ({ addToCartPwa: e }) => {
469
+ var l, p, g, y, x, I;
470
+ const t = Ln(), r = Xt((S) => S.product.product), n = Xt((S) => S.store.store), [o, s] = b(!!r);
471
471
  if (xe(() => {
472
472
  s(!!r);
473
473
  }, [r]), !r) return null;
474
474
  const i = async () => {
475
- var S, A, k, P, J, q, Y, _e, C, K, te, ye, be, ct, N, ve;
475
+ var S, T, k, P, J, q, Y, _e, C, K, re, ye, be, lt, N, ve;
476
476
  try {
477
- if (!((A = (S = r == null ? void 0 : r.variants) == null ? void 0 : S[0]) != null && A.product_id) && !(r.type.item || r.type.bundle) && !((P = (k = r == null ? void 0 : r.variants) == null ? void 0 : k[0]) != null && P.productId)) {
477
+ if (!((T = (S = r == null ? void 0 : r.variants) == null ? void 0 : S[0]) != null && T.product_id) && !(r.type.item || r.type.bundle) && !((P = (k = r == null ? void 0 : r.variants) == null ? void 0 : k[0]) != null && P.productId)) {
478
478
  Be.error("Variants not available", {
479
479
  position: "bottom-right",
480
480
  autoClose: 1e3
@@ -488,33 +488,33 @@ const lt = (e) => {
488
488
  }
489
489
  ], $ = JSON.parse(
490
490
  sessionStorage.getItem("customerData") || "{}"
491
- ), Je = ($ == null ? void 0 : $.basketId) || localStorage.getItem(Lt), dt = !1, qe = localStorage.getItem(zt), rt = Date.now();
492
- if (!dt || !qe || rt >= parseInt(qe)) {
493
- let ue = "";
494
- if (ue = "Bearer " + (await Ge()).access_token, !ue) {
491
+ ), Je = ($ == null ? void 0 : $.basketId) || localStorage.getItem($t), ct = !1, qe = localStorage.getItem(Lt), rt = Date.now();
492
+ if (!ct || !qe || rt >= parseInt(qe)) {
493
+ let fe = "";
494
+ if (fe = "Bearer " + (await Ge()).access_token, !fe) {
495
495
  console.error("Failed to get customer_token");
496
496
  return;
497
497
  }
498
498
  const Ie = rt + 300 * 1e3;
499
- if (rr(ue), localStorage.setItem(zt, Ie.toString()), Je) {
499
+ if (er(fe), localStorage.setItem(Lt, Ie.toString()), Je) {
500
500
  const Se = await Hn({
501
501
  basketId: Je,
502
- customer_token: ue
502
+ customer_token: fe
503
503
  });
504
504
  if (Se.status === 200 && Se) {
505
- const re = await yr(
505
+ const ne = await gr(
506
506
  Je,
507
507
  V,
508
- ue
508
+ fe
509
509
  );
510
- (((Y = re == null ? void 0 : re.product_items) == null ? void 0 : Y.length) > 0 || ((_e = re == null ? void 0 : re.productItems) == null ? void 0 : _e.length) > 0) && (Be.success("Added to cart", {
510
+ (((Y = ne == null ? void 0 : ne.product_items) == null ? void 0 : Y.length) > 0 || ((_e = ne == null ? void 0 : ne.productItems) == null ? void 0 : _e.length) > 0) && (Be.success("Added to cart", {
511
511
  position: "bottom-right",
512
512
  autoClose: 3e3,
513
513
  hideProgressBar: !1,
514
514
  closeOnClick: !0,
515
515
  pauseOnHover: !0,
516
516
  draggable: !0
517
- }), tr(Je));
517
+ }), Zt(Je));
518
518
  return;
519
519
  }
520
520
  }
@@ -525,34 +525,34 @@ const lt = (e) => {
525
525
  quantity: 1
526
526
  }
527
527
  ]
528
- }, z = await Ir(ue, je);
528
+ }, z = await Cr(fe, je);
529
529
  if (!(z != null && z.basket_id) && !(z != null && z.basketId)) {
530
530
  console.error("Failed to create basket");
531
531
  return;
532
532
  }
533
- lt(
533
+ it(
534
534
  (z == null ? void 0 : z.basket_id) || (z == null ? void 0 : z.basketId)
535
535
  ), console.log("adding product to basket");
536
- const Te = await yr(
536
+ const Te = await gr(
537
537
  (z == null ? void 0 : z.basket_id) || (z == null ? void 0 : z.basketId),
538
538
  V,
539
- ue
539
+ fe
540
540
  );
541
- console.log("object added to basket"), (((te = Te == null ? void 0 : Te.product_items) == null ? void 0 : te.length) > 0 || ((ye = Te == null ? void 0 : Te.productItems) == null ? void 0 : ye.length) > 0) && Be.success("Added to cart", {
541
+ console.log("object added to basket"), (((re = Te == null ? void 0 : Te.product_items) == null ? void 0 : re.length) > 0 || ((ye = Te == null ? void 0 : Te.productItems) == null ? void 0 : ye.length) > 0) && Be.success("Added to cart", {
542
542
  position: "bottom-right",
543
543
  autoClose: 3e3,
544
544
  hideProgressBar: !1,
545
545
  closeOnClick: !0,
546
546
  pauseOnHover: !0,
547
547
  draggable: !0
548
- }), tr(z.basket_id || (z == null ? void 0 : z.basketId));
548
+ }), Zt(z.basket_id || (z == null ? void 0 : z.basketId));
549
549
  }
550
550
  } catch (V) {
551
551
  console.error("Error adding to cart:", V), Be.error("Failed to add product to cart", {
552
552
  position: "bottom-right",
553
553
  autoClose: 3e3
554
554
  }), ((be = V == null ? void 0 : V.response) == null ? void 0 : be.status) === 404 || // Basket not found
555
- ((ct = V == null ? void 0 : V.response) == null ? void 0 : ct.status) === 401 ? (((N = V == null ? void 0 : V.response) == null ? void 0 : N.status) === 404 && lt(null), ((ve = V == null ? void 0 : V.response) == null ? void 0 : ve.status) === 401 && (lt(null), rr(null))) : (console.error("Failed to add product to basket:", V.message), Be.error("Failed to add product to cart", {
555
+ ((lt = V == null ? void 0 : V.response) == null ? void 0 : lt.status) === 401 ? (((N = V == null ? void 0 : V.response) == null ? void 0 : N.status) === 404 && it(null), ((ve = V == null ? void 0 : V.response) == null ? void 0 : ve.status) === 401 && (it(null), er(null))) : (console.error("Failed to add product to basket:", V.message), Be.error("Failed to add product to cart", {
556
556
  position: "bottom-right",
557
557
  autoClose: 3e3
558
558
  }));
@@ -568,7 +568,7 @@ const lt = (e) => {
568
568
  {
569
569
  className: "fixed inset-0 z-40 bg-black/30",
570
570
  onClick: () => {
571
- s(!1), setTimeout(() => t(gr(null)), sn);
571
+ s(!1), setTimeout(() => t(hr(null)), an);
572
572
  }
573
573
  }
574
574
  ),
@@ -591,8 +591,8 @@ const lt = (e) => {
591
591
  className: "text-[#555555] w-6 h-6 cursor-pointer",
592
592
  onClick: () => {
593
593
  s(!1), setTimeout(
594
- () => t(gr(null)),
595
- sn
594
+ () => t(hr(null)),
595
+ an
596
596
  );
597
597
  },
598
598
  children: "✕"
@@ -603,20 +603,20 @@ const lt = (e) => {
603
603
  /* @__PURE__ */ a("div", { className: "flex flex-row items-center justify-center w-[120px] h-[120px] my-5", children: /* @__PURE__ */ a(
604
604
  "img",
605
605
  {
606
- src: (y = (g = (h = (l = r.imageGroups) == null ? void 0 : l[0]) == null ? void 0 : h.images) == null ? void 0 : g[0]) == null ? void 0 : y.link,
606
+ src: (y = (g = (p = (l = r.imageGroups) == null ? void 0 : l[0]) == null ? void 0 : p.images) == null ? void 0 : g[0]) == null ? void 0 : y.link,
607
607
  alt: r.name,
608
608
  className: "rounded-[10px]"
609
609
  }
610
610
  ) }),
611
611
  /* @__PURE__ */ a("div", { className: "flex flex-col items-center gap-2", children: r.imageGroups.slice(1, 2).map(
612
- (S) => S.images.slice(1, 2).map((A) => /* @__PURE__ */ a(
612
+ (S) => S.images.slice(1, 2).map((T) => /* @__PURE__ */ a(
613
613
  "img",
614
614
  {
615
- src: A.link,
615
+ src: T.link,
616
616
  alt: r.name,
617
617
  className: "rounded-[10px] w-[60px] h-[60px]"
618
618
  },
619
- A.link
619
+ T.link
620
620
  ))
621
621
  ) })
622
622
  ] }),
@@ -663,7 +663,7 @@ const lt = (e) => {
663
663
  " ratings"
664
664
  ] })
665
665
  ] }) }),
666
- /* @__PURE__ */ a("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((S, A) => {
666
+ /* @__PURE__ */ a("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((S, T) => {
667
667
  var k;
668
668
  return /* @__PURE__ */ a(
669
669
  Jo,
@@ -672,10 +672,10 @@ const lt = (e) => {
672
672
  width: "20",
673
673
  height: "20",
674
674
  className: `text-yellow-500
675
- ${((k = r == null ? void 0 : r.rating) == null ? void 0 : k.rate) > A ? "text-yellow-500" : "text-gray-300"}
675
+ ${((k = r == null ? void 0 : r.rating) == null ? void 0 : k.rate) > T ? "text-yellow-500" : "text-gray-300"}
676
676
  `
677
677
  },
678
- A
678
+ T
679
679
  );
680
680
  }) })
681
681
  ] }),
@@ -710,7 +710,7 @@ const lt = (e) => {
710
710
  }
711
711
  )
712
712
  ] });
713
- }, pa = ({
713
+ }, ha = ({
714
714
  tanyaConfig: e,
715
715
  basketId: t,
716
716
  addToCart: r
@@ -729,83 +729,83 @@ const lt = (e) => {
729
729
  "Niece/Nephew": "his/her niece/nephew",
730
730
  "My Friends": "his/her friends",
731
731
  Others: "others"
732
- }, s = Ve(null), i = Ve(null), c = Ve(null), l = Ve(null), [h, g] = b(null);
732
+ }, s = Ve(null), i = Ve(null), c = Ve(null), l = Ve(null), [p, g] = b(null);
733
733
  Ve(null);
734
- const [y, x] = b(!1), [I, S] = b(!1), [A, k] = b(!1), [P, J] = b(!1), [q, Y] = b(!1), [_e, C] = b(!1), [K, te] = b(""), [ye, be] = b(""), ct = (p) => ({
735
- id: p.id,
736
- title: p.name,
737
- image: p.image ?? "",
738
- price: p.price ?? 0
739
- }), [N, ve] = b([]), V = Ve(null), $ = er((p) => p.store.store), Je = er((p) => p.product.product);
734
+ const [y, x] = b(!1), [I, S] = b(!1), [T, k] = b(!1), [P, J] = b(!1), [q, Y] = b(!1), [_e, C] = b(!1), [K, re] = b(""), [ye, be] = b(""), lt = (h) => ({
735
+ id: h.id,
736
+ title: h.name,
737
+ image: h.image ?? "",
738
+ price: h.price ?? 0
739
+ }), [N, ve] = b([]), V = Ve(null), $ = Xt((h) => h.store.store), Je = Xt((h) => h.product.product);
740
740
  xe(() => {
741
- const p = localStorage.getItem(
741
+ const h = localStorage.getItem(
742
742
  `access_token_${e.siteId}`
743
743
  ), O = localStorage.getItem(
744
744
  `chat-token-${e.siteId}`
745
745
  );
746
- if (p && O === p) {
746
+ if (h && O === h) {
747
747
  const B = localStorage.getItem("chatHistory");
748
748
  B && ve(JSON.parse(B));
749
749
  } else
750
750
  localStorage.setItem("chatHistory", JSON.stringify([])), localStorage.setItem(
751
751
  `chat-token-${e.siteId}`,
752
- p || ""
752
+ h || ""
753
753
  );
754
754
  }, []), xe(() => {
755
755
  localStorage.setItem("chatHistory", JSON.stringify(N));
756
- const p = localStorage.getItem(
756
+ const h = localStorage.getItem(
757
757
  `access_token_${e.siteId}`
758
758
  );
759
- p && localStorage.setItem(`chat-token-${e.siteId}`, p);
759
+ h && localStorage.setItem(`chat-token-${e.siteId}`, h);
760
760
  }, [N]);
761
- const dt = () => {
761
+ const ct = () => {
762
762
  k(!0), setTimeout(() => S(!0), 10);
763
763
  }, qe = () => {
764
764
  S(!1), setTimeout(() => k(!1), 300);
765
765
  };
766
766
  xe(() => {
767
- y ? dt() : qe();
767
+ y ? ct() : qe();
768
768
  }, [y]);
769
- const rt = (p) => {
770
- be(o[p]);
769
+ const rt = (h) => {
770
+ be(o[h]);
771
771
  };
772
772
  xe(() => {
773
- A && V.current && V.current.scrollTo({
773
+ T && V.current && V.current.scrollTo({
774
774
  top: V.current.scrollHeight,
775
775
  behavior: "smooth"
776
776
  });
777
- }, [N, A]);
778
- const ue = null, Ie = null, je = async () => {
779
- const p = await Ge();
780
- p != null && g(p);
777
+ }, [N, T]);
778
+ const fe = null, Ie = null, je = async () => {
779
+ const h = await Ge();
780
+ h != null && g(h);
781
781
  };
782
782
  xe(() => {
783
783
  if (e != null && e.siteId) {
784
- const { clientID: p, host: O, organizationID: B, shortCode: Q, siteId: U } = e;
785
- sessionStorage.setItem("Host", O), sessionStorage.setItem("SiteId", U), sessionStorage.setItem("pubCfg", btoa(p)), sessionStorage.setItem("envRef", Q), sessionStorage.setItem("orgRef", B);
784
+ const { clientID: h, host: O, organizationID: B, shortCode: Q, siteId: U } = e;
785
+ sessionStorage.setItem("Host", O), sessionStorage.setItem("SiteId", U), sessionStorage.setItem("pubCfg", btoa(h)), sessionStorage.setItem("envRef", Q), sessionStorage.setItem("orgRef", B);
786
786
  }
787
787
  je(), console.log("scapi environment v1");
788
788
  }, []), xe(() => {
789
- t && (console.log("setting the basket id", t), lt(t));
789
+ t && (console.log("setting the basket id", t), it(t));
790
790
  }, [t]);
791
791
  const z = async () => {
792
- const p = JSON.parse(
792
+ const h = JSON.parse(
793
793
  sessionStorage.getItem("customerData") || "{}"
794
794
  ).customerId;
795
- return (await aa(p || "")).c_interests;
796
- }, Te = async (p, O) => {
797
- console.log("in secondary flow", Vt);
795
+ return (await aa(h || "")).c_interests;
796
+ }, Te = async (h, O) => {
797
+ console.log("in secondary flow", Rt);
798
798
  const B = await z();
799
- if (console.log(B, "interests of customer", Vt), !!B)
799
+ if (console.log(B, "interests of customer", Rt), !!B)
800
800
  try {
801
801
  ve(
802
- (me) => me.map(
803
- (Ne, pe) => pe === me.length - 1 ? { ...Ne, secondaryLoading: !0 } : Ne
802
+ (he) => he.map(
803
+ (Ne, pe) => pe === he.length - 1 ? { ...Ne, secondaryLoading: !0 } : Ne
804
804
  )
805
805
  );
806
- const Q = await wr(ue, Ie);
806
+ const Q = await pr(fe, Ie);
807
807
  if (!Q) throw new Error("Failed to fetch token");
808
- const U = localStorage.getItem("customerNumber"), L = localStorage.getItem("isLoggedIn"), X = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
808
+ const U = localStorage.getItem("customerNumber"), L = localStorage.getItem("isLoggedIn"), Z = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
809
809
  registered: String(L || !1),
810
810
  userId: String(U || (/* @__PURE__ */ new Date()).getTime())
811
811
  }).toString()}`, R = JSON.stringify({
@@ -813,11 +813,11 @@ const lt = (e) => {
813
813
  flowAliasId: "HKFUVLWVH2",
814
814
  input: {
815
815
  loyaltyPoints: "",
816
- productName: p,
816
+ productName: h,
817
817
  productPoints: String(O || 0),
818
818
  interests: B
819
819
  }
820
- }), ne = await fetch(X, {
820
+ }), oe = await fetch(Z, {
821
821
  signal: AbortSignal.timeout(3e4),
822
822
  method: "POST",
823
823
  headers: {
@@ -826,46 +826,46 @@ const lt = (e) => {
826
826
  },
827
827
  body: R
828
828
  });
829
- if (!ne.body) throw new Error("Readable stream not supported");
830
- const $e = ne.body.getReader(), Re = new TextDecoder();
829
+ if (!oe.body) throw new Error("Readable stream not supported");
830
+ const $e = oe.body.getReader(), Re = new TextDecoder();
831
831
  let G = "";
832
832
  for (; ; ) {
833
- const { done: me, value: Ne } = await $e.read();
834
- if (me) break;
833
+ const { done: he, value: Ne } = await $e.read();
834
+ if (he) break;
835
835
  G += Re.decode(Ne, { stream: !0 });
836
836
  const pe = G.split(`
837
837
  `);
838
838
  G = pe.pop() || "";
839
- for (const he of pe)
840
- if (he.startsWith("data:")) {
841
- const _ = he.slice(5).trim();
839
+ for (const X of pe)
840
+ if (X.startsWith("data:")) {
841
+ const _ = X.slice(5).trim();
842
842
  try {
843
- const Z = JSON.parse(_);
844
- Z.index === 0 && ve(
843
+ const ee = JSON.parse(_);
844
+ ee.index === 0 && ve(
845
845
  (D) => D.map(
846
- (oe, ae) => ae === D.length - 1 ? {
847
- ...oe,
848
- secondaryResponse: Z.data,
846
+ (ae, se) => se === D.length - 1 ? {
847
+ ...ae,
848
+ secondaryResponse: ee.data,
849
849
  secondaryLoading: !1
850
- } : oe
850
+ } : ae
851
851
  )
852
852
  );
853
- } catch (Z) {
853
+ } catch (ee) {
854
854
  ve(
855
855
  (D) => D.map(
856
- (oe, ae) => ae === D.length - 1 ? { ...oe, secondaryLoading: !1 } : oe
856
+ (ae, se) => se === D.length - 1 ? { ...ae, secondaryLoading: !1 } : ae
857
857
  )
858
- ), console.error("Secondary flow JSON parse error:", Z);
858
+ ), console.error("Secondary flow JSON parse error:", ee);
859
859
  }
860
860
  }
861
861
  }
862
862
  } catch (Q) {
863
863
  console.error("Secondary flow error:", Q);
864
864
  }
865
- }, Se = async (p) => {
866
- const O = p || K.trim();
865
+ }, Se = async (h) => {
866
+ const O = h || K.trim();
867
867
  if (O) {
868
- Y(!0), te(""), s.current = null, i.current = null, c.current = null, l.current = null, ve((B) => [
868
+ Y(!0), re(""), s.current = null, i.current = null, c.current = null, l.current = null, ve((B) => [
869
869
  ...B,
870
870
  {
871
871
  query: O,
@@ -876,10 +876,10 @@ const lt = (e) => {
876
876
  }
877
877
  ]);
878
878
  try {
879
- const B = ye, Q = localStorage.getItem("customerNumber"), U = localStorage.getItem("isLoggedIn"), L = await wr(ue, Ie);
879
+ const B = ye, Q = localStorage.getItem("customerNumber"), U = localStorage.getItem("isLoggedIn"), L = await pr(fe, Ie);
880
880
  if (!L)
881
881
  throw new Error("Failed to obtain access token");
882
- const X = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
882
+ const Z = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
883
883
  registered: String(U || !1),
884
884
  userId: String(Q || (/* @__PURE__ */ new Date()).getTime())
885
885
  }).toString()}`, R = JSON.stringify({
@@ -889,7 +889,7 @@ const lt = (e) => {
889
889
  userPrompt: O,
890
890
  whom: B
891
891
  }
892
- }), ne = await fetch(X, {
892
+ }), oe = await fetch(Z, {
893
893
  signal: AbortSignal.timeout(3e4),
894
894
  method: "POST",
895
895
  headers: {
@@ -898,30 +898,30 @@ const lt = (e) => {
898
898
  },
899
899
  body: R
900
900
  });
901
- if (!ne.ok)
902
- throw new Error(`HTTP error! status: ${ne.status}`);
903
- if (!ne.body) throw new Error("Readable stream not supported");
904
- const $e = ne.body.getReader(), Re = new TextDecoder();
905
- let G = "", me = "";
901
+ if (!oe.ok)
902
+ throw new Error(`HTTP error! status: ${oe.status}`);
903
+ if (!oe.body) throw new Error("Readable stream not supported");
904
+ const $e = oe.body.getReader(), Re = new TextDecoder();
905
+ let G = "", he = "";
906
906
  for (; ; ) {
907
907
  C(!0);
908
908
  const { done: Ne, value: pe } = await $e.read();
909
909
  if (Ne) break;
910
910
  G += Re.decode(pe, { stream: !0 });
911
- const he = G.split(`
911
+ const X = G.split(`
912
912
  `);
913
- G = he.pop() || "";
914
- for (const _ of he)
913
+ G = X.pop() || "";
914
+ for (const _ of X)
915
915
  if (_.startsWith("data:")) {
916
- const Z = _.slice(5).trim();
916
+ const ee = _.slice(5).trim();
917
917
  try {
918
- const D = JSON.parse(Z);
919
- D.index == 1 && (me = D.data), ve(
920
- (oe) => oe.map(
921
- (ae, Ae) => Ae === oe.length - 1 ? {
922
- ...ae,
918
+ const D = JSON.parse(ee);
919
+ D.index == 1 && (he = D.data), ve(
920
+ (ae) => ae.map(
921
+ (se, Ae) => Ae === ae.length - 1 ? {
922
+ ...se,
923
923
  [D.index == 0 ? "response" : D.index == 1 ? "keywords" : D.index == 2 ? "potentialQuestions" : "end"]: D.data
924
- } : ae
924
+ } : se
925
925
  )
926
926
  );
927
927
  } catch (D) {
@@ -929,67 +929,67 @@ const lt = (e) => {
929
929
  }
930
930
  }
931
931
  }
932
- fe(re(me));
932
+ me(ne(he));
933
933
  } catch (B) {
934
934
  console.error("Error sending message to Tanya:", B);
935
935
  } finally {
936
936
  Y(!1);
937
937
  }
938
938
  }
939
- }, re = (p) => {
940
- const O = p.match(
939
+ }, ne = (h) => {
940
+ const O = h.match(
941
941
  /top five relevant product or category names are: (.*)/i
942
- ), U = (O ? O[1] : p).split(", ").map((W) => W.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
942
+ ), U = (O ? O[1] : h).split(", ").map((W) => W.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
943
943
  return [...new Set(U)].filter(Boolean).join(",");
944
- }, fe = async (p) => {
944
+ }, me = async (h) => {
945
945
  var B, Q, U;
946
- const O = typeof p == "string" ? p.split(",") : p;
946
+ const O = typeof h == "string" ? h.split(",") : h;
947
947
  C(!0);
948
948
  try {
949
949
  const L = await Promise.all(
950
950
  O.map((R) => oa(R).catch(() => []))
951
951
  // prevent Promise.all crash
952
- ), W = O.map((R, ne) => ({
952
+ ), W = O.map((R, oe) => ({
953
953
  keyword: R,
954
- items: L[ne] ?? [],
954
+ items: L[oe] ?? [],
955
955
  loading: !1
956
- })).filter((R) => R.items.length > 0), X = (Q = (B = W[0]) == null ? void 0 : B.items) == null ? void 0 : Q[0];
957
- if (X) {
958
- i.current = X.product_id, s.current = X.product_name, c.current = (U = X.image) == null ? void 0 : U.link;
959
- const R = typeof X.price == "number" ? X.price : null;
956
+ })).filter((R) => R.items.length > 0), Z = (Q = (B = W[0]) == null ? void 0 : B.items) == null ? void 0 : Q[0];
957
+ if (Z) {
958
+ i.current = Z.product_id, s.current = Z.product_name, c.current = (U = Z.image) == null ? void 0 : U.link;
959
+ const R = typeof Z.price == "number" ? Z.price : null;
960
960
  l.current = R;
961
961
  }
962
962
  if (ve(
963
963
  (R) => R.map(
964
- (ne, $e) => $e === R.length - 1 ? {
965
- ...ne,
964
+ (oe, $e) => $e === R.length - 1 ? {
965
+ ...oe,
966
966
  products: W,
967
- productSnapshot: X ? {
967
+ productSnapshot: Z ? {
968
968
  id: i.current,
969
969
  name: s.current,
970
970
  image: c.current,
971
971
  price: l.current,
972
972
  points: 0,
973
973
  quantity: 1
974
- } : ne.productSnapshot
975
- } : ne
974
+ } : oe.productSnapshot
975
+ } : oe
976
976
  )
977
- ), X) {
977
+ ), Z) {
978
978
  const R = JSON.parse(
979
979
  sessionStorage.getItem("customerData") || "{}"
980
980
  );
981
- R != null && R.isGuest || (console.log("running secondary flow", Vt), Te(s.current, 0));
981
+ R != null && R.isGuest || (console.log("running secondary flow", Rt), Te(s.current, 0));
982
982
  }
983
983
  } catch (L) {
984
984
  console.error("error in keyword search", L);
985
985
  } finally {
986
986
  C(!1);
987
987
  }
988
- }, kt = async (p, O) => {
989
- var B, Q, U, L, W, X, R, ne, $e, Re, G, me, Ne, pe, he;
988
+ }, vt = async (h, O) => {
989
+ var B, Q, U, L, W, Z, R, oe, $e, Re, G, he, Ne, pe, X;
990
990
  J(!0);
991
991
  try {
992
- const _ = await Rn(p.id);
992
+ const _ = await Rn(h.id);
993
993
  if (!((Q = (B = _ == null ? void 0 : _.variants) == null ? void 0 : B[0]) != null && Q.product_id || (L = (U = _ == null ? void 0 : _.variants) == null ? void 0 : U[0]) != null && L.productId) && !(_.type.item || _.type.bundle)) {
994
994
  J(!1), Be.error("Variants not found", {
995
995
  position: "bottom-right",
@@ -997,56 +997,56 @@ const lt = (e) => {
997
997
  }), console.error("No product variant found");
998
998
  return;
999
999
  }
1000
- const Z = [
1000
+ const ee = [
1001
1001
  {
1002
- product_id: ((W = _.variants) == null ? void 0 : W[0].product_id) || ((X = _.variants) == null ? void 0 : X[0].productId) || (_ == null ? void 0 : _.id),
1002
+ product_id: ((W = _.variants) == null ? void 0 : W[0].product_id) || ((Z = _.variants) == null ? void 0 : Z[0].productId) || (_ == null ? void 0 : _.id),
1003
1003
  quantity: O
1004
1004
  }
1005
1005
  ];
1006
- console.log(Z, "product data", "app version", Vt);
1006
+ console.log(ee, "product data", "app version", Rt);
1007
1007
  const D = JSON.parse(
1008
1008
  sessionStorage.getItem("customerData") || "{}"
1009
- ), oe = (D == null ? void 0 : D.basketId) || localStorage.getItem(Lt), ae = !1, Ae = localStorage.getItem(zt), St = Date.now();
1010
- if (!ae || !Ae || St >= parseInt(Ae)) {
1009
+ ), ae = (D == null ? void 0 : D.basketId) || localStorage.getItem($t), se = !1, Ae = localStorage.getItem(Lt), kt = Date.now();
1010
+ if (!se || !Ae || kt >= parseInt(Ae)) {
1011
1011
  const Oe = await Un();
1012
- let { customer_token: se } = await qn(
1012
+ let { customer_token: ie } = await qn(
1013
1013
  Oe
1014
1014
  );
1015
- if (se = "Bearer " + h.access_token, !se) {
1015
+ if (ie = "Bearer " + p.access_token, !ie) {
1016
1016
  console.error("Failed to get customer_token");
1017
1017
  return;
1018
1018
  }
1019
- const Nt = St + 300 * 1e3;
1020
- if (rr(se), localStorage.setItem(zt, Nt.toString()), console.log(oe, "basketIdFromCustomer"), oe) {
1021
- const Ct = await Hn({
1022
- basketId: oe,
1023
- customer_token: se
1019
+ const St = kt + 300 * 1e3;
1020
+ if (er(ie), localStorage.setItem(Lt, St.toString()), console.log(ae, "basketIdFromCustomer"), ae) {
1021
+ const Nt = await Hn({
1022
+ basketId: ae,
1023
+ customer_token: ie
1024
1024
  });
1025
- if (Ct.status === 200 && Ct) {
1026
- const _t = await yr(
1027
- oe,
1028
- Z,
1029
- se
1025
+ if (Nt.status === 200 && Nt) {
1026
+ const Ct = await gr(
1027
+ ae,
1028
+ ee,
1029
+ ie
1030
1030
  );
1031
- ((R = _t == null ? void 0 : _t.product_items) == null ? void 0 : R.length) > 0 && (Be.success("Added to cart", {
1031
+ ((R = Ct == null ? void 0 : Ct.product_items) == null ? void 0 : R.length) > 0 && (Be.success("Added to cart", {
1032
1032
  position: "bottom-right",
1033
1033
  autoClose: 3e3,
1034
1034
  hideProgressBar: !1,
1035
1035
  closeOnClick: !0,
1036
1036
  pauseOnHover: !0,
1037
1037
  draggable: !0
1038
- }), tr(oe), J(!1));
1038
+ }), Zt(ae), J(!1));
1039
1039
  return;
1040
1040
  }
1041
1041
  }
1042
1042
  const Ce = {
1043
1043
  productItems: [
1044
1044
  {
1045
- productId: ((ne = _.variants) == null ? void 0 : ne[0].product_id) || (($e = _.variants) == null ? void 0 : $e[0].productId) || (_ == null ? void 0 : _.id),
1045
+ productId: ((oe = _.variants) == null ? void 0 : oe[0].product_id) || (($e = _.variants) == null ? void 0 : $e[0].productId) || (_ == null ? void 0 : _.id),
1046
1046
  quantity: 1
1047
1047
  }
1048
1048
  ]
1049
- }, F = await Ir(se, Ce);
1049
+ }, F = await Cr(ie, Ce);
1050
1050
  if (console.log(
1051
1051
  F,
1052
1052
  F == null ? void 0 : F.basket_id,
@@ -1056,31 +1056,31 @@ const lt = (e) => {
1056
1056
  J(!1), console.error("Failed to create basket");
1057
1057
  return;
1058
1058
  }
1059
- lt(
1059
+ it(
1060
1060
  (F == null ? void 0 : F.basket_id) || (F == null ? void 0 : F.basketId)
1061
1061
  );
1062
- const ee = await r(
1062
+ const te = await r(
1063
1063
  {
1064
1064
  productId: i,
1065
1065
  quantity: O
1066
1066
  },
1067
1067
  (F == null ? void 0 : F.basket_id) || (F == null ? void 0 : F.basketId)
1068
1068
  );
1069
- (((Re = ee == null ? void 0 : ee.product_items) == null ? void 0 : Re.length) > 0 || ((G = ee == null ? void 0 : ee.productItems) == null ? void 0 : G.length) > 0) && Be.success("Added to cart", {
1069
+ (((Re = te == null ? void 0 : te.product_items) == null ? void 0 : Re.length) > 0 || ((G = te == null ? void 0 : te.productItems) == null ? void 0 : G.length) > 0) && Be.success("Added to cart", {
1070
1070
  position: "bottom-right",
1071
1071
  autoClose: 3e3,
1072
1072
  hideProgressBar: !1,
1073
1073
  closeOnClick: !0,
1074
1074
  pauseOnHover: !0,
1075
1075
  draggable: !0
1076
- }), tr(F.basket_id || (F == null ? void 0 : F.basketId));
1076
+ }), Zt(F.basket_id || (F == null ? void 0 : F.basketId));
1077
1077
  }
1078
1078
  } catch (_) {
1079
1079
  J(!1), console.error("Error adding to cart:", _), Be.error("Failed to add product to cart", {
1080
1080
  position: "bottom-right",
1081
1081
  autoClose: 3e3
1082
- }), ((me = _ == null ? void 0 : _.response) == null ? void 0 : me.status) === 404 || // Basket not found
1083
- ((Ne = _ == null ? void 0 : _.response) == null ? void 0 : Ne.status) === 401 ? (((pe = _ == null ? void 0 : _.response) == null ? void 0 : pe.status) === 404 && lt(null), ((he = _ == null ? void 0 : _.response) == null ? void 0 : he.status) === 401 && (lt(null), rr(null))) : (console.error("Failed to add product to basket:", _.message), Be.error("Failed to add product to cart", {
1082
+ }), ((he = _ == null ? void 0 : _.response) == null ? void 0 : he.status) === 404 || // Basket not found
1083
+ ((Ne = _ == null ? void 0 : _.response) == null ? void 0 : Ne.status) === 401 ? (((pe = _ == null ? void 0 : _.response) == null ? void 0 : pe.status) === 404 && it(null), ((X = _ == null ? void 0 : _.response) == null ? void 0 : X.status) === 401 && (it(null), er(null))) : (console.error("Failed to add product to basket:", _.message), Be.error("Failed to add product to cart", {
1084
1084
  position: "bottom-right",
1085
1085
  autoClose: 3e3
1086
1086
  }));
@@ -1088,8 +1088,8 @@ const lt = (e) => {
1088
1088
  J(!1);
1089
1089
  };
1090
1090
  return xe(() => {
1091
- A ? setTimeout(() => S(!0), 10) : S(!1);
1092
- }, [A]), /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ d(ra, { open: y, onOpenChange: x, children: [
1091
+ T ? setTimeout(() => S(!0), 10) : S(!1);
1092
+ }, [T]), /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ d(ra, { open: y, onOpenChange: x, children: [
1093
1093
  /* @__PURE__ */ a(
1094
1094
  na,
1095
1095
  {
@@ -1153,7 +1153,7 @@ const lt = (e) => {
1153
1153
  ) })
1154
1154
  }
1155
1155
  ),
1156
- A && /* @__PURE__ */ d(ke, { children: [
1156
+ T && /* @__PURE__ */ d(ke, { children: [
1157
1157
  /* @__PURE__ */ a(
1158
1158
  "div",
1159
1159
  {
@@ -1311,38 +1311,38 @@ const lt = (e) => {
1311
1311
  className: "mx-3 p-3 rounded-2xl bg-[#FFFFFF]",
1312
1312
  children: [
1313
1313
  /* @__PURE__ */ a("div", { className: "flex gap-2 bg-[#FFFFFF]", children: /* @__PURE__ */ a("p", { className: "font-bold font-nunitoSans text-[#494949]", children: "Is this for you or someone else?" }) }),
1314
- /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-2", children: n.map((p) => /* @__PURE__ */ a(
1314
+ /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-2", children: n.map((h) => /* @__PURE__ */ a(
1315
1315
  "button",
1316
1316
  {
1317
- onClick: () => rt(p),
1317
+ onClick: () => rt(h),
1318
1318
  className: "px-2 py-2 font-semibold text-xs text-[#18181B] bg-[#F3F3F3] rounded-2xl",
1319
1319
  style: {
1320
- backgroundColor: ye === o[p] ? "#FFFFFF" : "#F3F3F3",
1321
- borderColor: ye === o[p] ? "#BBB3DD" : ""
1320
+ backgroundColor: ye === o[h] ? "#FFFFFF" : "#F3F3F3",
1321
+ borderColor: ye === o[h] ? "#BBB3DD" : ""
1322
1322
  },
1323
- children: p
1323
+ children: h
1324
1324
  },
1325
- p
1325
+ h
1326
1326
  )) })
1327
1327
  ]
1328
1328
  }
1329
1329
  ),
1330
- N.map((p, O) => {
1330
+ N.map((h, O) => {
1331
1331
  var B, Q;
1332
1332
  return /* @__PURE__ */ d("div", { children: [
1333
1333
  /* @__PURE__ */ a(
1334
1334
  "div",
1335
1335
  {
1336
1336
  className: "flex justify-end",
1337
- children: /* @__PURE__ */ a("p", { className: "text-sm 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: p.query })
1337
+ children: /* @__PURE__ */ a("p", { className: "text-sm 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: h.query })
1338
1338
  }
1339
1339
  ),
1340
- p.response && p.response.includes("Thinking") ? /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
1340
+ h.response && h.response.includes("Thinking") ? /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
1341
1341
  "div",
1342
1342
  {
1343
1343
  className: "font-nunitoSans animate-pulse font-bold text-sm text-[#494949] bg-[#FFFFFF] px-7 py-1 rounded-r-xl rounded-bl-2xl w-full",
1344
1344
  dangerouslySetInnerHTML: {
1345
- __html: lr(p.response)
1345
+ __html: sr(h.response)
1346
1346
  }
1347
1347
  }
1348
1348
  ) }) : /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
@@ -1350,19 +1350,19 @@ const lt = (e) => {
1350
1350
  {
1351
1351
  className: "font-nunitoSans font-bold text-sm text-[#494949] bg-[#FFFFFF] px-7 py-1 rounded-r-xl rounded-bl-2xl w-full",
1352
1352
  dangerouslySetInnerHTML: {
1353
- __html: lr(p.response)
1353
+ __html: sr(h.response)
1354
1354
  }
1355
1355
  }
1356
1356
  ) }),
1357
- _e && !p.response.includes("Thinking") && ((B = p.products) == null ? void 0 : B.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" }) }),
1358
- (p == null ? void 0 : p.products) && ((Q = p == null ? void 0 : p.products) == null ? void 0 : Q.length) > 0 && /* @__PURE__ */ a(
1357
+ _e && !h.response.includes("Thinking") && ((B = h.products) == null ? void 0 : B.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" }) }),
1358
+ (h == null ? void 0 : h.products) && ((Q = h == null ? void 0 : h.products) == null ? void 0 : Q.length) > 0 && /* @__PURE__ */ a(
1359
1359
  da,
1360
1360
  {
1361
- chat: p.products,
1361
+ chat: h.products,
1362
1362
  storeDetails: $
1363
1363
  }
1364
1364
  ),
1365
- (p == null ? void 0 : p.potentialQuestions.length) > 0 && /* @__PURE__ */ d("div", { className: "my-2 px-4 text-sm text-gray-700", children: [
1365
+ (h == null ? void 0 : h.potentialQuestions.length) > 0 && /* @__PURE__ */ d("div", { className: "my-2 px-4 text-sm text-gray-700", children: [
1366
1366
  /* @__PURE__ */ a(
1367
1367
  "p",
1368
1368
  {
@@ -1371,7 +1371,7 @@ const lt = (e) => {
1371
1371
  children: "Why not explore these inquiries..."
1372
1372
  }
1373
1373
  ),
1374
- p.potentialQuestions.split(",").map((U, L) => /* @__PURE__ */ a(
1374
+ h.potentialQuestions.split(",").map((U, L) => /* @__PURE__ */ a(
1375
1375
  "button",
1376
1376
  {
1377
1377
  className: `cursor-pointer font-nunitoSans font-semibold text-[#232323] border bg-[#804C9E0D] border-${$.themeDarkColor} m-1 rounded-xl px-2 py-1`,
@@ -1384,7 +1384,7 @@ const lt = (e) => {
1384
1384
  L
1385
1385
  ))
1386
1386
  ] }),
1387
- (p == null ? void 0 : p.secondaryLoading) && /* @__PURE__ */ a("div", { className: "mt-3 mb-4 px-4", children: /* @__PURE__ */ d(
1387
+ (h == null ? void 0 : h.secondaryLoading) && /* @__PURE__ */ a("div", { className: "mt-3 mb-4 px-4", children: /* @__PURE__ */ d(
1388
1388
  "div",
1389
1389
  {
1390
1390
  className: "tanya-surprise-wrapper bg-indigo-300 text-sm px-7 py-4 rounded-r-xl rounded-bl-2xl w-full relative overflow-hidden",
@@ -1417,7 +1417,7 @@ const lt = (e) => {
1417
1417
  ]
1418
1418
  }
1419
1419
  ) }),
1420
- (p == null ? void 0 : p.secondaryResponse) && /* @__PURE__ */ a(ke, { children: /* @__PURE__ */ d("div", { className: "mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]", children: [
1420
+ (h == null ? void 0 : h.secondaryResponse) && /* @__PURE__ */ a(ke, { children: /* @__PURE__ */ d("div", { className: "mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]", children: [
1421
1421
  /* @__PURE__ */ a(
1422
1422
  "div",
1423
1423
  {
@@ -1426,13 +1426,13 @@ const lt = (e) => {
1426
1426
  backgroundColor: $.tanyaThemeColorLight
1427
1427
  },
1428
1428
  dangerouslySetInnerHTML: {
1429
- __html: lr(
1430
- p.secondaryResponse
1429
+ __html: sr(
1430
+ h.secondaryResponse
1431
1431
  )
1432
1432
  }
1433
1433
  }
1434
1434
  ),
1435
- p.productSnapshot && // chat.productSnapshot.points > 0 &&
1435
+ h.productSnapshot && // chat.productSnapshot.points > 0 &&
1436
1436
  /* @__PURE__ */ a("div", { className: "mt-4 w-full", children: /* @__PURE__ */ d(
1437
1437
  "div",
1438
1438
  {
@@ -1450,11 +1450,11 @@ const lt = (e) => {
1450
1450
  height: 112,
1451
1451
  borderColor: "#eee"
1452
1452
  },
1453
- children: p.productSnapshot.image ? /* @__PURE__ */ a(
1453
+ children: h.productSnapshot.image ? /* @__PURE__ */ a(
1454
1454
  "img",
1455
1455
  {
1456
- src: p.productSnapshot.image,
1457
- alt: p.productSnapshot.name,
1456
+ src: h.productSnapshot.image,
1457
+ alt: h.productSnapshot.name,
1458
1458
  className: "w-full h-full object-cover"
1459
1459
  }
1460
1460
  ) : /* @__PURE__ */ a("div", { className: "w-full h-full flex items-center justify-center text-xs text-gray-500", children: "No Image" })
@@ -1462,18 +1462,18 @@ const lt = (e) => {
1462
1462
  ),
1463
1463
  /* @__PURE__ */ d("div", { className: "flex flex-col flex-1 justify-between", children: [
1464
1464
  /* @__PURE__ */ d("div", { children: [
1465
- /* @__PURE__ */ a("p", { className: "font-semibold text-[15px] leading-snug", children: p.productSnapshot.name }),
1466
- /* @__PURE__ */ a("p", { className: "mt-1 text-[14px] font-medium", children: p.productSnapshot.price != null ? new Intl.NumberFormat(void 0, {
1465
+ /* @__PURE__ */ a("p", { className: "font-semibold text-[15px] leading-snug", children: h.productSnapshot.name }),
1466
+ /* @__PURE__ */ a("p", { className: "mt-1 text-[14px] font-medium", children: h.productSnapshot.price != null ? new Intl.NumberFormat(void 0, {
1467
1467
  style: "currency",
1468
1468
  currency: ($ == null ? void 0 : $.currency) || "USD"
1469
1469
  }).format(
1470
- p.productSnapshot.price
1470
+ h.productSnapshot.price
1471
1471
  ) : "" }),
1472
- p.productSnapshot.points > 0 && /* @__PURE__ */ d("p", { className: "mt-1 text-xs opacity-80", children: [
1472
+ h.productSnapshot.points > 0 && /* @__PURE__ */ d("p", { className: "mt-1 text-xs opacity-80", children: [
1473
1473
  "You will earn",
1474
1474
  " ",
1475
1475
  /* @__PURE__ */ d("strong", { children: [
1476
- p.productSnapshot.points,
1476
+ h.productSnapshot.points,
1477
1477
  " ",
1478
1478
  "points"
1479
1479
  ] })
@@ -1506,7 +1506,7 @@ const lt = (e) => {
1506
1506
  children: "−"
1507
1507
  }
1508
1508
  ),
1509
- /* @__PURE__ */ a("div", { className: "px-3 py-1 text-sm select-none", children: p.productSnapshot.quantity }),
1509
+ /* @__PURE__ */ a("div", { className: "px-3 py-1 text-sm select-none", children: h.productSnapshot.quantity }),
1510
1510
  /* @__PURE__ */ a(
1511
1511
  "button",
1512
1512
  {
@@ -1534,11 +1534,11 @@ const lt = (e) => {
1534
1534
  "button",
1535
1535
  {
1536
1536
  onClick: () => {
1537
- kt(
1538
- ct(
1539
- p.productSnapshot
1537
+ vt(
1538
+ lt(
1539
+ h.productSnapshot
1540
1540
  ),
1541
- p.productSnapshot.quantity
1541
+ h.productSnapshot.quantity
1542
1542
  );
1543
1543
  },
1544
1544
  disabled: P,
@@ -1578,9 +1578,9 @@ const lt = (e) => {
1578
1578
  placeholder: "How can I help you...",
1579
1579
  value: K,
1580
1580
  autoFocus: !0,
1581
- onChange: (p) => te(p.target.value),
1582
- onKeyDown: (p) => {
1583
- p.key === "Enter" && !q && Se();
1581
+ onChange: (h) => re(h.target.value),
1582
+ onKeyDown: (h) => {
1583
+ h.key === "Enter" && !q && Se();
1584
1584
  }
1585
1585
  }
1586
1586
  ),
@@ -1633,17 +1633,17 @@ const lt = (e) => {
1633
1633
  ] })
1634
1634
  ] }) });
1635
1635
  };
1636
- var xr = function(e, t) {
1637
- return xr = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
1636
+ var wr = function(e, t) {
1637
+ return wr = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
1638
1638
  r.__proto__ = n;
1639
1639
  } || function(r, n) {
1640
1640
  for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (r[o] = n[o]);
1641
- }, xr(e, t);
1641
+ }, wr(e, t);
1642
1642
  };
1643
- function ha(e, t) {
1643
+ function pa(e, t) {
1644
1644
  if (typeof t != "function" && t !== null)
1645
1645
  throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
1646
- xr(e, t);
1646
+ wr(e, t);
1647
1647
  function r() {
1648
1648
  this.constructor = e;
1649
1649
  }
@@ -1666,26 +1666,26 @@ function ga(e, t) {
1666
1666
  t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
1667
1667
  return r;
1668
1668
  }
1669
- var cr = "Invariant Violation", ln = Object.setPrototypeOf, wa = ln === void 0 ? function(e, t) {
1669
+ var ir = "Invariant Violation", sn = Object.setPrototypeOf, wa = sn === void 0 ? function(e, t) {
1670
1670
  return e.__proto__ = t, e;
1671
- } : ln, Vn = (
1671
+ } : sn, Vn = (
1672
1672
  /** @class */
1673
1673
  (function(e) {
1674
- ha(t, e);
1674
+ pa(t, e);
1675
1675
  function t(r) {
1676
- r === void 0 && (r = cr);
1677
- var n = e.call(this, typeof r == "number" ? cr + ": " + r + " (see https://github.com/apollographql/invariant-packages)" : r) || this;
1678
- return n.framesToPop = 1, n.name = cr, wa(n, t.prototype), n;
1676
+ r === void 0 && (r = ir);
1677
+ var n = e.call(this, typeof r == "number" ? ir + ": " + r + " (see https://github.com/apollographql/invariant-packages)" : r) || this;
1678
+ return n.framesToPop = 1, n.name = ir, wa(n, t.prototype), n;
1679
1679
  }
1680
1680
  return t;
1681
1681
  })(Error)
1682
1682
  );
1683
- function it(e, t) {
1683
+ function st(e, t) {
1684
1684
  if (!e)
1685
1685
  throw new Vn(t);
1686
1686
  }
1687
1687
  var Yn = ["debug", "log", "warn", "error", "silent"], ya = Yn.indexOf("log");
1688
- function Yt(e) {
1688
+ function Ht(e) {
1689
1689
  return function() {
1690
1690
  if (Yn.indexOf(e) >= ya) {
1691
1691
  var t = console[e] || console.log;
@@ -1694,22 +1694,22 @@ function Yt(e) {
1694
1694
  };
1695
1695
  }
1696
1696
  (function(e) {
1697
- e.debug = Yt("debug"), e.log = Yt("log"), e.warn = Yt("warn"), e.error = Yt("error");
1698
- })(it || (it = {}));
1697
+ e.debug = Ht("debug"), e.log = Ht("log"), e.warn = Ht("warn"), e.error = Ht("error");
1698
+ })(st || (st = {}));
1699
1699
  var Jn = "3.14.0";
1700
- function pt(e) {
1700
+ function ht(e) {
1701
1701
  try {
1702
1702
  return e();
1703
1703
  } catch {
1704
1704
  }
1705
1705
  }
1706
- const br = pt(function() {
1706
+ const yr = ht(function() {
1707
1707
  return globalThis;
1708
- }) || pt(function() {
1708
+ }) || ht(function() {
1709
1709
  return window;
1710
- }) || pt(function() {
1710
+ }) || ht(function() {
1711
1711
  return self;
1712
- }) || pt(function() {
1712
+ }) || ht(function() {
1713
1713
  return global;
1714
1714
  }) || // We don't expect the Function constructor ever to be invoked at runtime, as
1715
1715
  // long as at least one of globalThis, window, self, or global is defined, so
@@ -1717,13 +1717,13 @@ const br = pt(function() {
1717
1717
  // detect syntactic usage of the Function constructor. If you think you can
1718
1718
  // improve your static analysis to detect this obfuscation, think again. This
1719
1719
  // is an arms race you cannot win, at least not in JavaScript.
1720
- pt(function() {
1721
- return pt.constructor("return this")();
1720
+ ht(function() {
1721
+ return ht.constructor("return this")();
1722
1722
  });
1723
- var cn = /* @__PURE__ */ new Map();
1723
+ var ln = /* @__PURE__ */ new Map();
1724
1724
  function xa(e) {
1725
- var t = cn.get(e) || 1;
1726
- return cn.set(e, t + 1), "".concat(e, ":").concat(t, ":").concat(Math.random().toString(36).slice(2));
1725
+ var t = ln.get(e) || 1;
1726
+ return ln.set(e, t + 1), "".concat(e, ":").concat(t, ":").concat(Math.random().toString(36).slice(2));
1727
1727
  }
1728
1728
  function ba(e, t) {
1729
1729
  var r = xa("stringifyForDisplay");
@@ -1731,33 +1731,33 @@ function ba(e, t) {
1731
1731
  return o === void 0 ? r : o;
1732
1732
  }, t).split(JSON.stringify(r)).join("<undefined>");
1733
1733
  }
1734
- function Jt(e) {
1734
+ function Vt(e) {
1735
1735
  return function(t) {
1736
1736
  for (var r = [], n = 1; n < arguments.length; n++)
1737
1737
  r[n - 1] = arguments[n];
1738
1738
  if (typeof t == "number") {
1739
1739
  var o = t;
1740
- t = Pr(o), t || (t = Fr(o, r), r = []);
1740
+ t = _r(o), t || (t = Ir(o, r), r = []);
1741
1741
  }
1742
1742
  e.apply(void 0, [t].concat(r));
1743
1743
  };
1744
1744
  }
1745
- var dr = Object.assign(function(t, r) {
1745
+ var lr = Object.assign(function(t, r) {
1746
1746
  for (var n = [], o = 2; o < arguments.length; o++)
1747
1747
  n[o - 2] = arguments[o];
1748
- t || it(t, Pr(r, n) || Fr(r, n));
1748
+ t || st(t, _r(r, n) || Ir(r, n));
1749
1749
  }, {
1750
- debug: Jt(it.debug),
1751
- log: Jt(it.log),
1752
- warn: Jt(it.warn),
1753
- error: Jt(it.error)
1750
+ debug: Vt(st.debug),
1751
+ log: Vt(st.log),
1752
+ warn: Vt(st.warn),
1753
+ error: Vt(st.error)
1754
1754
  });
1755
1755
  function Kn(e) {
1756
1756
  for (var t = [], r = 1; r < arguments.length; r++)
1757
1757
  t[r - 1] = arguments[r];
1758
- return new Vn(Pr(e, t) || Fr(e, t));
1758
+ return new Vn(_r(e, t) || Ir(e, t));
1759
1759
  }
1760
- var dn = Symbol.for("ApolloErrorMessageHandler_" + Jn);
1760
+ var cn = Symbol.for("ApolloErrorMessageHandler_" + Jn);
1761
1761
  function Wn(e) {
1762
1762
  if (typeof e == "string")
1763
1763
  return e;
@@ -1767,11 +1767,11 @@ function Wn(e) {
1767
1767
  return "<non-serializable>";
1768
1768
  }
1769
1769
  }
1770
- function Pr(e, t) {
1770
+ function _r(e, t) {
1771
1771
  if (t === void 0 && (t = []), !!e)
1772
- return br[dn] && br[dn](e, t.map(Wn));
1772
+ return yr[cn] && yr[cn](e, t.map(Wn));
1773
1773
  }
1774
- function Fr(e, t) {
1774
+ function Ir(e, t) {
1775
1775
  if (t === void 0 && (t = []), !!e)
1776
1776
  return "An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({
1777
1777
  version: Jn,
@@ -1786,8 +1786,8 @@ function va(e) {
1786
1786
  return t.name.value;
1787
1787
  })[0] || null;
1788
1788
  }
1789
- let le = null;
1790
- const un = {};
1789
+ let ce = null;
1790
+ const dn = {};
1791
1791
  let ka = 1;
1792
1792
  const Sa = () => class {
1793
1793
  constructor() {
@@ -1799,78 +1799,78 @@ const Sa = () => class {
1799
1799
  ].join(":");
1800
1800
  }
1801
1801
  hasValue() {
1802
- for (let t = le; t; t = t.parent)
1802
+ for (let t = ce; t; t = t.parent)
1803
1803
  if (this.id in t.slots) {
1804
1804
  const r = t.slots[this.id];
1805
- if (r === un)
1805
+ if (r === dn)
1806
1806
  break;
1807
- return t !== le && (le.slots[this.id] = r), !0;
1807
+ return t !== ce && (ce.slots[this.id] = r), !0;
1808
1808
  }
1809
- return le && (le.slots[this.id] = un), !1;
1809
+ return ce && (ce.slots[this.id] = dn), !1;
1810
1810
  }
1811
1811
  getValue() {
1812
1812
  if (this.hasValue())
1813
- return le.slots[this.id];
1813
+ return ce.slots[this.id];
1814
1814
  }
1815
1815
  withValue(t, r, n, o) {
1816
1816
  const s = {
1817
1817
  __proto__: null,
1818
1818
  [this.id]: t
1819
- }, i = le;
1820
- le = { parent: i, slots: s };
1819
+ }, i = ce;
1820
+ ce = { parent: i, slots: s };
1821
1821
  try {
1822
1822
  return r.apply(o, n);
1823
1823
  } finally {
1824
- le = i;
1824
+ ce = i;
1825
1825
  }
1826
1826
  }
1827
1827
  // Capture the current context and wrap a callback function so that it
1828
1828
  // reestablishes the captured context when called.
1829
1829
  static bind(t) {
1830
- const r = le;
1830
+ const r = ce;
1831
1831
  return function() {
1832
- const n = le;
1832
+ const n = ce;
1833
1833
  try {
1834
- return le = r, t.apply(this, arguments);
1834
+ return ce = r, t.apply(this, arguments);
1835
1835
  } finally {
1836
- le = n;
1836
+ ce = n;
1837
1837
  }
1838
1838
  };
1839
1839
  }
1840
1840
  // Immediately run a callback function without any captured context.
1841
1841
  static noContext(t, r, n) {
1842
- if (le) {
1843
- const o = le;
1842
+ if (ce) {
1843
+ const o = ce;
1844
1844
  try {
1845
- return le = null, t.apply(n, r);
1845
+ return ce = null, t.apply(n, r);
1846
1846
  } finally {
1847
- le = o;
1847
+ ce = o;
1848
1848
  }
1849
1849
  } else
1850
1850
  return t.apply(n, r);
1851
1851
  }
1852
1852
  };
1853
- function fn(e) {
1853
+ function un(e) {
1854
1854
  try {
1855
1855
  return e();
1856
1856
  } catch {
1857
1857
  }
1858
1858
  }
1859
- const ur = "@wry/context:Slot", Na = (
1859
+ const cr = "@wry/context:Slot", Na = (
1860
1860
  // Prefer globalThis when available.
1861
1861
  // https://github.com/benjamn/wryware/issues/347
1862
- fn(() => globalThis) || // Fall back to global, which works in Node.js and may be converted by some
1862
+ un(() => globalThis) || // Fall back to global, which works in Node.js and may be converted by some
1863
1863
  // bundlers to the appropriate identifier (window, self, ...) depending on the
1864
1864
  // bundling target. https://github.com/endojs/endo/issues/576#issuecomment-1178515224
1865
- fn(() => global) || // Otherwise, use a dummy host that's local to this module. We used to fall
1865
+ un(() => global) || // Otherwise, use a dummy host that's local to this module. We used to fall
1866
1866
  // back to using the Array constructor as a namespace, but that was flagged in
1867
1867
  // https://github.com/benjamn/wryware/issues/347, and can be avoided.
1868
1868
  /* @__PURE__ */ Object.create(null)
1869
- ), mn = Na, Er = mn[ur] || // Earlier versions of this package stored the globalKey property on the Array
1869
+ ), fn = Na, Pr = fn[cr] || // Earlier versions of this package stored the globalKey property on the Array
1870
1870
  // constructor, so we check there as well, to prevent Slot class duplication.
1871
- Array[ur] || (function(e) {
1871
+ Array[cr] || (function(e) {
1872
1872
  try {
1873
- Object.defineProperty(mn, ur, {
1873
+ Object.defineProperty(fn, cr, {
1874
1874
  value: e,
1875
1875
  enumerable: !1,
1876
1876
  writable: !1,
@@ -1885,8 +1885,8 @@ Array[ur] || (function(e) {
1885
1885
  } finally {
1886
1886
  return e;
1887
1887
  }
1888
- })(Sa()), { bind: yi, noContext: xi } = Er;
1889
- new Er();
1888
+ })(Sa()), { bind: yi, noContext: xi } = Pr;
1889
+ new Pr();
1890
1890
  function Ca(e, t) {
1891
1891
  var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
1892
1892
  if (r) return (r = r.call(e)).next.bind(r);
@@ -1902,13 +1902,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1902
1902
  }
1903
1903
  function _a(e, t) {
1904
1904
  if (e) {
1905
- if (typeof e == "string") return pn(e, t);
1905
+ if (typeof e == "string") return mn(e, t);
1906
1906
  var r = Object.prototype.toString.call(e).slice(8, -1);
1907
1907
  if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
1908
- if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return pn(e, t);
1908
+ if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return mn(e, t);
1909
1909
  }
1910
1910
  }
1911
- function pn(e, t) {
1911
+ function mn(e, t) {
1912
1912
  (t == null || t > e.length) && (t = e.length);
1913
1913
  for (var r = 0, n = new Array(t); r < t; r++)
1914
1914
  n[r] = e[r];
@@ -1920,43 +1920,43 @@ function hn(e, t) {
1920
1920
  n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
1921
1921
  }
1922
1922
  }
1923
- function Tr(e, t, r) {
1923
+ function Fr(e, t, r) {
1924
1924
  return t && hn(e.prototype, t), r && hn(e, r), Object.defineProperty(e, "prototype", { writable: !1 }), e;
1925
1925
  }
1926
- var Ar = function() {
1926
+ var Er = function() {
1927
1927
  return typeof Symbol == "function";
1928
- }, Or = function(e) {
1929
- return Ar() && !!Symbol[e];
1930
- }, jr = function(e) {
1931
- return Or(e) ? Symbol[e] : "@@" + e;
1928
+ }, Tr = function(e) {
1929
+ return Er() && !!Symbol[e];
1930
+ }, Ar = function(e) {
1931
+ return Tr(e) ? Symbol[e] : "@@" + e;
1932
1932
  };
1933
- Ar() && !Or("observable") && (Symbol.observable = Symbol("observable"));
1934
- var Ia = jr("iterator"), vr = jr("observable"), Qn = jr("species");
1935
- function nr(e, t) {
1933
+ Er() && !Tr("observable") && (Symbol.observable = Symbol("observable"));
1934
+ var Ia = Ar("iterator"), xr = Ar("observable"), Qn = Ar("species");
1935
+ function tr(e, t) {
1936
1936
  var r = e[t];
1937
1937
  if (r != null) {
1938
1938
  if (typeof r != "function") throw new TypeError(r + " is not a function");
1939
1939
  return r;
1940
1940
  }
1941
1941
  }
1942
- function Tt(e) {
1942
+ function Et(e) {
1943
1943
  var t = e.constructor;
1944
1944
  return t !== void 0 && (t = t[Qn], t === null && (t = void 0)), t !== void 0 ? t : we;
1945
1945
  }
1946
1946
  function Pa(e) {
1947
1947
  return e instanceof we;
1948
1948
  }
1949
- function bt(e) {
1950
- bt.log ? bt.log(e) : setTimeout(function() {
1949
+ function xt(e) {
1950
+ xt.log ? xt.log(e) : setTimeout(function() {
1951
1951
  throw e;
1952
1952
  });
1953
1953
  }
1954
- function Wt(e) {
1954
+ function Jt(e) {
1955
1955
  Promise.resolve().then(function() {
1956
1956
  try {
1957
1957
  e();
1958
1958
  } catch (t) {
1959
- bt(t);
1959
+ xt(t);
1960
1960
  }
1961
1961
  });
1962
1962
  }
@@ -1967,14 +1967,14 @@ function Gn(e) {
1967
1967
  if (typeof t == "function")
1968
1968
  t();
1969
1969
  else {
1970
- var r = nr(t, "unsubscribe");
1970
+ var r = tr(t, "unsubscribe");
1971
1971
  r && r.call(t);
1972
1972
  }
1973
1973
  } catch (n) {
1974
- bt(n);
1974
+ xt(n);
1975
1975
  }
1976
1976
  }
1977
- function kr(e) {
1977
+ function br(e) {
1978
1978
  e._observer = void 0, e._queue = void 0, e._state = "closed";
1979
1979
  }
1980
1980
  function Fa(e) {
@@ -1989,25 +1989,25 @@ function Xn(e, t, r) {
1989
1989
  e._state = "running";
1990
1990
  var n = e._observer;
1991
1991
  try {
1992
- var o = nr(n, t);
1992
+ var o = tr(n, t);
1993
1993
  switch (t) {
1994
1994
  case "next":
1995
1995
  o && o.call(n, r);
1996
1996
  break;
1997
1997
  case "error":
1998
- if (kr(e), o) o.call(n, r);
1998
+ if (br(e), o) o.call(n, r);
1999
1999
  else throw r;
2000
2000
  break;
2001
2001
  case "complete":
2002
- kr(e), o && o.call(n);
2002
+ br(e), o && o.call(n);
2003
2003
  break;
2004
2004
  }
2005
2005
  } catch (s) {
2006
- bt(s);
2006
+ xt(s);
2007
2007
  }
2008
2008
  e._state === "closed" ? Gn(e) : e._state === "running" && (e._state = "ready");
2009
2009
  }
2010
- function fr(e, t, r) {
2010
+ function dr(e, t, r) {
2011
2011
  if (e._state !== "closed") {
2012
2012
  if (e._state === "buffering") {
2013
2013
  e._queue.push({
@@ -2020,7 +2020,7 @@ function fr(e, t, r) {
2020
2020
  e._state = "buffering", e._queue = [{
2021
2021
  type: t,
2022
2022
  value: r
2023
- }], Wt(function() {
2023
+ }], Jt(function() {
2024
2024
  return Fa(e);
2025
2025
  });
2026
2026
  return;
@@ -2041,8 +2041,8 @@ var Ea = /* @__PURE__ */ (function() {
2041
2041
  }
2042
2042
  var t = e.prototype;
2043
2043
  return t.unsubscribe = function() {
2044
- this._state !== "closed" && (kr(this), Gn(this));
2045
- }, Tr(e, [{
2044
+ this._state !== "closed" && (br(this), Gn(this));
2045
+ }, Fr(e, [{
2046
2046
  key: "closed",
2047
2047
  get: function() {
2048
2048
  return this._state === "closed";
@@ -2054,12 +2054,12 @@ var Ea = /* @__PURE__ */ (function() {
2054
2054
  }
2055
2055
  var t = e.prototype;
2056
2056
  return t.next = function(n) {
2057
- fr(this._subscription, "next", n);
2057
+ dr(this._subscription, "next", n);
2058
2058
  }, t.error = function(n) {
2059
- fr(this._subscription, "error", n);
2059
+ dr(this._subscription, "error", n);
2060
2060
  }, t.complete = function() {
2061
- fr(this._subscription, "complete");
2062
- }, Tr(e, [{
2061
+ dr(this._subscription, "complete");
2062
+ }, Fr(e, [{
2063
2063
  key: "closed",
2064
2064
  get: function() {
2065
2065
  return this._subscription._state === "closed";
@@ -2089,9 +2089,9 @@ var Ea = /* @__PURE__ */ (function() {
2089
2089
  l.unsubscribe(), s();
2090
2090
  }
2091
2091
  var l = o.subscribe({
2092
- next: function(h) {
2092
+ next: function(p) {
2093
2093
  try {
2094
- n(h, c);
2094
+ n(p, c);
2095
2095
  } catch (g) {
2096
2096
  i(g), l.unsubscribe();
2097
2097
  }
@@ -2103,7 +2103,7 @@ var Ea = /* @__PURE__ */ (function() {
2103
2103
  }, t.map = function(n) {
2104
2104
  var o = this;
2105
2105
  if (typeof n != "function") throw new TypeError(n + " is not a function");
2106
- var s = Tt(this);
2106
+ var s = Et(this);
2107
2107
  return new s(function(i) {
2108
2108
  return o.subscribe({
2109
2109
  next: function(c) {
@@ -2125,7 +2125,7 @@ var Ea = /* @__PURE__ */ (function() {
2125
2125
  }, t.filter = function(n) {
2126
2126
  var o = this;
2127
2127
  if (typeof n != "function") throw new TypeError(n + " is not a function");
2128
- var s = Tt(this);
2128
+ var s = Et(this);
2129
2129
  return new s(function(i) {
2130
2130
  return o.subscribe({
2131
2131
  next: function(c) {
@@ -2147,37 +2147,37 @@ var Ea = /* @__PURE__ */ (function() {
2147
2147
  }, t.reduce = function(n) {
2148
2148
  var o = this;
2149
2149
  if (typeof n != "function") throw new TypeError(n + " is not a function");
2150
- var s = Tt(this), i = arguments.length > 1, c = !1, l = arguments[1], h = l;
2150
+ var s = Et(this), i = arguments.length > 1, c = !1, l = arguments[1], p = l;
2151
2151
  return new s(function(g) {
2152
2152
  return o.subscribe({
2153
2153
  next: function(y) {
2154
2154
  var x = !c;
2155
2155
  if (c = !0, !x || i)
2156
2156
  try {
2157
- h = n(h, y);
2157
+ p = n(p, y);
2158
2158
  } catch (I) {
2159
2159
  return g.error(I);
2160
2160
  }
2161
2161
  else
2162
- h = y;
2162
+ p = y;
2163
2163
  },
2164
2164
  error: function(y) {
2165
2165
  g.error(y);
2166
2166
  },
2167
2167
  complete: function() {
2168
2168
  if (!c && !i) return g.error(new TypeError("Cannot reduce an empty sequence"));
2169
- g.next(h), g.complete();
2169
+ g.next(p), g.complete();
2170
2170
  }
2171
2171
  });
2172
2172
  });
2173
2173
  }, t.concat = function() {
2174
2174
  for (var n = this, o = arguments.length, s = new Array(o), i = 0; i < o; i++)
2175
2175
  s[i] = arguments[i];
2176
- var c = Tt(this);
2176
+ var c = Et(this);
2177
2177
  return new c(function(l) {
2178
- var h, g = 0;
2178
+ var p, g = 0;
2179
2179
  function y(x) {
2180
- h = x.subscribe({
2180
+ p = x.subscribe({
2181
2181
  next: function(I) {
2182
2182
  l.next(I);
2183
2183
  },
@@ -2185,18 +2185,18 @@ var Ea = /* @__PURE__ */ (function() {
2185
2185
  l.error(I);
2186
2186
  },
2187
2187
  complete: function() {
2188
- g === s.length ? (h = void 0, l.complete()) : y(c.from(s[g++]));
2188
+ g === s.length ? (p = void 0, l.complete()) : y(c.from(s[g++]));
2189
2189
  }
2190
2190
  });
2191
2191
  }
2192
2192
  return y(n), function() {
2193
- h && (h.unsubscribe(), h = void 0);
2193
+ p && (p.unsubscribe(), p = void 0);
2194
2194
  };
2195
2195
  });
2196
2196
  }, t.flatMap = function(n) {
2197
2197
  var o = this;
2198
2198
  if (typeof n != "function") throw new TypeError(n + " is not a function");
2199
- var s = Tt(this);
2199
+ var s = Et(this);
2200
2200
  return new s(function(i) {
2201
2201
  var c = [], l = o.subscribe({
2202
2202
  next: function(g) {
@@ -2215,7 +2215,7 @@ var Ea = /* @__PURE__ */ (function() {
2215
2215
  },
2216
2216
  complete: function() {
2217
2217
  var x = c.indexOf(y);
2218
- x >= 0 && c.splice(x, 1), h();
2218
+ x >= 0 && c.splice(x, 1), p();
2219
2219
  }
2220
2220
  });
2221
2221
  c.push(y);
@@ -2224,10 +2224,10 @@ var Ea = /* @__PURE__ */ (function() {
2224
2224
  i.error(g);
2225
2225
  },
2226
2226
  complete: function() {
2227
- h();
2227
+ p();
2228
2228
  }
2229
2229
  });
2230
- function h() {
2230
+ function p() {
2231
2231
  l.closed && c.length === 0 && i.complete();
2232
2232
  }
2233
2233
  return function() {
@@ -2236,12 +2236,12 @@ var Ea = /* @__PURE__ */ (function() {
2236
2236
  }), l.unsubscribe();
2237
2237
  };
2238
2238
  });
2239
- }, t[vr] = function() {
2239
+ }, t[xr] = function() {
2240
2240
  return this;
2241
2241
  }, e.from = function(n) {
2242
2242
  var o = typeof this == "function" ? this : e;
2243
2243
  if (n == null) throw new TypeError(n + " is not an object");
2244
- var s = nr(n, vr);
2244
+ var s = tr(n, xr);
2245
2245
  if (s) {
2246
2246
  var i = s.call(n);
2247
2247
  if (Object(i) !== i) throw new TypeError(i + " is not an object");
@@ -2249,12 +2249,12 @@ var Ea = /* @__PURE__ */ (function() {
2249
2249
  return i.subscribe(c);
2250
2250
  });
2251
2251
  }
2252
- if (Or("iterator") && (s = nr(n, Ia), s))
2252
+ if (Tr("iterator") && (s = tr(n, Ia), s))
2253
2253
  return new o(function(c) {
2254
- Wt(function() {
2254
+ Jt(function() {
2255
2255
  if (!c.closed) {
2256
- for (var l = Ca(s.call(n)), h; !(h = l()).done; ) {
2257
- var g = h.value;
2256
+ for (var l = Ca(s.call(n)), p; !(p = l()).done; ) {
2257
+ var g = p.value;
2258
2258
  if (c.next(g), c.closed) return;
2259
2259
  }
2260
2260
  c.complete();
@@ -2263,7 +2263,7 @@ var Ea = /* @__PURE__ */ (function() {
2263
2263
  });
2264
2264
  if (Array.isArray(n))
2265
2265
  return new o(function(c) {
2266
- Wt(function() {
2266
+ Jt(function() {
2267
2267
  if (!c.closed) {
2268
2268
  for (var l = 0; l < n.length; ++l)
2269
2269
  if (c.next(n[l]), c.closed) return;
@@ -2277,7 +2277,7 @@ var Ea = /* @__PURE__ */ (function() {
2277
2277
  o[s] = arguments[s];
2278
2278
  var i = typeof this == "function" ? this : e;
2279
2279
  return new i(function(c) {
2280
- Wt(function() {
2280
+ Jt(function() {
2281
2281
  if (!c.closed) {
2282
2282
  for (var l = 0; l < o.length; ++l)
2283
2283
  if (c.next(o[l]), c.closed) return;
@@ -2285,17 +2285,17 @@ var Ea = /* @__PURE__ */ (function() {
2285
2285
  }
2286
2286
  });
2287
2287
  });
2288
- }, Tr(e, null, [{
2288
+ }, Fr(e, null, [{
2289
2289
  key: Qn,
2290
2290
  get: function() {
2291
2291
  return this;
2292
2292
  }
2293
2293
  }]), e;
2294
2294
  })();
2295
- Ar() && Object.defineProperty(we, Symbol("extensions"), {
2295
+ Er() && Object.defineProperty(we, Symbol("extensions"), {
2296
2296
  value: {
2297
- symbol: vr,
2298
- hostReportError: bt
2297
+ symbol: xr,
2298
+ hostReportError: xt
2299
2299
  },
2300
2300
  configurable: !0
2301
2301
  });
@@ -2315,11 +2315,11 @@ function Aa(e) {
2315
2315
  t = "@@observable";
2316
2316
  return t;
2317
2317
  }
2318
- var yt;
2319
- typeof self < "u" ? yt = self : typeof window < "u" ? yt = window : typeof global < "u" ? yt = global : typeof module < "u" ? yt = module : yt = Function("return this")();
2320
- Aa(yt);
2321
- var gn = we.prototype, wn = "@@observable";
2322
- gn[wn] || (gn[wn] = function() {
2318
+ var wt;
2319
+ typeof self < "u" ? wt = self : typeof window < "u" ? wt = window : typeof global < "u" ? wt = global : typeof module < "u" ? wt = module : wt = Function("return this")();
2320
+ Aa(wt);
2321
+ var pn = we.prototype, gn = "@@observable";
2322
+ pn[gn] || (pn[gn] = function() {
2323
2323
  return this;
2324
2324
  });
2325
2325
  function Oa(e) {
@@ -2359,20 +2359,20 @@ function $a(e) {
2359
2359
  };
2360
2360
  return t.operationName || (t.operationName = typeof t.query != "string" ? va(t.query) || void 0 : ""), t;
2361
2361
  }
2362
- var La = Symbol.for("apollo.deprecations"), za = br, Da = new Er();
2362
+ var La = Symbol.for("apollo.deprecations"), za = yr, Da = new Pr();
2363
2363
  function Ma(e) {
2364
2364
  return za[La] || (Da.getValue() || []).includes(e);
2365
2365
  }
2366
2366
  function Ba(e, t) {
2367
2367
  Ma(e) || t();
2368
2368
  }
2369
- function yn(e, t) {
2369
+ function wn(e, t) {
2370
2370
  return t ? t(e) : we.of();
2371
2371
  }
2372
- function At(e) {
2372
+ function Tt(e) {
2373
2373
  return typeof e == "function" ? new Zn(e) : e;
2374
2374
  }
2375
- function Kt(e) {
2375
+ function Yt(e) {
2376
2376
  return e.request.length <= 1;
2377
2377
  }
2378
2378
  var Zn = (
@@ -2386,12 +2386,12 @@ var Zn = (
2386
2386
  return we.of();
2387
2387
  });
2388
2388
  }, e.from = function(t) {
2389
- return t.length === 0 ? e.empty() : t.map(At).reduce(function(r, n) {
2389
+ return t.length === 0 ? e.empty() : t.map(Tt).reduce(function(r, n) {
2390
2390
  return r.concat(n);
2391
2391
  });
2392
2392
  }, e.split = function(t, r, n) {
2393
- var o = At(r), s = At(n || new e(yn)), i;
2394
- return Kt(o) && Kt(s) ? i = new e(function(c) {
2393
+ var o = Tt(r), s = Tt(n || new e(wn)), i;
2394
+ return Yt(o) && Yt(s) ? i = new e(function(c) {
2395
2395
  return t(c) ? o.request(c) || we.of() : s.request(c) || we.of();
2396
2396
  }) : i = new e(function(c, l) {
2397
2397
  return t(c) ? o.request(c, l) || we.of() : s.request(c, l) || we.of();
@@ -2399,11 +2399,11 @@ var Zn = (
2399
2399
  }, e.execute = function(t, r) {
2400
2400
  return t.request(ja(r.context, $a(Oa(r)))) || we.of();
2401
2401
  }, e.concat = function(t, r) {
2402
- var n = At(t);
2403
- if (Kt(n))
2404
- return globalThis.__DEV__ !== !1 && dr.warn(47, n), n;
2405
- var o = At(r), s;
2406
- return Kt(o) ? s = new e(function(i) {
2402
+ var n = Tt(t);
2403
+ if (Yt(n))
2404
+ return globalThis.__DEV__ !== !1 && lr.warn(47, n), n;
2405
+ var o = Tt(r), s;
2406
+ return Yt(o) ? s = new e(function(i) {
2407
2407
  return n.request(i, function(c) {
2408
2408
  return o.request(c) || we.of();
2409
2409
  }) || we.of();
@@ -2413,19 +2413,19 @@ var Zn = (
2413
2413
  }) || we.of();
2414
2414
  }), Object.assign(s, { left: n, right: o });
2415
2415
  }, e.prototype.split = function(t, r, n) {
2416
- return this.concat(e.split(t, r, n || new e(yn)));
2416
+ return this.concat(e.split(t, r, n || new e(wn)));
2417
2417
  }, e.prototype.concat = function(t) {
2418
2418
  return e.concat(this, t);
2419
2419
  }, e.prototype.request = function(t, r) {
2420
2420
  throw Kn(48);
2421
2421
  }, e.prototype.onError = function(t, r) {
2422
2422
  if (globalThis.__DEV__ !== !1 && Ba("onError", function() {
2423
- globalThis.__DEV__ !== !1 && dr.warn(49);
2423
+ globalThis.__DEV__ !== !1 && lr.warn(49);
2424
2424
  }), r && r.error)
2425
2425
  return r.error(t), !1;
2426
2426
  throw t;
2427
2427
  }, e.prototype.setOnError = function(t) {
2428
- return globalThis.__DEV__ !== !1 && globalThis.__DEV__ !== !1 && dr.warn(50), this.onError = t, this;
2428
+ return globalThis.__DEV__ !== !1 && globalThis.__DEV__ !== !1 && lr.warn(50), this.onError = t, this;
2429
2429
  }, e;
2430
2430
  })()
2431
2431
  );
@@ -2451,7 +2451,7 @@ function Ua(e) {
2451
2451
  const qa = async () => {
2452
2452
  const e = "https://auth.australia-southeast1.gcp.commercetools.com/oauth/token", n = "Basic " + btoa(encodeURIComponent("tfegsSBVOYnR7e_yE-AjxVVN") + ":" + encodeURIComponent("pyKWgHuTxuMwDygh9JH1ehLEaLvAhBo4"));
2453
2453
  try {
2454
- const o = await de.post(
2454
+ const o = await ue.post(
2455
2455
  e,
2456
2456
  new URLSearchParams({ grant_type: "client_credentials" }),
2457
2457
  // Only grant_type in body
@@ -2464,7 +2464,7 @@ const qa = async () => {
2464
2464
  );
2465
2465
  return o.status === 200 && o.data.access_token ? o.data.access_token : (console.error("Failed to fetch token:", o.data), null);
2466
2466
  } catch (o) {
2467
- return de.isAxiosError(o) ? console.error("Error fetching token:", o.response || o.message) : console.error("Unexpected error:", o), null;
2467
+ return ue.isAxiosError(o) ? console.error("Error fetching token:", o.response || o.message) : console.error("Unexpected error:", o), null;
2468
2468
  }
2469
2469
  }, Ra = "https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql", Ha = Uo({
2470
2470
  uri: `${Ra}`
@@ -2486,7 +2486,7 @@ const qa = async () => {
2486
2486
  }
2487
2487
  }), bi = (e) => {
2488
2488
  const { tanyaConfig: t } = e;
2489
- return /* @__PURE__ */ a(Ho, { client: Ya, children: /* @__PURE__ */ a(ta, { children: /* @__PURE__ */ a(pa, { tanyaConfig: t }) }) });
2489
+ return /* @__PURE__ */ a(Ho, { client: Ya, children: /* @__PURE__ */ a(ta, { children: /* @__PURE__ */ a(ha, { tanyaConfig: t }) }) });
2490
2490
  };
2491
2491
  function Ja(e, t) {
2492
2492
  const r = e.icons, n = e.aliases || /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ Object.create(null);
@@ -2506,15 +2506,15 @@ const eo = Object.freeze({
2506
2506
  top: 0,
2507
2507
  width: 16,
2508
2508
  height: 16
2509
- }), or = Object.freeze({
2509
+ }), rr = Object.freeze({
2510
2510
  rotate: 0,
2511
2511
  vFlip: !1,
2512
2512
  hFlip: !1
2513
- }), $r = Object.freeze({
2513
+ }), Or = Object.freeze({
2514
2514
  ...eo,
2515
- ...or
2516
- }), Sr = Object.freeze({
2517
- ...$r,
2515
+ ...rr
2516
+ }), vr = Object.freeze({
2517
+ ...Or,
2518
2518
  body: "",
2519
2519
  hidden: !1
2520
2520
  });
@@ -2524,18 +2524,18 @@ function Ka(e, t) {
2524
2524
  const n = ((e.rotate || 0) + (t.rotate || 0)) % 4;
2525
2525
  return n && (r.rotate = n), r;
2526
2526
  }
2527
- function xn(e, t) {
2527
+ function yn(e, t) {
2528
2528
  const r = Ka(e, t);
2529
- for (const n in Sr) n in or ? n in e && !(n in r) && (r[n] = or[n]) : n in t ? r[n] = t[n] : n in e && (r[n] = e[n]);
2529
+ for (const n in vr) n in rr ? n in e && !(n in r) && (r[n] = rr[n]) : n in t ? r[n] = t[n] : n in e && (r[n] = e[n]);
2530
2530
  return r;
2531
2531
  }
2532
2532
  function Wa(e, t, r) {
2533
2533
  const n = e.icons, o = e.aliases || /* @__PURE__ */ Object.create(null);
2534
2534
  let s = {};
2535
2535
  function i(c) {
2536
- s = xn(n[c] || o[c], s);
2536
+ s = yn(n[c] || o[c], s);
2537
2537
  }
2538
- return i(t), r.forEach(i), xn(e, s);
2538
+ return i(t), r.forEach(i), yn(e, s);
2539
2539
  }
2540
2540
  function to(e, t) {
2541
2541
  const r = [];
@@ -2556,27 +2556,27 @@ const Qa = {
2556
2556
  not_found: {},
2557
2557
  ...eo
2558
2558
  };
2559
- function mr(e, t) {
2559
+ function ur(e, t) {
2560
2560
  for (const r in t) if (r in e && typeof e[r] != typeof t[r]) return !1;
2561
2561
  return !0;
2562
2562
  }
2563
2563
  function ro(e) {
2564
2564
  if (typeof e != "object" || e === null) return null;
2565
2565
  const t = e;
2566
- if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !mr(e, Qa)) return null;
2566
+ if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !ur(e, Qa)) return null;
2567
2567
  const r = t.icons;
2568
2568
  for (const o in r) {
2569
2569
  const s = r[o];
2570
- if (!o || typeof s.body != "string" || !mr(s, Sr)) return null;
2570
+ if (!o || typeof s.body != "string" || !ur(s, vr)) return null;
2571
2571
  }
2572
2572
  const n = t.aliases || /* @__PURE__ */ Object.create(null);
2573
2573
  for (const o in n) {
2574
2574
  const s = n[o], i = s.parent;
2575
- if (!o || typeof i != "string" || !r[i] && !n[i] || !mr(s, Sr)) return null;
2575
+ if (!o || typeof i != "string" || !r[i] && !n[i] || !ur(s, vr)) return null;
2576
2576
  }
2577
2577
  return t;
2578
2578
  }
2579
- const bn = /* @__PURE__ */ Object.create(null);
2579
+ const xn = /* @__PURE__ */ Object.create(null);
2580
2580
  function Ga(e, t) {
2581
2581
  return {
2582
2582
  provider: e,
@@ -2585,8 +2585,8 @@ function Ga(e, t) {
2585
2585
  missing: /* @__PURE__ */ new Set()
2586
2586
  };
2587
2587
  }
2588
- function vt(e, t) {
2589
- const r = bn[e] || (bn[e] = /* @__PURE__ */ Object.create(null));
2588
+ function bt(e, t) {
2589
+ const r = xn[e] || (xn[e] = /* @__PURE__ */ Object.create(null));
2590
2590
  return r[t] || (r[t] = Ga(e, t));
2591
2591
  }
2592
2592
  function no(e, t) {
@@ -2602,7 +2602,7 @@ function Xa(e, t, r) {
2602
2602
  }
2603
2603
  return !1;
2604
2604
  }
2605
- const oo = /^[a-z0-9]+(-[a-z0-9]+)*$/, ar = (e, t, r, n = "") => {
2605
+ const oo = /^[a-z0-9]+(-[a-z0-9]+)*$/, nr = (e, t, r, n = "") => {
2606
2606
  const o = e.split(":");
2607
2607
  if (e.slice(0, 1) === "@") {
2608
2608
  if (o.length < 2 || o.length > 3) return null;
@@ -2610,12 +2610,12 @@ const oo = /^[a-z0-9]+(-[a-z0-9]+)*$/, ar = (e, t, r, n = "") => {
2610
2610
  }
2611
2611
  if (o.length > 3 || !o.length) return null;
2612
2612
  if (o.length > 1) {
2613
- const c = o.pop(), l = o.pop(), h = {
2613
+ const c = o.pop(), l = o.pop(), p = {
2614
2614
  provider: o.length > 0 ? o[0] : n,
2615
2615
  prefix: l,
2616
2616
  name: c
2617
2617
  };
2618
- return t && !Qt(h) ? null : h;
2618
+ return t && !Kt(p) ? null : p;
2619
2619
  }
2620
2620
  const s = o[0], i = s.split("-");
2621
2621
  if (i.length > 1) {
@@ -2624,7 +2624,7 @@ const oo = /^[a-z0-9]+(-[a-z0-9]+)*$/, ar = (e, t, r, n = "") => {
2624
2624
  prefix: i.shift(),
2625
2625
  name: i.join("-")
2626
2626
  };
2627
- return t && !Qt(c) ? null : c;
2627
+ return t && !Kt(c) ? null : c;
2628
2628
  }
2629
2629
  if (r && n === "") {
2630
2630
  const c = {
@@ -2632,41 +2632,41 @@ const oo = /^[a-z0-9]+(-[a-z0-9]+)*$/, ar = (e, t, r, n = "") => {
2632
2632
  prefix: "",
2633
2633
  name: s
2634
2634
  };
2635
- return t && !Qt(c, r) ? null : c;
2635
+ return t && !Kt(c, r) ? null : c;
2636
2636
  }
2637
2637
  return null;
2638
- }, Qt = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
2639
- let Dt = !1;
2638
+ }, Kt = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
2639
+ let zt = !1;
2640
2640
  function ao(e) {
2641
- return typeof e == "boolean" && (Dt = e), Dt;
2641
+ return typeof e == "boolean" && (zt = e), zt;
2642
2642
  }
2643
- function vn(e) {
2644
- const t = typeof e == "string" ? ar(e, !0, Dt) : e;
2643
+ function bn(e) {
2644
+ const t = typeof e == "string" ? nr(e, !0, zt) : e;
2645
2645
  if (t) {
2646
- const r = vt(t.provider, t.prefix), n = t.name;
2646
+ const r = bt(t.provider, t.prefix), n = t.name;
2647
2647
  return r.icons[n] || (r.missing.has(n) ? null : void 0);
2648
2648
  }
2649
2649
  }
2650
2650
  function Za(e, t) {
2651
- const r = ar(e, !0, Dt);
2651
+ const r = nr(e, !0, zt);
2652
2652
  if (!r) return !1;
2653
- const n = vt(r.provider, r.prefix);
2653
+ const n = bt(r.provider, r.prefix);
2654
2654
  return t ? Xa(n, r.name, t) : (n.missing.add(r.name), !0);
2655
2655
  }
2656
2656
  function es(e, t) {
2657
2657
  if (typeof e != "object") return !1;
2658
- if (typeof t != "string" && (t = e.provider || ""), Dt && !t && !e.prefix) {
2658
+ if (typeof t != "string" && (t = e.provider || ""), zt && !t && !e.prefix) {
2659
2659
  let o = !1;
2660
2660
  return ro(e) && (e.prefix = "", to(e, (s, i) => {
2661
2661
  Za(s, i) && (o = !0);
2662
2662
  })), o;
2663
2663
  }
2664
2664
  const r = e.prefix;
2665
- if (!Qt({
2665
+ if (!Kt({
2666
2666
  prefix: r,
2667
2667
  name: "a"
2668
2668
  })) return !1;
2669
- const n = vt(t, r);
2669
+ const n = bt(t, r);
2670
2670
  return !!no(n, e);
2671
2671
  }
2672
2672
  const so = Object.freeze({
@@ -2674,9 +2674,9 @@ const so = Object.freeze({
2674
2674
  height: null
2675
2675
  }), io = Object.freeze({
2676
2676
  ...so,
2677
- ...or
2677
+ ...rr
2678
2678
  }), ts = /(-?[0-9.]*[0-9]+[0-9.]*)/g, rs = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
2679
- function kn(e, t, r) {
2679
+ function vn(e, t, r) {
2680
2680
  if (t === 1) return e;
2681
2681
  if (r = r || 100, typeof e == "number") return Math.ceil(e * t * r) / r;
2682
2682
  if (typeof e != "string") return e;
@@ -2718,7 +2718,7 @@ function as(e, t, r) {
2718
2718
  const ss = (e) => e === "unset" || e === "undefined" || e === "none";
2719
2719
  function is(e, t) {
2720
2720
  const r = {
2721
- ...$r,
2721
+ ...Or,
2722
2722
  ...e
2723
2723
  }, n = {
2724
2724
  ...io,
@@ -2730,9 +2730,9 @@ function is(e, t) {
2730
2730
  height: r.height
2731
2731
  };
2732
2732
  let s = r.body;
2733
- [r, n].forEach((A) => {
2734
- const k = [], P = A.hFlip, J = A.vFlip;
2735
- let q = A.rotate;
2733
+ [r, n].forEach((T) => {
2734
+ const k = [], P = T.hFlip, J = T.vFlip;
2735
+ let q = T.rotate;
2736
2736
  P ? J ? q += 2 : (k.push("translate(" + (o.width + o.left).toString() + " " + (0 - o.top).toString() + ")"), k.push("scale(-1 1)"), o.top = o.left = 0) : J && (k.push("translate(" + (0 - o.left).toString() + " " + (o.height + o.top).toString() + ")"), k.push("scale(1 -1)"), o.top = o.left = 0);
2737
2737
  let Y;
2738
2738
  switch (q < 0 && (q -= Math.floor(q / 4) * 4), q = q % 4, q) {
@@ -2748,18 +2748,18 @@ function is(e, t) {
2748
2748
  }
2749
2749
  q % 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)), k.length && (s = as(s, '<g transform="' + k.join(" ") + '">', "</g>"));
2750
2750
  });
2751
- const i = n.width, c = n.height, l = o.width, h = o.height;
2751
+ const i = n.width, c = n.height, l = o.width, p = o.height;
2752
2752
  let g, y;
2753
- i === null ? (y = c === null ? "1em" : c === "auto" ? h : c, g = kn(y, l / h)) : (g = i === "auto" ? l : i, y = c === null ? kn(g, h / l) : c === "auto" ? h : c);
2754
- const x = {}, I = (A, k) => {
2755
- ss(k) || (x[A] = k.toString());
2753
+ i === null ? (y = c === null ? "1em" : c === "auto" ? p : c, g = vn(y, l / p)) : (g = i === "auto" ? l : i, y = c === null ? vn(g, p / l) : c === "auto" ? p : c);
2754
+ const x = {}, I = (T, k) => {
2755
+ ss(k) || (x[T] = k.toString());
2756
2756
  };
2757
2757
  I("width", g), I("height", y);
2758
2758
  const S = [
2759
2759
  o.left,
2760
2760
  o.top,
2761
2761
  l,
2762
- h
2762
+ p
2763
2763
  ];
2764
2764
  return x.viewBox = S.join(" "), {
2765
2765
  attributes: x,
@@ -2780,14 +2780,14 @@ function us(e, t = cs) {
2780
2780
  e = e.replace(new RegExp('([#;"])(' + c + ')([")]|\\.[a-z])', "g"), "$1" + i + o + "$3");
2781
2781
  }), e = e.replace(new RegExp(o, "g"), ""), e;
2782
2782
  }
2783
- const Nr = /* @__PURE__ */ Object.create(null);
2783
+ const kr = /* @__PURE__ */ Object.create(null);
2784
2784
  function fs(e, t) {
2785
- Nr[e] = t;
2785
+ kr[e] = t;
2786
2786
  }
2787
- function Cr(e) {
2788
- return Nr[e] || Nr[""];
2787
+ function Sr(e) {
2788
+ return kr[e] || kr[""];
2789
2789
  }
2790
- function Lr(e) {
2790
+ function jr(e) {
2791
2791
  let t;
2792
2792
  if (typeof e.resources == "string") t = [e.resources];
2793
2793
  else if (t = e.resources, !(t instanceof Array) || !t.length) return null;
@@ -2802,26 +2802,26 @@ function Lr(e) {
2802
2802
  dataAfterTimeout: e.dataAfterTimeout !== !1
2803
2803
  };
2804
2804
  }
2805
- const zr = /* @__PURE__ */ Object.create(null), Ot = ["https://api.simplesvg.com", "https://api.unisvg.com"], Gt = [];
2806
- for (; Ot.length > 0; ) Ot.length === 1 || Math.random() > 0.5 ? Gt.push(Ot.shift()) : Gt.push(Ot.pop());
2807
- zr[""] = Lr({ resources: ["https://api.iconify.design"].concat(Gt) });
2805
+ const $r = /* @__PURE__ */ Object.create(null), At = ["https://api.simplesvg.com", "https://api.unisvg.com"], Wt = [];
2806
+ for (; At.length > 0; ) At.length === 1 || Math.random() > 0.5 ? Wt.push(At.shift()) : Wt.push(At.pop());
2807
+ $r[""] = jr({ resources: ["https://api.iconify.design"].concat(Wt) });
2808
2808
  function ms(e, t) {
2809
- const r = Lr(t);
2810
- return r === null ? !1 : (zr[e] = r, !0);
2809
+ const r = jr(t);
2810
+ return r === null ? !1 : ($r[e] = r, !0);
2811
2811
  }
2812
- function Dr(e) {
2813
- return zr[e];
2812
+ function Lr(e) {
2813
+ return $r[e];
2814
2814
  }
2815
- const ps = () => {
2815
+ const hs = () => {
2816
2816
  let e;
2817
2817
  try {
2818
2818
  if (e = fetch, typeof e == "function") return e;
2819
2819
  } catch {
2820
2820
  }
2821
2821
  };
2822
- let Sn = ps();
2823
- function hs(e, t) {
2824
- const r = Dr(e);
2822
+ let kn = hs();
2823
+ function ps(e, t) {
2824
+ const r = Lr(e);
2825
2825
  if (!r) return 0;
2826
2826
  let n;
2827
2827
  if (!r.maxURL) n = 0;
@@ -2839,15 +2839,15 @@ function gs(e) {
2839
2839
  return e === 404;
2840
2840
  }
2841
2841
  const ws = (e, t, r) => {
2842
- const n = [], o = hs(e, t), s = "icons";
2842
+ const n = [], o = ps(e, t), s = "icons";
2843
2843
  let i = {
2844
2844
  type: s,
2845
2845
  provider: e,
2846
2846
  prefix: t,
2847
2847
  icons: []
2848
2848
  }, c = 0;
2849
- return r.forEach((l, h) => {
2850
- c += l.length + 1, c >= o && h > 0 && (n.push(i), i = {
2849
+ return r.forEach((l, p) => {
2850
+ c += l.length + 1, c >= o && p > 0 && (n.push(i), i = {
2851
2851
  type: s,
2852
2852
  provider: e,
2853
2853
  prefix: t,
@@ -2857,13 +2857,13 @@ const ws = (e, t, r) => {
2857
2857
  };
2858
2858
  function ys(e) {
2859
2859
  if (typeof e == "string") {
2860
- const t = Dr(e);
2860
+ const t = Lr(e);
2861
2861
  if (t) return t.path;
2862
2862
  }
2863
2863
  return "/";
2864
2864
  }
2865
2865
  const xs = (e, t, r) => {
2866
- if (!Sn) {
2866
+ if (!kn) {
2867
2867
  r("abort", 424);
2868
2868
  return;
2869
2869
  }
@@ -2884,7 +2884,7 @@ const xs = (e, t, r) => {
2884
2884
  return;
2885
2885
  }
2886
2886
  let o = 503;
2887
- Sn(e + n).then((s) => {
2887
+ kn(e + n).then((s) => {
2888
2888
  const i = s.status;
2889
2889
  if (i !== 200) {
2890
2890
  setTimeout(() => {
@@ -2927,16 +2927,16 @@ function vs(e) {
2927
2927
  const i = s.icons, c = i.pending.length;
2928
2928
  i.pending = i.pending.filter((l) => {
2929
2929
  if (l.prefix !== o) return !0;
2930
- const h = l.name;
2931
- if (e.icons[h]) i.loaded.push({
2930
+ const p = l.name;
2931
+ if (e.icons[p]) i.loaded.push({
2932
2932
  provider: n,
2933
2933
  prefix: o,
2934
- name: h
2934
+ name: p
2935
2935
  });
2936
- else if (e.missing.has(h)) i.missing.push({
2936
+ else if (e.missing.has(p)) i.missing.push({
2937
2937
  provider: n,
2938
2938
  prefix: o,
2939
- name: h
2939
+ name: p
2940
2940
  });
2941
2941
  else
2942
2942
  return r = !0, !0;
@@ -2974,9 +2974,9 @@ function Ns(e) {
2974
2974
  return e.forEach((o) => {
2975
2975
  if (n.name === o.name && n.prefix === o.prefix && n.provider === o.provider) return;
2976
2976
  n = o;
2977
- const s = o.provider, i = o.prefix, c = o.name, l = r[s] || (r[s] = /* @__PURE__ */ Object.create(null)), h = l[i] || (l[i] = vt(s, i));
2977
+ const s = o.provider, i = o.prefix, c = o.name, l = r[s] || (r[s] = /* @__PURE__ */ Object.create(null)), p = l[i] || (l[i] = bt(s, i));
2978
2978
  let g;
2979
- c in h.icons ? g = t.loaded : i === "" || h.missing.has(c) ? g = t.missing : g = t.pending;
2979
+ c in p.icons ? g = t.loaded : i === "" || p.missing.has(c) ? g = t.missing : g = t.pending;
2980
2980
  const y = {
2981
2981
  provider: s,
2982
2982
  prefix: i,
@@ -2988,7 +2988,7 @@ function Ns(e) {
2988
2988
  function Cs(e, t = !0, r = !1) {
2989
2989
  const n = [];
2990
2990
  return e.forEach((o) => {
2991
- const s = typeof o == "string" ? ar(o, t, r) : o;
2991
+ const s = typeof o == "string" ? nr(o, t, r) : o;
2992
2992
  s && n.push(s);
2993
2993
  }), n;
2994
2994
  }
@@ -3012,12 +3012,12 @@ function Is(e, t, r, n) {
3012
3012
  i = i.concat(C);
3013
3013
  } else i = e.resources.slice(s).concat(e.resources.slice(0, s));
3014
3014
  const c = Date.now();
3015
- let l = "pending", h = 0, g, y = null, x = [], I = [];
3015
+ let l = "pending", p = 0, g, y = null, x = [], I = [];
3016
3016
  typeof n == "function" && I.push(n);
3017
3017
  function S() {
3018
3018
  y && (clearTimeout(y), y = null);
3019
3019
  }
3020
- function A() {
3020
+ function T() {
3021
3021
  l === "pending" && (l = "aborted"), S(), x.forEach((C) => {
3022
3022
  C.status === "pending" && (C.status = "aborted");
3023
3023
  }), x = [];
@@ -3030,10 +3030,10 @@ function Is(e, t, r, n) {
3030
3030
  startTime: c,
3031
3031
  payload: t,
3032
3032
  status: l,
3033
- queriesSent: h,
3033
+ queriesSent: p,
3034
3034
  queriesPending: x.length,
3035
3035
  subscribe: k,
3036
- abort: A
3036
+ abort: T
3037
3037
  };
3038
3038
  }
3039
3039
  function J() {
@@ -3046,7 +3046,7 @@ function Is(e, t, r, n) {
3046
3046
  C.status === "pending" && (C.status = "aborted");
3047
3047
  }), x = [];
3048
3048
  }
3049
- function Y(C, K, te) {
3049
+ function Y(C, K, re) {
3050
3050
  const ye = K !== "success";
3051
3051
  switch (x = x.filter((be) => be !== C), l) {
3052
3052
  case "pending":
@@ -3058,11 +3058,11 @@ function Is(e, t, r, n) {
3058
3058
  return;
3059
3059
  }
3060
3060
  if (K === "abort") {
3061
- g = te, J();
3061
+ g = re, J();
3062
3062
  return;
3063
3063
  }
3064
3064
  if (ye) {
3065
- g = te, x.length || (i.length ? _e() : J());
3065
+ g = re, x.length || (i.length ? _e() : J());
3066
3066
  return;
3067
3067
  }
3068
3068
  if (S(), q(), !e.random) {
@@ -3070,7 +3070,7 @@ function Is(e, t, r, n) {
3070
3070
  be !== -1 && be !== e.index && (e.index = be);
3071
3071
  }
3072
3072
  l = "completed", I.forEach((be) => {
3073
- be(te);
3073
+ be(re);
3074
3074
  });
3075
3075
  }
3076
3076
  function _e() {
@@ -3090,11 +3090,11 @@ function Is(e, t, r, n) {
3090
3090
  const K = {
3091
3091
  status: "pending",
3092
3092
  resource: C,
3093
- callback: (te, ye) => {
3094
- Y(K, te, ye);
3093
+ callback: (re, ye) => {
3094
+ Y(K, re, ye);
3095
3095
  }
3096
3096
  };
3097
- x.push(K), h++, y = setTimeout(_e, e.rotate), r(C, t, K.callback);
3097
+ x.push(K), p++, y = setTimeout(_e, e.rotate), r(C, t, K.callback);
3098
3098
  }
3099
3099
  return setTimeout(_e), P;
3100
3100
  }
@@ -3107,9 +3107,9 @@ function co(e) {
3107
3107
  function n() {
3108
3108
  r = r.filter((c) => c().status === "pending");
3109
3109
  }
3110
- function o(c, l, h) {
3110
+ function o(c, l, p) {
3111
3111
  const g = Is(t, c, l, (y, x) => {
3112
- n(), h && h(y, x);
3112
+ n(), p && p(y, x);
3113
3113
  });
3114
3114
  return r.push(g), g;
3115
3115
  }
@@ -3126,41 +3126,41 @@ function co(e) {
3126
3126
  cleanup: n
3127
3127
  };
3128
3128
  }
3129
- function Nn() {
3129
+ function Sn() {
3130
3130
  }
3131
- const pr = /* @__PURE__ */ Object.create(null);
3131
+ const fr = /* @__PURE__ */ Object.create(null);
3132
3132
  function Ps(e) {
3133
- if (!pr[e]) {
3134
- const t = Dr(e);
3133
+ if (!fr[e]) {
3134
+ const t = Lr(e);
3135
3135
  if (!t) return;
3136
3136
  const r = co(t), n = {
3137
3137
  config: t,
3138
3138
  redundancy: r
3139
3139
  };
3140
- pr[e] = n;
3140
+ fr[e] = n;
3141
3141
  }
3142
- return pr[e];
3142
+ return fr[e];
3143
3143
  }
3144
3144
  function Fs(e, t, r) {
3145
3145
  let n, o;
3146
3146
  if (typeof e == "string") {
3147
- const s = Cr(e);
3147
+ const s = Sr(e);
3148
3148
  if (!s)
3149
- return r(void 0, 424), Nn;
3149
+ return r(void 0, 424), Sn;
3150
3150
  o = s.send;
3151
3151
  const i = Ps(e);
3152
3152
  i && (n = i.redundancy);
3153
3153
  } else {
3154
- const s = Lr(e);
3154
+ const s = jr(e);
3155
3155
  if (s) {
3156
3156
  n = co(s);
3157
- const i = e.resources ? e.resources[0] : "", c = Cr(i);
3157
+ const i = e.resources ? e.resources[0] : "", c = Sr(i);
3158
3158
  c && (o = c.send);
3159
3159
  }
3160
3160
  }
3161
- return !n || !o ? (r(void 0, 424), Nn) : n.query(t, o, r)().abort;
3161
+ return !n || !o ? (r(void 0, 424), Sn) : n.query(t, o, r)().abort;
3162
3162
  }
3163
- function Cn() {
3163
+ function Nn() {
3164
3164
  }
3165
3165
  function Es(e) {
3166
3166
  e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
@@ -3176,7 +3176,7 @@ function Ts(e) {
3176
3176
  invalid: r
3177
3177
  };
3178
3178
  }
3179
- function jt(e, t, r) {
3179
+ function Ot(e, t, r) {
3180
3180
  function n() {
3181
3181
  const o = e.pendingIcons;
3182
3182
  t.forEach((s) => {
@@ -3193,7 +3193,7 @@ function jt(e, t, r) {
3193
3193
  }
3194
3194
  n(), Es(e);
3195
3195
  }
3196
- function _n(e, t) {
3196
+ function Cn(e, t) {
3197
3197
  e instanceof Promise ? e.then((r) => {
3198
3198
  t(r);
3199
3199
  }).catch(() => {
@@ -3207,34 +3207,34 @@ function As(e, t) {
3207
3207
  if (delete e.iconsToLoad, !o || !o.length) return;
3208
3208
  const s = e.loadIcon;
3209
3209
  if (e.loadIcons && (o.length > 1 || !s)) {
3210
- _n(e.loadIcons(o, n, r), (g) => {
3211
- jt(e, o, g);
3210
+ Cn(e.loadIcons(o, n, r), (g) => {
3211
+ Ot(e, o, g);
3212
3212
  });
3213
3213
  return;
3214
3214
  }
3215
3215
  if (s) {
3216
3216
  o.forEach((g) => {
3217
3217
  const y = s(g, n, r);
3218
- _n(y, (x) => {
3218
+ Cn(y, (x) => {
3219
3219
  const I = x ? {
3220
3220
  prefix: n,
3221
3221
  icons: { [g]: x }
3222
3222
  } : null;
3223
- jt(e, [g], I);
3223
+ Ot(e, [g], I);
3224
3224
  });
3225
3225
  });
3226
3226
  return;
3227
3227
  }
3228
3228
  const { valid: i, invalid: c } = Ts(o);
3229
- if (c.length && jt(e, c, null), !i.length) return;
3230
- const l = n.match(oo) ? Cr(r) : null;
3229
+ if (c.length && Ot(e, c, null), !i.length) return;
3230
+ const l = n.match(oo) ? Sr(r) : null;
3231
3231
  if (!l) {
3232
- jt(e, i, null);
3232
+ Ot(e, i, null);
3233
3233
  return;
3234
3234
  }
3235
3235
  l.prepare(r, n, i).forEach((g) => {
3236
3236
  Fs(r, g, (y) => {
3237
- jt(e, g.icons, y);
3237
+ Ot(e, g.icons, y);
3238
3238
  });
3239
3239
  });
3240
3240
  }));
@@ -3244,7 +3244,7 @@ const Os = (e, t) => {
3244
3244
  if (!n.pending.length) {
3245
3245
  let l = !0;
3246
3246
  return t && setTimeout(() => {
3247
- l && t(n.loaded, n.missing, n.pending, Cn);
3247
+ l && t(n.loaded, n.missing, n.pending, Nn);
3248
3248
  }), () => {
3249
3249
  l = !1;
3250
3250
  };
@@ -3252,18 +3252,18 @@ const Os = (e, t) => {
3252
3252
  const o = /* @__PURE__ */ Object.create(null), s = [];
3253
3253
  let i, c;
3254
3254
  return n.pending.forEach((l) => {
3255
- const { provider: h, prefix: g } = l;
3256
- if (g === c && h === i) return;
3257
- i = h, c = g, s.push(vt(h, g));
3258
- const y = o[h] || (o[h] = /* @__PURE__ */ Object.create(null));
3255
+ const { provider: p, prefix: g } = l;
3256
+ if (g === c && p === i) return;
3257
+ i = p, c = g, s.push(bt(p, g));
3258
+ const y = o[p] || (o[p] = /* @__PURE__ */ Object.create(null));
3259
3259
  y[g] || (y[g] = []);
3260
3260
  }), n.pending.forEach((l) => {
3261
- const { provider: h, prefix: g, name: y } = l, x = vt(h, g), I = x.pendingIcons || (x.pendingIcons = /* @__PURE__ */ new Set());
3262
- I.has(y) || (I.add(y), o[h][g].push(y));
3261
+ const { provider: p, prefix: g, name: y } = l, x = bt(p, g), I = x.pendingIcons || (x.pendingIcons = /* @__PURE__ */ new Set());
3262
+ I.has(y) || (I.add(y), o[p][g].push(y));
3263
3263
  }), s.forEach((l) => {
3264
- const h = o[l.provider][l.prefix];
3265
- h.length && As(l, h);
3266
- }), t ? Ss(t, n, s) : Cn;
3264
+ const p = o[l.provider][l.prefix];
3265
+ p.length && As(l, p);
3266
+ }), t ? Ss(t, n, s) : Nn;
3267
3267
  };
3268
3268
  function js(e, t) {
3269
3269
  const r = { ...e };
@@ -3325,16 +3325,16 @@ function Bs(e) {
3325
3325
  function Us(e) {
3326
3326
  return 'url("' + Bs(e) + '")';
3327
3327
  }
3328
- let $t;
3328
+ let jt;
3329
3329
  function qs() {
3330
3330
  try {
3331
- $t = window.trustedTypes.createPolicy("iconify", { createHTML: (e) => e });
3331
+ jt = window.trustedTypes.createPolicy("iconify", { createHTML: (e) => e });
3332
3332
  } catch {
3333
- $t = null;
3333
+ jt = null;
3334
3334
  }
3335
3335
  }
3336
3336
  function Rs(e) {
3337
- return $t === void 0 && qs(), $t ? $t.createHTML(e) : e;
3337
+ return jt === void 0 && qs(), jt ? jt.createHTML(e) : e;
3338
3338
  }
3339
3339
  const uo = {
3340
3340
  ...io,
@@ -3346,29 +3346,29 @@ const uo = {
3346
3346
  role: "img"
3347
3347
  }, Vs = {
3348
3348
  display: "inline-block"
3349
- }, _r = {
3349
+ }, Nr = {
3350
3350
  backgroundColor: "currentColor"
3351
3351
  }, fo = {
3352
3352
  backgroundColor: "transparent"
3353
- }, In = {
3353
+ }, _n = {
3354
3354
  Image: "var(--svg)",
3355
3355
  Repeat: "no-repeat",
3356
3356
  Size: "100% 100%"
3357
- }, Pn = {
3358
- WebkitMask: _r,
3359
- mask: _r,
3357
+ }, In = {
3358
+ WebkitMask: Nr,
3359
+ mask: Nr,
3360
3360
  background: fo
3361
3361
  };
3362
- for (const e in Pn) {
3363
- const t = Pn[e];
3364
- for (const r in In)
3365
- t[e + r] = In[r];
3362
+ for (const e in In) {
3363
+ const t = In[e];
3364
+ for (const r in _n)
3365
+ t[e + r] = _n[r];
3366
3366
  }
3367
3367
  const Ys = {
3368
3368
  ...uo,
3369
3369
  inline: !0
3370
3370
  };
3371
- function Fn(e) {
3371
+ function Pn(e) {
3372
3372
  return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
3373
3373
  }
3374
3374
  const Js = (e, t, r) => {
@@ -3376,7 +3376,7 @@ const Js = (e, t, r) => {
3376
3376
  ...s === "svg" ? Hs : {}
3377
3377
  };
3378
3378
  if (r) {
3379
- const k = ar(r, !1, !0);
3379
+ const k = nr(r, !1, !0);
3380
3380
  if (k) {
3381
3381
  const P = ["iconify"], J = [
3382
3382
  "provider",
@@ -3436,7 +3436,7 @@ const Js = (e, t, r) => {
3436
3436
  n[k] === void 0 && (l[k] = P);
3437
3437
  }
3438
3438
  }
3439
- const h = is(e, o), g = h.attributes;
3439
+ const p = is(e, o), g = p.attributes;
3440
3440
  if (o.inline && (i.verticalAlign = "-0.125em"), s === "svg") {
3441
3441
  l.style = {
3442
3442
  ...i,
@@ -3444,23 +3444,23 @@ const Js = (e, t, r) => {
3444
3444
  }, Object.assign(l, g);
3445
3445
  let k = 0, P = t.id;
3446
3446
  return typeof P == "string" && (P = P.replace(/-/g, "_")), l.dangerouslySetInnerHTML = {
3447
- __html: Rs(us(h.body, P ? () => P + "ID" + k++ : "iconifyReact"))
3448
- }, hr("svg", l);
3447
+ __html: Rs(us(p.body, P ? () => P + "ID" + k++ : "iconifyReact"))
3448
+ }, mr("svg", l);
3449
3449
  }
3450
- const { body: y, width: x, height: I } = e, S = s === "mask" || (s === "bg" ? !1 : y.indexOf("currentColor") !== -1), A = Ds(y, {
3450
+ const { body: y, width: x, height: I } = e, S = s === "mask" || (s === "bg" ? !1 : y.indexOf("currentColor") !== -1), T = Ds(y, {
3451
3451
  ...g,
3452
3452
  width: x + "",
3453
3453
  height: I + ""
3454
3454
  });
3455
3455
  return l.style = {
3456
3456
  ...i,
3457
- "--svg": Us(A),
3458
- width: Fn(g.width),
3459
- height: Fn(g.height),
3457
+ "--svg": Us(T),
3458
+ width: Pn(g.width),
3459
+ height: Pn(g.height),
3460
3460
  ...Vs,
3461
- ...S ? _r : fo,
3461
+ ...S ? Nr : fo,
3462
3462
  ...c
3463
- }, hr("span", l);
3463
+ }, mr("span", l);
3464
3464
  };
3465
3465
  ao(!0);
3466
3466
  fs("", bs);
@@ -3505,11 +3505,11 @@ function mo(e) {
3505
3505
  name: "",
3506
3506
  data: S
3507
3507
  };
3508
- const A = vn(S);
3509
- if (A)
3508
+ const T = bn(S);
3509
+ if (T)
3510
3510
  return {
3511
3511
  name: S,
3512
- data: A
3512
+ data: T
3513
3513
  };
3514
3514
  }
3515
3515
  return {
@@ -3521,7 +3521,7 @@ function mo(e) {
3521
3521
  const I = n.callback;
3522
3522
  I && (I(), o({}));
3523
3523
  }
3524
- function h(I) {
3524
+ function p(I) {
3525
3525
  if (JSON.stringify(i) !== JSON.stringify(I))
3526
3526
  return l(), c(I), !0;
3527
3527
  }
@@ -3529,34 +3529,34 @@ function mo(e) {
3529
3529
  var I;
3530
3530
  const S = e.icon;
3531
3531
  if (typeof S == "object") {
3532
- h({
3532
+ p({
3533
3533
  name: "",
3534
3534
  data: S
3535
3535
  });
3536
3536
  return;
3537
3537
  }
3538
- const A = vn(S);
3539
- if (h({
3538
+ const T = bn(S);
3539
+ if (p({
3540
3540
  name: S,
3541
- data: A
3541
+ data: T
3542
3542
  }))
3543
- if (A === void 0) {
3543
+ if (T === void 0) {
3544
3544
  const k = Os([S], g);
3545
3545
  o({
3546
3546
  callback: k
3547
3547
  });
3548
- } else A && ((I = e.onLoad) === null || I === void 0 || I.call(e, S));
3548
+ } else T && ((I = e.onLoad) === null || I === void 0 || I.call(e, S));
3549
3549
  }
3550
3550
  xe(() => (r(!0), l), []), xe(() => {
3551
3551
  t && g();
3552
3552
  }, [e.icon, t]);
3553
3553
  const { name: y, data: x } = i;
3554
3554
  return x ? Js({
3555
- ...$r,
3555
+ ...Or,
3556
3556
  ...x
3557
- }, e, y) : e.children ? e.children : e.fallback ? e.fallback : hr("span", {});
3557
+ }, e, y) : e.children ? e.children : e.fallback ? e.fallback : mr("span", {});
3558
3558
  }
3559
- const ce = $n((e, t) => mo({
3559
+ const de = $n((e, t) => mo({
3560
3560
  ...e,
3561
3561
  _ref: t
3562
3562
  }));
@@ -3565,11 +3565,11 @@ $n((e, t) => mo({
3565
3565
  ...e,
3566
3566
  _ref: t
3567
3567
  }));
3568
- const xt = "USD", Ks = (e, t = xt) => {
3568
+ const yt = "USD", Ks = (e, t = yt) => {
3569
3569
  const r = (e == null ? void 0 : e.prices) ?? [];
3570
3570
  if (!r.length) return null;
3571
3571
  const n = (i) => {
3572
- var h, g;
3572
+ var p, g;
3573
3573
  const c = i.find((y) => {
3574
3574
  var x;
3575
3575
  return !!((x = y.discounted) != null && x.value);
@@ -3578,7 +3578,7 @@ const xt = "USD", Ks = (e, t = xt) => {
3578
3578
  return {
3579
3579
  cent: c.discounted.value.centAmount,
3580
3580
  cur: c.discounted.value.currencyCode,
3581
- regularCent: (h = c.value) == null ? void 0 : h.centAmount
3581
+ regularCent: (p = c.value) == null ? void 0 : p.centAmount
3582
3582
  };
3583
3583
  const l = (g = i[0]) == null ? void 0 : g.value;
3584
3584
  return l ? { cent: l.centAmount, cur: l.currencyCode } : null;
@@ -3603,7 +3603,7 @@ const xt = "USD", Ks = (e, t = xt) => {
3603
3603
  r && r.value && (t = typeof r.value == "object" ? r.value.label || "" : r.value);
3604
3604
  }
3605
3605
  return { sizeLabel: t };
3606
- }, ht = (e) => Ws((e == null ? void 0 : e.attributesRaw) ?? [], "color"), gt = (e) => Qs((e == null ? void 0 : e.attributesRaw) ?? []).sizeLabel, We = (e) => e.charAt(0).toUpperCase() + e.slice(1), wt = {
3606
+ }, pt = (e) => Ws((e == null ? void 0 : e.attributesRaw) ?? [], "color"), gt = (e) => Qs((e == null ? void 0 : e.attributesRaw) ?? []).sizeLabel, We = (e) => e.charAt(0).toUpperCase() + e.slice(1), Fn = {
3607
3607
  standard: {
3608
3608
  label: "Standard Delivery",
3609
3609
  fee: 0,
@@ -3626,7 +3626,7 @@ const xt = "USD", Ks = (e, t = xt) => {
3626
3626
  standard: "GROUND",
3627
3627
  express: "2-DAY SHIPPING",
3628
3628
  sameday: "OVERNIGHT"
3629
- }, st = (e, t) => {
3629
+ }, at = (e, t) => {
3630
3630
  try {
3631
3631
  return e.toLocaleString("en-US", {
3632
3632
  style: "currency",
@@ -3635,28 +3635,28 @@ const xt = "USD", Ks = (e, t = xt) => {
3635
3635
  } catch {
3636
3636
  return `${t} ${e.toFixed(2)}`;
3637
3637
  }
3638
- }, po = (e) => e == null ? void 0 : e.masterVariant, En = (e) => Array.isArray(e == null ? void 0 : e.variants) ? e.variants : [], Xt = (e) => {
3639
- const t = po(e);
3638
+ }, ho = (e) => e == null ? void 0 : e.masterVariant, En = (e) => Array.isArray(e == null ? void 0 : e.variants) ? e.variants : [], Qt = (e) => {
3639
+ const t = ho(e);
3640
3640
  return t ? [t, ...En(e)] : En(e);
3641
- }, Xs = (e, t = 0) => Xt(e)[t], Zs = (e) => {
3641
+ }, Xs = (e, t = 0) => Qt(e)[t], Zs = (e) => {
3642
3642
  var t, r;
3643
3643
  return ((r = (t = e == null ? void 0 : e.images) == null ? void 0 : t[0]) == null ? void 0 : r.url) ?? "";
3644
3644
  }, Tn = (e, t) => {
3645
- var r, n, o, s, i, c, l, h;
3646
- return Zs(t) || ((s = (o = (n = (r = e.imageGroups) == null ? void 0 : r[0]) == null ? void 0 : n.images) == null ? void 0 : o[0]) == null ? void 0 : s.link) || ((h = (l = (c = (i = e.image_groups) == null ? void 0 : i[0]) == null ? void 0 : c.images) == null ? void 0 : l[0]) == null ? void 0 : h.link) || "";
3647
- }, An = (e) => (e == null ? void 0 : e.name) || (e == null ? void 0 : e.title) || (e == null ? void 0 : e.productName) || "any", Zt = (e) => {
3648
- var s, i, c, l, h, g;
3649
- const t = e ? Ks(e, xt) : null;
3645
+ var r, n, o, s, i, c, l, p;
3646
+ return Zs(t) || ((s = (o = (n = (r = e.imageGroups) == null ? void 0 : r[0]) == null ? void 0 : n.images) == null ? void 0 : o[0]) == null ? void 0 : s.link) || ((p = (l = (c = (i = e.image_groups) == null ? void 0 : i[0]) == null ? void 0 : c.images) == null ? void 0 : l[0]) == null ? void 0 : p.link) || "";
3647
+ }, An = (e) => (e == null ? void 0 : e.name) || (e == null ? void 0 : e.title) || (e == null ? void 0 : e.productName) || "any", Gt = (e) => {
3648
+ var s, i, c, l, p, g;
3649
+ const t = e ? Ks(e, yt) : null;
3650
3650
  if (t != null && t.cent && (t != null && t.cur))
3651
3651
  return {
3652
3652
  amount: +(t.cent / 100),
3653
3653
  currency: t.cur,
3654
3654
  regularAmount: t.regularCent ? t.regularCent / 100 : void 0
3655
3655
  };
3656
- const r = (c = (i = (s = e == null ? void 0 : e.prices) == null ? void 0 : s[0]) == null ? void 0 : i.value) == null ? void 0 : c.centAmount, n = ((g = (h = (l = e == null ? void 0 : e.prices) == null ? void 0 : l[0]) == null ? void 0 : h.value) == null ? void 0 : g.currencyCode) ?? xt;
3656
+ const r = (c = (i = (s = e == null ? void 0 : e.prices) == null ? void 0 : s[0]) == null ? void 0 : i.value) == null ? void 0 : c.centAmount, n = ((g = (p = (l = e == null ? void 0 : e.prices) == null ? void 0 : l[0]) == null ? void 0 : p.value) == null ? void 0 : g.currencyCode) ?? yt;
3657
3657
  return { amount: Number.isFinite(r) ? +(Number(r) / 100) : 0, currency: n };
3658
3658
  }, On = (e, t) => {
3659
- const { amount: r } = Zt(t);
3659
+ const { amount: r } = Gt(t);
3660
3660
  if (r) return r;
3661
3661
  const n = (e == null ? void 0 : e.price) ?? (e == null ? void 0 : e.sellingPrice) ?? (e == null ? void 0 : e.unitPrice) ?? (e == null ? void 0 : e.mrp) ?? 0, o = Number(n);
3662
3662
  return Number.isFinite(o) ? o : 0;
@@ -3678,10 +3678,10 @@ const xt = "USD", Ks = (e, t = xt) => {
3678
3678
  addressLoading: s,
3679
3679
  variationAttributes: i
3680
3680
  }) => {
3681
- const h = Xt(r), g = Math.min(
3681
+ const p = Qt(r), g = Math.min(
3682
3682
  Math.max(0, n || 0),
3683
- Math.max(0, h.length - 1)
3684
- ), [y, x] = b([]), [I, S] = b(0), [A, k] = b([]);
3683
+ Math.max(0, p.length - 1)
3684
+ ), [y, x] = b([]), [I, S] = b(0), [T, k] = b([]);
3685
3685
  xe(() => {
3686
3686
  if (r != null && r.variants) {
3687
3687
  const u = P(
@@ -3694,35 +3694,35 @@ const xt = "USD", Ks = (e, t = xt) => {
3694
3694
  }, [r]);
3695
3695
  const P = (u, m, f) => {
3696
3696
  const { colorMap: w, sizeMap: v } = J(f), j = {};
3697
- m == null || m.forEach((E) => {
3698
- var ie, Pe, ze;
3699
- const M = (ie = E.variationAttributes) == null ? void 0 : ie.find(
3697
+ m == null || m.forEach((A) => {
3698
+ var le, Pe, ze;
3699
+ const M = (le = A.variationAttributes) == null ? void 0 : le.find(
3700
3700
  (De) => De.id === "color"
3701
- ), T = (ze = (Pe = M == null ? void 0 : M.values) == null ? void 0 : Pe[0]) == null ? void 0 : ze.value;
3702
- T && (j[T] || (j[T] = {}), j[T][E.viewType] = E.images);
3701
+ ), E = (ze = (Pe = M == null ? void 0 : M.values) == null ? void 0 : Pe[0]) == null ? void 0 : ze.value;
3702
+ E && (j[E] || (j[E] = {}), j[E][A.viewType] = A.images);
3703
3703
  });
3704
- const H = u.reduce((E, M) => {
3705
- const T = M.variationValues.color, ie = M.variationValues.size;
3706
- return E[T] || (E[T] = {
3707
- color: T,
3708
- name: w[T] || T,
3704
+ const H = u.reduce((A, M) => {
3705
+ const E = M.variationValues.color, le = M.variationValues.size;
3706
+ return A[E] || (A[E] = {
3707
+ color: E,
3708
+ name: w[E] || E,
3709
3709
  // ✅ DISPLAY NAME
3710
- images: j[T] || {},
3710
+ images: j[E] || {},
3711
3711
  variants: []
3712
- }), E[T].variants.push({
3713
- size: ie,
3714
- name: v[ie] || ie,
3712
+ }), A[E].variants.push({
3713
+ size: le,
3714
+ name: v[le] || le,
3715
3715
  // ✅ DISPLAY NAME
3716
3716
  ...M
3717
- }), E;
3717
+ }), A;
3718
3718
  }, {});
3719
- return Object.values(H).sort((E, M) => {
3720
- const T = E.colorName || E.color || "", ie = M.colorName || M.color || "";
3721
- return T.localeCompare(ie);
3722
- }).map((E) => ({
3723
- ...E,
3724
- variants: E.variants.sort(
3725
- (M, T) => Number(M.size) - Number(T.size)
3719
+ return Object.values(H).sort((A, M) => {
3720
+ const E = A.colorName || A.color || "", le = M.colorName || M.color || "";
3721
+ return E.localeCompare(le);
3722
+ }).map((A) => ({
3723
+ ...A,
3724
+ variants: A.variants.sort(
3725
+ (M, E) => Number(M.size) - Number(E.size)
3726
3726
  )
3727
3727
  }));
3728
3728
  }, J = (u) => {
@@ -3734,41 +3734,41 @@ const xt = "USD", Ks = (e, t = xt) => {
3734
3734
  f[v.value] = v.name;
3735
3735
  });
3736
3736
  }), { colorMap: m, sizeMap: f };
3737
- }, q = h.length, [Y, _e] = b(g), [C, K] = b(null), [te, ye] = b(null), be = Ve(null), ct = Ve(null), N = Xs(r, Y), [ve, V] = b(""), [$, Je] = b(""), [dt, qe] = b(!1), [rt, ue] = b(!1), [Ie, je] = b(!1), [z, Te] = b(""), [Se, re] = b(!1), [fe, kt] = b(null), [p, O] = b([]), [B, Q] = b([]), [U, L] = b([]), [W, X] = b(!1), [R, ne] = b(), [$e, Re] = b(!0), [G, me] = b(!1), [Ne, pe] = b(!1), [he, _] = b("standard"), [Z, D] = b(!1), [oe, ae] = b(!1), [Ae, St] = b("card"), [Oe, se] = b(!1), [Nt, Ce] = b(!1), [F, ee] = b(!1), [Ct, _t] = b(null), [Mt, Mr] = b(null), [sr, Br] = b(""), [Ur, qr] = b(!1), [It, ho] = b(r == null ? void 0 : r.id), Bt = Ve(null);
3737
+ }, q = p.length, [Y, _e] = b(g), [C, K] = b(null), [re, ye] = b(null), be = Ve(null), lt = Ve(null), N = Xs(r, Y), [ve, V] = b(""), [$, Je] = b(""), [ct, qe] = b(!1), [rt, fe] = b(!1), [Ie, je] = b(!1), [z, Te] = b(""), [Se, ne] = b(!1), [me, vt] = b(null), [h, O] = b([]), [B, Q] = b([]), [U, L] = b([]), [W, Z] = b(!1), [R, oe] = b(), [$e, Re] = b(!0), [G, he] = b(!1), [Ne, pe] = b(!1), [X, _] = b({ id: "001" }), [ee, D] = b(!1), [ae, se] = b(!1), [Ae, kt] = b("card"), [Oe, ie] = b(!1), [St, Ce] = b(!1), [F, te] = b(!1), [Nt, Ct] = b(null), [Dt, zr] = b(null), [or, Dr] = b(""), [Mr, Br] = b(!1), [_t, po] = b(r == null ? void 0 : r.id), Mt = Ve(null);
3738
3738
  xe(() => {
3739
- const u = Xt(r), m = Math.min(
3739
+ const u = Qt(r), m = Math.min(
3740
3740
  Math.max(0, n || 0),
3741
3741
  Math.max(0, u.length - 1)
3742
3742
  );
3743
3743
  _e(m);
3744
- const f = po(r), w = ht(f), v = gt(f);
3745
- be.current = w || null, ct.current = v || null, K(w || null), ye(v || null);
3744
+ const f = ho(r), w = pt(f), v = gt(f);
3745
+ be.current = w || null, lt.current = v || null, K(w || null), ye(v || null);
3746
3746
  }, [n, r]), xe(() => {
3747
- Bt.current && (Bt.current.scrollTop = Bt.current.scrollHeight);
3747
+ Mt.current && (Mt.current.scrollTop = Mt.current.scrollHeight);
3748
3748
  }, [
3749
- p,
3749
+ h,
3750
3750
  W,
3751
3751
  G,
3752
3752
  Ne,
3753
- Z,
3754
- oe,
3753
+ ee,
3754
+ ae,
3755
3755
  Oe,
3756
- Nt,
3756
+ St,
3757
3757
  F,
3758
- dt,
3758
+ ct,
3759
3759
  rt
3760
3760
  ]);
3761
- const ut = "var(--tanya)", Rr = "var(--tanya-contrast)", Ut = ut, Le = "#804c9e", go = () => {
3761
+ const dt = "var(--tanya)", Ur = "var(--tanya-contrast)", Bt = dt, Le = "#804c9e", go = () => {
3762
3762
  console.log("AgenticShopping feedback:", {
3763
- rating: Mt,
3764
- comment: sr
3765
- }), qr(!0);
3763
+ rating: Dt,
3764
+ comment: or
3765
+ }), Br(!0);
3766
3766
  }, wo = () => {
3767
- Mr(null), Br(""), qr(!0);
3768
- }, Hr = (u) => {
3769
- const f = ((u == null ? void 0 : u.intentMandateId) || (u == null ? void 0 : u.intent_mandate_id) || (u == null ? void 0 : u.id) || null) ?? Ct;
3767
+ zr(null), Dr(""), Br(!0);
3768
+ }, qr = (u) => {
3769
+ const f = ((u == null ? void 0 : u.intentMandateId) || (u == null ? void 0 : u.intent_mandate_id) || (u == null ? void 0 : u.id) || null) ?? Nt;
3770
3770
  return e ? /* @__PURE__ */ d("div", { className: "mt-3 flex items-start gap-3 rounded-lg border border-green-200 bg-green-50 p-4 text-green-800", children: [
3771
- /* @__PURE__ */ a("div", { className: "success-tick-animation", children: /* @__PURE__ */ a(ce, { icon: "mdi:check-circle", width: "28", color: "#16a34a" }) }),
3771
+ /* @__PURE__ */ a("div", { className: "success-tick-animation", children: /* @__PURE__ */ a(de, { icon: "mdi:check-circle", width: "28", color: "#16a34a" }) }),
3772
3772
  /* @__PURE__ */ d("div", { className: "text-sm w-full", children: [
3773
3773
  /* @__PURE__ */ a("div", { className: "font-semibold", children: "Success!" }),
3774
3774
  /* @__PURE__ */ a("div", { children: "Your smart order has been saved. I’ll watch the price and auto-purchase when the conditions are met." }),
@@ -3782,19 +3782,19 @@ const xt = "USD", Ks = (e, t = xt) => {
3782
3782
  }
3783
3783
  )
3784
3784
  ] }),
3785
- !Ur && /* @__PURE__ */ d("div", { className: "mt-4 rounded-lg bg-white/70 p-3 text-gray-900", children: [
3785
+ !Mr && /* @__PURE__ */ d("div", { className: "mt-4 rounded-lg bg-white/70 p-3 text-gray-900", children: [
3786
3786
  /* @__PURE__ */ a("h4", { className: "font-semibold mb-1", children: "Please post your feedback here" }),
3787
3787
  /* @__PURE__ */ a("p", { className: "text-sm text-gray-700 mb-3", children: "Rate us on how much our response was helpful" }),
3788
3788
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1 mb-3", children: [1, 2, 3, 4, 5].map((w) => /* @__PURE__ */ a(
3789
3789
  "button",
3790
3790
  {
3791
3791
  type: "button",
3792
- onClick: () => Mr(w),
3792
+ onClick: () => zr(w),
3793
3793
  className: "p-0.5",
3794
3794
  children: /* @__PURE__ */ a(
3795
- ce,
3795
+ de,
3796
3796
  {
3797
- icon: Mt && Mt >= w ? "mdi:star" : "mdi:star-outline",
3797
+ icon: Dt && Dt >= w ? "mdi:star" : "mdi:star-outline",
3798
3798
  width: "20",
3799
3799
  className: "text-yellow-500"
3800
3800
  }
@@ -3806,8 +3806,8 @@ const xt = "USD", Ks = (e, t = xt) => {
3806
3806
  /* @__PURE__ */ a(
3807
3807
  "textarea",
3808
3808
  {
3809
- value: sr,
3810
- onChange: (w) => Br(w.target.value),
3809
+ value: or,
3810
+ onChange: (w) => Dr(w.target.value),
3811
3811
  rows: 3,
3812
3812
  className: "mt-1 w-full rounded-md border border-gray-300 p-2 text-sm outline-none focus:ring-1 focus:ring-gray-300",
3813
3813
  placeholder: "Your feedback helps us improve..."
@@ -3829,14 +3829,14 @@ const xt = "USD", Ks = (e, t = xt) => {
3829
3829
  type: "button",
3830
3830
  onClick: go,
3831
3831
  className: "px-4 py-2 rounded-full text-sm font-semibold text-white shadow",
3832
- style: { background: ut },
3833
- disabled: !Mt && !sr.trim(),
3832
+ style: { background: dt },
3833
+ disabled: !Dt && !or.trim(),
3834
3834
  children: "Submit"
3835
3835
  }
3836
3836
  )
3837
3837
  ] })
3838
3838
  ] }),
3839
- Ur && /* @__PURE__ */ a("div", { className: "mt-3 text-xs text-green-900 font-medium", children: "Thanks for your feedback! 💚" })
3839
+ Mr && /* @__PURE__ */ a("div", { className: "mt-3 text-xs text-green-900 font-medium", children: "Thanks for your feedback! 💚" })
3840
3840
  ] })
3841
3841
  ] }) : null;
3842
3842
  }, yo = async () => {
@@ -3845,9 +3845,9 @@ const xt = "USD", Ks = (e, t = xt) => {
3845
3845
  const u = JSON.parse(
3846
3846
  sessionStorage.getItem("customerData") || "{}"
3847
3847
  );
3848
- let m = (u == null ? void 0 : u.basketId) || localStorage.getItem(Lt);
3848
+ let m = (u == null ? void 0 : u.basketId) || localStorage.getItem($t);
3849
3849
  if (!m) {
3850
- const f = await Ge(), w = "Bearer " + (f == null ? void 0 : f.access_token), v = await Ir(w);
3850
+ const f = await Ge(), w = "Bearer " + (f == null ? void 0 : f.access_token), v = await Cr(w);
3851
3851
  m = (v == null ? void 0 : v.basket_id) || v.basketId;
3852
3852
  }
3853
3853
  xo(m), V(m);
@@ -3859,7 +3859,7 @@ const xt = "USD", Ks = (e, t = xt) => {
3859
3859
  console.log(m, "shipping methods"), k(m);
3860
3860
  };
3861
3861
  console.log(ve, "the basket id");
3862
- const Pt = (u, m) => {
3862
+ const It = (u, m) => {
3863
3863
  O((f) => [
3864
3864
  ...f,
3865
3865
  {
@@ -3869,7 +3869,7 @@ const xt = "USD", Ks = (e, t = xt) => {
3869
3869
  snapshotPayload: m
3870
3870
  }
3871
3871
  ]);
3872
- }, Vr = (u, m) => {
3872
+ }, Rr = (u, m) => {
3873
3873
  O(
3874
3874
  (f) => f.map(
3875
3875
  (w) => w.response === "__CARD__" ? {
@@ -3886,34 +3886,33 @@ const xt = "USD", Ks = (e, t = xt) => {
3886
3886
  (m) => !(m.query === "" && m.response !== "__SNAPSHOT__" && m.response !== "__TEXT__")
3887
3887
  )
3888
3888
  );
3889
- }, qt = () => {
3890
- Ce(!1), X(!1), pe(!1), ae(!1), me(!1), D(!1), se(!1), ee(!1), re(!1), kt(null), bo(), qe(!1), ue(!1);
3889
+ }, Ut = () => {
3890
+ Ce(!1), Z(!1), pe(!1), se(!1), he(!1), D(!1), ie(!1), te(!1), ne(!1), vt(null), bo(), qe(!1), fe(!1);
3891
3891
  }, vo = () => {
3892
- X(!1), me(!1), pe(!1), _("standard"), D(!1), ae(!1), St("card"), se(!1), Ce(!1), ee(!1), Re(!0), kt(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");
3893
- }, Rt = en(() => Xt(r).map((m, f) => ({
3892
+ Z(!1), he(!1), pe(!1), _("standard"), D(!1), se(!1), kt("card"), ie(!1), Ce(!1), te(!1), Re(!0), vt(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");
3893
+ }, qt = Zr(() => Qt(r).map((m, f) => ({
3894
3894
  index: f,
3895
3895
  variant: m,
3896
3896
  images: ((m == null ? void 0 : m.images) || []).map((w) => (w == null ? void 0 : w.url) || "").filter(Boolean)
3897
- })), [r]), Ft = en(() => Rt.length ? !!((C || void 0) && (te || void 0)) : !1, [Rt, C, te, N]), ko = Ie || Se || !Ft, Et = (u) => {
3897
+ })), [r]), Pt = Zr(() => qt.length ? !!((C || void 0) && (re || void 0)) : !1, [qt, C, re, N]), ko = Ie || Se || !Pt, Ft = (u) => {
3898
3898
  const m = Number((u == null ? void 0 : u.quantity) ?? 1);
3899
3899
  return Number.isFinite(m) && m > 0 ? m : 1;
3900
- }, Yr = (u) => {
3901
- const m = Et(u), f = Number((u == null ? void 0 : u.max_price_minor) ?? 0);
3900
+ }, Hr = (u) => {
3901
+ const m = Ft(u), f = Number((u == null ? void 0 : u.max_price_minor) ?? 0);
3902
3902
  return Number.isFinite(f) && f > 0 ? +(f / 100) : +(On(r, N) * m);
3903
- }, Jr = (u) => {
3904
- var E;
3905
- const m = fe, f = Zt(N), w = u || (m == null ? void 0 : m.currency) || f.currency || xt, v = Yr(m), j = +(v * 0.08).toFixed(2), H = ((E = wt[he]) == null ? void 0 : E.price) || 0;
3903
+ }, Vr = (u) => {
3904
+ const m = me, f = Gt(N), w = u || (m == null ? void 0 : m.currency) || f.currency || yt, v = Hr(m), j = +(v * 0.08).toFixed(2), H = (X == null ? void 0 : X.price) || 0;
3906
3905
  return { product_total: v, tax: j, shipping_fee: H, currency: w };
3907
- }, ir = async (u, m, f) => {
3908
- Vr(), vo(), je(!0), re(!0), qe(!1), ue(!1);
3906
+ }, ar = async (u, m, f) => {
3907
+ Rr(), vo(), je(!0), ne(!0), qe(!1), fe(!1);
3909
3908
  const w = B.slice(-jn);
3910
3909
  try {
3911
- const v = await wr(null, null);
3910
+ const v = await pr(null, null);
3912
3911
  if (!v) throw new Error("Failed to fetch token");
3913
3912
  const j = localStorage.getItem("customerNumber"), H = localStorage.getItem("isLoggedIn"), M = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
3914
3913
  registered: String(H || !1),
3915
3914
  userId: String(j || (/* @__PURE__ */ new Date()).getTime())
3916
- }).toString()}`, T = await fetch(`${M}`, {
3915
+ }).toString()}`, E = await fetch(`${M}`, {
3917
3916
  method: "POST",
3918
3917
  headers: {
3919
3918
  "Content-Type": "application/json",
@@ -3933,19 +3932,19 @@ const xt = "USD", Ks = (e, t = xt) => {
3933
3932
  }
3934
3933
  })
3935
3934
  });
3936
- if (!T.body) throw new Error("Readable stream not supported");
3937
- const ie = T.body.getReader(), Pe = new TextDecoder();
3935
+ if (!E.body) throw new Error("Readable stream not supported");
3936
+ const le = E.body.getReader(), Pe = new TextDecoder();
3938
3937
  let ze = "", De = "", nt = "";
3939
3938
  for (; ; ) {
3940
- const { done: Ee, value: Ke } = await ie.read();
3939
+ const { done: Ee, value: Ke } = await le.read();
3941
3940
  if (Ee) break;
3942
3941
  ze += Pe.decode(Ke, { stream: !0 });
3943
- const ft = ze.split(`
3942
+ const ut = ze.split(`
3944
3943
  `);
3945
- ze = ft.pop() || "";
3946
- for (const mt of ft) {
3947
- if (!mt.startsWith("data:")) continue;
3948
- const ot = mt.slice(5).trim();
3944
+ ze = ut.pop() || "";
3945
+ for (const ft of ut) {
3946
+ if (!ft.startsWith("data:")) continue;
3947
+ const ot = ft.slice(5).trim();
3949
3948
  try {
3950
3949
  const He = JSON.parse(ot), Me = He.index, ge = He.data;
3951
3950
  Me === 0 ? De = String(ge ?? "") : Me === 1 && (nt = String(ge ?? ""));
@@ -3964,7 +3963,7 @@ const xt = "USD", Ks = (e, t = xt) => {
3964
3963
  console.log(Ke);
3965
3964
  }
3966
3965
  }
3967
- kt(Fe), Fe && O((Ee) => [
3966
+ vt(Fe), Fe && O((Ee) => [
3968
3967
  ...Ee,
3969
3968
  {
3970
3969
  query: "",
@@ -3980,52 +3979,52 @@ const xt = "USD", Ks = (e, t = xt) => {
3980
3979
  }
3981
3980
  ].slice(-jn));
3982
3981
  } catch (v) {
3983
- console.error("Error sending message to Tanya:", v), re(!1);
3982
+ console.error("Error sending message to Tanya:", v), ne(!1);
3984
3983
  } finally {
3985
3984
  je(!1);
3986
3985
  }
3987
- }, Kr = async (u) => {
3988
- if (Se || Ie || !Ft) return;
3986
+ }, Yr = async (u) => {
3987
+ if (Se || Ie || !Pt) return;
3989
3988
  const m = z.trim();
3990
3989
  if (!m) return;
3991
3990
  O((w) => [...w, { query: m, response: "" }]), Te(""), Je(m);
3992
- const f = It || "";
3991
+ const f = _t || "";
3993
3992
  if (q <= 1) {
3994
3993
  if (f) {
3995
- ir(m, f, Y);
3994
+ ar(m, f, Y);
3996
3995
  return;
3997
3996
  }
3998
- ue(!0), re(!0);
3997
+ fe(!0), ne(!0);
3999
3998
  return;
4000
3999
  }
4001
- f ? (qe(!0), re(!0)) : (ue(!0), re(!0));
4000
+ f ? (qe(!0), ne(!0)) : (fe(!0), ne(!0));
4002
4001
  }, So = () => {
4003
- const u = It;
4004
- u && ir($, u, Y);
4002
+ const u = _t;
4003
+ u && ar($, u, Y);
4005
4004
  }, No = () => {
4006
- qe(!1), ue(!0), re(!0);
4005
+ qe(!1), fe(!0), ne(!0);
4007
4006
  }, Co = () => {
4008
- if (!It) return;
4009
- ir($, It, Y);
4007
+ if (!_t) return;
4008
+ ar($, _t, Y);
4010
4009
  }, _o = async () => {
4011
- X(!0), pe(!1), ae(!1), Ce(!1), me(!1), D(!1), se(!1), ee(!1), await yo(), console.log("calling"), Vr("initial", {
4012
- extractedDetails: fe ?? void 0
4010
+ Z(!0), pe(!1), se(!1), Ce(!1), he(!1), D(!1), ie(!1), te(!1), await yo(), console.log("calling"), Rr("initial", {
4011
+ extractedDetails: me ?? void 0
4013
4012
  });
4014
4013
  }, Io = () => {
4015
4014
  if (!R) return;
4016
4015
  const u = U.find(
4017
4016
  (m) => String(m.addressId ?? m.id) === R
4018
4017
  ) || null;
4019
- u && (localStorage.setItem("agentic_order_address", JSON.stringify(u)), me(!0), pe(!0), D(!1), ae(!1), se(!1), Ce(!1), ee(!1), Pt("address", u));
4018
+ u && (localStorage.setItem("agentic_order_address", JSON.stringify(u)), he(!0), pe(!0), D(!1), se(!1), ie(!1), Ce(!1), te(!1), It("address", u));
4020
4019
  }, Po = () => {
4021
- me(!1), pe(!1), D(!1), ae(!1), se(!1), Ce(!1), ee(!1), localStorage.removeItem("agentic_order_address");
4020
+ he(!1), pe(!1), D(!1), se(!1), ie(!1), Ce(!1), te(!1), localStorage.removeItem("agentic_order_address");
4022
4021
  }, Fo = () => {
4023
- he && (localStorage.setItem("agentic_order_delivery", he), D(!0), ae(!0), se(!1), Ce(!1), ee(!1), Pt("delivery", {
4024
- method: he,
4025
- ...wt[he]
4022
+ X.id && (localStorage.setItem("agentic_order_delivery", X.id), D(!0), se(!0), ie(!1), Ce(!1), te(!1), It("delivery", {
4023
+ method: X.id,
4024
+ ...X
4026
4025
  }));
4027
- }, Wr = () => {
4028
- pe(!1), D(!1), ae(!1), se(!1), Ce(!1), ee(!1), re(!1), qt(), O((u) => [
4026
+ }, Jr = () => {
4027
+ pe(!1), D(!1), se(!1), ie(!1), Ce(!1), te(!1), ne(!1), Ut(), O((u) => [
4029
4028
  ...u,
4030
4029
  {
4031
4030
  query: "",
@@ -4036,11 +4035,11 @@ const xt = "USD", Ks = (e, t = xt) => {
4036
4035
  }
4037
4036
  ]);
4038
4037
  }, Eo = () => {
4039
- D(!1), ae(!1), se(!1), Ce(!1), ee(!1), localStorage.removeItem("agentic_order_delivery");
4038
+ D(!1), se(!1), ie(!1), Ce(!1), te(!1), localStorage.removeItem("agentic_order_delivery");
4040
4039
  }, To = () => {
4041
- Ae && (localStorage.setItem("agentic_order_payment", Ae), se(!0), Ce(!0), ee(!1), Pt("payment", { method: Ae }));
4040
+ Ae && (localStorage.setItem("agentic_order_payment", Ae), ie(!0), Ce(!0), te(!1), It("payment", { method: Ae }));
4042
4041
  }, Ao = () => {
4043
- ae(!1), se(!1), Ce(!1), ee(!1), re(!1), qt(), O((u) => [
4042
+ se(!1), ie(!1), Ce(!1), te(!1), ne(!1), Ut(), O((u) => [
4044
4043
  ...u,
4045
4044
  {
4046
4045
  query: "",
@@ -4051,18 +4050,18 @@ const xt = "USD", Ks = (e, t = xt) => {
4051
4050
  }
4052
4051
  ]);
4053
4052
  }, Oo = () => {
4054
- se(!1), Ce(!1), ee(!1), localStorage.removeItem("agentic_order_payment");
4053
+ ie(!1), Ce(!1), te(!1), localStorage.removeItem("agentic_order_payment");
4055
4054
  }, jo = async () => {
4056
4055
  try {
4057
4056
  je(!0);
4058
- const u = fe || {}, m = JSON.parse(
4057
+ const u = me || {}, m = JSON.parse(
4059
4058
  localStorage.getItem("agentic_order_address") || "null"
4060
4059
  ), f = localStorage.getItem(
4061
4060
  "agentic_order_delivery"
4062
- ), w = localStorage.getItem("agentic_order_payment") || "card", { product_total: v, tax: j, shipping_fee: H, currency: E } = Jr(), M = u.shopper_id || localStorage.getItem("customerId") || void 0, T = (m == null ? void 0 : m.addressId) || (m == null ? void 0 : m.id) || void 0, ie = f ? Gs[f] : "GROUND", Pe = "card-visa", ze = N == null ? void 0 : N.sku, De = (r == null ? void 0 : r.id) || "", nt = Et(u), Fe = typeof u.max_price_minor == "number" ? u.max_price_minor : Math.round(v * 100), ft = {
4061
+ ), w = localStorage.getItem("agentic_order_payment") || "card", { product_total: v, tax: j, shipping_fee: H, currency: A } = Vr(), M = u.shopper_id || localStorage.getItem("customerId") || void 0, E = (m == null ? void 0 : m.addressId) || (m == null ? void 0 : m.id) || void 0, le = f ? Gs[f] : "GROUND", Pe = "card-visa", ze = N == null ? void 0 : N.sku, De = (r == null ? void 0 : r.id) || "", nt = Ft(u), Fe = typeof u.max_price_minor == "number" ? u.max_price_minor : Math.round(v * 100), ut = {
4063
4062
  shopper_id: M,
4064
- shipping_address_id: T,
4065
- shipping_method_id: ie,
4063
+ shipping_address_id: E,
4064
+ shipping_method_id: le,
4066
4065
  payment_method_id: Pe,
4067
4066
  sku: ze,
4068
4067
  platform: "SFCC",
@@ -4070,15 +4069,15 @@ const xt = "USD", Ks = (e, t = xt) => {
4070
4069
  product_id: De,
4071
4070
  quantity: nt,
4072
4071
  max_price_minor: Fe,
4073
- currency: E,
4072
+ currency: A,
4074
4073
  instruction_text: $
4075
4074
  };
4076
- if (console.log(M, T, "the selected ids"), !M || !T) {
4075
+ if (console.log(M, E, "the selected ids"), !M || !E) {
4077
4076
  console.error(
4078
4077
  "Missing shopper_id or shipping_address_id for intent-mandate",
4079
4078
  {
4080
4079
  shopperId: M,
4081
- shippingAddressId: T
4080
+ shippingAddressId: E
4082
4081
  }
4083
4082
  ), alert(
4084
4083
  "Missing customer or address information. Please re-select address and try again."
@@ -4094,7 +4093,7 @@ const xt = "USD", Ks = (e, t = xt) => {
4094
4093
  "Content-Type": "application/json",
4095
4094
  Authorization: `Bearer ${ot}`
4096
4095
  },
4097
- body: JSON.stringify(ft)
4096
+ body: JSON.stringify(ut)
4098
4097
  });
4099
4098
  if (!Me.ok) {
4100
4099
  const Bo = await Me.text().catch(() => "");
@@ -4105,17 +4104,17 @@ const xt = "USD", Ks = (e, t = xt) => {
4105
4104
  }
4106
4105
  const ge = await Me.json().catch(() => null);
4107
4106
  console.log("intent-mandate success:", ge);
4108
- const at = (ge == null ? void 0 : ge.intent_mandate_id) || (ge == null ? void 0 : ge.intent_mandateId) || (ge == null ? void 0 : ge.key) || null;
4109
- at && _t(at);
4110
- const Ht = {
4107
+ const mt = (ge == null ? void 0 : ge.intent_mandate_id) || (ge == null ? void 0 : ge.intent_mandateId) || (ge == null ? void 0 : ge.key) || null;
4108
+ mt && Ct(mt);
4109
+ const Xr = {
4111
4110
  ...u,
4112
4111
  address: m,
4113
4112
  delivery: f,
4114
4113
  payment: w,
4115
- summary: { product_total: v, tax: j, shipping_fee: H, currency: E },
4116
- intent_mandate_id: at
4114
+ summary: { product_total: v, tax: j, shipping_fee: H, currency: A },
4115
+ intent_mandate_id: mt
4117
4116
  };
4118
- localStorage.setItem("agentic_order_final", JSON.stringify(Ht)), ee(!0), Re(!1), Pt("final", Ht), Pt("success", { intentMandateId: at }), qt();
4117
+ localStorage.setItem("agentic_order_final", JSON.stringify(Xr)), te(!0), Re(!1), It("final", Xr), It("success", { intentMandateId: mt }), Ut();
4119
4118
  } catch (u) {
4120
4119
  console.error("Error in handleConfirmWatch / intent-mandate:", u), alert(
4121
4120
  "Unable to complete your smart order right now. Please try again in a moment."
@@ -4123,8 +4122,8 @@ const xt = "USD", Ks = (e, t = xt) => {
4123
4122
  } finally {
4124
4123
  je(!1);
4125
4124
  }
4126
- }, Qr = () => {
4127
- qt(), O((u) => [
4125
+ }, Kr = () => {
4126
+ Ut(), O((u) => [
4128
4127
  ...u,
4129
4128
  {
4130
4129
  query: "",
@@ -4135,8 +4134,8 @@ const xt = "USD", Ks = (e, t = xt) => {
4135
4134
  }
4136
4135
  ]);
4137
4136
  }, $o = ({ selectedIndex: u }) => {
4138
- var T;
4139
- const m = ((T = y[u]) == null ? void 0 : T.images.large[0].link) || Tn(r, N), f = An(r), w = It || "", v = ht(N) || "", j = gt(N) || "", { amount: H } = Zt(N), E = !!(r != null && r.id), M = E;
4137
+ var E;
4138
+ const m = ((E = y[u]) == null ? void 0 : E.images.large[0].link) || Tn(r, N), f = An(r), w = _t || "", v = pt(N) || "", j = gt(N) || "", { amount: H } = Gt(N), A = !!(r != null && r.id), M = A;
4140
4139
  return /* @__PURE__ */ a("div", { className: "mx-4 mt-2 rounded-xl border border-gray-200 bg-white p-4", children: /* @__PURE__ */ d("div", { className: "flex flex-col sm:flex-row items-center sm:items-center gap-4", children: [
4141
4140
  /* @__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: m ? /* @__PURE__ */ a(
4142
4141
  "img",
@@ -4146,7 +4145,7 @@ const xt = "USD", Ks = (e, t = xt) => {
4146
4145
  className: "object-contain w-full h-full"
4147
4146
  }
4148
4147
  ) : /* @__PURE__ */ a(
4149
- ce,
4148
+ de,
4150
4149
  {
4151
4150
  icon: "mdi:image-outline",
4152
4151
  width: "28",
@@ -4160,20 +4159,20 @@ const xt = "USD", Ks = (e, t = xt) => {
4160
4159
  v && `Color: ${v}`,
4161
4160
  j && `Size: ${j}`
4162
4161
  ].filter(Boolean).join(" • ") || "—" }),
4163
- /* @__PURE__ */ a("div", { className: "mt-1 text-xl font-semibold text-gray-900", children: E ? (
4162
+ /* @__PURE__ */ a("div", { className: "mt-1 text-xl font-semibold text-gray-900", children: A ? (
4164
4163
  // ? formatCurrency(Number(unitPrice) || 0, CURRENCY_PREF)
4165
4164
  `$${r.price}`
4166
4165
  ) : "Currently unavailable" }),
4167
- E && !M && /* @__PURE__ */ a("div", { className: "mt-1 text-xs font-medium text-red-600", children: "Currently out of stock" })
4166
+ A && !M && /* @__PURE__ */ a("div", { className: "mt-1 text-xs font-medium text-red-600", children: "Currently out of stock" })
4168
4167
  ] })
4169
4168
  ] }) });
4170
- }, Gr = ({
4169
+ }, Wr = ({
4171
4170
  showSubmit: u = !0
4172
4171
  }) => {
4173
4172
  const m = {};
4174
- Rt.map((w) => ht(w.variant)).filter((w) => !!w && !m[w] && (m[w] = !0));
4173
+ qt.map((w) => pt(w.variant)).filter((w) => !!w && !m[w] && (m[w] = !0));
4175
4174
  const f = {};
4176
- return Rt.map((w) => gt(w.variant)).filter((w) => !!w && !f[w] && (f[w] = !0)), /* @__PURE__ */ d("div", { className: "mx-4 mt-4 mb-2 rounded-xl border border-gray-200 bg-white p-4 animate-fade-in", children: [
4175
+ return qt.map((w) => gt(w.variant)).filter((w) => !!w && !f[w] && (f[w] = !0)), /* @__PURE__ */ d("div", { className: "mx-4 mt-4 mb-2 rounded-xl border border-gray-200 bg-white p-4 animate-fade-in", children: [
4177
4176
  /* @__PURE__ */ a("h3", { className: "font-semibold text-gray-800", children: "Choose a variant" }),
4178
4177
  /* @__PURE__ */ d("div", { className: "mt-4", children: [
4179
4178
  /* @__PURE__ */ d("div", { className: "flex items-baseline gap-2", children: [
@@ -4181,7 +4180,7 @@ const xt = "USD", Ks = (e, t = xt) => {
4181
4180
  C && /* @__PURE__ */ a("div", { className: "text-sm text-gray-600", children: C })
4182
4181
  ] }),
4183
4182
  /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-4 mt-2", children: y.map((w, v) => {
4184
- const j = w.name, H = C === j, E = w.images.large[0].disBaseLink || w.images.large[0].link;
4183
+ const j = w.name, H = C === j, A = w.images.large[0].disBaseLink || w.images.large[0].link;
4185
4184
  return /* @__PURE__ */ a(
4186
4185
  "div",
4187
4186
  {
@@ -4195,10 +4194,10 @@ const xt = "USD", Ks = (e, t = xt) => {
4195
4194
  },
4196
4195
  className: "w-full h-20 flex items-center justify-center overflow-hidden",
4197
4196
  title: j,
4198
- children: E ? /* @__PURE__ */ a(
4197
+ children: A ? /* @__PURE__ */ a(
4199
4198
  "img",
4200
4199
  {
4201
- src: E,
4200
+ src: A,
4202
4201
  alt: j,
4203
4202
  className: "w/full h-full object-contain"
4204
4203
  }
@@ -4213,7 +4212,7 @@ const xt = "USD", Ks = (e, t = xt) => {
4213
4212
  C && /* @__PURE__ */ d("div", { className: "mt-4", children: [
4214
4213
  /* @__PURE__ */ d("div", { className: "flex items-baseline gap-2", children: [
4215
4214
  /* @__PURE__ */ a("div", { className: "text-sm font-bold", children: "Size :" }),
4216
- te && /* @__PURE__ */ a("div", { className: "text-sm text-gray-600", children: te })
4215
+ re && /* @__PURE__ */ a("div", { className: "text-sm text-gray-600", children: re })
4217
4216
  ] }),
4218
4217
  /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-2", children: (() => {
4219
4218
  const w = y.find(
@@ -4225,9 +4224,9 @@ const xt = "USD", Ks = (e, t = xt) => {
4225
4224
  "button",
4226
4225
  {
4227
4226
  onClick: () => {
4228
- ye(H), _e(j), ho(v.productId);
4227
+ ye(H), _e(j), po(v.productId);
4229
4228
  },
4230
- className: `px-4 py-2 rounded-md border text-sm ${te === H ? "border-2 border-[#804c9e] font-semibold" : "border-gray-300"}`,
4229
+ className: `px-4 py-2 rounded-md border text-sm ${re === H ? "border-2 border-[#804c9e] font-semibold" : "border-gray-300"}`,
4231
4230
  title: H,
4232
4231
  children: H
4233
4232
  },
@@ -4242,16 +4241,16 @@ const xt = "USD", Ks = (e, t = xt) => {
4242
4241
  onClick: Co,
4243
4242
  className: "px-6 py-2.5 rounded-full font-semibold text-white shadow-md",
4244
4243
  style: { background: Le },
4245
- disabled: !Ft,
4244
+ disabled: !Pt,
4246
4245
  children: "Submit"
4247
4246
  }
4248
4247
  ) })
4249
4248
  ] });
4250
- }, Xr = (u, m = !0) => {
4249
+ }, Qr = (u, m = !0) => {
4251
4250
  !(u != null && u.extractedDetails) && u && (u = { extractedDetails: u });
4252
- const f = (u == null ? void 0 : u.extractedDetails) || fe;
4251
+ const f = (u == null ? void 0 : u.extractedDetails) || me;
4253
4252
  if (!f) return null;
4254
- const w = Et(f), { currency: v } = Zt(N), j = On(r, N), H = Number((f == null ? void 0 : f.max_price_minor) ?? 0), M = Number.isFinite(H) && H > 0 ? +(H / 100) : +(j * w), T = (f == null ? void 0 : f.currency) || v || xt, ie = N != null && N.sku ? N.sku : f.product_id;
4253
+ const w = Ft(f), { currency: v } = Gt(N), j = On(r, N), H = Number((f == null ? void 0 : f.max_price_minor) ?? 0), M = Number.isFinite(H) && H > 0 ? +(H / 100) : +(j * w), E = (f == null ? void 0 : f.currency) || v || yt, le = N != null && N.sku ? N.sku : f.product_id;
4255
4254
  return /* @__PURE__ */ d(
4256
4255
  "div",
4257
4256
  {
@@ -4262,25 +4261,25 @@ const xt = "USD", Ks = (e, t = xt) => {
4262
4261
  "p",
4263
4262
  {
4264
4263
  className: "text-base font-semibold text-center mt-2",
4265
- style: { color: Rr },
4264
+ style: { color: Ur },
4266
4265
  children: "Here’s what I found from your instruction:"
4267
4266
  }
4268
4267
  ),
4269
4268
  /* @__PURE__ */ d("div", { className: "w-full max-w-md bg-white rounded-xl shadow-inner p-4", children: [
4270
4269
  /* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-y-2 text-sm", children: [
4271
4270
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "SKU:" }),
4272
- /* @__PURE__ */ a("p", { className: "text-gray-800", children: ie }),
4271
+ /* @__PURE__ */ a("p", { className: "text-gray-800", children: le }),
4273
4272
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Quantity:" }),
4274
- /* @__PURE__ */ a("p", { className: "text-gray-800", children: Et(f) }),
4273
+ /* @__PURE__ */ a("p", { className: "text-gray-800", children: Ft(f) }),
4275
4274
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Currency:" }),
4276
- /* @__PURE__ */ a("p", { className: "text-gray-800", children: T }),
4275
+ /* @__PURE__ */ a("p", { className: "text-gray-800", children: E }),
4277
4276
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Maximum Total Price:" }),
4278
- /* @__PURE__ */ a("p", { className: "text-gray-800", children: st(M, T) })
4277
+ /* @__PURE__ */ a("p", { className: "text-gray-800", children: at(M, E) })
4279
4278
  ] }),
4280
4279
  /* @__PURE__ */ d("div", { className: "mt-3 flex flex-wrap gap-2 text-xs", children: [
4281
- ht(N) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4280
+ pt(N) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4282
4281
  "Color: ",
4283
- ht(N)
4282
+ pt(N)
4284
4283
  ] }),
4285
4284
  gt(N) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4286
4285
  "Size: ",
@@ -4297,7 +4296,7 @@ const xt = "USD", Ks = (e, t = xt) => {
4297
4296
  "p",
4298
4297
  {
4299
4298
  className: "text-sm font-medium text-gray-700 text-center max-w-[90%] leading-relaxed",
4300
- style: { color: Rr },
4299
+ style: { color: Ur },
4301
4300
  children: [
4302
4301
  "Would you like me to ",
4303
4302
  /* @__PURE__ */ a("strong", { children: "lock this in" }),
@@ -4315,7 +4314,7 @@ const xt = "USD", Ks = (e, t = xt) => {
4315
4314
  style: { background: Le },
4316
4315
  children: [
4317
4316
  /* @__PURE__ */ a(
4318
- ce,
4317
+ de,
4319
4318
  {
4320
4319
  icon: "fluent:checkmark-circle-24-filled",
4321
4320
  className: "mr-2",
@@ -4330,13 +4329,13 @@ const xt = "USD", Ks = (e, t = xt) => {
4330
4329
  /* @__PURE__ */ d(
4331
4330
  "button",
4332
4331
  {
4333
- onClick: Qr,
4332
+ onClick: Kr,
4334
4333
  disabled: W,
4335
4334
  className: `relative inline-flex items-center justify-center px-6 py-2.5 rounded-full font-semibold border transition-all duration-300 ${W ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
4336
4335
  style: { borderColor: Le, color: Le },
4337
4336
  children: [
4338
4337
  /* @__PURE__ */ a(
4339
- ce,
4338
+ de,
4340
4339
  {
4341
4340
  icon: "fluent:dismiss-circle-24-filled",
4342
4341
  className: "mr-2",
@@ -4353,15 +4352,15 @@ const xt = "USD", Ks = (e, t = xt) => {
4353
4352
  ]
4354
4353
  }
4355
4354
  );
4356
- }, Zr = (u, m = !0) => {
4357
- var mt, ot, He, Me, ge, at;
4358
- const f = u || {}, w = ((mt = f == null ? void 0 : f.summary) == null ? void 0 : mt.currency) || (fe == null ? void 0 : fe.currency) || xt, v = Tn(r, N), j = An(r), H = N != null && N.sku ? N.sku : (r == null ? void 0 : r.id) ?? (fe == null ? void 0 : fe.product_id), E = (N == null ? void 0 : N.sku) ?? ei(r), M = ht(N) || ti(r), T = gt(N) || ri(r), ie = Et(f), Pe = ((ot = f == null ? void 0 : f.summary) == null ? void 0 : ot.product_total) != null ? +f.summary.product_total : Yr(f), ze = ie > 0 ? +(Pe / ie).toFixed(2) : 0, De = Pe, nt = ((He = f == null ? void 0 : f.summary) == null ? void 0 : He.tax) ?? +(Pe * 0.08).toFixed(2), Fe = ((Me = f == null ? void 0 : f.summary) == null ? void 0 : Me.shipping_fee) ?? (((ge = wt[he]) == null ? void 0 : ge.price) || 0), Ee = f != null && f.address ? [
4355
+ }, Gr = (u, m = !0) => {
4356
+ var ft, ot, He, Me, ge;
4357
+ const f = u || {}, w = ((ft = f == null ? void 0 : f.summary) == null ? void 0 : ft.currency) || (me == null ? void 0 : me.currency) || yt, v = Tn(r, N), j = An(r), H = N != null && N.sku ? N.sku : (r == null ? void 0 : r.id) ?? (me == null ? void 0 : me.product_id), A = (N == null ? void 0 : N.sku) ?? ei(r), M = pt(N) || ti(r), E = gt(N) || ri(r), le = Ft(f), Pe = ((ot = f == null ? void 0 : f.summary) == null ? void 0 : ot.product_total) != null ? +f.summary.product_total : Hr(f), ze = le > 0 ? +(Pe / le).toFixed(2) : 0, De = Pe, nt = ((He = f == null ? void 0 : f.summary) == null ? void 0 : He.tax) ?? +(Pe * 0.08).toFixed(2), Fe = ((Me = f == null ? void 0 : f.summary) == null ? void 0 : Me.shipping_fee) ?? ((X == null ? void 0 : X.price) || 0), Ee = f != null && f.address ? [
4359
4358
  f.address.addressLine1,
4360
4359
  f.address.addressLine2,
4361
4360
  f.address.street,
4362
4361
  [f.address.city, f.address.state, f.address.postalCode].filter(Boolean).join(", "),
4363
4362
  f.address.country
4364
- ].filter(Boolean).map((Ht) => We(String(Ht))).join(", ") : "—", Ke = (f == null ? void 0 : f.payment) || "card", ft = Ke === "card" ? /* @__PURE__ */ d(ke, { children: [
4363
+ ].filter(Boolean).map((mt) => We(String(mt))).join(", ") : "—", Ke = (f == null ? void 0 : f.payment) || "card", ut = Ke === "card" ? /* @__PURE__ */ d(ke, { children: [
4365
4364
  "Credit Card — Mastercard",
4366
4365
  /* @__PURE__ */ a("br", {}),
4367
4366
  "•••• 7820 Exp: 12/26"
@@ -4369,11 +4368,11 @@ const xt = "USD", Ks = (e, t = xt) => {
4369
4368
  return /* @__PURE__ */ d("div", { className: "mx-auto mt-3 mb-3 rounded-2xl bg-white", children: [
4370
4369
  /* @__PURE__ */ a("div", { className: "px-6 pt-5 pb-3", children: /* @__PURE__ */ d("h3", { className: "font-semibold text-lg mb-2 text-gray-800 flex items-center gap-2", children: [
4371
4370
  /* @__PURE__ */ a(
4372
- ce,
4371
+ de,
4373
4372
  {
4374
4373
  icon: "mdi:receipt-text-check-outline",
4375
4374
  width: "24",
4376
- color: ut
4375
+ color: dt
4377
4376
  }
4378
4377
  ),
4379
4378
  "All set! Here’s what your smart order looks like 🧾"
@@ -4387,7 +4386,7 @@ const xt = "USD", Ks = (e, t = xt) => {
4387
4386
  className: "w-full h-full object-contain"
4388
4387
  }
4389
4388
  ) : /* @__PURE__ */ a(
4390
- ce,
4389
+ de,
4391
4390
  {
4392
4391
  icon: "mdi:image-outline",
4393
4392
  width: "24",
@@ -4402,11 +4401,11 @@ const xt = "USD", Ks = (e, t = xt) => {
4402
4401
  " ",
4403
4402
  H ?? "—"
4404
4403
  ] }),
4405
- (E || M || T) && /* @__PURE__ */ d("div", { className: "text-xs text-gray-600 mt-0.5 text-center", children: [
4406
- E && /* @__PURE__ */ d(ke, { children: [
4404
+ (A || M || E) && /* @__PURE__ */ d("div", { className: "text-xs text-gray-600 mt-0.5 text-center", children: [
4405
+ A && /* @__PURE__ */ d(ke, { children: [
4407
4406
  /* @__PURE__ */ a("span", { className: "font-medium", children: "SKU:" }),
4408
4407
  " ",
4409
- E,
4408
+ A,
4410
4409
  "  "
4411
4410
  ] }),
4412
4411
  M && /* @__PURE__ */ d(ke, { children: [
@@ -4415,25 +4414,25 @@ const xt = "USD", Ks = (e, t = xt) => {
4415
4414
  M,
4416
4415
  "  "
4417
4416
  ] }),
4418
- T && /* @__PURE__ */ d(ke, { children: [
4417
+ E && /* @__PURE__ */ d(ke, { children: [
4419
4418
  /* @__PURE__ */ a("span", { className: "font-medium", children: "Size:" }),
4420
4419
  " ",
4421
- T
4420
+ E
4422
4421
  ] })
4423
4422
  ] })
4424
4423
  ] }),
4425
4424
  /* @__PURE__ */ d("div", { className: "grid grid-cols-1 md-grid-cols-3 md:grid-cols-3 gap-3", children: [
4426
4425
  /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
4427
4426
  /* @__PURE__ */ a("div", { className: "text-[11px] uppercase tracking-wide text-gray-500", children: "Unit Price" }),
4428
- /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: st(ze, w) })
4427
+ /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: at(ze, w) })
4429
4428
  ] }),
4430
4429
  /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
4431
4430
  /* @__PURE__ */ a("div", { className: "text-[11px] uppercase tracking-wide text-gray-500", children: "Quantity" }),
4432
- /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: ie })
4431
+ /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: le })
4433
4432
  ] }),
4434
4433
  /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
4435
4434
  /* @__PURE__ */ a("div", { className: "text-[11px] uppercase tracking-wide text-gray-500", children: "Subtotal" }),
4436
- /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: st(De, w) })
4435
+ /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: at(De, w) })
4437
4436
  ] })
4438
4437
  ] })
4439
4438
  ] })
@@ -4446,58 +4445,58 @@ const xt = "USD", Ks = (e, t = xt) => {
4446
4445
  ] }),
4447
4446
  /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4448
4447
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "💳 Payment" }),
4449
- /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: ft })
4448
+ /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: ut })
4450
4449
  ] }),
4451
4450
  /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4452
4451
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🚚 Delivery" }),
4453
- /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: f != null && f.delivery && ((at = wt[f.delivery]) == null ? void 0 : at.name) || "—" })
4452
+ /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: f != null && f.delivery && ((ge = Fn[f.delivery]) == null ? void 0 : ge.name) || "—" })
4454
4453
  ] })
4455
4454
  ] }),
4456
4455
  /* @__PURE__ */ d("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3", children: [
4457
4456
  /* @__PURE__ */ d("div", { className: "flex flex-col items-center justify-center rounded-xl border border-gray-200 bg-gray-50 p-4 text-center", children: [
4458
4457
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "💰 any(s)" }),
4459
- /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: st(Pe, w) })
4458
+ /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: at(Pe, w) })
4460
4459
  ] }),
4461
4460
  /* @__PURE__ */ d("div", { className: "flex flex-col items-center justify-center rounded-xl border border-gray-200 bg-gray-50 p-4 text-center", children: [
4462
4461
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🏛️ Taxes" }),
4463
- /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: st(nt, w) })
4462
+ /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: at(nt, w) })
4464
4463
  ] }),
4465
4464
  /* @__PURE__ */ d("div", { className: "flex flex-col items-center justify-center rounded-xl border border-gray-200 bg-gray-50 p-4 text-center", children: [
4466
4465
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🚚 Shipping" }),
4467
- /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: st(Fe, w) })
4466
+ /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: at(Fe, w) })
4468
4467
  ] })
4469
4468
  ] }),
4470
4469
  /* @__PURE__ */ d(
4471
4470
  "div",
4472
4471
  {
4473
4472
  className: "mt-4 rounded-xl p-4 text-center text-white shadow-sm",
4474
- style: { background: Ut },
4473
+ style: { background: Bt },
4475
4474
  children: [
4476
4475
  /* @__PURE__ */ a("div", { className: "text-sm/5 opacity-95", children: "🔹 Total Payable" }),
4477
- /* @__PURE__ */ a("div", { className: "mt-1 text-3xl font-extrabold tracking-tight", children: st(Pe + nt + Fe, w) })
4476
+ /* @__PURE__ */ a("div", { className: "mt-1 text-3xl font-extrabold tracking-tight", children: at(Pe + nt + Fe, w) })
4478
4477
  ]
4479
4478
  }
4480
4479
  )
4481
4480
  ] }),
4482
4481
  !m && /* @__PURE__ */ d("div", { className: "px-6 pb-5", children: [
4483
4482
  !F && /* @__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?" }),
4484
- F && Hr({ intentMandateId: Ct }),
4483
+ F && qr({ intentMandateId: Nt }),
4485
4484
  $e && !F && /* @__PURE__ */ d("div", { className: "mt-4 flex flex-wrap items-center justify-center gap-3", children: [
4486
4485
  /* @__PURE__ */ a(
4487
4486
  "button",
4488
4487
  {
4489
4488
  onClick: jo,
4490
4489
  className: "inline-flex items-center justify-center rounded-full px-6 py-2.5 font-semibold text-white shadow-md transition-transform duration-150 hover:-translate-y-0.5 hover:shadow-lg",
4491
- style: { background: Ut },
4490
+ style: { background: Bt },
4492
4491
  children: "Confirm"
4493
4492
  }
4494
4493
  ),
4495
4494
  /* @__PURE__ */ a(
4496
4495
  "button",
4497
4496
  {
4498
- onClick: Qr,
4497
+ onClick: Kr,
4499
4498
  className: "inline-flex items-center justify-center rounded-full border px-6 py-2.5 font-semibold hover:bg-gray-50",
4500
- style: { borderColor: Ut, color: Ut },
4499
+ style: { borderColor: Bt, color: Bt },
4501
4500
  children: "Cancel"
4502
4501
  }
4503
4502
  )
@@ -4520,7 +4519,7 @@ const xt = "USD", Ks = (e, t = xt) => {
4520
4519
  style: { backgroundColor: "var(--tanya-light)" },
4521
4520
  children: /* @__PURE__ */ d("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4522
4521
  /* @__PURE__ */ d("div", { className: "flex items-center gap-2 mb-2", children: [
4523
- /* @__PURE__ */ a(ce, { icon: "mdi:home-map-marker", width: "20", color: ut }),
4522
+ /* @__PURE__ */ a(de, { icon: "mdi:home-map-marker", width: "20", color: dt }),
4524
4523
  /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Delivery Address" })
4525
4524
  ] }),
4526
4525
  /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: m })
@@ -4528,7 +4527,7 @@ const xt = "USD", Ks = (e, t = xt) => {
4528
4527
  }
4529
4528
  );
4530
4529
  }, zo = (u) => {
4531
- const m = u == null ? void 0 : u.method, f = m ? wt[m] : void 0;
4530
+ const m = u == null ? void 0 : u.method, f = m ? Fn[m] : void 0;
4532
4531
  return /* @__PURE__ */ a(
4533
4532
  "div",
4534
4533
  {
@@ -4536,12 +4535,12 @@ const xt = "USD", Ks = (e, t = xt) => {
4536
4535
  style: { backgroundColor: "var(--tanya-light)" },
4537
4536
  children: /* @__PURE__ */ d("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4538
4537
  /* @__PURE__ */ d("div", { className: "flex items-center gap-2 mb-1", children: [
4539
- /* @__PURE__ */ a(ce, { icon: "mdi:truck-delivery", width: "20", color: ut }),
4538
+ /* @__PURE__ */ a(de, { icon: "mdi:truck-delivery", width: "20", color: dt }),
4540
4539
  /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Delivery Method" })
4541
4540
  ] }),
4542
4541
  /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: f ? /* @__PURE__ */ d(ke, { children: [
4543
4542
  /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
4544
- /* @__PURE__ */ a(ce, { icon: f.icon, width: "18" }),
4543
+ /* @__PURE__ */ a(de, { icon: f.icon, width: "18" }),
4545
4544
  /* @__PURE__ */ a("span", { className: "font-medium", children: f.label })
4546
4545
  ] }),
4547
4546
  /* @__PURE__ */ a("div", { className: "text-gray-600", children: f.subtitle })
@@ -4559,11 +4558,11 @@ const xt = "USD", Ks = (e, t = xt) => {
4559
4558
  children: /* @__PURE__ */ d("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4560
4559
  /* @__PURE__ */ d("div", { className: "flex items-center gap-2 mb-1", children: [
4561
4560
  /* @__PURE__ */ a(
4562
- ce,
4561
+ de,
4563
4562
  {
4564
4563
  icon: "mdi:credit-card-outline",
4565
4564
  width: "20",
4566
- color: ut
4565
+ color: dt
4567
4566
  }
4568
4567
  ),
4569
4568
  /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Payment Method" })
@@ -4578,11 +4577,11 @@ const xt = "USD", Ks = (e, t = xt) => {
4578
4577
  );
4579
4578
  }, Mo = (u, m) => {
4580
4579
  const f = u.snapshotStage;
4581
- if (!f || f === "address" && W || f === "delivery" && Ne || f === "payment" && oe || f === "final" && Nt)
4580
+ if (!f || f === "address" && W || f === "delivery" && Ne || f === "payment" && ae || f === "final" && St)
4582
4581
  return null;
4583
4582
  switch (f) {
4584
4583
  case "initial":
4585
- return Xr(u.snapshotPayload, !m);
4584
+ return Qr(u.snapshotPayload, !m);
4586
4585
  case "address":
4587
4586
  return Lo(u.snapshotPayload);
4588
4587
  case "delivery":
@@ -4590,9 +4589,9 @@ const xt = "USD", Ks = (e, t = xt) => {
4590
4589
  case "payment":
4591
4590
  return Do(u.snapshotPayload);
4592
4591
  case "final":
4593
- return Zr(u.snapshotPayload, !m);
4592
+ return Gr(u.snapshotPayload, !m);
4594
4593
  case "success":
4595
- return Hr(u.snapshotPayload);
4594
+ return qr(u.snapshotPayload);
4596
4595
  default:
4597
4596
  return null;
4598
4597
  }
@@ -4670,7 +4669,7 @@ const xt = "USD", Ks = (e, t = xt) => {
4670
4669
  margin: "0.75rem"
4671
4670
  },
4672
4671
  children: /* @__PURE__ */ a(
4673
- ce,
4672
+ de,
4674
4673
  {
4675
4674
  icon: "fluent:dismiss-24-filled",
4676
4675
  color: "#ffffff",
@@ -4688,7 +4687,7 @@ const xt = "USD", Ks = (e, t = xt) => {
4688
4687
  /* @__PURE__ */ d(
4689
4688
  "div",
4690
4689
  {
4691
- ref: Bt,
4690
+ ref: Mt,
4692
4691
  className: "overflow-y-auto pr-5 pb-4 space-y-4 hide-scrollbar flex-grow",
4693
4692
  children: [
4694
4693
  /* @__PURE__ */ d(
@@ -4708,10 +4707,10 @@ const xt = "USD", Ks = (e, t = xt) => {
4708
4707
  }
4709
4708
  ),
4710
4709
  /* @__PURE__ */ a($o, { selectedIndex: I }),
4711
- q > 1 && /* @__PURE__ */ a(Gr, { showSubmit: !1 }),
4712
- p.map((u, m) => {
4710
+ q > 1 && /* @__PURE__ */ a(Wr, { showSubmit: !1 }),
4711
+ h.map((u, m) => {
4713
4712
  var v;
4714
- const f = m === p.length - 1, w = !!u.snapshotStage;
4713
+ const f = m === h.length - 1, w = !!u.snapshotStage;
4715
4714
  return /* @__PURE__ */ d("div", { children: [
4716
4715
  u.query && /* @__PURE__ */ a("div", { className: "flex justify-end", children: /* @__PURE__ */ a(
4717
4716
  "p",
@@ -4735,14 +4734,14 @@ const xt = "USD", Ks = (e, t = xt) => {
4735
4734
  children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ a("p", { children: u.snapshotPayload.text }) })
4736
4735
  }
4737
4736
  ) }),
4738
- f && dt && q > 1 && /* @__PURE__ */ d("div", { className: "mx-4 mt-2 rounded-xl border border-gray-200 bg-white p-4 animate-fade-in", children: [
4737
+ f && ct && q > 1 && /* @__PURE__ */ d("div", { className: "mx-4 mt-2 rounded-xl border border-gray-200 bg-white p-4 animate-fade-in", children: [
4739
4738
  /* @__PURE__ */ d("div", { className: "text-sm text-gray-800", children: [
4740
4739
  "Proceed with color:",
4741
4740
  " ",
4742
4741
  /* @__PURE__ */ a("span", { className: "font-semibold", children: C || "—" }),
4743
4742
  ", size:",
4744
4743
  " ",
4745
- /* @__PURE__ */ a("span", { className: "font-semibold", children: te || "—" }),
4744
+ /* @__PURE__ */ a("span", { className: "font-semibold", children: re || "—" }),
4746
4745
  "?"
4747
4746
  ] }),
4748
4747
  /* @__PURE__ */ d("div", { className: "mt-3 flex gap-3", children: [
@@ -4769,7 +4768,7 @@ const xt = "USD", Ks = (e, t = xt) => {
4769
4768
  )
4770
4769
  ] })
4771
4770
  ] }),
4772
- f && rt && /* @__PURE__ */ a(Gr, { showSubmit: !0 }),
4771
+ f && rt && /* @__PURE__ */ a(Wr, { showSubmit: !0 }),
4773
4772
  f && Ie && /* @__PURE__ */ a("div", { className: "mt-4", children: /* @__PURE__ */ a(
4774
4773
  "div",
4775
4774
  {
@@ -4791,7 +4790,7 @@ const xt = "USD", Ks = (e, t = xt) => {
4791
4790
  boxShadow: "0 2px 8px rgba(0,0,0,0.08)",
4792
4791
  overflow: "hidden"
4793
4792
  },
4794
- children: w ? Mo(u, f) : Xr(
4793
+ children: w ? Mo(u, f) : Qr(
4795
4794
  u.snapshotPayload,
4796
4795
  !1
4797
4796
  )
@@ -4803,7 +4802,7 @@ const xt = "USD", Ks = (e, t = xt) => {
4803
4802
  /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
4804
4803
  /* @__PURE__ */ d("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
4805
4804
  /* @__PURE__ */ a(
4806
- ce,
4805
+ de,
4807
4806
  {
4808
4807
  icon: "mdi:home-map-marker",
4809
4808
  width: "24",
@@ -4845,7 +4844,7 @@ const xt = "USD", Ks = (e, t = xt) => {
4845
4844
  className: `space-y-3 ${G ? "opacity-70" : ""}`,
4846
4845
  children: [
4847
4846
  U.map((u) => {
4848
- const m = [u.addressLine1, u.addressLine2].filter(Boolean).map((E) => We(E || "")).join(" "), f = We(u.city || ""), w = `${We(u.state || "")}${u.state && u.postalCode ? ", " : ""}${u.postalCode || ""}`, v = We(u.country || ""), j = String(u.addressId ?? u.id), H = R === j;
4847
+ const m = [u.addressLine1, u.addressLine2].filter(Boolean).map((A) => We(A || "")).join(" "), f = We(u.city || ""), w = `${We(u.state || "")}${u.state && u.postalCode ? ", " : ""}${u.postalCode || ""}`, v = We(u.country || ""), j = String(u.addressId ?? u.id), H = R === j;
4849
4848
  return /* @__PURE__ */ d(
4850
4849
  "label",
4851
4850
  {
@@ -4860,7 +4859,7 @@ const xt = "USD", Ks = (e, t = xt) => {
4860
4859
  className: "mt-1 accent-tanya-light",
4861
4860
  checked: H,
4862
4861
  disabled: G,
4863
- onChange: () => ne(j),
4862
+ onChange: () => oe(j),
4864
4863
  value: j
4865
4864
  }
4866
4865
  ),
@@ -4883,7 +4882,7 @@ const xt = "USD", Ks = (e, t = xt) => {
4883
4882
  /* @__PURE__ */ a(
4884
4883
  "button",
4885
4884
  {
4886
- onClick: Wr,
4885
+ onClick: Jr,
4887
4886
  className: "px-6 py-2.5 rounded-full font-semibold border transition-all hover:-translate-y-0.5 hover:shadow-sm",
4888
4887
  style: {
4889
4888
  borderColor: "var(--tanya-light)",
@@ -4911,7 +4910,7 @@ const xt = "USD", Ks = (e, t = xt) => {
4911
4910
  /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
4912
4911
  /* @__PURE__ */ d("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
4913
4912
  /* @__PURE__ */ a(
4914
- ce,
4913
+ de,
4915
4914
  {
4916
4915
  icon: "mdi:truck-delivery",
4917
4916
  width: "24",
@@ -4920,7 +4919,7 @@ const xt = "USD", Ks = (e, t = xt) => {
4920
4919
  ),
4921
4920
  "Great! Now choose how fast you want it delivered 🚚"
4922
4921
  ] }),
4923
- Z && /* @__PURE__ */ d(ke, { children: [
4922
+ ee && /* @__PURE__ */ d(ke, { children: [
4924
4923
  /* @__PURE__ */ a("span", { className: "ml-2 text-xs px-2 py-1 rounded-full bg-green-100 text-green-700 font-semibold", children: "Selected" }),
4925
4924
  !F && /* @__PURE__ */ a(
4926
4925
  "button",
@@ -4941,15 +4940,15 @@ const xt = "USD", Ks = (e, t = xt) => {
4941
4940
  /* @__PURE__ */ a(
4942
4941
  "div",
4943
4942
  {
4944
- className: `space-y-3 ${Z ? "opacity-70" : ""}`,
4945
- children: Object.keys(A).map(
4943
+ className: `space-y-3 ${ee ? "opacity-70" : ""}`,
4944
+ children: T.map(
4946
4945
  (u) => {
4947
- const m = wt[u], f = he === u;
4946
+ const m = X.id === u.id;
4948
4947
  return /* @__PURE__ */ d(
4949
4948
  "label",
4950
4949
  {
4951
- className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${f ? "border-tanya-light" : "border-gray-300"} ${Z ? "pointer-events-none" : ""}`,
4952
- title: Z ? "Delivery already submitted" : "",
4950
+ className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${m ? "border-tanya-light" : "border-gray-300"} ${ee ? "pointer-events-none" : ""}`,
4951
+ title: ee ? "Delivery already submitted" : "",
4953
4952
  children: [
4954
4953
  /* @__PURE__ */ a(
4955
4954
  "input",
@@ -4957,19 +4956,19 @@ const xt = "USD", Ks = (e, t = xt) => {
4957
4956
  type: "radio",
4958
4957
  name: "delivery",
4959
4958
  className: "mt-1 accent-tanya-light",
4960
- checked: f,
4961
- disabled: Z,
4959
+ checked: m,
4960
+ disabled: ee,
4962
4961
  onChange: () => _(u)
4963
4962
  }
4964
4963
  ),
4965
4964
  /* @__PURE__ */ d("div", { className: "flex-1", children: [
4966
- /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800 flex items-center gap-2", children: m.name }),
4967
- /* @__PURE__ */ a("div", { className: "text-sm text-gray-700", children: m.description })
4965
+ /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800 flex items-center gap-2", children: u.name }),
4966
+ /* @__PURE__ */ a("div", { className: "text-sm text-gray-700", children: u.description })
4968
4967
  ] }),
4969
- /* @__PURE__ */ a("div", { className: "text-sm font-semibold text-gray-800", children: m.price === 0 ? "Free" : m.price })
4968
+ /* @__PURE__ */ a("div", { className: "text-sm font-semibold text-gray-800", children: u.price === 0 ? "Free" : u.price })
4970
4969
  ]
4971
4970
  },
4972
- u
4971
+ key
4973
4972
  );
4974
4973
  }
4975
4974
  )
@@ -4979,7 +4978,7 @@ const xt = "USD", Ks = (e, t = xt) => {
4979
4978
  /* @__PURE__ */ a(
4980
4979
  "button",
4981
4980
  {
4982
- onClick: Wr,
4981
+ onClick: Jr,
4983
4982
  className: "px-6 py-2.5 rounded-full font-semibold border transition-all hover:-translate-y-0.5 hover:shadow-sm",
4984
4983
  style: {
4985
4984
  borderColor: "var(--tanya-light)",
@@ -4992,19 +4991,19 @@ const xt = "USD", Ks = (e, t = xt) => {
4992
4991
  "button",
4993
4992
  {
4994
4993
  onClick: Fo,
4995
- disabled: Z,
4996
- 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"}`,
4994
+ disabled: ee,
4995
+ className: `px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${ee ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
4997
4996
  style: { background: Le },
4998
- children: Z ? "Delivery Submitted" : "Submit Delivery Option"
4997
+ children: ee ? "Delivery Submitted" : "Submit Delivery Option"
4999
4998
  }
5000
4999
  )
5001
5000
  ] })
5002
5001
  ] }),
5003
- oe && /* @__PURE__ */ d("div", { className: "mt-2 mb-6 mx-6 rounded-xl p-6 shadow-md border border-gray-200 bg-white animate-fade-in", children: [
5002
+ ae && /* @__PURE__ */ d("div", { className: "mt-2 mb-6 mx-6 rounded-xl p-6 shadow-md border border-gray-200 bg-white animate-fade-in", children: [
5004
5003
  /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
5005
5004
  /* @__PURE__ */ d("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
5006
5005
  /* @__PURE__ */ a(
5007
- ce,
5006
+ de,
5008
5007
  {
5009
5008
  icon: "mdi:credit-card-outline",
5010
5009
  width: "24",
@@ -5049,12 +5048,12 @@ const xt = "USD", Ks = (e, t = xt) => {
5049
5048
  className: "mt-1 accent-tanya-light",
5050
5049
  checked: Ae === "card",
5051
5050
  disabled: Oe,
5052
- onChange: () => St("card")
5051
+ onChange: () => kt("card")
5053
5052
  }
5054
5053
  ),
5055
5054
  /* @__PURE__ */ d("div", { className: "flex-1", children: [
5056
5055
  /* @__PURE__ */ d("div", { className: "font-semibold text-gray-800 flex items-center gap-2", children: [
5057
- /* @__PURE__ */ a(ce, { icon: "mdi:credit-card-chip-outline", width: "18" }),
5056
+ /* @__PURE__ */ a(de, { icon: "mdi:credit-card-chip-outline", width: "18" }),
5058
5057
  " ",
5059
5058
  "Credit Card"
5060
5059
  ] }),
@@ -5094,15 +5093,15 @@ const xt = "USD", Ks = (e, t = xt) => {
5094
5093
  )
5095
5094
  ] })
5096
5095
  ] }),
5097
- Nt && Zr(
5096
+ St && Gr(
5098
5097
  {
5099
- ...fe,
5098
+ ...me,
5100
5099
  address: JSON.parse(
5101
5100
  localStorage.getItem("agentic_order_address") || "null"
5102
5101
  ),
5103
5102
  delivery: localStorage.getItem("agentic_order_delivery"),
5104
5103
  payment: localStorage.getItem("agentic_order_payment"),
5105
- summary: Jr(fe == null ? void 0 : fe.currency)
5104
+ summary: Vr(me == null ? void 0 : me.currency)
5106
5105
  },
5107
5106
  !1
5108
5107
  )
@@ -5113,13 +5112,13 @@ const xt = "USD", Ks = (e, t = xt) => {
5113
5112
  /* @__PURE__ */ a(
5114
5113
  "input",
5115
5114
  {
5116
- placeholder: Se ? "Complete the current step…" : Ft ? `What would you like me to do? (e.g., If this product goes below $${parseInt(r.price) - 5}, grab it for me.)` : "Please select a combination first.",
5115
+ placeholder: Se ? "Complete the current step…" : Pt ? `What would you like me to do? (e.g., If this product goes below $${parseInt(r.price) - 5}, grab it for me.)` : "Please select a combination first.",
5117
5116
  disabled: ko,
5118
5117
  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
5119
- ${Ft ? "" : "placeholder:text-red-400 text-red-500"}`,
5118
+ ${Pt ? "" : "placeholder:text-red-400 text-red-500"}`,
5120
5119
  value: z,
5121
5120
  onKeyDown: (u) => {
5122
- u.key === "Enter" && !Ie && !Se && Kr();
5121
+ u.key === "Enter" && !Ie && !Se && Yr();
5123
5122
  },
5124
5123
  onChange: (u) => Te(u.target.value)
5125
5124
  }
@@ -5131,7 +5130,7 @@ const xt = "USD", Ks = (e, t = xt) => {
5131
5130
  disabled: Ie || Se,
5132
5131
  className: "mr-6 font-medium",
5133
5132
  style: { color: "var(--tanya-light)" },
5134
- onClick: () => Kr(),
5133
+ onClick: () => Yr(),
5135
5134
  children: Ie ? /* @__PURE__ */ a(
5136
5135
  "div",
5137
5136
  {
@@ -5139,7 +5138,7 @@ const xt = "USD", Ks = (e, t = xt) => {
5139
5138
  style: { borderBottom: "2px solid" }
5140
5139
  }
5141
5140
  ) : /* @__PURE__ */ a(
5142
- ce,
5141
+ de,
5143
5142
  {
5144
5143
  icon: "fluent:send-48-filled",
5145
5144
  color: "var(--tanya-light)",
@@ -5160,6 +5159,6 @@ const xt = "USD", Ks = (e, t = xt) => {
5160
5159
  export {
5161
5160
  vi as AgenticShoppingButton,
5162
5161
  bi as TanyaChatbot,
5163
- hi as TanyaChatbotProvider
5162
+ pi as TanyaChatbotProvider
5164
5163
  };
5165
5164
  //# sourceMappingURL=tanya-chatbot.es.js.map